@cuekit-ai/react 1.2.1 → 1.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -0
- package/dist/cuekit.css +89 -536
- package/dist/index.js +260 -104
- package/dist/index.mjs +224 -70
- package/package.json +2 -9
package/dist/index.mjs
CHANGED
|
@@ -793,8 +793,7 @@ var CuekitProvider = ({
|
|
|
793
793
|
};
|
|
794
794
|
|
|
795
795
|
// src/components/mic-button.tsx
|
|
796
|
-
import
|
|
797
|
-
import { Mic, Loader2 } from "lucide-react";
|
|
796
|
+
import React11, { useState as useState10, useEffect as useEffect10, useCallback as useCallback5, useRef as useRef7 } from "react";
|
|
798
797
|
|
|
799
798
|
// src/hooks/use-cuekit.ts
|
|
800
799
|
import { useState as useState3, useCallback as useCallback2, useEffect as useEffect3, useRef as useRef2 } from "react";
|
|
@@ -1535,8 +1534,7 @@ var useCuekit = (options) => {
|
|
|
1535
1534
|
};
|
|
1536
1535
|
|
|
1537
1536
|
// src/components/chat-popup.tsx
|
|
1538
|
-
import
|
|
1539
|
-
import { X, Sun, Moon, PhoneOff } from "lucide-react";
|
|
1537
|
+
import React6, { useState as useState5, useEffect as useEffect5, useRef as useRef3 } from "react";
|
|
1540
1538
|
|
|
1541
1539
|
// node_modules/devlop/lib/default.js
|
|
1542
1540
|
function ok() {
|
|
@@ -14177,6 +14175,109 @@ function remarkGfm(options) {
|
|
|
14177
14175
|
toMarkdownExtensions.push(gfmToMarkdown(settings));
|
|
14178
14176
|
}
|
|
14179
14177
|
|
|
14178
|
+
// src/components/svgs/sun.tsx
|
|
14179
|
+
import React2 from "react";
|
|
14180
|
+
var SunIcon = ({ width = 24, height = 24, className, ...props }) => {
|
|
14181
|
+
return /* @__PURE__ */ React2.createElement(
|
|
14182
|
+
"svg",
|
|
14183
|
+
{
|
|
14184
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
14185
|
+
width: "24",
|
|
14186
|
+
height: "24",
|
|
14187
|
+
viewBox: "0 0 24 24",
|
|
14188
|
+
fill: "none",
|
|
14189
|
+
stroke: "currentColor",
|
|
14190
|
+
"stroke-width": "2",
|
|
14191
|
+
"stroke-linecap": "round",
|
|
14192
|
+
"stroke-linejoin": "round",
|
|
14193
|
+
className,
|
|
14194
|
+
...props
|
|
14195
|
+
},
|
|
14196
|
+
/* @__PURE__ */ React2.createElement("circle", { cx: "12", cy: "12", r: "4" }),
|
|
14197
|
+
/* @__PURE__ */ React2.createElement("path", { d: "M12 2v2" }),
|
|
14198
|
+
/* @__PURE__ */ React2.createElement("path", { d: "M12 20v2" }),
|
|
14199
|
+
/* @__PURE__ */ React2.createElement("path", { d: "m4.93 4.93 1.41 1.41" }),
|
|
14200
|
+
/* @__PURE__ */ React2.createElement("path", { d: "m17.66 17.66 1.41 1.41" }),
|
|
14201
|
+
/* @__PURE__ */ React2.createElement("path", { d: "M2 12h2" }),
|
|
14202
|
+
/* @__PURE__ */ React2.createElement("path", { d: "M20 12h2" }),
|
|
14203
|
+
/* @__PURE__ */ React2.createElement("path", { d: "m6.34 17.66-1.41 1.41" }),
|
|
14204
|
+
/* @__PURE__ */ React2.createElement("path", { d: "m19.07 4.93-1.41 1.41" })
|
|
14205
|
+
);
|
|
14206
|
+
};
|
|
14207
|
+
var sun_default = SunIcon;
|
|
14208
|
+
|
|
14209
|
+
// src/components/svgs/moon.tsx
|
|
14210
|
+
import React3 from "react";
|
|
14211
|
+
var MoonIcon = ({ width = 24, height = 24, className, ...props }) => {
|
|
14212
|
+
return /* @__PURE__ */ React3.createElement(
|
|
14213
|
+
"svg",
|
|
14214
|
+
{
|
|
14215
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
14216
|
+
width: "24",
|
|
14217
|
+
height: "24",
|
|
14218
|
+
viewBox: "0 0 24 24",
|
|
14219
|
+
fill: "none",
|
|
14220
|
+
stroke: "currentColor",
|
|
14221
|
+
"stroke-width": "2",
|
|
14222
|
+
"stroke-linecap": "round",
|
|
14223
|
+
"stroke-linejoin": "round",
|
|
14224
|
+
className,
|
|
14225
|
+
...props
|
|
14226
|
+
},
|
|
14227
|
+
/* @__PURE__ */ React3.createElement("path", { d: "M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401" })
|
|
14228
|
+
);
|
|
14229
|
+
};
|
|
14230
|
+
var moon_default = MoonIcon;
|
|
14231
|
+
|
|
14232
|
+
// src/components/svgs/close.tsx
|
|
14233
|
+
import React4 from "react";
|
|
14234
|
+
var CloseIcon = ({ width = 24, height = 24, className, ...props }) => {
|
|
14235
|
+
return /* @__PURE__ */ React4.createElement(
|
|
14236
|
+
"svg",
|
|
14237
|
+
{
|
|
14238
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
14239
|
+
width: "24",
|
|
14240
|
+
height: "24",
|
|
14241
|
+
viewBox: "0 0 24 24",
|
|
14242
|
+
fill: "none",
|
|
14243
|
+
stroke: "currentColor",
|
|
14244
|
+
"stroke-width": "2",
|
|
14245
|
+
"stroke-linecap": "round",
|
|
14246
|
+
"stroke-linejoin": "round",
|
|
14247
|
+
className,
|
|
14248
|
+
...props
|
|
14249
|
+
},
|
|
14250
|
+
/* @__PURE__ */ React4.createElement("path", { d: "M18 6 6 18" }),
|
|
14251
|
+
/* @__PURE__ */ React4.createElement("path", { d: "m6 6 12 12" })
|
|
14252
|
+
);
|
|
14253
|
+
};
|
|
14254
|
+
var close_default = CloseIcon;
|
|
14255
|
+
|
|
14256
|
+
// src/components/svgs/phone-off.tsx
|
|
14257
|
+
import React5 from "react";
|
|
14258
|
+
var PhoneOffIcon = ({ width = 24, height = 24, className, ...props }) => {
|
|
14259
|
+
return /* @__PURE__ */ React5.createElement(
|
|
14260
|
+
"svg",
|
|
14261
|
+
{
|
|
14262
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
14263
|
+
width: "24",
|
|
14264
|
+
height: "24",
|
|
14265
|
+
viewBox: "0 0 24 24",
|
|
14266
|
+
fill: "none",
|
|
14267
|
+
stroke: "currentColor",
|
|
14268
|
+
"stroke-width": "2",
|
|
14269
|
+
"stroke-linecap": "round",
|
|
14270
|
+
"stroke-linejoin": "round",
|
|
14271
|
+
className,
|
|
14272
|
+
...props
|
|
14273
|
+
},
|
|
14274
|
+
/* @__PURE__ */ React5.createElement("path", { d: "M10.1 13.9a14 14 0 0 0 3.732 2.668 1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2 18 18 0 0 1-12.728-5.272" }),
|
|
14275
|
+
/* @__PURE__ */ React5.createElement("path", { d: "M22 2 2 22" }),
|
|
14276
|
+
/* @__PURE__ */ React5.createElement("path", { d: "M4.76 13.582A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 .244.473" })
|
|
14277
|
+
);
|
|
14278
|
+
};
|
|
14279
|
+
var phone_off_default = PhoneOffIcon;
|
|
14280
|
+
|
|
14180
14281
|
// src/components/chat-popup.tsx
|
|
14181
14282
|
var ChatPopup = ({
|
|
14182
14283
|
isOpen,
|
|
@@ -14263,7 +14364,7 @@ var ChatPopup = ({
|
|
|
14263
14364
|
}
|
|
14264
14365
|
};
|
|
14265
14366
|
const positionStyle = getPositionStyle();
|
|
14266
|
-
return /* @__PURE__ */
|
|
14367
|
+
return /* @__PURE__ */ React6.createElement(
|
|
14267
14368
|
"div",
|
|
14268
14369
|
{
|
|
14269
14370
|
"data-cuekit-ignore": true,
|
|
@@ -14286,7 +14387,7 @@ var ChatPopup = ({
|
|
|
14286
14387
|
...positionStyle
|
|
14287
14388
|
}
|
|
14288
14389
|
},
|
|
14289
|
-
/* @__PURE__ */
|
|
14390
|
+
/* @__PURE__ */ React6.createElement(
|
|
14290
14391
|
"div",
|
|
14291
14392
|
{
|
|
14292
14393
|
style: {
|
|
@@ -14297,14 +14398,14 @@ var ChatPopup = ({
|
|
|
14297
14398
|
justifyContent: "space-between"
|
|
14298
14399
|
}
|
|
14299
14400
|
},
|
|
14300
|
-
/* @__PURE__ */
|
|
14401
|
+
/* @__PURE__ */ React6.createElement("div", { style: { display: "flex", alignItems: "center", gap: 0 } }, /* @__PURE__ */ React6.createElement(
|
|
14301
14402
|
"img",
|
|
14302
14403
|
{
|
|
14303
14404
|
src: "https://dashboard.cuekit.ai/_next/image?url=%2Fimages%2Fcuekit-logo-2.png&w=256&q=100",
|
|
14304
14405
|
alt: "Cuekit AI",
|
|
14305
14406
|
style: { width: 58, objectFit: "cover" }
|
|
14306
14407
|
}
|
|
14307
|
-
), /* @__PURE__ */
|
|
14408
|
+
), /* @__PURE__ */ React6.createElement(
|
|
14308
14409
|
"div",
|
|
14309
14410
|
{
|
|
14310
14411
|
style: {
|
|
@@ -14315,7 +14416,7 @@ var ChatPopup = ({
|
|
|
14315
14416
|
justifyContent: "center"
|
|
14316
14417
|
}
|
|
14317
14418
|
},
|
|
14318
|
-
/* @__PURE__ */
|
|
14419
|
+
/* @__PURE__ */ React6.createElement(
|
|
14319
14420
|
"span",
|
|
14320
14421
|
{
|
|
14321
14422
|
style: {
|
|
@@ -14332,7 +14433,7 @@ var ChatPopup = ({
|
|
|
14332
14433
|
},
|
|
14333
14434
|
"Cuekit.ai"
|
|
14334
14435
|
),
|
|
14335
|
-
/* @__PURE__ */
|
|
14436
|
+
/* @__PURE__ */ React6.createElement("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", gap: 4 } }, /* @__PURE__ */ React6.createElement(
|
|
14336
14437
|
"div",
|
|
14337
14438
|
{
|
|
14338
14439
|
style: {
|
|
@@ -14348,7 +14449,7 @@ var ChatPopup = ({
|
|
|
14348
14449
|
fontWeight: "500"
|
|
14349
14450
|
}
|
|
14350
14451
|
},
|
|
14351
|
-
/* @__PURE__ */
|
|
14452
|
+
/* @__PURE__ */ React6.createElement(
|
|
14352
14453
|
"span",
|
|
14353
14454
|
{
|
|
14354
14455
|
style: {
|
|
@@ -14359,8 +14460,8 @@ var ChatPopup = ({
|
|
|
14359
14460
|
)
|
|
14360
14461
|
))
|
|
14361
14462
|
)),
|
|
14362
|
-
/* @__PURE__ */
|
|
14363
|
-
/* @__PURE__ */
|
|
14463
|
+
/* @__PURE__ */ React6.createElement("div", { style: { minWidth: 100, textAlign: "center" } }),
|
|
14464
|
+
/* @__PURE__ */ React6.createElement(
|
|
14364
14465
|
"div",
|
|
14365
14466
|
{
|
|
14366
14467
|
style: {
|
|
@@ -14372,7 +14473,7 @@ var ChatPopup = ({
|
|
|
14372
14473
|
top: 16
|
|
14373
14474
|
}
|
|
14374
14475
|
},
|
|
14375
|
-
onThemeToggle && /* @__PURE__ */
|
|
14476
|
+
onThemeToggle && /* @__PURE__ */ React6.createElement(
|
|
14376
14477
|
"button",
|
|
14377
14478
|
{
|
|
14378
14479
|
onClick: () => {
|
|
@@ -14402,8 +14503,8 @@ var ChatPopup = ({
|
|
|
14402
14503
|
"aria-label": "Toggle theme",
|
|
14403
14504
|
title: `Switch to ${currentTheme === "dark" ? "light" : "dark"} mode`
|
|
14404
14505
|
},
|
|
14405
|
-
currentTheme === "dark" ? /* @__PURE__ */
|
|
14406
|
-
|
|
14506
|
+
currentTheme === "dark" ? /* @__PURE__ */ React6.createElement(
|
|
14507
|
+
sun_default,
|
|
14407
14508
|
{
|
|
14408
14509
|
style: {
|
|
14409
14510
|
width: 16,
|
|
@@ -14412,8 +14513,8 @@ var ChatPopup = ({
|
|
|
14412
14513
|
animation: "themeToggleEnter 0.3s ease-in-out"
|
|
14413
14514
|
}
|
|
14414
14515
|
}
|
|
14415
|
-
) : /* @__PURE__ */
|
|
14416
|
-
|
|
14516
|
+
) : /* @__PURE__ */ React6.createElement(
|
|
14517
|
+
moon_default,
|
|
14417
14518
|
{
|
|
14418
14519
|
style: {
|
|
14419
14520
|
width: 16,
|
|
@@ -14424,7 +14525,7 @@ var ChatPopup = ({
|
|
|
14424
14525
|
}
|
|
14425
14526
|
)
|
|
14426
14527
|
),
|
|
14427
|
-
/* @__PURE__ */
|
|
14528
|
+
/* @__PURE__ */ React6.createElement(
|
|
14428
14529
|
"button",
|
|
14429
14530
|
{
|
|
14430
14531
|
onClick: onMinimize,
|
|
@@ -14451,11 +14552,11 @@ var ChatPopup = ({
|
|
|
14451
14552
|
"aria-label": "Minimize",
|
|
14452
14553
|
title: "Minimize chat"
|
|
14453
14554
|
},
|
|
14454
|
-
/* @__PURE__ */
|
|
14555
|
+
/* @__PURE__ */ React6.createElement(close_default, { style: { width: 16, height: 16, color: "hsl(var(--voice-text-muted))" } })
|
|
14455
14556
|
)
|
|
14456
14557
|
)
|
|
14457
14558
|
),
|
|
14458
|
-
/* @__PURE__ */
|
|
14559
|
+
/* @__PURE__ */ React6.createElement(
|
|
14459
14560
|
"div",
|
|
14460
14561
|
{
|
|
14461
14562
|
style: {
|
|
@@ -14468,7 +14569,7 @@ var ChatPopup = ({
|
|
|
14468
14569
|
color: "hsl(var(--voice-text))"
|
|
14469
14570
|
}
|
|
14470
14571
|
},
|
|
14471
|
-
messages.length === 0 ? /* @__PURE__ */
|
|
14572
|
+
messages.length === 0 ? /* @__PURE__ */ React6.createElement(
|
|
14472
14573
|
"div",
|
|
14473
14574
|
{
|
|
14474
14575
|
style: {
|
|
@@ -14478,7 +14579,7 @@ var ChatPopup = ({
|
|
|
14478
14579
|
}
|
|
14479
14580
|
},
|
|
14480
14581
|
"Start a conversation with CueKit AI"
|
|
14481
|
-
) : messages.map((message, index2) => /* @__PURE__ */
|
|
14582
|
+
) : messages.map((message, index2) => /* @__PURE__ */ React6.createElement(
|
|
14482
14583
|
"div",
|
|
14483
14584
|
{
|
|
14484
14585
|
key: index2,
|
|
@@ -14492,7 +14593,7 @@ var ChatPopup = ({
|
|
|
14492
14593
|
justifyContent: message.sender === "user" ? "flex-end" : "flex-start"
|
|
14493
14594
|
}
|
|
14494
14595
|
},
|
|
14495
|
-
message.sender === "assistant" && /* @__PURE__ */
|
|
14596
|
+
message.sender === "assistant" && /* @__PURE__ */ React6.createElement(
|
|
14496
14597
|
"div",
|
|
14497
14598
|
{
|
|
14498
14599
|
style: {
|
|
@@ -14507,7 +14608,7 @@ var ChatPopup = ({
|
|
|
14507
14608
|
overflow: "hidden"
|
|
14508
14609
|
}
|
|
14509
14610
|
},
|
|
14510
|
-
/* @__PURE__ */
|
|
14611
|
+
/* @__PURE__ */ React6.createElement(
|
|
14511
14612
|
"img",
|
|
14512
14613
|
{
|
|
14513
14614
|
src: "https://dashboard.cuekit.ai/_next/image?url=%2Fimages%2Fcuekit-logo-2.png&w=256&q=100",
|
|
@@ -14521,7 +14622,7 @@ var ChatPopup = ({
|
|
|
14521
14622
|
}
|
|
14522
14623
|
)
|
|
14523
14624
|
),
|
|
14524
|
-
/* @__PURE__ */
|
|
14625
|
+
/* @__PURE__ */ React6.createElement(
|
|
14525
14626
|
"div",
|
|
14526
14627
|
{
|
|
14527
14628
|
style: {
|
|
@@ -14532,7 +14633,7 @@ var ChatPopup = ({
|
|
|
14532
14633
|
flex: 1
|
|
14533
14634
|
}
|
|
14534
14635
|
},
|
|
14535
|
-
/* @__PURE__ */
|
|
14636
|
+
/* @__PURE__ */ React6.createElement(
|
|
14536
14637
|
"div",
|
|
14537
14638
|
{
|
|
14538
14639
|
style: {
|
|
@@ -14550,12 +14651,12 @@ var ChatPopup = ({
|
|
|
14550
14651
|
marginLeft: message.sender === "user" ? "auto" : 0
|
|
14551
14652
|
}
|
|
14552
14653
|
},
|
|
14553
|
-
/* @__PURE__ */
|
|
14654
|
+
/* @__PURE__ */ React6.createElement("div", null, /* @__PURE__ */ React6.createElement(
|
|
14554
14655
|
Markdown,
|
|
14555
14656
|
{
|
|
14556
14657
|
remarkPlugins: [remarkGfm],
|
|
14557
14658
|
components: {
|
|
14558
|
-
p: ({ children }) => /* @__PURE__ */
|
|
14659
|
+
p: ({ children }) => /* @__PURE__ */ React6.createElement(
|
|
14559
14660
|
"p",
|
|
14560
14661
|
{
|
|
14561
14662
|
style: {
|
|
@@ -14566,7 +14667,7 @@ var ChatPopup = ({
|
|
|
14566
14667
|
},
|
|
14567
14668
|
children
|
|
14568
14669
|
),
|
|
14569
|
-
h1: ({ children }) => /* @__PURE__ */
|
|
14670
|
+
h1: ({ children }) => /* @__PURE__ */ React6.createElement(
|
|
14570
14671
|
"h1",
|
|
14571
14672
|
{
|
|
14572
14673
|
style: {
|
|
@@ -14578,7 +14679,7 @@ var ChatPopup = ({
|
|
|
14578
14679
|
},
|
|
14579
14680
|
children
|
|
14580
14681
|
),
|
|
14581
|
-
h2: ({ children }) => /* @__PURE__ */
|
|
14682
|
+
h2: ({ children }) => /* @__PURE__ */ React6.createElement(
|
|
14582
14683
|
"h2",
|
|
14583
14684
|
{
|
|
14584
14685
|
style: {
|
|
@@ -14590,7 +14691,7 @@ var ChatPopup = ({
|
|
|
14590
14691
|
},
|
|
14591
14692
|
children
|
|
14592
14693
|
),
|
|
14593
|
-
h3: ({ children }) => /* @__PURE__ */
|
|
14694
|
+
h3: ({ children }) => /* @__PURE__ */ React6.createElement(
|
|
14594
14695
|
"h3",
|
|
14595
14696
|
{
|
|
14596
14697
|
style: {
|
|
@@ -14602,7 +14703,7 @@ var ChatPopup = ({
|
|
|
14602
14703
|
},
|
|
14603
14704
|
children
|
|
14604
14705
|
),
|
|
14605
|
-
ul: ({ children }) => /* @__PURE__ */
|
|
14706
|
+
ul: ({ children }) => /* @__PURE__ */ React6.createElement(
|
|
14606
14707
|
"ul",
|
|
14607
14708
|
{
|
|
14608
14709
|
style: {
|
|
@@ -14614,7 +14715,7 @@ var ChatPopup = ({
|
|
|
14614
14715
|
},
|
|
14615
14716
|
children
|
|
14616
14717
|
),
|
|
14617
|
-
ol: ({ children }) => /* @__PURE__ */
|
|
14718
|
+
ol: ({ children }) => /* @__PURE__ */ React6.createElement(
|
|
14618
14719
|
"ol",
|
|
14619
14720
|
{
|
|
14620
14721
|
style: {
|
|
@@ -14626,7 +14727,7 @@ var ChatPopup = ({
|
|
|
14626
14727
|
},
|
|
14627
14728
|
children
|
|
14628
14729
|
),
|
|
14629
|
-
li: ({ children }) => /* @__PURE__ */
|
|
14730
|
+
li: ({ children }) => /* @__PURE__ */ React6.createElement(
|
|
14630
14731
|
"li",
|
|
14631
14732
|
{
|
|
14632
14733
|
style: {
|
|
@@ -14637,7 +14738,7 @@ var ChatPopup = ({
|
|
|
14637
14738
|
},
|
|
14638
14739
|
children
|
|
14639
14740
|
),
|
|
14640
|
-
strong: ({ children }) => /* @__PURE__ */
|
|
14741
|
+
strong: ({ children }) => /* @__PURE__ */ React6.createElement(
|
|
14641
14742
|
"strong",
|
|
14642
14743
|
{
|
|
14643
14744
|
style: {
|
|
@@ -14648,7 +14749,7 @@ var ChatPopup = ({
|
|
|
14648
14749
|
},
|
|
14649
14750
|
children
|
|
14650
14751
|
),
|
|
14651
|
-
em: ({ children }) => /* @__PURE__ */
|
|
14752
|
+
em: ({ children }) => /* @__PURE__ */ React6.createElement(
|
|
14652
14753
|
"em",
|
|
14653
14754
|
{
|
|
14654
14755
|
style: {
|
|
@@ -14659,7 +14760,7 @@ var ChatPopup = ({
|
|
|
14659
14760
|
},
|
|
14660
14761
|
children
|
|
14661
14762
|
),
|
|
14662
|
-
code: ({ children }) => /* @__PURE__ */
|
|
14763
|
+
code: ({ children }) => /* @__PURE__ */ React6.createElement(
|
|
14663
14764
|
"code",
|
|
14664
14765
|
{
|
|
14665
14766
|
style: {
|
|
@@ -14672,7 +14773,7 @@ var ChatPopup = ({
|
|
|
14672
14773
|
},
|
|
14673
14774
|
children
|
|
14674
14775
|
),
|
|
14675
|
-
pre: ({ children }) => /* @__PURE__ */
|
|
14776
|
+
pre: ({ children }) => /* @__PURE__ */ React6.createElement(
|
|
14676
14777
|
"pre",
|
|
14677
14778
|
{
|
|
14678
14779
|
style: {
|
|
@@ -14687,7 +14788,7 @@ var ChatPopup = ({
|
|
|
14687
14788
|
},
|
|
14688
14789
|
children
|
|
14689
14790
|
),
|
|
14690
|
-
blockquote: ({ children }) => /* @__PURE__ */
|
|
14791
|
+
blockquote: ({ children }) => /* @__PURE__ */ React6.createElement(
|
|
14691
14792
|
"blockquote",
|
|
14692
14793
|
{
|
|
14693
14794
|
style: {
|
|
@@ -14706,7 +14807,7 @@ var ChatPopup = ({
|
|
|
14706
14807
|
message.text
|
|
14707
14808
|
))
|
|
14708
14809
|
),
|
|
14709
|
-
message.sender === "user" && /* @__PURE__ */
|
|
14810
|
+
message.sender === "user" && /* @__PURE__ */ React6.createElement(
|
|
14710
14811
|
"div",
|
|
14711
14812
|
{
|
|
14712
14813
|
style: {
|
|
@@ -14727,9 +14828,9 @@ var ChatPopup = ({
|
|
|
14727
14828
|
)
|
|
14728
14829
|
)
|
|
14729
14830
|
)),
|
|
14730
|
-
/* @__PURE__ */
|
|
14831
|
+
/* @__PURE__ */ React6.createElement("div", { ref: messagesEndRef })
|
|
14731
14832
|
),
|
|
14732
|
-
/* @__PURE__ */
|
|
14833
|
+
/* @__PURE__ */ React6.createElement(
|
|
14733
14834
|
"div",
|
|
14734
14835
|
{
|
|
14735
14836
|
style: {
|
|
@@ -14738,7 +14839,7 @@ var ChatPopup = ({
|
|
|
14738
14839
|
background: "hsl(var(--voice-bg))"
|
|
14739
14840
|
}
|
|
14740
14841
|
},
|
|
14741
|
-
/* @__PURE__ */
|
|
14842
|
+
/* @__PURE__ */ React6.createElement(
|
|
14742
14843
|
"form",
|
|
14743
14844
|
{
|
|
14744
14845
|
onSubmit: (e2) => {
|
|
@@ -14747,7 +14848,7 @@ var ChatPopup = ({
|
|
|
14747
14848
|
},
|
|
14748
14849
|
style: { display: "flex", alignItems: "center", gap: 8, margin: 0 }
|
|
14749
14850
|
},
|
|
14750
|
-
/* @__PURE__ */
|
|
14851
|
+
/* @__PURE__ */ React6.createElement(
|
|
14751
14852
|
"input",
|
|
14752
14853
|
{
|
|
14753
14854
|
type: "text",
|
|
@@ -14774,7 +14875,7 @@ var ChatPopup = ({
|
|
|
14774
14875
|
}
|
|
14775
14876
|
}
|
|
14776
14877
|
),
|
|
14777
|
-
isConnected3 && onEndCall && /* @__PURE__ */
|
|
14878
|
+
isConnected3 && onEndCall && /* @__PURE__ */ React6.createElement(
|
|
14778
14879
|
"button",
|
|
14779
14880
|
{
|
|
14780
14881
|
type: "submit",
|
|
@@ -14793,7 +14894,7 @@ var ChatPopup = ({
|
|
|
14793
14894
|
cursor: "pointer"
|
|
14794
14895
|
}
|
|
14795
14896
|
},
|
|
14796
|
-
/* @__PURE__ */
|
|
14897
|
+
/* @__PURE__ */ React6.createElement(phone_off_default, { style: { width: 16, height: 16 } })
|
|
14797
14898
|
)
|
|
14798
14899
|
)
|
|
14799
14900
|
)
|
|
@@ -14801,7 +14902,7 @@ var ChatPopup = ({
|
|
|
14801
14902
|
};
|
|
14802
14903
|
|
|
14803
14904
|
// src/components/border-glow.tsx
|
|
14804
|
-
import
|
|
14905
|
+
import React7 from "react";
|
|
14805
14906
|
var BorderGlow = ({ isActive }) => {
|
|
14806
14907
|
if (!isActive) return null;
|
|
14807
14908
|
const styles = {
|
|
@@ -14928,7 +15029,7 @@ var BorderGlow = ({ isActive }) => {
|
|
|
14928
15029
|
opacity: 0.6
|
|
14929
15030
|
}
|
|
14930
15031
|
};
|
|
14931
|
-
return /* @__PURE__ */
|
|
15032
|
+
return /* @__PURE__ */ React7.createElement(React7.Fragment, null, /* @__PURE__ */ React7.createElement("style", null, `
|
|
14932
15033
|
@keyframes borderPulse {
|
|
14933
15034
|
0%, 100% {
|
|
14934
15035
|
opacity: 1;
|
|
@@ -14937,12 +15038,12 @@ var BorderGlow = ({ isActive }) => {
|
|
|
14937
15038
|
opacity: 0.5;
|
|
14938
15039
|
}
|
|
14939
15040
|
}
|
|
14940
|
-
`), /* @__PURE__ */
|
|
15041
|
+
`), /* @__PURE__ */ React7.createElement("div", { style: styles.container }, /* @__PURE__ */ React7.createElement("div", { style: styles.rightBorder1 }), /* @__PURE__ */ React7.createElement("div", { style: styles.rightBorder2 }), /* @__PURE__ */ React7.createElement("div", { style: styles.rightBorder3 }), /* @__PURE__ */ React7.createElement("div", { style: styles.leftBorder1 }), /* @__PURE__ */ React7.createElement("div", { style: styles.leftBorder2 }), /* @__PURE__ */ React7.createElement("div", { style: styles.leftBorder3 }), /* @__PURE__ */ React7.createElement("div", { style: styles.cornerTopLeft }), /* @__PURE__ */ React7.createElement("div", { style: styles.cornerTopRight }), /* @__PURE__ */ React7.createElement("div", { style: styles.cornerBottomRight }), /* @__PURE__ */ React7.createElement("div", { style: styles.cornerBottomLeft })));
|
|
14941
15042
|
};
|
|
14942
15043
|
var border_glow_default = BorderGlow;
|
|
14943
15044
|
|
|
14944
15045
|
// src/components/voice-intensity-visualizer.tsx
|
|
14945
|
-
import
|
|
15046
|
+
import React8, { useEffect as useEffect9, useState as useState9 } from "react";
|
|
14946
15047
|
|
|
14947
15048
|
// node_modules/@livekit/components-react/dist/hooks-C2Bp5v2q.mjs
|
|
14948
15049
|
import * as r from "react";
|
|
@@ -16772,7 +16873,7 @@ var VoiceIntensityWithRoom = (props) => {
|
|
|
16772
16873
|
if (!room) {
|
|
16773
16874
|
return null;
|
|
16774
16875
|
}
|
|
16775
|
-
return /* @__PURE__ */
|
|
16876
|
+
return /* @__PURE__ */ React8.createElement(Wn.Provider, { value: room }, /* @__PURE__ */ React8.createElement(VoiceIntensityBars, { ...props }));
|
|
16776
16877
|
};
|
|
16777
16878
|
var VoiceIntensityBars = ({
|
|
16778
16879
|
isActive,
|
|
@@ -16835,7 +16936,7 @@ var VoiceIntensityBars = ({
|
|
|
16835
16936
|
if (!trackRef) {
|
|
16836
16937
|
return null;
|
|
16837
16938
|
}
|
|
16838
|
-
return /* @__PURE__ */
|
|
16939
|
+
return /* @__PURE__ */ React8.createElement(
|
|
16839
16940
|
"div",
|
|
16840
16941
|
{
|
|
16841
16942
|
className: `voice-intensity-visualizer ${className}`,
|
|
@@ -16852,28 +16953,81 @@ var VoiceIntensityBars = ({
|
|
|
16852
16953
|
pointerEvents: "none"
|
|
16853
16954
|
}
|
|
16854
16955
|
},
|
|
16855
|
-
/* @__PURE__ */
|
|
16956
|
+
/* @__PURE__ */ React8.createElement(
|
|
16856
16957
|
Xt,
|
|
16857
16958
|
{
|
|
16858
16959
|
barCount,
|
|
16859
16960
|
state: "speaking",
|
|
16860
16961
|
options: { minHeight },
|
|
16861
16962
|
trackRef,
|
|
16862
|
-
|
|
16963
|
+
style: {
|
|
16964
|
+
display: "flex",
|
|
16965
|
+
alignItems: "center",
|
|
16966
|
+
justifyContent: "center",
|
|
16967
|
+
gap: "0.25rem"
|
|
16968
|
+
}
|
|
16863
16969
|
},
|
|
16864
|
-
/* @__PURE__ */
|
|
16970
|
+
/* @__PURE__ */ React8.createElement("span", { className: "cuekit-voice-intensity-bar" })
|
|
16865
16971
|
)
|
|
16866
16972
|
);
|
|
16867
16973
|
};
|
|
16868
16974
|
var VoiceIntensityVisualizer = VoiceIntensityWithRoom;
|
|
16869
16975
|
|
|
16976
|
+
// src/components/svgs/mic.tsx
|
|
16977
|
+
import React9 from "react";
|
|
16978
|
+
var MicIcon = ({ width = 24, height = 24, className, ...props }) => {
|
|
16979
|
+
return /* @__PURE__ */ React9.createElement(
|
|
16980
|
+
"svg",
|
|
16981
|
+
{
|
|
16982
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
16983
|
+
width,
|
|
16984
|
+
height,
|
|
16985
|
+
viewBox: "0 0 24 24",
|
|
16986
|
+
fill: "none",
|
|
16987
|
+
stroke: "currentColor",
|
|
16988
|
+
"stroke-width": "2",
|
|
16989
|
+
"stroke-linecap": "round",
|
|
16990
|
+
"stroke-linejoin": "round",
|
|
16991
|
+
className,
|
|
16992
|
+
...props
|
|
16993
|
+
},
|
|
16994
|
+
/* @__PURE__ */ React9.createElement("path", { d: "M12 19v3" }),
|
|
16995
|
+
/* @__PURE__ */ React9.createElement("path", { d: "M19 10v2a7 7 0 0 1-14 0v-2" }),
|
|
16996
|
+
/* @__PURE__ */ React9.createElement("rect", { x: "9", y: "2", width: "6", height: "13", rx: "3" })
|
|
16997
|
+
);
|
|
16998
|
+
};
|
|
16999
|
+
var mic_default = MicIcon;
|
|
17000
|
+
|
|
17001
|
+
// src/components/svgs/loader.tsx
|
|
17002
|
+
import React10 from "react";
|
|
17003
|
+
var LoaderIcon = ({ width = 24, height = 24, className, ...props }) => {
|
|
17004
|
+
return /* @__PURE__ */ React10.createElement(
|
|
17005
|
+
"svg",
|
|
17006
|
+
{
|
|
17007
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
17008
|
+
width: "24",
|
|
17009
|
+
height: "24",
|
|
17010
|
+
viewBox: "0 0 24 24",
|
|
17011
|
+
fill: "none",
|
|
17012
|
+
stroke: "currentColor",
|
|
17013
|
+
"stroke-width": "2",
|
|
17014
|
+
"stroke-linecap": "round",
|
|
17015
|
+
"stroke-linejoin": "round",
|
|
17016
|
+
className,
|
|
17017
|
+
...props
|
|
17018
|
+
},
|
|
17019
|
+
/* @__PURE__ */ React10.createElement("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" })
|
|
17020
|
+
);
|
|
17021
|
+
};
|
|
17022
|
+
var loader_default = LoaderIcon;
|
|
17023
|
+
|
|
16870
17024
|
// src/components/mic-button.tsx
|
|
16871
17025
|
var chatState = {
|
|
16872
17026
|
isOpen: false,
|
|
16873
17027
|
isMinimized: false
|
|
16874
17028
|
};
|
|
16875
17029
|
var VoiceIntensityWrapper = ({ active, buttonSize }) => {
|
|
16876
|
-
return /* @__PURE__ */
|
|
17030
|
+
return /* @__PURE__ */ React11.createElement(
|
|
16877
17031
|
VoiceIntensityVisualizer,
|
|
16878
17032
|
{
|
|
16879
17033
|
isActive: active,
|
|
@@ -17204,7 +17358,7 @@ var MicButton = ({
|
|
|
17204
17358
|
...imageStyle
|
|
17205
17359
|
};
|
|
17206
17360
|
const animatedImageStyle = micState === "thinking" ? { ...baseImageStyle, animation: "spin 1s linear infinite" } : micState === "replying" ? { ...baseImageStyle, animation: "pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite" } : baseImageStyle;
|
|
17207
|
-
return /* @__PURE__ */
|
|
17361
|
+
return /* @__PURE__ */ React11.createElement("img", { src: imageSource, alt: "Voice Assistant", style: animatedImageStyle });
|
|
17208
17362
|
}
|
|
17209
17363
|
const iconStyle = {
|
|
17210
17364
|
width: `100%`,
|
|
@@ -17214,13 +17368,13 @@ var MicButton = ({
|
|
|
17214
17368
|
};
|
|
17215
17369
|
switch (micState) {
|
|
17216
17370
|
case "thinking":
|
|
17217
|
-
return /* @__PURE__ */
|
|
17371
|
+
return /* @__PURE__ */ React11.createElement(loader_default, { style: { ...iconStyle, animation: "spin 1s linear infinite" } });
|
|
17218
17372
|
case "replying":
|
|
17219
|
-
return /* @__PURE__ */
|
|
17373
|
+
return /* @__PURE__ */ React11.createElement(VoiceIntensityWrapper, { active: true, buttonSize });
|
|
17220
17374
|
case "listening":
|
|
17221
|
-
return /* @__PURE__ */
|
|
17375
|
+
return /* @__PURE__ */ React11.createElement(VoiceIntensityWrapper, { active: true, buttonSize });
|
|
17222
17376
|
default:
|
|
17223
|
-
return /* @__PURE__ */
|
|
17377
|
+
return /* @__PURE__ */ React11.createElement(mic_default, { style: iconStyle });
|
|
17224
17378
|
}
|
|
17225
17379
|
};
|
|
17226
17380
|
const getPositionStyle = () => {
|
|
@@ -17300,7 +17454,7 @@ var MicButton = ({
|
|
|
17300
17454
|
}
|
|
17301
17455
|
return baseStyle;
|
|
17302
17456
|
};
|
|
17303
|
-
return /* @__PURE__ */
|
|
17457
|
+
return /* @__PURE__ */ React11.createElement(React11.Fragment, null, /* @__PURE__ */ React11.createElement("div", { "data-cuekit-ignore": true, style: { ...buttonStyles.container, ...getPositionStyle() } }, /* @__PURE__ */ React11.createElement("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", gap: "8px" } }, /* @__PURE__ */ React11.createElement(
|
|
17304
17458
|
"button",
|
|
17305
17459
|
{
|
|
17306
17460
|
"data-testid": "ignore",
|
|
@@ -17321,8 +17475,8 @@ var MicButton = ({
|
|
|
17321
17475
|
},
|
|
17322
17476
|
"aria-label": micState === "thinking" ? "Processing..." : micState === "replying" ? "AI is responding..." : isListening ? "Stop listening" : "Start listening"
|
|
17323
17477
|
},
|
|
17324
|
-
/* @__PURE__ */
|
|
17325
|
-
), hasText && text7 && /* @__PURE__ */
|
|
17478
|
+
/* @__PURE__ */ React11.createElement("div", { style: buttonStyles.iconContainer }, getIcon())
|
|
17479
|
+
), hasText && text7 && /* @__PURE__ */ React11.createElement(
|
|
17326
17480
|
"div",
|
|
17327
17481
|
{
|
|
17328
17482
|
style: {
|
|
@@ -17343,8 +17497,8 @@ var MicButton = ({
|
|
|
17343
17497
|
...textStyle
|
|
17344
17498
|
}
|
|
17345
17499
|
},
|
|
17346
|
-
/* @__PURE__ */
|
|
17347
|
-
))), /* @__PURE__ */
|
|
17500
|
+
/* @__PURE__ */ React11.createElement("span", null, text7)
|
|
17501
|
+
))), /* @__PURE__ */ React11.createElement(
|
|
17348
17502
|
ChatPopup,
|
|
17349
17503
|
{
|
|
17350
17504
|
isOpen: isChatOpen,
|
|
@@ -17367,7 +17521,7 @@ var MicButton = ({
|
|
|
17367
17521
|
status: getUserFriendlyStatus(micState, isConnected3 ?? false),
|
|
17368
17522
|
anchor: { position: screenPosition, bottom: bottomSpace, size: buttonSize }
|
|
17369
17523
|
}
|
|
17370
|
-
), isChatOpen && isChatMinimized && /* @__PURE__ */
|
|
17524
|
+
), isChatOpen && isChatMinimized && /* @__PURE__ */ React11.createElement(
|
|
17371
17525
|
"button",
|
|
17372
17526
|
{
|
|
17373
17527
|
onClick: restoreChat,
|
|
@@ -17388,8 +17542,8 @@ var MicButton = ({
|
|
|
17388
17542
|
className: `cuekit-voice-popup ${currentTheme === "dark" ? "cuekit-dark" : ""}`,
|
|
17389
17543
|
"aria-label": "Open chat"
|
|
17390
17544
|
},
|
|
17391
|
-
/* @__PURE__ */
|
|
17392
|
-
), /* @__PURE__ */
|
|
17545
|
+
/* @__PURE__ */ React11.createElement("span", { style: { fontSize: 12, fontWeight: 600, color: "hsl(var(--voice-text))" } }, "Open chat")
|
|
17546
|
+
), /* @__PURE__ */ React11.createElement("div", { ref: audioContainerRef, style: { display: "none" } }), showBorderGlow && showBodyGlow && /* @__PURE__ */ React11.createElement(border_glow_default, { isActive: true }));
|
|
17393
17547
|
};
|
|
17394
17548
|
export {
|
|
17395
17549
|
border_glow_default as BorderGlow,
|