@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.js
CHANGED
|
@@ -219,55 +219,56 @@ var contentVariants = {
|
|
|
219
219
|
transition: { duration: 0.2 }
|
|
220
220
|
}
|
|
221
221
|
};
|
|
222
|
-
var categoryVariants = {
|
|
223
|
-
hidden: { opacity: 0, y: 20, scale: 0.9 },
|
|
224
|
-
visible: (i) => ({
|
|
225
|
-
opacity: 1,
|
|
226
|
-
y: 0,
|
|
227
|
-
scale: 1,
|
|
228
|
-
transition: {
|
|
229
|
-
delay: i * 0.05,
|
|
230
|
-
...springPresets.smooth
|
|
231
|
-
}
|
|
232
|
-
}),
|
|
233
|
-
hover: {
|
|
234
|
-
scale: 1.05,
|
|
235
|
-
y: -2,
|
|
236
|
-
transition: springPresets.bouncy
|
|
237
|
-
},
|
|
238
|
-
tap: {
|
|
239
|
-
scale: 0.95
|
|
240
|
-
},
|
|
241
|
-
selected: {
|
|
242
|
-
scale: 1,
|
|
243
|
-
borderColor: "var(--widget-primary)"
|
|
244
|
-
}
|
|
245
|
-
};
|
|
246
222
|
var BreathingRing = ({ isActive }) => {
|
|
247
223
|
const { reducedMotion } = useWidget();
|
|
248
224
|
if (reducedMotion) return null;
|
|
249
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
225
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
226
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
227
|
+
import_framer_motion.motion.div,
|
|
228
|
+
{
|
|
229
|
+
animate: {
|
|
230
|
+
scale: isActive ? [1, 1.3, 1] : 1,
|
|
231
|
+
opacity: isActive ? [0.2, 0.4, 0.2] : 0.2
|
|
232
|
+
},
|
|
233
|
+
transition: {
|
|
234
|
+
duration: 2.5,
|
|
235
|
+
repeat: Infinity,
|
|
236
|
+
ease: "easeInOut"
|
|
237
|
+
},
|
|
238
|
+
style: {
|
|
239
|
+
position: "absolute",
|
|
240
|
+
inset: -16,
|
|
241
|
+
borderRadius: "50%",
|
|
242
|
+
background: "radial-gradient(circle, var(--widget-primary) 0%, transparent 70%)",
|
|
243
|
+
pointerEvents: "none",
|
|
244
|
+
filter: "blur(8px)"
|
|
245
|
+
}
|
|
268
246
|
}
|
|
269
|
-
|
|
270
|
-
|
|
247
|
+
),
|
|
248
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
249
|
+
import_framer_motion.motion.div,
|
|
250
|
+
{
|
|
251
|
+
className: "fiq-breathing-ring",
|
|
252
|
+
animate: {
|
|
253
|
+
scale: isActive ? [1, 1.08, 1] : 1,
|
|
254
|
+
opacity: isActive ? [0.6, 1, 0.6] : 0.6
|
|
255
|
+
},
|
|
256
|
+
transition: {
|
|
257
|
+
duration: 2,
|
|
258
|
+
repeat: Infinity,
|
|
259
|
+
ease: "easeInOut"
|
|
260
|
+
},
|
|
261
|
+
style: {
|
|
262
|
+
position: "absolute",
|
|
263
|
+
inset: -4,
|
|
264
|
+
borderRadius: "50%",
|
|
265
|
+
border: "2px solid var(--widget-primary)",
|
|
266
|
+
pointerEvents: "none",
|
|
267
|
+
opacity: 0.5
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
)
|
|
271
|
+
] });
|
|
271
272
|
};
|
|
272
273
|
var AmbientOrb = ({ audioLevel, isRecording }) => {
|
|
273
274
|
const { reducedMotion } = useWidget();
|
|
@@ -518,20 +519,6 @@ var TranscriptionDisplay = ({ text, isLive }) => {
|
|
|
518
519
|
}
|
|
519
520
|
);
|
|
520
521
|
};
|
|
521
|
-
var CategoryIcon = ({ icon, selected }) => {
|
|
522
|
-
const color = selected ? "white" : "var(--widget-primary)";
|
|
523
|
-
const size = 20;
|
|
524
|
-
const icons = {
|
|
525
|
-
bug: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
526
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M8 2l1.88 1.88M14.12 3.88L16 2M9 7.13v-1a3.003 3.003 0 116 0v1" }),
|
|
527
|
-
/* @__PURE__ */ (0, import_jsx_runtime.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" }),
|
|
528
|
-
/* @__PURE__ */ (0, import_jsx_runtime.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" })
|
|
529
|
-
] }),
|
|
530
|
-
sparkles: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ (0, import_jsx_runtime.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" }) }),
|
|
531
|
-
message: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2v10z" }) })
|
|
532
|
-
};
|
|
533
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: icons[icon] || icons.message });
|
|
534
|
-
};
|
|
535
522
|
var ListeningDots = () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { display: "flex", gap: 4 }, children: [0, 1, 2].map((i) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
536
523
|
import_framer_motion.motion.span,
|
|
537
524
|
{
|
|
@@ -560,10 +547,10 @@ var CategorySelector = ({ categories, selected, onSelect }) => {
|
|
|
560
547
|
{
|
|
561
548
|
style: {
|
|
562
549
|
display: "block",
|
|
563
|
-
fontSize:
|
|
550
|
+
fontSize: 12,
|
|
564
551
|
fontWeight: 600,
|
|
565
|
-
color: "var(--widget-text-
|
|
566
|
-
marginBottom:
|
|
552
|
+
color: "var(--widget-text-muted)",
|
|
553
|
+
marginBottom: 12,
|
|
567
554
|
textTransform: "uppercase",
|
|
568
555
|
letterSpacing: "0.05em"
|
|
569
556
|
},
|
|
@@ -574,49 +561,49 @@ var CategorySelector = ({ categories, selected, onSelect }) => {
|
|
|
574
561
|
"div",
|
|
575
562
|
{
|
|
576
563
|
style: {
|
|
577
|
-
display: "
|
|
578
|
-
|
|
579
|
-
gap:
|
|
564
|
+
display: "flex",
|
|
565
|
+
flexWrap: "wrap",
|
|
566
|
+
gap: 8
|
|
580
567
|
},
|
|
581
|
-
children: categories.map((category
|
|
568
|
+
children: categories.map((category) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
582
569
|
import_framer_motion.motion.button,
|
|
583
570
|
{
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
initial: "hidden",
|
|
587
|
-
animate: selected === category.id ? "selected" : "visible",
|
|
588
|
-
whileHover: "hover",
|
|
589
|
-
whileTap: "tap",
|
|
571
|
+
whileHover: { scale: 1.04, y: -1 },
|
|
572
|
+
whileTap: { scale: 0.96 },
|
|
590
573
|
onClick: () => onSelect(category.id),
|
|
591
574
|
style: {
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
padding: "12px 8px",
|
|
597
|
-
background: selected === category.id ? "var(--widget-primary)" : "var(--widget-glass-bg)",
|
|
598
|
-
border: `2px solid ${selected === category.id ? "var(--widget-primary)" : "var(--widget-glass-border)"}`,
|
|
599
|
-
borderRadius: 12,
|
|
575
|
+
padding: "10px 18px",
|
|
576
|
+
background: selected === category.id ? "linear-gradient(145deg, var(--widget-primary) 0%, var(--widget-accent) 100%)" : "var(--widget-glass-bg)",
|
|
577
|
+
border: `1.5px solid ${selected === category.id ? "transparent" : "var(--widget-glass-border)"}`,
|
|
578
|
+
borderRadius: 24,
|
|
600
579
|
cursor: "pointer",
|
|
601
|
-
transition: "
|
|
580
|
+
transition: "all 0.2s ease",
|
|
581
|
+
boxShadow: selected === category.id ? "0 4px 12px -2px var(--widget-primary-glow)" : "0 2px 4px rgba(0,0,0,0.1)",
|
|
582
|
+
position: "relative",
|
|
583
|
+
overflow: "hidden"
|
|
602
584
|
},
|
|
603
585
|
children: [
|
|
604
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
605
|
-
|
|
586
|
+
selected === category.id && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
587
|
+
"div",
|
|
606
588
|
{
|
|
607
|
-
style: {
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
589
|
+
style: {
|
|
590
|
+
position: "absolute",
|
|
591
|
+
inset: 0,
|
|
592
|
+
background: "linear-gradient(180deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 50%)",
|
|
593
|
+
borderRadius: "inherit",
|
|
594
|
+
pointerEvents: "none"
|
|
595
|
+
}
|
|
611
596
|
}
|
|
612
597
|
),
|
|
613
598
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
614
599
|
"span",
|
|
615
600
|
{
|
|
616
601
|
style: {
|
|
617
|
-
fontSize:
|
|
618
|
-
fontWeight:
|
|
619
|
-
color: selected === category.id ? "white" : "var(--widget-text-primary)"
|
|
602
|
+
fontSize: 13,
|
|
603
|
+
fontWeight: 600,
|
|
604
|
+
color: selected === category.id ? "white" : "var(--widget-text-primary)",
|
|
605
|
+
position: "relative",
|
|
606
|
+
zIndex: 1
|
|
620
607
|
},
|
|
621
608
|
children: category.label
|
|
622
609
|
}
|
|
@@ -776,7 +763,7 @@ var SuccessCelebration = ({ onComplete }) => {
|
|
|
776
763
|
}
|
|
777
764
|
);
|
|
778
765
|
};
|
|
779
|
-
var MagneticButton = ({ children, onClick, variant = "primary", disabled, loading }) => {
|
|
766
|
+
var MagneticButton = ({ children, onClick, onPressStart, onPressEnd, variant = "primary", disabled, loading }) => {
|
|
780
767
|
const buttonRef = (0, import_react.useRef)(null);
|
|
781
768
|
const [magnetOffset, setMagnetOffset] = (0, import_react.useState)({ x: 0, y: 0 });
|
|
782
769
|
const handleMouseMove = (e) => {
|
|
@@ -785,8 +772,8 @@ var MagneticButton = ({ children, onClick, variant = "primary", disabled, loadin
|
|
|
785
772
|
const centerX = rect.left + rect.width / 2;
|
|
786
773
|
const centerY = rect.top + rect.height / 2;
|
|
787
774
|
setMagnetOffset({
|
|
788
|
-
x: (e.clientX - centerX) * 0.
|
|
789
|
-
y: (e.clientY - centerY) * 0.
|
|
775
|
+
x: (e.clientX - centerX) * 0.08,
|
|
776
|
+
y: (e.clientY - centerY) * 0.08
|
|
790
777
|
});
|
|
791
778
|
};
|
|
792
779
|
const handleMouseLeave = () => {
|
|
@@ -794,71 +781,120 @@ var MagneticButton = ({ children, onClick, variant = "primary", disabled, loadin
|
|
|
794
781
|
};
|
|
795
782
|
const baseStyles = {
|
|
796
783
|
width: "100%",
|
|
797
|
-
padding: "
|
|
784
|
+
padding: "16px 28px",
|
|
798
785
|
fontSize: 15,
|
|
799
786
|
fontWeight: 600,
|
|
800
|
-
borderRadius:
|
|
787
|
+
borderRadius: 14,
|
|
801
788
|
border: "none",
|
|
802
789
|
cursor: disabled ? "not-allowed" : "pointer",
|
|
803
|
-
transition: "
|
|
790
|
+
transition: "all 0.2s ease",
|
|
804
791
|
display: "flex",
|
|
805
792
|
alignItems: "center",
|
|
806
793
|
justifyContent: "center",
|
|
807
|
-
gap:
|
|
794
|
+
gap: 10,
|
|
795
|
+
letterSpacing: "0.01em",
|
|
796
|
+
position: "relative",
|
|
797
|
+
overflow: "hidden"
|
|
808
798
|
};
|
|
809
799
|
const variantStyles = {
|
|
810
800
|
primary: {
|
|
811
|
-
background: "var(--widget-primary)",
|
|
812
|
-
color: "white"
|
|
801
|
+
background: "linear-gradient(145deg, var(--widget-primary) 0%, var(--widget-accent) 100%)",
|
|
802
|
+
color: "white",
|
|
803
|
+
boxShadow: `
|
|
804
|
+
0 4px 16px -2px var(--widget-primary-glow),
|
|
805
|
+
0 2px 8px -2px rgba(0, 0, 0, 0.3),
|
|
806
|
+
inset 0 1px 1px rgba(255, 255, 255, 0.2)
|
|
807
|
+
`
|
|
813
808
|
},
|
|
814
809
|
secondary: {
|
|
815
810
|
background: "var(--widget-glass-bg)",
|
|
816
811
|
color: "var(--widget-text-primary)",
|
|
817
|
-
border: "1px solid var(--widget-glass-border)"
|
|
812
|
+
border: "1px solid var(--widget-glass-border)",
|
|
813
|
+
boxShadow: "0 2px 8px rgba(0, 0, 0, 0.15)"
|
|
818
814
|
},
|
|
819
815
|
ghost: {
|
|
820
816
|
background: "transparent",
|
|
821
817
|
color: "var(--widget-text-secondary)"
|
|
818
|
+
},
|
|
819
|
+
recording: {
|
|
820
|
+
background: "linear-gradient(145deg, #ef4444 0%, #dc2626 100%)",
|
|
821
|
+
color: "white",
|
|
822
|
+
boxShadow: `
|
|
823
|
+
0 4px 20px -2px var(--widget-recording-glow),
|
|
824
|
+
0 0 40px -5px var(--widget-recording-glow),
|
|
825
|
+
inset 0 1px 1px rgba(255, 255, 255, 0.2)
|
|
826
|
+
`
|
|
822
827
|
}
|
|
823
828
|
};
|
|
824
|
-
|
|
829
|
+
const handlePressStart = () => {
|
|
830
|
+
if (disabled || loading) return;
|
|
831
|
+
onPressStart?.();
|
|
832
|
+
};
|
|
833
|
+
const handlePressEnd = () => {
|
|
834
|
+
if (disabled || loading) return;
|
|
835
|
+
onPressEnd?.();
|
|
836
|
+
};
|
|
837
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
825
838
|
import_framer_motion.motion.button,
|
|
826
839
|
{
|
|
827
840
|
ref: buttonRef,
|
|
828
841
|
onClick,
|
|
829
842
|
disabled: disabled || loading,
|
|
830
843
|
onMouseMove: handleMouseMove,
|
|
831
|
-
onMouseLeave:
|
|
844
|
+
onMouseLeave: () => {
|
|
845
|
+
handleMouseLeave();
|
|
846
|
+
if (onPressEnd) handlePressEnd();
|
|
847
|
+
},
|
|
848
|
+
onMouseDown: onPressStart ? handlePressStart : void 0,
|
|
849
|
+
onMouseUp: onPressEnd ? handlePressEnd : void 0,
|
|
850
|
+
onTouchStart: onPressStart ? handlePressStart : void 0,
|
|
851
|
+
onTouchEnd: onPressEnd ? handlePressEnd : void 0,
|
|
832
852
|
animate: {
|
|
833
853
|
x: magnetOffset.x,
|
|
834
854
|
y: magnetOffset.y,
|
|
835
855
|
opacity: disabled ? 0.5 : 1
|
|
836
856
|
},
|
|
837
|
-
whileHover: { scale: disabled ? 1 : 1.02 },
|
|
857
|
+
whileHover: { scale: disabled ? 1 : 1.02, y: -1 },
|
|
838
858
|
whileTap: { scale: disabled ? 1 : 0.97 },
|
|
839
859
|
transition: springPresets.snappy,
|
|
840
860
|
style: { ...baseStyles, ...variantStyles[variant] },
|
|
841
|
-
children:
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
861
|
+
children: [
|
|
862
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
863
|
+
"div",
|
|
864
|
+
{
|
|
865
|
+
style: {
|
|
866
|
+
position: "absolute",
|
|
867
|
+
inset: 0,
|
|
868
|
+
background: "linear-gradient(180deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0) 50%)",
|
|
869
|
+
borderRadius: "inherit",
|
|
870
|
+
pointerEvents: "none"
|
|
871
|
+
}
|
|
852
872
|
}
|
|
853
|
-
|
|
854
|
-
|
|
873
|
+
),
|
|
874
|
+
loading ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
875
|
+
import_framer_motion.motion.div,
|
|
876
|
+
{
|
|
877
|
+
animate: { rotate: 360 },
|
|
878
|
+
transition: { duration: 1, repeat: Infinity, ease: "linear" },
|
|
879
|
+
style: {
|
|
880
|
+
width: 20,
|
|
881
|
+
height: 20,
|
|
882
|
+
border: "2.5px solid rgba(255,255,255,0.3)",
|
|
883
|
+
borderTopColor: "white",
|
|
884
|
+
borderRadius: "50%"
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: { position: "relative", zIndex: 1, display: "flex", alignItems: "center", gap: 10 }, children })
|
|
888
|
+
]
|
|
855
889
|
}
|
|
856
890
|
);
|
|
857
891
|
};
|
|
858
892
|
var DEFAULT_CATEGORIES = [
|
|
859
|
-
{ id: "bug", label: "Bug", icon: "
|
|
860
|
-
{ id: "feature", label: "Feature", icon: "
|
|
861
|
-
{ id: "
|
|
893
|
+
{ id: "bug", label: "Bug", icon: "" },
|
|
894
|
+
{ id: "feature", label: "Feature", icon: "" },
|
|
895
|
+
{ id: "improvement", label: "Improve", icon: "" },
|
|
896
|
+
{ id: "praise", label: "Praise", icon: "" },
|
|
897
|
+
{ id: "other", label: "Other", icon: "" }
|
|
862
898
|
];
|
|
863
899
|
var PremiumVoiceWidget = ({
|
|
864
900
|
position = "bottom-right",
|
|
@@ -1048,19 +1084,18 @@ var PremiumVoiceWidget = ({
|
|
|
1048
1084
|
"aria-label": "Open feedback widget",
|
|
1049
1085
|
"aria-expanded": isExpanded,
|
|
1050
1086
|
style: {
|
|
1051
|
-
width:
|
|
1052
|
-
height:
|
|
1087
|
+
width: 60,
|
|
1088
|
+
height: 60,
|
|
1053
1089
|
borderRadius: "50%",
|
|
1054
1090
|
border: "none",
|
|
1055
1091
|
cursor: "pointer",
|
|
1056
1092
|
position: "relative",
|
|
1057
|
-
background:
|
|
1058
|
-
backdropFilter: "blur(20px) saturate(180%)",
|
|
1059
|
-
WebkitBackdropFilter: "blur(20px) saturate(180%)",
|
|
1093
|
+
background: `linear-gradient(145deg, var(--widget-primary) 0%, var(--widget-accent) 100%)`,
|
|
1060
1094
|
boxShadow: `
|
|
1061
|
-
|
|
1062
|
-
0 4px
|
|
1063
|
-
|
|
1095
|
+
0 8px 32px -4px var(--widget-primary-glow),
|
|
1096
|
+
0 4px 16px -2px rgba(0, 0, 0, 0.4),
|
|
1097
|
+
inset 0 1px 1px rgba(255, 255, 255, 0.3),
|
|
1098
|
+
inset 0 -1px 1px rgba(0, 0, 0, 0.2)
|
|
1064
1099
|
`
|
|
1065
1100
|
},
|
|
1066
1101
|
children: [
|
|
@@ -1070,47 +1105,83 @@ var PremiumVoiceWidget = ({
|
|
|
1070
1105
|
{
|
|
1071
1106
|
style: {
|
|
1072
1107
|
position: "absolute",
|
|
1073
|
-
inset:
|
|
1108
|
+
inset: 0,
|
|
1074
1109
|
borderRadius: "50%",
|
|
1075
|
-
background:
|
|
1076
|
-
|
|
1110
|
+
background: "linear-gradient(180deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0) 50%, rgba(0,0,0,0.1) 100%)",
|
|
1111
|
+
pointerEvents: "none"
|
|
1077
1112
|
}
|
|
1078
1113
|
}
|
|
1079
1114
|
),
|
|
1080
|
-
/* @__PURE__ */ (0, import_jsx_runtime.
|
|
1081
|
-
"
|
|
1115
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1116
|
+
"div",
|
|
1082
1117
|
{
|
|
1083
|
-
width: 24,
|
|
1084
|
-
height: 24,
|
|
1085
|
-
viewBox: "0 0 24 24",
|
|
1086
|
-
fill: "none",
|
|
1087
|
-
stroke: "white",
|
|
1088
|
-
strokeWidth: 2,
|
|
1089
|
-
strokeLinecap: "round",
|
|
1090
1118
|
style: {
|
|
1091
1119
|
position: "absolute",
|
|
1092
1120
|
top: "50%",
|
|
1093
1121
|
left: "50%",
|
|
1094
1122
|
transform: "translate(-50%, -50%)",
|
|
1095
|
-
zIndex: 1
|
|
1123
|
+
zIndex: 1,
|
|
1124
|
+
display: "flex",
|
|
1125
|
+
alignItems: "center",
|
|
1126
|
+
justifyContent: "center"
|
|
1096
1127
|
},
|
|
1097
|
-
children:
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1128
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
1129
|
+
"svg",
|
|
1130
|
+
{
|
|
1131
|
+
width: 26,
|
|
1132
|
+
height: 26,
|
|
1133
|
+
viewBox: "0 0 24 24",
|
|
1134
|
+
fill: "none",
|
|
1135
|
+
style: { filter: "drop-shadow(0 1px 2px rgba(0,0,0,0.2))" },
|
|
1136
|
+
children: [
|
|
1137
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1138
|
+
"path",
|
|
1139
|
+
{
|
|
1140
|
+
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",
|
|
1141
|
+
fill: "white",
|
|
1142
|
+
opacity: "0.15"
|
|
1143
|
+
}
|
|
1144
|
+
),
|
|
1145
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1146
|
+
"path",
|
|
1147
|
+
{
|
|
1148
|
+
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",
|
|
1149
|
+
fill: "white"
|
|
1150
|
+
}
|
|
1151
|
+
),
|
|
1152
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1153
|
+
"path",
|
|
1154
|
+
{
|
|
1155
|
+
d: "M16.5 10.5v1a4.5 4.5 0 0 1-9 0v-1",
|
|
1156
|
+
stroke: "white",
|
|
1157
|
+
strokeWidth: "2",
|
|
1158
|
+
strokeLinecap: "round",
|
|
1159
|
+
fill: "none"
|
|
1160
|
+
}
|
|
1161
|
+
),
|
|
1162
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1163
|
+
"path",
|
|
1164
|
+
{
|
|
1165
|
+
d: "M12 15.5v2.5M9.5 18h5",
|
|
1166
|
+
stroke: "white",
|
|
1167
|
+
strokeWidth: "2",
|
|
1168
|
+
strokeLinecap: "round"
|
|
1169
|
+
}
|
|
1170
|
+
)
|
|
1171
|
+
]
|
|
1172
|
+
}
|
|
1173
|
+
)
|
|
1103
1174
|
}
|
|
1104
1175
|
),
|
|
1105
1176
|
shouldShowAttentionPulse && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1106
1177
|
import_framer_motion.motion.div,
|
|
1107
1178
|
{
|
|
1108
1179
|
initial: { scale: 1, opacity: 1 },
|
|
1109
|
-
animate: { scale: 1.
|
|
1110
|
-
transition: { duration: 1, repeat: 3 },
|
|
1180
|
+
animate: { scale: 1.6, opacity: 0 },
|
|
1181
|
+
transition: { duration: 1.2, repeat: 3 },
|
|
1111
1182
|
style: {
|
|
1112
1183
|
position: "absolute",
|
|
1113
|
-
inset:
|
|
1184
|
+
inset: -2,
|
|
1114
1185
|
borderRadius: "50%",
|
|
1115
1186
|
border: "2px solid var(--widget-primary)",
|
|
1116
1187
|
pointerEvents: "none"
|
|
@@ -1124,19 +1195,22 @@ var PremiumVoiceWidget = ({
|
|
|
1124
1195
|
animate: { scale: 1 },
|
|
1125
1196
|
style: {
|
|
1126
1197
|
position: "absolute",
|
|
1127
|
-
top: -
|
|
1128
|
-
right: -
|
|
1129
|
-
width:
|
|
1130
|
-
height:
|
|
1198
|
+
top: -2,
|
|
1199
|
+
right: -2,
|
|
1200
|
+
width: 18,
|
|
1201
|
+
height: 18,
|
|
1131
1202
|
borderRadius: "50%",
|
|
1132
|
-
background: "
|
|
1133
|
-
border: "2px solid
|
|
1203
|
+
background: "linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%)",
|
|
1204
|
+
border: "2px solid white",
|
|
1134
1205
|
display: "flex",
|
|
1135
1206
|
alignItems: "center",
|
|
1136
1207
|
justifyContent: "center",
|
|
1137
|
-
fontSize:
|
|
1208
|
+
fontSize: 11,
|
|
1209
|
+
fontWeight: 700,
|
|
1210
|
+
color: "white",
|
|
1211
|
+
boxShadow: "0 2px 8px rgba(239, 68, 68, 0.5)"
|
|
1138
1212
|
},
|
|
1139
|
-
children: "
|
|
1213
|
+
children: "!"
|
|
1140
1214
|
}
|
|
1141
1215
|
)
|
|
1142
1216
|
]
|
|
@@ -1200,11 +1274,15 @@ var PremiumVoiceWidget = ({
|
|
|
1200
1274
|
animate: "expanded",
|
|
1201
1275
|
exit: "trigger",
|
|
1202
1276
|
style: {
|
|
1203
|
-
background: "
|
|
1204
|
-
backdropFilter: "blur(
|
|
1205
|
-
WebkitBackdropFilter: "blur(
|
|
1277
|
+
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%)",
|
|
1278
|
+
backdropFilter: "blur(24px) saturate(200%)",
|
|
1279
|
+
WebkitBackdropFilter: "blur(24px) saturate(200%)",
|
|
1206
1280
|
border: "1px solid var(--widget-glass-border)",
|
|
1207
|
-
boxShadow:
|
|
1281
|
+
boxShadow: `
|
|
1282
|
+
0 24px 80px -12px rgba(0, 0, 0, 0.6),
|
|
1283
|
+
0 0 1px 0 rgba(255, 255, 255, 0.1) inset,
|
|
1284
|
+
0 1px 0 0 rgba(255, 255, 255, 0.05) inset
|
|
1285
|
+
`,
|
|
1208
1286
|
overflow: "hidden",
|
|
1209
1287
|
display: "flex",
|
|
1210
1288
|
flexDirection: "column"
|
|
@@ -1229,26 +1307,50 @@ var PremiumVoiceWidget = ({
|
|
|
1229
1307
|
justifyContent: "space-between",
|
|
1230
1308
|
alignItems: "center",
|
|
1231
1309
|
padding: "20px 24px",
|
|
1232
|
-
borderBottom: "1px solid var(--widget-glass-border)"
|
|
1310
|
+
borderBottom: "1px solid var(--widget-glass-border)",
|
|
1311
|
+
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%)"
|
|
1233
1312
|
},
|
|
1234
1313
|
children: [
|
|
1235
|
-
/* @__PURE__ */ (0, import_jsx_runtime.
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1314
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: 12 }, children: [
|
|
1315
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1316
|
+
"div",
|
|
1317
|
+
{
|
|
1318
|
+
style: {
|
|
1319
|
+
width: 36,
|
|
1320
|
+
height: 36,
|
|
1321
|
+
borderRadius: 10,
|
|
1322
|
+
background: "linear-gradient(145deg, var(--widget-primary) 0%, var(--widget-accent) 100%)",
|
|
1323
|
+
display: "flex",
|
|
1324
|
+
alignItems: "center",
|
|
1325
|
+
justifyContent: "center",
|
|
1326
|
+
boxShadow: "0 2px 8px -2px var(--widget-primary-glow)"
|
|
1327
|
+
},
|
|
1328
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", { width: 18, height: 18, viewBox: "0 0 24 24", fill: "white", children: [
|
|
1329
|
+
/* @__PURE__ */ (0, import_jsx_runtime.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" }),
|
|
1330
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M16.5 10.5v1a4.5 4.5 0 0 1-9 0v-1", stroke: "white", strokeWidth: "2", strokeLinecap: "round", fill: "none" }),
|
|
1331
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M12 15.5v2.5M9.5 18h5", stroke: "white", strokeWidth: "2", strokeLinecap: "round" })
|
|
1332
|
+
] })
|
|
1333
|
+
}
|
|
1334
|
+
),
|
|
1335
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1336
|
+
"h2",
|
|
1337
|
+
{
|
|
1338
|
+
id: "widget-title",
|
|
1339
|
+
style: {
|
|
1340
|
+
fontSize: 17,
|
|
1341
|
+
fontWeight: 700,
|
|
1342
|
+
color: "var(--widget-text-primary)",
|
|
1343
|
+
margin: 0,
|
|
1344
|
+
letterSpacing: "-0.01em"
|
|
1345
|
+
},
|
|
1346
|
+
children: "Share Feedback"
|
|
1347
|
+
}
|
|
1348
|
+
)
|
|
1349
|
+
] }),
|
|
1248
1350
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1249
1351
|
import_framer_motion.motion.button,
|
|
1250
1352
|
{
|
|
1251
|
-
whileHover: { scale: 1.1,
|
|
1353
|
+
whileHover: { scale: 1.1, backgroundColor: "var(--widget-glass-border)" },
|
|
1252
1354
|
whileTap: { scale: 0.9 },
|
|
1253
1355
|
onClick: handleClose,
|
|
1254
1356
|
"aria-label": "Close widget",
|
|
@@ -1262,17 +1364,19 @@ var PremiumVoiceWidget = ({
|
|
|
1262
1364
|
cursor: "pointer",
|
|
1263
1365
|
display: "flex",
|
|
1264
1366
|
alignItems: "center",
|
|
1265
|
-
justifyContent: "center"
|
|
1367
|
+
justifyContent: "center",
|
|
1368
|
+
transition: "background 0.15s ease"
|
|
1266
1369
|
},
|
|
1267
1370
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1268
1371
|
"svg",
|
|
1269
1372
|
{
|
|
1270
|
-
width:
|
|
1271
|
-
height:
|
|
1373
|
+
width: 18,
|
|
1374
|
+
height: 18,
|
|
1272
1375
|
viewBox: "0 0 24 24",
|
|
1273
1376
|
fill: "none",
|
|
1274
1377
|
stroke: "currentColor",
|
|
1275
|
-
strokeWidth: 2,
|
|
1378
|
+
strokeWidth: 2.5,
|
|
1379
|
+
strokeLinecap: "round",
|
|
1276
1380
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
1277
1381
|
}
|
|
1278
1382
|
)
|
|
@@ -1286,41 +1390,44 @@ var PremiumVoiceWidget = ({
|
|
|
1286
1390
|
{
|
|
1287
1391
|
style: {
|
|
1288
1392
|
display: "flex",
|
|
1289
|
-
|
|
1393
|
+
padding: "8px 12px",
|
|
1394
|
+
gap: 4,
|
|
1395
|
+
background: "var(--widget-glass-bg)",
|
|
1396
|
+
margin: "0 16px",
|
|
1397
|
+
marginTop: 16,
|
|
1398
|
+
borderRadius: 12,
|
|
1399
|
+
border: "1px solid var(--widget-glass-border)"
|
|
1290
1400
|
},
|
|
1291
1401
|
children: ["voice", "text"].map((tab) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
1292
1402
|
import_framer_motion.motion.button,
|
|
1293
1403
|
{
|
|
1294
1404
|
onClick: () => setActiveTab(tab),
|
|
1295
|
-
whileHover: { backgroundColor: "rgba(255,255,255,0.05)" },
|
|
1296
1405
|
style: {
|
|
1297
1406
|
flex: 1,
|
|
1298
|
-
padding: "
|
|
1407
|
+
padding: "10px 0",
|
|
1299
1408
|
border: "none",
|
|
1300
|
-
background: "transparent",
|
|
1301
|
-
fontSize:
|
|
1302
|
-
fontWeight:
|
|
1303
|
-
color: activeTab === tab ? "
|
|
1409
|
+
background: activeTab === tab ? "linear-gradient(145deg, var(--widget-primary) 0%, var(--widget-accent) 100%)" : "transparent",
|
|
1410
|
+
fontSize: 13,
|
|
1411
|
+
fontWeight: 600,
|
|
1412
|
+
color: activeTab === tab ? "white" : "var(--widget-text-secondary)",
|
|
1304
1413
|
cursor: "pointer",
|
|
1305
|
-
position: "relative"
|
|
1414
|
+
position: "relative",
|
|
1415
|
+
borderRadius: 8,
|
|
1416
|
+
transition: "all 0.2s ease",
|
|
1417
|
+
display: "flex",
|
|
1418
|
+
alignItems: "center",
|
|
1419
|
+
justifyContent: "center",
|
|
1420
|
+
gap: 6,
|
|
1421
|
+
boxShadow: activeTab === tab ? "0 2px 8px -2px var(--widget-primary-glow)" : "none"
|
|
1306
1422
|
},
|
|
1423
|
+
whileHover: { scale: activeTab === tab ? 1 : 1.02 },
|
|
1424
|
+
whileTap: { scale: 0.98 },
|
|
1307
1425
|
children: [
|
|
1308
|
-
tab === "voice" ? "
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
style: {
|
|
1314
|
-
position: "absolute",
|
|
1315
|
-
bottom: -1,
|
|
1316
|
-
left: 0,
|
|
1317
|
-
right: 0,
|
|
1318
|
-
height: 2,
|
|
1319
|
-
background: "var(--widget-primary)"
|
|
1320
|
-
},
|
|
1321
|
-
transition: springPresets.smooth
|
|
1322
|
-
}
|
|
1323
|
-
)
|
|
1426
|
+
tab === "voice" ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", { width: 14, height: 14, viewBox: "0 0 24 24", fill: "currentColor", children: [
|
|
1427
|
+
/* @__PURE__ */ (0, import_jsx_runtime.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" }),
|
|
1428
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M16.5 10.5v1a4.5 4.5 0 0 1-9 0v-1", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", fill: "none" })
|
|
1429
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { width: 14, height: 14, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M4 6h16M4 12h16M4 18h10" }) }),
|
|
1430
|
+
tab === "voice" ? "Voice" : "Text"
|
|
1324
1431
|
]
|
|
1325
1432
|
},
|
|
1326
1433
|
tab
|
|
@@ -1337,107 +1444,158 @@ var PremiumVoiceWidget = ({
|
|
|
1337
1444
|
}
|
|
1338
1445
|
) }),
|
|
1339
1446
|
activeTab === "voice" && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { textAlign: "center" }, children: [
|
|
1340
|
-
/* @__PURE__ */ (0, import_jsx_runtime.
|
|
1341
|
-
|
|
1342
|
-
RecordingTimer,
|
|
1343
|
-
{
|
|
1344
|
-
seconds: recordingSeconds,
|
|
1345
|
-
maxDuration: maxRecordingDuration
|
|
1346
|
-
}
|
|
1347
|
-
),
|
|
1348
|
-
!isRecording && recordingSeconds === 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1349
|
-
"p",
|
|
1447
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
1448
|
+
"div",
|
|
1350
1449
|
{
|
|
1351
1450
|
style: {
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1451
|
+
background: "var(--widget-glass-bg)",
|
|
1452
|
+
borderRadius: 16,
|
|
1453
|
+
padding: "24px 16px",
|
|
1454
|
+
border: "1px solid var(--widget-glass-border)",
|
|
1455
|
+
marginBottom: 16
|
|
1355
1456
|
},
|
|
1356
|
-
children:
|
|
1457
|
+
children: [
|
|
1458
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(AmbientOrb, { audioLevel, isRecording }),
|
|
1459
|
+
isRecording && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1460
|
+
RecordingTimer,
|
|
1461
|
+
{
|
|
1462
|
+
seconds: recordingSeconds,
|
|
1463
|
+
maxDuration: maxRecordingDuration
|
|
1464
|
+
}
|
|
1465
|
+
),
|
|
1466
|
+
!isRecording && recordingSeconds === 0 && !transcription && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1467
|
+
"p",
|
|
1468
|
+
{
|
|
1469
|
+
style: {
|
|
1470
|
+
color: "var(--widget-text-muted)",
|
|
1471
|
+
fontSize: 13,
|
|
1472
|
+
marginTop: 12,
|
|
1473
|
+
marginBottom: 0
|
|
1474
|
+
},
|
|
1475
|
+
children: "Press and hold to record your feedback"
|
|
1476
|
+
}
|
|
1477
|
+
)
|
|
1478
|
+
]
|
|
1357
1479
|
}
|
|
1358
1480
|
),
|
|
1359
|
-
(isRecording || transcription) && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: {
|
|
1481
|
+
(isRecording || transcription) && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { marginBottom: 16 }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1360
1482
|
TranscriptionDisplay,
|
|
1361
1483
|
{
|
|
1362
1484
|
text: transcription,
|
|
1363
1485
|
isLive: isRecording
|
|
1364
1486
|
}
|
|
1365
1487
|
) }),
|
|
1366
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1488
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1367
1489
|
MagneticButton,
|
|
1368
1490
|
{
|
|
1369
|
-
|
|
1370
|
-
|
|
1491
|
+
onPressStart: handleStartRecording,
|
|
1492
|
+
onPressEnd: handleStopRecording,
|
|
1493
|
+
variant: isRecording ? "recording" : "primary",
|
|
1371
1494
|
children: isRecording ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
1372
1495
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1373
|
-
|
|
1496
|
+
import_framer_motion.motion.div,
|
|
1374
1497
|
{
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1498
|
+
animate: { scale: [1, 1.2, 1] },
|
|
1499
|
+
transition: { duration: 1, repeat: Infinity },
|
|
1500
|
+
style: {
|
|
1501
|
+
width: 8,
|
|
1502
|
+
height: 8,
|
|
1503
|
+
borderRadius: "50%",
|
|
1504
|
+
background: "white"
|
|
1505
|
+
}
|
|
1380
1506
|
}
|
|
1381
1507
|
),
|
|
1382
|
-
"
|
|
1383
|
-
] }) :
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
{
|
|
1391
|
-
value: textContent,
|
|
1392
|
-
onChange: (e) => setTextContent(e.target.value),
|
|
1393
|
-
placeholder: "Tell us what you think...",
|
|
1394
|
-
style: {
|
|
1395
|
-
width: "100%",
|
|
1396
|
-
minHeight: 150,
|
|
1397
|
-
padding: 16,
|
|
1398
|
-
fontSize: 14,
|
|
1399
|
-
lineHeight: 1.6,
|
|
1400
|
-
color: "var(--widget-text-primary)",
|
|
1401
|
-
background: "var(--widget-glass-bg)",
|
|
1402
|
-
border: "1px solid var(--widget-glass-border)",
|
|
1403
|
-
borderRadius: 12,
|
|
1404
|
-
resize: "vertical",
|
|
1405
|
-
fontFamily: "inherit"
|
|
1406
|
-
}
|
|
1407
|
-
}
|
|
1408
|
-
),
|
|
1409
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
1410
|
-
"div",
|
|
1411
|
-
{
|
|
1412
|
-
style: {
|
|
1413
|
-
display: "flex",
|
|
1414
|
-
justifyContent: "flex-end",
|
|
1415
|
-
marginTop: 8,
|
|
1416
|
-
fontSize: 12,
|
|
1417
|
-
color: "var(--widget-text-muted)"
|
|
1418
|
-
},
|
|
1419
|
-
children: [
|
|
1420
|
-
textContent.length,
|
|
1421
|
-
" / 5000"
|
|
1422
|
-
]
|
|
1508
|
+
"Recording... Release to stop"
|
|
1509
|
+
] }) : transcription ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
1510
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { width: 16, height: 16, viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime.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" }) }),
|
|
1511
|
+
"Hold to record more"
|
|
1512
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
1513
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { width: 16, height: 16, viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime.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" }) }),
|
|
1514
|
+
"Hold to Record"
|
|
1515
|
+
] })
|
|
1423
1516
|
}
|
|
1424
1517
|
)
|
|
1425
|
-
] })
|
|
1518
|
+
] }),
|
|
1519
|
+
activeTab === "text" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
1520
|
+
"div",
|
|
1521
|
+
{
|
|
1522
|
+
style: {
|
|
1523
|
+
position: "relative",
|
|
1524
|
+
background: "var(--widget-glass-bg)",
|
|
1525
|
+
border: "1px solid var(--widget-glass-border)",
|
|
1526
|
+
borderRadius: 14,
|
|
1527
|
+
overflow: "hidden"
|
|
1528
|
+
},
|
|
1529
|
+
children: [
|
|
1530
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1531
|
+
"textarea",
|
|
1532
|
+
{
|
|
1533
|
+
value: textContent,
|
|
1534
|
+
onChange: (e) => setTextContent(e.target.value),
|
|
1535
|
+
placeholder: "Share your thoughts, ideas, or feedback...",
|
|
1536
|
+
style: {
|
|
1537
|
+
width: "100%",
|
|
1538
|
+
minHeight: 140,
|
|
1539
|
+
padding: 16,
|
|
1540
|
+
fontSize: 14,
|
|
1541
|
+
lineHeight: 1.7,
|
|
1542
|
+
color: "var(--widget-text-primary)",
|
|
1543
|
+
background: "transparent",
|
|
1544
|
+
border: "none",
|
|
1545
|
+
resize: "none",
|
|
1546
|
+
fontFamily: "inherit",
|
|
1547
|
+
outline: "none"
|
|
1548
|
+
}
|
|
1549
|
+
}
|
|
1550
|
+
),
|
|
1551
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1552
|
+
"div",
|
|
1553
|
+
{
|
|
1554
|
+
style: {
|
|
1555
|
+
display: "flex",
|
|
1556
|
+
justifyContent: "flex-end",
|
|
1557
|
+
padding: "8px 12px",
|
|
1558
|
+
borderTop: "1px solid var(--widget-glass-border)",
|
|
1559
|
+
background: theme === "dark" ? "rgba(0,0,0,0.2)" : "rgba(0,0,0,0.02)"
|
|
1560
|
+
},
|
|
1561
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
1562
|
+
"span",
|
|
1563
|
+
{
|
|
1564
|
+
style: {
|
|
1565
|
+
fontSize: 11,
|
|
1566
|
+
fontWeight: 500,
|
|
1567
|
+
color: textContent.length > 4500 ? "var(--widget-recording)" : "var(--widget-text-muted)"
|
|
1568
|
+
},
|
|
1569
|
+
children: [
|
|
1570
|
+
textContent.length.toLocaleString(),
|
|
1571
|
+
" / 5,000"
|
|
1572
|
+
]
|
|
1573
|
+
}
|
|
1574
|
+
)
|
|
1575
|
+
}
|
|
1576
|
+
)
|
|
1577
|
+
]
|
|
1578
|
+
}
|
|
1579
|
+
) })
|
|
1426
1580
|
] }),
|
|
1427
1581
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1428
1582
|
"div",
|
|
1429
1583
|
{
|
|
1430
1584
|
style: {
|
|
1431
|
-
padding: "16px 24px",
|
|
1432
|
-
borderTop: "1px solid var(--widget-glass-border)"
|
|
1585
|
+
padding: "16px 24px 20px",
|
|
1586
|
+
borderTop: "1px solid var(--widget-glass-border)",
|
|
1587
|
+
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%)"
|
|
1433
1588
|
},
|
|
1434
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.
|
|
1589
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
1435
1590
|
MagneticButton,
|
|
1436
1591
|
{
|
|
1437
1592
|
onClick: handleSubmit,
|
|
1438
1593
|
disabled: !selectedCategory || activeTab === "voice" && !transcription || activeTab === "text" && !textContent.trim(),
|
|
1439
1594
|
loading: isSubmitting,
|
|
1440
|
-
children:
|
|
1595
|
+
children: [
|
|
1596
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { width: 16, height: 16, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z" }) }),
|
|
1597
|
+
"Submit Feedback"
|
|
1598
|
+
]
|
|
1441
1599
|
}
|
|
1442
1600
|
)
|
|
1443
1601
|
}
|