@cuekit-ai/react 1.6.7 → 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/{chunk-JVYSFKMO.mjs → chunk-ZP7AXODE.mjs} +673 -993
- package/dist/cuekit.css +38 -29
- package/dist/index.d.mts +37 -10
- package/dist/index.d.ts +37 -10
- package/dist/index.js +746 -958
- package/dist/index.mjs +196 -89
- package/dist/{webrtc-service-KN5SEJKS.mjs → webrtc-service-IMARTHNM.mjs} +1 -1
- package/package.json +6 -4
package/dist/index.mjs
CHANGED
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
setWebRTCCallbacks,
|
|
38
38
|
setWebRTCConfig,
|
|
39
39
|
validateDynamicElements
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-ZP7AXODE.mjs";
|
|
41
41
|
|
|
42
42
|
// node_modules/inline-style-parser/index.js
|
|
43
43
|
var require_inline_style_parser = __commonJS({
|
|
@@ -389,7 +389,7 @@ var require_core = __commonJS({
|
|
|
389
389
|
root4.CryptoJS = factory();
|
|
390
390
|
}
|
|
391
391
|
})(exports, function() {
|
|
392
|
-
var CryptoJS = CryptoJS ||
|
|
392
|
+
var CryptoJS = CryptoJS || function(Math2, undefined2) {
|
|
393
393
|
var crypto;
|
|
394
394
|
if (typeof window !== "undefined" && window.crypto) {
|
|
395
395
|
crypto = window.crypto;
|
|
@@ -429,7 +429,7 @@ var require_core = __commonJS({
|
|
|
429
429
|
}
|
|
430
430
|
throw new Error("Native crypto module could not be used to get secure random number.");
|
|
431
431
|
};
|
|
432
|
-
var create2 = Object.create || /* @__PURE__ */
|
|
432
|
+
var create2 = Object.create || /* @__PURE__ */ function() {
|
|
433
433
|
function F2() {
|
|
434
434
|
}
|
|
435
435
|
return function(obj) {
|
|
@@ -439,10 +439,10 @@ var require_core = __commonJS({
|
|
|
439
439
|
F2.prototype = null;
|
|
440
440
|
return subtype;
|
|
441
441
|
};
|
|
442
|
-
}
|
|
442
|
+
}();
|
|
443
443
|
var C = {};
|
|
444
444
|
var C_lib = C.lib = {};
|
|
445
|
-
var Base = C_lib.Base = /* @__PURE__ */
|
|
445
|
+
var Base = C_lib.Base = /* @__PURE__ */ function() {
|
|
446
446
|
return {
|
|
447
447
|
/**
|
|
448
448
|
* Creates a new object that inherits from this object.
|
|
@@ -541,7 +541,7 @@ var require_core = __commonJS({
|
|
|
541
541
|
return this.init.prototype.extend(this);
|
|
542
542
|
}
|
|
543
543
|
};
|
|
544
|
-
}
|
|
544
|
+
}();
|
|
545
545
|
var WordArray = C_lib.WordArray = Base.extend({
|
|
546
546
|
/**
|
|
547
547
|
* Initializes a newly created word array.
|
|
@@ -979,7 +979,7 @@ var require_core = __commonJS({
|
|
|
979
979
|
});
|
|
980
980
|
var C_algo = C.algo = {};
|
|
981
981
|
return C;
|
|
982
|
-
}
|
|
982
|
+
}(Math);
|
|
983
983
|
return CryptoJS;
|
|
984
984
|
});
|
|
985
985
|
}
|
|
@@ -1183,6 +1183,94 @@ function InitCuekit(config) {
|
|
|
1183
1183
|
setWebRTCConfig(webRTCConfig);
|
|
1184
1184
|
}
|
|
1185
1185
|
|
|
1186
|
+
// src/utils/colors.ts
|
|
1187
|
+
function hexToHSL(hex) {
|
|
1188
|
+
hex = hex.replace(/^#/, "");
|
|
1189
|
+
if (hex.length === 3) {
|
|
1190
|
+
hex = hex.split("").map((char) => char + char).join("");
|
|
1191
|
+
}
|
|
1192
|
+
if (hex.length !== 6) return null;
|
|
1193
|
+
const r2 = parseInt(hex.substring(0, 2), 16) / 255;
|
|
1194
|
+
const g = parseInt(hex.substring(2, 4), 16) / 255;
|
|
1195
|
+
const b2 = parseInt(hex.substring(4, 6), 16) / 255;
|
|
1196
|
+
const max = Math.max(r2, g, b2), min = Math.min(r2, g, b2);
|
|
1197
|
+
let h = 0, s = 0, l = (max + min) / 2;
|
|
1198
|
+
if (max !== min) {
|
|
1199
|
+
const d = max - min;
|
|
1200
|
+
s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
|
|
1201
|
+
switch (max) {
|
|
1202
|
+
case r2:
|
|
1203
|
+
h = (g - b2) / d + (g < b2 ? 6 : 0);
|
|
1204
|
+
break;
|
|
1205
|
+
case g:
|
|
1206
|
+
h = (b2 - r2) / d + 2;
|
|
1207
|
+
break;
|
|
1208
|
+
case b2:
|
|
1209
|
+
h = (r2 - g) / d + 4;
|
|
1210
|
+
break;
|
|
1211
|
+
}
|
|
1212
|
+
h /= 6;
|
|
1213
|
+
}
|
|
1214
|
+
const res = {
|
|
1215
|
+
h: Math.round(h * 360),
|
|
1216
|
+
s: Math.round(s * 100),
|
|
1217
|
+
l: Math.round(l * 100)
|
|
1218
|
+
};
|
|
1219
|
+
return {
|
|
1220
|
+
...res,
|
|
1221
|
+
toString: () => `${res.h} ${res.s}% ${res.l}%`
|
|
1222
|
+
};
|
|
1223
|
+
}
|
|
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
|
+
|
|
1186
1274
|
// src/utils/webrtc-config.ts
|
|
1187
1275
|
var configureWebRTCServer = (config) => {
|
|
1188
1276
|
if (!config.apiKey) {
|
|
@@ -1271,9 +1359,12 @@ var AnsyrProvider = ({
|
|
|
1271
1359
|
title = "ansyr.ai",
|
|
1272
1360
|
showLogo = true,
|
|
1273
1361
|
showAIIcon = true,
|
|
1274
|
-
showUserIcon = true
|
|
1362
|
+
showUserIcon = true,
|
|
1363
|
+
theme,
|
|
1364
|
+
emptyStateMessage
|
|
1275
1365
|
}) => {
|
|
1276
1366
|
const [internalDeviceId, setInternalDeviceId] = useState(deviceId);
|
|
1367
|
+
const themeStyles = generateThemeStyles(theme, "dark");
|
|
1277
1368
|
useEffect(() => {
|
|
1278
1369
|
InitCuekit({ apiKey, appId });
|
|
1279
1370
|
}, [apiKey, appId]);
|
|
@@ -1293,7 +1384,7 @@ var AnsyrProvider = ({
|
|
|
1293
1384
|
};
|
|
1294
1385
|
}, [navigationHandler]);
|
|
1295
1386
|
useEffect(() => {
|
|
1296
|
-
import("./webrtc-service-
|
|
1387
|
+
import("./webrtc-service-IMARTHNM.mjs").then(({ setWebRTCCallbacks: setWebRTCCallbacks2 }) => {
|
|
1297
1388
|
setWebRTCCallbacks2({
|
|
1298
1389
|
onNavigationCommand: (command) => {
|
|
1299
1390
|
const data = command.data ?? command;
|
|
@@ -1380,10 +1471,12 @@ var AnsyrProvider = ({
|
|
|
1380
1471
|
title,
|
|
1381
1472
|
showLogo,
|
|
1382
1473
|
showAIIcon,
|
|
1383
|
-
showUserIcon
|
|
1474
|
+
showUserIcon,
|
|
1475
|
+
theme,
|
|
1476
|
+
emptyStateMessage
|
|
1384
1477
|
}
|
|
1385
1478
|
},
|
|
1386
|
-
children
|
|
1479
|
+
/* @__PURE__ */ React.createElement("div", { style: themeStyles }, children)
|
|
1387
1480
|
);
|
|
1388
1481
|
};
|
|
1389
1482
|
|
|
@@ -9387,7 +9480,7 @@ var convert = (
|
|
|
9387
9480
|
* @param {Test} [test]
|
|
9388
9481
|
* @returns {Check}
|
|
9389
9482
|
*/
|
|
9390
|
-
|
|
9483
|
+
function(test) {
|
|
9391
9484
|
if (test === null || test === void 0) {
|
|
9392
9485
|
return ok2;
|
|
9393
9486
|
}
|
|
@@ -9401,7 +9494,7 @@ var convert = (
|
|
|
9401
9494
|
return typeFactory(test);
|
|
9402
9495
|
}
|
|
9403
9496
|
throw new Error("Expected function, string, or object as test");
|
|
9404
|
-
}
|
|
9497
|
+
}
|
|
9405
9498
|
);
|
|
9406
9499
|
function anyFactory(tests) {
|
|
9407
9500
|
const checks2 = [];
|
|
@@ -10581,7 +10674,7 @@ var CallableInstance = (
|
|
|
10581
10674
|
* @param {string | symbol} property
|
|
10582
10675
|
* @returns {(...parameters: Array<unknown>) => unknown}
|
|
10583
10676
|
*/
|
|
10584
|
-
|
|
10677
|
+
function(property) {
|
|
10585
10678
|
const self2 = this;
|
|
10586
10679
|
const constr = self2.constructor;
|
|
10587
10680
|
const proto = (
|
|
@@ -10596,7 +10689,7 @@ var CallableInstance = (
|
|
|
10596
10689
|
};
|
|
10597
10690
|
Object.setPrototypeOf(apply, proto);
|
|
10598
10691
|
return apply;
|
|
10599
|
-
}
|
|
10692
|
+
}
|
|
10600
10693
|
);
|
|
10601
10694
|
|
|
10602
10695
|
// node_modules/unified/lib/index.js
|
|
@@ -15215,9 +15308,20 @@ var ChatPopup = ({
|
|
|
15215
15308
|
onSizeChange,
|
|
15216
15309
|
persistPosition = true,
|
|
15217
15310
|
persistSize = true,
|
|
15218
|
-
storageKey = "chat-popup"
|
|
15311
|
+
storageKey = "chat-popup",
|
|
15312
|
+
theme: localTheme,
|
|
15313
|
+
emptyStateMessage: localEmptyStateMessage
|
|
15219
15314
|
}) => {
|
|
15220
|
-
const {
|
|
15315
|
+
const {
|
|
15316
|
+
title,
|
|
15317
|
+
showLogo,
|
|
15318
|
+
showAIIcon,
|
|
15319
|
+
showUserIcon,
|
|
15320
|
+
theme: contextTheme,
|
|
15321
|
+
emptyStateMessage: contextEmptyStateMessage
|
|
15322
|
+
} = useAnsyrContext();
|
|
15323
|
+
const theme = localTheme || contextTheme;
|
|
15324
|
+
const emptyStateMessage = localEmptyStateMessage || contextEmptyStateMessage;
|
|
15221
15325
|
const [inputText, setInputText] = useState6("");
|
|
15222
15326
|
const [isSending, setIsSending] = useState6(false);
|
|
15223
15327
|
const messagesEndRef = useRef5(null);
|
|
@@ -15312,7 +15416,8 @@ var ChatPopup = ({
|
|
|
15312
15416
|
animation: "scaleIn 0.3s ease-out",
|
|
15313
15417
|
flexDirection: "column",
|
|
15314
15418
|
fontFamily: "Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif",
|
|
15315
|
-
overflow: "hidden"
|
|
15419
|
+
overflow: "hidden",
|
|
15420
|
+
...generateThemeStyles(theme, currentTheme)
|
|
15316
15421
|
}
|
|
15317
15422
|
},
|
|
15318
15423
|
/* @__PURE__ */ React10.createElement(
|
|
@@ -15366,8 +15471,8 @@ var ChatPopup = ({
|
|
|
15366
15471
|
"div",
|
|
15367
15472
|
{
|
|
15368
15473
|
style: {
|
|
15369
|
-
background: "hsl(var(--voice-
|
|
15370
|
-
color: "hsl(var(--voice-
|
|
15474
|
+
background: "hsl(var(--voice-status-bg))",
|
|
15475
|
+
color: "hsl(var(--voice-status-text))",
|
|
15371
15476
|
minHeight: "16px",
|
|
15372
15477
|
display: "flex",
|
|
15373
15478
|
alignItems: "center",
|
|
@@ -15507,7 +15612,7 @@ var ChatPopup = ({
|
|
|
15507
15612
|
fontSize: "14px"
|
|
15508
15613
|
}
|
|
15509
15614
|
},
|
|
15510
|
-
"Start a conversation with CueKit AI"
|
|
15615
|
+
emptyStateMessage || "Start a conversation with CueKit AI"
|
|
15511
15616
|
) : messages.map((message, index2) => /* @__PURE__ */ React10.createElement(
|
|
15512
15617
|
"div",
|
|
15513
15618
|
{
|
|
@@ -15811,8 +15916,8 @@ var ChatPopup = ({
|
|
|
15811
15916
|
style: {
|
|
15812
15917
|
padding: "10px 12px",
|
|
15813
15918
|
borderRadius: 8,
|
|
15814
|
-
border:
|
|
15815
|
-
background:
|
|
15919
|
+
border: "1px solid hsl(var(--voice-accent))",
|
|
15920
|
+
background: "hsl(var(--voice-accent))",
|
|
15816
15921
|
color: "#fff",
|
|
15817
15922
|
fontSize: 12,
|
|
15818
15923
|
fontWeight: 700,
|
|
@@ -15835,8 +15940,8 @@ var ChatPopup = ({
|
|
|
15835
15940
|
style: {
|
|
15836
15941
|
padding: "10px 12px",
|
|
15837
15942
|
borderRadius: 8,
|
|
15838
|
-
border:
|
|
15839
|
-
background:
|
|
15943
|
+
border: "1px solid hsl(var(--voice-accent))",
|
|
15944
|
+
background: "hsl(var(--voice-accent))",
|
|
15840
15945
|
color: "#fff",
|
|
15841
15946
|
fontSize: 12,
|
|
15842
15947
|
fontWeight: 700,
|
|
@@ -15874,17 +15979,14 @@ var BorderGlow = ({ isActive }) => {
|
|
|
15874
15979
|
right: 0,
|
|
15875
15980
|
bottom: 0,
|
|
15876
15981
|
width: "4px",
|
|
15877
|
-
background: "linear-gradient(to bottom,
|
|
15982
|
+
background: "linear-gradient(to bottom, hsl(var(--voice-accent-light)), hsl(var(--voice-accent)), hsl(var(--voice-accent-light)))",
|
|
15878
15983
|
animation: "borderPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
|
|
15879
15984
|
opacity: 0.8
|
|
15880
15985
|
},
|
|
15881
15986
|
rightBorder2: {
|
|
15882
15987
|
position: "absolute",
|
|
15883
15988
|
top: 0,
|
|
15884
|
-
|
|
15885
|
-
bottom: 0,
|
|
15886
|
-
width: "8px",
|
|
15887
|
-
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)))",
|
|
15888
15990
|
filter: "blur(4px)",
|
|
15889
15991
|
animation: "borderPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
|
|
15890
15992
|
opacity: 0.6
|
|
@@ -15893,9 +15995,7 @@ var BorderGlow = ({ isActive }) => {
|
|
|
15893
15995
|
position: "absolute",
|
|
15894
15996
|
top: 0,
|
|
15895
15997
|
right: 0,
|
|
15896
|
-
|
|
15897
|
-
width: "16px",
|
|
15898
|
-
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)))",
|
|
15899
15999
|
filter: "blur(12px)",
|
|
15900
16000
|
animation: "borderPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
|
|
15901
16001
|
opacity: 0.4
|
|
@@ -15906,7 +16006,7 @@ var BorderGlow = ({ isActive }) => {
|
|
|
15906
16006
|
left: 0,
|
|
15907
16007
|
bottom: 0,
|
|
15908
16008
|
width: "4px",
|
|
15909
|
-
background: "linear-gradient(to bottom,
|
|
16009
|
+
background: "linear-gradient(to bottom, hsl(var(--voice-accent-light)), hsl(var(--voice-accent)), hsl(var(--voice-accent-light)))",
|
|
15910
16010
|
animation: "borderPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
|
|
15911
16011
|
opacity: 0.8
|
|
15912
16012
|
},
|
|
@@ -15915,8 +16015,7 @@ var BorderGlow = ({ isActive }) => {
|
|
|
15915
16015
|
top: 0,
|
|
15916
16016
|
left: 0,
|
|
15917
16017
|
bottom: 0,
|
|
15918
|
-
|
|
15919
|
-
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)))",
|
|
15920
16019
|
filter: "blur(4px)",
|
|
15921
16020
|
animation: "borderPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
|
|
15922
16021
|
opacity: 0.6
|
|
@@ -15926,8 +16025,7 @@ var BorderGlow = ({ isActive }) => {
|
|
|
15926
16025
|
top: 0,
|
|
15927
16026
|
left: 0,
|
|
15928
16027
|
bottom: 0,
|
|
15929
|
-
|
|
15930
|
-
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)))",
|
|
15931
16029
|
filter: "blur(12px)",
|
|
15932
16030
|
animation: "borderPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
|
|
15933
16031
|
opacity: 0.4
|
|
@@ -15938,7 +16036,7 @@ var BorderGlow = ({ isActive }) => {
|
|
|
15938
16036
|
left: 0,
|
|
15939
16037
|
width: "32px",
|
|
15940
16038
|
height: "32px",
|
|
15941
|
-
background: "
|
|
16039
|
+
background: "hsl(var(--voice-accent))",
|
|
15942
16040
|
borderBottomRightRadius: "50%",
|
|
15943
16041
|
filter: "blur(16px)",
|
|
15944
16042
|
animation: "borderPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
|
|
@@ -15950,7 +16048,7 @@ var BorderGlow = ({ isActive }) => {
|
|
|
15950
16048
|
right: 0,
|
|
15951
16049
|
width: "32px",
|
|
15952
16050
|
height: "32px",
|
|
15953
|
-
background: "
|
|
16051
|
+
background: "hsl(var(--voice-accent))",
|
|
15954
16052
|
borderBottomLeftRadius: "50%",
|
|
15955
16053
|
filter: "blur(16px)",
|
|
15956
16054
|
animation: "borderPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
|
|
@@ -15962,7 +16060,7 @@ var BorderGlow = ({ isActive }) => {
|
|
|
15962
16060
|
right: 0,
|
|
15963
16061
|
width: "32px",
|
|
15964
16062
|
height: "32px",
|
|
15965
|
-
background: "
|
|
16063
|
+
background: "hsl(var(--voice-accent))",
|
|
15966
16064
|
borderTopLeftRadius: "50%",
|
|
15967
16065
|
filter: "blur(16px)",
|
|
15968
16066
|
animation: "borderPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
|
|
@@ -15974,7 +16072,7 @@ var BorderGlow = ({ isActive }) => {
|
|
|
15974
16072
|
left: 0,
|
|
15975
16073
|
width: "32px",
|
|
15976
16074
|
height: "32px",
|
|
15977
|
-
background: "
|
|
16075
|
+
background: "hsl(var(--voice-accent))",
|
|
15978
16076
|
borderTopRightRadius: "50%",
|
|
15979
16077
|
filter: "blur(16px)",
|
|
15980
16078
|
animation: "borderPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
|
|
@@ -16010,7 +16108,7 @@ var Me = { exports: {} };
|
|
|
16010
16108
|
var Or = Me.exports;
|
|
16011
16109
|
var kt;
|
|
16012
16110
|
function kr() {
|
|
16013
|
-
return kt || (kt = 1,
|
|
16111
|
+
return kt || (kt = 1, function(e2) {
|
|
16014
16112
|
(function(t, n) {
|
|
16015
16113
|
e2.exports ? e2.exports = n() : t.log = n();
|
|
16016
16114
|
})(Or, function() {
|
|
@@ -16154,7 +16252,7 @@ function kr() {
|
|
|
16154
16252
|
return o;
|
|
16155
16253
|
}, s.default = s, s;
|
|
16156
16254
|
});
|
|
16157
|
-
}
|
|
16255
|
+
}(Me)), Me.exports;
|
|
16158
16256
|
}
|
|
16159
16257
|
var _r = kr();
|
|
16160
16258
|
var Lr = /* @__PURE__ */ Ar(_r);
|
|
@@ -16377,7 +16475,7 @@ function Ue(e2, t) {
|
|
|
16377
16475
|
0 <= n && e2.splice(n, 1);
|
|
16378
16476
|
}
|
|
16379
16477
|
}
|
|
16380
|
-
var Oe =
|
|
16478
|
+
var Oe = function() {
|
|
16381
16479
|
function e2(t) {
|
|
16382
16480
|
this.initialTeardown = t, this.closed = false, this._parentage = null, this._finalizers = null;
|
|
16383
16481
|
}
|
|
@@ -16461,11 +16559,11 @@ var Oe = (function() {
|
|
|
16461
16559
|
}, e2.prototype.remove = function(t) {
|
|
16462
16560
|
var n = this._finalizers;
|
|
16463
16561
|
n && Ue(n, t), t instanceof e2 && t._removeParent(this);
|
|
16464
|
-
}, e2.EMPTY =
|
|
16562
|
+
}, e2.EMPTY = function() {
|
|
16465
16563
|
var t = new e2();
|
|
16466
16564
|
return t.closed = true, t;
|
|
16467
|
-
}
|
|
16468
|
-
}
|
|
16565
|
+
}(), e2;
|
|
16566
|
+
}();
|
|
16469
16567
|
var an = Oe.EMPTY;
|
|
16470
16568
|
function cn(e2) {
|
|
16471
16569
|
return e2 instanceof Oe || e2 && "closed" in e2 && P(e2.remove) && P(e2.add) && P(e2.unsubscribe);
|
|
@@ -16497,7 +16595,7 @@ function je() {
|
|
|
16497
16595
|
function Re(e2) {
|
|
16498
16596
|
e2();
|
|
16499
16597
|
}
|
|
16500
|
-
var gt =
|
|
16598
|
+
var gt = function(e2) {
|
|
16501
16599
|
te(t, e2);
|
|
16502
16600
|
function t(n) {
|
|
16503
16601
|
var r2 = e2.call(this) || this;
|
|
@@ -16528,8 +16626,8 @@ var gt = (function(e2) {
|
|
|
16528
16626
|
this.unsubscribe();
|
|
16529
16627
|
}
|
|
16530
16628
|
}, t;
|
|
16531
|
-
}
|
|
16532
|
-
var Nr =
|
|
16629
|
+
}(Oe);
|
|
16630
|
+
var Nr = function() {
|
|
16533
16631
|
function e2(t) {
|
|
16534
16632
|
this.partialObserver = t;
|
|
16535
16633
|
}
|
|
@@ -16560,8 +16658,8 @@ var Nr = (function() {
|
|
|
16560
16658
|
Le(n);
|
|
16561
16659
|
}
|
|
16562
16660
|
}, e2;
|
|
16563
|
-
}
|
|
16564
|
-
var Ce =
|
|
16661
|
+
}();
|
|
16662
|
+
var Ce = function(e2) {
|
|
16565
16663
|
te(t, e2);
|
|
16566
16664
|
function t(n, r2, i2) {
|
|
16567
16665
|
var o = e2.call(this) || this, s;
|
|
@@ -16572,7 +16670,7 @@ var Ce = (function(e2) {
|
|
|
16572
16670
|
} : s = n, o.destination = new Nr(s), o;
|
|
16573
16671
|
}
|
|
16574
16672
|
return t;
|
|
16575
|
-
}
|
|
16673
|
+
}(gt);
|
|
16576
16674
|
function Le(e2) {
|
|
16577
16675
|
un(e2);
|
|
16578
16676
|
}
|
|
@@ -16585,9 +16683,9 @@ var Ur = {
|
|
|
16585
16683
|
error: Fr,
|
|
16586
16684
|
complete: je
|
|
16587
16685
|
};
|
|
16588
|
-
var bt =
|
|
16686
|
+
var bt = function() {
|
|
16589
16687
|
return typeof Symbol == "function" && Symbol.observable || "@@observable";
|
|
16590
|
-
}
|
|
16688
|
+
}();
|
|
16591
16689
|
function Ge(e2) {
|
|
16592
16690
|
return e2;
|
|
16593
16691
|
}
|
|
@@ -16598,7 +16696,7 @@ function jr(e2) {
|
|
|
16598
16696
|
}, n);
|
|
16599
16697
|
};
|
|
16600
16698
|
}
|
|
16601
|
-
var k =
|
|
16699
|
+
var k = function() {
|
|
16602
16700
|
function e2(t) {
|
|
16603
16701
|
t && (this._subscribe = t);
|
|
16604
16702
|
}
|
|
@@ -16657,7 +16755,7 @@ var k = (function() {
|
|
|
16657
16755
|
}, e2.create = function(t) {
|
|
16658
16756
|
return new e2(t);
|
|
16659
16757
|
}, e2;
|
|
16660
|
-
}
|
|
16758
|
+
}();
|
|
16661
16759
|
function Lt(e2) {
|
|
16662
16760
|
var t;
|
|
16663
16761
|
return (t = e2 ?? Dr.Promise) !== null && t !== void 0 ? t : Promise;
|
|
@@ -16687,7 +16785,7 @@ function j(e2) {
|
|
|
16687
16785
|
function F(e2, t, n, r2, i2) {
|
|
16688
16786
|
return new Hr(e2, t, n, r2, i2);
|
|
16689
16787
|
}
|
|
16690
|
-
var Hr =
|
|
16788
|
+
var Hr = function(e2) {
|
|
16691
16789
|
te(t, e2);
|
|
16692
16790
|
function t(n, r2, i2, o, s, a) {
|
|
16693
16791
|
var c = e2.call(this, n) || this;
|
|
@@ -16722,13 +16820,13 @@ var Hr = (function(e2) {
|
|
|
16722
16820
|
e2.prototype.unsubscribe.call(this), !r2 && ((n = this.onFinalize) === null || n === void 0 || n.call(this));
|
|
16723
16821
|
}
|
|
16724
16822
|
}, t;
|
|
16725
|
-
}
|
|
16823
|
+
}(gt);
|
|
16726
16824
|
var zr = mt(function(e2) {
|
|
16727
16825
|
return function() {
|
|
16728
16826
|
e2(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
|
|
16729
16827
|
};
|
|
16730
16828
|
});
|
|
16731
|
-
var ee =
|
|
16829
|
+
var ee = function(e2) {
|
|
16732
16830
|
te(t, e2);
|
|
16733
16831
|
function t() {
|
|
16734
16832
|
var n = e2.call(this) || this;
|
|
@@ -16807,8 +16905,8 @@ var ee = (function(e2) {
|
|
|
16807
16905
|
}, t.create = function(n, r2) {
|
|
16808
16906
|
return new It(n, r2);
|
|
16809
16907
|
}, t;
|
|
16810
|
-
}
|
|
16811
|
-
var It =
|
|
16908
|
+
}(k);
|
|
16909
|
+
var It = function(e2) {
|
|
16812
16910
|
te(t, e2);
|
|
16813
16911
|
function t(n, r2) {
|
|
16814
16912
|
var i2 = e2.call(this) || this;
|
|
@@ -16827,8 +16925,8 @@ var It = (function(e2) {
|
|
|
16827
16925
|
var r2, i2;
|
|
16828
16926
|
return (i2 = (r2 = this.source) === null || r2 === void 0 ? void 0 : r2.subscribe(n)) !== null && i2 !== void 0 ? i2 : an;
|
|
16829
16927
|
}, t;
|
|
16830
|
-
}
|
|
16831
|
-
var ln =
|
|
16928
|
+
}(ee);
|
|
16929
|
+
var ln = function(e2) {
|
|
16832
16930
|
te(t, e2);
|
|
16833
16931
|
function t(n) {
|
|
16834
16932
|
var r2 = e2.call(this) || this;
|
|
@@ -16851,13 +16949,13 @@ var ln = (function(e2) {
|
|
|
16851
16949
|
}, t.prototype.next = function(n) {
|
|
16852
16950
|
e2.prototype.next.call(this, this._value = n);
|
|
16853
16951
|
}, t;
|
|
16854
|
-
}
|
|
16952
|
+
}(ee);
|
|
16855
16953
|
var Yr = {
|
|
16856
16954
|
now: function() {
|
|
16857
16955
|
return Date.now();
|
|
16858
16956
|
}
|
|
16859
16957
|
};
|
|
16860
|
-
var qr =
|
|
16958
|
+
var qr = function(e2) {
|
|
16861
16959
|
te(t, e2);
|
|
16862
16960
|
function t(n, r2) {
|
|
16863
16961
|
return e2.call(this) || this;
|
|
@@ -16865,7 +16963,7 @@ var qr = (function(e2) {
|
|
|
16865
16963
|
return t.prototype.schedule = function(n, r2) {
|
|
16866
16964
|
return this;
|
|
16867
16965
|
}, t;
|
|
16868
|
-
}
|
|
16966
|
+
}(Oe);
|
|
16869
16967
|
var Mt = {
|
|
16870
16968
|
setInterval: function(e2, t) {
|
|
16871
16969
|
for (var n = [], r2 = 2; r2 < arguments.length; r2++)
|
|
@@ -16877,7 +16975,7 @@ var Mt = {
|
|
|
16877
16975
|
},
|
|
16878
16976
|
delegate: void 0
|
|
16879
16977
|
};
|
|
16880
|
-
var Kr =
|
|
16978
|
+
var Kr = function(e2) {
|
|
16881
16979
|
te(t, e2);
|
|
16882
16980
|
function t(n, r2) {
|
|
16883
16981
|
var i2 = e2.call(this, n, r2) || this;
|
|
@@ -16919,16 +17017,16 @@ var Kr = (function(e2) {
|
|
|
16919
17017
|
this.work = this.state = this.scheduler = null, this.pending = false, Ue(o, this), r2 != null && (this.id = this.recycleAsyncId(i2, r2, null)), this.delay = null, e2.prototype.unsubscribe.call(this);
|
|
16920
17018
|
}
|
|
16921
17019
|
}, t;
|
|
16922
|
-
}
|
|
16923
|
-
var Rt =
|
|
17020
|
+
}(qr);
|
|
17021
|
+
var Rt = function() {
|
|
16924
17022
|
function e2(t, n) {
|
|
16925
17023
|
n === void 0 && (n = e2.now), this.schedulerActionCtor = t, this.now = n;
|
|
16926
17024
|
}
|
|
16927
17025
|
return e2.prototype.schedule = function(t, n, r2) {
|
|
16928
17026
|
return n === void 0 && (n = 0), new this.schedulerActionCtor(this, t).schedule(r2, n);
|
|
16929
17027
|
}, e2.now = Yr.now, e2;
|
|
16930
|
-
}
|
|
16931
|
-
var Gr =
|
|
17028
|
+
}();
|
|
17029
|
+
var Gr = function(e2) {
|
|
16932
17030
|
te(t, e2);
|
|
16933
17031
|
function t(n, r2) {
|
|
16934
17032
|
r2 === void 0 && (r2 = Rt.now);
|
|
@@ -16953,7 +17051,7 @@ var Gr = (function(e2) {
|
|
|
16953
17051
|
throw i2;
|
|
16954
17052
|
}
|
|
16955
17053
|
}, t;
|
|
16956
|
-
}
|
|
17054
|
+
}(Rt);
|
|
16957
17055
|
var Qr = new Gr(Kr);
|
|
16958
17056
|
function Jr(e2) {
|
|
16959
17057
|
return e2 && P(e2.schedule);
|
|
@@ -18074,7 +18172,7 @@ var MicButton = ({
|
|
|
18074
18172
|
onLanguageChange,
|
|
18075
18173
|
showLanguageDropdown = true
|
|
18076
18174
|
}) => {
|
|
18077
|
-
const { apiKey, appId } = useAnsyrContext();
|
|
18175
|
+
const { apiKey, appId, theme, emptyStateMessage } = useAnsyrContext();
|
|
18078
18176
|
const [showBodyGlow, setShowBodyGlow] = useState12(false);
|
|
18079
18177
|
const [currentTheme, setCurrentTheme] = useState12("dark");
|
|
18080
18178
|
const [showLanguageSelector, setShowLanguageSelector] = useState12(false);
|
|
@@ -18363,7 +18461,10 @@ var MicButton = ({
|
|
|
18363
18461
|
};
|
|
18364
18462
|
}
|
|
18365
18463
|
};
|
|
18366
|
-
const
|
|
18464
|
+
const generateMicButtonGradient = () => {
|
|
18465
|
+
return "radial-gradient(circle at 50% 0%, hsl(var(--voice-accent-vibrant)), hsl(var(--voice-accent-dark)))";
|
|
18466
|
+
};
|
|
18467
|
+
const micButtonGradient = generateMicButtonGradient();
|
|
18367
18468
|
const buttonStyles = {
|
|
18368
18469
|
container: {
|
|
18369
18470
|
position: "relative",
|
|
@@ -18398,18 +18499,18 @@ var MicButton = ({
|
|
|
18398
18499
|
switch (micState) {
|
|
18399
18500
|
case "listening":
|
|
18400
18501
|
baseStyle.transform = "scale(1.05)";
|
|
18401
|
-
baseStyle.boxShadow = "0 25px 50px -12px
|
|
18502
|
+
baseStyle.boxShadow = "0 25px 50px -12px hsla(var(--voice-accent) / 0.6)";
|
|
18402
18503
|
break;
|
|
18403
18504
|
case "thinking":
|
|
18404
18505
|
baseStyle.transform = "scale(1.02)";
|
|
18405
|
-
baseStyle.boxShadow = "0 20px 25px -5px
|
|
18506
|
+
baseStyle.boxShadow = "0 20px 25px -5px hsla(var(--voice-accent) / 0.4)";
|
|
18406
18507
|
break;
|
|
18407
18508
|
case "replying":
|
|
18408
18509
|
baseStyle.transform = "scale(1.02)";
|
|
18409
|
-
baseStyle.boxShadow = "0 20px 25px -5px
|
|
18510
|
+
baseStyle.boxShadow = "0 20px 25px -5px hsla(var(--voice-accent) / 0.4)";
|
|
18410
18511
|
break;
|
|
18411
18512
|
default:
|
|
18412
|
-
baseStyle.boxShadow = "0 10px 15px -3px
|
|
18513
|
+
baseStyle.boxShadow = "0 10px 15px -3px hsla(var(--voice-accent) / 0.3)";
|
|
18413
18514
|
break;
|
|
18414
18515
|
}
|
|
18415
18516
|
return baseStyle;
|
|
@@ -18419,7 +18520,11 @@ var MicButton = ({
|
|
|
18419
18520
|
{
|
|
18420
18521
|
"data-cuekit-ignore": true,
|
|
18421
18522
|
className: `cuekit-voice-popup ${currentTheme === "dark" ? "cuekit-dark" : ""}`,
|
|
18422
|
-
style: {
|
|
18523
|
+
style: {
|
|
18524
|
+
...buttonStyles.container,
|
|
18525
|
+
...getPositionStyle(),
|
|
18526
|
+
...generateThemeStyles(theme, currentTheme)
|
|
18527
|
+
}
|
|
18423
18528
|
},
|
|
18424
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(
|
|
18425
18530
|
LanguageSelector,
|
|
@@ -18436,9 +18541,9 @@ var MicButton = ({
|
|
|
18436
18541
|
className: "voice-chat-cancel-button",
|
|
18437
18542
|
onClick: () => setShowLanguageSelector(false),
|
|
18438
18543
|
style: {
|
|
18439
|
-
background: currentTheme === "dark" ? "hsl(
|
|
18440
|
-
color: currentTheme === "dark" ? "hsl(
|
|
18441
|
-
border:
|
|
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))"
|
|
18442
18547
|
}
|
|
18443
18548
|
},
|
|
18444
18549
|
"Cancel"
|
|
@@ -18448,9 +18553,9 @@ var MicButton = ({
|
|
|
18448
18553
|
className: "voice-chat-confirm-button",
|
|
18449
18554
|
onClick: handleLanguageConfirm,
|
|
18450
18555
|
style: {
|
|
18451
|
-
background:
|
|
18556
|
+
background: "hsl(var(--voice-accent))",
|
|
18452
18557
|
color: "#fff",
|
|
18453
|
-
border:
|
|
18558
|
+
border: "1px solid hsl(var(--voice-accent))"
|
|
18454
18559
|
}
|
|
18455
18560
|
},
|
|
18456
18561
|
"Start Voice Chat"
|
|
@@ -18475,13 +18580,13 @@ var MicButton = ({
|
|
|
18475
18580
|
onMouseEnter: (e2) => {
|
|
18476
18581
|
if (micState === "idle") {
|
|
18477
18582
|
e2.currentTarget.style.transform = "scale(1.05)";
|
|
18478
|
-
e2.currentTarget.style.boxShadow = "0 20px 25px -5px
|
|
18583
|
+
e2.currentTarget.style.boxShadow = "0 20px 25px -5px hsla(var(--voice-accent) / 0.4)";
|
|
18479
18584
|
}
|
|
18480
18585
|
},
|
|
18481
18586
|
onMouseLeave: (e2) => {
|
|
18482
18587
|
if (micState === "idle") {
|
|
18483
18588
|
e2.currentTarget.style.transform = "scale(1)";
|
|
18484
|
-
e2.currentTarget.style.boxShadow = "0 10px 15px -3px
|
|
18589
|
+
e2.currentTarget.style.boxShadow = "0 10px 15px -3px hsla(var(--voice-accent) / 0.3)";
|
|
18485
18590
|
}
|
|
18486
18591
|
},
|
|
18487
18592
|
"aria-label": micState === "thinking" ? "Processing..." : micState === "replying" ? "AI is responding..." : isListening ? "Stop listening" : "Start listening"
|
|
@@ -18540,7 +18645,9 @@ var MicButton = ({
|
|
|
18540
18645
|
resizable: true,
|
|
18541
18646
|
persistPosition: true,
|
|
18542
18647
|
persistSize: true,
|
|
18543
|
-
storageKey: "cuekit-chat-popup"
|
|
18648
|
+
storageKey: "cuekit-chat-popup",
|
|
18649
|
+
theme,
|
|
18650
|
+
emptyStateMessage
|
|
18544
18651
|
}
|
|
18545
18652
|
), isChatOpen && isChatMinimized && /* @__PURE__ */ React15.createElement(
|
|
18546
18653
|
"button",
|