@cuekit-ai/react 1.6.8 → 1.6.9

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/cuekit.css CHANGED
@@ -22,19 +22,23 @@
22
22
  --voice-border: 252 31% 91%;
23
23
  --voice-text: 222.2 84% 4.9%;
24
24
  --voice-text-muted: 252 16% 47%;
25
- --voice-accent: 252 81% 60%;
25
+ --voice-accent: 252 78% 60%; /* #6257d9 */
26
+ --voice-accent-vibrant: 245 84% 77%; /* #9a92f6 */
27
+ --voice-accent-dark: 246 57% 54%; /* #5447cd */
26
28
  --voice-accent-light: 252 100% 96%;
27
- --voice-user-bubble: 252 81% 60%;
29
+ --voice-user-bubble: 252 78% 60%;
28
30
  --voice-user-text: 0 0% 100%;
29
31
  --voice-ai-bubble: 0 0% 100%;
30
32
  --voice-ai-text: 222.2 84% 4.9%;
31
- --indicator-bg: 252 81% 60%;
33
+ --indicator-bg: 252 78% 60%;
34
+ --voice-status-bg: 252 100% 96%;
35
+ --voice-status-text: 252 78% 60%;
32
36
  --voice-placeholder: 252 16% 47%;
33
37
 
34
38
  /* 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%));
39
+ --gradient-primary: linear-gradient(135deg, #8177ed, #9a92f6);
40
+ --gradient-surface: linear-gradient(180deg, #ffffff, #f6f5ff);
41
+ --gradient-mic-button: radial-gradient(circle at 50% 0%, #9a92f6, #6257d9);
38
42
 
39
43
  /* Shadows Light */
40
44
  --shadow-soft: 0 4px 20px -2px hsl(252 81% 60% / 0.1);
@@ -49,18 +53,20 @@
49
53
  --voice-border: 252 31% 91%;
50
54
  --voice-text: 222.2 84% 4.9%;
51
55
  --voice-text-muted: 252 16% 47%;
52
- --voice-accent: 252 81% 60%;
56
+ --voice-accent: 252 78% 60%;
57
+ --voice-accent-vibrant: 245 84% 77%;
58
+ --voice-accent-dark: 246 57% 54%;
53
59
  --voice-accent-light: 252 100% 96%;
54
- --voice-user-bubble: 252 81% 60%;
60
+ --voice-user-bubble: 252 78% 60%;
55
61
  --voice-user-text: 0 0% 100%;
56
62
  --voice-ai-bubble: 0 0% 100%;
57
63
  --voice-ai-text: 222.2 84% 4.9%;
58
- --indicator-bg: 252 81% 60%;
64
+ --indicator-bg: 252 78% 60%;
59
65
  --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);
