Create professional demos and 3D mockups in seconds, directly in your browser
Refactor mockup components to ensure full height and width usage
CristianOlivera1d470d8a601de
diff --git a/app/[locale]/(editor)/editor/page.tsx b/app/[locale]/(editor)/editor/page.tsxindex ab08694..bb1132a 100644--- a/app/[locale]/(editor)/editor/page.tsx+++ b/app/[locale]/(editor)/editor/page.tsx@@ -1750,7 +1750,7 @@ export default function Editor() {}if (hasExistingClips) {- setActiveTool("videos");+ setActiveTool("video");return;}@@ -1903,7 +1903,7 @@ export default function Editor() {setSelectedZoomFragmentId(null);setSelectedAudioTrackId(null);setSelectedElementId(null);- setActiveTool("videos");+ setActiveTool("video");}}, []);@@ -1987,7 +1987,7 @@ export default function Editor() {setSelectedZoomFragmentId(null);setSelectedAudioTrackId(null);setSelectedElementId(null);- setActiveTool("videos");+ setActiveTool("video");}, [currentTime]);const activeClipForSplit = getClipAtTime(videoClipsRef.current, currentTime);@@ -2081,7 +2081,7 @@ export default function Editor() {}, []);useEffect(() => {- if (activeTool === "videos") {+ if (activeTool === "video") {setNewVideosCount(0);}}, [activeTool]);diff --git a/app/components/ui/editor/ControlPanel.tsx b/app/components/ui/editor/ControlPanel.tsxindex 9f3becc..4909f79 100644--- a/app/components/ui/editor/ControlPanel.tsx+++ b/app/components/ui/editor/ControlPanel.tsx@@ -311,7 +311,7 @@ export function ControlPanel({</Suspense>)} */}- {activeTool === "videos" && (+ {activeTool === "video" && (<Suspense fallback={<VideosMenuSkeleton />}><VideosMenuonAddToTrack={onAddVideoToTrack}diff --git a/app/components/ui/editor/MockupMenu.tsx b/app/components/ui/editor/MockupMenu.tsxindex 2343abe..fc06363 100644--- a/app/components/ui/editor/MockupMenu.tsx+++ b/app/components/ui/editor/MockupMenu.tsx@@ -463,60 +463,58 @@ export function MockupMenu({</div></div>- {mediaType === "image" && (- <>- <div className="h-px bg-white/6" />- <div className="flex flex-col gap-3">- <div className="flex items-center justify-between">- <p className="text-[10px] uppercase tracking-widest text-white/40 font-bold">- {t("devices3D")}- </p>- <div className="flex items-center gap-2">- <div className="flex items-center squircle-element border border-white/8 bg-white/3 p-0.5">- <button- type="button"- onClick={() => scrollDevices("left")}- disabled={!canScrollLeft}- className="flex size-7 items-center justify-center squircle-element text-white/70 transition-all hover:bg-white/6 hover:text-white disabled:pointer-events-none disabled:opacity-30"- >- <Icon icon="ph:caret-left-bold" width="12" />- </button>- <button- type="button"- onClick={() => scrollDevices("right")}- disabled={!canScrollRight}- className="flex size-7 items-center justify-center rounded-full text-white/70 transition-all hover:bg-white/6 hover:text-white disabled:pointer-events-none disabled:opacity-30"- >- <Icon icon="ph:caret-right-bold" width="12" />- </button>- </div>+ <>+ <div className="h-px bg-white/6" />+ <div className="flex flex-col gap-3">+ <div className="flex items-center justify-between">+ <p className="text-[10px] uppercase tracking-widest text-white/40 font-bold">+ {t("devices3D")}+ </p>+ <div className="flex items-center gap-2">+ <div className="flex items-center squircle-element border border-white/8 bg-white/3 p-0.5">+ <button+ type="button"+ onClick={() => scrollDevices("left")}+ disabled={!canScrollLeft}+ className="flex size-7 items-center justify-center squircle-element text-white/70 transition-all hover:bg-white/6 hover:text-white disabled:pointer-events-none disabled:opacity-30"+ >+ <Icon icon="ph:caret-left-bold" width="12" />+ </button>+ <button+ type="button"+ onClick={() => scrollDevices("right")}+ disabled={!canScrollRight}+ className="flex size-7 items-center justify-center rounded-full text-white/70 transition-all hover:bg-white/6 hover:text-white disabled:pointer-events-none disabled:opacity-30"+ >+ <Icon icon="ph:caret-right-bold" width="12" />+ </button></div></div>+ </div>- <div className="relative">- <div- className={`pointer-events-none absolute inset-y-0 right-0 z-20 w-12 bg-gradient-to-l from-[#141417] to-transparent transition-opacity duration-200 ${canScrollRight ? "opacity-100" : "opacity-0"- }`}- />- <div- ref={devicesScrollRef}- className="grid grid-rows-2 grid-flow-col gap-2 overflow-x-auto overflow-y-hidden snap-x snap-mandatory scroll-smooth pb-2 pl-1 pr-12 custom-scrollbar"- style={{ scrollbarWidth: "none", msOverflowStyle: "none" }}- onScroll={handleDevicesScroll}- >- {IMAGE_DEVICE_TEMPLATES.map((tpl) => (- <DeviceCard- key={tpl.id}- tpl={tpl}- isActive={activeDeviceId === tpl.id}- onClick={() => handleDeviceClick(tpl.id)}- />- ))}- </div>+ <div className="relative">+ <div+ className={`pointer-events-none absolute inset-y-0 right-0 z-20 w-12 bg-gradient-to-l from-[#141417] to-transparent transition-opacity duration-200 ${canScrollRight ? "opacity-100" : "opacity-0"+ }`}+ />+ <div+ ref={devicesScrollRef}+ className="grid grid-rows-2 grid-flow-col gap-2 overflow-x-auto overflow-y-hidden snap-x snap-mandatory scroll-smooth pb-2 pl-1 pr-12 custom-scrollbar"+ style={{ scrollbarWidth: "none", msOverflowStyle: "none" }}+ onScroll={handleDevicesScroll}+ >+ {IMAGE_DEVICE_TEMPLATES.map((tpl) => (+ <DeviceCard+ key={tpl.id}+ tpl={tpl}+ isActive={activeDeviceId === tpl.id}+ onClick={() => handleDeviceClick(tpl.id)}+ />+ ))}</div></div>- </>- )}+ </div>+ </>{hasActiveFrame && (<Button onClick={handleRemoveAll} variant="outline" className="w-full text-xs" aria-label={t("remove")}>diff --git a/app/components/ui/editor/PlayerControls.tsx b/app/components/ui/editor/PlayerControls.tsxindex 5a9f910..7943f43 100644--- a/app/components/ui/editor/PlayerControls.tsx+++ b/app/components/ui/editor/PlayerControls.tsx@@ -111,14 +111,14 @@ export function PlayerControls({>{/* Left Section: Fullscreen & Zoom */}<div className="flex items-center gap-3 text-xs">- <TooltipAction label={fullscreenLabel}>+ <TooltipAction label={t("split.clip")}><button- onClick={onToggleFullscreen}- className="text-zinc-500 hover:text-white transition-colors"- aria-label={fullscreenLabel}- aria-pressed={isFullscreen}+ onClick={() => onSplitClip?.()}+ disabled={!canSplitClip}+ className="text-zinc-500 hover:text-white active:scale-95 transition-all p-1 flex items-center justify-center disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:text-zinc-500 disabled:active:scale-100"+ aria-label={t("split.clip")}>- <Icon icon={isFullscreen ? "typcn:arrow-minimise" : "typcn:arrow-maximise"} width="17" aria-hidden="true" />+ <Icon icon="mingcute:scissors-fill" width="15" aria-hidden="true" /></button></TooltipAction>@@ -177,14 +177,14 @@ export function PlayerControls({</div><div className="h-4 w-px bg-white/10" />- <TooltipAction label={t("split.clip")}>+ <TooltipAction label={fullscreenLabel}><button- onClick={() => onSplitClip?.()}- disabled={!canSplitClip}- className="text-zinc-500 hover:text-white active:scale-95 transition-all p-1 flex items-center justify-center disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:text-zinc-500 disabled:active:scale-100"- aria-label={t("split.clip")}+ onClick={onToggleFullscreen}+ className="text-zinc-500 hover:text-white transition-colors"+ aria-label={fullscreenLabel}+ aria-pressed={isFullscreen}>- <Icon icon="mingcute:scissors-fill" width="15" aria-hidden="true" />+ <Icon icon={isFullscreen ? "typcn:arrow-minimise" : "octicon:screen-full-16"} width="17" aria-hidden="true" /></button></TooltipAction></div>diff --git a/app/components/ui/editor/ToolsSidebar.tsx b/app/components/ui/editor/ToolsSidebar.tsxindex 8f443aa..9465df4 100644--- a/app/components/ui/editor/ToolsSidebar.tsx+++ b/app/components/ui/editor/ToolsSidebar.tsx@@ -61,7 +61,7 @@ export function ToolsSidebar({const isPhotoMode = editorMode === "photo";useEffect(() => {- if (newVideosCount > 0 && videosToolRef.current && activeTool !== "videos") {+ if (newVideosCount > 0 && videosToolRef.current && activeTool !== "video") {videosToolRef.current.scrollIntoView({ behavior: 'smooth', block: 'center' });}}, [newVideosCount, activeTool]);@@ -221,7 +221,6 @@ export function ToolsSidebar({return (<div ref={sidebarWrapperRef} className="relative shrink-0 bg-[#141417]" style={{ width: '90px' }} role="complementary" aria-label={t("tools.toolbar")}>- <div className="h-13 border-b border-white/10 w-full" /><asideclassName="absolute top-1/2 left-12 -translate-x-1/2 -translate-y-1/2 flex flex-col items-center justify-center gap-4 squircle-element-xl border shadow-md shadow-white/20 border-white/10 z-40"style={{@@ -284,10 +283,10 @@ export function ToolsSidebar({<SidebarToolicon="solar:video-library-outline"label={t("tools.videos")}- isActive={activeTool === "videos"}- onClick={() => onToolChange("videos")}+ isActive={activeTool === "video"}+ onClick={() => onToolChange("video")}ref={videosToolRef}- badgeCount={activeTool !== "videos" ? newVideosCount : undefined}+ badgeCount={activeTool !== "video" ? newVideosCount : undefined}popover={{title: t("popovers.videos.title"),description: t("popovers.videos.description"),diff --git a/app/components/ui/editor/VideoCanvas.tsx b/app/components/ui/editor/VideoCanvas.tsxindex 735e842..2597527 100644--- a/app/components/ui/editor/VideoCanvas.tsx+++ b/app/components/ui/editor/VideoCanvas.tsx@@ -7,7 +7,7 @@ import type { ImageElement, SvgElement } from "@/types/canvas-elements.types";import { getCameraLayout } from "@/types/camera.types";import { ASPECT_RATIO_DIMENSIONS } from "@/types";import { getWallpaperUrl } from "@/lib/wallpaper.utils";-import { drawRoundedRect, drawRoundedRectBottomOnly, calculateScaledPadding, applyCanvasBackground, getAspectRatioStyle, getAspectRatioNumber, Corner, getCornerStyle, getNearestCorner, snapRotation, normalizeAngle } from "@/lib/canvas.utils";+import { drawRoundedRect, drawRoundedRectBottomOnly, calculateScaledPadding, applyCanvasBackground, getAspectRatioStyle, getAspectRatioNumber, Corner, getCornerStyle, getNearestCorner, snapRotation } from "@/lib/canvas.utils";import { drawMockupToCanvas } from "@/lib/mockup-canvas.utils";import { speedToTransitionMs, ZOOM_EASING, calculateZoomPhaseState, zoomLevelToFactor } from "@/types/zoom.types";import type { ZoomFragment } from "@/types/zoom.types";@@ -170,7 +170,6 @@ function VideoCanvasInner({const rafDragRef = useRef<number | null>(null);const pendingUpdateRef = useRef<{ id: string; x: number; y: number } | null>(null);const pendingMultiUpdatesRef = useRef<Map<string, { x: number; y: number }>>(new Map());-const imagePhoneModelUrl = PHONE_DEVICE_URLS[imagePhoneDevice];// Get current thumbnail for scrubbing preview@@ -363,6 +362,10 @@ function VideoCanvasInner({const previewContainerRef = useRef<HTMLDivElement>(null);const canvasWrapperRef = useRef<HTMLDivElement>(null);+ const mockupBoxRef = useRef<HTMLDivElement>(null);+ const mockupContentRef = useRef<HTMLDivElement>(null);+ const [contentInsets, setContentInsets] = useState({ top: 0, bottom: 0, left: 0, right: 0 });+ctrlScrollWheelRef.current = (e: WheelEvent) => {if (!e.ctrlKey || !imagePhoneActive) return;e.preventDefault();@@ -373,6 +376,7 @@ function VideoCanvasInner({if (imagePhoneZoomTimerRef.current) clearTimeout(imagePhoneZoomTimerRef.current);imagePhoneZoomTimerRef.current = setTimeout(() => setImagePhoneZoomVisible(false), 1200);};+useEffect(() => {const el = previewContainerRef.current;if (!el) return;@@ -487,7 +491,17 @@ function VideoCanvasInner({// Multi-select and canvas right-click context menuconst [canvasSelectedIds, setCanvasSelectedIds] = useState<string[]>([]);const [canvasCtxMenu, setCanvasCtxMenu] = useState<{ x: number; y: number; isVideo?: boolean } | null>(null);+ const [videoContainerSize, setVideoContainerSize] = useState({ width: 0, height: 0 });+ useEffect(() => {+ const container = videoContainerRef.current;+ if (!container) return;+ const observer = new ResizeObserver(([entry]) => {+ setVideoContainerSize({ width: entry.contentRect.width, height: entry.contentRect.height });+ });+ observer.observe(container);+ return () => observer.disconnect();+ }, []);// Smart guides state for element alignmentconst [alignmentGuides, setAlignmentGuides] = useState<{vertical: number[];@@ -1829,9 +1843,57 @@ function VideoCanvasInner({setEditingTextId(null);}, [onElementDelete, onElementUpdate]);+ useEffect(() => {+ const box = mockupBoxRef.current;+ const content = mockupContentRef.current;+ if (!box || !content) return;++ const measure = () => {+ const boxRect = box.getBoundingClientRect();+ const contentRect = content.getBoundingClientRect();+ setContentInsets({+ top: contentRect.top - boxRect.top,+ bottom: boxRect.bottom - contentRect.bottom,+ left: contentRect.left - boxRect.left,+ right: boxRect.right - contentRect.right,+ });+ };++ const observer = new ResizeObserver(measure);+ observer.observe(box);+ observer.observe(content);+ measure();++ return () => observer.disconnect();+ }, [hasMockup, mockupId, mockupConfig]);++ const mockupBoxSize = useMemo(() => {+ if (!mediaContainAspect) return null;+ const { width: Wp, height: Hp } = videoContainerSize;+ if (Wp <= 0 || Hp <= 0) return null;++ const hI = contentInsets.left + contentInsets.right;+ const vI = contentInsets.top + contentInsets.bottom;++ if (hI <= 0 && vI <= 0) {+ if (Wp / Hp > mediaContainAspect) {+ const H = Hp;+ return { width: H * mediaContainAspect, height: H };+ }+ return { width: Wp, height: Wp / mediaContainAspect };+ }++ const widthBoundHeight = vI + (Wp - hI) / mediaContainAspect;+ if (widthBoundHeight <= Hp) {+ return { width: Wp, height: widthBoundHeight };+ }+ const heightBoundWidth = hI + mediaContainAspect * (Hp - vI);+ return { width: heightBoundWidth, height: Hp };+ }, [mediaContainAspect, videoContainerSize, contentInsets]);+const mockupChildren = useMemo(() => (hasMedia ? (- <div className="relative flex items-center justify-center overflow-hidden w-full h-full rounded-[inherit]">+ <div ref={mockupContentRef} className="relative flex items-center justify-center overflow-hidden w-full h-full rounded-[inherit]"><MediaContentmediaType={mediaType}videoUrl={videoUrl}@@ -1850,7 +1912,7 @@ function VideoCanvasInner({/></div>) : (- <div className="w-full h-full aspect-video min-w-75 bg-[#1E1E1E] border border-white/10 flex flex-col overflow-hidden">+ <div ref={mockupContentRef} className="w-full h-full aspect-video min-w-75 bg-[#1E1E1E] border border-white/10 flex flex-col overflow-hidden"><PlaceholderEditoronVideoUpload={mediaType === "video" ? onVideoUpload : onImageUpload}isUploading={isUploading}@@ -2110,7 +2172,7 @@ function VideoCanvasInner({? 'none' : (mediaType === "image" && imageTransform && !apply3DToBackground)? 'transform 300ms cubic-bezier(0.25, 0.46, 0.45, 0.94)': 'transform 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94)',- pointerEvents: imagePhoneActive ? 'none' : 'auto',+ pointerEvents: 'none',transformStyle: mediaType === "image" && !apply3DToBackground ? 'preserve-3d' : undefined,}}onMouseEnter={() => hasMedia && setIsVideoHovered(true)}@@ -2167,20 +2229,14 @@ function VideoCanvasInner({}}><div+ ref={mockupBoxRef}className="relative"- style={- !hasMockup && mediaContainAspect- ? {- aspectRatio: `${mediaContainAspect}`,- width: 'auto',- height: 'auto',- maxWidth: '100%',- maxHeight: '100%',- minWidth: 0,- minHeight: 0,- }- : { width: '100%', height: '100%' }- }+ style={{+ pointerEvents: imagePhoneActive ? 'none' : 'auto',+ ...(mockupBoxSize+ ? { width: `${mockupBoxSize.width}px`, height: `${mockupBoxSize.height}px` }+ : { width: '100%', height: '100%' }),+ }}>{isVideoSelected && videoHoverCorner && hasMedia && onVideoTransformChange && !isDraggingVideo && !isDraggingRotation && (<divdiff --git a/app/components/ui/editor/mockups/BraveGlassMockup.tsx b/app/components/ui/editor/mockups/BraveGlassMockup.tsxindex e66fb99..89501bd 100644--- a/app/components/ui/editor/mockups/BraveGlassMockup.tsx+++ b/app/components/ui/editor/mockups/BraveGlassMockup.tsx@@ -16,14 +16,14 @@ export function BraveGlassMockup({shadows = 20,roundedCorners}: BraveGlassMockupProps) {- const isDark = config.darkMode;+ const isDark = config.darkMode;const frameColor = config.frameColor;const url = config.url;const cornerRadius = roundedCorners ?? config.cornerRadius;const headerOpacity = config.headerOpacity ?? 100;-+const headerScale = (config.headerScale || 100) / 100;-+const bgColor = isDark ? "#1e1e1e" : "#f9f9f9";const borderColor = isDark ? "rgba(255,255,255,0.1)" : "rgba(0,0,0,0.1)";const textColor = isDark ? "#9ca3af" : "#6b7280";@@ -51,17 +51,17 @@ export function BraveGlassMockup({return (<div- className={`glass-border relative w-full flex flex-col overflow-hidden ${className}`}+ className={`glass-border relative w-full h-full flex flex-col overflow-hidden ${className}`}style={{borderRadius: `${cornerRadius}px`,boxShadow: shadows > 0? `0 ${shadows * 0.3}px ${shadows}px rgba(0,0,0,1)`: 'none',- borderTop: "1px solid rgba(255,255,255,0.6)",+ borderTop: "1px solid rgba(255,255,255,0.6)",borderLeft: "1px solid rgba(255,255,255,0.6)",}}>- <div+ <divclassName="flex items-center justify-between select-none shrink-0"style={{height: `${headerHeight}px`,@@ -71,8 +71,7 @@ export function BraveGlassMockup({borderTopRightRadius: `${cornerRadius}px`,}}>- {/* Grupo izquierdo: chevrons + refresh */}- <div+ <divclassName="flex items-center"style={{ gap: `${navGap}px`, paddingLeft: `${headerPadding}px`, color: textColor }}>@@ -87,12 +86,11 @@ export function BraveGlassMockup({</svg></div>- {/* Barra de URL central */}- <div+ <divclassName="flex-1 max-w-xl"style={{ margin: `0 ${urlBarMargin}px` }}>- <div+ <divclassName="rounded w-full flex items-center justify-between"style={{height: `${urlBarHeight}px`,@@ -105,7 +103,7 @@ export function BraveGlassMockup({<svg style={{ width: `${iconSize * 0.65}px`, height: `${iconSize * 0.65}px`, opacity: 0.6, flexShrink: 0 }} fill="none" stroke="currentColor" viewBox="0 0 24 24"><path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z" /></svg>- <span+ <spanclassName="flex-1 text-center font-medium truncate"style={{ fontSize: `${fontSize}px`, padding: `0 ${urlBarPadding}px` }}>@@ -117,7 +115,6 @@ export function BraveGlassMockup({</div></div>- {/* Grupo derecho: download + dots + botones Windows */}<div className="flex items-center h-full" style={{ color: textColor }}><div className="flex items-center" style={{ gap: `${rightGroupGap}px`, paddingRight: `${rightGroupGap}px` }}><svg style={{ width: `${iconSize * 0.75}px`, height: `${iconSize * 0.75}px` }} fill="none" stroke="currentColor" viewBox="0 0 24 24">@@ -154,12 +151,11 @@ export function BraveGlassMockup({</div></div>- {/* Contenido del navegador */}- <div+ <divclassName="flex-1 relative overflow-hidden"style={{backgroundColor: bgColor,- borderBottomLeftRadius: `${Math.max(0, cornerRadius - 3)}px`,+ borderBottomLeftRadius: `${Math.max(0, cornerRadius - 3)}px`,borderBottomRightRadius: `${Math.max(0, cornerRadius - 3)}px`,}}>diff --git a/app/components/ui/editor/mockups/BraveMockup.tsx b/app/components/ui/editor/mockups/BraveMockup.tsxindex 93019ca..58daee6 100644--- a/app/components/ui/editor/mockups/BraveMockup.tsx+++ b/app/components/ui/editor/mockups/BraveMockup.tsx@@ -21,9 +21,9 @@ export function BraveMockup({const url = config.url;const cornerRadius = roundedCorners ?? config.cornerRadius;const headerOpacity = config.headerOpacity ?? 100;-+const headerScale = (config.headerScale || 100) / 100;-+const bgColor = isDark ? "#1e1e1e" : "#f9f9f9";const borderColor = isDark ? "rgba(255,255,255,0.1)" : "rgba(0,0,0,0.1)";const textColor = isDark ? "#9ca3af" : "#6b7280";@@ -50,7 +50,7 @@ export function BraveMockup({return (<div- className={`relative w-full flex flex-col overflow-hidden ${className}`}+ className={`relative w-full h-full flex flex-col overflow-hidden ${className}`}style={{borderRadius: `${cornerRadius}px`,boxShadow: shadows > 0diff --git a/app/components/ui/editor/mockups/BrowserTabGlassMockup.tsx b/app/components/ui/editor/mockups/BrowserTabGlassMockup.tsxindex 93c8558..e731518 100644--- a/app/components/ui/editor/mockups/BrowserTabGlassMockup.tsx+++ b/app/components/ui/editor/mockups/BrowserTabGlassMockup.tsx@@ -44,7 +44,7 @@ export function BrowserTabGlassMockup({return (<div- className={`glass-border relative w-full flex flex-col overflow-hidden ${className}`}+ className={`glass-border relative w-full h-full flex flex-col overflow-hidden ${className}`}style={{borderRadius: `${cornerRadius}px`,boxShadow: shadows > 0diff --git a/app/components/ui/editor/mockups/ChromeGlassMockup.tsx b/app/components/ui/editor/mockups/ChromeGlassMockup.tsxindex ab5c933..267f790 100644--- a/app/components/ui/editor/mockups/ChromeGlassMockup.tsx+++ b/app/components/ui/editor/mockups/ChromeGlassMockup.tsx@@ -59,7 +59,7 @@ export function ChromeGlassMockup({return (<div- className={`glass-border relative w-full flex flex-col overflow-hidden ${className}`}+ className={`glass-border relative w-full h-full flex flex-col overflow-hidden ${className}`}style={{borderRadius: `${cornerRadius}px`,boxShadow: shadows > 0diff --git a/app/components/ui/editor/mockups/ChromeMockup.tsx b/app/components/ui/editor/mockups/ChromeMockup.tsxindex 43e9e23..98b2785 100644--- a/app/components/ui/editor/mockups/ChromeMockup.tsx+++ b/app/components/ui/editor/mockups/ChromeMockup.tsx@@ -58,7 +58,7 @@ export function ChromeMockup({return (<div- className={`relative w-full flex flex-col overflow-hidden ${className}`}+ className={`relative w-full h-full flex flex-col overflow-hidden ${className}`}style={{borderRadius: `${cornerRadius}px`,boxShadow: shadows > 0diff --git a/app/components/ui/editor/mockups/GlassCurveMockup.tsx b/app/components/ui/editor/mockups/GlassCurveMockup.tsxindex 242ace5..4757959 100644--- a/app/components/ui/editor/mockups/GlassCurveMockup.tsx+++ b/app/components/ui/editor/mockups/GlassCurveMockup.tsx@@ -38,10 +38,10 @@ export function GlassCurveMockup({return (<div- className={`relative flex flex-col ${className}`}+ className={`relative w-full h-full flex flex-col ${className}`}><div- className="relative flex flex-col backdrop-blur-2xl overflow-hidden"+ className="relative w-full h-full flex flex-col backdrop-blur-2xl overflow-hidden"style={{padding: `${framePadding}px`,backgroundColor: hexToRgba(frameColor, headerOpacity),diff --git a/app/components/ui/editor/mockups/GlassFullMockup.tsx b/app/components/ui/editor/mockups/GlassFullMockup.tsxindex 82a659c..64bafcb 100644--- a/app/components/ui/editor/mockups/GlassFullMockup.tsx+++ b/app/components/ui/editor/mockups/GlassFullMockup.tsx@@ -20,18 +20,18 @@ export function GlassFullMockup({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;- const buttonWidth = 7 * headerScale;-+ const buttonWidth = 7 * headerScale;+const notchTop = 8 * headerScale;const notchWidth = 104 * headerScale;const notchHeight = 24 * headerScale;const notchPaddingX = 8 * headerScale;const dotSize = 8 * headerScale;-+const statusBarHeight = 32 * headerScale;const statusBarPaddingX = 28 * headerScale;const timeFontSize = 10 * headerScale;@@ -40,9 +40,9 @@ export function GlassFullMockup({const wifiSize = 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;@@ -54,15 +54,15 @@ export function GlassFullMockup({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.25)" : "rgba(0, 0, 0, 0.15)";const buttonBorderColor = isDark ? "rgba(255, 255, 255, 0.4)" : "rgba(0, 0, 0, 0.25)";const buttonShadow = isDark ? "inset 0px 0px 4px rgba(255,255,255,0.2), 0 1px 3px rgba(0,0,0,0.5)" : "inset 0px 0px 4px rgba(0,0,0,0.1), 0 1px 3px rgba(0,0,0,0.2)";return (- <div className={`relative flex flex-col ${className}`}>- <div- className="relative flex flex-col backdrop-blur-2xl"+ <div className={`relative flex flex-col w-full h-full ${className}`}>+ <div+ className="relative flex flex-col w-full h-full backdrop-blur-2xl"style={{padding: `${framePadding}px`,backgroundColor: hexToRgba(frameColor, headerOpacity),@@ -71,7 +71,7 @@ export function GlassFullMockup({border: `1px solid ${frameBorderColor}`,}}>- <div+ <divclassName="absolute backdrop-blur-md rounded-l-sm z-[-1]"style={{left: `-${buttonWidth}px`,@@ -85,7 +85,7 @@ export function GlassFullMockup({boxShadow: buttonShadow}}/>- <div+ <divclassName="absolute backdrop-blur-md rounded-l-sm z-[-1]"style={{left: `-${buttonWidth}px`,@@ -99,7 +99,7 @@ export function GlassFullMockup({boxShadow: buttonShadow}}/>- <div+ <divclassName="absolute backdrop-blur-md rounded-r-sm z-[-1]"style={{right: `-${buttonWidth}px`,@@ -114,7 +114,7 @@ export function GlassFullMockup({}}/>- <div+ <divclassName="relative w-full h-full overflow-hidden flex flex-col shadow-inner"style={{backgroundColor: screenBg,@@ -122,7 +122,7 @@ export function GlassFullMockup({border: `1px solid ${screenBorderColor}`,}}>- <div+ <divclassName="absolute left-1/2 -translate-x-1/2 rounded-full z-30 flex items-center justify-between shadow-sm"style={{top: `${notchTop}px`,@@ -132,24 +132,24 @@ export function GlassFullMockup({padding: `0 ${notchPaddingX}px`}}>- <div+ <divclassName="bg-neutral-500 rounded-full border border-neutral-700"style={{ width: `${dotSize}px`, height: `${dotSize}px` }}/>- <div+ <divclassName="bg-indigo-500 rounded-full opacity-80 blur-[1px]"style={{ width: `${dotSize}px`, height: `${dotSize}px` }}/></div>- <div+ <divclassName="absolute top-0 w-full flex items-center justify-between z-20"style={{height: `${statusBarHeight}px`,padding: `0 ${statusBarPaddingX}px`,}}>- <span+ <spanclassName="font-bold tracking-tight"style={{ fontSize: `${timeFontSize}px`, color: statusBarText }}>@@ -164,8 +164,8 @@ export function GlassFullMockup({<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++ <divclassName="relative rounded-[2px] flex items-center"style={{width: `${batteryWidth}px`,@@ -175,7 +175,7 @@ export function GlassFullMockup({}}><div className="h-full rounded-[0.5px]" style={{ width: '70%', backgroundColor: statusBarText }} />- <div+ <divclassName="absolute rounded-r-full"style={{right: '-2px',@@ -188,7 +188,7 @@ export function GlassFullMockup({</div></div>- <div+ <divclassName="relative w-full h-full"style={{ paddingTop: `${contentPaddingTop}px` }}>@@ -197,7 +197,7 @@ export function GlassFullMockup({</div></div>- <div+ <divclassName="absolute left-1/2 -translate-x-1/2 rounded-full z-20 pointer-events-none"style={{bottom: `${homeIndicatorBottom}px`,diff --git a/app/components/ui/editor/mockups/GlassUIContainerMockup.tsx b/app/components/ui/editor/mockups/GlassUIContainerMockup.tsxindex 1dc4ee5..900ca11 100644--- a/app/components/ui/editor/mockups/GlassUIContainerMockup.tsx+++ b/app/components/ui/editor/mockups/GlassUIContainerMockup.tsx@@ -18,7 +18,7 @@ export function GlassUIContainerMockup({return (<div- className={`glass-border relative w-full flex flex-col overflow-hidden ${className}`}+ className={`glass-border relative w-full h-full flex flex-col overflow-hidden ${className}`}style={{borderRadius: `${cornerRadius}px`,boxShadow: shadows > 0diff --git a/app/components/ui/editor/mockups/HardShellMockup.tsx b/app/components/ui/editor/mockups/HardShellMockup.tsxindex c8d6feb..aa24b94 100644--- a/app/components/ui/editor/mockups/HardShellMockup.tsx+++ b/app/components/ui/editor/mockups/HardShellMockup.tsx@@ -53,10 +53,10 @@ export function HardShellMockup({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}`}>+ <div className={`relative w-full h-full flex flex-col items-center justify-center ${className}`}><div- className="relative flex items-center justify-center shadow-2xl"+ className="relative w-full h-full flex items-center justify-center shadow-2xl"style={{padding: `${outerPadding}px`,backgroundColor: frameColor,diff --git a/app/components/ui/editor/mockups/IPhoneSlimMockup.tsx b/app/components/ui/editor/mockups/IPhoneSlimMockup.tsxindex 49e53ae..3baaf61 100644--- a/app/components/ui/editor/mockups/IPhoneSlimMockup.tsx+++ b/app/components/ui/editor/mockups/IPhoneSlimMockup.tsx@@ -5,209 +5,205 @@ import type { MockupRenderProps } from "@/types/mockup.types";import { hexToRgba } from "@/lib/utils";interface IPhoneSlimMockupProps extends MockupRenderProps {- shadows?: number;- roundedCorners?: number;+ shadows?: number;+ roundedCorners?: number;}export function IPhoneSlimMockup({- children,- config,- className = "",- shadows = 30,- roundedCorners,+ children,+ config,+ className = "",+ shadows = 30,+ roundedCorners,}: IPhoneSlimMockupProps) {- const isDark = config.darkMode;- const frameColor = isDark ? config.frameColor : "#e5e5e5";- const cornerRadius = roundedCorners ?? config.cornerRadius;- const headerOpacity = config.headerOpacity ?? 100;- const headerScale = (config.headerScale || 100) / 100;+ const isDark = config.darkMode;+ const frameColor = isDark ? config.frameColor : "#e5e5e5";+ const cornerRadius = roundedCorners ?? config.cornerRadius;+ const headerOpacity = config.headerOpacity ?? 100;+ const headerScale = (config.headerScale || 100) / 100;- // Dimensiones del Header optimizadas para alineación perfecta- const statusBarHeight = 32 * headerScale;- const statusBarPaddingX = 24 * headerScale;- const timeFontSize = 12 * headerScale;- const signalBarWidth = 3 * headerScale;- const wifiSize = 13 * headerScale;- const batteryWidth = 22 * headerScale;- const batteryHeight = 11 * headerScale;- const iconsGap = 6 * headerScale;+ const statusBarHeight = 32 * headerScale;+ const statusBarPaddingX = 24 * headerScale;+ const timeFontSize = 12 * headerScale;+ const signalBarWidth = 3 * headerScale;+ const wifiSize = 13 * headerScale;+ const batteryWidth = 22 * headerScale;+ const batteryHeight = 11 * headerScale;+ const iconsGap = 6 * headerScale;- const dynamicIslandTop = 6 * headerScale;- const dynamicIslandMinHeight = 18 * headerScale;- const dynamicIslandPaddingX = 8 * headerScale;- const dynamicIslandGap = 4 * headerScale;- const dotSize = 5 * headerScale;+ const dynamicIslandTop = 6 * headerScale;+ const dynamicIslandMinHeight = 18 * headerScale;+ const dynamicIslandPaddingX = 8 * headerScale;+ const dynamicIslandGap = 4 * headerScale;+ const dotSize = 5 * headerScale;- const homeIndicatorBottom = 6 * headerScale;- const homeIndicatorHeight = 3 * headerScale;- const framePadding = 6 * headerScale;+ const homeIndicatorBottom = 6 * headerScale;+ const homeIndicatorHeight = 3 * headerScale;+ const framePadding = 6 * headerScale;- const screenBg = isDark ? "#0a0a0a" : "#fafafa";- const statusBarText = isDark ? "#ffffff" : "#000000";- const borderColor = isDark ? "#404040" : "#525252";+ const screenBg = isDark ? "#0a0a0a" : "#fafafa";+ const statusBarText = isDark ? "#ffffff" : "#000000";+ const borderColor = isDark ? "#404040" : "#525252";- return (- <div className={`relative flex flex-col ${className}`}>+ return (+ <div className={`relative w-full h-full flex flex-col ${className}`}>+ <div+ className="relative w-full h-full flex flex-col"+ 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,1)` : "none",+ border: `1px solid ${borderColor}`,+ }}+ >+ <div+ className="absolute -left-1.25 top-[15%] w-1 h-[6%] rounded-l-sm"+ style={{+ backgroundColor: hexToRgba(frameColor, headerOpacity),+ borderLeft: `1px solid ${borderColor}`,+ borderTop: `1px solid ${borderColor}`,+ borderBottom: `1px solid ${borderColor}`,+ }}+ />+ <div+ className="absolute -left-1.25 top-[24%] w-1 h-[12%] rounded-l-sm"+ style={{+ backgroundColor: hexToRgba(frameColor, headerOpacity),+ borderLeft: `1px solid ${borderColor}`,+ borderTop: `1px solid ${borderColor}`,+ borderBottom: `1px solid ${borderColor}`,+ }}+ />+ <div+ className="absolute -right-1.25 top-[28%] w-1 h-[14%] rounded-r-sm"+ style={{+ backgroundColor: hexToRgba(frameColor, headerOpacity),+ borderRight: `1px solid ${borderColor}`,+ borderTop: `1px solid ${borderColor}`,+ borderBottom: `1px solid ${borderColor}`,+ }}+ />++ <div+ className="relative w-full h-full overflow-hidden flex flex-col border border-black"+ style={{+ backgroundColor: "#000000",+ borderRadius: `${cornerRadius * 2.2}px`,+ }}+ >+ <div+ className="absolute left-1/2 -translate-x-1/2 w-[28%] bg-black rounded-full z-30 flex items-center justify-center"+ style={{+ top: `${dynamicIslandTop}px`,+ minHeight: `${dynamicIslandMinHeight}px`,+ height: "4%",+ padding: `0 ${dynamicIslandPaddingX}px`,+ gap: `${dynamicIslandGap}px`,+ boxShadow: "0 2px 8px rgba(0,0,0,0.3)",+ }}+ ><div- className="relative flex flex-col"- 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,1)` : "none",- border: `1px solid ${borderColor}`,- }}+ className="bg-indigo-500/40 rounded-full blur-[1px]"+ style={{ width: `${dotSize}px`, height: `${dotSize}px` }}+ />+ <div+ className="bg-neutral-800 rounded-full border border-white/10"+ style={{ width: `${dotSize}px`, height: `${dotSize}px` }}+ />+ </div>++ <div+ className="absolute -top-2 w-full flex items-center justify-between z-20"+ style={{+ height: `max(${statusBarHeight}px, 7%)`,+ padding: `0 ${statusBarPaddingX}px`,+ }}+ >+ <span+ className="font-bold tracking-tight leading-none flex items-center"+ style={{ fontSize: `${timeFontSize}px`, color: statusBarText }}+ >+ 9:41+ </span>+ <div+ className="flex items-center opacity-90"+ style={{ gap: `${iconsGap}px` }}>+ <div+ className="flex items-end"+ style={{ gap: "1.5px", height: `${batteryHeight}px` }}+ ><div- className="absolute -left-1.25 top-[15%] w-1 h-[6%] rounded-l-sm"- style={{- backgroundColor: hexToRgba(frameColor, headerOpacity),- borderLeft: `1px solid ${borderColor}`,- borderTop: `1px solid ${borderColor}`,- borderBottom: `1px solid ${borderColor}`,- }}+ className="rounded-full"+ style={{ width: `${signalBarWidth}px`, height: "30%", backgroundColor: statusBarText }}/><div- className="absolute -left-1.25 top-[24%] w-1 h-[12%] rounded-l-sm"- style={{- backgroundColor: hexToRgba(frameColor, headerOpacity),- borderLeft: `1px solid ${borderColor}`,- borderTop: `1px solid ${borderColor}`,- borderBottom: `1px solid ${borderColor}`,- }}+ className="rounded-full"+ style={{ width: `${signalBarWidth}px`, height: "55%", backgroundColor: statusBarText }}/><div- className="absolute -right-1.25 top-[28%] w-1 h-[14%] rounded-r-sm"- style={{- backgroundColor: hexToRgba(frameColor, headerOpacity),- borderRight: `1px solid ${borderColor}`,- borderTop: `1px solid ${borderColor}`,- borderBottom: `1px solid ${borderColor}`,- }}+ className="rounded-full"+ style={{ width: `${signalBarWidth}px`, height: "80%", backgroundColor: statusBarText }}/>-<div- className="relative w-full h-full overflow-hidden flex flex-col border border-black"- style={{- backgroundColor: "#000000",- borderRadius: `${cornerRadius * 2.2}px`,- }}- >- <div- className="absolute left-1/2 -translate-x-1/2 w-[28%] bg-black rounded-full z-30 flex items-center justify-center"- style={{- top: `${dynamicIslandTop}px`,- minHeight: `${dynamicIslandMinHeight}px`,- height: "4%",- padding: `0 ${dynamicIslandPaddingX}px`,- gap: `${dynamicIslandGap}px`,- boxShadow: "0 2px 8px rgba(0,0,0,0.3)",- }}- >- <div- className="bg-indigo-500/40 rounded-full blur-[1px]"- style={{ width: `${dotSize}px`, height: `${dotSize}px` }}- />- <div- className="bg-neutral-800 rounded-full border border-white/10"- style={{ width: `${dotSize}px`, height: `${dotSize}px` }}- />- </div>-- <div- className="absolute -top-2 w-full flex items-center justify-between z-20"- style={{- height: `max(${statusBarHeight}px, 7%)`,- padding: `0 ${statusBarPaddingX}px`,- }}- >- <span- className="font-bold tracking-tight leading-none flex items-center"- style={{ fontSize: `${timeFontSize}px`, color: statusBarText }}- >- 9:41- </span>-- <div- className="flex items-center opacity-90"- style={{ gap: `${iconsGap}px` }}- >- <div- className="flex items-end"- style={{ gap: "1.5px", height: `${batteryHeight}px` }}- >- <div- className="rounded-full"- style={{ width: `${signalBarWidth}px`, height: "30%", backgroundColor: statusBarText }}- />- <div- className="rounded-full"- style={{ width: `${signalBarWidth}px`, height: "55%", backgroundColor: statusBarText }}- />- <div- className="rounded-full"- style={{ width: `${signalBarWidth}px`, height: "80%", backgroundColor: statusBarText }}- />- <div- className="rounded-full"- style={{ width: `${signalBarWidth}px`, height: "100%", backgroundColor: statusBarText }}- />- </div>-- <Icon- icon="mdi:wifi"- style={{- width: `${wifiSize}px`,- height: `${wifiSize}px`,- color: statusBarText,- display: "block",- }}- />-- <div- className="border rounded-[3px] p-px flex items-center relative"- style={{- width: `${batteryWidth}px`,- height: `${batteryHeight}px`,- borderColor: `${statusBarText}50`,- }}- >- <div- className="h-full w-[85%] rounded-[1px]"- style={{ backgroundColor: statusBarText }}- />- <div- className="absolute -right-[3px] w-[2px] h-[40%] rounded-r-[1px]"- style={{ backgroundColor: `${statusBarText}50` }}- />- </div>- </div>- </div>+ className="rounded-full"+ style={{ width: `${signalBarWidth}px`, height: "100%", backgroundColor: statusBarText }}+ />+ </div>+ <Icon+ icon="mdi:wifi"+ style={{+ width: `${wifiSize}px`,+ height: `${wifiSize}px`,+ color: statusBarText,+ display: "block",+ }}+ />+ <div+ className="border rounded-[3px] p-px flex items-center relative"+ style={{+ width: `${batteryWidth}px`,+ height: `${batteryHeight}px`,+ borderColor: `${statusBarText}50`,+ }}+ >+ <div+ className="h-full w-[85%] rounded-[1px]"+ style={{ backgroundColor: statusBarText }}+ />+ <div+ className="absolute -right-[3px] w-[2px] h-[40%] rounded-r-[1px]"+ style={{ backgroundColor: `${statusBarText}50` }}+ />+ </div>+ </div>+ </div>- <div- className="w-full h-full relative overflow-hidden"- style={{ paddingTop: `max(${statusBarHeight}px, 8%)` }}- >- <div- className="absolute inset-0"- style={{- backgroundColor: screenBg,- top: `max(${statusBarHeight}px, 8%)`,- }}- />- <div className="relative z-10 w-full h-full">{children}</div>- </div>+ <div+ className="w-full h-full relative overflow-hidden"+ style={{ paddingTop: `max(${statusBarHeight}px, 8%)` }}+ >+ <div+ className="absolute inset-0"+ style={{+ backgroundColor: screenBg,+ top: `max(${statusBarHeight}px, 8%)`,+ }}+ />+ <div className="relative z-10 w-full h-full">{children}</div>+ </div>- <div- className="absolute left-1/2 -translate-x-1/2 w-[35%] rounded-full z-20"- style={{- bottom: `${homeIndicatorBottom}px`,- height: `${homeIndicatorHeight}px`,- backgroundColor: `${statusBarText}15`,- }}- />- </div>- </div>+ <div+ className="absolute left-1/2 -translate-x-1/2 w-[35%] rounded-full z-20"+ style={{+ bottom: `${homeIndicatorBottom}px`,+ height: `${homeIndicatorHeight}px`,+ backgroundColor: `${statusBarText}15`,+ }}+ /></div>- );+ </div>+ </div>+ );}\ No newline at end of filediff --git a/app/components/ui/editor/mockups/MacosContainerGlassMockup.tsx b/app/components/ui/editor/mockups/MacosContainerGlassMockup.tsxindex ccdd2c6..854b5eb 100644--- a/app/components/ui/editor/mockups/MacosContainerGlassMockup.tsx+++ b/app/components/ui/editor/mockups/MacosContainerGlassMockup.tsx@@ -22,7 +22,7 @@ export function MacosContainerGlassMockup({const headerPaddingB = 8 * headerScale;return (<div- className={`glass-border relative w-full flex flex-col overflow-hidden ${className}`}+ className={`glass-border relative w-full h-full flex flex-col overflow-hidden ${className}`}style={{borderRadius: `${cornerRadius}px`,boxShadow: shadows > 0diff --git a/app/components/ui/editor/mockups/MacosDarkIdeMockup.tsx b/app/components/ui/editor/mockups/MacosDarkIdeMockup.tsxindex 4632e42..29bd94a 100644--- a/app/components/ui/editor/mockups/MacosDarkIdeMockup.tsx+++ b/app/components/ui/editor/mockups/MacosDarkIdeMockup.tsx@@ -43,7 +43,7 @@ export function MacosDarkIdeMockup({return (<div- className={`relative w-full flex flex-col overflow-hidden ${className}`}+ className={`relative w-full h-full flex flex-col overflow-hidden ${className}`}style={{borderRadius: `${cornerRadius}px`,boxShadow: shadows > 0diff --git a/app/components/ui/editor/mockups/MacosGhostGlassMockup.tsx b/app/components/ui/editor/mockups/MacosGhostGlassMockup.tsxindex 2366243..d2d8a0d 100644--- a/app/components/ui/editor/mockups/MacosGhostGlassMockup.tsx+++ b/app/components/ui/editor/mockups/MacosGhostGlassMockup.tsx@@ -53,7 +53,7 @@ export function MacosGhostGlassMockup({return (<div- className={`glass-border relative w-full flex flex-col overflow-hidden ${className}`}+ className={`glass-border relative w-full h-full flex flex-col overflow-hidden ${className}`}style={{borderRadius: `${cornerRadius}px`,boxShadow: shadows > 0diff --git a/app/components/ui/editor/mockups/MacosGhostIdeMockup.tsx b/app/components/ui/editor/mockups/MacosGhostIdeMockup.tsxindex 2a856e4..7faea0f 100644--- a/app/components/ui/editor/mockups/MacosGhostIdeMockup.tsx+++ b/app/components/ui/editor/mockups/MacosGhostIdeMockup.tsx@@ -44,7 +44,7 @@ export function MacosGhostIdeMockup({return (<div- className={`relative w-full flex flex-col overflow-hidden ${className}`}+ className={`relative w-full h-full flex flex-col overflow-hidden ${className}`}style={{borderRadius: `${cornerRadius}px`,boxShadow: shadows > 0diff --git a/app/components/ui/editor/mockups/MacosGhostMockup.tsx b/app/components/ui/editor/mockups/MacosGhostMockup.tsxindex 0865241..f4c49d6 100644--- a/app/components/ui/editor/mockups/MacosGhostMockup.tsx+++ b/app/components/ui/editor/mockups/MacosGhostMockup.tsx@@ -53,7 +53,7 @@ export function MacosGhostMockup({return (<div- className={`relative w-full flex flex-col overflow-hidden ${className}`}+ className={`relative w-full h-full flex flex-col overflow-hidden ${className}`}style={{borderRadius: `${cornerRadius}px`,boxShadow: shadows > 0diff --git a/app/components/ui/editor/mockups/MacosGlassMockup.tsx b/app/components/ui/editor/mockups/MacosGlassMockup.tsxindex 69f1ce3..6858bca 100644--- a/app/components/ui/editor/mockups/MacosGlassMockup.tsx+++ b/app/components/ui/editor/mockups/MacosGlassMockup.tsx@@ -53,7 +53,7 @@ export function MacosGlassMockup({return (<div- className={`glass-border relative w-full flex flex-col overflow-hidden ${className}`}+ className={`glass-border relative w-full h-full flex flex-col overflow-hidden ${className}`}style={{borderRadius: `${cornerRadius}px`,boxShadow: shadows > 0@@ -170,7 +170,7 @@ export function MacosGlassMockup({<divclassName="flex-1 relative overflow-hidden"- style={{+ style={{backgroundColor: bgColor,borderBottomLeftRadius: `${Math.max(0, cornerRadius - 3)}px`,borderBottomRightRadius: `${Math.max(0, cornerRadius - 3)}px`,diff --git a/app/components/ui/editor/mockups/MacosMockup.tsx b/app/components/ui/editor/mockups/MacosMockup.tsxindex cd59449..6b49af5 100644--- a/app/components/ui/editor/mockups/MacosMockup.tsx+++ b/app/components/ui/editor/mockups/MacosMockup.tsx@@ -6,172 +6,118 @@ import { hexToRgba } from "@/lib/utils";import { deriveSearchBg } from "@/lib/color.utils";interface MacosMockupProps extends MockupRenderProps {- shadows?: number;- roundedCorners?: number;+ shadows?: number;+ roundedCorners?: number;}-export function MacosMockup({- children,- config,- className = "",- shadows = 20,- roundedCorners+export function MacosMockup({+ children,+ config,+ className = "",+ shadows = 20,+ roundedCorners}: MacosMockupProps) {- const isDark = config.darkMode;- const frameColor = config.frameColor;- const url = config.url;- const cornerRadius = roundedCorners ?? config.cornerRadius;- const headerOpacity = config.headerOpacity ?? 100;-- const headerScale = (config.headerScale || 100) / 100;-- const bgColor = isDark ? "#1e1e1e" : "#f9f9f9";- const borderColor = isDark ? "rgba(255,255,255,0.1)" : "rgba(0,0,0,0.1)";- const textColor = isDark ? "#9ca3af" : "#6b7280";- const urlBarBorder = isDark ? "rgba(255,255,255,0.1)" : "rgba(0,0,0,0.15)";+ const isDark = config.darkMode;+ const frameColor = config.frameColor;+ const url = config.url;+ const cornerRadius = roundedCorners ?? config.cornerRadius;+ const headerOpacity = config.headerOpacity ?? 100;+ const headerScale = (config.headerScale || 100) / 100;- const urlBarBgBase = deriveSearchBg(frameColor);- const baseHeight = 36;- const basePadding = 12;- const baseGap = 12;- const baseButtonSize = 10;- const baseIconSize = 14;- const baseUrlBarHeight = 24;- const baseFontSize = 10;-- const headerHeight = baseHeight * headerScale;- const headerPadding = basePadding * headerScale;- const buttonGroupGap = 6 * headerScale;- const navGap = 6 * headerScale;- const buttonSize = baseButtonSize * headerScale;- const iconSize = baseIconSize * headerScale;- const urlBarHeight = baseUrlBarHeight * headerScale;- const fontSize = baseFontSize * headerScale;- const urlBarPadding = 8 * headerScale;- const urlBarMargin = 16 * headerScale;- const rightGroupGap = 10 * headerScale;+ const bgColor = isDark ? "#1e1e1e" : "#f9f9f9";+ const borderColor = isDark ? "rgba(255,255,255,0.1)" : "rgba(0,0,0,0.1)";+ const textColor = isDark ? "#9ca3af" : "#6b7280";+ const urlBarBorder = isDark ? "rgba(255,255,255,0.1)" : "rgba(0,0,0,0.15)";+ const urlBarBgBase = deriveSearchBg(frameColor);- return (- <div- className={`relative w-full flex flex-col overflow-hidden ${className}`}- style={{- borderRadius: `${cornerRadius}px`,- boxShadow: shadows > 0- ? `0 ${shadows * 0.3}px ${shadows}px rgba(0,0,0,1)`- : 'none',- }}- >- <div- className="flex items-center justify-between select-none shrink-0"- style={{- height: `${headerHeight}px`,- padding: `0 ${headerPadding}px`,- backgroundColor: hexToRgba(frameColor, headerOpacity),- borderBottom: `1px solid ${borderColor}`,- borderTopLeftRadius: `${cornerRadius}px`,- borderTopRightRadius: `${cornerRadius}px`,- }}- >- <div- className="flex items-center"- style={{ gap: `${baseGap * headerScale}px` }}- >- <div className="flex" style={{ gap: `${buttonGroupGap}px` }}>- <div- className="rounded-full bg-[#FF5F56] border border-[#E0443E]"- style={{ width: `${buttonSize}px`, height: `${buttonSize}px` }}- />- <div- className="rounded-full bg-[#FFBD2E] border border-[#DEA123]"- style={{ width: `${buttonSize}px`, height: `${buttonSize}px` }}- />- <div- className="rounded-full bg-[#27C93F] border border-[#1AAB29]"- style={{ width: `${buttonSize}px`, height: `${buttonSize}px` }}- />- </div>+ const baseHeight = 36;+ const basePadding = 12;+ const baseGap = 12;+ const baseButtonSize = 10;+ const baseIconSize = 14;+ const baseUrlBarHeight = 24;+ const baseFontSize = 10;- <div- className="flex items-center"- style={{ gap: `${navGap}px`, color: textColor }}- >- <Icon- icon="mdi:menu"- style={{ width: `${iconSize}px`, height: `${iconSize}px` }}- />- <Icon- icon="mdi:chevron-left"- style={{ width: `${iconSize}px`, height: `${iconSize}px` }}- />- <Icon- icon="mdi:chevron-right"- className="opacity-40"- style={{ width: `${iconSize}px`, height: `${iconSize}px` }}- />- </div>- </div>+ const headerHeight = baseHeight * headerScale;+ const headerPadding = basePadding * headerScale;+ const buttonGroupGap = 6 * headerScale;+ const navGap = 6 * headerScale;+ const buttonSize = baseButtonSize * headerScale;+ const iconSize = baseIconSize * headerScale;+ const urlBarHeight = baseUrlBarHeight * headerScale;+ const fontSize = baseFontSize * headerScale;+ const urlBarPadding = 8 * headerScale;+ const urlBarMargin = 16 * headerScale;+ const rightGroupGap = 10 * headerScale;- <div- className="flex-1 max-w-xl"- style={{ margin: `0 ${urlBarMargin}px` }}- >- <div- className="rounded w-full flex items-center justify-between"- style={{- height: `${urlBarHeight}px`,- padding: `0 ${urlBarPadding}px`,- backgroundColor: hexToRgba(urlBarBgBase, headerOpacity),- border: `1px solid ${urlBarBorder}`,- color: textColor,- }}- >- <Icon- icon="mdi:lock"- className="opacity-60"- style={{- width: `${buttonSize}px`,- height: `${buttonSize}px`,- flexShrink: 0,- }}- />- <span- className="flex-1 text-center font-medium truncate"- style={{- fontSize: `${fontSize}px`,- padding: `0 ${urlBarPadding}px`,- }}- >- {url}- </span>- <Icon- icon="mdi:refresh"- className="opacity-60"- style={{- width: `${buttonSize}px`,- height: `${buttonSize}px`,- flexShrink: 0,- }}- />- </div>- </div>-- <div- className="flex items-center"- style={{ gap: `${rightGroupGap}px`, color: textColor }}- >- <Icon icon="mdi:download" style={{ width: `${iconSize}px`, height: `${iconSize}px` }} />- <Icon icon="mdi:upload" style={{ width: `${iconSize}px`, height: `${iconSize}px` }} />- <Icon icon="mdi:plus" style={{ width: `${iconSize}px`, height: `${iconSize}px` }} />- <Icon icon="mdi:content-copy" style={{ width: `${iconSize}px`, height: `${iconSize}px` }} />- </div>- </div>+ return (+ <div+ className={`relative w-full h-full flex flex-col overflow-hidden ${className}`}+ style={{+ borderRadius: `${cornerRadius}px`,+ boxShadow: shadows > 0 ? `0 ${shadows * 0.3}px ${shadows}px rgba(0,0,0,1)` : 'none',+ }}+ >+ <div+ className="flex items-center justify-between select-none shrink-0 overflow-hidden"+ style={{+ height: `${headerHeight}px`,+ padding: `0 ${headerPadding}px`,+ backgroundColor: hexToRgba(frameColor, headerOpacity),+ borderBottom: `1px solid ${borderColor}`,+ borderTopLeftRadius: `${cornerRadius}px`,+ borderTopRightRadius: `${cornerRadius}px`,+ }}+ >+ <div className="flex items-center shrink-0" style={{ gap: `${baseGap * headerScale}px` }}>+ <div className="flex shrink-0" style={{ gap: `${buttonGroupGap}px` }}>+ <div className="rounded-full bg-[#FF5F56] border border-[#E0443E]" style={{ width: `${buttonSize}px`, height: `${buttonSize}px` }} />+ <div className="rounded-full bg-[#FFBD2E] border border-[#DEA123]" style={{ width: `${buttonSize}px`, height: `${buttonSize}px` }} />+ <div className="rounded-full bg-[#27C93F] border border-[#1AAB29]" style={{ width: `${buttonSize}px`, height: `${buttonSize}px` }} />+ </div>+ <div className="flex items-center shrink-0" style={{ gap: `${navGap}px`, color: textColor }}>+ <Icon icon="mdi:menu" style={{ width: `${iconSize}px`, height: `${iconSize}px` }} />+ <Icon icon="mdi:chevron-left" style={{ width: `${iconSize}px`, height: `${iconSize}px` }} />+ <Icon icon="mdi:chevron-right" className="opacity-40" style={{ width: `${iconSize}px`, height: `${iconSize}px` }} />+ </div>+ </div>- <div- className="flex-1 relative overflow-hidden"- style={{ backgroundColor: bgColor }}+ <div className="flex-1 max-w-xl min-w-[60px] shrink" style={{ margin: `0 ${urlBarMargin}px` }}>+ <div+ className="rounded w-full flex items-center justify-between min-w-0"+ style={{+ height: `${urlBarHeight}px`,+ padding: `0 ${urlBarPadding}px`,+ backgroundColor: hexToRgba(urlBarBgBase, headerOpacity),+ border: `1px solid ${urlBarBorder}`,+ color: textColor,+ }}+ >+ <Icon icon="mdi:lock" className="opacity-60 shrink-0" style={{ width: `${buttonSize}px`, height: `${buttonSize}px` }} />+ <span+ className="flex-1 text-center font-medium truncate min-w-0"+ style={{+ fontSize: `${fontSize}px`,+ padding: `0 ${urlBarPadding}px`,+ }}>- {children}- </div>+ {url}+ </span>+ <Icon icon="mdi:refresh" className="opacity-60 shrink-0" style={{ width: `${buttonSize}px`, height: `${buttonSize}px` }} />+ </div></div>- );-}++ <div className="flex items-center shrink-0" style={{ gap: `${rightGroupGap}px`, color: textColor }}>+ <Icon icon="mdi:download" style={{ width: `${iconSize}px`, height: `${iconSize}px` }} />+ <Icon icon="mdi:upload" style={{ width: `${iconSize}px`, height: `${iconSize}px` }} />+ <Icon icon="mdi:plus" style={{ width: `${iconSize}px`, height: `${iconSize}px` }} />+ <Icon icon="mdi:content-copy" style={{ width: `${iconSize}px`, height: `${iconSize}px` }} />+ </div>+ </div>++ <div className="flex-1 relative overflow-hidden" style={{ backgroundColor: bgColor }}>+ {children}+ </div>+ </div>+ );+}\ No newline at end of filediff --git a/app/components/ui/editor/mockups/NoneMockup.tsx b/app/components/ui/editor/mockups/NoneMockup.tsxindex d45eac7..b145514 100644--- a/app/components/ui/editor/mockups/NoneMockup.tsx+++ b/app/components/ui/editor/mockups/NoneMockup.tsx@@ -6,25 +6,16 @@ interface NoneMockupProps extends MockupRenderProps {roundedCorners?: number;shadows?: number;}--export function NoneMockup({- children,- config,- className = "",- roundedCorners = 12,- shadows = 20-}: NoneMockupProps) {+export function NoneMockup({ children, config, className = "", roundedCorners = 12, shadows = 20 }: NoneMockupProps) {return (- <div- className={`relative overflow-hidden ${className}`}+ <div+ className={`relative w-full h-full overflow-hidden ${className}`}style={{borderRadius: `${roundedCorners}px`,- boxShadow: shadows > 0- ? `0 ${shadows * 0.3}px ${shadows}px rgba(0,0,0,1)`- : 'none',+ boxShadow: shadows > 0 ? `0 ${shadows * 0.3}px ${shadows}px rgba(0,0,0,1)` : 'none',}}>{children}</div>);-}+}\ No newline at end of filediff --git a/app/components/ui/editor/mockups/OutlineMockup.tsx b/app/components/ui/editor/mockups/OutlineMockup.tsxindex fbc9f15..5596fd2 100644--- a/app/components/ui/editor/mockups/OutlineMockup.tsx+++ b/app/components/ui/editor/mockups/OutlineMockup.tsx@@ -16,27 +16,23 @@ export function OutlineMockup({}: OutlineMockupProps) {const isDark = config.darkMode;const cornerRadius = roundedCorners ?? config.cornerRadius;-const screenBg = isDark ? "#0a0a0a" : "#ffffff";-const frameColor = config.frameColor || (isDark ? "rgba(255, 255, 255, 0.2)" : "rgba(0, 0, 0, 0.15)");-- const offset = 12;++ const offset = 12;const innerRadius = cornerRadius * 2.5;const outerRadius = innerRadius + offset;return (- <div className={`relative flex flex-col ${className}`}>-+ <div className={`relative w-full h-full flex flex-col ${className}`}><div- className="relative flex flex-col"+ className="relative w-full h-full flex flex-col"style={{- padding: `${offset}px`,+ padding: `${offset}px`,borderRadius: `${outerRadius}px`,border: `1px solid ${frameColor}`,}}>-<divclassName="relative w-full h-full overflow-hidden shadow-inner"style={{@@ -49,7 +45,6 @@ export function OutlineMockup({{children}</div></div>-</div></div>);diff --git a/app/components/ui/editor/mockups/S24UltraMockup.tsx b/app/components/ui/editor/mockups/S24UltraMockup.tsxindex f36118a..c81a438 100644--- a/app/components/ui/editor/mockups/S24UltraMockup.tsx+++ b/app/components/ui/editor/mockups/S24UltraMockup.tsx@@ -15,7 +15,7 @@ export function S24UltraMockup({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;@@ -23,15 +23,15 @@ export function S24UltraMockup({const framePadding = 10 * headerScale;const buttonWidth = 8 * 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;@@ -39,33 +39,33 @@ export function S24UltraMockup({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}`}>-- <div- className="relative flex items-center justify-center shadow-2xl"+ <div className={`relative w-full h-full flex flex-col items-center justify-center ${className}`}>++ <div+ className="relative w-full h-full flex items-center justify-center shadow-2xl"style={{padding: `${framePadding}px`,backgroundColor: frameColor,borderRadius: `${cornerRadius * 1.2}px`,border: `1px solid ${frameBorderColor}`,- boxShadow: shadows > 0- ? `0 ${shadows / 2}px ${shadows}px -12px rgba(0,0,0,1)`+ boxShadow: shadows > 0+ ? `0 ${shadows / 2}px ${shadows}px -12px rgba(0,0,0,1)`: 'none',}}>- <div+ <divclassName="absolute shadow-sm"- style={{+ style={{right: `-${buttonWidth}px`,top: '20%',width: `${buttonWidth}px`,@@ -79,10 +79,10 @@ export function S24UltraMockup({zIndex: 0}}/>-- <div++ <divclassName="absolute shadow-sm"- style={{+ style={{right: `-${buttonWidth}px`,top: '32%',width: `${buttonWidth}px`,@@ -97,17 +97,17 @@ export function S24UltraMockup({}}/>- <div+ <divclassName="relative w-full h-full overflow-hidden flex flex-col"style={{backgroundColor: screenBg,- borderRadius: `${Math.max(0, (cornerRadius * 1.2) - framePadding)}px`,+ borderRadius: `${Math.max(0, (cornerRadius * 1.2) - framePadding)}px`,border: `1px solid ${screenBorderColor}`}}>- <div+ <divclassName="absolute bg-black rounded-full z-20 flex items-center justify-center"- style={{+ style={{top: `${cameraTop}px`,left: '50%',transform: 'translateX(-50%)',@@ -115,24 +115,24 @@ export function S24UltraMockup({height: `${cameraSize}px`,}}>- <div+ <divclassName="rounded-full blur-[0.5px]"- style={{- width: `${cameraLensSize}px`,+ style={{+ width: `${cameraLensSize}px`,height: `${cameraLensSize}px`,- backgroundColor: 'rgba(99, 102, 241, 0.3)'+ backgroundColor: 'rgba(99, 102, 241, 0.3)'}}/></div>- <div+ <divclassName="absolute top-0 w-full flex items-center justify-between z-10"style={{height: `${statusBarHeight}px`,padding: `0 ${statusBarPaddingX}px`,}}>- <span+ <spanclassName="font-medium tracking-tight"style={{ fontSize: `${timeFontSize}px`, color: textAndIconColor }}>@@ -140,15 +140,15 @@ export function S24UltraMockup({</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"+ <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+ <divclassName="flex items-center justify-center font-bold"style={{width: `${14 * headerScale}px`,@@ -162,9 +162,9 @@ export function S24UltraMockup({5G</div>- <div+ <divclassName="relative flex items-center"- style={{+ 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)"}`,@@ -172,7 +172,7 @@ export function S24UltraMockup({padding: `${1 * headerScale}px`}}>- <div+ <divclassName="h-full w-full"style={{ backgroundColor: iconBoxBg, borderRadius: `${1 * headerScale}px` }}/>@@ -180,9 +180,9 @@ export function S24UltraMockup({</div></div>- <div+ <divclassName="relative w-full h-full flex flex-col"- style={{+ style={{paddingTop: `${statusBarHeight}px`,paddingBottom: `${navBarHeight}px`}}@@ -192,14 +192,14 @@ export function S24UltraMockup({</div></div>- <div+ <divclassName="absolute bottom-0 w-full flex items-center justify-center z-10"- style={{+ style={{height: `${navBarHeight}px`,gap: `${navGap}px`}}>- <div+ <divstyle={{width: `${navIconSize}px`,height: `${navIconSize}px`,@@ -207,7 +207,7 @@ export function S24UltraMockup({borderRadius: `${2 * headerScale}px`}}/>- <div+ <divstyle={{width: `${navIconSize}px`,height: `${navIconSize}px`,@@ -215,7 +215,7 @@ export function S24UltraMockup({borderRadius: '50%'}}/>- <div+ <divstyle={{width: `${navIconSize}px`,height: `${navIconSize}px`,diff --git a/app/components/ui/editor/mockups/VSCodeMockup.tsx b/app/components/ui/editor/mockups/VSCodeMockup.tsxindex e3df115..fd17a21 100644--- a/app/components/ui/editor/mockups/VSCodeMockup.tsx+++ b/app/components/ui/editor/mockups/VSCodeMockup.tsx@@ -49,7 +49,7 @@ export function VSCodeMockup({return (<div- className={`relative w-full flex flex-col overflow-hidden ${className}`}+ className={`relative w-full h-full flex flex-col overflow-hidden ${className}`}style={{borderRadius: `${cornerRadius}px`,boxShadow: shadows > 0@@ -80,8 +80,8 @@ export function VSCodeMockup({<spankey={item}className={`rounded hover:bg-white/5 cursor-default ${i === 2 ? "hidden sm:block" :- i === 4 ? "hidden md:block" :- i === 5 ? "hidden lg:block" : ""+ i === 4 ? "hidden md:block" :+ i === 5 ? "hidden lg:block" : ""}`}style={{ padding: `${menuPaddingY}px ${menuPaddingX}px` }}>diff --git a/components/ui/DetailHeaderMenu.tsx b/components/ui/DetailHeaderMenu.tsxindex 09fcdc3..88ebf67 100644--- a/components/ui/DetailHeaderMenu.tsx+++ b/components/ui/DetailHeaderMenu.tsx@@ -14,7 +14,7 @@ export function DetailPageHeader({<buttontype="button"onClick={onBack}- className="flex items-center justify-center size-7 rounded-md hover:bg-white/6 text-white/50 transition-colors"+ className="flex items-center justify-center size-7 rounded-md hover:bg-white/6 text-white transition-colors"aria-label="Volver al inicio"><Icon icon="ph:arrow-left-bold" width="13" />