@airsurfer09/web-handsfree
Version:
A React package for integrating Convai's AI-powered voice assistants with LiveKit for real-time audio/video conversations
450 lines (394 loc) • 15.6 kB
JavaScript
// Comprehensive CSS for @airsurfer09/web-handsfree
// Includes all necessary Tailwind classes and custom styles
export const styles = `
/* Essential CSS Reset */
* {
box-sizing: border-box;
}
/* Tailwind CSS Utilities - All classes used by components */
/* Display */
.block { display: block; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1 1 0%; }
.inline-flex { display: inline-flex; }
.hidden { display: none; }
/* Flexbox */
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }
/* Spacing */
.space-x-2 > :not([hidden]) ~ :not([hidden]) {
--tw-space-x-reverse: 0;
margin-right: calc(0.5rem * var(--tw-space-x-reverse));
margin-left: calc(0.5rem * (1 - var(--tw-space-x-reverse)));
}
.space-x-3 > :not([hidden]) ~ :not([hidden]) {
--tw-space-x-reverse: 0;
margin-right: calc(0.75rem * var(--tw-space-x-reverse));
margin-left: calc(0.75rem * (1 - var(--tw-space-x-reverse)));
}
.space-y-2 > :not([hidden]) ~ :not([hidden]) {
--tw-space-y-reverse: 0;
margin-top: calc(0.5rem * (1 - var(--tw-space-y-reverse)));
margin-bottom: calc(0.5rem * var(--tw-space-y-reverse));
}
.space-y-4 > :not([hidden]) ~ :not([hidden]) {
--tw-space-y-reverse: 0;
margin-top: calc(1rem * (1 - var(--tw-space-y-reverse)));
margin-bottom: calc(1rem * var(--tw-space-y-reverse));
}
.space-y-6 > :not([hidden]) ~ :not([hidden]) {
--tw-space-y-reverse: 0;
margin-top: calc(1.5rem * (1 - var(--tw-space-y-reverse)));
margin-bottom: calc(1.5rem * var(--tw-space-y-reverse));
}
.gap-3 { gap: 0.75rem; }
/* Padding */
.p-2 { padding: 0.5rem; }
.p-4 { padding: 1rem; }
.p-8 { padding: 2rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
/* Margin */
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
/* Width */
.w-2 { width: 0.5rem; }
.w-3 { width: 0.75rem; }
.w-4 { width: 1rem; }
.w-6 { width: 1.5rem; }
.w-12 { width: 3rem; }
.w-24 { width: 6rem; }
.w-72 { width: 18rem; }
.w-80 { width: 20rem; }
.w-96 { width: 24rem; }
.w-full { width: 100%; }
/* Height */
.h-1 { height: 0.25rem; }
.h-3 { height: 0.75rem; }
.h-4 { height: 1rem; }
.h-6 { height: 1.5rem; }
.h-12 { height: 3rem; }
.h-16 { height: 4rem; }
.h-40 { height: 10rem; }
.h-48 { height: 12rem; }
.h-72 { height: 18rem; }
.h-80 { height: 20rem; }
.h-96 { height: 24rem; }
.h-full { height: 100%; }
.h-screen { height: 100vh; }
.h-\\[320px\\] { height: 320px; }
.h-\\[500px\\] { height: 500px; }
.min-h-screen { min-height: 100vh; }
/* Background Colors */
.bg-black { background-color: #000; }
.bg-blue-500 { background-color: #3b82f6; }
.bg-emerald-300 { background-color: #6ee7b7; }
.bg-emerald-400 { background-color: #34d399; }
.bg-emerald-500 { background-color: #10b981; }
.bg-emerald-600 { background-color: #059669; }
.bg-green-500 { background-color: #22c55e; }
.bg-orange-500 { background-color: #f97316; }
.bg-purple-500 { background-color: #a855f7; }
.bg-pink-500 { background-color: #ec4899; }
.bg-red-500 { background-color: #ef4444; }
.bg-slate-400 { background-color: #94a3b8; }
.bg-slate-500 { background-color: #64748b; }
.bg-slate-600 { background-color: #475569; }
.bg-slate-800 { background-color: #1e293b; }
.bg-slate-900 { background-color: #0f172a; }
.bg-yellow-500 { background-color: #eab308; }
/* Background Gradients */
.bg-gradient-to-r { background-image: linear-gradient(to right, var(--tw-gradient-stops)); }
.bg-gradient-to-br { background-image: linear-gradient(to bottom right, var(--tw-gradient-stops)); }
/* Gradient Colors */
.from-emerald-400 { --tw-gradient-from: #34d399; --tw-gradient-to: rgb(52 211 153 / 0); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); }
.from-emerald-500 { --tw-gradient-from: #10b981; --tw-gradient-to: rgb(16 185 129 / 0); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); }
.from-emerald-600 { --tw-gradient-from: #059669; --tw-gradient-to: rgb(5 150 105 / 0); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); }
.from-purple-500 { --tw-gradient-from: #a855f7; --tw-gradient-to: rgb(168 85 247 / 0); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); }
.from-pink-500 { --tw-gradient-from: #ec4899; --tw-gradient-to: rgb(236 72 153 / 0); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); }
.from-slate-800 { --tw-gradient-from: #1e293b; --tw-gradient-to: rgb(30 41 59 / 0); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); }
.from-slate-900 { --tw-gradient-from: #0f172a; --tw-gradient-to: rgb(15 23 42 / 0); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); }
.to-emerald-400 { --tw-gradient-to: #34d399; }
.to-emerald-600 { --tw-gradient-to: #059669; }
.to-emerald-700 { --tw-gradient-to: #047857; }
.to-pink-500 { --tw-gradient-to: #ec4899; }
.to-slate-800 { --tw-gradient-to: #1e293b; }
.to-slate-900 { --tw-gradient-to: #0f172a; }
.via-emerald-500 { --tw-gradient-stops: var(--tw-gradient-from), #10b981, var(--tw-gradient-to); }
.via-emerald-600 { --tw-gradient-stops: var(--tw-gradient-from), #059669, var(--tw-gradient-to); }
.via-slate-800 { --tw-gradient-stops: var(--tw-gradient-from), #1e293b, var(--tw-gradient-to); }
/* Text Colors */
.text-white { color: #fff; }
.text-blue-300 { color: #93c5fd; }
.text-emerald-100 { color: #d1fae5; }
.text-emerald-300 { color: #6ee7b7; }
.text-emerald-400 { color: #34d399; }
.text-green-300 { color: #86efac; }
.text-orange-300 { color: #fdba74; }
.text-purple-200 { color: #e9d5ff; }
.text-purple-300 { color: #c4b5fd; }
.text-pink-300 { color: #f9a8d4; }
.text-red-300 { color: #fca5a5; }
.text-slate-100 { color: #f1f5f9; }
.text-slate-300 { color: #cbd5e1; }
.text-slate-400 { color: #94a3b8; }
.text-slate-500 { color: #64748b; }
.text-yellow-300 { color: #fde047; }
/* Border Colors */
.border-blue-500 { border-color: #3b82f6; }
.border-emerald-500 { border-color: #10b981; }
.border-green-500 { border-color: #22c55e; }
.border-orange-500 { border-color: #f97316; }
.border-purple-500 { border-color: #a855f7; }
.border-red-500 { border-color: #ef4444; }
.border-slate-500 { border-color: #64748b; }
.border-slate-600 { border-color: #475569; }
.border-white { border-color: #fff; }
.border-yellow-500 { border-color: #eab308; }
/* Border Width */
.border { border-width: 1px; }
.border-2 { border-width: 2px; }
.border-b { border-bottom-width: 1px; }
/* Border Radius */
.rounded-full { border-radius: 9999px; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-4xl { border-radius: 2rem; }
.rounded-t-2xl { border-top-left-radius: 1rem; border-top-right-radius: 1rem; }
.rounded-b-2xl { border-bottom-left-radius: 1rem; border-bottom-right-radius: 1rem; }
/* Opacity */
.opacity-5 { opacity: 0.05; }
.opacity-10 { opacity: 0.1; }
.opacity-20 { opacity: 0.2; }
.opacity-30 { opacity: 0.3; }
.opacity-60 { opacity: 0.6; }
.opacity-75 { opacity: 0.75; }
.opacity-\\[0\\.02\\] { opacity: 0.02; }
/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
/* Positioning */
.bottom-2 { bottom: 0.5rem; }
.bottom-5 { bottom: 1.25rem; }
.bottom-20 { bottom: 5rem; }
.left-2 { left: 0.5rem; }
.left-5 { left: 1.25rem; }
.left-20 { left: 5rem; }
.right-5 { right: 1.25rem; }
.right-20 { right: 5rem; }
.top-20 { top: 5rem; }
.top-1\\/2 { top: 50%; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
/* Z-Index */
.z-10 { z-index: 10; }
.z-\\[999\\] { z-index: 999; }
/* Transform */
.transform { transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); }
.-translate-x-1\\/2 { --tw-translate-x: -50%; }
.-translate-y-1\\/2 { --tw-translate-y: -50%; }
/* Text Sizing */
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-5xl { font-size: 3rem; line-height: 1; }
/* Font Weight */
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
/* Line Height */
.leading-relaxed { line-height: 1.625; }
/* Letter Spacing */
.tracking-tight { letter-spacing: -0.025em; }
.tracking-wide { letter-spacing: 0.025em; }
/* Max Width */
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-48 { max-width: 12rem; }
.max-w-md { max-width: 28rem; }
/* Effects */
.backdrop-blur-sm { backdrop-filter: blur(4px); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); }
/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }
.overflow-y-scroll { overflow-y: scroll; }
/* Transitions */
.transition-all { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-colors { transition-property: color, background-color, border-color, text-decoration-color, fill, stroke; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-transform { transition-property: transform; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.duration-200 { transition-duration: 200ms; }
.duration-300 { transition-duration: 300ms; }
.duration-500 { transition-duration: 500ms; }
/* Hover States */
.hover\\:bg-emerald-500\\/20:hover { background-color: rgb(16 185 129 / 0.2); }
.hover\\:bg-emerald-500\\/30:hover { background-color: rgb(16 185 129 / 0.3); }
.hover\\:bg-red-500\\/30:hover { background-color: rgb(239 68 68 / 0.3); }
.hover\\:from-emerald-600:hover { --tw-gradient-from: #059669; --tw-gradient-to: rgb(5 150 105 / 0); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); }
.hover\\:to-emerald-700:hover { --tw-gradient-to: #047857; }
.hover\\:text-emerald-300:hover { color: #6ee7b7; }
.hover\\:shadow-emerald-500\\/25:hover { box-shadow: 0 10px 15px -3px rgb(16 185 129 / 0.25), 0 4px 6px -4px rgb(16 185 129 / 0.25); }
/* Disabled States */
.disabled\\:from-emerald-500\\/50:disabled { --tw-gradient-from: rgb(16 185 129 / 0.5); --tw-gradient-to: rgb(16 185 129 / 0); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); }
.disabled\\:to-emerald-600\\/50:disabled { --tw-gradient-to: rgb(5 150 105 / 0.5); }
.disabled\\:from-emerald-500\\/30:disabled { --tw-gradient-from: rgb(16 185 129 / 0.3); --tw-gradient-to: rgb(16 185 129 / 0); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); }
.disabled\\:to-emerald-600\\/30:disabled { --tw-gradient-to: rgb(5 150 105 / 0.3); }
.disabled\\:cursor-not-allowed:disabled { cursor: not-allowed; }
/* Focus States */
.focus\\:outline-none:focus { outline: 2px solid transparent; outline-offset: 2px; }
.focus\\:ring-2:focus { --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color); box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); }
.focus\\:ring-emerald-500\\/30:focus { --tw-ring-color: rgb(16 185 129 / 0.3); }
.focus\\:ring-emerald-500\\/50:focus { --tw-ring-color: rgb(16 185 129 / 0.5); }
.focus\\:ring-offset-2:focus { --tw-ring-offset-width: 2px; }
.focus\\:ring-offset-slate-900:focus { --tw-ring-offset-color: #0f172a; }
/* Animations */
.animate-spin { animation: spin 1s linear infinite; }
.animate-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
.animate-in { animation: fade-in 0.5s ease-in-out; }
.fade-in { animation: fade-in 0.5s ease-in-out; }
.delay-500 { animation-delay: 500ms; }
.delay-1000 { animation-delay: 1000ms; }
/* Blur Effects */
.blur-3xl { filter: blur(64px); }
/* Text Gradients */
.bg-clip-text { -webkit-background-clip: text; background-clip: text; }
.text-transparent { color: transparent; }
/* Background Patterns */
.bg-grid-pattern {
background-image:
linear-gradient(rgba(16, 185, 129, 0.1) 1px, transparent 1px),
linear-gradient(90deg, rgba(16, 185, 129, 0.1) 1px, transparent 1px);
background-size: 50px 50px;
}
/* Responsive Utilities */
@media (min-width: 768px) {
.md\\:text-7xl {
font-size: 4.5rem;
line-height: 1;
}
}
/* Custom component styles for @airsurfer09/web-handsfree */
/* Glass morphism components */
.glass {
background: rgba(15, 23, 42, 0.8);
backdrop-filter: blur(16px);
-webkit-backdrop-filter: blur(16px);
border: 1px solid rgba(16, 185, 129, 0.2);
border-radius: 20px;
box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}
.glass-light {
background: rgba(15, 23, 42, 0.6);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
border: 1px solid rgba(16, 185, 129, 0.15);
box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.25);
}
/* Button hover effects */
.btn-hover-lift {
transition: all 0.2s ease-in-out;
}
.btn-hover-lift:hover {
transform: translateY(-2px);
}
.btn-hover-lift:active {
transform: translateY(0);
}
/* Animation classes */
.animate-in {
animation: fade-in 0.5s ease-in-out;
}
.fade-in {
animation: fade-in 0.5s ease-in-out;
}
.slide-in-from-right-2 {
animation: slide-in-from-right 0.3s ease-out;
}
.slide-in-from-left-2 {
animation: slide-in-from-left 0.3s ease-out;
}
/* Scrollbar styles */
.scrollbar-thin {
scrollbar-width: thin;
}
.scrollbar-thumb-emerald-500\\/30 {
scrollbar-color: rgba(16, 185, 129, 0.3) transparent;
}
.scrollbar-track-transparent {
scrollbar-color: transparent transparent;
}
/* Animation keyframes */
@keyframes spin {
to {
transform: rotate(360deg);
}
}
@keyframes pulse {
50% {
opacity: .5;
}
}
@keyframes fade-in {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes slide-in-from-right {
from {
opacity: 0;
transform: translateX(20px);
}
to {
opacity: 1;
transform: translateX(0);
}
}
@keyframes slide-in-from-left {
from {
opacity: 0;
transform: translateX(-20px);
}
to {
opacity: 1;
transform: translateX(0);
}
}
`;
/**
* Injects the comprehensive styles into the document head
*/
export function injectStyles() {
if (typeof document === 'undefined')
return;
// Check if styles are already injected
const existingStyle = document.getElementById('airsurfer-web-handsfree-styles');
if (existingStyle)
return;
const styleElement = document.createElement('style');
styleElement.id = 'airsurfer-web-handsfree-styles';
styleElement.textContent = styles;
document.head.appendChild(styleElement);
}
//# sourceMappingURL=styles.js.map