66
+ --gradient-primary: linear-gradient(135deg, #8177ed, #9a92f6);
67
+ --gradient-surface: linear-gradient(180deg, #ffffff, #f6f5ff);
68
+ --gradient-mic-button: radial-gradient(circle at 50% 0%, #9a92f6, #6257d9);
69
+ --shadow-soft: 0 4px 20px -2px rgba(129, 119, 237, 0.1);
64
70
  --shadow-card: 0 10px 40px -10px hsl(0 0% 0% / 0.05);
65
71
  }
66
72
 
@@ -71,22 +77,26 @@
71
77
  --voice-border: 248 32% 22%;
72
78
  --voice-text: 252 40% 98%;
73
79
  --voice-text-muted: 252 20% 65%;
74
- --voice-accent: 252 88% 70%;
80
+ --voice-accent: 245 84% 77%; /* #9a92f6 */
81
+ --voice-accent-vibrant: 252 88% 77%;
82
+ --voice-accent-dark: 246 57% 54%;
75
83
  --voice-accent-light: 252 47% 25%;
76
- --voice-user-bubble: 252 88% 70%;
84
+ --voice-user-bubble: 245 84% 77%;
77
85
  --voice-user-text: 0 0% 100%;
78
86
  --voice-ai-bubble: 252 32% 21%;
79
87
  --voice-ai-text: 0 0% 100%;
80
- --indicator-bg: 252 88% 70%;
88
+ --indicator-bg: 245 84% 77%;
89
+ --voice-status-bg: 252 47% 25%;
90
+ --voice-status-text: 245 84% 77%;
81
91
  --voice-placeholder: 252 20% 65%;
82
92
 
83
93
  /* 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%));
94
+ --gradient-primary: linear-gradient(135deg, #8177ed, #9a92f6);
95
+ --gradient-surface: linear-gradient(180deg, #2b2640, #1a1625);
96
+ --gradient-mic-button: radial-gradient(circle at 50% 0%, #9a92f6, #5447cd);
87
97
 
88
98
  /* Shadows Dark */
89
- --shadow-soft: 0 4px 20px -2px hsl(252 88% 70% / 0.2);
99
+ --shadow-soft: 0 4px 20px -2px rgba(129, 119, 237, 0.2);
90
100
  --shadow-card: 0 10px 40px -10px hsl(0 0% 0% / 0.3);
91
101
  }
92
102
 
@@ -171,7 +181,7 @@
171
181
 
172
182
  /* Placeholder styles */
173
183
  input::placeholder {
174
- color: hsl(var(--voice-placeholder));
184
+ color: hsl(var(--voice-text) / 0.9);
175
185
  }
176
186
 
177
187
  /* Theme toggle animations */
@@ -554,8 +564,8 @@ input::placeholder {
554
564
  }
555
565
 
556
566
  .language-tooltip-content {
557
- background: oklch(0.23 0.08 252.75);
558
- color: hsl(0 0% 98%);
567
+ background: hsl(var(--voice-accent));
568
+ color: #fff;
559
569
  padding: 8px 12px;
560
570
  border-radius: 8px;
561
571
  font-size: 12px;
@@ -579,7 +589,7 @@ input::placeholder {
579
589
  width: 0;
580
590
  height: 0;
581
591
  border: 4px solid transparent;
582
- border-top-color: oklch(0.23 0.08 252.75);
592
+ border-top-color: hsl(var(--voice-accent));
583
593
  }
584
594
 
585
595
  .language-selector-content {
@@ -755,7 +765,7 @@ input::placeholder {
755
765
  align-items: center;
756
766
  gap: 12px;
757
767
  padding: 8px;
758
- background: hsl(var(--voice-surface));
768
+ background: white; /* Force white as per user request */
759
769
  border: 1px solid hsl(var(--voice-border));
760
770
  border-radius: 32px;
761
771
  box-shadow:
@@ -786,13 +796,12 @@ input::placeholder {
786
796
  align-items: center;
787
797
  gap: 16px;
788
798
  padding: 20px;
789
- background: hsl(var(--voice-surface));
799
+ background: white; /* Force white as per user request */
790
800
  border: 1px solid hsl(var(--voice-border));
791
801
  border-radius: 16px;
792
802
  box-shadow:
793
803
  0 20px 60px -12px hsl(0 0% 0% / 0.15),
794
804
  0 8px 32px -8px hsl(var(--voice-accent) / 0.1);
795
- backdrop-filter: blur(16px);
796
805
  min-width: 280px;
797
806
  animation: voiceChatLanguageEnter 0.3s cubic-bezier(0.4, 0, 0.2, 1);
798
807
  }
@@ -887,11 +896,11 @@ input::placeholder {
887
896
 
888
897
  /* Dark theme for voice chat button: only when popup has .cuekit-dark (no media query) */
889
898
  .cuekit-voice-popup.cuekit-dark .voice-chat-main-button {
890
- background: hsl(var(--voice-surface) / 0.8);
899
+ background: white; /* Force white in dark mode as per user request */
891
900
  border-color: hsl(var(--voice-border) / 0.5);
892
901
  }
893
902
 
894
903
  .cuekit-voice-popup.cuekit-dark .voice-chat-language-selection {
895
- background: hsl(var(--voice-surface));
904
+ background: white; /* Force white in dark mode as per user request */
896
905
  border-color: hsl(var(--voice-border));
897
906
  }
package/dist/index.d.mts CHANGED
@@ -11,8 +11,13 @@ interface DOMStructurePayload {
11
11
  }
12
12
  interface ThemeColors {
13
13
  primary: string;
14
- background: string;
15
- text: string;
14
+ primaryVibrant?: string;
15
+ primaryDark?: string;
16
+ indicator?: string;
17
+ statusBg?: string;
18
+ statusText?: string;
19
+ background?: string;
20
+ text?: string;
16
21
  surface?: string;
17
22
  border?: string;
18
23
  textMuted?: string;
@@ -22,8 +27,8 @@ interface ThemeColors {
22
27
  aiText?: string;
23
28
  }
24
29
  interface ThemeConfig {
25
- light: ThemeColors;
26
- dark: ThemeColors;
30
+ light?: Partial<ThemeColors>;
31
+ dark?: Partial<ThemeColors>;
27
32
  }
28
33
 
29
34
  declare global {
@@ -62,7 +67,7 @@ interface Props {
62
67
  showLogo?: boolean;
63
68
  showAIIcon?: boolean;
64
69
  showUserIcon?: boolean;
65
- theme: ThemeConfig;
70
+ theme?: ThemeConfig;
66
71
  emptyStateMessage?: string;
67
72
  }
68
73
  declare const AnsyrProvider: React__default.FC<Props>;
package/dist/index.d.ts CHANGED
@@ -11,8 +11,13 @@ interface DOMStructurePayload {
11
11
  }
12
12
  interface ThemeColors {
13
13
  primary: string;
14
- background: string;
15
- text: string;
14
+ primaryVibrant?: string;
15
+ primaryDark?: string;
16
+ indicator?: string;
17
+ statusBg?: string;
18
+ statusText?: string;
19
+ background?: string;
20
+ text?: string;
16
21
  surface?: string;
17
22
  border?: string;
18
23
  textMuted?: string;
@@ -22,8 +27,8 @@ interface ThemeColors {
22
27
  aiText?: string;
23
28
  }
24
29
  interface ThemeConfig {
25
- light: ThemeColors;
26
- dark: ThemeColors;
30
+ light?: Partial<ThemeColors>;
31
+ dark?: Partial<ThemeColors>;
27
32
  }
28
33
 
29
34
  declare global {
@@ -62,7 +67,7 @@ interface Props {
62
67
  showLogo?: boolean;
63
68
  showAIIcon?: boolean;
64
69
  showUserIcon?: boolean;
65
- theme: ThemeConfig;
70
+ theme?: ThemeConfig;
66
71
  emptyStateMessage?: string;
67
72
  }
68
73
  declare const AnsyrProvider: React__default.FC<Props>;
package/dist/index.js CHANGED
@@ -24820,6 +24820,94 @@ function InitCuekit(config) {
24820
24820
  setWebRTCConfig(webRTCConfig);
24821
24821
  }
24822
24822
 
24823
+ // src/utils/colors.ts
24824
+ function hexToHSL(hex) {
24825
+ hex = hex.replace(/^#/, "");
24826
+ if (hex.length === 3) {
24827
+ hex = hex.split("").map((char) => char + char).join("");
24828
+ }
24829
+ if (hex.length !== 6) return null;
24830
+ const r3 = parseInt(hex.substring(0, 2), 16) / 255;
24831
+ const g = parseInt(hex.substring(2, 4), 16) / 255;
24832
+ const b2 = parseInt(hex.substring(4, 6), 16) / 255;
24833
+ const max = Math.max(r3, g, b2), min = Math.min(r3, g, b2);
24834
+ let h2 = 0, s = 0, l = (max + min) / 2;
24835
+ if (max !== min) {
24836
+ const d = max - min;
24837
+ s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
24838
+ switch (max) {
24839
+ case r3:
24840
+ h2 = (g - b2) / d + (g < b2 ? 6 : 0);
24841
+ break;
24842
+ case g:
24843
+ h2 = (b2 - r3) / d + 2;
24844
+ break;
24845
+ case b2:
24846
+ h2 = (r3 - g) / d + 4;
24847
+ break;
24848
+ }
24849
+ h2 /= 6;
24850
+ }
24851
+ const res = {
24852
+ h: Math.round(h2 * 360),
24853
+ s: Math.round(s * 100),
24854
+ l: Math.round(l * 100)
24855
+ };
24856
+ return {
24857
+ ...res,
24858
+ toString: () => `${res.h} ${res.s}% ${res.l}%`
24859
+ };
24860
+ }
24861
+
24862
+ // src/utils/theme.ts
24863
+ var generateThemeStyles = (theme, currentTheme = "dark") => {
24864
+ if (!theme) return {};
24865
+ const colors = currentTheme === "light" ? theme.light : theme.dark;
24866
+ if (!colors) return {};
24867
+ const mapping = {
24868
+ primary: "--voice-accent",
24869
+ statusBg: "--voice-status-bg",
24870
+ statusText: "--voice-status-text",
24871
+ background: "--voice-bg",
24872
+ surface: "--voice-surface",
24873
+ border: "--voice-border",
24874
+ text: "--voice-text",
24875
+ textMuted: "--voice-text-muted",
24876
+ userBubble: "--voice-user-bubble",
24877
+ userText: "--voice-user-text",
24878
+ aiBubble: "--voice-ai-bubble",
24879
+ aiText: "--voice-ai-text"
24880
+ };
24881
+ const styles = {};
24882
+ Object.entries(colors).forEach(([key, value]) => {
24883
+ const varName = mapping[key];
24884
+ if (varName && value) {
24885
+ const hsl = hexToHSL(value);
24886
+ if (hsl) {
24887
+ styles[varName] = hsl.toString();
24888
+ if (key === "primary") {
24889
+ const indicatorHsl = colors.indicator ? hexToHSL(colors.indicator) : hsl;
24890
+ styles["--indicator-bg"] = indicatorHsl ? indicatorHsl.toString() : hsl.toString();
24891
+ const vibrantHsl = colors.primaryVibrant ? hexToHSL(colors.primaryVibrant) : null;
24892
+ const lVibrant = vibrantHsl ? vibrantHsl.l : Math.min(hsl.l + 7, 100);
24893
+ styles["--voice-accent-vibrant"] = vibrantHsl ? vibrantHsl.toString() : `${hsl.h} ${hsl.s}% ${lVibrant}%`;
24894
+ const darkHsl = colors.primaryDark ? hexToHSL(colors.primaryDark) : null;
24895
+ const lDark = darkHsl ? darkHsl.l : Math.max(hsl.l - 10, 0);
24896
+ styles["--voice-accent-dark"] = darkHsl ? darkHsl.toString() : `${hsl.h} ${hsl.s}% ${lDark}%`;
24897
+ styles["--voice-accent-light"] = currentTheme === "light" ? `${hsl.h} ${hsl.s}% 96%` : `${hsl.h} ${hsl.s}% 25%`;
24898
+ const finalVibrant = vibrantHsl ? `hsl(${vibrantHsl.toString()})` : `hsl(${hsl.h} ${hsl.s}% ${lVibrant}%)`;
24899
+ const finalDark = darkHsl ? `hsl(${darkHsl.toString()})` : `hsl(${hsl.h} ${hsl.s}% ${lDark}%)`;
24900
+ styles["--gradient-primary"] = `linear-gradient(135deg, hsl(${hsl.toString()}), ${finalVibrant})`;
24901
+ styles["--gradient-mic-button"] = `radial-gradient(circle at 50% 0%, ${finalVibrant}, ${finalDark})`;
24902
+ const shadowColor = currentTheme === "light" ? `hsl(${hsl.toString()} / 0.1)` : `hsl(${hsl.toString()} / 0.2)`;
24903
+ styles["--shadow-soft"] = `0 4px 20px -2px ${shadowColor}`;
24904
+ }
24905
+ }
24906
+ }
24907
+ });
24908
+ return styles;
24909
+ };
24910
+
24823
24911
  // src/providers/ansyr-provider.tsx
24824
24912
  init_navigation();
24825
24913
  init_intent_store();
@@ -24865,45 +24953,6 @@ var initWebRTC = (apiKey) => {
24865
24953
  return initWebRTCWithDeployedBackend(apiKey);
24866
24954
  };
24867
24955
 
24868
- // src/utils/colors.ts
24869
- function hexToHSL(hex) {
24870
- hex = hex.replace(/^#/, "");
24871
- if (hex.length === 3) {
24872
- hex = hex.split("").map((char) => char + char).join("");
24873
- }
24874
- if (hex.length !== 6) return null;
24875
- const r3 = parseInt(hex.substring(0, 2), 16) / 255;
24876
- const g = parseInt(hex.substring(2, 4), 16) / 255;
24877
- const b2 = parseInt(hex.substring(4, 6), 16) / 255;
24878
- const max = Math.max(r3, g, b2), min = Math.min(r3, g, b2);
24879
- let h2 = 0, s = 0, l = (max + min) / 2;
24880
- if (max !== min) {
24881
- const d = max - min;
24882
- s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
24883
- switch (max) {
24884
- case r3:
24885
- h2 = (g - b2) / d + (g < b2 ? 6 : 0);
24886
- break;
24887
- case g:
24888
- h2 = (b2 - r3) / d + 2;
24889
- break;
24890
- case b2:
24891
- h2 = (r3 - g) / d + 4;
24892
- break;
24893
- }
24894
- h2 /= 6;
24895
- }
24896
- const res = {
24897
- h: Math.round(h2 * 360),
24898
- s: Math.round(s * 100),
24899
- l: Math.round(l * 100)
24900
- };
24901
- return {
24902
- ...res,
24903
- toString: () => `${res.h} ${res.s}% ${res.l}%`
24904
- };
24905
- }
24906
-
24907
24956
  // src/providers/ansyr-provider.tsx
24908
24957
  if (typeof window !== "undefined" && !globalThis.AnsyrStore) {
24909
24958
  globalThis.AnsyrStore = {
@@ -24958,47 +25007,7 @@ var AnsyrProvider = ({
24958
25007
  emptyStateMessage
24959
25008
  }) => {
24960
25009
  const [internalDeviceId, setInternalDeviceId] = (0, import_react.useState)(deviceId);
24961
- const generateThemeStyles2 = (theme2) => {
24962
- if (!theme2) return {};
24963
- const mapColorsToVars = (colors) => {
24964
- const mapping = {
24965
- primary: "--voice-accent",
24966
- background: "--voice-bg",
24967
- surface: "--voice-surface",
24968
- border: "--voice-border",
24969
- text: "--voice-text",
24970
- textMuted: "--voice-text-muted",
24971
- userBubble: "--voice-user-bubble",
24972
- userText: "--voice-user-text",
24973
- aiBubble: "--voice-ai-bubble",
24974
- aiText: "--voice-ai-text"
24975
- };
24976
- const styles2 = {};
24977
- Object.entries(colors).forEach(([key, value]) => {
24978
- const varName = mapping[key];
24979
- if (varName && value) {
24980
- const hsl = hexToHSL(value);
24981
- if (hsl) {
24982
- styles2[varName] = hsl.toString();
24983
- if (key === "primary") {
24984
- styles2["--indicator-bg"] = hsl.toString();
24985
- styles2["--voice-accent-light"] = `${hsl.h} ${hsl.s}% 96%`;
24986
- }
24987
- }
24988
- }
24989
- });
24990
- return styles2;
24991
- };
24992
- const styles = {};
24993
- if (theme2.light) {
24994
- const lightStyles = mapColorsToVars(theme2.light);
24995
- Object.entries(lightStyles).forEach(([key, value]) => {
24996
- styles[key] = value;
24997
- });
24998
- }
24999
- return styles;
25000
- };
25001
- const themeStyles = generateThemeStyles2(theme);
25010
+ const themeStyles = generateThemeStyles(theme, "dark");
25002
25011
  (0, import_react.useEffect)(() => {
25003
25012
  InitCuekit({ apiKey, appId });
25004
25013
  }, [apiKey, appId]);
@@ -38921,38 +38930,6 @@ var useDraggableResizableContainer = (storageKey) => {
38921
38930
  };
38922
38931
 
38923
38932
  // src/components/chat-popup.tsx
38924
- var generateThemeStyles = (theme, currentTheme = "dark") => {
38925
- if (!theme) return {};
38926
- const colors = currentTheme === "light" ? theme.light : theme.dark;
38927
- if (!colors) return {};
38928
- const mapping = {
38929
- primary: "--voice-accent",
38930
- background: "--voice-bg",
38931
- surface: "--voice-surface",
38932
- border: "--voice-border",
38933
- text: "--voice-text",
38934
- textMuted: "--voice-text-muted",
38935
- userBubble: "--voice-user-bubble",
38936
- userText: "--voice-user-text",
38937
- aiBubble: "--voice-ai-bubble",
38938
- aiText: "--voice-ai-text"
38939
- };
38940
- const styles = {};
38941
- Object.entries(colors).forEach(([key, value]) => {
38942
- const varName = mapping[key];
38943
- if (varName && value) {
38944
- const hsl = hexToHSL(value);
38945
- if (hsl) {
38946
- styles[varName] = hsl.toString();
38947
- if (key === "primary") {
38948
- styles["--indicator-bg"] = hsl.toString();
38949
- styles["--voice-accent-light"] = currentTheme === "light" ? `${hsl.h} ${hsl.s}% 96%` : `${hsl.h} ${hsl.s}% 25%`;
38950
- }
38951
- }
38952
- }
38953
- });
38954
- return styles;
38955
- };
38956
38933
  var ChatPopup = ({
38957
38934
  isOpen,
38958
38935
  isMinimized,
@@ -39143,8 +39120,8 @@ var ChatPopup = ({
39143
39120
  "div",
39144
39121
  {
39145
39122
  style: {
39146
- background: "hsl(var(--voice-accent-light))",
39147
- color: "hsl(var(--voice-accent))",
39123
+ background: "hsl(var(--voice-status-bg))",
39124
+ color: "hsl(var(--voice-status-text))",
39148
39125
  minHeight: "16px",
39149
39126
  display: "flex",
39150
39127
  alignItems: "center",
@@ -39588,8 +39565,8 @@ var ChatPopup = ({
39588
39565
  style: {
39589
39566
  padding: "10px 12px",
39590
39567
  borderRadius: 8,
39591
- border: `1px solid ${currentTheme === "dark" ? "#8177ed" : "#6257d9"}`,
39592
- background: currentTheme === "dark" ? "#8177ed" : "#6257d9",
39568
+ border: "1px solid hsl(var(--voice-accent))",
39569
+ background: "hsl(var(--voice-accent))",
39593
39570
  color: "#fff",
39594
39571
  fontSize: 12,
39595
39572
  fontWeight: 700,
@@ -39612,8 +39589,8 @@ var ChatPopup = ({
39612
39589
  style: {
39613
39590
  padding: "10px 12px",
39614
39591
  borderRadius: 8,
39615
- border: `1px solid ${currentTheme === "dark" ? "#8177ed" : "#6257d9"}`,
39616
- background: currentTheme === "dark" ? "#8177ed" : "#6257d9",
39592
+ border: "1px solid hsl(var(--voice-accent))",
39593
+ background: "hsl(var(--voice-accent))",
39617
39594
  color: "#fff",
39618
39595
  fontSize: 12,
39619
39596
  fontWeight: 700,
@@ -39651,17 +39628,14 @@ var BorderGlow = ({ isActive }) => {
39651
39628
  right: 0,
39652
39629
  bottom: 0,
39653
39630
  width: "4px",
39654
- background: "linear-gradient(to bottom, #A39EEC, #8177ed, #6257d9)",
39631
+ background: "linear-gradient(to bottom, hsl(var(--voice-accent-light)), hsl(var(--voice-accent)), hsl(var(--voice-accent-light)))",
39655
39632
  animation: "borderPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
39656
39633
  opacity: 0.8
39657
39634
  },
39658
39635
  rightBorder2: {
39659
39636
  position: "absolute",
39660
39637
  top: 0,
39661
- right: 0,
39662
- bottom: 0,
39663
- width: "8px",
39664
- background: "linear-gradient(to bottom, #c0bbfb, #8177ed, #8177ed)",
39638
+ background: "linear-gradient(to bottom, hsl(var(--voice-accent-light)), hsl(var(--voice-accent)), hsl(var(--voice-accent)))",
39665
39639
  filter: "blur(4px)",
39666
39640
  animation: "borderPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
39667
39641
  opacity: 0.6
@@ -39670,9 +39644,7 @@ var BorderGlow = ({ isActive }) => {
39670
39644
  position: "absolute",
39671
39645
  top: 0,
39672
39646
  right: 0,
39673
- bottom: 0,
39674
- width: "16px",
39675
- background: "linear-gradient(to bottom, #dad7fe, #8177ed, #9a92f6)",
39647
+ background: "linear-gradient(to bottom, hsl(var(--voice-accent-light)), hsl(var(--voice-accent)), hsl(var(--voice-accent-light)))",
39676
39648
  filter: "blur(12px)",
39677
39649
  animation: "borderPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
39678
39650
  opacity: 0.4
@@ -39683,7 +39655,7 @@ var BorderGlow = ({ isActive }) => {
39683
39655
  left: 0,
39684
39656
  bottom: 0,
39685
39657
  width: "4px",
39686
- background: "linear-gradient(to bottom, #A39EEC, #8177ed, #6257d9)",
39658
+ background: "linear-gradient(to bottom, hsl(var(--voice-accent-light)), hsl(var(--voice-accent)), hsl(var(--voice-accent-light)))",
39687
39659
  animation: "borderPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
39688
39660
  opacity: 0.8
39689
39661
  },
@@ -39692,8 +39664,7 @@ var BorderGlow = ({ isActive }) => {
39692
39664
  top: 0,
39693
39665
  left: 0,
39694
39666
  bottom: 0,
39695
- width: "8px",
39696
- background: "linear-gradient(to bottom, #c0bbfb, #8177ed, #8177ed)",
39667
+ background: "linear-gradient(to bottom, hsl(var(--voice-accent-light)), hsl(var(--voice-accent)), hsl(var(--voice-accent)))",
39697
39668
  filter: "blur(4px)",
39698
39669
  animation: "borderPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
39699
39670
  opacity: 0.6
@@ -39703,8 +39674,7 @@ var BorderGlow = ({ isActive }) => {
39703
39674
  top: 0,
39704
39675
  left: 0,
39705
39676
  bottom: 0,
39706
- width: "16px",
39707
- background: "linear-gradient(to bottom, #dad7fe, #8177ed, #9a92f6)",
39677
+ background: "linear-gradient(to bottom, hsl(var(--voice-accent-light)), hsl(var(--voice-accent)), hsl(var(--voice-accent-light)))",
39708
39678
  filter: "blur(12px)",
39709
39679
  animation: "borderPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
39710
39680
  opacity: 0.4
@@ -39715,7 +39685,7 @@ var BorderGlow = ({ isActive }) => {
39715
39685
  left: 0,
39716
39686
  width: "32px",
39717
39687
  height: "32px",
39718
- background: "#9a92f6",
39688
+ background: "hsl(var(--voice-accent))",
39719
39689
  borderBottomRightRadius: "50%",
39720
39690
  filter: "blur(16px)",
39721
39691
  animation: "borderPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
@@ -39727,7 +39697,7 @@ var BorderGlow = ({ isActive }) => {
39727
39697
  right: 0,
39728
39698
  width: "32px",
39729
39699
  height: "32px",
39730
- background: "#A39EEC",
39700
+ background: "hsl(var(--voice-accent))",
39731
39701
  borderBottomLeftRadius: "50%",
39732
39702
  filter: "blur(16px)",
39733
39703
  animation: "borderPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
@@ -39739,7 +39709,7 @@ var BorderGlow = ({ isActive }) => {
39739
39709
  right: 0,
39740
39710
  width: "32px",
39741
39711
  height: "32px",
39742
- background: "#8177ed",
39712
+ background: "hsl(var(--voice-accent))",
39743
39713
  borderTopLeftRadius: "50%",
39744
39714
  filter: "blur(16px)",
39745
39715
  animation: "borderPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
@@ -39751,7 +39721,7 @@ var BorderGlow = ({ isActive }) => {
39751
39721
  left: 0,
39752
39722
  width: "32px",
39753
39723
  height: "32px",
39754
- background: "#6257d9",
39724
+ background: "hsl(var(--voice-accent))",
39755
39725
  borderTopRightRadius: "50%",
39756
39726
  filter: "blur(16px)",
39757
39727
  animation: "borderPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
@@ -42150,47 +42120,7 @@ var MicButton = ({
42150
42120
  }
42151
42121
  };
42152
42122
  const generateMicButtonGradient = () => {
42153
- const colors = currentTheme === "light" ? theme?.light : theme?.dark;
42154
- if (colors?.primary) {
42155
- const hsl = hexToHSL(colors.primary);
42156
- if (hsl) {
42157
- const lightHsl = `${hsl.h} ${hsl.s}% ${Math.min(hsl.l + 10, 100)}%`;
42158
- return `radial-gradient(circle at 50% 0%, hsl(${lightHsl}), hsl(${hsl.toString()}))`;
42159
- }
42160
- }
42161
- return currentTheme === "dark" ? "radial-gradient(circle at 50% 0%, #9a92f6, #5447cd)" : "radial-gradient(circle at 50% 0%, #9a92f6, #6257d9)";
42162
- };
42163
- const generateThemeStyles2 = (theme2, currentTheme2 = "dark") => {
42164
- if (!theme2) return {};
42165
- const colors = currentTheme2 === "light" ? theme2.light : theme2.dark;
42166
- if (!colors) return {};
42167
- const mapping = {
42168
- primary: "--voice-accent",
42169
- background: "--voice-bg",
42170
- surface: "--voice-surface",
42171
- border: "--voice-border",
42172
- text: "--voice-text",
42173
- textMuted: "--voice-text-muted",
42174
- userBubble: "--voice-user-bubble",
42175
- userText: "--voice-user-text",
42176
- aiBubble: "--voice-ai-bubble",
42177
- aiText: "--voice-ai-text"
42178
- };
42179
- const styles = {};
42180
- Object.entries(colors).forEach(([key, value]) => {
42181
- const varName = mapping[key];
42182
- if (varName && value) {
42183
- const hsl = hexToHSL(value);
42184
- if (hsl) {
42185
- styles[varName] = hsl.toString();
42186
- if (key === "primary") {
42187
- styles["--indicator-bg"] = hsl.toString();
42188
- styles["--voice-accent-light"] = currentTheme2 === "light" ? `${hsl.h} ${hsl.s}% 96%` : `${hsl.h} ${hsl.s}% 25%`;
42189
- }
42190
- }
42191
- }
42192
- });
42193
- return styles;
42123
+ return "radial-gradient(circle at 50% 0%, hsl(var(--voice-accent-vibrant)), hsl(var(--voice-accent-dark)))";
42194
42124
  };
42195
42125
  const micButtonGradient = generateMicButtonGradient();
42196
42126
  const buttonStyles = {
@@ -42227,18 +42157,18 @@ var MicButton = ({
42227
42157
  switch (micState) {
42228
42158
  case "listening":
42229
42159
  baseStyle.transform = "scale(1.05)";
42230
- baseStyle.boxShadow = "0 25px 50px -12px rgba(129, 119, 237, 0.6)";
42160
+ baseStyle.boxShadow = "0 25px 50px -12px hsla(var(--voice-accent) / 0.6)";
42231
42161
  break;
42232
42162
  case "thinking":
42233
42163
  baseStyle.transform = "scale(1.02)";
42234
- baseStyle.boxShadow = "0 20px 25px -5px rgba(154, 146, 246, 0.4)";
42164
+ baseStyle.boxShadow = "0 20px 25px -5px hsla(var(--voice-accent) / 0.4)";
42235
42165
  break;
42236
42166
  case "replying":
42237
42167
  baseStyle.transform = "scale(1.02)";
42238
- baseStyle.boxShadow = "0 20px 25px -5px rgba(129, 119, 237, 0.4)";
42168
+ baseStyle.boxShadow = "0 20px 25px -5px hsla(var(--voice-accent) / 0.4)";
42239
42169
  break;
42240
42170
  default:
42241
- baseStyle.boxShadow = "0 10px 15px -3px rgba(129, 119, 237, 0.3)";
42171
+ baseStyle.boxShadow = "0 10px 15px -3px hsla(var(--voice-accent) / 0.3)";
42242
42172
  break;
42243
42173
  }
42244
42174
  return baseStyle;
@@ -42251,7 +42181,7 @@ var MicButton = ({
42251
42181
  style: {
42252
42182
  ...buttonStyles.container,
42253
42183
  ...getPositionStyle(),
42254
- ...generateThemeStyles2(theme, currentTheme)
42184
+ ...generateThemeStyles(theme, currentTheme)
42255
42185
  }
42256
42186
  },
42257
42187
  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(
@@ -42269,9 +42199,9 @@ var MicButton = ({
42269
42199
  className: "voice-chat-cancel-button",
42270
42200
  onClick: () => setShowLanguageSelector(false),
42271
42201
  style: {
42272
- background: currentTheme === "dark" ? "hsl(248 32% 17.5%)" : "#f6f5ff",
42273
- color: currentTheme === "dark" ? "hsl(252 20% 65%)" : "#6257d9",
42274
- border: `1px solid ${currentTheme === "dark" ? "hsl(248 32% 22%)" : "#c0bbfb"}`
42202
+ background: currentTheme === "dark" ? "hsl(var(--voice-surface))" : "hsl(var(--voice-accent-light))",
42203
+ color: currentTheme === "dark" ? "hsl(var(--voice-text-muted))" : "hsl(var(--voice-accent))",
42204
+ border: "1px solid hsl(var(--voice-border))"
42275
42205
  }
42276
42206
  },
42277
42207
  "Cancel"
@@ -42281,9 +42211,9 @@ var MicButton = ({
42281
42211
  className: "voice-chat-confirm-button",
42282
42212
  onClick: handleLanguageConfirm,
42283
42213
  style: {
42284
- background: currentTheme === "dark" ? "#8177ed" : "#6257d9",
42214
+ background: "hsl(var(--voice-accent))",
42285
42215
  color: "#fff",
42286
- border: `1px solid ${currentTheme === "dark" ? "#8177ed" : "#6257d9"}`
42216
+ border: "1px solid hsl(var(--voice-accent))"
42287
42217
  }
42288
42218
  },
42289
42219
  "Start Voice Chat"
@@ -42308,13 +42238,13 @@ var MicButton = ({
42308
42238
  onMouseEnter: (e3) => {
42309
42239
  if (micState === "idle") {
42310
42240
  e3.currentTarget.style.transform = "scale(1.05)";
42311
- e3.currentTarget.style.boxShadow = "0 20px 25px -5px rgba(129, 119, 237, 0.4)";
42241
+ e3.currentTarget.style.boxShadow = "0 20px 25px -5px hsla(var(--voice-accent) / 0.4)";
42312
42242
  }
42313
42243
  },
42314
42244
  onMouseLeave: (e3) => {
42315
42245
  if (micState === "idle") {
42316
42246
  e3.currentTarget.style.transform = "scale(1)";
42317
- e3.currentTarget.style.boxShadow = "0 10px 15px -3px rgba(129, 119, 237, 0.3)";
42247
+ e3.currentTarget.style.boxShadow = "0 10px 15px -3px hsla(var(--voice-accent) / 0.3)";
42318
42248
  }
42319
42249
  },
42320
42250
  "aria-label": micState === "thinking" ? "Processing..." : micState === "replying" ? "AI is responding..." : isListening ? "Stop listening" : "Start listening"
package/dist/index.mjs CHANGED
@@ -1183,45 +1183,6 @@ function InitCuekit(config) {
1183
1183
  setWebRTCConfig(webRTCConfig);
1184
1184
  }
1185
1185
 
1186
- // src/utils/webrtc-config.ts
1187
- var configureWebRTCServer = (config) => {
1188
- if (!config.apiKey) {
1189
- throw new Error("API key is required for WebRTC configuration");
1190
- }
1191
- const finalConfig = {
1192
- serverUrl: WEBRTC_BACKEND_SERVER_URL,
1193
- apiKey: config.apiKey,
1194
- roomName: config.roomName,
1195
- participantName: config.participantName,
1196
- tokenTtlSeconds: config.tokenTtlSeconds
1197
- };
1198
- setServerUrl(finalConfig.serverUrl);
1199
- if (typeof window !== "undefined") {
1200
- ;
1201
- window.CuekitWebRTCConfig = finalConfig;
1202
- }
1203
- };
1204
- var getWebRTCServerConfig = () => {
1205
- if (typeof window !== "undefined") {
1206
- return window.CuekitWebRTCConfig || null;
1207
- }
1208
- return null;
1209
- };
1210
- var initWebRTCWithDeployedBackend = (apiKey, customConfig) => {
1211
- const config = {
1212
- serverUrl: WEBRTC_BACKEND_SERVER_URL,
1213
- apiKey,
1214
- roomName: customConfig?.roomName || "default-room",
1215
- participantName: customConfig?.participantName || "user",
1216
- tokenTtlSeconds: customConfig?.tokenTtlSeconds || 7200
1217
- };
1218
- configureWebRTCServer(config);
1219
- return config;
1220
- };
1221
- var initWebRTC = (apiKey) => {
1222
- return initWebRTCWithDeployedBackend(apiKey);
1223
- };
1224
-
1225
1186
  // src/utils/colors.ts
1226
1187
  function hexToHSL(hex) {
1227
1188
  hex = hex.replace(/^#/, "");
@@ -1261,6 +1222,94 @@ function hexToHSL(hex) {
1261
1222
  };
1262
1223
  }
1263
1224
 
1225
+ // src/utils/theme.ts
1226
+ var generateThemeStyles = (theme, currentTheme = "dark") => {
1227
+ if (!theme) return {};
1228
+ const colors = currentTheme === "light" ? theme.light : theme.dark;
1229
+ if (!colors) return {};
1230
+ const mapping = {
1231
+ primary: "--voice-accent",
1232
+ statusBg: "--voice-status-bg",
1233
+ statusText: "--voice-status-text",
1234
+ background: "--voice-bg",
1235
+ surface: "--voice-surface",
1236
+ border: "--voice-border",
1237
+ text: "--voice-text",
1238
+ textMuted: "--voice-text-muted",
1239
+ userBubble: "--voice-user-bubble",
1240
+ userText: "--voice-user-text",
1241
+ aiBubble: "--voice-ai-bubble",
1242
+ aiText: "--voice-ai-text"
1243
+ };
1244
+ const styles = {};
1245
+ Object.entries(colors).forEach(([key, value]) => {
1246
+ const varName = mapping[key];
1247
+ if (varName && value) {
1248
+ const hsl = hexToHSL(value);
1249
+ if (hsl) {
1250
+ styles[varName] = hsl.toString();
1251
+ if (key === "primary") {
1252
+ const indicatorHsl = colors.indicator ? hexToHSL(colors.indicator) : hsl;
1253
+ styles["--indicator-bg"] = indicatorHsl ? indicatorHsl.toString() : hsl.toString();
1254
+ const vibrantHsl = colors.primaryVibrant ? hexToHSL(colors.primaryVibrant) : null;
1255
+ const lVibrant = vibrantHsl ? vibrantHsl.l : Math.min(hsl.l + 7, 100);
1256
+ styles["--voice-accent-vibrant"] = vibrantHsl ? vibrantHsl.toString() : `${hsl.h} ${hsl.s}% ${lVibrant}%`;
1257
+ const darkHsl = colors.primaryDark ? hexToHSL(colors.primaryDark) : null;
1258
+ const lDark = darkHsl ? darkHsl.l : Math.max(hsl.l - 10, 0);
1259
+ styles["--voice-accent-dark"] = darkHsl ? darkHsl.toString() : `${hsl.h} ${hsl.s}% ${lDark}%`;
1260
+ styles["--voice-accent-light"] = currentTheme === "light" ? `${hsl.h} ${hsl.s}% 96%` : `${hsl.h} ${hsl.s}% 25%`;
1261
+ const finalVibrant = vibrantHsl ? `hsl(${vibrantHsl.toString()})` : `hsl(${hsl.h} ${hsl.s}% ${lVibrant}%)`;
1262
+ const finalDark = darkHsl ? `hsl(${darkHsl.toString()})` : `hsl(${hsl.h} ${hsl.s}% ${lDark}%)`;
1263
+ styles["--gradient-primary"] = `linear-gradient(135deg, hsl(${hsl.toString()}), ${finalVibrant})`;
1264
+ styles["--gradient-mic-button"] = `radial-gradient(circle at 50% 0%, ${finalVibrant}, ${finalDark})`;
1265
+ const shadowColor = currentTheme === "light" ? `hsl(${hsl.toString()} / 0.1)` : `hsl(${hsl.toString()} / 0.2)`;
1266
+ styles["--shadow-soft"] = `0 4px 20px -2px ${shadowColor}`;
1267
+ }
1268
+ }
1269
+ }
1270
+ });
1271
+ return styles;
1272
+ };
1273
+
1274
+ // src/utils/webrtc-config.ts
1275
+ var configureWebRTCServer = (config) => {
1276
+ if (!config.apiKey) {
1277
+ throw new Error("API key is required for WebRTC configuration");
1278
+ }
1279
+ const finalConfig = {
1280
+ serverUrl: WEBRTC_BACKEND_SERVER_URL,
1281
+ apiKey: config.apiKey,
1282
+ roomName: config.roomName,
1283
+ participantName: config.participantName,
1284
+ tokenTtlSeconds: config.tokenTtlSeconds
1285
+ };
1286
+ setServerUrl(finalConfig.serverUrl);
1287
+ if (typeof window !== "undefined") {
1288
+ ;
1289
+ window.CuekitWebRTCConfig = finalConfig;
1290
+ }
1291
+ };
1292
+ var getWebRTCServerConfig = () => {
1293
+ if (typeof window !== "undefined") {
1294
+ return window.CuekitWebRTCConfig || null;
1295
+ }
1296
+ return null;
1297
+ };
1298
+ var initWebRTCWithDeployedBackend = (apiKey, customConfig) => {
1299
+ const config = {
1300
+ serverUrl: WEBRTC_BACKEND_SERVER_URL,
1301
+ apiKey,
1302
+ roomName: customConfig?.roomName || "default-room",
1303
+ participantName: customConfig?.participantName || "user",
1304
+ tokenTtlSeconds: customConfig?.tokenTtlSeconds || 7200
1305
+ };
1306
+ configureWebRTCServer(config);
1307
+ return config;
1308
+ };
1309
+ var initWebRTC = (apiKey) => {
1310
+ return initWebRTCWithDeployedBackend(apiKey);
1311
+ };
1312
+
1264
1313
  // src/providers/ansyr-provider.tsx
1265
1314
  if (typeof window !== "undefined" && !globalThis.AnsyrStore) {
1266
1315
  globalThis.AnsyrStore = {
@@ -1315,47 +1364,7 @@ var AnsyrProvider = ({
1315
1364
  emptyStateMessage
1316
1365
  }) => {
1317
1366
  const [internalDeviceId, setInternalDeviceId] = useState(deviceId);
1318
- const generateThemeStyles2 = (theme2) => {
1319
- if (!theme2) return {};
1320
- const mapColorsToVars = (colors) => {
1321
- const mapping = {
1322
- primary: "--voice-accent",
1323
- background: "--voice-bg",
1324
- surface: "--voice-surface",
1325
- border: "--voice-border",
1326
- text: "--voice-text",
1327
- textMuted: "--voice-text-muted",
1328
- userBubble: "--voice-user-bubble",
1329
- userText: "--voice-user-text",
1330
- aiBubble: "--voice-ai-bubble",
1331
- aiText: "--voice-ai-text"
1332
- };
1333
- const styles2 = {};
1334
- Object.entries(colors).forEach(([key, value]) => {
1335
- const varName = mapping[key];
1336
- if (varName && value) {
1337
- const hsl = hexToHSL(value);
1338
- if (hsl) {
1339
- styles2[varName] = hsl.toString();
1340
- if (key === "primary") {
1341
- styles2["--indicator-bg"] = hsl.toString();
1342
- styles2["--voice-accent-light"] = `${hsl.h} ${hsl.s}% 96%`;
1343
- }
1344
- }
1345
- }
1346
- });
1347
- return styles2;
1348
- };
1349
- const styles = {};
1350
- if (theme2.light) {
1351
- const lightStyles = mapColorsToVars(theme2.light);
1352
- Object.entries(lightStyles).forEach(([key, value]) => {
1353
- styles[key] = value;
1354
- });
1355
- }
1356
- return styles;
1357
- };
1358
- const themeStyles = generateThemeStyles2(theme);
1367
+ const themeStyles = generateThemeStyles(theme, "dark");
1359
1368
  useEffect(() => {
1360
1369
  InitCuekit({ apiKey, appId });
1361
1370
  }, [apiKey, appId]);
@@ -15272,38 +15281,6 @@ var useDraggableResizableContainer = (storageKey) => {
15272
15281
  };
15273
15282
 
15274
15283
  // src/components/chat-popup.tsx
15275
- var generateThemeStyles = (theme, currentTheme = "dark") => {
15276
- if (!theme) return {};
15277
- const colors = currentTheme === "light" ? theme.light : theme.dark;
15278
- if (!colors) return {};
15279
- const mapping = {
15280
- primary: "--voice-accent",
15281
- background: "--voice-bg",
15282
- surface: "--voice-surface",
15283
- border: "--voice-border",
15284
- text: "--voice-text",
15285
- textMuted: "--voice-text-muted",
15286
- userBubble: "--voice-user-bubble",
15287
- userText: "--voice-user-text",
15288
- aiBubble: "--voice-ai-bubble",
15289
- aiText: "--voice-ai-text"
15290
- };
15291
- const styles = {};
15292
- Object.entries(colors).forEach(([key, value]) => {
15293
- const varName = mapping[key];
15294
- if (varName && value) {
15295
- const hsl = hexToHSL(value);
15296
- if (hsl) {
15297
- styles[varName] = hsl.toString();
15298
- if (key === "primary") {
15299
- styles["--indicator-bg"] = hsl.toString();
15300
- styles["--voice-accent-light"] = currentTheme === "light" ? `${hsl.h} ${hsl.s}% 96%` : `${hsl.h} ${hsl.s}% 25%`;
15301
- }
15302
- }
15303
- }
15304
- });
15305
- return styles;
15306
- };
15307
15284
  var ChatPopup = ({
15308
15285
  isOpen,
15309
15286
  isMinimized,
@@ -15494,8 +15471,8 @@ var ChatPopup = ({
15494
15471
  "div",
15495
15472
  {
15496
15473
  style: {
15497
- background: "hsl(var(--voice-accent-light))",
15498
- color: "hsl(var(--voice-accent))",
15474
+ background: "hsl(var(--voice-status-bg))",
15475
+ color: "hsl(var(--voice-status-text))",
15499
15476
  minHeight: "16px",
15500
15477
  display: "flex",
15501
15478
  alignItems: "center",
@@ -15939,8 +15916,8 @@ var ChatPopup = ({
15939
15916
  style: {
15940
15917
  padding: "10px 12px",
15941
15918
  borderRadius: 8,
15942
- border: `1px solid ${currentTheme === "dark" ? "#8177ed" : "#6257d9"}`,
15943
- background: currentTheme === "dark" ? "#8177ed" : "#6257d9",
15919
+ border: "1px solid hsl(var(--voice-accent))",
15920
+ background: "hsl(var(--voice-accent))",
15944
15921
  color: "#fff",
15945
15922
  fontSize: 12,
15946
15923
  fontWeight: 700,
@@ -15963,8 +15940,8 @@ var ChatPopup = ({
15963
15940
  style: {
15964
15941
  padding: "10px 12px",
15965
15942
  borderRadius: 8,
15966
- border: `1px solid ${currentTheme === "dark" ? "#8177ed" : "#6257d9"}`,
15967
- background: currentTheme === "dark" ? "#8177ed" : "#6257d9",
15943
+ border: "1px solid hsl(var(--voice-accent))",
15944
+ background: "hsl(var(--voice-accent))",
15968
15945
  color: "#fff",
15969
15946
  fontSize: 12,
15970
15947
  fontWeight: 700,
@@ -16002,17 +15979,14 @@ var BorderGlow = ({ isActive }) => {
16002
15979
  right: 0,
16003
15980
  bottom: 0,
16004
15981
  width: "4px",
16005
- background: "linear-gradient(to bottom, #A39EEC, #8177ed, #6257d9)",
15982
+ background: "linear-gradient(to bottom, hsl(var(--voice-accent-light)), hsl(var(--voice-accent)), hsl(var(--voice-accent-light)))",
16006
15983
  animation: "borderPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
16007
15984
  opacity: 0.8
16008
15985
  },
16009
15986
  rightBorder2: {
16010
15987
  position: "absolute",
16011
15988
  top: 0,
16012
- right: 0,
16013
- bottom: 0,
16014
- width: "8px",
16015
- background: "linear-gradient(to bottom, #c0bbfb, #8177ed, #8177ed)",
15989
+ background: "linear-gradient(to bottom, hsl(var(--voice-accent-light)), hsl(var(--voice-accent)), hsl(var(--voice-accent)))",
16016
15990
  filter: "blur(4px)",
16017
15991
  animation: "borderPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
16018
15992
  opacity: 0.6
@@ -16021,9 +15995,7 @@ var BorderGlow = ({ isActive }) => {
16021
15995
  position: "absolute",
16022
15996
  top: 0,
16023
15997
  right: 0,
16024
- bottom: 0,
16025
- width: "16px",
16026
- background: "linear-gradient(to bottom, #dad7fe, #8177ed, #9a92f6)",
15998
+ background: "linear-gradient(to bottom, hsl(var(--voice-accent-light)), hsl(var(--voice-accent)), hsl(var(--voice-accent-light)))",
16027
15999
  filter: "blur(12px)",
16028
16000
  animation: "borderPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
16029
16001
  opacity: 0.4
@@ -16034,7 +16006,7 @@ var BorderGlow = ({ isActive }) => {
16034
16006
  left: 0,
16035
16007
  bottom: 0,
16036
16008
  width: "4px",
16037
- background: "linear-gradient(to bottom, #A39EEC, #8177ed, #6257d9)",
16009
+ background: "linear-gradient(to bottom, hsl(var(--voice-accent-light)), hsl(var(--voice-accent)), hsl(var(--voice-accent-light)))",
16038
16010
  animation: "borderPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
16039
16011
  opacity: 0.8
16040
16012
  },
@@ -16043,8 +16015,7 @@ var BorderGlow = ({ isActive }) => {
16043
16015
  top: 0,
16044
16016
  left: 0,
16045
16017
  bottom: 0,
16046
- width: "8px",
16047
- background: "linear-gradient(to bottom, #c0bbfb, #8177ed, #8177ed)",
16018
+ background: "linear-gradient(to bottom, hsl(var(--voice-accent-light)), hsl(var(--voice-accent)), hsl(var(--voice-accent)))",
16048
16019
  filter: "blur(4px)",
16049
16020
  animation: "borderPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
16050
16021
  opacity: 0.6
@@ -16054,8 +16025,7 @@ var BorderGlow = ({ isActive }) => {
16054
16025
  top: 0,
16055
16026
  left: 0,
16056
16027
  bottom: 0,
16057
- width: "16px",
16058
- background: "linear-gradient(to bottom, #dad7fe, #8177ed, #9a92f6)",
16028
+ background: "linear-gradient(to bottom, hsl(var(--voice-accent-light)), hsl(var(--voice-accent)), hsl(var(--voice-accent-light)))",
16059
16029
  filter: "blur(12px)",
16060
16030
  animation: "borderPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
16061
16031
  opacity: 0.4
@@ -16066,7 +16036,7 @@ var BorderGlow = ({ isActive }) => {
16066
16036
  left: 0,
16067
16037
  width: "32px",
16068
16038
  height: "32px",
16069
- background: "#9a92f6",
16039
+ background: "hsl(var(--voice-accent))",
16070
16040
  borderBottomRightRadius: "50%",
16071
16041
  filter: "blur(16px)",
16072
16042
  animation: "borderPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
@@ -16078,7 +16048,7 @@ var BorderGlow = ({ isActive }) => {
16078
16048
  right: 0,
16079
16049
  width: "32px",
16080
16050
  height: "32px",
16081
- background: "#A39EEC",
16051
+ background: "hsl(var(--voice-accent))",
16082
16052
  borderBottomLeftRadius: "50%",
16083
16053
  filter: "blur(16px)",
16084
16054
  animation: "borderPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
@@ -16090,7 +16060,7 @@ var BorderGlow = ({ isActive }) => {
16090
16060
  right: 0,
16091
16061
  width: "32px",
16092
16062
  height: "32px",
16093
- background: "#8177ed",
16063
+ background: "hsl(var(--voice-accent))",
16094
16064
  borderTopLeftRadius: "50%",
16095
16065
  filter: "blur(16px)",
16096
16066
  animation: "borderPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
@@ -16102,7 +16072,7 @@ var BorderGlow = ({ isActive }) => {
16102
16072
  left: 0,
16103
16073
  width: "32px",
16104
16074
  height: "32px",
16105
- background: "#6257d9",
16075
+ background: "hsl(var(--voice-accent))",
16106
16076
  borderTopRightRadius: "50%",
16107
16077
  filter: "blur(16px)",
16108
16078
  animation: "borderPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
@@ -18492,47 +18462,7 @@ var MicButton = ({
18492
18462
  }
18493
18463
  };
18494
18464
  const generateMicButtonGradient = () => {
18495
- const colors = currentTheme === "light" ? theme?.light : theme?.dark;
18496
- if (colors?.primary) {
18497
- const hsl = hexToHSL(colors.primary);
18498
- if (hsl) {
18499
- const lightHsl = `${hsl.h} ${hsl.s}% ${Math.min(hsl.l + 10, 100)}%`;
18500
- return `radial-gradient(circle at 50% 0%, hsl(${lightHsl}), hsl(${hsl.toString()}))`;
18501
- }
18502
- }
18503
- return currentTheme === "dark" ? "radial-gradient(circle at 50% 0%, #9a92f6, #5447cd)" : "radial-gradient(circle at 50% 0%, #9a92f6, #6257d9)";
18504
- };
18505
- const generateThemeStyles2 = (theme2, currentTheme2 = "dark") => {
18506
- if (!theme2) return {};
18507
- const colors = currentTheme2 === "light" ? theme2.light : theme2.dark;
18508
- if (!colors) return {};
18509
- const mapping = {
18510
- primary: "--voice-accent",
18511
- background: "--voice-bg",
18512
- surface: "--voice-surface",
18513
- border: "--voice-border",
18514
- text: "--voice-text",
18515
- textMuted: "--voice-text-muted",
18516
- userBubble: "--voice-user-bubble",
18517
- userText: "--voice-user-text",
18518
- aiBubble: "--voice-ai-bubble",
18519
- aiText: "--voice-ai-text"
18520
- };
18521
- const styles = {};
18522
- Object.entries(colors).forEach(([key, value]) => {
18523
- const varName = mapping[key];
18524
- if (varName && value) {
18525
- const hsl = hexToHSL(value);
18526
- if (hsl) {
18527
- styles[varName] = hsl.toString();
18528
- if (key === "primary") {
18529
- styles["--indicator-bg"] = hsl.toString();
18530
- styles["--voice-accent-light"] = currentTheme2 === "light" ? `${hsl.h} ${hsl.s}% 96%` : `${hsl.h} ${hsl.s}% 25%`;
18531
- }
18532
- }
18533
- }
18534
- });
18535
- return styles;
18465
+ return "radial-gradient(circle at 50% 0%, hsl(var(--voice-accent-vibrant)), hsl(var(--voice-accent-dark)))";
18536
18466
  };
18537
18467
  const micButtonGradient = generateMicButtonGradient();
18538
18468
  const buttonStyles = {
@@ -18569,18 +18499,18 @@ var MicButton = ({
18569
18499
  switch (micState) {
18570
18500
  case "listening":
18571
18501
  baseStyle.transform = "scale(1.05)";
18572
- baseStyle.boxShadow = "0 25px 50px -12px rgba(129, 119, 237, 0.6)";
18502
+ baseStyle.boxShadow = "0 25px 50px -12px hsla(var(--voice-accent) / 0.6)";
18573
18503
  break;
18574
18504
  case "thinking":
18575
18505
  baseStyle.transform = "scale(1.02)";
18576
- baseStyle.boxShadow = "0 20px 25px -5px rgba(154, 146, 246, 0.4)";
18506
+ baseStyle.boxShadow = "0 20px 25px -5px hsla(var(--voice-accent) / 0.4)";
18577
18507
  break;
18578
18508
  case "replying":
18579
18509
  baseStyle.transform = "scale(1.02)";
18580
- baseStyle.boxShadow = "0 20px 25px -5px rgba(129, 119, 237, 0.4)";
18510
+ baseStyle.boxShadow = "0 20px 25px -5px hsla(var(--voice-accent) / 0.4)";
18581
18511
  break;
18582
18512
  default:
18583
- baseStyle.boxShadow = "0 10px 15px -3px rgba(129, 119, 237, 0.3)";
18513
+ baseStyle.boxShadow = "0 10px 15px -3px hsla(var(--voice-accent) / 0.3)";
18584
18514
  break;
18585
18515
  }
18586
18516
  return baseStyle;
@@ -18593,7 +18523,7 @@ var MicButton = ({
18593
18523
  style: {
18594
18524
  ...buttonStyles.container,
18595
18525
  ...getPositionStyle(),
18596
- ...generateThemeStyles2(theme, currentTheme)
18526
+ ...generateThemeStyles(theme, currentTheme)
18597
18527
  }
18598
18528
  },
18599
18529
  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(
@@ -18611,9 +18541,9 @@ var MicButton = ({
18611
18541
  className: "voice-chat-cancel-button",
18612
18542
  onClick: () => setShowLanguageSelector(false),
18613
18543
  style: {
18614
- background: currentTheme === "dark" ? "hsl(248 32% 17.5%)" : "#f6f5ff",
18615
- color: currentTheme === "dark" ? "hsl(252 20% 65%)" : "#6257d9",
18616
- border: `1px solid ${currentTheme === "dark" ? "hsl(248 32% 22%)" : "#c0bbfb"}`
18544
+ background: currentTheme === "dark" ? "hsl(var(--voice-surface))" : "hsl(var(--voice-accent-light))",
18545
+ color: currentTheme === "dark" ? "hsl(var(--voice-text-muted))" : "hsl(var(--voice-accent))",
18546
+ border: "1px solid hsl(var(--voice-border))"
18617
18547
  }
18618
18548
  },
18619
18549
  "Cancel"
@@ -18623,9 +18553,9 @@ var MicButton = ({
18623
18553
  className: "voice-chat-confirm-button",
18624
18554
  onClick: handleLanguageConfirm,
18625
18555
  style: {
18626
- background: currentTheme === "dark" ? "#8177ed" : "#6257d9",
18556
+ background: "hsl(var(--voice-accent))",
18627
18557
  color: "#fff",
18628
- border: `1px solid ${currentTheme === "dark" ? "#8177ed" : "#6257d9"}`
18558
+ border: "1px solid hsl(var(--voice-accent))"
18629
18559
  }
18630
18560
  },
18631
18561
  "Start Voice Chat"
@@ -18650,13 +18580,13 @@ var MicButton = ({
18650
18580
  onMouseEnter: (e2) => {
18651
18581
  if (micState === "idle") {
18652
18582
  e2.currentTarget.style.transform = "scale(1.05)";
18653
- e2.currentTarget.style.boxShadow = "0 20px 25px -5px rgba(129, 119, 237, 0.4)";
18583
+ e2.currentTarget.style.boxShadow = "0 20px 25px -5px hsla(var(--voice-accent) / 0.4)";
18654
18584
  }
18655
18585
  },
18656
18586
  onMouseLeave: (e2) => {
18657
18587
  if (micState === "idle") {
18658
18588
  e2.currentTarget.style.transform = "scale(1)";
18659
- e2.currentTarget.style.boxShadow = "0 10px 15px -3px rgba(129, 119, 237, 0.3)";
18589
+ e2.currentTarget.style.boxShadow = "0 10px 15px -3px hsla(var(--voice-accent) / 0.3)";
18660
18590
  }
18661
18591
  },
18662
18592
  "aria-label": micState === "thinking" ? "Processing..." : micState === "replying" ? "AI is responding..." : isListening ? "Stop listening" : "Start listening"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cuekit-ai/react",
3
- "version": "1.6.8",
3
+ "version": "1.6.9",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "exports": {