Create professional demos and 3D mockups in seconds, directly in your browser
Refactor code structure for improved readability and maintainability
CristianOlivera1f6f3c200f78e
diff --git a/app/(home)/donate/DonateClient.tsx b/app/(home)/donate/DonateClient.tsxindex 5c52fdd..fab2354 100644--- a/app/(home)/donate/DonateClient.tsx+++ b/app/(home)/donate/DonateClient.tsx@@ -14,7 +14,6 @@ export default function DonateClient({methods: Method[];defaultMethod: string;}) {- // Inicializamos el estado con el método que nos indica el servidorconst [selected, setSelected] = useState<string | null>(defaultMethod);const [copied, setCopied] = useState<string | null>(null);const [qrModalSrc, setQrModalSrc] = useState<string | null>(null);diff --git a/app/(home)/page.tsx b/app/(home)/page.tsxindex 618ac57..68e0401 100644--- a/app/(home)/page.tsx+++ b/app/(home)/page.tsx@@ -1,3 +1,4 @@+import DemoVideo from "../components/ui/DemoVideo";import DonationCard from "../components/ui/DonationCard";import EditorPreview from "../components/ui/EditorPreview";import Hero from "../components/ui/Hero";@@ -25,6 +26,12 @@ export default function Home() {<DonationCard /></div></section>++ <section className="w-full py-16">+ <div className="max-w-6xl mx-auto px-6">+ <DemoVideo/>+ </div>+ </section></div>);}\ No newline at end of filediff --git a/app/components/ui/DemoVideo.tsx b/app/components/ui/DemoVideo.tsxnew file mode 100644index 0000000..5c89f18--- /dev/null+++ b/app/components/ui/DemoVideo.tsx@@ -0,0 +1,59 @@+"use client";++import React, { useEffect, useRef } from "react";++export default function DemoVideo() {+ const videoRef = useRef<HTMLVideoElement>(null);++ useEffect(() => {+ const observer = new IntersectionObserver(+ (entries) => {+ entries.forEach((entry) => {+ if (entry.isIntersecting) {+ videoRef.current?.play().catch(() => { });+ } else {+ videoRef.current?.pause();+ }+ });+ },+ { threshold: 0.1 }+ );++ if (videoRef.current) {+ observer.observe(videoRef.current);+ }++ return () => observer.disconnect();+ }, []);++ return (+ <div className="w-full flex flex-col items-center mb-30">+ <h2 className="text-4xl md:text-6xl text-center font-bold tracking-tighter text-white mb-10 leading-tight drop-shadow-[1.2px_1.2px_100.2px_rgba(183,203,248,1)]">+ Mira lo que puedes <br />+ <span className="bg-linear-to-r from-[#003780] to-white bg-clip-text text-transparent">+ crear con openvid+ </span>+ </h2>++ <div className="relative group w-full overflow-hidden rounded-3xl border border-white/10 bg-[#0E0E12] shadow-2xl transform-gpu">+ <div className="absolute -inset-px bg-linear-to-r from-blue-500/20 via-purple-500/20 to-blue-500/20 rounded-3xl opacity-0 group-hover:opacity-100 transition-opacity duration-500 blur-xl pointer-events-none" />++ <div className="absolute inset-0 bg-linear-to-t from-[#0E0E12] via-transparent to-transparent z-10 pointer-events-none" />++ <video+ ref={videoRef}+ muted+ loop+ playsInline+ preload="metadata"+ poster="/images/pages/openvid2.webp"+ className="relative z-0 w-full h-auto object-cover transform-gpu transition-transform duration-700 group-hover:scale-[1.02]"+ >+ <source src="images/pages/demo.mp4" type="video/mp4" />+ Tu navegador no soporta la reproducción de videos.+ </video>++ </div>+ </div>+ );+}\ No newline at end of filediff --git a/app/components/ui/EditorPreview.tsx b/app/components/ui/EditorPreview.tsxindex db51279..ade28b2 100644--- a/app/components/ui/EditorPreview.tsx+++ b/app/components/ui/EditorPreview.tsx@@ -36,7 +36,7 @@ export default function EditorPreview() {></div><img- src="/images/pages/openvid.webp"+ src="/images/pages/openvid2.webp"alt="openvid Editor Preview"className="w-full h-auto object-cover rounded-xl"loading="lazy"diff --git a/app/components/ui/ExportOverlay.tsx b/app/components/ui/ExportOverlay.tsxindex dc51064..462ff46 100644--- a/app/components/ui/ExportOverlay.tsx+++ b/app/components/ui/ExportOverlay.tsx@@ -54,12 +54,20 @@ export function ExportOverlay({ exportProgress, onCancel, isTransparentExport }:<div className="flex flex-col gap-2 border-l-2 border-white/10 pl-5 py-1"><p className="text-lg font-medium tracking-tight leading-none shimmer-text">{exportProgress.status === "preparing" && "Preparando entorno de renderizado"}- {exportProgress.status === "encoding" && "Codificando secuencia de video"}- {exportProgress.status === "finalizing" && "Empaquetando archivos finales"}+ {exportProgress.status === "encoding" && (+ exportProgress.message.startsWith("[Paso 1/2]")+ ? "Capturando frames PNG (Paso 1 de 2)"+ : "Codificando secuencia de video"+ )}+ {exportProgress.status === "finalizing" && (+ exportProgress.message.startsWith("[Paso 2/2]")+ ? "Codificando video WebM (Paso 2 de 2)"+ : "Empaquetando archivos finales"+ )}</p><p className="text-sm text-white/40 font-mono italic mt-0.5 tracking-wide">- {exportProgress.message}+ {exportProgress.message.replace(/^\[Paso \d\/\d\] /, "")}</p></div>diff --git a/app/components/ui/editor/MockupMenu.tsx b/app/components/ui/editor/MockupMenu.tsxindex 9adf0b1..3a8c2cd 100644--- a/app/components/ui/editor/MockupMenu.tsx+++ b/app/components/ui/editor/MockupMenu.tsx@@ -40,13 +40,6 @@ export function MockupMenu({const handleMockupSelect = (id: string) => {onMockupChange?.(id);-- // Reset opacity to default when changing mockup to ensure slider works immediately- if (id !== mockupId) {- setTimeout(() => {- onMockupConfigChange?.({ headerOpacity: 100 });- }, 0);- }};const handleCategoryChange = (cat: MockupCategory) => {diff --git a/app/components/ui/editor/ToolsSidebar.tsx b/app/components/ui/editor/ToolsSidebar.tsxindex fedce3c..d60c169 100644--- a/app/components/ui/editor/ToolsSidebar.tsx+++ b/app/components/ui/editor/ToolsSidebar.tsx@@ -74,7 +74,7 @@ export function ToolsSidebar({><div className="flex flex-col gap-4 w-full overflow-y-auto px-2 custom-scrollbar mask-y-from-85% mask-y-to-99%">- <div className="shrink-0 h-4" aria-hidden="true" />+ <div className="shrink-0 h-12" aria-hidden="true" /><SidebarToolicon="solar:gallery-wide-linear"@@ -134,7 +134,7 @@ export function ToolsSidebar({onClick={() => onToolChange("zoom")}/>- <div className="shrink-0 h-4" aria-hidden="true" />+ <div className="shrink-0 h-12" aria-hidden="true" /></div><divdiff --git a/app/components/ui/editor/VideoCanvas.tsx b/app/components/ui/editor/VideoCanvas.tsxindex e731f18..34d3f20 100644--- a/app/components/ui/editor/VideoCanvas.tsx+++ b/app/components/ui/editor/VideoCanvas.tsx@@ -7,7 +7,7 @@ import { ASPECT_RATIO_DIMENSIONS } from "@/types";import { interpolateCursorPosition, DEFAULT_CURSOR_CONFIG, EMPTY_CURSOR_DATA } from "@/types/cursor.types";import type { CursorKeyframe } from "@/types/cursor.types";import { getWallpaperUrl } from "@/lib/wallpaper.utils";-import { drawRoundedRect, drawRoundedRectBottomOnly, calculateScaledPadding, applyCanvasBackground, getAspectRatioStyle, getMaxWidth } from "@/lib/canvas.utils";+import { drawRoundedRect, drawRoundedRectBottomOnly, calculateScaledPadding, applyCanvasBackground, getAspectRatioStyle, getMaxWidth, Corner, getCornerStyle, getNearestCorner } from "@/lib/canvas.utils";import { drawMockupToCanvas } from "@/lib/mockup-canvas.utils";import { zoomLevelToFactor, speedToTransitionMs, ZOOM_EASING } from "@/types/zoom.types";import type { ZoomFragment } from "@/types/zoom.types";@@ -18,69 +18,9 @@ import { calculateSmoothZoom } from "@/lib/canvas.utils";import { SVG_COMPONENTS, getSvgDataUrl } from "@/components/canvas-svg";import { getCursorSvgDataUrl } from "@/components/cursor-svg";import { VIDEO_Z_INDEX, BOTTOM_ONLY_RADIUS_MOCKUPS, SELF_SHADOWING_MOCKUPS } from "@/lib/constants";+import { RotationHandleIcon } from "@/components/ui/RotationHandleIcon";export type { VideoCanvasHandle, VideoCanvasProps };-type Corner = "top-left" | "top-right" | "bottom-right" | "bottom-left";--function getNearestCorner(e: React.MouseEvent<HTMLElement>, rotationDeg = 0): Corner {- const rect = e.currentTarget.getBoundingClientRect();- const cx = rect.left + rect.width / 2;- const cy = rect.top + rect.height / 2;-- const dx = e.clientX - cx;- const dy = e.clientY - cy;-- const rad = (-rotationDeg * Math.PI) / 180;- const localX = dx * Math.cos(rad) - dy * Math.sin(rad);- const localY = dx * Math.sin(rad) + dy * Math.cos(rad);-- const isRight = localX > 0;- const isBottom = localY > 0;- if (!isRight && !isBottom) return "top-left";- if (isRight && !isBottom) return "top-right";- if (isRight && isBottom) return "bottom-right";- return "bottom-left";-}--function getCornerStyle(corner: Corner, offset = -10): React.CSSProperties {- const base: React.CSSProperties = { position: "absolute", zIndex: 20 };- switch (corner) {- case "top-left":- return { ...base, top: offset, left: offset, cursor: "nw-resize" };- case "top-right":- return { ...base, top: offset, right: offset, cursor: "ne-resize" };- case "bottom-right":- return { ...base, bottom: offset, right: offset, cursor: "se-resize" };- case "bottom-left":- return { ...base, bottom: offset, left: offset, cursor: "sw-resize" };- }-}--const CORNER_ICON_ROTATION: Record<Corner, number> = {- "top-right": 0, // posición natural del SVG- "bottom-right": 90, // gira 90° a la derecha- "bottom-left": 180, // gira 180°- "top-left": 270, // gira 270°-};--function RotationHandleIcon({ corner, color = "#3b82f6" }: { corner: Corner; color?: string }) {- const rot = CORNER_ICON_ROTATION[corner];- const maskId = `rotation-mask-${corner}`;-- return (- <div style={{ display: "flex", transform: `rotate(${rot}deg)` }}>- <svg width="18" height="18" viewBox="0 0 685 670" fill="none" xmlns="http://www.w3.org/2000/svg">- <mask id={maskId} maskUnits="userSpaceOnUse" x="-17.9957" y="-16.9657" width="719.848" height="701.972" fill="black">- <rect fill="white" x="-17.9957" y="-16.9657" width="719.848" height="701.972" />- <path d="M188.7 17.3203C192.371 20.6905 195.297 24.7568 196.896 29.5153C196.804 31.4331 196.628 33.3462 196.407 35.253L196.086 38.3485C194.185 45.1048 187.596 49.2812 182.3 53.4645L179.893 55.3804C170.681 62.6755 161.291 69.7335 151.888 76.7785L146.587 80.7623C142.336 83.9569 138.083 87.1485 133.827 90.3371C136.643 91.7362 138.62 92.1593 141.702 92.6303C221.494 105.429 298.804 139.014 361.051 190.907L363.116 192.61C386.479 211.924 407.834 233.265 427.193 256.593C428.51 258.175 429.841 259.745 431.187 261.303C436.124 267.044 440.735 273.001 445.304 279.039L447.144 281.465C451.048 286.661 454.678 291.975 458.182 297.446C458.972 298.651 459.763 299.855 460.555 301.057C467.035 310.998 472.939 321.209 478.629 331.621L479.952 334.032C490.563 353.458 499.248 373.561 507.205 394.202L508.112 396.528C532.411 459.154 538.3 527.308 533.707 593.826L536.359 591.825C538.266 590.388 540.177 588.958 542.093 587.536C547.16 583.76 552.068 579.908 556.803 575.724C559.317 573.573 561.966 571.63 564.625 569.663C566.651 568.108 568.562 566.469 570.478 564.781C574.33 561.404 578.359 558.322 582.475 555.275C584.3 553.907 586.097 552.504 587.867 551.066C592.182 548.09 595.457 547.11 600.709 547.252C606.012 548.246 610.34 550.778 613.423 555.254C616.471 560.89 617.202 565.69 615.538 571.991C611.911 579.023 605.957 583.371 599.841 588.182C597.764 589.824 595.695 591.477 593.635 593.139C590.552 595.621 587.465 598.099 584.374 600.573C579.939 604.125 575.509 607.686 571.084 611.255L568.966 612.962L564.737 616.371C562.596 618.097 560.454 619.822 558.311 621.548C554.757 624.408 551.204 627.27 547.653 630.134L543.385 633.572C541.279 635.269 539.173 636.967 537.067 638.666L535.056 640.287C531.434 643.215 527.882 646.227 524.401 649.321C520.128 652.924 517.027 654.734 511.276 654.638C504.105 654.004 499.663 652.411 494.944 646.952C492.961 644.459 491.036 641.92 489.17 639.337C487.454 637.019 485.664 634.855 483.756 632.696C480.714 629.246 477.973 625.634 475.234 621.942C473.027 619.061 470.646 616.357 468.252 613.632C466.614 611.711 465.096 609.742 463.596 607.712C461.593 605.011 459.475 602.398 457.248 599.879C454.628 596.895 452.205 593.821 449.837 590.634C447.52 587.515 445.157 584.511 442.585 581.601C439.023 577.562 435.848 573.275 432.645 568.951C430.766 566.503 428.804 564.231 426.725 561.954C422.256 556.843 419.912 551.54 420.356 544.631C421.353 539.257 423.925 535.418 428.315 532.199C432.962 529.558 437.478 528.95 442.76 529.556C451.493 532.113 456.527 540.68 461.659 547.618C463.214 549.643 464.853 551.555 466.541 553.47C469.161 556.454 471.584 559.528 473.952 562.715C476.269 565.834 478.632 568.838 481.205 571.75C484.822 575.845 488.047 580.2 491.28 584.603C493.001 586.821 494.783 588.71 496.789 590.662C504.124 496.484 482.562 403.63 431.234 323.957L429.63 321.468C428.235 319.326 426.829 317.19 425.414 315.061L423.957 312.797C419.497 305.991 414.657 299.488 409.77 292.985L407.699 290.221C403.597 284.783 399.284 279.507 394.769 274.406C393.892 273.397 393.014 272.387 392.138 271.377C328.722 199.526 238.424 143.586 142.368 130.844L138.269 130.285C134.982 129.837 131.694 129.395 128.405 128.958L130.038 131.102C135.126 137.781 140.205 144.466 145.275 151.158C147.881 154.598 150.492 158.034 153.109 161.467C155.636 164.781 158.155 168.101 160.667 171.426C161.626 172.691 162.588 173.954 163.553 175.215C164.905 176.987 166.251 178.763 167.591 180.545L169.913 183.602C173.799 189.622 174.325 194.307 173.148 201.193C171.749 206.255 169.054 209.036 164.818 212.141C159.201 214.73 155.104 214.729 149.217 213.352C142.679 210.418 138.628 203.943 134.466 198.389L132.361 195.61C130.075 192.585 127.794 189.557 125.517 186.526L120.747 180.204C117.419 175.792 114.094 171.377 110.773 166.96C106.938 161.861 103.096 156.766 99.2489 151.675C95.5407 146.767 91.837 141.855 88.1379 136.939C86.5663 134.852 84.993 132.767 83.418 130.682C81.2195 127.77 79.0256 124.855 76.8362 121.935L74.8605 119.328C70.2774 113.197 67.1715 108.398 67.725 100.558C68.83 93.5503 72.4821 90.3096 77.777 85.9979L79.4553 84.631C85.6232 79.6401 91.9415 74.85 98.2822 70.0813L102.047 67.2411C104.649 65.2779 107.253 63.3169 109.858 61.3581C113.178 58.8594 116.495 56.358 119.809 53.8538C122.389 51.9069 124.971 49.9612 127.553 48.0168L131.222 45.2499C137.374 40.6033 143.537 36.1004 150.092 32.0322C151.512 30.9025 152.898 29.7291 154.246 28.5137C164.229 19.7 175.218 10.6187 188.7 17.3203Z" />- </mask>- <path d="M188.7 17.3203C192.371 20.6905 195.297 24.7568 196.896 29.5153C196.804 31.4331 196.628 33.3462 196.407 35.253L196.086 38.3485C194.185 45.1048 187.596 49.2812 182.3 53.4645L179.893 55.3804C170.681 62.6755 161.291 69.7335 151.888 76.7785L146.587 80.7623C142.336 83.9569 138.083 87.1485 133.827 90.3371C136.643 91.7362 138.62 92.1593 141.702 92.6303C221.494 105.429 298.804 139.014 361.051 190.907L363.116 192.61C386.479 211.924 407.834 233.265 427.193 256.593C428.51 258.175 429.841 259.745 431.187 261.303C436.124 267.044 440.735 273.001 445.304 279.039L447.144 281.465C451.048 286.661 454.678 291.975 458.182 297.446C458.972 298.651 459.763 299.855 460.555 301.057C467.035 310.998 472.939 321.209 478.629 331.621L479.952 334.032C490.563 353.458 499.248 373.561 507.205 394.202L508.112 396.528C532.411 459.154 538.3 527.308 533.707 593.826L536.359 591.825C538.266 590.388 540.177 588.958 542.093 587.536C547.16 583.76 552.068 579.908 556.803 575.724C559.317 573.573 561.966 571.63 564.625 569.663C566.651 568.108 568.562 566.469 570.478 564.781C574.33 561.404 578.359 558.322 582.475 555.275C584.3 553.907 586.097 552.504 587.867 551.066C592.182 548.09 595.457 547.11 600.709 547.252C606.012 548.246 610.34 550.778 613.423 555.254C616.471 560.89 617.202 565.69 615.538 571.991C611.911 579.023 605.957 583.371 599.841 588.182C597.764 589.824 595.695 591.477 593.635 593.139C590.552 595.621 587.465 598.099 584.374 600.573C579.939 604.125 575.509 607.686 571.084 611.255L568.966 612.962L564.737 616.371C562.596 618.097 560.454 619.822 558.311 621.548C554.757 624.408 551.204 627.27 547.653 630.134L543.385 633.572C541.279 635.269 539.173 636.967 537.067 638.666L535.056 640.287C531.434 643.215 527.882 646.227 524.401 649.321C520.128 652.924 517.027 654.734 511.276 654.638C504.105 654.004 499.663 652.411 494.944 646.952C492.961 644.459 491.036 641.92 489.17 639.337C487.454 637.019 485.664 634.855 483.756 632.696C480.714 629.246 477.973 625.634 475.234 621.942C473.027 619.061 470.646 616.357 468.252 613.632C466.614 611.711 465.096 609.742 463.596 607.712C461.593 605.011 459.475 602.398 457.248 599.879C454.628 596.895 452.205 593.821 449.837 590.634C447.52 587.515 445.157 584.511 442.585 581.601C439.023 577.562 435.848 573.275 432.645 568.951C430.766 566.503 428.804 564.231 426.725 561.954C422.256 556.843 419.912 551.54 420.356 544.631C421.353 539.257 423.925 535.418 428.315 532.199C432.962 529.558 437.478 528.95 442.76 529.556C451.493 532.113 456.527 540.68 461.659 547.618C463.214 549.643 464.853 551.555 466.541 553.47C469.161 556.454 471.584 559.528 473.952 562.715C476.269 565.834 478.632 568.838 481.205 571.75C484.822 575.845 488.047 580.2 491.28 584.603C493.001 586.821 494.783 588.71 496.789 590.662C504.124 496.484 482.562 403.63 431.234 323.957L429.63 321.468C428.235 319.326 426.829 317.19 425.414 315.061L423.957 312.797C419.497 305.991 414.657 299.488 409.77 292.985L407.699 290.221C403.597 284.783 399.284 279.507 394.769 274.406C393.892 273.397 393.014 272.387 392.138 271.377C328.722 199.526 238.424 143.586 142.368 130.844L138.269 130.285C134.982 129.837 131.694 129.395 128.405 128.958L130.038 131.102C135.126 137.781 140.205 144.466 145.275 151.158C147.881 154.598 150.492 158.034 153.109 161.467C155.636 164.781 158.155 168.101 160.667 171.426C161.626 172.691 162.588 173.954 163.553 175.215C164.905 176.987 166.251 178.763 167.591 180.545L169.913 183.602C173.799 189.622 174.325 194.307 173.148 201.193C171.749 206.255 169.054 209.036 164.818 212.141C159.201 214.73 155.104 214.729 149.217 213.352C142.679 210.418 138.628 203.943 134.466 198.389L132.361 195.61C130.075 192.585 127.794 189.557 125.517 186.526L120.747 180.204C117.419 175.792 114.094 171.377 110.773 166.96C106.938 161.861 103.096 156.766 99.2489 151.675C95.5407 146.767 91.837 141.855 88.1379 136.939C86.5663 134.852 84.993 132.767 83.418 130.682C81.2195 127.77 79.0256 124.855 76.8362 121.935L74.8605 119.328C70.2774 113.197 67.1715 108.398 67.725 100.558C68.83 93.5503 72.4821 90.3096 77.777 85.9979L79.4553 84.631C85.6232 79.6401 91.9415 74.85 98.2822 70.0813L102.047 67.2411C104.649 65.2779 107.253 63.3169 109.858 61.3581C113.178 58.8594 116.495 56.358 119.809 53.8538C122.389 51.9069 124.971 49.9612 127.553 48.0168L131.222 45.2499C137.374 40.6033 143.537 36.1004 150.092 32.0322C151.512 30.9025 152.898 29.7291 154.246 28.5137C164.229 19.7 175.218 10.6187 188.7 17.3203Z" fill="#FEFEFE" />- <path d="M188.7 17.3203C192.371 20.6905 195.297 24.7568 196.896 29.5153C196.804 31.4331 196.628 33.3462 196.407 35.253L196.086 38.3485C194.185 45.1048 187.596 49.2812 182.3 53.4645L179.893 55.3804C170.681 62.6755 161.291 69.7335 151.888 76.7785L146.587 80.7623C142.336 83.9569 138.083 87.1485 133.827 90.3371C136.643 91.7362 138.62 92.1593 141.702 92.6303C221.494 105.429 298.804 139.014 361.051 190.907L363.116 192.61C386.479 211.924 407.834 233.265 427.193 256.593C428.51 258.175 429.841 259.745 431.187 261.303C436.124 267.044 440.735 273.001 445.304 279.039L447.144 281.465C451.048 286.661 454.678 291.975 458.182 297.446C458.972 298.651 459.763 299.855 460.555 301.057C467.035 310.998 472.939 321.209 478.629 331.621L479.952 334.032C490.563 353.458 499.248 373.561 507.205 394.202L508.112 396.528C532.411 459.154 538.3 527.308 533.707 593.826L536.359 591.825C538.266 590.388 540.177 588.958 542.093 587.536C547.16 583.76 552.068 579.908 556.803 575.724C559.317 573.573 561.966 571.63 564.625 569.663C566.651 568.108 568.562 566.469 570.478 564.781C574.33 561.404 578.359 558.322 582.475 555.275C584.3 553.907 586.097 552.504 587.867 551.066C592.182 548.09 595.457 547.11 600.709 547.252C606.012 548.246 610.34 550.778 613.423 555.254C616.471 560.89 617.202 565.69 615.538 571.991C611.911 579.023 605.957 583.371 599.841 588.182C597.764 589.824 595.695 591.477 593.635 593.139C590.552 595.621 587.465 598.099 584.374 600.573C579.939 604.125 575.509 607.686 571.084 611.255L568.966 612.962L564.737 616.371C562.596 618.097 560.454 619.822 558.311 621.548C554.757 624.408 551.204 627.27 547.653 630.134L543.385 633.572C541.279 635.269 539.173 636.967 537.067 638.666L535.056 640.287C531.434 643.215 527.882 646.227 524.401 649.321C520.128 652.924 517.027 654.734 511.276 654.638C504.105 654.004 499.663 652.411 494.944 646.952C492.961 644.459 491.036 641.92 489.17 639.337C487.454 637.019 485.664 634.855 483.756 632.696C480.714 629.246 477.973 625.634 475.234 621.942C473.027 619.061 470.646 616.357 468.252 613.632C466.614 611.711 465.096 609.742 463.596 607.712C461.593 605.011 459.475 602.398 457.248 599.879C454.628 596.895 452.205 593.821 449.837 590.634C447.52 587.515 445.157 584.511 442.585 581.601C439.023 577.562 435.848 573.275 432.645 568.951C430.766 566.503 428.804 564.231 426.725 561.954C422.256 556.843 419.912 551.54 420.356 544.631C421.353 539.257 423.925 535.418 428.315 532.199C432.962 529.558 437.478 528.95 442.76 529.556C451.493 532.113 456.527 540.68 461.659 547.618C463.214 549.643 464.853 551.555 466.541 553.47C469.161 556.454 471.584 559.528 473.952 562.715C476.269 565.834 478.632 568.838 481.205 571.75C484.822 575.845 488.047 580.2 491.28 584.603C493.001 586.821 494.783 588.71 496.789 590.662C504.124 496.484 482.562 403.63 431.234 323.957L429.63 321.468C428.235 319.326 426.829 317.19 425.414 315.061L423.957 312.797C419.497 305.991 414.657 299.488 409.77 292.985L407.699 290.221C403.597 284.783 399.284 279.507 394.769 274.406C393.892 273.397 393.014 272.387 392.138 271.377C328.722 199.526 238.424 143.586 142.368 130.844L138.269 130.285C134.982 129.837 131.694 129.395 128.405 128.958L130.038 131.102C135.126 137.781 140.205 144.466 145.275 151.158C147.881 154.598 150.492 158.034 153.109 161.467C155.636 164.781 158.155 168.101 160.667 171.426C161.626 172.691 162.588 173.954 163.553 175.215C164.905 176.987 166.251 178.763 167.591 180.545L169.913 183.602C173.799 189.622 174.325 194.307 173.148 201.193C171.749 206.255 169.054 209.036 164.818 212.141C159.201 214.73 155.104 214.729 149.217 213.352C142.679 210.418 138.628 203.943 134.466 198.389L132.361 195.61C130.075 192.585 127.794 189.557 125.517 186.526L120.747 180.204C117.419 175.792 114.094 171.377 110.773 166.96C106.938 161.861 103.096 156.766 99.2489 151.675C95.5407 146.767 91.837 141.855 88.1379 136.939C86.5663 134.852 84.993 132.767 83.418 130.682C81.2195 127.77 79.0256 124.855 76.8362 121.935L74.8605 119.328C70.2774 113.197 67.1715 108.398 67.725 100.558C68.83 93.5503 72.4821 90.3096 77.777 85.9979L79.4553 84.631C85.6232 79.6401 91.9415 74.85 98.2822 70.0813L102.047 67.2411C104.649 65.2779 107.253 63.3169 109.858 61.3581C113.178 58.8594 116.495 56.358 119.809 53.8538C122.389 51.9069 124.971 49.9612 127.553 48.0168L131.222 45.2499C137.374 40.6033 143.537 36.1004 150.092 32.0322C151.512 30.9025 152.898 29.7291 154.246 28.5137C164.229 19.7 175.218 10.6187 188.7 17.3203Z" stroke="black" strokeWidth="25" mask={`url(#${maskId})`} />- </svg>- </div>- );-}-export const VideoCanvas = forwardRef<VideoCanvasHandle, VideoCanvasProps>(function VideoCanvas({videoRef,videoUrl,@@ -222,6 +162,10 @@ export const VideoCanvas = forwardRef<VideoCanvasHandle, VideoCanvasProps>(funct// Canvas element images cache (only for actual images, not SVGs)const elementImagesRef = useRef<Map<string, HTMLImageElement>>(new Map());+ // SVG element image cache keyed by "svgId-color" — avoids new Image() per frame+ const svgImageCacheRef = useRef<Map<string, HTMLImageElement>>(new Map());+ // Cursor image cache keyed by data URL — avoids new Image() + decode per frame+ const cursorImageCacheRef = useRef<Map<string, HTMLImageElement>>(new Map());// Actualizar canvas dimensions cuando cambia el aspect ratiouseEffect(() => {@@ -425,17 +369,23 @@ export const VideoCanvas = forwardRef<VideoCanvasHandle, VideoCanvasProps>(functconst svgDataUrl = getSvgDataUrl(svgElement.svgId, svgElement.color || "#FFFFFF");if (!svgDataUrl) continue;- const svgImage = new Image();- svgImage.src = svgDataUrl;-- await new Promise<void>((resolve) => {- if (svgImage.complete) {- resolve();- } else {- svgImage.onload = () => resolve();- svgImage.onerror = () => resolve();- }- });+ const cacheKey = `${svgElement.svgId}-${svgElement.color || "#FFFFFF"}`;+ let svgImage = svgImageCacheRef.current.get(cacheKey);+ if (!svgImage || svgImage.src !== svgDataUrl) {+ svgImage = new Image();+ svgImageCacheRef.current.set(cacheKey, svgImage);+ svgImage.src = svgDataUrl;+ await new Promise<void>((resolve) => {+ if (svgImage!.complete) resolve();+ else { svgImage!.onload = () => resolve(); svgImage!.onerror = () => resolve(); }+ });+ } else if (!svgImage.complete) {+ await new Promise<void>((resolve) => {+ svgImage!.onload = () => resolve();+ svgImage!.onerror = () => resolve();+ setTimeout(resolve, 500);+ });+ }ctx.save();@@ -686,14 +636,15 @@ export const VideoCanvas = forwardRef<VideoCanvasHandle, VideoCanvasProps>(functcontainerWidth,containerHeight,scaledRadius,- mockupShadowBlur+ mockupShadowBlur,+ canvasWidth);videoX = mockupResult.contentX;videoY = mockupResult.contentY;videoWidth = mockupResult.contentWidth;videoHeight = mockupResult.contentHeight;- videoRadius = mockupId === "iphone-slim" ? scaledRadius * 1.8 : scaledRadius;+ videoRadius = mockupId === "iphone-slim" || mockupId === "glass-curve" || mockupId ==="glass-full" ? scaledRadius * 6 : scaledRadius;}// 7. Dibujar video con esquinas redondeadas@@ -740,18 +691,22 @@ export const VideoCanvas = forwardRef<VideoCanvasHandle, VideoCanvasProps>(funct// Get cursor image from cacheconst cursorDataUrl = getCursorSvgDataUrl(cursorConfig.style, cursorPos.state, cursorConfig.color, cursorConfig.size);if (cursorDataUrl) {- const cursorImg = new Image();- cursorImg.src = cursorDataUrl;-- // Wait for cursor image to load- await new Promise<void>((resolve) => {- if (cursorImg.complete) {- resolve();- } else {- cursorImg.onload = () => resolve();- cursorImg.onerror = () => resolve();- }- });+ let cursorImg = cursorImageCacheRef.current.get(cursorDataUrl);+ if (!cursorImg) {+ cursorImg = new Image();+ cursorImageCacheRef.current.set(cursorDataUrl, cursorImg);+ cursorImg.src = cursorDataUrl;+ await new Promise<void>((resolve) => {+ if (cursorImg!.complete) resolve();+ else { cursorImg!.onload = () => resolve(); cursorImg!.onerror = () => resolve(); }+ });+ } else if (!cursorImg.complete) {+ await new Promise<void>((resolve) => {+ cursorImg!.onload = () => resolve();+ cursorImg!.onerror = () => resolve();+ setTimeout(resolve, 500);+ });+ }// Calculate cursor position relative to the video area// The cursor positions stored are percentages of the video dimensions@@ -826,11 +781,13 @@ export const VideoCanvas = forwardRef<VideoCanvasHandle, VideoCanvasProps>(funct/>{/* Preview visual - contenedor con tamaño dinámico según aspect ratio */}- <div- className="relative h-full max-h-full w-full max-w-full shrink-0 overflow-hidden border border-white/20 rounded-xl transition-all duration-300"+ <div className="relative shrink-0 overflow-hidden border border-white/20 rounded-xl transition-all duration-300"style={{aspectRatio: getAspectRatioStyle(aspectRatio, customAspectRatio ?? undefined),maxWidth: getMaxWidth(aspectRatio, customAspectRatio ?? undefined),+ width: '100%',+ height: 'auto',+ maxHeight: '100%',}}onClick={(e) => {if (!(e.target as HTMLElement).closest('[data-canvas-element]') && onElementSelect) {@@ -1174,11 +1131,9 @@ function CanvasElementsLayer({transition: isDraggingElement ? 'none' : 'transform 0.1s ease-out',};- // ── Shared mouse handlers ──────────────────────────────────const handleMouseEnter = () => setHoveredElementId(element.id);const handleMouseLeave = () => setHoveredElementId(null);const handleMouseMove = (e: React.MouseEvent<HTMLElement>) => {- // ✅ Pasar element.rotation para corregir el cálculoconst corner = getNearestCorner(e, element.rotation);setElementCorners(prev => ({ ...prev, [element.id]: corner }));};@@ -1198,7 +1153,6 @@ function CanvasElementsLayer({};};- // ── Rotation handle (shared across element types) ──────────const rotationHandle = isSelected && onElementUpdate ? (<divdata-element-rotation@@ -1220,7 +1174,6 @@ function CanvasElementsLayer({</div>) : null;- // ── Selection / hover border ───────────────────────────────const selectionBorder = (isSelected || isHovered) ? (<divclassName={`absolute inset-0 border pointer-events-none ${isSelected ? 'border-blue-500' : 'border-white/50'}`}@@ -1228,7 +1181,6 @@ function CanvasElementsLayer({/>) : null;- // ── Render by type ─────────────────────────────────────────if (element.type === "svg") {const SvgComponent = SVG_COMPONENTS[(element as SvgElement).svgId];return (diff --git a/app/components/ui/editor/mockups/GlassCurveMockup.tsx b/app/components/ui/editor/mockups/GlassCurveMockup.tsxnew file mode 100644index 0000000..42b9a11--- /dev/null+++ b/app/components/ui/editor/mockups/GlassCurveMockup.tsx@@ -0,0 +1,100 @@+"use client";++import type { MockupRenderProps } from "@/types/mockup.types";+import { hexToRgba } from "@/lib/utils";++interface GlassCurveMockupProps extends MockupRenderProps {+ shadows?: number;+ roundedCorners?: number;+}++export function GlassCurveMockup({+ children,+ config,+ className = "",+ shadows = 30,+ roundedCorners,+}: GlassCurveMockupProps) {+ const isDark = config.darkMode;+ const frameColor = isDark ? config.frameColor : "#ffffff";+ const cornerRadius = roundedCorners ?? config.cornerRadius;++ const headerOpacity = config.headerOpacity ?? 10;+ const headerScale = (config.headerScale || 100) / 100;++ const framePadding = 4 * headerScale; // Equivalente a p-1 (4px)+ const reflectionWidth = 16 * headerScale; // Equivalente a w-4 (16px)++ const notchTop = 16 * headerScale; // top-4+ const notchWidth = 40 * headerScale; // w-10+ const notchHeight = 4 * headerScale; // h-1++ const contentPaddingTop = 32 * headerScale; // pt-8++ const screenBg = isDark ? "#0a0a0a" : "#ffffff";+ const borderColor = isDark ? "rgba(255, 255, 255, 0.1)" : "rgba(255, 255, 255, 0.4)";+ const reflectionColor = isDark ? "rgba(255, 255, 255, 0.05)" : "rgba(255, 255, 255, 0.2)";+ const notchBg = isDark ? "rgba(255, 255, 255, 0.15)" : "rgba(0, 0, 0, 0.05)";++ return (+ <div+ className={`relative flex flex-col ${className}`}+ >+ <div+ className="relative flex flex-col backdrop-blur-2xl overflow-hidden"+ style={{+ padding: `${framePadding}px`,+ backgroundColor: hexToRgba(frameColor, headerOpacity),+ borderRadius: `${cornerRadius * 2.5}px`,+ boxShadow: shadows > 0+ ? `0 ${shadows}px ${shadows * 2}px rgba(0,0,0,0.25)`+ : 'none',+ border: `3px solid ${borderColor}`,+ }}+ >+ <div+ className="absolute inset-y-0 left-0 z-10 pointer-events-none"+ style={{+ width: `${reflectionWidth}px`,+ background: `linear-gradient(to right, ${reflectionColor}, transparent)`+ }}+ />++ <div+ className="absolute inset-y-0 right-0 z-10 pointer-events-none"+ style={{+ width: `${reflectionWidth}px`,+ background: `linear-gradient(to left, ${reflectionColor}, transparent)`+ }}+ />++ <div+ className="relative w-full h-full overflow-hidden flex flex-col shadow-inner"+ style={{+ backgroundColor: screenBg,+ borderRadius: `${cornerRadius * 2.35}px`,+ }}+ >+ <div+ className="absolute left-1/2 -translate-x-1/2 rounded-full z-20 pointer-events-none"+ style={{+ top: `${notchTop}px`,+ width: `${notchWidth}px`,+ height: `${notchHeight}px`,+ backgroundColor: notchBg+ }}+ />++ <div+ className="relative z-10 w-full h-full"+ style={{+ paddingTop: `${contentPaddingTop}px`+ }}+ >+ {children}+ </div>+ </div>+ </div>+ </div>+ );+}\ No newline at end of filediff --git a/app/components/ui/editor/mockups/GlassFullMockup.tsx b/app/components/ui/editor/mockups/GlassFullMockup.tsxnew file mode 100644index 0000000..143d32d--- /dev/null+++ b/app/components/ui/editor/mockups/GlassFullMockup.tsx@@ -0,0 +1,234 @@+"use client";++import { Icon } from "@iconify/react";+import type { MockupRenderProps } from "@/types/mockup.types";+import { hexToRgba } from "@/lib/utils";++interface GlassFullMockupProps extends MockupRenderProps {+ shadows?: number;+ roundedCorners?: number;+}++export function GlassFullMockup({+ children,+ config,+ className = "",+ shadows = 30,+ roundedCorners+}: GlassFullMockupProps) {+ const isDark = config.darkMode;+ const frameColor = isDark ? config.frameColor : "#ffffff";+ const cornerRadius = roundedCorners ?? config.cornerRadius;++ const headerOpacity = config.headerOpacity ?? 10;+ const headerScale = (config.headerScale || 100) / 100;++ const framePadding = 12 * headerScale; // Equivalente a p-3+ const buttonWidth = 4 * headerScale; // Equivalente a w-1++ const notchTop = 8 * headerScale; // top-2+ const notchWidth = 104 * headerScale; // w-26+ const notchHeight = 24 * headerScale; // h-6+ const notchPaddingX = 8 * headerScale; // px-2+ const dotSize = 8 * headerScale; // size-2++ const statusBarHeight = 32 * headerScale; // h-8+ const statusBarPaddingX = 28 * headerScale; // px-7+ const timeFontSize = 10 * headerScale; // text-[10px]++ const signalBarWidth = 2 * headerScale; // w-[2px]+ const iconsGap = 6 * headerScale; // gap-1.5+ const wifiSize = 12 * headerScale; // w-3 h-3+ const batteryWidth = 18 * headerScale; // w-4.5+ const batteryHeight = 10 * headerScale; // h-2.5++ const contentPaddingTop = 40 * headerScale; // pt-10++ const homeIndicatorWidth = 128 * headerScale; // w-32+ const homeIndicatorHeight = 4 * headerScale; // h-1+ const homeIndicatorBottom = 8 * headerScale; // bottom-2++ const screenBg = isDark ? "#0a0a0a" : "#f9f9f9";+ const frameBorderColor = isDark ? "rgba(255, 255, 255, 0.15)" : "rgba(255, 255, 255, 0.3)";+ const screenBorderColor = isDark ? "rgba(255, 255, 255, 0.05)" : "rgba(0, 0, 0, 0.05)";+ const notchBg = isDark ? "rgba(255, 255, 255, 0.15)" : "rgba(0, 0, 0, 0.05)";+ const statusBarText = isDark ? "rgba(255, 255, 255, 0.8)" : "rgba(0, 0, 0, 0.6)";+ const statusBarTextDim = isDark ? "rgba(255, 255, 255, 0.4)" : "rgba(0, 0, 0, 0.2)";+ const homeIndicatorBg = isDark ? "rgba(255, 255, 255, 0.2)" : "rgba(0, 0, 0, 0.1)";+ const buttonBg = isDark ? "rgba(255, 255, 255, 0.1)" : "rgba(255, 255, 255, 0.4)";++ return (+ <div+ className={`relative flex flex-col ${className}`}+ >+ {/* Marco de cristal */}+ <div+ className="relative flex flex-col backdrop-blur-2xl"+ style={{+ padding: `${framePadding}px`,+ backgroundColor: hexToRgba(frameColor, headerOpacity),+ borderRadius: `${cornerRadius * 2.8}px`, // Proporción similar a rounded-[3.5rem]+ boxShadow: shadows > 0+ ? `0 ${shadows}px ${shadows * 2}px rgba(0,0,0,0.25)`+ : 'none',+ border: `1px solid ${frameBorderColor}`,+ }}+ >+ <div+ className="absolute backdrop-blur-md rounded-l-sm"+ style={{+ left: `-${buttonWidth}px`,+ top: '15%', // top-24 proporcional+ width: `${buttonWidth}px`,+ height: '5%', // h-8 proporcional+ backgroundColor: buttonBg,+ borderLeft: `1px solid ${frameBorderColor}`,+ borderTop: `1px solid ${frameBorderColor}`,+ borderBottom: `1px solid ${frameBorderColor}`,+ }}+ />++ <div+ className="absolute backdrop-blur-md rounded-l-sm"+ style={{+ left: `-${buttonWidth}px`,+ top: '25%', // top-40 proporcional+ width: `${buttonWidth}px`,+ height: '12%', // h-20 proporcional+ backgroundColor: buttonBg,+ borderLeft: `1px solid ${frameBorderColor}`,+ borderTop: `1px solid ${frameBorderColor}`,+ borderBottom: `1px solid ${frameBorderColor}`,+ }}+ />++ <div+ className="absolute backdrop-blur-md rounded-r-sm"+ style={{+ right: `-${buttonWidth}px`,+ top: '28%', // top-44 proporcional+ width: `${buttonWidth}px`,+ height: '14%', // h-24 proporcional+ backgroundColor: buttonBg,+ borderRight: `1px solid ${frameBorderColor}`,+ borderTop: `1px solid ${frameBorderColor}`,+ borderBottom: `1px solid ${frameBorderColor}`,+ }}+ />++ <div+ className="relative w-full h-full overflow-hidden flex flex-col shadow-inner"+ style={{+ backgroundColor: screenBg,+ borderRadius: `${cornerRadius * 2.3}px`, // Proporción similar a rounded-[2.8rem]+ border: `1px solid ${screenBorderColor}`,+ }}+ >+ <div+ className="absolute left-1/2 -translate-x-1/2 rounded-full z-30 flex items-center justify-between shadow-sm"+ style={{+ top: `${notchTop}px`,+ width: `${notchWidth}px`,+ height: `${notchHeight}px`,+ backgroundColor: notchBg,+ padding: `0 ${notchPaddingX}px`+ }}+ >+ <div+ className="bg-neutral-500 rounded-full border border-neutral-700"+ style={{ width: `${dotSize}px`, height: `${dotSize}px` }}+ />+ <div+ className="bg-indigo-500 rounded-full opacity-80 blur-[1px]"+ style={{ width: `${dotSize}px`, height: `${dotSize}px` }}+ />+ </div>++ <div+ className="absolute top-0 w-full flex items-center justify-between z-20"+ style={{+ height: `${statusBarHeight}px`,+ padding: `0 ${statusBarPaddingX}px`,+ }}+ >+ <span+ className="font-bold tracking-tight"+ style={{+ fontSize: `${timeFontSize}px`,+ color: statusBarText+ }}+ >+ 9:41+ </span>+ <div+ className="flex items-center"+ style={{ gap: `${iconsGap}px` }}+ >+ <div+ className="flex items-end"+ style={{ gap: '1px', height: `${batteryHeight * 0.8}px` }}+ >+ <div className="rounded-[0.5px]" style={{ width: `${signalBarWidth}px`, height: '40%', backgroundColor: statusBarText }} />+ <div className="rounded-[0.5px]" style={{ width: `${signalBarWidth}px`, height: '60%', backgroundColor: statusBarText }} />+ <div className="rounded-[0.5px]" style={{ width: `${signalBarWidth}px`, height: '80%', backgroundColor: statusBarText }} />+ <div className="rounded-[0.5px]" style={{ width: `${signalBarWidth}px`, height: '100%', backgroundColor: statusBarTextDim }} />+ </div>+ <Icon+ icon="mdi:wifi"+ style={{+ width: `${wifiSize}px`,+ height: `${wifiSize}px`,+ color: statusBarText+ }}+ />+ <div+ className="relative rounded-[2px] flex items-center"+ style={{+ width: `${batteryWidth}px`,+ height: `${batteryHeight}px`,+ padding: '1px',+ border: `1px solid ${statusBarTextDim}`+ }}+ >+ <div+ className="h-full rounded-[0.5px]"+ style={{ width: '70%', backgroundColor: statusBarText }}+ />+ <div+ className="absolute rounded-r-full"+ style={{+ right: '-2px',+ width: '1px',+ height: '40%',+ backgroundColor: statusBarTextDim+ }}+ />+ </div>+ </div>+ </div>++ <div+ className="relative w-full h-full"+ style={{+ paddingTop: `${contentPaddingTop}px`+ }}+ >+ <div className="relative z-10 w-full h-full">+ {children}+ </div>+ </div>++ <div+ className="absolute left-1/2 -translate-x-1/2 rounded-full z-20 pointer-events-none"+ style={{+ bottom: `${homeIndicatorBottom}px`,+ width: `${homeIndicatorWidth}px`,+ height: `${homeIndicatorHeight}px`,+ backgroundColor: homeIndicatorBg+ }}+ />+ </div>+ </div>+ </div>+ );+}\ No newline at end of filediff --git a/app/components/ui/editor/mockups/HardShellMockup.tsx b/app/components/ui/editor/mockups/HardShellMockup.tsxnew file mode 100644index 0000000..f7c309e--- /dev/null+++ b/app/components/ui/editor/mockups/HardShellMockup.tsx@@ -0,0 +1,205 @@+"use client";++import type { MockupRenderProps } from "@/types/mockup.types";++interface HardShellMockupProps extends MockupRenderProps {+ shadows?: number;+ roundedCorners?: number;+}++export function HardShellMockup({+ children,+ config,+ className = "",+ shadows = 50,+ roundedCorners+}: HardShellMockupProps) {+ const isDark = config.darkMode;+ const frameColor = isDark ? config.frameColor : "#ffffff";+ const cornerRadius = roundedCorners ?? config.cornerRadius ?? 12;++ const headerScale = (config.headerScale || 100) / 100;++ const buttonWidth = 7 * headerScale;++ const outerPadding = 6 * headerScale;+ const bezelPadding = 4 * headerScale;++ const cameraTop = 10 * headerScale; // top-2.5+ const cameraSize = 14 * headerScale; // w-3.5 h-3.5+ const cameraLensSize = 5 * headerScale; // w-[5px]++ const statusBarHeight = 32 * headerScale; // h-8+ const statusBarPaddingX = 16 * headerScale; // px-4+ const timeFontSize = 12 * headerScale; // text-[12px]+ const networkFontSize = 10 * headerScale; // text-[10px]++ const signalBarWidth = 3 * headerScale; // w-[3px]+ const batteryWidth = 22 * headerScale; // Ligeramente más ancha+ const batteryHeight = 11 * headerScale;++ const contentPaddingTop = 44 * headerScale; // pt-11++ const homeIndicatorWidth = 112 * headerScale; // w-28+ const homeIndicatorHeight = 6 * headerScale; // h-1.5+ const homeIndicatorBottom = 8 * headerScale; // bottom-2++ const screenBg = isDark ? "#000000" : "#f8fafc"; // slate-50+ const textColor = isDark ? "#ffffff" : "#000000";++ const frameBorderColor = isDark ? "rgba(255, 255, 255, 0.1)" : "rgba(0, 0, 0, 0.2)";+ const buttonBgColor = isDark ? "rgba(255, 255, 255, 0.15)" : "rgba(0, 0, 0, 0.15)";+ const buttonBorderColor = isDark ? "rgba(255, 255, 255, 0.2)" : "rgba(0, 0, 0, 0.3)";+ const homeIndicatorBg = isDark ? "rgba(255, 255, 255, 0.3)" : "rgba(0, 0, 0, 0.2)";++ return (+ <div className={`relative flex flex-col items-center justify-center ${className}`}>++ {/* 1. Marco Exterior (Hard Shell) */}+ <div+ className="relative flex items-center justify-center shadow-2xl"+ style={{+ padding: `${outerPadding}px`,+ backgroundColor: frameColor,+ borderRadius: `${cornerRadius * 1.5}px`, // xl (suavizado)+ border: `1px solid ${frameBorderColor}`,+ boxShadow: shadows > 0+ ? `0 ${shadows / 2}px ${shadows}px -12px rgba(0,0,0,0.5)`+ : 'none',+ }}+ >+ {/* Botón Volumen (Derecha) */}+ <div+ className="absolute shadow-inner rounded-r-md"+ style={{+ right: `-${buttonWidth}px`,+ top: '18%', // Posición proporcional (top-32)+ width: `${buttonWidth}px`,+ height: '9%', // Proporcional a h-16+ backgroundColor: buttonBgColor,+ borderTop: `1px solid ${buttonBorderColor}`,+ borderRight: `1px solid ${buttonBorderColor}`,+ borderBottom: `1px solid ${buttonBorderColor}`,+ }}+ />++ {/* Botón Encendido (Derecha) */}+ <div+ className="absolute shadow-inner rounded-r-md"+ style={{+ right: `-${buttonWidth}px`,+ top: '31%', // Posición proporcional (top-56)+ width: `${buttonWidth}px`,+ height: '5%', // Proporcional a h-9+ backgroundColor: buttonBgColor,+ borderTop: `1px solid ${buttonBorderColor}`,+ borderRight: `1px solid ${buttonBorderColor}`,+ borderBottom: `1px solid ${buttonBorderColor}`,+ }}+ />++ {/* 2. Bisel Negro Interior */}+ <div+ className="relative w-full h-full overflow-hidden flex flex-col"+ style={{+ backgroundColor: "#000000",+ padding: `${bezelPadding}px`,+ borderRadius: `${cornerRadius * 1.2}px`, // lg+ boxShadow: 'inset 0 0 4px rgba(0,0,0,1)'+ }}+ >+ {/* 3. Pantalla */}+ <div+ className="relative w-full h-full flex flex-col overflow-hidden"+ style={{+ backgroundColor: screenBg,+ borderRadius: `${cornerRadius * 0.8}px`, // sm/md+ }}+ >+ <div+ className="absolute left-1/2 -translate-x-1/2 bg-black rounded-full z-30 flex items-center justify-center"+ style={{+ top: `${cameraTop}px`,+ width: `${cameraSize}px`,+ height: `${cameraSize}px`,+ boxShadow: 'inset 0 0 2px rgba(255,255,255,0.15)'+ }}+ >+ <div+ className="rounded-full blur-[0.5px]"+ style={{+ width: `${cameraLensSize}px`,+ height: `${cameraLensSize}px`,+ backgroundColor: 'rgba(30, 58, 138, 0.6)' // blue-900/60+ }}+ />+ </div>++ <div+ className="absolute top-0 w-full flex items-center justify-between z-20"+ style={{+ height: `${statusBarHeight}px`,+ padding: `0 ${statusBarPaddingX}px`,+ color: textColor+ }}+ >+ <span+ className="font-medium tracking-tight mt-1"+ style={{ fontSize: `${timeFontSize}px` }}+ >+ 11:43+ </span>++ <div className="flex items-center mt-1" style={{ gap: `${6 * headerScale}px` }}>+ <div className="font-bold" style={{ fontSize: `${networkFontSize}px` }}>5G</div>++ <div className="flex items-end" style={{ gap: '1px', height: `${12 * headerScale}px` }}>+ <div className="rounded-sm" style={{ width: `${signalBarWidth}px`, height: '50%', backgroundColor: textColor }} />+ <div className="rounded-sm" style={{ width: `${signalBarWidth}px`, height: '65%', backgroundColor: textColor }} />+ <div className="rounded-sm" style={{ width: `${signalBarWidth}px`, height: '80%', backgroundColor: textColor }} />+ <div className="rounded-sm" style={{ width: `${signalBarWidth}px`, height: '100%', backgroundColor: textColor }} />+ </div>++ <div className="flex items-center" style={{ marginLeft: `${2 * headerScale}px` }}>+ <div+ className="flex items-center rounded-[3px]"+ style={{+ width: `${batteryWidth}px`,+ height: `${batteryHeight}px`,+ border: `1px solid ${textColor}`,+ padding: `${1.5 * headerScale}px`,+ }}+ >+ <div+ className="h-full rounded-[1px]"+ style={{ width: '80%', backgroundColor: textColor }}+ />+ </div>+ </div>+ </div>+ </div>++ <div+ className="relative w-full h-full"+ style={{ paddingTop: `${contentPaddingTop}px` }}+ >+ <div className="relative z-10 w-full h-full">+ {children}+ </div>+ </div>++ <div+ className="absolute left-1/2 -translate-x-1/2 rounded-full z-20"+ style={{+ bottom: `${homeIndicatorBottom}px`,+ width: `${homeIndicatorWidth}px`,+ height: `${homeIndicatorHeight}px`,+ backgroundColor: homeIndicatorBg+ }}+ />+ </div>+ </div>+ </div>+ </div>+ );+}\ No newline at end of filediff --git a/app/components/ui/editor/mockups/IPhoneSlimMockup.tsx b/app/components/ui/editor/mockups/IPhoneSlimMockup.tsxindex 2bc5668..25c6d1d 100644--- a/app/components/ui/editor/mockups/IPhoneSlimMockup.tsx+++ b/app/components/ui/editor/mockups/IPhoneSlimMockup.tsx@@ -17,7 +17,7 @@ export function IPhoneSlimMockup({roundedCorners}: IPhoneSlimMockupProps) {const isDark = config.darkMode;- const frameColor = config.frameColor;+ const frameColor = isDark ? config.frameColor : "#e5e5e5";const cornerRadius = roundedCorners ?? config.cornerRadius;const headerOpacity = config.headerOpacity ?? 100;diff --git a/app/components/ui/editor/mockups/MacosGlassMockup.tsx b/app/components/ui/editor/mockups/MacosGlassMockup.tsxindex 1ac7fd5..5c6bc5d 100644--- a/app/components/ui/editor/mockups/MacosGlassMockup.tsx+++ b/app/components/ui/editor/mockups/MacosGlassMockup.tsx@@ -63,7 +63,6 @@ export function MacosGlassMockup({borderLeft: "1px solid rgba(255,255,255,0.6)",}}>- {/* Header del navegador - usa frameColor como color de fondo */}<divclassName="flex items-center justify-between select-none shrink-0"style={{@@ -75,12 +74,10 @@ export function MacosGlassMockup({borderTopRightRadius: `${cornerRadius}px`,}}>- {/* Grupo izquierdo: botones de ventana + navegación */}<divclassName="flex items-center"style={{ gap: `${baseGap * headerScale}px` }}>- {/* Botones de ventana macOS */}<div className="flex" style={{ gap: `${buttonGroupGap}px` }}><divclassName="rounded-full bg-[#FF5F56] border border-[#E0443E]"@@ -96,7 +93,6 @@ export function MacosGlassMockup({/></div>- {/* Controles de navegación */}<divclassName="flex items-center"style={{ gap: `${navGap}px`, color: textColor }}@@ -117,7 +113,6 @@ export function MacosGlassMockup({</div></div>- {/* Barra de URL central */}<divclassName="flex-1 max-w-xl"style={{ margin: `0 ${urlBarMargin}px` }}@@ -162,7 +157,6 @@ export function MacosGlassMockup({</div></div>- {/* Grupo derecho: acciones */}<divclassName="flex items-center"style={{ gap: `${rightGroupGap}px`, color: textColor }}@@ -174,7 +168,6 @@ export function MacosGlassMockup({</div></div>- {/* Contenido del navegador - donde va el video */}<divclassName="flex-1 relative overflow-hidden"style={{diff --git a/app/components/ui/editor/mockups/MacosMockup.tsx b/app/components/ui/editor/mockups/MacosMockup.tsxindex 4f4f2d7..0570245 100644--- a/app/components/ui/editor/mockups/MacosMockup.tsx+++ b/app/components/ui/editor/mockups/MacosMockup.tsx@@ -61,7 +61,6 @@ export function MacosMockup({: 'none',}}>- {/* Header del navegador - usa frameColor como color de fondo */}<divclassName="flex items-center justify-between select-none shrink-0"style={{@@ -73,12 +72,10 @@ export function MacosMockup({borderTopRightRadius: `${cornerRadius}px`,}}>- {/* Grupo izquierdo: botones de ventana + navegación */}<divclassName="flex items-center"style={{ gap: `${baseGap * headerScale}px` }}>- {/* Botones de ventana macOS */}<div className="flex" style={{ gap: `${buttonGroupGap}px` }}><divclassName="rounded-full bg-[#FF5F56] border border-[#E0443E]"@@ -94,7 +91,6 @@ export function MacosMockup({/></div>- {/* Controles de navegación */}<divclassName="flex items-center"style={{ gap: `${navGap}px`, color: textColor }}@@ -115,7 +111,6 @@ export function MacosMockup({</div></div>- {/* Barra de URL central */}<divclassName="flex-1 max-w-xl"style={{ margin: `0 ${urlBarMargin}px` }}@@ -160,7 +155,6 @@ export function MacosMockup({</div></div>- {/* Grupo derecho: acciones */}<divclassName="flex items-center"style={{ gap: `${rightGroupGap}px`, color: textColor }}@@ -172,7 +166,6 @@ export function MacosMockup({</div></div>- {/* Contenido del navegador - donde va el video */}<divclassName="flex-1 relative overflow-hidden"style={{ backgroundColor: bgColor }}diff --git a/app/components/ui/editor/mockups/MockupWrapper.tsx b/app/components/ui/editor/mockups/MockupWrapper.tsxindex 4d7ca54..4a8951b 100644--- a/app/components/ui/editor/mockups/MockupWrapper.tsx+++ b/app/components/ui/editor/mockups/MockupWrapper.tsx@@ -17,6 +17,10 @@ import { ChromeMockup } from "./ChromeMockup";import { ChromeGlassMockup } from "./ChromeGlassMockup";import { MacosGhostIdeMockup } from "./MacosGhostIdeMockup";import { MacosDarkIdeMockup } from "./MacosDarkIdeMockup";+import { GlassCurveMockup } from "./GlassCurveMockup";+import { GlassFullMockup } from "./GlassFullMockup";+import { HardShellMockup } from "./HardShellMockup";+import { S24UltraMockup } from "./S24UltraMockup";interface MockupWrapperProps {mockupId: string;@@ -187,6 +191,54 @@ export function MockupWrapper({</IPhoneSlimMockup>);+ case "glass-curve":+ return (+ <GlassCurveMockup+ config={config}+ roundedCorners={roundedCorners}+ shadows={shadows}+ className={className}+ >+ {children}+ </GlassCurveMockup>+ );++ case "glass-full":+ return (+ <GlassFullMockup+ config={config}+ roundedCorners={roundedCorners}+ shadows={shadows}+ className={className}+ >+ {children}+ </GlassFullMockup>+ );++ case "hard-shell":+ return (+ <HardShellMockup+ config={config}+ roundedCorners={roundedCorners}+ shadows={shadows}+ className={className}+ >+ {children}+ </HardShellMockup>+ );++ case "s24-ultra":+ return (+ <S24UltraMockup+ config={config}+ roundedCorners={roundedCorners}+ shadows={shadows}+ className={className}+ >+ {children}+ </S24UltraMockup>+ );+case "vscode":return (<VSCodeMockupdiff --git a/app/components/ui/editor/mockups/S24UltraMockup.tsx b/app/components/ui/editor/mockups/S24UltraMockup.tsxnew file mode 100644index 0000000..01c0f85--- /dev/null+++ b/app/components/ui/editor/mockups/S24UltraMockup.tsx@@ -0,0 +1,241 @@+"use client";++import type { MockupRenderProps } from "@/types/mockup.types";++interface S24UltraMockupProps extends MockupRenderProps {+ shadows?: number;+ roundedCorners?: number;+}++export function S24UltraMockup({+ children,+ config,+ className = "",+ shadows = 50,+ roundedCorners+}: S24UltraMockupProps) {+ const isDark = config.darkMode;++ const frameColor = isDark ? (config.frameColor || "#171717") : "#e5e5e5";+ const cornerRadius = roundedCorners ?? config.cornerRadius ?? 12;+ const headerScale = (config.headerScale || 100) / 100;++ const framePadding = 10 * headerScale;+ const buttonWidth = 4 * headerScale;+ const buttonRadius = 2 * headerScale;++ const cameraTop = 12 * headerScale;+ const cameraSize = 14 * headerScale;+ const cameraLensSize = 4 * headerScale;++ const statusBarHeight = 40 * headerScale;+ const statusBarPaddingX = 20 * headerScale;+ const timeFontSize = 10 * headerScale;++ const navBarHeight = 40 * headerScale;+ const navIconSize = 12 * headerScale;+ const navGap = 48 * headerScale;++ const screenBg = isDark ? "#000000" : "#ffffff";+ const frameBorderColor = isDark ? "#404040" : "#d4d4d4";+ const screenBorderColor = isDark ? "rgba(255,255,255,0.1)" : "#000000";++ const buttonBgColor = isDark ? "#737373" : "#a3a3a3";+ const buttonBorderColor = isDark ? "#262626" : "#737373";++ const textAndIconColor = isDark ? "rgba(255,255,255,0.9)" : "rgba(0,0,0,0.9)";+ const navIconColor = isDark ? "rgba(255, 255, 255, 0.3)" : "rgba(0, 0, 0, 0.2)";+ const iconBoxBg = isDark ? "#ffffff" : "#000000";+ const iconBoxText = isDark ? "#000000" : "#ffffff";++ return (+ <div className={`relative flex flex-col items-center justify-center ${className}`}>++ {/* 1. Marco Exterior (Chasis) */}+ <div+ className="relative flex items-center justify-center shadow-2xl"+ style={{+ padding: `${framePadding}px`,+ backgroundColor: frameColor,+ borderRadius: `${cornerRadius * 1.2}px`, // S24 Ultra es más cuadrado+ border: `1px solid ${frameBorderColor}`,+ boxShadow: shadows > 0+ ? `0 ${shadows / 2}px ${shadows}px -12px rgba(0,0,0,0.5)`+ : 'none',+ }}+ >+ {/* Botón Volumen */}+ <div+ className="absolute shadow-sm"+ style={{+ right: `-${buttonWidth}px`,+ top: '20%',+ width: `${buttonWidth}px`,+ height: '8%',+ backgroundColor: buttonBgColor,+ borderTopRightRadius: `${buttonRadius}px`,+ borderBottomRightRadius: `${buttonRadius}px`,+ borderTop: `1px solid ${buttonBorderColor}`,+ borderRight: `1px solid ${buttonBorderColor}`,+ borderBottom: `1px solid ${buttonBorderColor}`,+ zIndex: 0+ }}+ />++ {/* Botón Encendido */}+ <div+ className="absolute shadow-sm"+ style={{+ right: `-${buttonWidth}px`,+ top: '32%',+ width: `${buttonWidth}px`,+ height: '12%',+ backgroundColor: buttonBgColor,+ borderTopRightRadius: `${buttonRadius}px`,+ borderBottomRightRadius: `${buttonRadius}px`,+ borderTop: `1px solid ${buttonBorderColor}`,+ borderRight: `1px solid ${buttonBorderColor}`,+ borderBottom: `1px solid ${buttonBorderColor}`,+ zIndex: 0+ }}+ />++ {/* 2. Pantalla Interior */}+ <div+ className="relative w-full h-full overflow-hidden flex flex-col"+ style={{+ backgroundColor: screenBg,+ borderRadius: `${Math.max(0, (cornerRadius * 1.2) - framePadding)}px`,+ border: `1px solid ${screenBorderColor}`+ }}+ >+ {/* Cámara Hole-punch */}+ <div+ className="absolute bg-black rounded-full z-20 flex items-center justify-center"+ style={{+ top: `${cameraTop}px`,+ left: '50%',+ transform: 'translateX(-50%)',+ width: `${cameraSize}px`,+ height: `${cameraSize}px`,+ }}+ >+ <div+ className="rounded-full blur-[0.5px]"+ style={{+ width: `${cameraLensSize}px`,+ height: `${cameraLensSize}px`,+ backgroundColor: 'rgba(99, 102, 241, 0.3)'+ }}+ />+ </div>++ {/* Barra de Estado */}+ <div+ className="absolute top-0 w-full flex items-center justify-between z-10"+ style={{+ height: `${statusBarHeight}px`,+ padding: `0 ${statusBarPaddingX}px`,+ }}+ >+ <span+ className="font-medium tracking-tight"+ style={{ fontSize: `${timeFontSize}px`, color: textAndIconColor }}+ >+ 12:30+ </span>++ <div className="flex items-center" style={{ gap: `${6 * headerScale}px`, opacity: 0.8 }}>+ <svg+ style={{ width: `${12 * headerScale}px`, height: `${12 * headerScale}px`, color: textAndIconColor }}+ fill="currentColor"+ viewBox="0 0 24 24"+ >+ <path d="M12 21l-12-12c5.5-5.5 14.5-5.5 20 0l-8 12z" />+ </svg>++ <div+ className="flex items-center justify-center font-bold"+ style={{+ width: `${14 * headerScale}px`,+ height: `${14 * headerScale}px`,+ backgroundColor: iconBoxBg,+ color: iconBoxText,+ borderRadius: `${2 * headerScale}px`,+ fontSize: `${7 * headerScale}px`+ }}+ >+ 5G+ </div>++ <div+ className="relative flex items-center"+ style={{+ width: `${20 * headerScale}px`,+ height: `${10 * headerScale}px`,+ border: `1px solid ${isDark ? "rgba(255,255,255,0.4)" : "rgba(0,0,0,0.4)"}`,+ borderRadius: `${2 * headerScale}px`,+ padding: `${1 * headerScale}px`+ }}+ >+ <div+ className="h-full w-full"+ style={{ backgroundColor: iconBoxBg, borderRadius: `${1 * headerScale}px` }}+ />+ </div>+ </div>+ </div>++ {/* Área de Inyección de Contenido */}+ <div+ className="relative w-full h-full flex flex-col"+ style={{+ paddingTop: `${statusBarHeight}px`,+ paddingBottom: `${navBarHeight}px`+ }}+ >+ <div className="relative z-10 w-full h-full">+ {children}+ </div>+ </div>++ {/* Botones de Navegación (Android) */}+ <div+ className="absolute bottom-0 w-full flex items-center justify-center z-10"+ style={{+ height: `${navBarHeight}px`,+ gap: `${navGap}px`+ }}+ >+ <div+ style={{+ width: `${navIconSize}px`,+ height: `${navIconSize}px`,+ border: `${2 * headerScale}px solid ${navIconColor}`,+ borderRadius: `${2 * headerScale}px`+ }}+ />+ <div+ style={{+ width: `${navIconSize}px`,+ height: `${navIconSize}px`,+ border: `${2 * headerScale}px solid ${navIconColor}`,+ borderRadius: '50%'+ }}+ />+ <div+ style={{+ width: `${navIconSize}px`,+ height: `${navIconSize}px`,+ borderLeft: `${2 * headerScale}px solid ${navIconColor}`,+ borderBottom: `${2 * headerScale}px solid ${navIconColor}`,+ transform: 'rotate(45deg)',+ marginLeft: `${4 * headerScale}px`+ }}+ />+ </div>+ </div>+ </div>+ </div>+ );+}\ No newline at end of filediff --git a/app/globals.css b/app/globals.cssindex d5e4176..47991a9 100644--- a/app/globals.css+++ b/app/globals.css@@ -258,7 +258,7 @@ button {animation: heroImageAppear 1ms linear, heroImageFadeIn 1s ease-out;animation-timeline: scroll(root), auto;- animation-range: 0% 12%;+ animation-range: 0% 5%;}@keyframes heroImageAppear {diff --git a/components/ui/RotationHandleIcon.tsx b/components/ui/RotationHandleIcon.tsxnew file mode 100644index 0000000..7830975--- /dev/null+++ b/components/ui/RotationHandleIcon.tsx@@ -0,0 +1,25 @@+import { Corner, CORNER_ICON_ROTATION } from "@/lib";++interface RotationHandleIconProps {+ corner: Corner;+ color?: string;+}++export function RotationHandleIcon({ corner, color = "#3b82f6" }: RotationHandleIconProps) {+ const rot = CORNER_ICON_ROTATION[corner];+ const maskId = `rotation-mask-${corner}`;++ return (+ <div style={{ display: "flex", transform: `rotate(${rot}deg)` }}>+ <svg width="18" height="18" viewBox="0 0 685 670" fill="none" xmlns="http://www.w3.org/2000/svg">+ <mask id={maskId} maskUnits="userSpaceOnUse" x="-17.9957" y="-16.9657" width="719.848" height="701.972" fill="black">+ <rect fill="white" x="-17.9957" y="-16.9657" width="719.848" height="701.972" />+ <path d="M188.7 17.3203C192.371 20.6905 195.297 24.7568 196.896 29.5153C196.804 31.4331 196.628 33.3462 196.407 35.253L196.086 38.3485C194.185 45.1048 187.596 49.2812 182.3 53.4645L179.893 55.3804C170.681 62.6755 161.291 69.7335 151.888 76.7785L146.587 80.7623C142.336 83.9569 138.083 87.1485 133.827 90.3371C136.643 91.7362 138.62 92.1593 141.702 92.6303C221.494 105.429 298.804 139.014 361.051 190.907L363.116 192.61C386.479 211.924 407.834 233.265 427.193 256.593C428.51 258.175 429.841 259.745 431.187 261.303C436.124 267.044 440.735 273.001 445.304 279.039L447.144 281.465C451.048 286.661 454.678 291.975 458.182 297.446C458.972 298.651 459.763 299.855 460.555 301.057C467.035 310.998 472.939 321.209 478.629 331.621L479.952 334.032C490.563 353.458 499.248 373.561 507.205 394.202L508.112 396.528C532.411 459.154 538.3 527.308 533.707 593.826L536.359 591.825C538.266 590.388 540.177 588.958 542.093 587.536C547.16 583.76 552.068 579.908 556.803 575.724C559.317 573.573 561.966 571.63 564.625 569.663C566.651 568.108 568.562 566.469 570.478 564.781C574.33 561.404 578.359 558.322 582.475 555.275C584.3 553.907 586.097 552.504 587.867 551.066C592.182 548.09 595.457 547.11 600.709 547.252C606.012 548.246 610.34 550.778 613.423 555.254C616.471 560.89 617.202 565.69 615.538 571.991C611.911 579.023 605.957 583.371 599.841 588.182C597.764 589.824 595.695 591.477 593.635 593.139C590.552 595.621 587.465 598.099 584.374 600.573C579.939 604.125 575.509 607.686 571.084 611.255L568.966 612.962L564.737 616.371C562.596 618.097 560.454 619.822 558.311 621.548C554.757 624.408 551.204 627.27 547.653 630.134L543.385 633.572C541.279 635.269 539.173 636.967 537.067 638.666L535.056 640.287C531.434 643.215 527.882 646.227 524.401 649.321C520.128 652.924 517.027 654.734 511.276 654.638C504.105 654.004 499.663 652.411 494.944 646.952C492.961 644.459 491.036 641.92 489.17 639.337C487.454 637.019 485.664 634.855 483.756 632.696C480.714 629.246 477.973 625.634 475.234 621.942C473.027 619.061 470.646 616.357 468.252 613.632C466.614 611.711 465.096 609.742 463.596 607.712C461.593 605.011 459.475 602.398 457.248 599.879C454.628 596.895 452.205 593.821 449.837 590.634C447.52 587.515 445.157 584.511 442.585 581.601C439.023 577.562 435.848 573.275 432.645 568.951C430.766 566.503 428.804 564.231 426.725 561.954C422.256 556.843 419.912 551.54 420.356 544.631C421.353 539.257 423.925 535.418 428.315 532.199C432.962 529.558 437.478 528.95 442.76 529.556C451.493 532.113 456.527 540.68 461.659 547.618C463.214 549.643 464.853 551.555 466.541 553.47C469.161 556.454 471.584 559.528 473.952 562.715C476.269 565.834 478.632 568.838 481.205 571.75C484.822 575.845 488.047 580.2 491.28 584.603C493.001 586.821 494.783 588.71 496.789 590.662C504.124 496.484 482.562 403.63 431.234 323.957L429.63 321.468C428.235 319.326 426.829 317.19 425.414 315.061L423.957 312.797C419.497 305.991 414.657 299.488 409.77 292.985L407.699 290.221C403.597 284.783 399.284 279.507 394.769 274.406C393.892 273.397 393.014 272.387 392.138 271.377C328.722 199.526 238.424 143.586 142.368 130.844L138.269 130.285C134.982 129.837 131.694 129.395 128.405 128.958L130.038 131.102C135.126 137.781 140.205 144.466 145.275 151.158C147.881 154.598 150.492 158.034 153.109 161.467C155.636 164.781 158.155 168.101 160.667 171.426C161.626 172.691 162.588 173.954 163.553 175.215C164.905 176.987 166.251 178.763 167.591 180.545L169.913 183.602C173.799 189.622 174.325 194.307 173.148 201.193C171.749 206.255 169.054 209.036 164.818 212.141C159.201 214.73 155.104 214.729 149.217 213.352C142.679 210.418 138.628 203.943 134.466 198.389L132.361 195.61C130.075 192.585 127.794 189.557 125.517 186.526L120.747 180.204C117.419 175.792 114.094 171.377 110.773 166.96C106.938 161.861 103.096 156.766 99.2489 151.675C95.5407 146.767 91.837 141.855 88.1379 136.939C86.5663 134.852 84.993 132.767 83.418 130.682C81.2195 127.77 79.0256 124.855 76.8362 121.935L74.8605 119.328C70.2774 113.197 67.1715 108.398 67.725 100.558C68.83 93.5503 72.4821 90.3096 77.777 85.9979L79.4553 84.631C85.6232 79.6401 91.9415 74.85 98.2822 70.0813L102.047 67.2411C104.649 65.2779 107.253 63.3169 109.858 61.3581C113.178 58.8594 116.495 56.358 119.809 53.8538C122.389 51.9069 124.971 49.9612 127.553 48.0168L131.222 45.2499C137.374 40.6033 143.537 36.1004 150.092 32.0322C151.512 30.9025 152.898 29.7291 154.246 28.5137C164.229 19.7 175.218 10.6187 188.7 17.3203Z" />+ </mask>+ <path d="M188.7 17.3203C192.371 20.6905 195.297 24.7568 196.896 29.5153C196.804 31.4331 196.628 33.3462 196.407 35.253L196.086 38.3485C194.185 45.1048 187.596 49.2812 182.3 53.4645L179.893 55.3804C170.681 62.6755 161.291 69.7335 151.888 76.7785L146.587 80.7623C142.336 83.9569 138.083 87.1485 133.827 90.3371C136.643 91.7362 138.62 92.1593 141.702 92.6303C221.494 105.429 298.804 139.014 361.051 190.907L363.116 192.61C386.479 211.924 407.834 233.265 427.193 256.593C428.51 258.175 429.841 259.745 431.187 261.303C436.124 267.044 440.735 273.001 445.304 279.039L447.144 281.465C451.048 286.661 454.678 291.975 458.182 297.446C458.972 298.651 459.763 299.855 460.555 301.057C467.035 310.998 472.939 321.209 478.629 331.621L479.952 334.032C490.563 353.458 499.248 373.561 507.205 394.202L508.112 396.528C532.411 459.154 538.3 527.308 533.707 593.826L536.359 591.825C538.266 590.388 540.177 588.958 542.093 587.536C547.16 583.76 552.068 579.908 556.803 575.724C559.317 573.573 561.966 571.63 564.625 569.663C566.651 568.108 568.562 566.469 570.478 564.781C574.33 561.404 578.359 558.322 582.475 555.275C584.3 553.907 586.097 552.504 587.867 551.066C592.182 548.09 595.457 547.11 600.709 547.252C606.012 548.246 610.34 550.778 613.423 555.254C616.471 560.89 617.202 565.69 615.538 571.991C611.911 579.023 605.957 583.371 599.841 588.182C597.764 589.824 595.695 591.477 593.635 593.139C590.552 595.621 587.465 598.099 584.374 600.573C579.939 604.125 575.509 607.686 571.084 611.255L568.966 612.962L564.737 616.371C562.596 618.097 560.454 619.822 558.311 621.548C554.757 624.408 551.204 627.27 547.653 630.134L543.385 633.572C541.279 635.269 539.173 636.967 537.067 638.666L535.056 640.287C531.434 643.215 527.882 646.227 524.401 649.321C520.128 652.924 517.027 654.734 511.276 654.638C504.105 654.004 499.663 652.411 494.944 646.952C492.961 644.459 491.036 641.92 489.17 639.337C487.454 637.019 485.664 634.855 483.756 632.696C480.714 629.246 477.973 625.634 475.234 621.942C473.027 619.061 470.646 616.357 468.252 613.632C466.614 611.711 465.096 609.742 463.596 607.712C461.593 605.011 459.475 602.398 457.248 599.879C454.628 596.895 452.205 593.821 449.837 590.634C447.52 587.515 445.157 584.511 442.585 581.601C439.023 577.562 435.848 573.275 432.645 568.951C430.766 566.503 428.804 564.231 426.725 561.954C422.256 556.843 419.912 551.54 420.356 544.631C421.353 539.257 423.925 535.418 428.315 532.199C432.962 529.558 437.478 528.95 442.76 529.556C451.493 532.113 456.527 540.68 461.659 547.618C463.214 549.643 464.853 551.555 466.541 553.47C469.161 556.454 471.584 559.528 473.952 562.715C476.269 565.834 478.632 568.838 481.205 571.75C484.822 575.845 488.047 580.2 491.28 584.603C493.001 586.821 494.783 588.71 496.789 590.662C504.124 496.484 482.562 403.63 431.234 323.957L429.63 321.468C428.235 319.326 426.829 317.19 425.414 315.061L423.957 312.797C419.497 305.991 414.657 299.488 409.77 292.985L407.699 290.221C403.597 284.783 399.284 279.507 394.769 274.406C393.892 273.397 393.014 272.387 392.138 271.377C328.722 199.526 238.424 143.586 142.368 130.844L138.269 130.285C134.982 129.837 131.694 129.395 128.405 128.958L130.038 131.102C135.126 137.781 140.205 144.466 145.275 151.158C147.881 154.598 150.492 158.034 153.109 161.467C155.636 164.781 158.155 168.101 160.667 171.426C161.626 172.691 162.588 173.954 163.553 175.215C164.905 176.987 166.251 178.763 167.591 180.545L169.913 183.602C173.799 189.622 174.325 194.307 173.148 201.193C171.749 206.255 169.054 209.036 164.818 212.141C159.201 214.73 155.104 214.729 149.217 213.352C142.679 210.418 138.628 203.943 134.466 198.389L132.361 195.61C130.075 192.585 127.794 189.557 125.517 186.526L120.747 180.204C117.419 175.792 114.094 171.377 110.773 166.96C106.938 161.861 103.096 156.766 99.2489 151.675C95.5407 146.767 91.837 141.855 88.1379 136.939C86.5663 134.852 84.993 132.767 83.418 130.682C81.2195 127.77 79.0256 124.855 76.8362 121.935L74.8605 119.328C70.2774 113.197 67.1715 108.398 67.725 100.558C68.83 93.5503 72.4821 90.3096 77.777 85.9979L79.4553 84.631C85.6232 79.6401 91.9415 74.85 98.2822 70.0813L102.047 67.2411C104.649 65.2779 107.253 63.3169 109.858 61.3581C113.178 58.8594 116.495 56.358 119.809 53.8538C122.389 51.9069 124.971 49.9612 127.553 48.0168L131.222 45.2499C137.374 40.6033 143.537 36.1004 150.092 32.0322C151.512 30.9025 152.898 29.7291 154.246 28.5137C164.229 19.7 175.218 10.6187 188.7 17.3203Z" fill="#FEFEFE" />+ <path d="M188.7 17.3203C192.371 20.6905 195.297 24.7568 196.896 29.5153C196.804 31.4331 196.628 33.3462 196.407 35.253L196.086 38.3485C194.185 45.1048 187.596 49.2812 182.3 53.4645L179.893 55.3804C170.681 62.6755 161.291 69.7335 151.888 76.7785L146.587 80.7623C142.336 83.9569 138.083 87.1485 133.827 90.3371C136.643 91.7362 138.62 92.1593 141.702 92.6303C221.494 105.429 298.804 139.014 361.051 190.907L363.116 192.61C386.479 211.924 407.834 233.265 427.193 256.593C428.51 258.175 429.841 259.745 431.187 261.303C436.124 267.044 440.735 273.001 445.304 279.039L447.144 281.465C451.048 286.661 454.678 291.975 458.182 297.446C458.972 298.651 459.763 299.855 460.555 301.057C467.035 310.998 472.939 321.209 478.629 331.621L479.952 334.032C490.563 353.458 499.248 373.561 507.205 394.202L508.112 396.528C532.411 459.154 538.3 527.308 533.707 593.826L536.359 591.825C538.266 590.388 540.177 588.958 542.093 587.536C547.16 583.76 552.068 579.908 556.803 575.724C559.317 573.573 561.966 571.63 564.625 569.663C566.651 568.108 568.562 566.469 570.478 564.781C574.33 561.404 578.359 558.322 582.475 555.275C584.3 553.907 586.097 552.504 587.867 551.066C592.182 548.09 595.457 547.11 600.709 547.252C606.012 548.246 610.34 550.778 613.423 555.254C616.471 560.89 617.202 565.69 615.538 571.991C611.911 579.023 605.957 583.371 599.841 588.182C597.764 589.824 595.695 591.477 593.635 593.139C590.552 595.621 587.465 598.099 584.374 600.573C579.939 604.125 575.509 607.686 571.084 611.255L568.966 612.962L564.737 616.371C562.596 618.097 560.454 619.822 558.311 621.548C554.757 624.408 551.204 627.27 547.653 630.134L543.385 633.572C541.279 635.269 539.173 636.967 537.067 638.666L535.056 640.287C531.434 643.215 527.882 646.227 524.401 649.321C520.128 652.924 517.027 654.734 511.276 654.638C504.105 654.004 499.663 652.411 494.944 646.952C492.961 644.459 491.036 641.92 489.17 639.337C487.454 637.019 485.664 634.855 483.756 632.696C480.714 629.246 477.973 625.634 475.234 621.942C473.027 619.061 470.646 616.357 468.252 613.632C466.614 611.711 465.096 609.742 463.596 607.712C461.593 605.011 459.475 602.398 457.248 599.879C454.628 596.895 452.205 593.821 449.837 590.634C447.52 587.515 445.157 584.511 442.585 581.601C439.023 577.562 435.848 573.275 432.645 568.951C430.766 566.503 428.804 564.231 426.725 561.954C422.256 556.843 419.912 551.54 420.356 544.631C421.353 539.257 423.925 535.418 428.315 532.199C432.962 529.558 437.478 528.95 442.76 529.556C451.493 532.113 456.527 540.68 461.659 547.618C463.214 549.643 464.853 551.555 466.541 553.47C469.161 556.454 471.584 559.528 473.952 562.715C476.269 565.834 478.632 568.838 481.205 571.75C484.822 575.845 488.047 580.2 491.28 584.603C493.001 586.821 494.783 588.71 496.789 590.662C504.124 496.484 482.562 403.63 431.234 323.957L429.63 321.468C428.235 319.326 426.829 317.19 425.414 315.061L423.957 312.797C419.497 305.991 414.657 299.488 409.77 292.985L407.699 290.221C403.597 284.783 399.284 279.507 394.769 274.406C393.892 273.397 393.014 272.387 392.138 271.377C328.722 199.526 238.424 143.586 142.368 130.844L138.269 130.285C134.982 129.837 131.694 129.395 128.405 128.958L130.038 131.102C135.126 137.781 140.205 144.466 145.275 151.158C147.881 154.598 150.492 158.034 153.109 161.467C155.636 164.781 158.155 168.101 160.667 171.426C161.626 172.691 162.588 173.954 163.553 175.215C164.905 176.987 166.251 178.763 167.591 180.545L169.913 183.602C173.799 189.622 174.325 194.307 173.148 201.193C171.749 206.255 169.054 209.036 164.818 212.141C159.201 214.73 155.104 214.729 149.217 213.352C142.679 210.418 138.628 203.943 134.466 198.389L132.361 195.61C130.075 192.585 127.794 189.557 125.517 186.526L120.747 180.204C117.419 175.792 114.094 171.377 110.773 166.96C106.938 161.861 103.096 156.766 99.2489 151.675C95.5407 146.767 91.837 141.855 88.1379 136.939C86.5663 134.852 84.993 132.767 83.418 130.682C81.2195 127.77 79.0256 124.855 76.8362 121.935L74.8605 119.328C70.2774 113.197 67.1715 108.398 67.725 100.558C68.83 93.5503 72.4821 90.3096 77.777 85.9979L79.4553 84.631C85.6232 79.6401 91.9415 74.85 98.2822 70.0813L102.047 67.2411C104.649 65.2779 107.253 63.3169 109.858 61.3581C113.178 58.8594 116.495 56.358 119.809 53.8538C122.389 51.9069 124.971 49.9612 127.553 48.0168L131.222 45.2499C137.374 40.6033 143.537 36.1004 150.092 32.0322C151.512 30.9025 152.898 29.7291 154.246 28.5137C164.229 19.7 175.218 10.6187 188.7 17.3203Z" stroke="black" strokeWidth="25" mask={`url(#${maskId})`} />+ </svg>+ </div>+ );+}+diff --git a/hooks/useVideoExport.ts b/hooks/useVideoExport.tsindex 1899728..bb7120f 100644--- a/hooks/useVideoExport.ts+++ b/hooks/useVideoExport.ts@@ -281,23 +281,34 @@ async function exportWithFFmpegWebM(for (let i = 0; i < totalFrames; i++) {if (cancellation.cancelled) throw new Error("Exportación cancelada");- video.currentTime = Math.min(trimStart + i / fps, trimStart + duration - 0.001);- await waitForVideoFrame(video);+ // Video is already at the correct position (pre-seek or end of prev iteration)await canvasHandle.drawFrame();+ // Trigger next seek immediately after canvas capture to overlap with encode+ const nextI = i + 1;+ if (nextI < totalFrames) {+ video.currentTime = Math.min(trimStart + nextI / fps, trimStart + duration - 0.001);+ }++ // Encode current frame while next seek is in flightconst blob = await new Promise<Blob>((resolve, reject) =>canvas.toBlob(b => b ? resolve(b) : reject(), "image/png"));const data = new Uint8Array(await blob.arrayBuffer());await ffmpeg.writeFile(`frame${String(i).padStart(5, "0")}.png`, data);- if (i % 5 === 0 || i === totalFrames - 1) {+ if (i % 10 === 0 || i === totalFrames - 1) {setProgress({status: "encoding",progress: 8 + Math.round((i / totalFrames) * 60),- message: `Capturando frame ${i + 1}/${totalFrames}...`,+ message: `[Paso 1/2] Guardando frame ${i + 1} de ${totalFrames}...`,});}++ // Await next frame — partially decoded by now+ if (nextI < totalFrames) {+ await waitForVideoFrame(video);+ }}// Actualizar progreso durante la codificación VP8@@ -307,12 +318,12 @@ async function exportWithFFmpegWebM(setProgress({status: "finalizing",progress: Math.min(encodingProgress, 90),- message: `Codificando WebM... ${Math.round(progress * 100)}%`,+ message: `[Paso 2/2] Codificando VP8 con transparencia...`,});}});- setProgress({ status: "finalizing", progress: 70, message: "Codificando WebM con transparencia..." });+ setProgress({ status: "finalizing", progress: 70, message: "[Paso 2/2] Iniciando codificación VP8..." });try {await ffmpeg.exec([@@ -396,26 +407,25 @@ async function exportWithMediabunny(video.currentTime = trimStart;await waitForVideoFrame(video);- // Procesar frames con verificación de cancelación+ // Procesar frames con seek pipelinizado (seek N+1 overlaps encode N)for (let frameIndex = 0; frameIndex < totalFrames; frameIndex++) {- // Verificar cancelación antes de cada frameif (cancellation.cancelled) {throw new Error("Exportación cancelada");}- const outputTime = frameIndex / fps; // Time in the output video- const sourceTime = trimStart + outputTime; // Time in the source video-- video.currentTime = Math.min(sourceTime, trimStart + duration - 0.001);-- await waitForVideoFrame(video);+ const outputTime = frameIndex / fps;+ // Video is already at the correct position (pre-seek or end of prev iteration)await canvasHandle.drawFrame();-await videoSource.add(outputTime, frameDuration);- // Actualizar progreso cada 5 frames para mejor rendimiento- if (frameIndex % 5 === 0 || frameIndex === totalFrames - 1) {+ // Trigger next seek immediately (overlaps JS overhead)+ const nextIndex = frameIndex + 1;+ if (nextIndex < totalFrames) {+ video.currentTime = Math.min(trimStart + nextIndex / fps, trimStart + duration - 0.001);+ }++ if (frameIndex % 10 === 0 || frameIndex === totalFrames - 1) {const progress = 10 + Math.round((frameIndex / totalFrames) * 80);setProgress({status: "encoding",@@ -423,6 +433,11 @@ async function exportWithMediabunny(message: `Codificando ${frameIndex + 1}/${totalFrames} frames (${fps}fps)...`,});}++ // Await next frame — partially decoded by now+ if (nextIndex < totalFrames) {+ await waitForVideoFrame(video);+ }}// Verificar cancelación antes de finalizar@@ -535,14 +550,18 @@ async function exportWithMediabunnyAndAudio(}const outputTime = frameIndex / fps;- const sourceTime = trimStart + outputTime;- video.currentTime = Math.min(sourceTime, trimStart + duration - 0.001);- await waitForVideoFrame(video);+ // Video is already at the correct position (pre-seek or end of prev iteration)await canvasHandle.drawFrame();await videoSource.add(outputTime, frameDuration);- if (frameIndex % 5 === 0 || frameIndex === totalFrames - 1) {+ // Trigger next seek immediately (overlaps JS overhead)+ const nextFrame = frameIndex + 1;+ if (nextFrame < totalFrames) {+ video.currentTime = Math.min(trimStart + nextFrame / fps, trimStart + duration - 0.001);+ }++ if (frameIndex % 10 === 0 || frameIndex === totalFrames - 1) {const progress = 5 + Math.round((frameIndex / totalFrames) * 50);setProgress({status: "encoding",@@ -550,6 +569,11 @@ async function exportWithMediabunnyAndAudio(message: `Codificando video ${frameIndex + 1}/${totalFrames}...`,});}++ // Await next frame — partially decoded by now+ if (nextFrame < totalFrames) {+ await waitForVideoFrame(video);+ }}if (cancellation.cancelled) {@@ -623,20 +647,25 @@ async function exportWithMediabunnyAndAudio(// Write audio track filesconst audioTracks: { index: number; filename: string; track: NonNullable<typeof settings.audioTracks>[0] }[] = [];- if (settings.audioTracks) {- for (let i = 0; i < settings.audioTracks.length; i++) {- const track = settings.audioTracks[i];- if (!track.audioUrl) continue;-- try {- const response = await fetch(track.audioUrl);- const audioData = new Uint8Array(await response.arrayBuffer());- const filename = `audio${i}.mp3`;- await ffmpeg.writeFile(filename, audioData);- audioTracks.push({ index: i, filename, track });- } catch (e) {- console.warn(`Could not load audio track ${i}:`, e);- }+ if (settings.audioTracks && settings.audioTracks.length > 0) {+ // Fetch all audio tracks in parallel, then write to FFmpeg WASM memory sequentially+ const fetchResults = await Promise.all(+ settings.audioTracks.map(async (track, i) => {+ if (!track.audioUrl) return null;+ try {+ const response = await fetch(track.audioUrl);+ const audioData = new Uint8Array(await response.arrayBuffer());+ return { index: i, filename: `audio${i}.mp3`, track, audioData };+ } catch (e) {+ console.warn(`Could not load audio track ${i}:`, e);+ return null;+ }+ })+ );+ for (const result of fetchResults) {+ if (!result) continue;+ await ffmpeg.writeFile(result.filename, result.audioData);+ audioTracks.push({ index: result.index, filename: result.filename, track: result.track });}}@@ -811,16 +840,21 @@ async function exportWithFFmpegGif(for (let i = 0; i < totalFrames; i++) {if (cancellation.cancelled) throw new Error("Exportación cancelada");- const sourceTime = trimStart + i / fps;- video.currentTime = Math.min(sourceTime, trimStart + duration - 0.001);- await waitForVideoFrame(video);+ // Video is already at the correct position (pre-seek or end of prev iteration)await canvasHandle.drawFrame();+ // Trigger next seek immediately after canvas capture to overlap with encode+ const nextI = i + 1;+ if (nextI < totalFrames) {+ video.currentTime = Math.min(trimStart + nextI / fps, trimStart + duration - 0.001);+ }++ // Encode current frame while next seek is in flightconst blob = await canvasToBlobFast(canvas);const data = await blobToUint8Array(blob);await ffmpeg.writeFile(`frame${String(i).padStart(5, "0")}.jpg`, data);- if (i % 5 === 0 || i === totalFrames - 1) {+ if (i % 10 === 0 || i === totalFrames - 1) {const progress = 8 + Math.round((i / totalFrames) * 50);setProgress({status: "encoding",@@ -828,6 +862,11 @@ async function exportWithFFmpegGif(message: `Capturando frame ${i + 1}/${totalFrames}...`,});}++ // Await next frame — partially decoded by now+ if (nextI < totalFrames) {+ await waitForVideoFrame(video);+ }}setProgress({ status: "finalizing", progress: 60, message: "Generando paleta de colores óptima..." });diff --git a/lib/canvas.utils.ts b/lib/canvas.utils.tsindex 7e9a233..60f0072 100644--- a/lib/canvas.utils.ts+++ b/lib/canvas.utils.ts@@ -271,3 +271,46 @@ export function calculateSmoothZoom(return DEFAULT_STATE;}++export type Corner = "top-left" | "top-right" | "bottom-right" | "bottom-left";++export function getNearestCorner(e: React.MouseEvent<HTMLElement>, rotationDeg = 0): Corner {+ const rect = e.currentTarget.getBoundingClientRect();+ const cx = rect.left + rect.width / 2;+ const cy = rect.top + rect.height / 2;++ const dx = e.clientX - cx;+ const dy = e.clientY - cy;++ const rad = (-rotationDeg * Math.PI) / 180;+ const localX = dx * Math.cos(rad) - dy * Math.sin(rad);+ const localY = dx * Math.sin(rad) + dy * Math.cos(rad);++ const isRight = localX > 0;+ const isBottom = localY > 0;+ if (!isRight && !isBottom) return "top-left";+ if (isRight && !isBottom) return "top-right";+ if (isRight && isBottom) return "bottom-right";+ return "bottom-left";+}++export function getCornerStyle(corner: Corner, offset = -10): React.CSSProperties {+ const base: React.CSSProperties = { position: "absolute", zIndex: 20 };+ switch (corner) {+ case "top-left":+ return { ...base, top: offset, left: offset, cursor: "nw-resize" };+ case "top-right":+ return { ...base, top: offset, right: offset, cursor: "ne-resize" };+ case "bottom-right":+ return { ...base, bottom: offset, right: offset, cursor: "se-resize" };+ case "bottom-left":+ return { ...base, bottom: offset, left: offset, cursor: "sw-resize" };+ }+}++export const CORNER_ICON_ROTATION: Record<Corner, number> = {+ "top-right": 0, // posición natural del SVG+ "bottom-right": 90, // gira 90° a la derecha+ "bottom-left": 180, // gira 180°+ "top-left": 270, // gira 270°+};diff --git a/lib/constants.ts b/lib/constants.tsindex d92d9aa..0009fde 100644--- a/lib/constants.ts+++ b/lib/constants.ts@@ -51,10 +51,10 @@ export const TIMELINE_ZOOM_SCALE: Record<number, number> = {};// Mockups con header → solo esquinas INFERIORES del video redondeadas-export const BOTTOM_ONLY_RADIUS_MOCKUPS = ["macos", "macos-glass", "macos-ghost", "macos-ghost-glass", "vscode", "macos-dark-ide", "macos-ghost-ide", "brave", "brave-glass", "browser-tab-glass", "chrome", "chrome-glass"];+export const BOTTOM_ONLY_RADIUS_MOCKUPS = ["macos", "macos-glass", "macos-ghost", "macos-ghost-glass", "vscode", "macos-dark-ide", "macos-ghost-ide", "brave", "brave-glass", "browser-tab-glass", "chrome", "chrome-glass", "s24-ultra", "glass-curve", "glass-full"];// Mockups glass → manejan su propia sombra, no necesitan el rect sólido previo-export const SELF_SHADOWING_MOCKUPS = ["macos-glass", "macos-ghost-glass", "glass-ui-container", "macos-container-glass", "brave-glass", "browser-tab-glass", "chrome-glass"];+export const SELF_SHADOWING_MOCKUPS = ["macos-glass", "macos-ghost-glass", "glass-ui-container", "macos-container-glass", "brave-glass", "browser-tab-glass", "chrome-glass", "iphone-slim", "glass-curve", "glass-full", "s24-ultra", "hard-shell"];// Z-index del video: elementos con zIndex < VIDEO_Z_INDEX se renderizan detrás del videoexport const VIDEO_Z_INDEX = 1000;diff --git a/lib/mockup-canvas.utils.ts b/lib/mockup-canvas.utils.tsindex db88997..ee7e7b4 100644--- a/lib/mockup-canvas.utils.ts+++ b/lib/mockup-canvas.utils.ts@@ -17,6 +17,10 @@ import { drawChromeMockup } from "./mockup-canvas/chrome";import { drawChromeGlassMockup } from "./mockup-canvas/chrome-glass";import { drawMacosDarkIdeMockup } from "./mockup-canvas/macos-dark-ide";import { drawMacosGhostIdeMockup } from "./mockup-canvas/macos-ghost-ide";+import { drawGlassCurveMockup } from "./mockup-canvas/glass-curve";+import { drawGlassFullMockup } from "./mockup-canvas/glass-full";+import { drawHardShellMockup } from "./mockup-canvas/hard-shell";+import { drawS24UltraMockup } from "./mockup-canvas/s24-ultra";interface MockupCanvasContext {ctx: CanvasRenderingContext2D;@@ -38,58 +42,103 @@ export function drawMockupToCanvas(width: number,height: number,cornerRadius: number,- shadowBlur: number = 0+ shadowBlur: number = 0,+ canvasWidth: number = 1920): MockupDrawResult {++ //Importante: todos los cálculos dentro de los mockups se hacen en un espacio de 1280x720 para mantener proporciones, luego se escala al tamaño real del canvas. Esto asegura que el diseño del mockup se mantenga consistente sin importar el tamaño del canvas o sin importar la resolución de exportacion.+ const scale = canvasWidth / 1280;++ ctx.save();+ ctx.scale(scale, scale);+const context: MockupCanvasContext = {ctx,- x,- y,- width,- height,+ x: x / scale,+ y: y / scale,+ width: width / scale,+ height: height / scale,config,- cornerRadius,- shadowBlur,+ cornerRadius: cornerRadius / scale,+ shadowBlur: shadowBlur / scale,};+ let rawResult: MockupDrawResult;+switch (mockupId) {case "macos":- return drawMacosMockup(context);+ rawResult = drawMacosMockup(context);+ break;case "macos-glass":- return drawMacosGlassMockup(context);+ rawResult = drawMacosGlassMockup(context);+ break;case "glass-ui-container":- return drawGlassUIContainerMockup(context);+ rawResult = drawGlassUIContainerMockup(context);+ break;case "macos-ghost":- return drawMacosGhostMockup(context);+ rawResult = drawMacosGhostMockup(context);+ break;case "macos-ghost-glass":- return drawMacosGhostGlassMockup(context);+ rawResult = drawMacosGhostGlassMockup(context);+ break;case "macos-container-glass":- return drawMacosContainerGlassMockup(context);+ rawResult = drawMacosContainerGlassMockup(context);+ break;case "brave":- return drawBraveMockup(context);+ rawResult = drawBraveMockup(context);+ break;case "brave-glass":- return drawBraveGlassMockup(context);+ rawResult = drawBraveGlassMockup(context);+ break;case "browser-tab-glass":- return drawBrowserTabGlassMockup(context);+ rawResult = drawBrowserTabGlassMockup(context);+ break;case "chrome":- return drawChromeMockup(context);+ rawResult = drawChromeMockup(context);+ break;case "chrome-glass":- return drawChromeGlassMockup(context);+ rawResult = drawChromeGlassMockup(context);+ break;case "vscode":- return drawVSCodeMockup(context);+ rawResult = drawVSCodeMockup(context);+ break;case "macos-dark-ide":- return drawMacosDarkIdeMockup(context);+ rawResult = drawMacosDarkIdeMockup(context);+ break;case "macos-ghost-ide":- return drawMacosGhostIdeMockup(context);+ rawResult = drawMacosGhostIdeMockup(context);+ break;case "iphone-slim":- return drawIPhoneSlimMockup(context);+ rawResult = drawIPhoneSlimMockup(context);+ break;+ case "glass-curve":+ rawResult = drawGlassCurveMockup(context);+ break;+ case "glass-full":+ rawResult = drawGlassFullMockup(context);+ break;+ case "hard-shell":+ rawResult = drawHardShellMockup(context);+ break;+ case "s24-ultra":+ rawResult = drawS24UltraMockup(context);+ break;default:- // Sin mockup, el contenido ocupa todo el espacio- return {- contentX: x,- contentY: y,- contentWidth: width,- contentHeight: height,+ rawResult = {+ contentX: x / scale,+ contentY: y / scale,+ contentWidth: width / scale,+ contentHeight: height / scale,};}++ ctx.restore();++ return {+ contentX: rawResult.contentX * scale,+ contentY: rawResult.contentY * scale,+ contentWidth: rawResult.contentWidth * scale,+ contentHeight: rawResult.contentHeight * scale,+ };}diff --git a/lib/mockup-canvas/glass-curve.ts b/lib/mockup-canvas/glass-curve.tsnew file mode 100644index 0000000..a13670f--- /dev/null+++ b/lib/mockup-canvas/glass-curve.ts@@ -0,0 +1,80 @@+import { hexToRgba } from "@/lib/utils";+import type { MockupCanvasContext, MockupDrawResult } from "./types";+import { drawRoundedRectPath, drawMockupShadow } from "./shared";++export function drawGlassCurveMockup(context: MockupCanvasContext): MockupDrawResult {+ const { ctx, x, y, width, height, config, cornerRadius, shadowBlur } = context;+ const isDark = config.darkMode;++ const frameColor = isDark ? config.frameColor : "#ffffff";+ const headerOpacity = config.headerOpacity ?? 10;+ const headerScale = (config.headerScale || 100) / 100;++ const framePadding = 4 * headerScale;+ const reflectionWidth = 16 * headerScale;+ const notchTop = 16 * headerScale;+ const notchWidth = 40 * headerScale;+ const notchHeight = 4 * headerScale;+ const contentPaddingTop = 32 * headerScale;++ const screenBg = isDark ? "#0a0a0a" : "#ffffff";+ const borderColor = isDark ? "rgba(255, 255, 255, 0.1)" : "rgba(255, 255, 255, 0.4)";+ const reflectionColor = isDark ? "rgba(255, 255, 255, 0.05)" : "rgba(255, 255, 255, 0.2)";+ const notchBg = isDark ? "rgba(255, 255, 255, 0.15)" : "rgba(0, 0, 0, 0.05)";++ const outerRadius = cornerRadius * 8;+ drawMockupShadow(ctx, x, y, width, height, outerRadius, shadowBlur);++ ctx.save();+ drawRoundedRectPath(ctx, x, y, width, height, outerRadius);+ ctx.fillStyle = hexToRgba(frameColor, headerOpacity);+ ctx.fill();+ ctx.strokeStyle = borderColor;+ ctx.lineWidth = 6;+ ctx.stroke();++ ctx.clip();++ const leftGradient = ctx.createLinearGradient(x, y, x + reflectionWidth, y);+ leftGradient.addColorStop(0, reflectionColor);+ leftGradient.addColorStop(1, "rgba(255, 255, 255, 0)");+ ctx.fillStyle = leftGradient;+ ctx.fillRect(x, y, reflectionWidth, height);++ const rightGradient = ctx.createLinearGradient(x + width, y, x + width - reflectionWidth, y);+ rightGradient.addColorStop(0, reflectionColor);+ rightGradient.addColorStop(1, "rgba(255, 255, 255, 0)");+ ctx.fillStyle = rightGradient;+ ctx.fillRect(x + width - reflectionWidth, y, reflectionWidth, height);++ ctx.restore();++ const screenX = x + framePadding;+ const screenY = y + framePadding;+ const screenWidth = width - framePadding * 2;+ const screenHeight = height - framePadding * 2;++ const innerRadius = Math.max(0, outerRadius - framePadding);++ ctx.save();+ drawRoundedRectPath(ctx, screenX, screenY, screenWidth, screenHeight, innerRadius);+ ctx.fillStyle = screenBg;+ ctx.fill();+ ctx.restore();++ const notchX = screenX + (screenWidth - notchWidth) / 2;+ const notchY = screenY + notchTop;++ ctx.save();+ drawRoundedRectPath(ctx, notchX, notchY, notchWidth, notchHeight, notchHeight / 2);+ ctx.fillStyle = notchBg;+ ctx.fill();+ ctx.restore();++ return {+ contentX: screenX,+ contentY: screenY + contentPaddingTop,+ contentWidth: screenWidth,+ contentHeight: screenHeight - contentPaddingTop,+ };+}\ No newline at end of filediff --git a/lib/mockup-canvas/glass-full.ts b/lib/mockup-canvas/glass-full.tsnew file mode 100644index 0000000..735205d--- /dev/null+++ b/lib/mockup-canvas/glass-full.ts@@ -0,0 +1,174 @@+import { hexToRgba } from "@/lib/utils";+import {+ drawWifiIcon,+ drawSignalBars,+ drawBattery,+} from "@/lib/canvas-icons";+import type { MockupCanvasContext, MockupDrawResult } from "./types";+import { drawRoundedRectPath, drawMockupShadow } from "./shared";++export function drawGlassFullMockup(context: MockupCanvasContext): MockupDrawResult {+ const { ctx, x, y, width, height, config, cornerRadius, shadowBlur } = context;+ const isDark = config.darkMode;++ const frameColor = isDark ? config.frameColor : "#ffffff";+ const headerOpacity = config.headerOpacity ?? 10;+ const headerScale = (config.headerScale || 100) / 100;++ const framePadding = 12 * headerScale;+ const buttonWidth = 4 * headerScale;++ const notchTop = 8 * headerScale;+ const notchWidth = 104 * headerScale;+ const notchHeight = 24 * headerScale;+ const dotSize = 8 * headerScale;++ const statusBarHeight = 32 * headerScale;+ const timeFontSize = 10 * headerScale;++ const iconStatusSize = 12 * headerScale;+ const batteryWidth = 18 * headerScale;+ const batteryHeight = 10 * headerScale;++ const contentPaddingTop = 40 * headerScale;++ const homeIndicatorWidth = 128 * headerScale;+ const homeIndicatorHeight = 4 * headerScale;+ const homeIndicatorBottom = 8 * headerScale;++ const screenBg = isDark ? "#0a0a0a" : "#f9f9f9";+ const frameBorderColor = isDark ? "rgba(255, 255, 255, 0.15)" : "rgba(255, 255, 255, 0.3)";+ const screenBorderColor = isDark ? "rgba(255, 255, 255, 0.05)" : "rgba(0, 0, 0, 0.05)";+ const notchBg = isDark ? "rgba(255, 255, 255, 0.15)" : "rgba(0, 0, 0, 0.05)";+ const statusBarText = isDark ? "rgba(255, 255, 255, 0.8)" : "rgba(0, 0, 0, 0.6)";+ const homeIndicatorBg = isDark ? "rgba(255, 255, 255, 0.2)" : "rgba(0, 0, 0, 0.1)";+ const buttonBg = isDark ? "rgba(255, 255, 255, 0.1)" : "rgba(255, 255, 255, 0.4)";++ const outerRadius = cornerRadius * 8;+ drawMockupShadow(ctx, x, y, width, height, outerRadius, shadowBlur);++ ctx.save();+ const drawButton = (percentY: number, percentH: number, isLeft: boolean) => {+ const btnW = buttonWidth;+ const btnR = 2 * headerScale;+ const overlap = 2; // Para solapar con el marco y evitar líneas+ const btnY = y + (height * percentY);+ const btnH = height * percentH;++ ctx.beginPath();+ if (isLeft) {+ const btnX = x - btnW;+ ctx.moveTo(btnX + btnW + overlap, btnY);+ ctx.lineTo(btnX + btnR, btnY);+ ctx.arcTo(btnX, btnY, btnX, btnY + btnR, btnR);+ ctx.lineTo(btnX, btnY + btnH - btnR);+ ctx.arcTo(btnX, btnY + btnH, btnX + btnR, btnY + btnH, btnR);+ ctx.lineTo(btnX + btnW + overlap, btnY + btnH);+ } else {+ const btnX = x + width;+ ctx.moveTo(btnX - overlap, btnY);+ ctx.lineTo(btnX + btnW - btnR, btnY);+ ctx.arcTo(btnX + btnW, btnY, btnX + btnW, btnY + btnR, btnR);+ ctx.lineTo(btnX + btnW, btnY + btnH - btnR);+ ctx.arcTo(btnX + btnW, btnY + btnH, btnX + btnW - btnR, btnY + btnH, btnR);+ ctx.lineTo(btnX - overlap, btnY + btnH);+ }+ ctx.fillStyle = buttonBg;+ ctx.fill();+ ctx.strokeStyle = frameBorderColor;+ ctx.lineWidth = 1;+ ctx.stroke();+ };++ drawButton(0.15, 0.05, true); // Silencio+ drawButton(0.25, 0.12, true); // Volumen Arriba+ drawButton(0.28, 0.14, false); // Encendido+ ctx.restore();++ ctx.save();+ drawRoundedRectPath(ctx, x, y, width, height, outerRadius);+ ctx.fillStyle = hexToRgba(frameColor, headerOpacity);+ ctx.fill();+ ctx.strokeStyle = frameBorderColor;+ ctx.lineWidth = 1;+ ctx.stroke();+ ctx.restore();++ const screenX = x + framePadding;+ const screenY = y + framePadding;+ const screenWidth = width - framePadding * 2;+ const screenHeight = height - framePadding * 2;+ const innerRadius = Math.max(0, outerRadius - framePadding);++ ctx.save();+ drawRoundedRectPath(ctx, screenX, screenY, screenWidth, screenHeight, innerRadius);+ ctx.fillStyle = screenBg;+ ctx.fill();+ ctx.strokeStyle = screenBorderColor;+ ctx.lineWidth = 1;+ ctx.stroke();+ ctx.restore();++ const dynamicIslandX = screenX + (screenWidth - notchWidth) / 2;+ const dynamicIslandY = screenY + notchTop;++ ctx.save();+ drawRoundedRectPath(ctx, dynamicIslandX, dynamicIslandY, notchWidth, notchHeight, notchHeight / 2);+ ctx.fillStyle = notchBg;+ ctx.fill();++ const dotCenterY = dynamicIslandY + notchHeight / 2;+ ctx.beginPath();+ ctx.arc(dynamicIslandX + notchHeight, dotCenterY, dotSize / 2, 0, Math.PI * 2);+ ctx.fillStyle = "#737373"; // neutral-500+ ctx.fill();+ ctx.lineWidth = 1;+ ctx.strokeStyle = "#404040"; // neutral-700+ ctx.stroke();++ ctx.beginPath();+ ctx.arc(dynamicIslandX + notchWidth - notchHeight, dotCenterY, dotSize / 2, 0, Math.PI * 2);+ ctx.fillStyle = "#6366f1"; // indigo-500+ ctx.fill();+ ctx.restore();++ const timeX = screenX + 28 * headerScale;+ const timeY = screenY + statusBarHeight / 2 + 2;++ ctx.save();+ ctx.font = `bold ${timeFontSize}px "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif`;+ ctx.fillStyle = statusBarText;+ ctx.textBaseline = "middle";+ ctx.fillText("9:41", timeX, timeY);+ ctx.restore();++ const indicatorsY = timeY - 5 * headerScale;++ const batteryX = screenX + screenWidth - 28 * headerScale - batteryWidth;+ const batteryY = timeY - batteryHeight / 2;+ drawBattery(ctx, batteryX, batteryY, batteryWidth, batteryHeight, statusBarText, 0.7);++ const wifiX = batteryX - iconStatusSize - 6 * headerScale;+ const wifiY = indicatorsY;+ drawWifiIcon(ctx, wifiX, wifiY, iconStatusSize, statusBarText);++ const signalX = wifiX - iconStatusSize - 6 * headerScale;+ const signalY = indicatorsY;+ drawSignalBars(ctx, signalX, signalY, iconStatusSize, statusBarText);++ const homeIndicatorX = screenX + (screenWidth - homeIndicatorWidth) / 2;+ const homeIndicatorY = screenY + screenHeight - homeIndicatorBottom - homeIndicatorHeight;++ ctx.save();+ drawRoundedRectPath(ctx, homeIndicatorX, homeIndicatorY, homeIndicatorWidth, homeIndicatorHeight, homeIndicatorHeight / 2);+ ctx.fillStyle = homeIndicatorBg;+ ctx.fill();+ ctx.restore();++ return {+ contentX: screenX,+ contentY: screenY + contentPaddingTop,+ contentWidth: screenWidth,+ contentHeight: screenHeight - contentPaddingTop,+ };+}\ No newline at end of filediff --git a/lib/mockup-canvas/hard-shell.ts b/lib/mockup-canvas/hard-shell.tsnew file mode 100644index 0000000..c93e1db--- /dev/null+++ b/lib/mockup-canvas/hard-shell.ts@@ -0,0 +1,220 @@+import type { MockupCanvasContext, MockupDrawResult } from "./types";+import { drawRoundedRectPath, drawMockupShadow } from "./shared";++export function drawHardShellMockup(context: MockupCanvasContext): MockupDrawResult {+ const { ctx, x, y, width, height, config, cornerRadius, shadowBlur } = context;+ const isDark = config.darkMode;++ const frameColor = isDark ? (config.frameColor || "#27272a") : "#ffffff";+ const headerScale = (config.headerScale || 100) / 100;++ const buttonWidth = 7 * headerScale;++ const outerPadding = 6 * headerScale;+ const bezelPadding = 4 * headerScale;++ const cameraTop = 10 * headerScale;+ const cameraSize = 14 * headerScale;+ const cameraLensSize = 5 * headerScale;++ const statusBarHeight = 32 * headerScale;+ const statusBarPaddingX = 16 * headerScale;+ const timeFontSize = 12 * headerScale;+ const networkFontSize = 10 * headerScale;++ const signalBarWidth = 3 * headerScale;+ const batteryWidth = 22 * headerScale;+ const batteryHeight = 11 * headerScale;++ const contentPaddingTop = 44 * headerScale;++ const homeIndicatorWidth = 112 * headerScale;+ const homeIndicatorHeight = 6 * headerScale;+ const homeIndicatorBottom = 8 * headerScale;++ const screenBg = isDark ? "#000000" : "#f8fafc";+ const textColor = isDark ? "#ffffff" : "#000000";+ const frameBorderColor = isDark ? "rgba(255, 255, 255, 0.1)" : "rgba(0, 0, 0, 0.2)";+ const buttonBgColor = isDark ? "rgba(255, 255, 255, 0.15)" : "rgba(0, 0, 0, 0.15)";+ const buttonBorderColor = isDark ? "rgba(255, 255, 255, 0.2)" : "rgba(0, 0, 0, 0.3)";+ const homeIndicatorBg = isDark ? "rgba(255, 255, 255, 0.3)" : "rgba(0, 0, 0, 0.2)";++ const outerRadius = cornerRadius * 4;++ drawMockupShadow(ctx, x, y, width, height, outerRadius, shadowBlur);++ ctx.save();+ const drawButton = (percentY: number, percentH: number, isLeft: boolean) => {+ const btnW = buttonWidth;+ const btnR = 2 * headerScale;+ const overlap = 2;+ const btnY = y + (height * percentY);+ const btnH = height * percentH;++ ctx.beginPath();+ if (isLeft) {+ const btnX = x - btnW;+ ctx.moveTo(btnX + btnW + overlap, btnY);+ ctx.lineTo(btnX + btnR, btnY);+ ctx.arcTo(btnX, btnY, btnX, btnY + btnR, btnR);+ ctx.lineTo(btnX, btnY + btnH - btnR);+ ctx.arcTo(btnX, btnY + btnH, btnX + btnR, btnY + btnH, btnR);+ ctx.lineTo(btnX + btnW + overlap, btnY + btnH);+ } else {+ const btnX = x + width;+ ctx.moveTo(btnX - overlap, btnY);+ ctx.lineTo(btnX + btnW - btnR, btnY);+ ctx.arcTo(btnX + btnW, btnY, btnX + btnW, btnY + btnR, btnR);+ ctx.lineTo(btnX + btnW, btnY + btnH - btnR);+ ctx.arcTo(btnX + btnW, btnY + btnH, btnX + btnW - btnR, btnY + btnH, btnR);+ ctx.lineTo(btnX - overlap, btnY + btnH);+ }+ ctx.fillStyle = buttonBgColor;+ ctx.fill();+ ctx.strokeStyle = buttonBorderColor;+ ctx.lineWidth = 1;+ ctx.stroke();+ };++ drawButton(0.18, 0.09, false); // Volumen+ drawButton(0.31, 0.05, false); // Encendido+ ctx.restore();++ ctx.save();+ drawRoundedRectPath(ctx, x, y, width, height, outerRadius);+ ctx.fillStyle = frameColor;+ ctx.fill();+ ctx.strokeStyle = frameBorderColor;+ ctx.lineWidth = 1;+ ctx.stroke();+ ctx.restore();++ const bezelX = x + outerPadding;+ const bezelY = y + outerPadding;+ const bezelWidth = width - (outerPadding * 2);+ const bezelHeight = height - (outerPadding * 2);+ const bezelRadius = cornerRadius * 4;++ ctx.save();+ drawRoundedRectPath(ctx, bezelX, bezelY, bezelWidth, bezelHeight, bezelRadius);+ ctx.fillStyle = "#000000";+ ctx.fill();+ ctx.strokeStyle = "rgba(0,0,0,1)";+ ctx.lineWidth = 2;+ ctx.stroke();+ ctx.restore();++ const screenX = bezelX + bezelPadding;+ const screenY = bezelY + bezelPadding;+ const screenWidth = bezelWidth - (bezelPadding * 2);+ const screenHeight = bezelHeight - (bezelPadding * 2);+ const screenRadius = Math.max(0, outerRadius - bezelPadding);++ ctx.save();+ drawRoundedRectPath(ctx, screenX, screenY, screenWidth, screenHeight, screenRadius);+ ctx.fillStyle = screenBg;+ ctx.fill();+ ctx.restore();+++ const camCenterX = screenX + screenWidth / 2;+ const camCenterY = screenY + cameraTop + cameraSize / 2;++ ctx.save();+ ctx.beginPath();+ ctx.arc(camCenterX, camCenterY, cameraSize / 2, 0, Math.PI * 2);+ ctx.fillStyle = "#000000";+ ctx.fill();++ ctx.beginPath();+ ctx.arc(camCenterX, camCenterY, cameraLensSize / 2, 0, Math.PI * 2);+ ctx.fillStyle = "rgba(30, 58, 138, 0.6)"; // blue-900/60+ ctx.fill();+ ctx.restore();++ const timeX = screenX + statusBarPaddingX;+ const timeY = screenY + statusBarHeight / 2;++ ctx.save();+ ctx.font = `500 ${timeFontSize}px "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif`;+ ctx.fillStyle = textColor;+ ctx.textBaseline = "middle";+ ctx.fillText("11:43", timeX, timeY + 1); // +1 para alinear ópticamente+ ctx.restore();++ const batPoleWidth = 2 * headerScale;+ const batPoleHeight = 4 * headerScale;+ const batX = screenX + screenWidth - statusBarPaddingX - batPoleWidth - batteryWidth;+ const batY = timeY - batteryHeight / 2 + 1; // +1 alineación óptica++ ctx.save();+ ctx.strokeStyle = textColor;+ ctx.lineWidth = 1 * headerScale;+ ctx.beginPath();+ drawRoundedRectPath(ctx, batX, batY, batteryWidth, batteryHeight, 3 * headerScale);+ ctx.stroke();++ const batPad = 1.5 * headerScale;+ const fillWidth = (batteryWidth - batPad * 2) * 0.8; // 80% lleno+ const fillHeight = batteryHeight - batPad * 2;+ ctx.fillStyle = textColor;+ ctx.beginPath();+ drawRoundedRectPath(ctx, batX + batPad, batY + batPad, fillWidth, fillHeight, 1 * headerScale);+ ctx.fill();++ ctx.beginPath();+ const bumpY = batY + (batteryHeight - batPoleHeight) / 2;+ ctx.moveTo(batX + batteryWidth, bumpY);+ ctx.lineTo(batX + batteryWidth + batPoleWidth - 1, bumpY);+ ctx.quadraticCurveTo(batX + batteryWidth + batPoleWidth, bumpY, batX + batteryWidth + batPoleWidth, bumpY + 1);+ ctx.lineTo(batX + batteryWidth + batPoleWidth, bumpY + batPoleHeight - 1);+ ctx.quadraticCurveTo(batX + batteryWidth + batPoleWidth, bumpY + batPoleHeight, batX + batteryWidth + batPoleWidth - 1, bumpY + batPoleHeight);+ ctx.lineTo(batX + batteryWidth, bumpY + batPoleHeight);+ ctx.globalAlpha = 0.9;+ ctx.fill();+ ctx.restore();++ const sigGap = 1 * headerScale;+ const totalSigWidth = (signalBarWidth * 4) + (sigGap * 3);+ const sigX = batX - 6 * headerScale - totalSigWidth;+ const sigMaxHeight = 12 * headerScale;+ const sigYBottom = batY + batteryHeight; // Alineado por abajo con la batería++ ctx.save();+ ctx.fillStyle = textColor;+ const sigPercents = [0.5, 0.65, 0.8, 1.0];+ for (let i = 0; i < 4; i++) {+ const h = sigMaxHeight * sigPercents[i];+ const barX = sigX + i * (signalBarWidth + sigGap);+ const barY = sigYBottom - h;+ drawRoundedRectPath(ctx, barX, barY, signalBarWidth, h, 1 * headerScale);+ ctx.fill();+ }+ ctx.restore();++ const text5G = "5G";+ ctx.save();+ ctx.font = `bold ${networkFontSize}px "Inter", sans-serif`;+ ctx.fillStyle = textColor;+ ctx.textBaseline = "middle";+ const textMetrics = ctx.measureText(text5G);+ const text5GX = sigX - 6 * headerScale - textMetrics.width;+ ctx.fillText(text5G, text5GX, timeY + 1);+ ctx.restore();++ const homeIndicatorX = screenX + (screenWidth - homeIndicatorWidth) / 2;+ const homeIndicatorY = screenY + screenHeight - homeIndicatorBottom - homeIndicatorHeight;++ ctx.save();+ drawRoundedRectPath(ctx, homeIndicatorX, homeIndicatorY, homeIndicatorWidth, homeIndicatorHeight, homeIndicatorHeight / 2);+ ctx.fillStyle = homeIndicatorBg;+ ctx.fill();+ ctx.restore();++ return {+ contentX: screenX,+ contentY: screenY + contentPaddingTop,+ contentWidth: screenWidth,+ contentHeight: screenHeight - contentPaddingTop,+ };+}\ No newline at end of filediff --git a/lib/mockup-canvas/index.ts b/lib/mockup-canvas/index.tsindex e3881e3..e5c4d7a 100644--- a/lib/mockup-canvas/index.ts+++ b/lib/mockup-canvas/index.ts@@ -4,3 +4,4 @@ export { drawMacosMockup } from './macos';export { drawMacosGlassMockup } from './macos-glass';export { drawVSCodeMockup } from './vscode';export { drawIPhoneSlimMockup } from './iphone-slim';+export { drawGlassCurveMockup } from './glass-curve';diff --git a/lib/mockup-canvas/iphone-slim.ts b/lib/mockup-canvas/iphone-slim.tsindex 389940b..5817571 100644--- a/lib/mockup-canvas/iphone-slim.ts+++ b/lib/mockup-canvas/iphone-slim.ts@@ -1,7 +1,3 @@-/**- * Renderizado del mockup de iPhone Slim en Canvas- */-import { hexToRgba } from "@/lib/utils";import {drawWifiIcon,@@ -11,19 +7,15 @@ import {import type { MockupCanvasContext, MockupDrawResult } from "./types";import { drawRoundedRectPath, drawMockupShadow } from "./shared";-/**- * Dibuja el mockup de iPhone Slim en canvas- */export function drawIPhoneSlimMockup(context: MockupCanvasContext): MockupDrawResult {const { ctx, x, y, width, height, config, cornerRadius, shadowBlur } = context;const isDark = config.darkMode;- const frameColor = config.frameColor;++ const frameColor = isDark ? config.frameColor : "#e5e5e5";const headerOpacity = config.headerOpacity ?? 100;- // Escalado proporcionalconst headerScale = (config.headerScale || 100) / 100;- // Valores base escaladosconst framePadding = 6 * headerScale;const statusBarHeight = 28 * headerScale;const dynamicIslandHeight = 18 * headerScale;@@ -31,15 +23,50 @@ export function drawIPhoneSlimMockup(context: MockupCanvasContext): MockupDrawReconst homeIndicatorHeight = 3 * headerScale;const homeIndicatorBottom = 6 * headerScale;- // Coloresconst borderColor = isDark ? "#404040" : "#525252";const statusBarText = isDark ? "#ffffff" : "#000000";- // 0. Dibujar sombra exterior del mockup (sin bloquear el fondo)- const outerRadius = cornerRadius * 2.5;+ const outerRadius = cornerRadius * 8;drawMockupShadow(ctx, x, y, width, height, outerRadius, shadowBlur);- // 1. Dibujar marco exterior del dispositivo+ ctx.save();+ const drawButton = (percentY: number, percentH: number, isLeft: boolean) => {+ const btnWidth = 4; // Ancho del botón (similar a w-1)+ const btnRadius = 2; // Radio de las esquinas+ const overlap = 2; // Píxeles que entran hacia el marco para ocultar la unión+ const btnY = y + (height * percentY);+ const btnH = height * percentH;++ ctx.beginPath();+ if (isLeft) {+ const btnX = x - btnWidth;+ ctx.moveTo(btnX + btnWidth + overlap, btnY);+ ctx.lineTo(btnX + btnRadius, btnY);+ ctx.arcTo(btnX, btnY, btnX, btnY + btnRadius, btnRadius);+ ctx.lineTo(btnX, btnY + btnH - btnRadius);+ ctx.arcTo(btnX, btnY + btnH, btnX + btnRadius, btnY + btnH, btnRadius);+ ctx.lineTo(btnX + btnWidth + overlap, btnY + btnH);+ } else {+ const btnX = x + width;+ ctx.moveTo(btnX - overlap, btnY);+ ctx.lineTo(btnX + btnWidth - btnRadius, btnY);+ ctx.arcTo(btnX + btnWidth, btnY, btnX + btnWidth, btnY + btnRadius, btnRadius);+ ctx.lineTo(btnX + btnWidth, btnY + btnH - btnRadius);+ ctx.arcTo(btnX + btnWidth, btnY + btnH, btnX + btnWidth - btnRadius, btnY + btnH, btnRadius);+ ctx.lineTo(btnX - overlap, btnY + btnH);+ }+ ctx.fillStyle = hexToRgba(frameColor, headerOpacity);+ ctx.fill();+ ctx.strokeStyle = borderColor;+ ctx.lineWidth = 1;+ ctx.stroke();+ };++ drawButton(0.15, 0.06, true);+ drawButton(0.24, 0.12, true);+ drawButton(0.28, 0.14, false);+ ctx.restore();+ctx.save();drawRoundedRectPath(ctx, x, y, width, height, outerRadius);ctx.fillStyle = hexToRgba(frameColor, headerOpacity);@@ -49,12 +76,11 @@ export function drawIPhoneSlimMockup(context: MockupCanvasContext): MockupDrawRectx.stroke();ctx.restore();- // 2. Dibujar pantalla interiorconst screenX = x + framePadding;const screenY = y + framePadding;const screenWidth = width - framePadding * 2;const screenHeight = height - framePadding * 2;- const innerRadius = cornerRadius * 2.2;+ const innerRadius = Math.max(0, outerRadius - framePadding);ctx.save();drawRoundedRectPath(ctx, screenX, screenY, screenWidth, screenHeight, innerRadius);@@ -65,7 +91,6 @@ export function drawIPhoneSlimMockup(context: MockupCanvasContext): MockupDrawRectx.stroke();ctx.restore();- // 3. Dibujar Dynamic Islandconst dynamicIslandWidth = screenWidth * 0.28;const dynamicIslandX = screenX + (screenWidth - dynamicIslandWidth) / 2;const dynamicIslandY = screenY + dynamicIslandTop;@@ -76,7 +101,6 @@ export function drawIPhoneSlimMockup(context: MockupCanvasContext): MockupDrawRectx.fill();ctx.restore();- // 4. Dibujar Status Barconst timeFontSize = 10 * headerScale;const timeX = screenX + 24 * headerScale;const timeY = screenY + statusBarHeight / 2 + 2;@@ -88,28 +112,23 @@ export function drawIPhoneSlimMockup(context: MockupCanvasContext): MockupDrawRectx.fillText("9:41", timeX, timeY);ctx.restore();- // Indicadores de señal, wifi, batería (derecha) con iconos realesconst indicatorsY = timeY - 5 * headerScale;const iconStatusSize = 12 * headerScale;const batteryWidth = 20 * headerScale;const batteryHeight = 10 * headerScale;- // Batería (derecha)const batteryX = screenX + screenWidth - 24 * headerScale - batteryWidth;const batteryY = timeY - batteryHeight / 2;drawBattery(ctx, batteryX, batteryY, batteryWidth, batteryHeight, statusBarText, 0.9);- // WiFi (centro-derecha)const wifiX = batteryX - iconStatusSize - 6 * headerScale;const wifiY = indicatorsY;drawWifiIcon(ctx, wifiX, wifiY, iconStatusSize, statusBarText);- // Barras de señal (izquierda del wifi)const signalX = wifiX - iconStatusSize - 4 * headerScale;const signalY = indicatorsY;drawSignalBars(ctx, signalX, signalY, iconStatusSize, statusBarText);- // 5. Dibujar Home Indicatorconst homeIndicatorWidth = screenWidth * 0.35;const homeIndicatorX = screenX + (screenWidth - homeIndicatorWidth) / 2;const homeIndicatorY = screenY + screenHeight - homeIndicatorBottom - homeIndicatorHeight;@@ -126,4 +145,4 @@ export function drawIPhoneSlimMockup(context: MockupCanvasContext): MockupDrawRecontentWidth: screenWidth,contentHeight: screenHeight - statusBarHeight - homeIndicatorBottom - homeIndicatorHeight,};-}+}\ No newline at end of filediff --git a/lib/mockup-canvas/s24-ultra.ts b/lib/mockup-canvas/s24-ultra.tsnew file mode 100644index 0000000..14d9186--- /dev/null+++ b/lib/mockup-canvas/s24-ultra.ts@@ -0,0 +1,196 @@+import type { MockupCanvasContext, MockupDrawResult } from "./types";+import { drawRoundedRectPath, drawMockupShadow } from "./shared";++export function drawS24UltraMockup(context: MockupCanvasContext): MockupDrawResult {+ const { ctx, x, y, width, height, config, cornerRadius, shadowBlur } = context;+ const isDark = config.darkMode;++ const headerScale = (config.headerScale || 100) / 100;+ const frameColor = isDark ? (config.frameColor || "#171717") : "#e5e5e5";++ const framePadding = 10 * headerScale;+ const buttonWidth = 4 * headerScale;+ const buttonRadius = 2 * headerScale;++ const cameraTop = 12 * headerScale;+ const cameraSize = 14 * headerScale;+ const cameraLensSize = 4 * headerScale;++ const statusBarHeight = 40 * headerScale;+ const statusBarPaddingX = 20 * headerScale;+ const timeFontSize = 10 * headerScale;++ const navBarHeight = 40 * headerScale;+ const navIconSize = 12 * headerScale;+ const navGap = 48 * headerScale;++ const screenBg = isDark ? "#000000" : "#ffffff";+ const frameBorderColor = isDark ? "#404040" : "#d4d4d4";+ const screenBorderColor = isDark ? "rgba(255,255,255,0.1)" : "#000000";++ const buttonBgColor = isDark ? "#737373" : "#a3a3a3";+ const buttonBorderColor = isDark ? "#262626" : "#737373";++ const textAndIconColor = isDark ? "rgba(255,255,255,0.9)" : "rgba(0,0,0,0.9)";+ const navIconColor = isDark ? "rgba(255, 255, 255, 0.3)" : "rgba(0, 0, 0, 0.2)";+ const iconBoxBg = isDark ? "#ffffff" : "#000000";+ const iconBoxText = isDark ? "#000000" : "#ffffff";++ const outerRadius = cornerRadius * 1.2;++ drawMockupShadow(ctx, x, y, width, height, outerRadius, shadowBlur);++ ctx.save();+ const drawSideButton = (percentY: number, percentH: number) => {+ const btnY = y + (height * percentY);+ const btnH = height * percentH;+ const btnX = x + width;++ ctx.beginPath();+ ctx.moveTo(btnX, btnY);+ ctx.lineTo(btnX + buttonWidth - buttonRadius, btnY);+ ctx.arcTo(btnX + buttonWidth, btnY, btnX + buttonWidth, btnY + buttonRadius, buttonRadius);+ ctx.lineTo(btnX + buttonWidth, btnY + btnH - buttonRadius);+ ctx.arcTo(btnX + buttonWidth, btnY + btnH, btnX + buttonWidth - buttonRadius, btnY + btnH, buttonRadius);+ ctx.lineTo(btnX, btnY + btnH);++ ctx.fillStyle = buttonBgColor;+ ctx.fill();+ ctx.strokeStyle = buttonBorderColor;+ ctx.lineWidth = 1;+ ctx.stroke();+ };++ drawSideButton(0.20, 0.08); // Volumen+ drawSideButton(0.32, 0.12); // Encendido+ ctx.restore();++ ctx.save();+ drawRoundedRectPath(ctx, x, y, width, height, outerRadius);+ ctx.fillStyle = frameColor;+ ctx.fill();+ ctx.strokeStyle = frameBorderColor;+ ctx.lineWidth = 1;+ ctx.stroke();+ ctx.restore();++ const screenX = x + framePadding;+ const screenY = y + framePadding;+ const screenWidth = width - (framePadding * 2);+ const screenHeight = height - (framePadding * 2);+ const screenRadius = Math.max(0, outerRadius - framePadding);++ ctx.save();+ drawRoundedRectPath(ctx, screenX, screenY, screenWidth, screenHeight, screenRadius);+ ctx.fillStyle = screenBg;+ ctx.fill();+ ctx.strokeStyle = screenBorderColor;+ ctx.lineWidth = 1;+ ctx.stroke();+ ctx.restore();++ const camCenterX = screenX + screenWidth / 2;+ const camCenterY = screenY + cameraTop + cameraSize / 2;++ ctx.save();+ ctx.beginPath();+ ctx.arc(camCenterX, camCenterY, cameraSize / 2, 0, Math.PI * 2);+ ctx.fillStyle = "#000000";+ ctx.fill();++ ctx.beginPath();+ ctx.arc(camCenterX, camCenterY, cameraLensSize / 2, 0, Math.PI * 2);+ ctx.fillStyle = "rgba(99, 102, 241, 0.3)"; // blue-indigo lens reflection+ ctx.fill();+ ctx.restore();++ const statusYCenter = screenY + statusBarHeight / 2;++ ctx.save();+ ctx.font = `500 ${timeFontSize}px "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif`;+ ctx.fillStyle = textAndIconColor;+ ctx.textBaseline = "middle";+ ctx.fillText("12:30", screenX + statusBarPaddingX, statusYCenter + 1); // +1 corrección óptica+ ctx.restore();++ let currentRightX = screenX + screenWidth - statusBarPaddingX;+ const gap = 6 * headerScale;++ const batW = 20 * headerScale;+ const batH = 10 * headerScale;+ currentRightX -= batW;++ ctx.save();+ ctx.strokeStyle = isDark ? "rgba(255,255,255,0.4)" : "rgba(0,0,0,0.4)";+ ctx.lineWidth = 1 * headerScale;+ drawRoundedRectPath(ctx, currentRightX, statusYCenter - batH / 2, batW, batH, 2 * headerScale);+ ctx.stroke();++ ctx.fillStyle = iconBoxBg;+ const pad = 1 * headerScale;+ drawRoundedRectPath(ctx, currentRightX + pad, statusYCenter - batH / 2 + pad, batW - pad * 2, batH - pad * 2, 1 * headerScale);+ ctx.fill();+ ctx.restore();++ const box5GSize = 14 * headerScale;+ currentRightX -= (box5GSize + gap);++ ctx.save();+ ctx.fillStyle = iconBoxBg;+ drawRoundedRectPath(ctx, currentRightX, statusYCenter - box5GSize / 2, box5GSize, box5GSize, 2 * headerScale);+ ctx.fill();++ ctx.font = `bold ${7 * headerScale}px "Inter", sans-serif`;+ ctx.fillStyle = iconBoxText;+ ctx.textAlign = "center";+ ctx.textBaseline = "middle";+ ctx.fillText("5G", currentRightX + box5GSize / 2, statusYCenter + 0.5);+ ctx.restore();++ const wifiSize = 12 * headerScale;+ currentRightX -= (wifiSize + gap);++ ctx.save();+ ctx.translate(currentRightX, statusYCenter - wifiSize / 2);+ const wifiScale = wifiSize / 24; // El SVG original de Tailwind es 24x24+ ctx.scale(wifiScale, wifiScale);+ const wifiPath = new Path2D("M12 21l-12-12c5.5-5.5 14.5-5.5 20 0l-8 12z");+ ctx.fillStyle = textAndIconColor;+ ctx.globalAlpha = 0.8;+ ctx.fill(wifiPath);+ ctx.restore();++ const navYCenter = screenY + screenHeight - navBarHeight / 2;+ const navCenterX = screenX + screenWidth / 2;++ ctx.save();+ ctx.strokeStyle = navIconColor;+ ctx.lineWidth = 2 * headerScale;+ ctx.lineCap = "round";+ ctx.lineJoin = "round";++ const leftIconX = navCenterX - navGap;+ ctx.strokeRect(leftIconX - navIconSize / 2, navYCenter - navIconSize / 2, navIconSize, navIconSize);++ ctx.beginPath();+ ctx.arc(navCenterX, navYCenter, navIconSize / 2, 0, Math.PI * 2);+ ctx.stroke();++ const rightIconX = navCenterX + navGap + (4 * headerScale); // Offset visual+ ctx.translate(rightIconX, navYCenter);+ ctx.rotate(45 * Math.PI / 180); // Rota para formar la flecha+ ctx.beginPath();+ const halfIcon = navIconSize / 2;+ ctx.moveTo(-halfIcon, -halfIcon); // Arriba+ ctx.lineTo(-halfIcon, halfIcon); // Esquina inferior izquierda+ ctx.lineTo(halfIcon, halfIcon); // Derecha+ ctx.stroke();+ ctx.restore();++ return {+ contentX: screenX,+ contentY: screenY + statusBarHeight,+ contentWidth: screenWidth,+ contentHeight: screenHeight - statusBarHeight - navBarHeight,+ };+}\ No newline at end of filediff --git a/lib/mockup-data.tsx b/lib/mockup-data.tsxindex 1651336..afb6f70 100644--- a/lib/mockup-data.tsx+++ b/lib/mockup-data.tsx@@ -1,5 +1,5 @@import { Mockup, DEFAULT_MOCKUP_FEATURES } from "@/types/mockup.types";-import { BraveGlassPreview, BravePreview, BrowserTabGlassPreview, ChromeGlassPreview, ChromePreview, GlassBasePreview, GlassCurvePreview, GlassFullPreview, GlassUIContainerPreview, HardShellPreview, IphoneBasePreview, IphoneSlimPreview, MacosContainerGlassPreview, MacosDarkPreview, MacosGhostGlassPreview, MacosGhostIdePreview, MacosGhostPreview, MacosGlassPreview, MacosPreview, NonePreview, S24UltraPreview, VSCodePreview } from "./mockup-previews";+import { BraveGlassPreview, BravePreview, BrowserTabGlassPreview, ChromeGlassPreview, ChromePreview, GlassCurvePreview, GlassFullPreview, GlassUIContainerPreview, HardShellPreview, IphoneSlimPreview, MacosContainerGlassPreview, MacosDarkPreview, MacosGhostGlassPreview, MacosGhostIdePreview, MacosGhostPreview, MacosGlassPreview, MacosPreview, NonePreview, S24UltraPreview, VSCodePreview } from "./mockup-previews";export const MOCKUPS: Mockup[] = [{@@ -261,13 +261,13 @@ export const MOCKUPS: Mockup[] = [features: {hasDarkMode: true,hasFrameColor: true,- hasUrl: false, // No tiene URL+ hasUrl: false,hasHeaderScale: true,hasCornerRadius: true,hasHeaderOpacity: true,},defaultConfig: {- darkMode: false,+ darkMode: true,frameColor: "#262626",headerScale: 60,cornerRadius: 28,@@ -276,54 +276,98 @@ export const MOCKUPS: Mockup[] = [<IphoneSlimPreview />),},- // {- // id: "iphone-base",- // name: "iPhone Base",- // category: "mobile",- // preview: (- // <IphoneBasePreview />- // ),- // },- // {- // id: "glass-curve",- // name: "Glass Curve",- // category: "mobile",- // preview: (- // <GlassCurvePreview />- // ),- // },- // {- // id: "glass-base",- // name: "Glass Base",- // category: "mobile",- // preview: (- // <GlassBasePreview />- // ),- // },- // {- // id: "glass-full",- // name: "Glass Full",- // category: "mobile",- // preview: (- // <GlassFullPreview />- // ),- // },- // {- // id: "hard-shell",- // name: "Hard Shell",- // category: "mobile",- // preview: (- // <HardShellPreview />- // ),- // },- // {- // id: "s24-ultra",- // name: "S24 Ultra",- // category: "mobile",- // preview: (- // <S24UltraPreview />- // ),- // },+ {+ id: "glass-curve",+ name: "Glass Curve",+ category: "mobile",+ features: {+ hasDarkMode: true,+ hasFrameColor: true,+ hasUrl: false,+ hasHeaderScale: true,+ hasCornerRadius: true,+ hasHeaderOpacity: true,+ },+ defaultConfig: {+ darkMode: false,+ frameColor: "#262626",+ headerScale: 60,+ cornerRadius: 28,+ headerOpacity: 30,+ },+ preview: (+ <GlassCurvePreview />+ ),+ },+ {+ id: "glass-full",+ name: "Glass Full",+ category: "mobile",+ features: {+ hasDarkMode: true,+ hasFrameColor: true,+ hasUrl: false,+ hasHeaderScale: true,+ hasCornerRadius: true,+ hasHeaderOpacity: true,+ },+ defaultConfig: {+ darkMode: false,+ frameColor: "#262626",+ headerScale: 60,+ cornerRadius: 28,+ headerOpacity: 30,+ },+ preview: (+ <GlassFullPreview />+ ),+ },+ {+ id: "hard-shell",+ name: "Hard Shell",+ category: "mobile",+ features: {+ hasDarkMode: true,+ hasFrameColor: true,+ hasUrl: false,+ hasHeaderScale: true,+ hasCornerRadius: true,+ hasHeaderOpacity: true,+ },+ defaultConfig: {+ darkMode: false,+ frameColor: "#262626",+ headerScale: 60,+ cornerRadius: 28,+ headerOpacity: 30,+ },+ preview: (+ <HardShellPreview />+ ),+ },+ {+ id: "s24-ultra",+ name: "S24 Ultra",+ category: "mobile",+ features: {+ hasDarkMode: true,+ hasFrameColor: true,+ hasUrl: false,+ hasHeaderScale: true,+ hasCornerRadius: true,+ hasHeaderOpacity: true,+ },+ defaultConfig: {+ darkMode: true,+ frameColor: "#262626",+ headerScale: 60,+ cornerRadius: 28,+ headerOpacity: 30,+ },+ preview: (+ <S24UltraPreview />+ ),+ },// IDE Mockups{@@ -353,7 +397,7 @@ export const MOCKUPS: Mockup[] = [id: "macos-dark-ide",name: "Macos dark",category: "ide",- features: {+ features: {hasDarkMode: true,hasFrameColor: true,hasUrl: true,@@ -376,7 +420,7 @@ export const MOCKUPS: Mockup[] = [id: "macos-ghost-ide",name: "Macos Ghost",category: "ide",- features: {+ features: {hasDarkMode: true,hasFrameColor: true,hasUrl: true,diff --git a/lib/mockup-previews.tsx b/lib/mockup-previews.tsxindex 101b2d6..fb36f5f 100644--- a/lib/mockup-previews.tsx+++ b/lib/mockup-previews.tsx@@ -1,4 +1,4 @@-// ── Browser Previews ──────────────────────────────────────────────────────+// ── Browser Previewsexport function NonePreview() {return (<div className="absolute top-4 left-4 w-[160%] h-[160%] bg-[#f9f9f9] rounded-tl-lg shadow-[0_0_30px_rgba(0,0,0,0.5)] border-t border-l border-white/20 flex flex-col overflow-hidden">@@ -332,7 +332,7 @@ export function ChromeGlassPreview() {);}-// ── Mobile Previews ───────────────────────────────────────────────────────+// ── Mobile Previews ─export function IphoneSlimPreview() {@@ -364,24 +364,6 @@ export function IphoneSlimPreview() {);}-export function IphoneBasePreview() {- return (- <div className="absolute top-4 left-1/2 -translate-x-1/2 w-[75px] h-[150px] bg-neutral-800 rounded-xl p-[2.5px] shadow-2xl border border-neutral-700 flex flex-col z-20">- <div className="absolute -left-[1px] top-6 w-[1.5px] h-3 bg-neutral-700 rounded-l-sm border-y border-l border-neutral-800"></div>- <div className="absolute -left-[1px] top-10 w-[1.5px] h-6 bg-neutral-700 rounded-l-sm border-y border-l border-neutral-800"></div>- <div className="absolute -right-[1px] top-12 w-[1.5px] h-8 bg-neutral-700 rounded-r-sm border-y border-r border-neutral-800"></div>- <div className="relative w-full h-full bg-white rounded-lg overflow-hidden flex flex-col border border-black shadow-inner">- <div className="absolute top-1 left-1/2 -translate-x-1/2 w-6 h-1 bg-black rounded-full z-20 flex items-center justify-between px-0.5">- <div className="w-0.5 h-0.5 bg-neutral-500 rounded-full"></div>- <div className="w-0.5 h-0.5 bg-indigo-500 rounded-full blur-[0.2px]"></div>- </div>- <div className="w-full h-full bg-neutral-50 relative"></div>- <div className="absolute bottom-1 left-1/2 -translate-x-1/2 w-8 h-0.5 bg-black/10 rounded-full z-10"></div>- </div>- </div>- );-}-export function GlassCurvePreview() {return (<div className="absolute top-4 left-1/2 -translate-x-1/2 w-[75px] h-[150px] bg-white/40 backdrop-blur-xl rounded-t-xl p-[3px] shadow-2xl border border-white/70 overflow-hidden z-20">@@ -394,59 +376,51 @@ export function GlassCurvePreview() {</div>);}+export function GlassFullPreview() {+ return (+ <div className="absolute top-4 left-1/2 -translate-x-1/2 w-[75px] h-[150px] bg-white/40 backdrop-blur-xl rounded-xl p-[2.5px] shadow-2xl border border-white/70 flex flex-col z-20">++ {/* Botones de Volumen (Izquierda) */}+ <div className="absolute -left-[2px] top-7 w-[2px] h-3 bg-white/60 rounded-l-sm border-y border-l border-white/40 shadow-sm z-10"></div>+ <div className="absolute -left-[2px] top-11 w-[2px] h-6 bg-white/60 rounded-l-sm border-y border-l border-white/40 shadow-sm z-10"></div>++ {/* Botón de Encendido (Derecha) */}+ <div className="absolute -right-[2px] top-14 w-[2px] h-9 bg-white/60 rounded-r-sm border-y border-r border-white/40 shadow-sm z-10"></div>-export function GlassBasePreview() {- return (- <div className="absolute top-4 left-1/2 -translate-x-1/2 w-[75px] h-[150px] bg-white/40 backdrop-blur-xl rounded-xl p-[2.5px] shadow-2xl border border-white/70 flex flex-col z-20">- <div className="absolute -left-[1px] top-6 w-[1px] h-3 bg-white/50 rounded-l-sm border-y border-l border-white/30"></div>- <div className="absolute -left-[1px] top-10 w-[1px] h-6 bg-white/50 rounded-l-sm border-y border-l border-white/30"></div>- <div className="absolute -right-[1px] top-12 w-[1px] h-8 bg-white/50 rounded-r-sm border-y border-r border-white/30"></div>- <div className="relative w-full h-full bg-[#f9f9f9] rounded-lg overflow-hidden shadow-inner border border-black/5 flex flex-col">- <div className="absolute top-1 left-1/2 -translate-x-1/2 w-6 h-1 bg-black/10 rounded-full z-20 flex items-center justify-between px-0.5">- <div className="w-0.5 h-0.5 bg-neutral-400 rounded-full"></div>- <div className="w-0.5 h-0.5 bg-indigo-400/50 rounded-full blur-[0.2px]"></div>- </div>- <div className="w-full h-full bg-neutral-50"></div>- <div className="absolute bottom-1 left-1/2 -translate-x-1/2 w-8 h-0.5 bg-black/5 rounded-full z-10"></div>- </div>+ {/* Cuerpo Interno */}+ <div className="relative w-full h-full bg-[#f9f9f9] rounded-[9px] overflow-hidden shadow-inner border border-black/5 flex flex-col">++ {/* Notch / Sensores */}+ <div className="absolute top-1 left-1/2 -translate-x-1/2 w-6 h-1.5 bg-black/5 rounded-full z-20 flex items-center justify-between px-0.5">+ <div className="w-0.5 h-0.5 bg-neutral-400 rounded-full"></div>+ <div className="w-0.5 h-0.5 bg-indigo-400/50 rounded-full blur-[0.2px]"></div></div>- );-}-export function GlassFullPreview() {- return (- <div className="absolute top-4 left-1/2 -translate-x-1/2 w-[75px] h-[150px] bg-white/40 backdrop-blur-xl rounded-xl p-[2.5px] shadow-2xl border border-white/70 flex flex-col z-20">- <div className="absolute -left-[1px] top-6 w-[1px] h-3 bg-white/50 rounded-l-sm border-y border-l border-white/30 shadow-sm"></div>- <div className="absolute -left-[1px] top-10 w-[1px] h-6 bg-white/50 rounded-l-sm border-y border-l border-white/30 shadow-sm"></div>- <div className="absolute -right-[1px] top-12 w-[1px] h-8 bg-white/50 rounded-r-sm border-y border-r border-white/30 shadow-sm"></div>- <div className="relative w-full h-full bg-[#f9f9f9] rounded-lg overflow-hidden shadow-inner border border-black/5 flex flex-col">- <div className="absolute top-1 left-1/2 -translate-x-1/2 w-6 h-1.5 bg-black/5 rounded-full z-20 flex items-center justify-between px-0.5">- <div className="w-0.5 h-0.5 bg-neutral-400 rounded-full"></div>- <div className="w-0.5 h-0.5 bg-indigo-400/50 rounded-full blur-[0.2px]"></div>- </div>- <div className="absolute top-0 w-full h-3 flex items-center justify-between px-2 z-20">- <span className="text-[4px] font-bold text-black/40 scale-75 origin-left">9:41</span>- <div className="flex items-center gap-0.5 scale-[0.4] origin-right opacity-40">- <div className="flex items-end gap-[0.5px] h-2">- <div className="w-[1.5px] h-full bg-black rounded-full"></div>- </div>- <div className="w-4 h-2 border border-black rounded-[1px] relative">- <div className="h-full w-[80%] bg-black rounded-[0.5px]"></div>- </div>- </div>- </div>- <div className="w-full h-full bg-neutral-50"></div>- <div className="absolute bottom-1 left-1/2 -translate-x-1/2 w-8 h-0.5 bg-black/5 rounded-full z-10"></div>+ {/* Status Bar */}+ <div className="absolute top-0 w-full h-3 flex items-center justify-between px-2 z-20">+ <span className="text-[4px] font-bold text-black/40 scale-75 origin-left">9:41</span>+ <div className="flex items-center gap-0.5 scale-[0.4] origin-right opacity-40">+ <div className="w-4 h-2 border border-black rounded-[1px] relative">+ <div className="h-full w-[80%] bg-black rounded-[0.5px]"></div></div>+ </div></div>- );++ {/* Pantalla */}+ <div className="w-full h-full bg-neutral-50"></div>++ {/* Home Indicator */}+ <div className="absolute bottom-1 left-1/2 -translate-x-1/2 w-8 h-0.5 bg-black/5 rounded-full z-10"></div>+ </div>+ </div>+ );}export function HardShellPreview() {return (- <div className="absolute top-4 left-1/2 -translate-x-1/2 w-[75px] h-[155px] bg-zinc-200 rounded-md p-[2.5px] shadow-2xl border border-zinc-400 flex items-center justify-center z-20">- <div className="absolute -right-[1px] top-6 w-[1.5px] h-3 bg-zinc-400 rounded-r-sm border border-zinc-500"></div>- <div className="absolute -right-[1px] top-11 w-[1.5px] h-2 bg-zinc-400 rounded-r-sm border border-zinc-500"></div>+ <div className="absolute top-4 left-1/2 -translate-x-1/2 w-[75px] h-[155px] text-black bg-zinc-200 rounded-md p-[2.5px] shadow-2xl border border-zinc-400 flex items-center justify-center z-20">+ <div className="absolute -right-[2px] top-6 w-[1.5px] h-3 bg-slate-50 rounded-r-sm border border-zinc-300"></div>+ <div className="absolute -right-[2px] top-11 w-[1.5px] h-2 bg-slate-50 rounded-r-sm border border-zinc-300"></div><div className="relative w-full h-full bg-black rounded-[4px] p-[1.5px] overflow-hidden flex items-center justify-center"><div className="relative w-full h-full bg-slate-50 rounded-[2px] flex flex-col overflow-hidden"><div className="absolute top-1 left-1/2 -translate-x-1/2 size-1 bg-black rounded-full z-20"></div>@@ -464,7 +438,7 @@ export function HardShellPreview() {export function S24UltraPreview() {return (- <div className="absolute top-4 left-1/2 -translate-x-1/2 w-[75px] h-[150px] bg-neutral-900 rounded-lg p-[2.5px] shadow-2xl border border-neutral-700 flex flex-col z-20">+ <div className="absolute top-4 left-1/2 -translate-x-1/2 w-[75px] h-[150px] text-black bg-neutral-900 rounded-lg p-[2.5px] shadow-2xl border border-neutral-700 flex flex-col z-20"><div className="absolute -right-[1px] top-6 w-[1px] h-3 bg-neutral-500 rounded-r-sm border border-neutral-800"></div><div className="absolute -right-[1px] top-11 w-[1px] h-5 bg-neutral-500 rounded-r-sm border border-neutral-800"></div><div className="relative w-full h-full bg-white rounded-md overflow-hidden flex flex-col border border-black shadow-inner">@@ -485,7 +459,7 @@ export function S24UltraPreview() {);}-// ── IDE Previews ──────────────────────────────────────────────────────────+// ── IDE Previews ────export function VSCodePreview() {return (diff --git a/public/images/pages/openvid2.webp b/public/images/pages/openvid2.webpnew file mode 100644index 0000000..8300fafBinary files /dev/null and b/public/images/pages/openvid2.webp differ