@intentai/react 2.0.1 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +432 -274
- package/dist/index.mjs +432 -274
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -201,55 +201,56 @@ var contentVariants = {
|
|
|
201
201
|
transition: { duration: 0.2 }
|
|
202
202
|
}
|
|
203
203
|
};
|
|
204
|
-
var categoryVariants = {
|
|
205
|
-
hidden: { opacity: 0, y: 20, scale: 0.9 },
|
|
206
|
-
visible: (i) => ({
|
|
207
|
-
opacity: 1,
|
|
208
|
-
y: 0,
|
|
209
|
-
scale: 1,
|
|
210
|
-
transition: {
|
|
211
|
-
delay: i * 0.05,
|
|
212
|
-
...springPresets.smooth
|
|
213
|
-
}
|
|
214
|
-
}),
|
|
215
|
-
hover: {
|
|
216
|
-
scale: 1.05,
|
|
217
|
-
y: -2,
|
|
218
|
-
transition: springPresets.bouncy
|
|
219
|
-
},
|
|
220
|
-
tap: {
|
|
221
|
-
scale: 0.95
|
|
222
|
-
},
|
|
223
|
-
selected: {
|
|
224
|
-
scale: 1,
|
|
225
|
-
borderColor: "var(--widget-primary)"
|
|
226
|
-
}
|
|
227
|
-
};
|
|
228
204
|
var BreathingRing = ({ isActive }) => {
|
|
229
205
|
const { reducedMotion } = useWidget();
|
|
230
206
|
if (reducedMotion) return null;
|
|
231
|
-
return /* @__PURE__ */
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
207
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
208
|
+
/* @__PURE__ */ jsx(
|
|
209
|
+
motion.div,
|
|
210
|
+
{
|
|
211
|
+
animate: {
|
|
212
|
+
scale: isActive ? [1, 1.3, 1] : 1,
|
|
213
|
+
opacity: isActive ? [0.2, 0.4, 0.2] : 0.2
|
|
214
|
+
},
|
|
215
|
+
transition: {
|
|
216
|
+
duration: 2.5,
|
|
217
|
+
repeat: Infinity,
|
|
218
|
+
ease: "easeInOut"
|
|
219
|
+
},
|
|
220
|
+
style: {
|
|
221
|
+
position: "absolute",
|
|
222
|
+
inset: -16,
|
|
223
|
+
borderRadius: "50%",
|
|
224
|
+
background: "radial-gradient(circle, var(--widget-primary) 0%, transparent 70%)",
|
|
225
|
+
pointerEvents: "none",
|
|
226
|
+
filter: "blur(8px)"
|
|
227
|
+
}
|
|
250
228
|
}
|
|
251
|
-
|
|
252
|
-
|
|
229
|
+
),
|
|
230
|
+
/* @__PURE__ */ jsx(
|
|
231
|
+
motion.div,
|
|
232
|
+
{
|
|
233
|
+
className: "fiq-breathing-ring",
|
|
234
|
+
animate: {
|
|
235
|
+
scale: isActive ? [1, 1.08, 1] : 1,
|
|
236
|
+
opacity: isActive ? [0.6, 1, 0.6] : 0.6
|
|
237
|
+
},
|
|
238
|
+
transition: {
|
|
239
|
+
duration: 2,
|
|
240
|
+
repeat: Infinity,
|
|
241
|
+
ease: "easeInOut"
|
|
242
|
+
},
|
|
243
|
+
style: {
|
|
244
|
+
position: "absolute",
|
|
245
|
+
inset: -4,
|
|
246
|
+
borderRadius: "50%",
|
|
247
|
+
border: "2px solid var(--widget-primary)",
|
|
248
|
+
pointerEvents: "none",
|
|
249
|
+
opacity: 0.5
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
)
|
|
253
|
+
] });
|
|
253
254
|
};
|
|
254
255
|
var AmbientOrb = ({ audioLevel, isRecording }) => {
|
|
255
256
|
const { reducedMotion } = useWidget();
|
|
@@ -500,20 +501,6 @@ var TranscriptionDisplay = ({ text, isLive }) => {
|
|
|
500
501
|
}
|
|
501
502
|
);
|
|
502
503
|
};
|
|
503
|
-
var CategoryIcon = ({ icon, selected }) => {
|
|
504
|
-
const color = selected ? "white" : "var(--widget-primary)";
|
|
505
|
-
const size = 20;
|
|
506
|
-
const icons = {
|
|
507
|
-
bug: /* @__PURE__ */ jsxs("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
508
|
-
/* @__PURE__ */ jsx("path", { d: "M8 2l1.88 1.88M14.12 3.88L16 2M9 7.13v-1a3.003 3.003 0 116 0v1" }),
|
|
509
|
-
/* @__PURE__ */ jsx("path", { d: "M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 014-4h4a4 4 0 014 4v3c0 3.3-2.7 6-6 6" }),
|
|
510
|
-
/* @__PURE__ */ jsx("path", { d: "M12 20v-9M6.53 9C4.6 8.8 3 7.1 3 5M6 13H2M3 21c0-2.1 1.7-3.9 3.8-4M20.97 5c0 2.1-1.6 3.8-3.5 4M22 13h-4M17.2 17c2.1.1 3.8 1.9 3.8 4" })
|
|
511
|
-
] }),
|
|
512
|
-
sparkles: /* @__PURE__ */ jsx("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("path", { d: "M12 3l1.912 5.813a2 2 0 001.275 1.275L21 12l-5.813 1.912a2 2 0 00-1.275 1.275L12 21l-1.912-5.813a2 2 0 00-1.275-1.275L3 12l5.813-1.912a2 2 0 001.275-1.275L12 3z" }) }),
|
|
513
|
-
message: /* @__PURE__ */ jsx("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("path", { d: "M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2v10z" }) })
|
|
514
|
-
};
|
|
515
|
-
return /* @__PURE__ */ jsx(Fragment, { children: icons[icon] || icons.message });
|
|
516
|
-
};
|
|
517
504
|
var ListeningDots = () => /* @__PURE__ */ jsx("div", { style: { display: "flex", gap: 4 }, children: [0, 1, 2].map((i) => /* @__PURE__ */ jsx(
|
|
518
505
|
motion.span,
|
|
519
506
|
{
|
|
@@ -542,10 +529,10 @@ var CategorySelector = ({ categories, selected, onSelect }) => {
|
|
|
542
529
|
{
|
|
543
530
|
style: {
|
|
544
531
|
display: "block",
|
|
545
|
-
fontSize:
|
|
532
|
+
fontSize: 12,
|
|
546
533
|
fontWeight: 600,
|
|
547
|
-
color: "var(--widget-text-
|
|
548
|
-
marginBottom:
|
|
534
|
+
color: "var(--widget-text-muted)",
|
|
535
|
+
marginBottom: 12,
|
|
549
536
|
textTransform: "uppercase",
|
|
550
537
|
letterSpacing: "0.05em"
|
|
551
538
|
},
|
|
@@ -556,49 +543,49 @@ var CategorySelector = ({ categories, selected, onSelect }) => {
|
|
|
556
543
|
"div",
|
|
557
544
|
{
|
|
558
545
|
style: {
|
|
559
|
-
display: "
|
|
560
|
-
|
|
561
|
-
gap:
|
|
546
|
+
display: "flex",
|
|
547
|
+
flexWrap: "wrap",
|
|
548
|
+
gap: 8
|
|
562
549
|
},
|
|
563
|
-
children: categories.map((category
|
|
550
|
+
children: categories.map((category) => /* @__PURE__ */ jsxs(
|
|
564
551
|
motion.button,
|
|
565
552
|
{
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
initial: "hidden",
|
|
569
|
-
animate: selected === category.id ? "selected" : "visible",
|
|
570
|
-
whileHover: "hover",
|
|
571
|
-
whileTap: "tap",
|
|
553
|
+
whileHover: { scale: 1.04, y: -1 },
|
|
554
|
+
whileTap: { scale: 0.96 },
|
|
572
555
|
onClick: () => onSelect(category.id),
|
|
573
556
|
style: {
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
padding: "12px 8px",
|
|
579
|
-
background: selected === category.id ? "var(--widget-primary)" : "var(--widget-glass-bg)",
|
|
580
|
-
border: `2px solid ${selected === category.id ? "var(--widget-primary)" : "var(--widget-glass-border)"}`,
|
|
581
|
-
borderRadius: 12,
|
|
557
|
+
padding: "10px 18px",
|
|
558
|
+
background: selected === category.id ? "linear-gradient(145deg, var(--widget-primary) 0%, var(--widget-accent) 100%)" : "var(--widget-glass-bg)",
|
|
559
|
+
border: `1.5px solid ${selected === category.id ? "transparent" : "var(--widget-glass-border)"}`,
|
|
560
|
+
borderRadius: 24,
|
|
582
561
|
cursor: "pointer",
|
|
583
|
-
transition: "
|
|
562
|
+
transition: "all 0.2s ease",
|
|
563
|
+
boxShadow: selected === category.id ? "0 4px 12px -2px var(--widget-primary-glow)" : "0 2px 4px rgba(0,0,0,0.1)",
|
|
564
|
+
position: "relative",
|
|
565
|
+
overflow: "hidden"
|
|
584
566
|
},
|
|
585
567
|
children: [
|
|
586
|
-
/* @__PURE__ */ jsx(
|
|
587
|
-
|
|
568
|
+
selected === category.id && /* @__PURE__ */ jsx(
|
|
569
|
+
"div",
|
|
588
570
|
{
|
|
589
|
-
style: {
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
571
|
+
style: {
|
|
572
|
+
position: "absolute",
|
|
573
|
+
inset: 0,
|
|
574
|
+
background: "linear-gradient(180deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 50%)",
|
|
575
|
+
borderRadius: "inherit",
|
|
576
|
+
pointerEvents: "none"
|
|
577
|
+
}
|
|
593
578
|
}
|
|
594
579
|
),
|
|
595
580
|
/* @__PURE__ */ jsx(
|
|
596
581
|
"span",
|
|
597
582
|
{
|
|
598
583
|
style: {
|
|
599
|
-
fontSize:
|
|
600
|
-
fontWeight:
|
|
601
|
-
color: selected === category.id ? "white" : "var(--widget-text-primary)"
|
|
584
|
+
fontSize: 13,
|
|
585
|
+
fontWeight: 600,
|
|
586
|
+
color: selected === category.id ? "white" : "var(--widget-text-primary)",
|
|
587
|
+
position: "relative",
|
|
588
|
+
zIndex: 1
|
|
602
589
|
},
|
|
603
590
|
children: category.label
|
|
604
591
|
}
|
|
@@ -758,7 +745,7 @@ var SuccessCelebration = ({ onComplete }) => {
|
|
|
758
745
|
}
|
|
759
746
|
);
|
|
760
747
|
};
|
|
761
|
-
var MagneticButton = ({ children, onClick, variant = "primary", disabled, loading }) => {
|
|
748
|
+
var MagneticButton = ({ children, onClick, onPressStart, onPressEnd, variant = "primary", disabled, loading }) => {
|
|
762
749
|
const buttonRef = useRef(null);
|
|
763
750
|
const [magnetOffset, setMagnetOffset] = useState({ x: 0, y: 0 });
|
|
764
751
|
const handleMouseMove = (e) => {
|
|
@@ -767,8 +754,8 @@ var MagneticButton = ({ children, onClick, variant = "primary", disabled, loadin
|
|
|
767
754
|
const centerX = rect.left + rect.width / 2;
|
|
768
755
|
const centerY = rect.top + rect.height / 2;
|
|
769
756
|
setMagnetOffset({
|
|
770
|
-
x: (e.clientX - centerX) * 0.
|
|
771
|
-
y: (e.clientY - centerY) * 0.
|
|
757
|
+
x: (e.clientX - centerX) * 0.08,
|
|
758
|
+
y: (e.clientY - centerY) * 0.08
|
|
772
759
|
});
|
|
773
760
|
};
|
|
774
761
|
const handleMouseLeave = () => {
|
|
@@ -776,71 +763,120 @@ var MagneticButton = ({ children, onClick, variant = "primary", disabled, loadin
|
|
|
776
763
|
};
|
|
777
764
|
const baseStyles = {
|
|
778
765
|
width: "100%",
|
|
779
|
-
padding: "
|
|
766
|
+
padding: "16px 28px",
|
|
780
767
|
fontSize: 15,
|
|
781
768
|
fontWeight: 600,
|
|
782
|
-
borderRadius:
|
|
769
|
+
borderRadius: 14,
|
|
783
770
|
border: "none",
|
|
784
771
|
cursor: disabled ? "not-allowed" : "pointer",
|
|
785
|
-
transition: "
|
|
772
|
+
transition: "all 0.2s ease",
|
|
786
773
|
display: "flex",
|
|
787
774
|
alignItems: "center",
|
|
788
775
|
justifyContent: "center",
|
|
789
|
-
gap:
|
|
776
|
+
gap: 10,
|
|
777
|
+
letterSpacing: "0.01em",
|
|
778
|
+
position: "relative",
|
|
779
|
+
overflow: "hidden"
|
|
790
780
|
};
|
|
791
781
|
const variantStyles = {
|
|
792
782
|
primary: {
|
|
793
|
-
background: "var(--widget-primary)",
|
|
794
|
-
color: "white"
|
|
783
|
+
background: "linear-gradient(145deg, var(--widget-primary) 0%, var(--widget-accent) 100%)",
|
|
784
|
+
color: "white",
|
|
785
|
+
boxShadow: `
|
|
786
|
+
0 4px 16px -2px var(--widget-primary-glow),
|
|
787
|
+
0 2px 8px -2px rgba(0, 0, 0, 0.3),
|
|
788
|
+
inset 0 1px 1px rgba(255, 255, 255, 0.2)
|
|
789
|
+
`
|
|
795
790
|
},
|
|
796
791
|
secondary: {
|
|
797
792
|
background: "var(--widget-glass-bg)",
|
|
798
793
|
color: "var(--widget-text-primary)",
|
|
799
|
-
border: "1px solid var(--widget-glass-border)"
|
|
794
|
+
border: "1px solid var(--widget-glass-border)",
|
|
795
|
+
boxShadow: "0 2px 8px rgba(0, 0, 0, 0.15)"
|
|
800
796
|
},
|
|
801
797
|
ghost: {
|
|
802
798
|
background: "transparent",
|
|
803
799
|
color: "var(--widget-text-secondary)"
|
|
800
|
+
},
|
|
801
|
+
recording: {
|
|
802
|
+
background: "linear-gradient(145deg, #ef4444 0%, #dc2626 100%)",
|
|
803
|
+
color: "white",
|
|
804
|
+
boxShadow: `
|
|
805
|
+
0 4px 20px -2px var(--widget-recording-glow),
|
|
806
|
+
0 0 40px -5px var(--widget-recording-glow),
|
|
807
|
+
inset 0 1px 1px rgba(255, 255, 255, 0.2)
|
|
808
|
+
`
|
|
804
809
|
}
|
|
805
810
|
};
|
|
806
|
-
|
|
811
|
+
const handlePressStart = () => {
|
|
812
|
+
if (disabled || loading) return;
|
|
813
|
+
onPressStart?.();
|
|
814
|
+
};
|
|
815
|
+
const handlePressEnd = () => {
|
|
816
|
+
if (disabled || loading) return;
|
|
817
|
+
onPressEnd?.();
|
|
818
|
+
};
|
|
819
|
+
return /* @__PURE__ */ jsxs(
|
|
807
820
|
motion.button,
|
|
808
821
|
{
|
|
809
822
|
ref: buttonRef,
|
|
810
823
|
onClick,
|
|
811
824
|
disabled: disabled || loading,
|
|
812
825
|
onMouseMove: handleMouseMove,
|
|
813
|
-
onMouseLeave:
|
|
826
|
+
onMouseLeave: () => {
|
|
827
|
+
handleMouseLeave();
|
|
828
|
+
if (onPressEnd) handlePressEnd();
|
|
829
|
+
},
|
|
830
|
+
onMouseDown: onPressStart ? handlePressStart : void 0,
|
|
831
|
+
onMouseUp: onPressEnd ? handlePressEnd : void 0,
|
|
832
|
+
onTouchStart: onPressStart ? handlePressStart : void 0,
|
|
833
|
+
onTouchEnd: onPressEnd ? handlePressEnd : void 0,
|
|
814
834
|
animate: {
|
|
815
835
|
x: magnetOffset.x,
|
|
816
836
|
y: magnetOffset.y,
|
|
817
837
|
opacity: disabled ? 0.5 : 1
|
|
818
838
|
},
|
|
819
|
-
whileHover: { scale: disabled ? 1 : 1.02 },
|
|
839
|
+
whileHover: { scale: disabled ? 1 : 1.02, y: -1 },
|
|
820
840
|
whileTap: { scale: disabled ? 1 : 0.97 },
|
|
821
841
|
transition: springPresets.snappy,
|
|
822
842
|
style: { ...baseStyles, ...variantStyles[variant] },
|
|
823
|
-
children:
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
843
|
+
children: [
|
|
844
|
+
/* @__PURE__ */ jsx(
|
|
845
|
+
"div",
|
|
846
|
+
{
|
|
847
|
+
style: {
|
|
848
|
+
position: "absolute",
|
|
849
|
+
inset: 0,
|
|
850
|
+
background: "linear-gradient(180deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0) 50%)",
|
|
851
|
+
borderRadius: "inherit",
|
|
852
|
+
pointerEvents: "none"
|
|
853
|
+
}
|
|
834
854
|
}
|
|
835
|
-
|
|
836
|
-
|
|
855
|
+
),
|
|
856
|
+
loading ? /* @__PURE__ */ jsx(
|
|
857
|
+
motion.div,
|
|
858
|
+
{
|
|
859
|
+
animate: { rotate: 360 },
|
|
860
|
+
transition: { duration: 1, repeat: Infinity, ease: "linear" },
|
|
861
|
+
style: {
|
|
862
|
+
width: 20,
|
|
863
|
+
height: 20,
|
|
864
|
+
border: "2.5px solid rgba(255,255,255,0.3)",
|
|
865
|
+
borderTopColor: "white",
|
|
866
|
+
borderRadius: "50%"
|
|
867
|
+
}
|
|
868
|
+
}
|
|
869
|
+
) : /* @__PURE__ */ jsx("span", { style: { position: "relative", zIndex: 1, display: "flex", alignItems: "center", gap: 10 }, children })
|
|
870
|
+
]
|
|
837
871
|
}
|
|
838
872
|
);
|
|
839
873
|
};
|
|
840
874
|
var DEFAULT_CATEGORIES = [
|
|
841
|
-
{ id: "bug", label: "Bug", icon: "
|
|
842
|
-
{ id: "feature", label: "Feature", icon: "
|
|
843
|
-
{ id: "
|
|
875
|
+
{ id: "bug", label: "Bug", icon: "" },
|
|
876
|
+
{ id: "feature", label: "Feature", icon: "" },
|
|
877
|
+
{ id: "improvement", label: "Improve", icon: "" },
|
|
878
|
+
{ id: "praise", label: "Praise", icon: "" },
|
|
879
|
+
{ id: "other", label: "Other", icon: "" }
|
|
844
880
|
];
|
|
845
881
|
var PremiumVoiceWidget = ({
|
|
846
882
|
position = "bottom-right",
|
|
@@ -1030,19 +1066,18 @@ var PremiumVoiceWidget = ({
|
|
|
1030
1066
|
"aria-label": "Open feedback widget",
|
|
1031
1067
|
"aria-expanded": isExpanded,
|
|
1032
1068
|
style: {
|
|
1033
|
-
width:
|
|
1034
|
-
height:
|
|
1069
|
+
width: 60,
|
|
1070
|
+
height: 60,
|
|
1035
1071
|
borderRadius: "50%",
|
|
1036
1072
|
border: "none",
|
|
1037
1073
|
cursor: "pointer",
|
|
1038
1074
|
position: "relative",
|
|
1039
|
-
background:
|
|
1040
|
-
backdropFilter: "blur(20px) saturate(180%)",
|
|
1041
|
-
WebkitBackdropFilter: "blur(20px) saturate(180%)",
|
|
1075
|
+
background: `linear-gradient(145deg, var(--widget-primary) 0%, var(--widget-accent) 100%)`,
|
|
1042
1076
|
boxShadow: `
|
|
1043
|
-
|
|
1044
|
-
0 4px
|
|
1045
|
-
|
|
1077
|
+
0 8px 32px -4px var(--widget-primary-glow),
|
|
1078
|
+
0 4px 16px -2px rgba(0, 0, 0, 0.4),
|
|
1079
|
+
inset 0 1px 1px rgba(255, 255, 255, 0.3),
|
|
1080
|
+
inset 0 -1px 1px rgba(0, 0, 0, 0.2)
|
|
1046
1081
|
`
|
|
1047
1082
|
},
|
|
1048
1083
|
children: [
|
|
@@ -1052,47 +1087,83 @@ var PremiumVoiceWidget = ({
|
|
|
1052
1087
|
{
|
|
1053
1088
|
style: {
|
|
1054
1089
|
position: "absolute",
|
|
1055
|
-
inset:
|
|
1090
|
+
inset: 0,
|
|
1056
1091
|
borderRadius: "50%",
|
|
1057
|
-
background:
|
|
1058
|
-
|
|
1092
|
+
background: "linear-gradient(180deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0) 50%, rgba(0,0,0,0.1) 100%)",
|
|
1093
|
+
pointerEvents: "none"
|
|
1059
1094
|
}
|
|
1060
1095
|
}
|
|
1061
1096
|
),
|
|
1062
|
-
/* @__PURE__ */
|
|
1063
|
-
"
|
|
1097
|
+
/* @__PURE__ */ jsx(
|
|
1098
|
+
"div",
|
|
1064
1099
|
{
|
|
1065
|
-
width: 24,
|
|
1066
|
-
height: 24,
|
|
1067
|
-
viewBox: "0 0 24 24",
|
|
1068
|
-
fill: "none",
|
|
1069
|
-
stroke: "white",
|
|
1070
|
-
strokeWidth: 2,
|
|
1071
|
-
strokeLinecap: "round",
|
|
1072
1100
|
style: {
|
|
1073
1101
|
position: "absolute",
|
|
1074
1102
|
top: "50%",
|
|
1075
1103
|
left: "50%",
|
|
1076
1104
|
transform: "translate(-50%, -50%)",
|
|
1077
|
-
zIndex: 1
|
|
1105
|
+
zIndex: 1,
|
|
1106
|
+
display: "flex",
|
|
1107
|
+
alignItems: "center",
|
|
1108
|
+
justifyContent: "center"
|
|
1078
1109
|
},
|
|
1079
|
-
children:
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1110
|
+
children: /* @__PURE__ */ jsxs(
|
|
1111
|
+
"svg",
|
|
1112
|
+
{
|
|
1113
|
+
width: 26,
|
|
1114
|
+
height: 26,
|
|
1115
|
+
viewBox: "0 0 24 24",
|
|
1116
|
+
fill: "none",
|
|
1117
|
+
style: { filter: "drop-shadow(0 1px 2px rgba(0,0,0,0.2))" },
|
|
1118
|
+
children: [
|
|
1119
|
+
/* @__PURE__ */ jsx(
|
|
1120
|
+
"path",
|
|
1121
|
+
{
|
|
1122
|
+
d: "M20 2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h4l4 4 4-4h4c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2z",
|
|
1123
|
+
fill: "white",
|
|
1124
|
+
opacity: "0.15"
|
|
1125
|
+
}
|
|
1126
|
+
),
|
|
1127
|
+
/* @__PURE__ */ jsx(
|
|
1128
|
+
"path",
|
|
1129
|
+
{
|
|
1130
|
+
d: "M12 3a2.5 2.5 0 0 0-2.5 2.5v5a2.5 2.5 0 0 0 5 0v-5A2.5 2.5 0 0 0 12 3z",
|
|
1131
|
+
fill: "white"
|
|
1132
|
+
}
|
|
1133
|
+
),
|
|
1134
|
+
/* @__PURE__ */ jsx(
|
|
1135
|
+
"path",
|
|
1136
|
+
{
|
|
1137
|
+
d: "M16.5 10.5v1a4.5 4.5 0 0 1-9 0v-1",
|
|
1138
|
+
stroke: "white",
|
|
1139
|
+
strokeWidth: "2",
|
|
1140
|
+
strokeLinecap: "round",
|
|
1141
|
+
fill: "none"
|
|
1142
|
+
}
|
|
1143
|
+
),
|
|
1144
|
+
/* @__PURE__ */ jsx(
|
|
1145
|
+
"path",
|
|
1146
|
+
{
|
|
1147
|
+
d: "M12 15.5v2.5M9.5 18h5",
|
|
1148
|
+
stroke: "white",
|
|
1149
|
+
strokeWidth: "2",
|
|
1150
|
+
strokeLinecap: "round"
|
|
1151
|
+
}
|
|
1152
|
+
)
|
|
1153
|
+
]
|
|
1154
|
+
}
|
|
1155
|
+
)
|
|
1085
1156
|
}
|
|
1086
1157
|
),
|
|
1087
1158
|
shouldShowAttentionPulse && /* @__PURE__ */ jsx(
|
|
1088
1159
|
motion.div,
|
|
1089
1160
|
{
|
|
1090
1161
|
initial: { scale: 1, opacity: 1 },
|
|
1091
|
-
animate: { scale: 1.
|
|
1092
|
-
transition: { duration: 1, repeat: 3 },
|
|
1162
|
+
animate: { scale: 1.6, opacity: 0 },
|
|
1163
|
+
transition: { duration: 1.2, repeat: 3 },
|
|
1093
1164
|
style: {
|
|
1094
1165
|
position: "absolute",
|
|
1095
|
-
inset:
|
|
1166
|
+
inset: -2,
|
|
1096
1167
|
borderRadius: "50%",
|
|
1097
1168
|
border: "2px solid var(--widget-primary)",
|
|
1098
1169
|
pointerEvents: "none"
|
|
@@ -1106,19 +1177,22 @@ var PremiumVoiceWidget = ({
|
|
|
1106
1177
|
animate: { scale: 1 },
|
|
1107
1178
|
style: {
|
|
1108
1179
|
position: "absolute",
|
|
1109
|
-
top: -
|
|
1110
|
-
right: -
|
|
1111
|
-
width:
|
|
1112
|
-
height:
|
|
1180
|
+
top: -2,
|
|
1181
|
+
right: -2,
|
|
1182
|
+
width: 18,
|
|
1183
|
+
height: 18,
|
|
1113
1184
|
borderRadius: "50%",
|
|
1114
|
-
background: "
|
|
1115
|
-
border: "2px solid
|
|
1185
|
+
background: "linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%)",
|
|
1186
|
+
border: "2px solid white",
|
|
1116
1187
|
display: "flex",
|
|
1117
1188
|
alignItems: "center",
|
|
1118
1189
|
justifyContent: "center",
|
|
1119
|
-
fontSize:
|
|
1190
|
+
fontSize: 11,
|
|
1191
|
+
fontWeight: 700,
|
|
1192
|
+
color: "white",
|
|
1193
|
+
boxShadow: "0 2px 8px rgba(239, 68, 68, 0.5)"
|
|
1120
1194
|
},
|
|
1121
|
-
children: "
|
|
1195
|
+
children: "!"
|
|
1122
1196
|
}
|
|
1123
1197
|
)
|
|
1124
1198
|
]
|
|
@@ -1182,11 +1256,15 @@ var PremiumVoiceWidget = ({
|
|
|
1182
1256
|
animate: "expanded",
|
|
1183
1257
|
exit: "trigger",
|
|
1184
1258
|
style: {
|
|
1185
|
-
background: "
|
|
1186
|
-
backdropFilter: "blur(
|
|
1187
|
-
WebkitBackdropFilter: "blur(
|
|
1259
|
+
background: theme === "dark" ? "linear-gradient(180deg, rgba(28, 28, 32, 0.95) 0%, rgba(20, 20, 24, 0.98) 100%)" : "linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 248, 250, 0.98) 100%)",
|
|
1260
|
+
backdropFilter: "blur(24px) saturate(200%)",
|
|
1261
|
+
WebkitBackdropFilter: "blur(24px) saturate(200%)",
|
|
1188
1262
|
border: "1px solid var(--widget-glass-border)",
|
|
1189
|
-
boxShadow:
|
|
1263
|
+
boxShadow: `
|
|
1264
|
+
0 24px 80px -12px rgba(0, 0, 0, 0.6),
|
|
1265
|
+
0 0 1px 0 rgba(255, 255, 255, 0.1) inset,
|
|
1266
|
+
0 1px 0 0 rgba(255, 255, 255, 0.05) inset
|
|
1267
|
+
`,
|
|
1190
1268
|
overflow: "hidden",
|
|
1191
1269
|
display: "flex",
|
|
1192
1270
|
flexDirection: "column"
|
|
@@ -1211,26 +1289,50 @@ var PremiumVoiceWidget = ({
|
|
|
1211
1289
|
justifyContent: "space-between",
|
|
1212
1290
|
alignItems: "center",
|
|
1213
1291
|
padding: "20px 24px",
|
|
1214
|
-
borderBottom: "1px solid var(--widget-glass-border)"
|
|
1292
|
+
borderBottom: "1px solid var(--widget-glass-border)",
|
|
1293
|
+
background: theme === "dark" ? "linear-gradient(180deg, rgba(255,255,255,0.02) 0%, transparent 100%)" : "linear-gradient(180deg, rgba(0,0,0,0.01) 0%, transparent 100%)"
|
|
1215
1294
|
},
|
|
1216
1295
|
children: [
|
|
1217
|
-
/* @__PURE__ */
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1296
|
+
/* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: 12 }, children: [
|
|
1297
|
+
/* @__PURE__ */ jsx(
|
|
1298
|
+
"div",
|
|
1299
|
+
{
|
|
1300
|
+
style: {
|
|
1301
|
+
width: 36,
|
|
1302
|
+
height: 36,
|
|
1303
|
+
borderRadius: 10,
|
|
1304
|
+
background: "linear-gradient(145deg, var(--widget-primary) 0%, var(--widget-accent) 100%)",
|
|
1305
|
+
display: "flex",
|
|
1306
|
+
alignItems: "center",
|
|
1307
|
+
justifyContent: "center",
|
|
1308
|
+
boxShadow: "0 2px 8px -2px var(--widget-primary-glow)"
|
|
1309
|
+
},
|
|
1310
|
+
children: /* @__PURE__ */ jsxs("svg", { width: 18, height: 18, viewBox: "0 0 24 24", fill: "white", children: [
|
|
1311
|
+
/* @__PURE__ */ jsx("path", { d: "M12 3a2.5 2.5 0 0 0-2.5 2.5v5a2.5 2.5 0 0 0 5 0v-5A2.5 2.5 0 0 0 12 3z" }),
|
|
1312
|
+
/* @__PURE__ */ jsx("path", { d: "M16.5 10.5v1a4.5 4.5 0 0 1-9 0v-1", stroke: "white", strokeWidth: "2", strokeLinecap: "round", fill: "none" }),
|
|
1313
|
+
/* @__PURE__ */ jsx("path", { d: "M12 15.5v2.5M9.5 18h5", stroke: "white", strokeWidth: "2", strokeLinecap: "round" })
|
|
1314
|
+
] })
|
|
1315
|
+
}
|
|
1316
|
+
),
|
|
1317
|
+
/* @__PURE__ */ jsx(
|
|
1318
|
+
"h2",
|
|
1319
|
+
{
|
|
1320
|
+
id: "widget-title",
|
|
1321
|
+
style: {
|
|
1322
|
+
fontSize: 17,
|
|
1323
|
+
fontWeight: 700,
|
|
1324
|
+
color: "var(--widget-text-primary)",
|
|
1325
|
+
margin: 0,
|
|
1326
|
+
letterSpacing: "-0.01em"
|
|
1327
|
+
},
|
|
1328
|
+
children: "Share Feedback"
|
|
1329
|
+
}
|
|
1330
|
+
)
|
|
1331
|
+
] }),
|
|
1230
1332
|
/* @__PURE__ */ jsx(
|
|
1231
1333
|
motion.button,
|
|
1232
1334
|
{
|
|
1233
|
-
whileHover: { scale: 1.1,
|
|
1335
|
+
whileHover: { scale: 1.1, backgroundColor: "var(--widget-glass-border)" },
|
|
1234
1336
|
whileTap: { scale: 0.9 },
|
|
1235
1337
|
onClick: handleClose,
|
|
1236
1338
|
"aria-label": "Close widget",
|
|
@@ -1244,17 +1346,19 @@ var PremiumVoiceWidget = ({
|
|
|
1244
1346
|
cursor: "pointer",
|
|
1245
1347
|
display: "flex",
|
|
1246
1348
|
alignItems: "center",
|
|
1247
|
-
justifyContent: "center"
|
|
1349
|
+
justifyContent: "center",
|
|
1350
|
+
transition: "background 0.15s ease"
|
|
1248
1351
|
},
|
|
1249
1352
|
children: /* @__PURE__ */ jsx(
|
|
1250
1353
|
"svg",
|
|
1251
1354
|
{
|
|
1252
|
-
width:
|
|
1253
|
-
height:
|
|
1355
|
+
width: 18,
|
|
1356
|
+
height: 18,
|
|
1254
1357
|
viewBox: "0 0 24 24",
|
|
1255
1358
|
fill: "none",
|
|
1256
1359
|
stroke: "currentColor",
|
|
1257
|
-
strokeWidth: 2,
|
|
1360
|
+
strokeWidth: 2.5,
|
|
1361
|
+
strokeLinecap: "round",
|
|
1258
1362
|
children: /* @__PURE__ */ jsx("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
1259
1363
|
}
|
|
1260
1364
|
)
|
|
@@ -1268,41 +1372,44 @@ var PremiumVoiceWidget = ({
|
|
|
1268
1372
|
{
|
|
1269
1373
|
style: {
|
|
1270
1374
|
display: "flex",
|
|
1271
|
-
|
|
1375
|
+
padding: "8px 12px",
|
|
1376
|
+
gap: 4,
|
|
1377
|
+
background: "var(--widget-glass-bg)",
|
|
1378
|
+
margin: "0 16px",
|
|
1379
|
+
marginTop: 16,
|
|
1380
|
+
borderRadius: 12,
|
|
1381
|
+
border: "1px solid var(--widget-glass-border)"
|
|
1272
1382
|
},
|
|
1273
1383
|
children: ["voice", "text"].map((tab) => /* @__PURE__ */ jsxs(
|
|
1274
1384
|
motion.button,
|
|
1275
1385
|
{
|
|
1276
1386
|
onClick: () => setActiveTab(tab),
|
|
1277
|
-
whileHover: { backgroundColor: "rgba(255,255,255,0.05)" },
|
|
1278
1387
|
style: {
|
|
1279
1388
|
flex: 1,
|
|
1280
|
-
padding: "
|
|
1389
|
+
padding: "10px 0",
|
|
1281
1390
|
border: "none",
|
|
1282
|
-
background: "transparent",
|
|
1283
|
-
fontSize:
|
|
1284
|
-
fontWeight:
|
|
1285
|
-
color: activeTab === tab ? "
|
|
1391
|
+
background: activeTab === tab ? "linear-gradient(145deg, var(--widget-primary) 0%, var(--widget-accent) 100%)" : "transparent",
|
|
1392
|
+
fontSize: 13,
|
|
1393
|
+
fontWeight: 600,
|
|
1394
|
+
color: activeTab === tab ? "white" : "var(--widget-text-secondary)",
|
|
1286
1395
|
cursor: "pointer",
|
|
1287
|
-
position: "relative"
|
|
1396
|
+
position: "relative",
|
|
1397
|
+
borderRadius: 8,
|
|
1398
|
+
transition: "all 0.2s ease",
|
|
1399
|
+
display: "flex",
|
|
1400
|
+
alignItems: "center",
|
|
1401
|
+
justifyContent: "center",
|
|
1402
|
+
gap: 6,
|
|
1403
|
+
boxShadow: activeTab === tab ? "0 2px 8px -2px var(--widget-primary-glow)" : "none"
|
|
1288
1404
|
},
|
|
1405
|
+
whileHover: { scale: activeTab === tab ? 1 : 1.02 },
|
|
1406
|
+
whileTap: { scale: 0.98 },
|
|
1289
1407
|
children: [
|
|
1290
|
-
tab === "voice" ? "
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
style: {
|
|
1296
|
-
position: "absolute",
|
|
1297
|
-
bottom: -1,
|
|
1298
|
-
left: 0,
|
|
1299
|
-
right: 0,
|
|
1300
|
-
height: 2,
|
|
1301
|
-
background: "var(--widget-primary)"
|
|
1302
|
-
},
|
|
1303
|
-
transition: springPresets.smooth
|
|
1304
|
-
}
|
|
1305
|
-
)
|
|
1408
|
+
tab === "voice" ? /* @__PURE__ */ jsxs("svg", { width: 14, height: 14, viewBox: "0 0 24 24", fill: "currentColor", children: [
|
|
1409
|
+
/* @__PURE__ */ jsx("path", { d: "M12 3a2.5 2.5 0 0 0-2.5 2.5v5a2.5 2.5 0 0 0 5 0v-5A2.5 2.5 0 0 0 12 3z" }),
|
|
1410
|
+
/* @__PURE__ */ jsx("path", { d: "M16.5 10.5v1a4.5 4.5 0 0 1-9 0v-1", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", fill: "none" })
|
|
1411
|
+
] }) : /* @__PURE__ */ jsx("svg", { width: 14, height: 14, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", children: /* @__PURE__ */ jsx("path", { d: "M4 6h16M4 12h16M4 18h10" }) }),
|
|
1412
|
+
tab === "voice" ? "Voice" : "Text"
|
|
1306
1413
|
]
|
|
1307
1414
|
},
|
|
1308
1415
|
tab
|
|
@@ -1319,107 +1426,158 @@ var PremiumVoiceWidget = ({
|
|
|
1319
1426
|
}
|
|
1320
1427
|
) }),
|
|
1321
1428
|
activeTab === "voice" && /* @__PURE__ */ jsxs("div", { style: { textAlign: "center" }, children: [
|
|
1322
|
-
/* @__PURE__ */
|
|
1323
|
-
|
|
1324
|
-
RecordingTimer,
|
|
1325
|
-
{
|
|
1326
|
-
seconds: recordingSeconds,
|
|
1327
|
-
maxDuration: maxRecordingDuration
|
|
1328
|
-
}
|
|
1329
|
-
),
|
|
1330
|
-
!isRecording && recordingSeconds === 0 && /* @__PURE__ */ jsx(
|
|
1331
|
-
"p",
|
|
1429
|
+
/* @__PURE__ */ jsxs(
|
|
1430
|
+
"div",
|
|
1332
1431
|
{
|
|
1333
1432
|
style: {
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1433
|
+
background: "var(--widget-glass-bg)",
|
|
1434
|
+
borderRadius: 16,
|
|
1435
|
+
padding: "24px 16px",
|
|
1436
|
+
border: "1px solid var(--widget-glass-border)",
|
|
1437
|
+
marginBottom: 16
|
|
1337
1438
|
},
|
|
1338
|
-
children:
|
|
1439
|
+
children: [
|
|
1440
|
+
/* @__PURE__ */ jsx(AmbientOrb, { audioLevel, isRecording }),
|
|
1441
|
+
isRecording && /* @__PURE__ */ jsx(
|
|
1442
|
+
RecordingTimer,
|
|
1443
|
+
{
|
|
1444
|
+
seconds: recordingSeconds,
|
|
1445
|
+
maxDuration: maxRecordingDuration
|
|
1446
|
+
}
|
|
1447
|
+
),
|
|
1448
|
+
!isRecording && recordingSeconds === 0 && !transcription && /* @__PURE__ */ jsx(
|
|
1449
|
+
"p",
|
|
1450
|
+
{
|
|
1451
|
+
style: {
|
|
1452
|
+
color: "var(--widget-text-muted)",
|
|
1453
|
+
fontSize: 13,
|
|
1454
|
+
marginTop: 12,
|
|
1455
|
+
marginBottom: 0
|
|
1456
|
+
},
|
|
1457
|
+
children: "Press and hold to record your feedback"
|
|
1458
|
+
}
|
|
1459
|
+
)
|
|
1460
|
+
]
|
|
1339
1461
|
}
|
|
1340
1462
|
),
|
|
1341
|
-
(isRecording || transcription) && /* @__PURE__ */ jsx("div", { style: {
|
|
1463
|
+
(isRecording || transcription) && /* @__PURE__ */ jsx("div", { style: { marginBottom: 16 }, children: /* @__PURE__ */ jsx(
|
|
1342
1464
|
TranscriptionDisplay,
|
|
1343
1465
|
{
|
|
1344
1466
|
text: transcription,
|
|
1345
1467
|
isLive: isRecording
|
|
1346
1468
|
}
|
|
1347
1469
|
) }),
|
|
1348
|
-
/* @__PURE__ */ jsx(
|
|
1470
|
+
/* @__PURE__ */ jsx(
|
|
1349
1471
|
MagneticButton,
|
|
1350
1472
|
{
|
|
1351
|
-
|
|
1352
|
-
|
|
1473
|
+
onPressStart: handleStartRecording,
|
|
1474
|
+
onPressEnd: handleStopRecording,
|
|
1475
|
+
variant: isRecording ? "recording" : "primary",
|
|
1353
1476
|
children: isRecording ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1354
1477
|
/* @__PURE__ */ jsx(
|
|
1355
|
-
|
|
1478
|
+
motion.div,
|
|
1356
1479
|
{
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1480
|
+
animate: { scale: [1, 1.2, 1] },
|
|
1481
|
+
transition: { duration: 1, repeat: Infinity },
|
|
1482
|
+
style: {
|
|
1483
|
+
width: 8,
|
|
1484
|
+
height: 8,
|
|
1485
|
+
borderRadius: "50%",
|
|
1486
|
+
background: "white"
|
|
1487
|
+
}
|
|
1362
1488
|
}
|
|
1363
1489
|
),
|
|
1364
|
-
"
|
|
1365
|
-
] }) :
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
{
|
|
1373
|
-
value: textContent,
|
|
1374
|
-
onChange: (e) => setTextContent(e.target.value),
|
|
1375
|
-
placeholder: "Tell us what you think...",
|
|
1376
|
-
style: {
|
|
1377
|
-
width: "100%",
|
|
1378
|
-
minHeight: 150,
|
|
1379
|
-
padding: 16,
|
|
1380
|
-
fontSize: 14,
|
|
1381
|
-
lineHeight: 1.6,
|
|
1382
|
-
color: "var(--widget-text-primary)",
|
|
1383
|
-
background: "var(--widget-glass-bg)",
|
|
1384
|
-
border: "1px solid var(--widget-glass-border)",
|
|
1385
|
-
borderRadius: 12,
|
|
1386
|
-
resize: "vertical",
|
|
1387
|
-
fontFamily: "inherit"
|
|
1388
|
-
}
|
|
1389
|
-
}
|
|
1390
|
-
),
|
|
1391
|
-
/* @__PURE__ */ jsxs(
|
|
1392
|
-
"div",
|
|
1393
|
-
{
|
|
1394
|
-
style: {
|
|
1395
|
-
display: "flex",
|
|
1396
|
-
justifyContent: "flex-end",
|
|
1397
|
-
marginTop: 8,
|
|
1398
|
-
fontSize: 12,
|
|
1399
|
-
color: "var(--widget-text-muted)"
|
|
1400
|
-
},
|
|
1401
|
-
children: [
|
|
1402
|
-
textContent.length,
|
|
1403
|
-
" / 5000"
|
|
1404
|
-
]
|
|
1490
|
+
"Recording... Release to stop"
|
|
1491
|
+
] }) : transcription ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1492
|
+
/* @__PURE__ */ jsx("svg", { width: 16, height: 16, viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M12 3a2.5 2.5 0 0 0-2.5 2.5v5a2.5 2.5 0 0 0 5 0v-5A2.5 2.5 0 0 0 12 3z" }) }),
|
|
1493
|
+
"Hold to record more"
|
|
1494
|
+
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1495
|
+
/* @__PURE__ */ jsx("svg", { width: 16, height: 16, viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M12 3a2.5 2.5 0 0 0-2.5 2.5v5a2.5 2.5 0 0 0 5 0v-5A2.5 2.5 0 0 0 12 3z" }) }),
|
|
1496
|
+
"Hold to Record"
|
|
1497
|
+
] })
|
|
1405
1498
|
}
|
|
1406
1499
|
)
|
|
1407
|
-
] })
|
|
1500
|
+
] }),
|
|
1501
|
+
activeTab === "text" && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
|
|
1502
|
+
"div",
|
|
1503
|
+
{
|
|
1504
|
+
style: {
|
|
1505
|
+
position: "relative",
|
|
1506
|
+
background: "var(--widget-glass-bg)",
|
|
1507
|
+
border: "1px solid var(--widget-glass-border)",
|
|
1508
|
+
borderRadius: 14,
|
|
1509
|
+
overflow: "hidden"
|
|
1510
|
+
},
|
|
1511
|
+
children: [
|
|
1512
|
+
/* @__PURE__ */ jsx(
|
|
1513
|
+
"textarea",
|
|
1514
|
+
{
|
|
1515
|
+
value: textContent,
|
|
1516
|
+
onChange: (e) => setTextContent(e.target.value),
|
|
1517
|
+
placeholder: "Share your thoughts, ideas, or feedback...",
|
|
1518
|
+
style: {
|
|
1519
|
+
width: "100%",
|
|
1520
|
+
minHeight: 140,
|
|
1521
|
+
padding: 16,
|
|
1522
|
+
fontSize: 14,
|
|
1523
|
+
lineHeight: 1.7,
|
|
1524
|
+
color: "var(--widget-text-primary)",
|
|
1525
|
+
background: "transparent",
|
|
1526
|
+
border: "none",
|
|
1527
|
+
resize: "none",
|
|
1528
|
+
fontFamily: "inherit",
|
|
1529
|
+
outline: "none"
|
|
1530
|
+
}
|
|
1531
|
+
}
|
|
1532
|
+
),
|
|
1533
|
+
/* @__PURE__ */ jsx(
|
|
1534
|
+
"div",
|
|
1535
|
+
{
|
|
1536
|
+
style: {
|
|
1537
|
+
display: "flex",
|
|
1538
|
+
justifyContent: "flex-end",
|
|
1539
|
+
padding: "8px 12px",
|
|
1540
|
+
borderTop: "1px solid var(--widget-glass-border)",
|
|
1541
|
+
background: theme === "dark" ? "rgba(0,0,0,0.2)" : "rgba(0,0,0,0.02)"
|
|
1542
|
+
},
|
|
1543
|
+
children: /* @__PURE__ */ jsxs(
|
|
1544
|
+
"span",
|
|
1545
|
+
{
|
|
1546
|
+
style: {
|
|
1547
|
+
fontSize: 11,
|
|
1548
|
+
fontWeight: 500,
|
|
1549
|
+
color: textContent.length > 4500 ? "var(--widget-recording)" : "var(--widget-text-muted)"
|
|
1550
|
+
},
|
|
1551
|
+
children: [
|
|
1552
|
+
textContent.length.toLocaleString(),
|
|
1553
|
+
" / 5,000"
|
|
1554
|
+
]
|
|
1555
|
+
}
|
|
1556
|
+
)
|
|
1557
|
+
}
|
|
1558
|
+
)
|
|
1559
|
+
]
|
|
1560
|
+
}
|
|
1561
|
+
) })
|
|
1408
1562
|
] }),
|
|
1409
1563
|
/* @__PURE__ */ jsx(
|
|
1410
1564
|
"div",
|
|
1411
1565
|
{
|
|
1412
1566
|
style: {
|
|
1413
|
-
padding: "16px 24px",
|
|
1414
|
-
borderTop: "1px solid var(--widget-glass-border)"
|
|
1567
|
+
padding: "16px 24px 20px",
|
|
1568
|
+
borderTop: "1px solid var(--widget-glass-border)",
|
|
1569
|
+
background: theme === "dark" ? "linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.2) 100%)" : "linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.02) 100%)"
|
|
1415
1570
|
},
|
|
1416
|
-
children: /* @__PURE__ */
|
|
1571
|
+
children: /* @__PURE__ */ jsxs(
|
|
1417
1572
|
MagneticButton,
|
|
1418
1573
|
{
|
|
1419
1574
|
onClick: handleSubmit,
|
|
1420
1575
|
disabled: !selectedCategory || activeTab === "voice" && !transcription || activeTab === "text" && !textContent.trim(),
|
|
1421
1576
|
loading: isSubmitting,
|
|
1422
|
-
children:
|
|
1577
|
+
children: [
|
|
1578
|
+
/* @__PURE__ */ jsx("svg", { width: 16, height: 16, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", children: /* @__PURE__ */ jsx("path", { d: "M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z" }) }),
|
|
1579
|
+
"Submit Feedback"
|
|
1580
|
+
]
|
|
1423
1581
|
}
|
|
1424
1582
|
)
|
|
1425
1583
|
}
|