Create professional demos and 3D mockups in seconds, directly in your browser
feat: update UI components for improved layout and responsiveness
CristianOlivera132c9d74087ef
diff --git a/app/[locale]/(editor)/editor/page.tsx b/app/[locale]/(editor)/editor/page.tsxindex bee588a..ebc6d16 100644--- a/app/[locale]/(editor)/editor/page.tsx+++ b/app/[locale]/(editor)/editor/page.tsx@@ -1544,84 +1544,80 @@ export default function Editor() {const [videoBlob, setVideoBlob] = useState<Blob | null>(null);const handleExport = (quality: ExportQuality) => {- // ── BACKEND TESTING: imprime el Recipe JSON completo en la consola ──- // Para probar el backend: copia este JSON, reemplaza los campos- // "storageKey" con el path real del video subido a Supabase Storage:- // "source-videos/{tu-user-id}/{libraryVideoId}.mp4"- console.log("=== RECIPE JSON PARA BACKEND (PRUEBAS) ===");- const userId = user?.id ?? "USER-ID-NO-DISPONIBLE";- const appOrigin = window.location.origin;- console.log(JSON.stringify({- quality,- trim: trimRange.end > trimRange.start- ? { start: trimRange.start, end: trimRange.end }- : null,- clips: videoClips.map(clip => ({- id: clip.id,- libraryVideoId: clip.libraryVideoId,- storageKey: `source-videos/${userId}/${clip.libraryVideoId}.mp4`,- name: clip.name,- startTime: clip.startTime,- trimStart: clip.trimStart,- trimEnd: clip.trimEnd,- duration: clip.trimEnd - clip.trimStart,- hasAudio: clipAudioStateRef.current.get(clip.libraryVideoId) !== false,- hasCamera: clip.hasCamera ?? false,- })),- muteOriginalAudio,- masterVolume,- videoHasAudioTrack,- audioTracks: audioTracks.map(track => {- const audio = uploadedAudios.find(a => a.id === track.audioId);- return {- audioId: track.audioId,- audioStorageKey: `source-audios/${userId}/${track.audioId}`,- name: audio?.name ?? track.name,- startTime: track.startTime,- duration: track.duration,- trimStart: track.trimStart ?? 0,- volume: track.volume,- loop: track.loop,- };- }),- backgroundTab,- selectedWallpaper,- // URL completa del wallpaper seleccionado (vacío si no se usa wallpaper)- wallpaperUrl: backgroundTab === "wallpaper" && selectedWallpaper >= 0- ? `${appOrigin}${getWallpaperUrl(selectedWallpaper)}`- : null,- backgroundBlur,- // dataUrl si el usuario subió imagen propia | URL https si es Unsplash/Pexels | "" si no hay- selectedImageUrl,- backgroundColorConfig,- aspectRatio,- customDimensions,- // Native video dimensions — used by the backend to compute output size when aspectRatio is 'auto'- sourceDimensions: videoDimensions ?? null,- cropArea,- padding,- roundedCorners,- shadows,- videoTransform,- mockupId,- mockupConfig,- zoomFragments,- canvasElements: canvasElements.map(el => {- // Resolver imagePath de elementos built-in a URLs completas- if (el.type === "image") {- const imgEl = el as import("@/types/canvas-elements.types").ImageElement;- if (imgEl.imagePath?.startsWith("/")) {- return { ...el, imagePath: `${appOrigin}${imgEl.imagePath}` };- }- }- return el;- }),- cameraConfig,- cameraStorageKey: null,- videoMaskConfig,- }, null, 2));- console.log("==========================================");- // ── FIN BACKEND TESTING ──+ /* console.log("=== RECIPE JSON PARA BACKEND (PRUEBAS) ===");+ const userId = user?.id ?? "USER-ID-NO-DISPONIBLE";+ const appOrigin = window.location.origin;+ console.log(JSON.stringify({+ quality,+ trim: trimRange.end > trimRange.start+ ? { start: trimRange.start, end: trimRange.end }+ : null,+ clips: videoClips.map(clip => ({+ id: clip.id,+ libraryVideoId: clip.libraryVideoId,+ storageKey: `source-videos/${userId}/${clip.libraryVideoId}.mp4`,+ name: clip.name,+ startTime: clip.startTime,+ trimStart: clip.trimStart,+ trimEnd: clip.trimEnd,+ duration: clip.trimEnd - clip.trimStart,+ hasAudio: clipAudioStateRef.current.get(clip.libraryVideoId) !== false,+ hasCamera: clip.hasCamera ?? false,+ })),+ muteOriginalAudio,+ masterVolume,+ videoHasAudioTrack,+ audioTracks: audioTracks.map(track => {+ const audio = uploadedAudios.find(a => a.id === track.audioId);+ return {+ audioId: track.audioId,+ audioStorageKey: `source-audios/${userId}/${track.audioId}`,+ name: audio?.name ?? track.name,+ startTime: track.startTime,+ duration: track.duration,+ trimStart: track.trimStart ?? 0,+ volume: track.volume,+ loop: track.loop,+ };+ }),+ backgroundTab,+ selectedWallpaper,+ // URL completa del wallpaper seleccionado (vacío si no se usa wallpaper)+ wallpaperUrl: backgroundTab === "wallpaper" && selectedWallpaper >= 0+ ? `${appOrigin}${getWallpaperUrl(selectedWallpaper)}`+ : null,+ backgroundBlur,+ // dataUrl si el usuario subió imagen propia | URL https si es Unsplash/Pexels | "" si no hay+ selectedImageUrl,+ backgroundColorConfig,+ aspectRatio,+ customDimensions,+ // Native video dimensions — used by the backend to compute output size when aspectRatio is 'auto'+ sourceDimensions: videoDimensions ?? null,+ cropArea,+ padding,+ roundedCorners,+ shadows,+ videoTransform,+ mockupId,+ mockupConfig,+ zoomFragments,+ canvasElements: canvasElements.map(el => {+ // Resolver imagePath de elementos built-in a URLs completas+ if (el.type === "image") {+ const imgEl = el as import("@/types/canvas-elements.types").ImageElement;+ if (imgEl.imagePath?.startsWith("/")) {+ return { ...el, imagePath: `${appOrigin}${imgEl.imagePath}` };+ }+ }+ return el;+ }),+ cameraConfig,+ cameraStorageKey: null,+ videoMaskConfig,+ }, null, 2));+ console.log("==========================================");+ // ── FIN BACKEND TESTING ──*/isExportingRef.current = true;for (const audioEl of audioElementsRef.current.values()) {diff --git a/app/components/ui/home/FeaturesShowcase.tsx b/app/components/ui/home/FeaturesShowcase.tsxindex 5ecc427..bdb08d9 100644--- a/app/components/ui/home/FeaturesShowcase.tsx+++ b/app/components/ui/home/FeaturesShowcase.tsx@@ -109,7 +109,7 @@ const DraggableCarousel = ({ children }: { children: React.ReactNode }) => {onMouseLeave={handleMouseUpOrLeave}onMouseUp={handleMouseUpOrLeave}onMouseMove={handleMouseMove}- className="flex gap-6 overflow-x-auto hide-scroll w-full cursor-grab select-none"+ className="flex gap-6 overflow-x-auto hide-scroll w-full cursor-grab select-none -ml-6 sm:ml-0"><divclassName="flex-shrink-0 pointer-events-none"@@ -154,7 +154,7 @@ export default function FeaturesShowcase() {</div><DraggableCarousel>{videosData.map((feature) => (- <article key={feature.id} className="flex-shrink-0 h-[350px] md:h-[450px]">+ <article key={feature.id} className="flex-shrink-0 h-[200px] sm:h-[350px] md:h-[450px]"><divclassName="relative h-full squircle-element-xl overflow-hidden border border-white/10 group shadow-2xl"style={{ aspectRatio: feature.aspectRatio || "16/9" }}@@ -180,7 +180,7 @@ export default function FeaturesShowcase() {</div><DraggableCarousel>{imagesData.map((feature) => (- <article key={feature.id} className="flex-shrink-0 h-[350px] md:h-[450px]">+ <article key={feature.id} className="flex-shrink-0 h-[200px] sm:h-[350px] md:h-[450px]"><divclassName="relative h-full squircle-element-xl overflow-hidden bg-neutral-900 border border-white/10 group shadow-2xl"style={{ aspectRatio: feature.aspectRatio || "16/9" }}diff --git a/app/components/ui/home/Featuresgrid.tsx b/app/components/ui/home/Featuresgrid.tsxindex 7066879..a43a1ba 100644--- a/app/components/ui/home/Featuresgrid.tsx+++ b/app/components/ui/home/Featuresgrid.tsx@@ -23,16 +23,19 @@ export default function FeaturesGrid() {<div className="grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-4 auto-rows-[300px]"><article className="relative group col-span-1 md:col-span-2 lg:col-span-2 lg:row-span-2 squircle-element-2xl bg-neutral-950 border border-white/10 overflow-hidden hover:border-white/20 transition-colors"><div className="absolute inset-0 bg-[url('/images/bento/bg-phone.avif')] bg-cover bg-bottom transition-[transform,opacity] duration-500 group-hover:opacity-50" />- <div className="absolute inset-0 bg-gradient-to-t from-neutral-950 via-neutral-950/60 sm:via-neutral-950/20 to-transparent pointer-events-none z-10" />- <div className="absolute top-0 inset-x-0 flex justify-center z-20 pointer-events-none">++ <div className="absolute inset-0 bg-gradient-to-t from-neutral-950 via-neutral-950/20 to-transparent pointer-events-none z-10" />++ <div className="absolute -top-22 sm:top-0 inset-x-0 flex justify-center z-20 pointer-events-none"><imgsrc="/images/bento/3d-device.webp"alt={t("alts.abstract3dRendering")}loading="lazy"decoding="async"- className="w-auto h-auto max-h-[550px] object-contain transition-transform duration-500 group-hover:scale-105 select-none"+ className="w-auto h-auto max-h-[300px] sm:max-h-[550px] object-contain object-bottom transition-transform duration-500 group-hover:scale-105 select-none"/></div>+<div className="absolute bottom-0 left-0 p-8 z-30"><h3 className="text-xl font-medium text-white mb-2">{t("cards.deviceMockups.title")}@@ -49,7 +52,7 @@ export default function FeaturesGrid() {{t("cards.transparency.title")}</h2></div>- <div className="relative w-full mt-24 h-[300px] flex justify-center items-start">+ <div className="relative w-full mt-40 sm:mt-24 h-[300px] flex justify-center items-start"><imgsrc="/images/bento/transparency-3.webp"alt={t("alts.backgroundLayer3")}@@ -84,7 +87,7 @@ export default function FeaturesGrid() {/><div className="absolute inset-0 bg-gradient-to-t from-black via-black/40 to-transparent pointer-events-none z-20 transition-all duration-500 ease-in-out group-hover:opacity-0" /><div className="absolute inset-0 bg-[radial-gradient(ellipse_at_bottom_right,_var(--tw-gradient-stops))] from-neutral-800/20 via-neutral-950/0 to-transparent pointer-events-none" />- <h2 className="text-6xl font-bold tracking-tighter text-transparent bg-clip-text bg-gradient-to-b from-white to-neutral-100 relative z-30 text-shadow-2xs">+ <h2 className="text-4xl sm:text-6xl font-bold tracking-tighter text-transparent bg-clip-text bg-gradient-to-b from-white to-neutral-100 relative z-30 text-shadow-2xs">500+</h2><div className="relative z-30 mt-4">@@ -115,21 +118,24 @@ export default function FeaturesGrid() {<article className="relative group col-span-1 md:col-span-2 lg:col-span-2 squircle-element-2xl bg-neutral-950 border border-white/10 overflow-hidden hover:border-white/20 transition-colors p-8 flex flex-col justify-between"><div className="absolute inset-0 bg-[url('/images/bento/bg-elements.avif')] bg-cover bg-bottom opacity-100 transition-all duration-500 ease-in-out group-hover:scale-105 group-hover:opacity-50" />- <div className="absolute bottom-0 right-0 z-10 max-w-[50%] pointer-events-none">++ <div className="absolute bottom-0 right-0 z-10 max-w-[75%] sm:max-w-[50%] pointer-events-none"><imgsrc="/images/bento/phone-elements.webp"alt={t("alts.rightAsset")}loading="lazy"decoding="async"- className="w-auto h-auto max-h-[580px] object-contain transition-all duration-500 ease-in-out group-hover:scale-105 group-hover:rotate-3 drop-shadow-[0_20px_20px_rgba(0,0,0,0.65)] select-none"+ className="w-auto h-auto max-h-[280px] sm:max-h-[580px] object-contain object-bottom transition-all duration-500 ease-in-out group-hover:scale-105 group-hover:rotate-3 drop-shadow-[0_20px_20px_rgba(0,0,0,0.65)] select-none"/></div>+<div className="absolute inset-0 bg-gradient-to-t from-black via-black/40 to-transparent pointer-events-none z-20 transition-all duration-500 ease-in-out group-hover:opacity-0" />+<div className="relative z-30 mt-auto">- <h3 className="text-lg font-medium text-white mb-3">+ <h3 className="text-lg font-medium text-white mb-0 sm:mb-3">{t("cards.elementsLayers.title")}</h3>- <div className="flex gap-3 flex-wrap">+ <div className="hidden sm:flex gap-3 flex-wrap">{["textOverlay", "svgShapes", "blurEffects"].map((tag) => (<spankey={tag}@@ -142,6 +148,7 @@ export default function FeaturesGrid() {</div></article>+<article className="relative group col-span-1 md:col-span-1 lg:col-span-2 squircle-element-2xl bg-neutral-950 border border-white/10 overflow-hidden hover:border-white/20 transition-colors p-8 flex flex-col justify-end"><div className="absolute inset-0 bg-[url('/images/bento/multi-track.avif')] bg-cover bg-bottom transition-all duration-500 ease-in-out group-hover:scale-105 group-hover:opacity-50" /><div className="absolute inset-0 bg-gradient-to-t from-black via-black/40 to-transparent pointer-events-none z-20 transition-all duration-500 ease-in-out group-hover:opacity-0" />diff --git a/app/components/ui/home/Hero.tsx b/app/components/ui/home/Hero.tsxindex 7e78a46..e8468de 100644--- a/app/components/ui/home/Hero.tsx+++ b/app/components/ui/home/Hero.tsx@@ -4,7 +4,7 @@ import { useRef, useState, useCallback } from "react";import { useRouter } from "next/navigation";import { saveUploadedVideo } from "@/lib/video-upload-cache";import { saveUploadedImage } from "@/lib/image-upload-cache";-import { useLocale, useTranslations } from "next-intl";+import { useTranslations } from "next-intl";import Link from "next/link";import GitHubBadge from "@/components/ui/GitHubStars";@@ -16,7 +16,6 @@ interface HeroProps {export default function Hero({ onVideoUpload, onPhotoUpload }: HeroProps) {const t = useTranslations("hero");const router = useRouter();- const locale = useLocale();const videoInputRef = useRef<HTMLInputElement>(null);const [isDraggingVideo, setIsDraggingVideo] = useState(false);diff --git a/app/components/ui/home/VideoHero.tsx b/app/components/ui/home/VideoHero.tsxindex 407851a..4a57dbb 100644--- a/app/components/ui/home/VideoHero.tsx+++ b/app/components/ui/home/VideoHero.tsx@@ -7,9 +7,18 @@ export default function VideoHero() {return (<section className="relative w-full overflow-visible flex justify-center animate-fade-in-up">- <div className="pointer-events-none absolute top-0 left-1/2 -translate-x-1/2 w-screen max-w-480 h-full -z-10">- <div className="absolute inset-0 -top-28 bottom-64 mix-blend-hard-light blur-[80px]" style={{ background: 'linear-gradient(rgba(0, 0, 0, 0) 0%, rgba(0, 138, 255, 0.1) 30%, rgb(255, 255, 255) 20%, rgb(247, 164, 66) 70%, rgb(233, 66, 247) 100%)' }} />- <div className="absolute inset-0 -top-28 bottom-64 mix-blend-soft-light blur-[80px]" style={{ background: 'linear-gradient(rgba(0, 0, 0, 0) 0%, rgba(0, 138, 255, 0.2) 35%, rgb(255, 255, 255) 70%, rgb(247, 164, 66) 80%, rgb(233, 66, 247) 100%)' }} />++ <div className="pointer-events-none absolute top-0 left-1/2 -translate-x-1/2 w-screen min-w-[140vw] md:min-w-0 max-w-480 h-full -z-10 overflow-visible flex justify-center">++ <div+ className="absolute inset-0 -top-28 bottom-64 w-full h-full mix-blend-hard-light blur-[120px] md:blur-[80px] transform-gpu"+ style={{ background: 'linear-gradient(rgba(0, 0, 0, 0) 0%, rgba(0, 138, 255, 0.1) 30%, rgb(255, 255, 255) 20%, rgb(247, 164, 66) 70%, rgb(233, 66, 247) 100%)' }}+ />++ <div+ className="absolute inset-0 -top-28 bottom-64 w-full h-full mix-blend-soft-light blur-[120px] md:blur-[80px] transform-gpu"+ style={{ background: 'linear-gradient(rgba(0, 0, 0, 0) 0%, rgba(0, 138, 255, 0.2) 35%, rgb(255, 255, 255) 70%, rgb(247, 164, 66) 80%, rgb(233, 66, 247) 100%)' }}+ /></div><div className="relative px-4 w-full">diff --git a/components/ui/GitHubStars.tsx b/components/ui/GitHubStars.tsxindex f2d16b1..0d7476c 100644--- a/components/ui/GitHubStars.tsx+++ b/components/ui/GitHubStars.tsx@@ -24,7 +24,7 @@ export default function GitHubBadge() {href="https://github.com/CristianOlivera1/openvid"target="_blank"rel="noopener noreferrer"- className="relative inline-flex items-center gap-2 px-3 py-1.5 rounded-full bg-linear-to-r from-yellow-400 via-amber-500 to-yellow-600 text-black font-semibold text-sm shadow-xl hover:scale-105 active:scale-95 transition-all duration-200 border border-white/20 select-none whitespace-nowrap"+ className="relative inline-flex items-center gap-2 px-3 py-1 sm:py-1.5 rounded-full bg-linear-to-r from-yellow-400 via-amber-500 to-yellow-600 text-black font-semibold text-sm shadow-xl hover:scale-105 active:scale-95 transition-all duration-200 border border-white/20 select-none whitespace-nowrap"aria-label={`Repositorio de GitHub, ${stars ?? ""} estrellas`}><div