Skip to content

Create professional demos and 3D mockups in seconds, directly in your browser

refactor: remove onDuplicateCanvasElement prop from ControlPanelProps

CristianOlivera1b70546c5e556
diff --git a/app/(auth)/login/page.tsx b/app/(auth)/login/page.tsx
index c2e1f29..82ea7d6 100644
--- a/app/(auth)/login/page.tsx
+++ b/app/(auth)/login/page.tsx
@@ -26,7 +26,7 @@ export default function Login() {
<div className="w-full max-w-sm mx-auto mt-16 lg:mt-0">
<div className="mb-10">
- <Image src="/svg/logo-freeshot.svg" alt="Logo" width={60} height={60} className="mb-4" />
+ <Image src="/svg/logo-openvid.svg" alt="Logo" width={60} height={60} className="mb-4" />
<h1 className="text-3xl sm:text-4xl font-light tracking-tighter text-white mb-3">
Bienvenido
</h1>
diff --git a/app/(editor)/editor/page.tsx b/app/(editor)/editor/page.tsx
index 9cd48a8..0596960 100644
--- a/app/(editor)/editor/page.tsx
+++ b/app/(editor)/editor/page.tsx
@@ -49,7 +49,7 @@ export default function Editor() {
// Custom background images
const [uploadedImages, setUploadedImages] = useState<string[]>(() => {
if (typeof window !== 'undefined') {
- const stored = localStorage.getItem("freeshot-uploaded-images");
+ const stored = localStorage.getItem("openvid-uploaded-images");
if (stored) {
try {
const parsed = JSON.parse(stored);
@@ -157,23 +157,39 @@ export default function Editor() {
const selectCanvasElement = useCallback((id: string | null) => {
setSelectedElementId(id);
+ // Auto-open elements menu when selecting an element
+ if (id) {
+ setActiveTool("elements");
+ }
}, []);
- const duplicateCanvasElement = useCallback((id: string) => {
- const element = canvasElements.find(el => el.id === id);
- if (!element) return;
+
+ // Copy/paste handlers
+ const [copiedElement, setCopiedElement] = useState<CanvasElement | null>(null);
+
+ const copySelectedElement = useCallback(() => {
+ if (!selectedElementId) return;
+ const element = canvasElements.find(el => el.id === selectedElementId);
+ if (element) {
+ setCopiedElement(element);
+ }
+ }, [selectedElementId, canvasElements]);
+
+ const pasteElement = useCallback(() => {
+ if (!copiedElement) return;
const newElement = {
- ...element,
- id: `${element.type}-${Date.now()}-${Math.random().toString(36).substring(2, 9)}`,
- x: element.x + 5, // Offset slightly
- y: element.y + 5,
+ ...copiedElement,
+ id: `${copiedElement.type}-${Date.now()}-${Math.random().toString(36).substring(2, 9)}`,
+ x: copiedElement.x + 5, // Offset slightly from original
+ y: copiedElement.y + 5,
zIndex: Date.now(),
} as CanvasElement;
setCanvasElements(prev => [...prev, newElement]);
setSelectedElementId(newElement.id);
- }, [canvasElements]);
+ setActiveTool("elements");
+ }, [copiedElement]);
const bringToFront = useCallback((id: string) => {
const maxZIndex = Math.max(...canvasElements.map(el => el.zIndex), 0);
@@ -277,7 +293,7 @@ export default function Editor() {
useEffect(() => {
if (uploadedImages.length > 0) {
- localStorage.setItem("freeshot-uploaded-images", JSON.stringify(uploadedImages));
+ localStorage.setItem("openvid-uploaded-images", JSON.stringify(uploadedImages));
}
}, [uploadedImages]);
@@ -552,6 +568,20 @@ export default function Editor() {
return;
}
+ // Copy element (Ctrl+C or Cmd+C)
+ if ((e.ctrlKey || e.metaKey) && e.key === 'c' && selectedElementId) {
+ e.preventDefault();
+ copySelectedElement();
+ return;
+ }
+
+ // Paste element (Ctrl+V or Cmd+V)
+ if ((e.ctrlKey || e.metaKey) && e.key === 'v') {
+ e.preventDefault();
+ pasteElement();
+ return;
+ }
+
// Delete selected canvas element with Delete or Backspace
if ((e.key === "Delete" || e.key === "Backspace") && selectedElementId) {
e.preventDefault();
@@ -580,7 +610,7 @@ export default function Editor() {
document.addEventListener("keydown", handleKeyDown);
return () => document.removeEventListener("keydown", handleKeyDown);
- }, [selectedElementId, selectedZoomFragmentId, deleteCanvasElement, handleDeleteZoomFragment]);
+ }, [selectedElementId, selectedZoomFragmentId, deleteCanvasElement, handleDeleteZoomFragment, copySelectedElement, pasteElement]);
useEffect(() => {
const checkMobile = () => {
@@ -684,7 +714,6 @@ export default function Editor() {
selectedCanvasElement={canvasElements.find(el => el.id === selectedElementId) || null}
onUpdateCanvasElement={updateCanvasElement}
onDeleteCanvasElement={deleteCanvasElement}
- onDuplicateCanvasElement={duplicateCanvasElement}
onBringToFront={bringToFront}
onSendToBack={sendToBack}
/>
diff --git a/app/(home)/layout.tsx b/app/(home)/layout.tsx
index aff5733..47af5e0 100644
--- a/app/(home)/layout.tsx
+++ b/app/(home)/layout.tsx
@@ -1,8 +1,8 @@
"use client";
import "../globals.css";
-import Header from "../components/common/header";
-import Footer from "../components/common/footer";
+import Header from "../components/common/Header";
+import Footer from "../components/common/Footer";
import { RecordingProvider } from "@/hooks/RecordingContext";
import RecordingOverlay from "../components/ui/RecordingOverlay";
diff --git a/app/components/common/header.tsx b/app/components/common/header.tsx
index 9067a1d..c8db976 100644
--- a/app/components/common/header.tsx
+++ b/app/components/common/header.tsx
@@ -30,7 +30,7 @@ export default function Header() {
>
<div className="max-w-6xl mx-auto px-3 sm:px-6 h-16 flex items-center justify-between">
<Link href="/" className="flex items-center gap-2 group">
- <Image src="/svg/logo-freeshot.svg" alt="Logo" width={50} height={50} />
+ <Image src="/svg/logo-openvid.svg" alt="Logo" width={50} height={50} />
<span className="hidden sm:flex text-white font-semibold text-lg transition-colors group-hover:text-neutral-200">
Free
<span className="relative inline-block px-1 ml-0.5">
diff --git a/app/components/ui/BackgroundColorEditor.tsx b/app/components/ui/BackgroundColorEditor.tsx
index af6c186..63a9e4f 100644
--- a/app/components/ui/BackgroundColorEditor.tsx
+++ b/app/components/ui/BackgroundColorEditor.tsx
@@ -130,20 +130,20 @@ function SortableStopList({ stops, onReorder, onColorChange, onPositionChange, o
// ── Ghost element ────────────────────────────────────────────────────
const ghost = rowEl.cloneNode(true) as HTMLDivElement;
Object.assign(ghost.style, {
- position: "fixed",
+ position: "fixed",
pointerEvents: "none",
- zIndex: "9999",
- width: `${rect.width}px`,
- height: `${rect.height}px`,
- left: `${rect.left}px`,
- top: `${rect.top}px`,
- opacity: "0.93",
- transform: "scale(1.02) rotate(0.5deg)",
- boxShadow: "0 16px 48px rgba(0,0,0,0.8), 0 2px 8px rgba(0,0,0,0.5)",
- borderRadius: "8px",
- background: "#1c1c1f",
- border: "1px solid rgba(255,255,255,0.13)",
- willChange: "left,top",
+ zIndex: "9999",
+ width: `${rect.width}px`,
+ height: `${rect.height}px`,
+ left: `${rect.left}px`,
+ top: `${rect.top}px`,
+ opacity: "0.93",
+ transform: "scale(1.02) rotate(0.5deg)",
+ boxShadow: "0 16px 48px rgba(0,0,0,0.8), 0 2px 8px rgba(0,0,0,0.5)",
+ borderRadius: "8px",
+ background: "#1c1c1f",
+ border: "1px solid rgba(255,255,255,0.13)",
+ willChange: "left,top",
});
document.body.appendChild(ghost);
ghostRef.current = ghost;
@@ -151,17 +151,17 @@ function SortableStopList({ stops, onReorder, onColorChange, onPositionChange, o
// ── Indicator line ───────────────────────────────────────────────────
const indicator = document.createElement("div");
Object.assign(indicator.style, {
- position: "absolute",
- left: "0",
- right: "0",
- height: "2px",
+ position: "absolute",
+ left: "0",
+ right: "0",
+ height: "2px",
background: "linear-gradient(90deg,transparent 0%,#6366f1 20%,#818cf8 80%,transparent 100%)",
borderRadius: "2px",
- opacity: "0",
+ opacity: "0",
transition: "top 80ms cubic-bezier(0.25,0.46,0.45,0.94), opacity 60ms ease",
- zIndex: "10",
+ zIndex: "10",
pointerEvents: "none",
- marginTop: "-1px",
+ marginTop: "-1px",
});
if (listRef.current) {
listRef.current.style.position = "relative";
@@ -180,7 +180,7 @@ function SortableStopList({ stops, onReorder, onColorChange, onPositionChange, o
// ── Pointer move ─────────────────────────────────────────────────────
const onMove = (mv: PointerEvent) => {
ghost.style.left = `${mv.clientX - offsetRef.current.x}px`;
- ghost.style.top = `${mv.clientY - offsetRef.current.y}px`;
+ ghost.style.top = `${mv.clientY - offsetRef.current.y}px`;
// Hit-test against ORIGINAL (pre-transform) midpoints — no jitter
const origs = originalRectsRef.current;
@@ -207,7 +207,7 @@ function SortableStopList({ stops, onReorder, onColorChange, onPositionChange, o
indicatorRef.current = null;
const from = dragIdxRef.current;
- const to = overIdxRef.current;
+ const to = overIdxRef.current;
// Snap items to final positions instantly before React re-renders
// so there's no visual jump when state updates
@@ -215,8 +215,8 @@ function SortableStopList({ stops, onReorder, onColorChange, onPositionChange, o
const items2 = getItemEls();
items2.forEach(el => {
el.style.transition = "none";
- el.style.transform = "";
- el.style.opacity = "";
+ el.style.transform = "";
+ el.style.opacity = "";
});
} else {
resetVisuals();
@@ -239,7 +239,7 @@ function SortableStopList({ stops, onReorder, onColorChange, onPositionChange, o
document.addEventListener("pointermove", onMove);
document.addEventListener("pointerup", onUp);
- // eslint-disable-next-line react-hooks/exhaustive-deps
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
return (
@@ -433,8 +433,15 @@ export function BackgroundColorEditor({ value, onChange }: BackgroundColorEditor
))}
<Popover>
<PopoverTrigger asChild>
- <button className="aspect-square squircle-element border border-dashed border-white/30 bg-white/5 flex items-center justify-center hover:bg-white/10 transition group" title="Ver más">
- <Icon icon="lucide:plus" className="text-white/60 group-hover:text-white" width="14" />
+ <button
+ className="aspect-square squircle-element border border-dashed border-white/30 bg-white/5 flex items-center justify-center hover:bg-white/10 transition group"
+ title="Ver más colores"
+ >
+ <Icon
+ icon="ph:plus-bold"
+ width="16"
+ className="text-blue-400 group-hover:text-blue-300 transition-colors"
+ />
</button>
</PopoverTrigger>
<PopoverContent side="right" align="start" sideOffset={12} className="w-72 p-0 border-0 shadow-2xl">
@@ -498,8 +505,15 @@ export function BackgroundColorEditor({ value, onChange }: BackgroundColorEditor
})}
<Popover>
<PopoverTrigger asChild>
- <button className="aspect-square squircle-element border border-dashed border-white/30 bg-white/5 flex items-center justify-center hover:bg-white/10 transition group" title="Ver más">
- <Icon icon="lucide:plus" className="text-white/60 group-hover:text-white" width="14" />
+ <button
+ className="aspect-square squircle-element border border-dashed border-white/30 bg-white/5 flex items-center justify-center hover:bg-white/10 transition group"
+ title="Ver más gradientes"
+ >
+ <Icon
+ icon="ph:plus-bold"
+ width="16"
+ className="text-blue-400 group-hover:text-blue-300 transition-colors"
+ />
</button>
</PopoverTrigger>
<PopoverContent side="right" align="start" sideOffset={12} className="w-72 p-0 border-0 shadow-2xl">
diff --git a/app/components/ui/EditorPreview.tsx b/app/components/ui/EditorPreview.tsx
index 8d452e3..ae7e0b9 100644
--- a/app/components/ui/EditorPreview.tsx
+++ b/app/components/ui/EditorPreview.tsx
@@ -108,7 +108,7 @@ export default function EditorPreview() {
<div className="w-2.5 h-2.5 rounded-full bg-[#28C840]"></div>
</div>
<div className="flex-1 text-center">
- <div className="inline-block px-3 py-0.5 rounded bg-black/20 text-[10px] text-neutral-500 font-mono">freeshot.app</div>
+ <div className="inline-block px-3 py-0.5 rounded bg-black/20 text-[10px] text-neutral-500 font-mono">openvid.app</div>
</div>
</div>
<div className="p-6 relative h-full">
diff --git a/app/components/ui/RecordingSteps.tsx b/app/components/ui/RecordingSteps.tsx
index c58d831..4d30350 100644
--- a/app/components/ui/RecordingSteps.tsx
+++ b/app/components/ui/RecordingSteps.tsx
@@ -98,7 +98,7 @@ export default function InteractiveRecordingSteps() {
<div className="bg-[#1E1E20] border border-white/10 rounded-full px-5 py-3 flex items-center gap-6 shadow-2xl z-10">
<div className="flex items-center gap-3">
<Icon icon="logos:chrome" className="text-xl" />
- <span className="text-sm text-neutral-200">app.freeshot.com está compartiendo tu pantalla.</span>
+ <span className="text-sm text-neutral-200">app.openvid.com está compartiendo tu pantalla.</span>
</div>
<div className="flex gap-4 border-l border-white/10 pl-4">
<span className="text-sm text-blue-400 font-medium cursor-pointer hover:text-blue-300">Dejar de compartir</span>
diff --git a/app/components/ui/WalpaperSections.tsx b/app/components/ui/WalpaperSections.tsx
index abebfd2..02769d1 100644
--- a/app/components/ui/WalpaperSections.tsx
+++ b/app/components/ui/WalpaperSections.tsx
@@ -19,11 +19,10 @@ export function OptionsGrid({ selectedIndex = -1, onSelect }: WallpaperGridProps
<button
onClick={() => onSelect?.(-1)}
title="Sin fondo"
- className={`aspect-square squircle-element cursor-pointer transition-all flex items-center justify-center relative overflow-hidden ${
- selectedIndex === -1
+ className={`aspect-square squircle-element cursor-pointer transition-all flex items-center justify-center relative overflow-hidden ${selectedIndex === -1
? "ring-2 ring-white/90 shadow-lg shadow-black/40"
: "hover:ring-2 ring-white/60"
- }`}
+ }`}
style={{
backgroundImage:
"linear-gradient(45deg,#444 25%,transparent 25%),linear-gradient(-45deg,#444 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#444 75%),linear-gradient(-45deg,transparent 75%,#444 75%)",
@@ -58,11 +57,10 @@ function WallpaperThumb({
return (
<button
onClick={() => onSelect?.(item.index)}
- className={`aspect-square squircle-element cursor-pointer transition-all bg-cover bg-center border border-white/10 ${
- isSelected
+ className={`aspect-square squircle-element cursor-pointer transition-all bg-cover bg-center border border-white/10 ${isSelected
? "ring-2 ring-white/90 border-white/40 shadow-md shadow-black/50"
: "border-white/10 hover:border-white/30 hover:ring-1 ring-white/20"
- }`}
+ }`}
style={{ backgroundImage: `url('${item.previewUrl}')` }}
/>
);
@@ -86,7 +84,11 @@ function CategoryPopover({
className="aspect-square rounded-lg border border-white/10 bg-white/5 flex items-center justify-center hover:bg-white/10 transition group"
title={`Ver más de ${category.label}`}
>
- <Icon icon="lucide:plus" className="text-white/60 group-hover:text-white" width="14" />
+ <Icon
+ icon="ph:plus-bold"
+ width="16"
+ className="text-blue-400 group-hover:text-blue-300 transition-colors"
+ />
</button>
</PopoverTrigger>
@@ -113,11 +115,10 @@ function CategoryPopover({
key={item.index}
onClick={() => { onSelect?.(item.index); setOpen(false); }}
title={item.filename}
- className={`aspect-square rounded-lg cursor-pointer transition-all bg-cover bg-center border ${
- selectedIndex === item.index
+ className={`aspect-square rounded-lg cursor-pointer transition-all bg-cover bg-center border ${selectedIndex === item.index
? "ring-2 ring-white/90 border-white/40 shadow-md shadow-black/50"
: "border-white/10 hover:border-white/30 hover:ring-1 ring-white/20"
- }`}
+ }`}
style={{ backgroundImage: `url('${item.previewUrl}')` }}
/>
))}
diff --git a/app/components/ui/aspectRatioSelect.tsx b/app/components/ui/aspectRatioSelect.tsx
index 115e2a9..ef990ab 100644
--- a/app/components/ui/aspectRatioSelect.tsx
+++ b/app/components/ui/aspectRatioSelect.tsx
@@ -1,31 +1,151 @@
-// components/video-editor/AspectRatioSelect.tsx
-import {
- Select,
- SelectContent,
- SelectGroup,
- SelectItem,
- SelectTrigger,
- SelectValue
-} from "@/components/ui/select";
+import { useState } from "react";
+import {
+ Popover,
+ PopoverContent,
+ PopoverTrigger,
+} from "@/components/ui/popover";
import { Icon } from "@iconify/react";
+import type { AspectRatio } from "@/types";
+
+interface AspectRatioSelectProps {
+ value: AspectRatio;
+ onChange: (value: AspectRatio) => void;
+ customDimensions?: { width: number; height: number } | null;
+ onCustomDimensionsChange?: (dimensions: { width: number; height: number }) => void;
+}
+
+// Separé "custom" de la lista principal para manejarlo en su propia sección
+const STANDARD_RATIOS: Partial<Record<AspectRatio, string>> = {
+ "auto": "Auto",
+ "16:9": "16:9 YouTube",
+ "9:16": "9:16 TikTok",
+ "1:1": "1:1 Instagram",
+ "4:3": "4:3",
+ "3:4": "3:4",
+};
+
+export function AspectRatioSelect({ value, onChange, customDimensions, onCustomDimensionsChange }: AspectRatioSelectProps) {
+ const [isOpen, setIsOpen] = useState(false);
+
+ const [tempWidth, setTempWidth] = useState("");
+ const [tempHeight, setTempHeight] = useState("");
+
+ const handleOpenChange = (open: boolean) => {
+ if (open) {
+ setTempWidth(customDimensions?.width?.toString() || "1920");
+ setTempHeight(customDimensions?.height?.toString() || "1080");
+ }
+ setIsOpen(open);
+ };
+
+ const handleStandardRatioClick = (ratio: AspectRatio) => {
+ onChange(ratio);
+ setIsOpen(false);
+ };
+
+ const handleCustomApply = () => {
+ const width = parseInt(tempWidth);
+ const height = parseInt(tempHeight);
+
+ if (width > 0 && height > 0 && onCustomDimensionsChange) {
+ onCustomDimensionsChange({ width, height });
+ onChange("custom");
+ setIsOpen(false);
+ }
+ };
+
+ const displayLabel = (() => {
+ if (value === "custom" && customDimensions) {
+ return `${customDimensions.width}x${customDimensions.height}`;
+ }
+ if (value === "auto") {
+ return "Auto";
+ }
+ return STANDARD_RATIOS[value as keyof typeof STANDARD_RATIOS] || "Personalizado";
+ })();
-export function AspectRatioSelect() {
return (
- <Select defaultValue="auto">
- <SelectTrigger className="h-8 w-36 border-input bg-background px-3 text-sm font-medium border transition-none">
- <div className="flex items-center gap-2 overflow-hidden">
+ <Popover open={isOpen} onOpenChange={handleOpenChange}>
+ <PopoverTrigger asChild>
+ <button
+ className="flex items-center gap-2 h-8 px-3 text-xs font-medium border border-input bg-background rounded-md hover:bg-accent hover:text-accent-foreground transition-colors w-full sm:w-auto"
+ title="Seleccionar proporción de aspecto"
+ >
<Icon icon="mynaui:layout" width="16" className="shrink-0" />
- <span className="truncate"><SelectValue placeholder="Dimensión" /></span>
+ <span className="truncate">{displayLabel}</span>
+ <Icon icon="lucide:chevron-down" width="14" className="ml-auto opacity-50 shrink-0" />
+ </button>
+ </PopoverTrigger>
+
+ <PopoverContent className="w-64 p-2" align="start">
+ <div className="flex flex-col gap-1">
+
+ <div className="flex flex-col">
+ {(Object.keys(STANDARD_RATIOS) as AspectRatio[]).map((ratio) => (
+ <button
+ key={ratio}
+ onClick={() => handleStandardRatioClick(ratio)}
+ className={`flex items-center w-full px-2 py-1.5 text-sm rounded-sm transition-colors
+ ${value === ratio
+ ? "bg-accent text-accent-foreground font-medium"
+ : "hover:bg-accent hover:text-accent-foreground text-muted-foreground"
+ }
+ `}
+ >
+ <span className="flex-1 text-left">{STANDARD_RATIOS[ratio]}</span>
+ {value === ratio && (
+ <Icon icon="lucide:check" width="16" className="shrink-0" />
+ )}
+ </button>
+ ))}
+ </div>
+
+ <div className="h-px bg-border my-2 mx-1" />
+
+ <div className="px-2 pb-1">
+ <div className="flex items-center justify-between mb-2">
+ <span className="text-xs font-medium text-foreground">Personalizado</span>
+ {value === "custom" && (
+ <Icon icon="lucide:check" width="14" className="text-accent-foreground" />
+ )}
+ </div>
+
+ <div className="flex items-center gap-2 mb-3">
+ <div className="flex-1">
+ <input
+ type="number"
+ min="1"
+ max="7680"
+ value={tempWidth}
+ onChange={(e) => setTempWidth(e.target.value)}
+ placeholder="Ancho"
+ className="w-full h-8 px-2 text-xs border border-input bg-background rounded-md focus:outline-none focus:ring-1 focus:ring-ring"
+ />
+ </div>
+ <span className="text-muted-foreground text-xs">x</span>
+ <div className="flex-1">
+ <input
+ type="number"
+ min="1"
+ max="4320"
+ value={tempHeight}
+ onChange={(e) => setTempHeight(e.target.value)}
+ placeholder="Alto"
+ className="w-full h-8 px-2 text-xs border border-input bg-background rounded-md focus:outline-none focus:ring-1 focus:ring-ring"
+ />
+ </div>
+ </div>
+
+ <button
+ onClick={handleCustomApply}
+ className="w-full h-8 text-xs font-medium bg-primary text-primary-foreground hover:bg-primary/90 rounded-md transition-colors"
+ >
+ Aplicar medidas
+ </button>
+ </div>
+
</div>
- </SelectTrigger>
- <SelectContent>
- <SelectGroup>
- <SelectItem value="auto">Auto</SelectItem>
- <SelectItem value="16:9">16:9 YouTube</SelectItem>
- <SelectItem value="9:16">9:16 TikTok</SelectItem>
- <SelectItem value="1:1">1:1 Instagram</SelectItem>
- </SelectGroup>
- </SelectContent>
- </Select>
+ </PopoverContent>
+ </Popover>
);
-}
+}
\ No newline at end of file
diff --git a/app/components/ui/editor-preview.tsx b/app/components/ui/editor-preview.tsx
deleted file mode 100644
index a83e6ff..0000000
--- a/app/components/ui/editor-preview.tsx
+++ /dev/null
@@ -1,174 +0,0 @@
-import {Icon} from "@iconify/react";
-
-export default function EditorPreview() {
- return (
- <div className="relative max-w-6xl mx-auto">
- <div className="absolute -inset-1 bg-gradient-to-b from-neutral-700/20 to-transparent rounded-2xl blur-sm -z-10"></div>
- <div className="bg-[#0A0A0A] border border-white/10 rounded-xl overflow-hidden shadow-2xl shadow-black/50 flex flex-col md:flex-row h-[600px] text-left">
-
- <div className="w-full md:w-64 bg-[#0F0F0F] border-r border-white/5 flex flex-col shrink-0">
- <div className="p-4 border-b border-white/5 flex items-center justify-between">
- <span className="text-xs font-medium text-neutral-400 uppercase tracking-wider">Properties</span>
- <Icon icon="solar:settings-linear" className="text-neutral-500" />
- </div>
-
- <div className="p-5 space-y-6 overflow-y-auto editor-scroll">
- <div className="space-y-3">
- <label className="text-sm text-neutral-300 font-medium flex items-center gap-2">
- <Icon icon="solar:gallery-wide-linear" width="16" />
- Background
- </label>
- <div className="grid grid-cols-4 gap-2">
- <div className="aspect-square rounded border border-white/20 bg-gradient-to-br from-purple-900 to-indigo-900 cursor-pointer ring-2 ring-white/20"></div>
- <div className="aspect-square rounded border border-white/5 bg-gradient-to-br from-neutral-800 to-neutral-900 cursor-pointer hover:border-white/20"></div>
- <div className="aspect-square rounded border border-white/5 bg-[#1a1a1a] cursor-pointer hover:border-white/20"></div>
- <div className="aspect-square rounded border border-white/5 relative overflow-hidden cursor-pointer hover:border-white/20 group">
- <div className="absolute inset-0 flex items-center justify-center bg-neutral-800 text-white/50 group-hover:text-white transition-colors">
- <Icon icon="solar:add-circle-linear" width="20" />
- </div>
- </div>
- </div>
- </div>
-
- <div className="space-y-3">
- <div className="flex justify-between">
- <label className="text-sm text-neutral-300 font-medium">Padding</label>
- <span className="text-xs text-neutral-500">64px</span>
- </div>
- <input type="range" min="0" max="100" defaultValue="64" className="w-full" />
- </div>
-
- <div className="space-y-3">
- <div className="flex justify-between">
- <label className="text-sm text-neutral-300 font-medium">Roundness</label>
- <span className="text-xs text-neutral-500">12px</span>
- </div>
- <input type="range" min="0" max="24" defaultValue="12" className="w-full" />
- </div>
-
- <div className="h-px bg-white/5 my-2"></div>
-
- <div className="space-y-4">
- <label className="flex items-center justify-between cursor-pointer group">
- <span className="text-sm text-neutral-300 group-hover:text-white transition-colors flex items-center gap-2">
- <Icon icon="solar:cursor-square-linear" className="text-neutral-500" />
- Show Cursor
- </span>
- <div className="relative inline-flex items-center cursor-pointer">
- <input type="checkbox" defaultValue="" className="sr-only peer" />
- <div className="w-9 h-5 bg-neutral-800 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-4 after:w-4 after:transition-all peer-checked:bg-neutral-200"></div>
- </div>
- </label>
- <label className="flex items-center justify-between cursor-pointer group">
- <span className="text-sm text-neutral-300 group-hover:text-white transition-colors flex items-center gap-2">
- <Icon icon="solar:box-minimalistic-linear" className="text-neutral-500" />
- Shadow
- </span>
- <div className="relative inline-flex items-center cursor-pointer">
- <input type="checkbox" defaultValue="" className="sr-only peer" />
- <div className="w-9 h-5 bg-neutral-800 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-4 after:w-4 after:transition-all peer-checked:bg-neutral-200"></div>
- </div>
- </label>
- </div>
- </div>
-
- <div className="mt-auto p-4 border-t border-white/5">
- <button className="w-full py-2 bg-neutral-100 hover:bg-white text-black text-sm font-medium rounded transition-colors flex items-center justify-center gap-2">
- Export Video
- <Icon icon="solar:export-linear" width="16" />
- </button>
- </div>
- </div>
-
- <div className="flex-1 bg-[#141414] relative flex flex-col">
- <div className="h-12 border-b border-white/5 flex items-center justify-center gap-1 px-4">
- <button className="p-2 hover:bg-white/5 rounded text-neutral-400 hover:text-white transition-colors">
- <Icon icon="solar:scissors-linear" width="18" />
- </button>
- <button className="p-2 hover:bg-white/5 rounded text-neutral-400 hover:text-white transition-colors">
- <Icon icon="solar:magnifier-zoom-in-linear" width="18" />
- </button>
- <div className="w-px h-4 bg-white/10 mx-2"></div>
- <span className="text-xs font-mono text-neutral-500">00:04 / 00:15</span>
- </div>
-
- <div className="flex-1 flex items-center justify-center p-8 overflow-hidden relative">
- <div className="absolute inset-0 bg-gradient-to-br from-purple-900/40 to-indigo-900/40 backdrop-blur-3xl"></div>
- <div className="w-full h-full absolute inset-0 opacity-20" style={{
- backgroundImage: "radial-gradient(#ffffff 1px, transparent 1px)",
- backgroundSize: "20px 20px",
- }}
- ></div>
-
- <div className="relative w-[80%] aspect-video bg-[#1a1a1a] rounded-lg shadow-2xl border border-white/10 overflow-hidden transform transition-transform duration-700 hover:scale-[1.02]">
- <div className="h-8 bg-[#252525] flex items-center px-3 border-b border-white/5">
- <div className="flex gap-1.5">
- <div className="w-2.5 h-2.5 rounded-full bg-[#FF5F57]"></div>
- <div className="w-2.5 h-2.5 rounded-full bg-[#FEBC2E]"></div>
- <div className="w-2.5 h-2.5 rounded-full bg-[#28C840]"></div>
- </div>
- <div className="flex-1 text-center">
- <div className="inline-block px-3 py-0.5 rounded bg-black/20 text-[10px] text-neutral-500 font-mono">freeshot.app</div>
- </div>
- </div>
- <div className="p-6 relative h-full">
- <div className="flex gap-4">
- <div className="w-16 h-16 rounded-full bg-neutral-800 animate-pulse"></div>
- <div className="flex-1 space-y-3 py-2">
- <div className="h-2 bg-neutral-800 rounded w-1/4"></div>
- <div className="h-2 bg-neutral-800 rounded w-3/4"></div>
- <div className="h-2 bg-neutral-800 rounded w-1/2"></div>
- </div>
- </div>
- <div className="absolute top-1/2 left-1/3 w-32 h-32 border-2 border-indigo-500 rounded-lg shadow-[0_0_30px_rgba(99,102,241,0.3)] pointer-events-none flex items-start justify-start">
- <div className="bg-indigo-500 text-white text-[9px] px-1.5 py-0.5 rounded-tl-sm font-bold">ZOOM 2x</div>
- </div>
- <div className="absolute top-[60%] left-[40%] text-white drop-shadow-md">
- <Icon icon="solar:cursor-bold" width="24" />
- </div>
- </div>
- </div>
- </div>
-
- <div className="h-32 bg-[#0F0F0F] border-t border-white/5 flex flex-col">
- <div className="h-6 border-b border-white/5 flex items-end px-2">
- <div className="flex w-full justify-between text-[10px] text-neutral-600 font-mono pb-1">
- <span>00:00</span>
- <span>00:05</span>
- <span>00:10</span>
- <span>00:15</span>
- </div>
- </div>
- <div className="flex-1 p-3 relative overflow-hidden">
- <div className="space-y-2">
- <div className="h-8 bg-neutral-800/50 rounded flex items-center overflow-hidden border border-white/5 relative">
- <div className="absolute left-0 w-[40%] h-full bg-indigo-500/20 border-r border-indigo-500/50"></div>
- <div className="flex gap-1 w-full px-1 opacity-20">
- <div className="h-full w-8 bg-neutral-600 rounded-sm"></div>
- <div className="h-full w-8 bg-neutral-600 rounded-sm"></div>
- <div className="h-full w-8 bg-neutral-600 rounded-sm"></div>
- <div className="h-full w-8 bg-neutral-600 rounded-sm"></div>
- </div>
- </div>
- <div className="h-6 bg-neutral-800/30 rounded flex items-center px-2 overflow-hidden border border-white/5">
- <div className="flex items-center gap-0.5 w-full">
- <div className="w-1 h-2 bg-neutral-600 rounded-full"></div>
- <div className="w-1 h-3 bg-neutral-600 rounded-full"></div>
- <div className="w-1 h-4 bg-neutral-600 rounded-full"></div>
- <div className="w-1 h-2 bg-neutral-600 rounded-full"></div>
- <div className="w-1 h-3 bg-neutral-600 rounded-full"></div>
- </div>
- </div>
- </div>
- <div className="absolute top-0 left-[40%] h-full w-px bg-red-500 z-10">
- <div className="absolute -top-1 -left-[5px] text-red-500">
- <Icon icon="solar:polygon-down-bold" width="12" />
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- );
-}
\ No newline at end of file
diff --git a/app/components/ui/editor/ControlPanel.tsx b/app/components/ui/editor/ControlPanel.tsx
index 79406d3..d049b63 100644
--- a/app/components/ui/editor/ControlPanel.tsx
+++ b/app/components/ui/editor/ControlPanel.tsx
@@ -68,7 +68,6 @@ export function ControlPanel({
selectedCanvasElement,
onUpdateCanvasElement,
onDeleteCanvasElement,
- onDuplicateCanvasElement,
onBringToFront,
onSendToBack,
}: ExtendedControlPanelProps) {
@@ -76,7 +75,7 @@ export function ControlPanel({
<div className="relative w-[320px] h-screen bg-[#141417] border-r border-white/10 flex flex-col shrink-0">
<header className="flex items-center justify-between h-13 p-2 border-b border-white/10 shrink-0">
<Link href="/" className="flex items-center gap-2 group">
- <Image src="/svg/logo-freeshot.svg" alt="Logo" width={30} height={30} />
+ <Image src="/svg/logo-openvid.svg" alt="Logo" width={30} height={30} />
<span className="hidden sm:flex text-white font-semibold text-sm transition-colors group-hover:text-neutral-200">
Free
<span className="relative inline-block px-1 ml-0.5">
@@ -219,7 +218,6 @@ export function ControlPanel({
selectedElement={selectedCanvasElement}
onUpdateElement={onUpdateCanvasElement}
onDeleteElement={onDeleteCanvasElement}
- onDuplicateElement={onDuplicateCanvasElement}
onBringToFront={onBringToFront}
onSendToBack={onSendToBack}
/>
diff --git a/app/components/ui/editor/ElementsMenu.tsx b/app/components/ui/editor/ElementsMenu.tsx
index 81e7632..f200231 100644
--- a/app/components/ui/editor/ElementsMenu.tsx
+++ b/app/components/ui/editor/ElementsMenu.tsx
@@ -7,13 +7,13 @@ import { SVG_CATEGORIES, IMAGE_CATEGORIES, PINNED_SVG_ITEMS, PINNED_IMAGE_ITEMS
import type { SvgElement, TextElement, ImageElement, CanvasElement } from "@/types/canvas-elements.types";
import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover";
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";
+import { Button } from "@/components/ui/button";
interface ElementsMenuProps {
onAddElement: (element: CanvasElement) => void;
selectedElement?: CanvasElement | null;
onUpdateElement?: (id: string, updates: Partial<CanvasElement>) => void;
onDeleteElement?: (id: string) => void;
- onDuplicateElement?: (id: string) => void;
onBringToFront?: (id: string) => void;
onSendToBack?: (id: string) => void;
}
@@ -44,7 +44,6 @@ export function ElementsMenu({
selectedElement,
onUpdateElement,
onDeleteElement,
- onDuplicateElement,
onBringToFront,
onSendToBack
}: ElementsMenuProps) {
@@ -245,7 +244,7 @@ export function ElementsMenu({
<div className="text-[10px] uppercase tracking-widest text-white/40 font-semibold">
Figuras
</div>
- <div className="grid grid-cols-6 gap-1.5">
+ <div className="grid grid-cols-6 gap-2">
{/* 11 elementos destacados */}
{PINNED_SVG_ITEMS.map((item) => (
<button
@@ -266,12 +265,12 @@ export function ElementsMenu({
<Popover>
<PopoverTrigger asChild>
<button
- className="aspect-square bg-blue-500/10 hover:bg-blue-500/20 border border-blue-500/40 hover:border-blue-500/60 squircle-element flex items-center justify-center transition-all active:scale-90 group"
+ className="aspect-square squircle-element border border-dashed border-white/30 bg-white/5 flex items-center justify-center hover:bg-white/10 transition group"
title="Ver todas las figuras"
>
<Icon
icon="ph:plus-bold"
- width="20"
+ width="16"
className="text-blue-400 group-hover:text-blue-300 transition-colors"
/>
</button>
@@ -281,9 +280,9 @@ export function ElementsMenu({
side="right"
align="start"
sideOffset={12}
- className="w-[400px] p-0 border-0 shadow-2xl"
+ className="w-100 p-0 border-0 shadow-2xl"
>
- <div className="flex flex-col bg-[#111113] border border-white/10 rounded-xl overflow-hidden shadow-2xl max-h-[500px]">
+ <div className="flex flex-col bg-[#111113] border border-white/10 rounded-xl overflow-hidden shadow-2xl max-h-125">
{/* Header con categorías */}
<div className="flex items-center gap-2 px-4 py-3 border-b border-white/10 bg-white/2 flex-wrap">
<button
@@ -367,24 +366,23 @@ export function ElementsMenu({
<Popover>
<PopoverTrigger asChild>
<button
- className="aspect-square bg-blue-500/10 hover:bg-blue-500/20 border border-blue-500/40 hover:border-blue-500/60 squircle-element flex items-center justify-center transition-all active:scale-90 group"
+ className="aspect-square squircle-element border border-dashed border-white/30 bg-white/5 flex items-center justify-center hover:bg-white/10 transition group"
title="Ver todas las imágenes"
>
<Icon
icon="ph:plus-bold"
- width="20"
+ width="16"
className="text-blue-400 group-hover:text-blue-300 transition-colors"
/>
</button>
</PopoverTrigger>
-
<PopoverContent
side="right"
align="start"
sideOffset={12}
- className="w-[400px] p-0 border-0 shadow-2xl"
+ className="w-100 p-0 border-0 shadow-2xl"
>
- <div className="flex flex-col bg-[#111113] border border-white/10 rounded-xl overflow-hidden shadow-2xl max-h-[500px]">
+ <div className="flex flex-col bg-[#111113] border border-white/10 rounded-xl overflow-hidden shadow-2xl max-h-125">
{/* Header con categorías */}
<div className="flex items-center gap-2 px-4 py-3 border-b border-white/10 bg-white/2 flex-wrap">
<button
@@ -451,12 +449,12 @@ export function ElementsMenu({
<div className="space-y-2">
<div className="text-[10px] uppercase tracking-widest text-white/40 font-semibold">Color</div>
<div className="flex gap-2">
- <div className="grid grid-cols-5 gap-1.5 flex-1">
+ <div className="grid grid-cols-5 gap-2 flex-1">
{PRESET_COLORS.map((color) => (
<button
key={color}
onClick={() => setShapeColor(color)}
- className={`aspect-square rounded border-2 transition-all ${shapeColor === color ? "border-white scale-110" : "border-white/20 hover:border-white/40"
+ className={`aspect-square squircle-element cursor-pointer transition-all border border-white/20 ${shapeColor === color ? "ring-2 ring-white/90 border-white/40 shadow-md shadow-black/50" : "border-white/10 hover:border-white/30 hover:ring-1 ring-white/20"
}`}
style={{ backgroundColor: color }}
title={color}
@@ -471,7 +469,7 @@ export function ElementsMenu({
className="absolute inset-0 opacity-0 cursor-pointer"
/>
<div
- className="w-10 h-10 rounded border-2 border-white/20 hover:border-white/40 transition flex items-center justify-center"
+ className="w-10 h-10 aspect-square squircle-element border border-dashed border-white/30 bg-white/5 flex items-center justify-center hover:bg-white/10 transition group"
style={{ backgroundColor: shapeColor }}
>
<Icon icon="mdi:eyedropper" width="18" className="text-white mix-blend-difference" />
@@ -522,22 +520,13 @@ export function ElementsMenu({
{/* Acciones del elemento */}
<div className="space-y-2">
<div className="text-[10px] uppercase tracking-widest text-white/40 font-semibold">Acciones</div>
- <div className="grid grid-cols-2 gap-2">
- <button
- onClick={() => onDuplicateElement?.(selectedElement.id)}
- className="flex items-center justify-center gap-2 px-3 py-2 bg-white/5 hover:bg-white/10 border border-white/10 rounded-lg text-xs text-white/70 hover:text-white transition-all"
- >
- <Icon icon="ph:copy-bold" width="16" />
- Duplicar
- </button>
- <button
- onClick={() => onDeleteElement?.(selectedElement.id)}
- className="flex items-center justify-center gap-2 px-3 py-2 bg-red-500/10 hover:bg-red-500/20 border border-red-500/30 rounded-lg text-xs text-red-400 hover:text-red-300 transition-all"
- >
- <Icon icon="ph:trash-bold" width="16" />
- Eliminar
- </button>
- </div>
+ <button
+ onClick={() => onDeleteElement?.(selectedElement.id)}
+ className="flex items-center justify-center gap-2 px-3 py-2 bg-red-500/10 hover:bg-red-500/20 border border-red-500/30 rounded-lg text-xs text-red-400 hover:text-red-300 transition-all"
+ >
+ <Icon icon="ph:trash-bold" width="16" />
+ Eliminar
+ </button>
</div>
</>
)}
@@ -616,7 +605,7 @@ export function ElementsMenu({
<div className="space-y-2">
<div className="text-[10px] uppercase tracking-widest text-white/40 font-semibold">Fuente</div>
<Select value={textFontFamily} onValueChange={setTextFontFamily}>
- <SelectTrigger
+ <SelectTrigger
className="w-full bg-white/4 hover:bg-white/[0.07] transition border-white/8 squircle-element text-white/80"
style={{ fontFamily: textFontFamily }}
>
@@ -624,8 +613,8 @@ export function ElementsMenu({
</SelectTrigger>
<SelectContent className="bg-[#1a1a1e] border-white/10">
{FONT_FAMILIES.map((f) => (
- <SelectItem
- key={f}
+ <SelectItem
+ key={f}
value={f}
className="text-white/80 hover:bg-white/10 cursor-pointer"
style={{ fontFamily: f }}
@@ -642,12 +631,12 @@ export function ElementsMenu({
<div className="space-y-2">
<div className="text-[10px] uppercase tracking-widest text-white/40 font-semibold">Color</div>
<div className="flex gap-2">
- <div className="grid grid-cols-5 gap-1.5 flex-1">
+ <div className="grid grid-cols-5 gap-2 flex-1">
{PRESET_COLORS.map((color) => (
<button
key={color}
onClick={() => setTextColor(color)}
- className={`aspect-square rounded border-2 transition-all ${textColor === color ? "border-white scale-110" : "border-white/20 hover:border-white/40"
+ className={`aspect-square squircle-element cursor-pointer transition-all border border-white/20 ${textColor === color ? "ring-2 ring-white/90 border-white/40 shadow-md shadow-black/50" : "border-white/10 hover:border-white/30 hover:ring-1 ring-white/20"
}`}
style={{ backgroundColor: color }}
title={color}
@@ -662,7 +651,7 @@ export function ElementsMenu({
className="absolute inset-0 opacity-0 cursor-pointer"
/>
<div
- className="w-10 h-10 rounded border-2 border-white/20 hover:border-white/40 transition flex items-center justify-center"
+ className="w-10 h-10 aspect-square squircle-element border border-dashed border-white/30 bg-white/5 flex items-center justify-center hover:bg-white/10 transition group"
style={{ backgroundColor: textColor }}
>
<Icon icon="mdi:eyedropper" width="18" className="text-white mix-blend-difference" />
@@ -679,7 +668,7 @@ export function ElementsMenu({
<button
key={w.key}
onClick={() => setTextFontWeight(w.key)}
- className={`px-3 py-2 rounded-lg text-[10px] font-bold uppercase tracking-widest transition-all squircle-element ${textFontWeight === w.key ? "bg-white/10 text-white border border-white/15" : "bg-white/3 text-white/35 hover:text-white/70 border border-white/6"
+ className={`px-3 py-2 rounded-lg text-xs transition-all squircle-element ${textFontWeight === w.key ? "bg-white/10 text-white border border-white/15" : "bg-white/3 text-white/35 hover:text-white/70 border border-white/6"
}`}
>
{w.label}
@@ -694,7 +683,7 @@ export function ElementsMenu({
</div>
{/* Botón para agregar texto */}
- <button
+ <Button
onClick={() => {
const timestamp = Date.now();
const newElement: TextElement = {
@@ -715,11 +704,12 @@ export function ElementsMenu({
};
onAddElement(newElement);
}}
- className="w-full flex items-center justify-center gap-2 py-3 bg-blue-500/20 hover:bg-blue-500/30 border border-blue-500/40 rounded-lg text-sm font-medium text-blue-300 transition-all active:scale-95"
+ variant="outline"
+ className="w-full text-xs"
>
<Icon icon="ph:plus-bold" width="16" />
Agregar texto
- </button>
+ </Button>
{/* Controles para texto seleccionado */}
{selectedElement && selectedElement.type === "text" && (
@@ -728,42 +718,33 @@ export function ElementsMenu({
<div className="space-y-2">
<div className="text-[10px] uppercase tracking-widest text-white/40 font-semibold">Jerarquía</div>
<div className="grid grid-cols-2 gap-2">
- <button
+ <Button variant="outline" className="text-xs"
onClick={() => onBringToFront?.(selectedElement.id)}
- className="flex items-center justify-center gap-2 px-3 py-2 bg-white/5 hover:bg-white/10 border border-white/10 rounded-lg text-xs text-white/70 hover:text-white transition-all"
+
>
<Icon icon="ph:bring-to-front-bold" width="16" />
Traer al frente
- </button>
- <button
+ </Button>
+ <Button variant="outline" className="text-xs"
onClick={() => onSendToBack?.(selectedElement.id)}
- className="flex items-center justify-center gap-2 px-3 py-2 bg-white/5 hover:bg-white/10 border border-white/10 rounded-lg text-xs text-white/70 hover:text-white transition-all"
+
>
<Icon icon="ph:send-to-back-bold" width="16" />
Enviar atrás
- </button>
+ </Button>
</div>
</div>
{/* Acciones del elemento */}
<div className="space-y-2">
<div className="text-[10px] uppercase tracking-widest text-white/40 font-semibold">Acciones</div>
- <div className="grid grid-cols-2 gap-2">
- <button
- onClick={() => onDuplicateElement?.(selectedElement.id)}
- className="flex items-center justify-center gap-2 px-3 py-2 bg-white/5 hover:bg-white/10 border border-white/10 rounded-lg text-xs text-white/70 hover:text-white transition-all"
- >
- <Icon icon="ph:copy-bold" width="16" />
- Duplicar
- </button>
- <button
- onClick={() => onDeleteElement?.(selectedElement.id)}
- className="flex items-center justify-center gap-2 px-3 py-2 bg-red-500/10 hover:bg-red-500/20 border border-red-500/30 rounded-lg text-xs text-red-400 hover:text-red-300 transition-all"
- >
- <Icon icon="ph:trash-bold" width="16" />
- Eliminar
- </button>
- </div>
+ <button
+ onClick={() => onDeleteElement?.(selectedElement.id)}
+ className="flex items-center justify-center gap-2 px-3 py-2 bg-red-500/10 hover:bg-red-500/20 border border-red-500/30 rounded-lg text-xs text-red-400 hover:text-red-300 transition-all"
+ >
+ <Icon icon="ph:trash-bold" width="16" />
+ Eliminar
+ </button>
</div>
</>
)}
diff --git a/app/components/ui/editor/MockupMenu.tsx b/app/components/ui/editor/MockupMenu.tsx
index e110093..0790c93 100644
--- a/app/components/ui/editor/MockupMenu.tsx
+++ b/app/components/ui/editor/MockupMenu.tsx
@@ -278,7 +278,7 @@ export function MockupMenu({
type="text"
value={mockupConfig?.url || ""}
onChange={(e) => handleUrlChange(e.target.value)}
- placeholder="https://freeshot.dev"
+ placeholder="https://openvid.dev"
className="flex-1 bg-transparent text-[11px] text-white/70 placeholder:text-white/20 outline-none font-mono"
/>
</div>
diff --git a/app/components/ui/editor/PlayerControls.tsx b/app/components/ui/editor/PlayerControls.tsx
index f7ea1bc..d06cfb0 100644
--- a/app/components/ui/editor/PlayerControls.tsx
+++ b/app/components/ui/editor/PlayerControls.tsx
@@ -11,14 +11,6 @@ const MIN_ZOOM = 1;
const MAX_ZOOM = 10;
const ZOOM_STEP = 1;
-// ─── Keyboard shortcuts ───────────────────────────────────────────────────────
-// Space / K → play / pause
-// ArrowLeft / J → skip backward 5s
-// ArrowRight / L → skip forward 5s
-// ArrowUp → zoom in timeline
-// ArrowDown → zoom out timeline
-// F → toggle fullscreen
-
export function PlayerControls({
isPlaying,
currentTime,
diff --git a/app/components/ui/editor/VideoCanvas.tsx b/app/components/ui/editor/VideoCanvas.tsx
index 23b13de..cba9baa 100644
--- a/app/components/ui/editor/VideoCanvas.tsx
+++ b/app/components/ui/editor/VideoCanvas.tsx
@@ -511,18 +511,19 @@ export const VideoCanvas = forwardRef<VideoCanvasHandle, VideoCanvasProps>(funct
// 6. Render canvas elements (SVG, images, text)
// Elements are rendered after video but before zoom restore, so they're affected by zoom
const sortedElements = [...canvasElements].sort((a, b) => a.zIndex - b.zIndex);
-
+ const SVG_SCALE_FACTOR = 0.45;
+
for (const element of sortedElements) {
if (element.type === "svg") {
const svgElement = element as SvgElement;
// Get SVG as data URL
const svgDataUrl = getSvgDataUrl(svgElement.svgId, svgElement.color || "#FFFFFF");
if (!svgDataUrl) continue;
-
+
// Create image from SVG data URL
const svgImage = new Image();
svgImage.src = svgDataUrl;
-
+
// Wait for image to load
await new Promise<void>((resolve) => {
if (svgImage.complete) {
@@ -532,20 +533,20 @@ export const VideoCanvas = forwardRef<VideoCanvasHandle, VideoCanvasProps>(funct
svgImage.onerror = () => resolve(); // Continue even if load fails
}
});
-
+
ctx.save();
-
+
// Calculate element position and size in pixels (width and height are stored as percentage of canvas width for aspect ratio)
const elemX = (svgElement.x / 100) * canvasWidth;
const elemY = (svgElement.y / 100) * canvasHeight;
- const elemWidth = (svgElement.width / 100) * canvasWidth;
- const elemHeight = (svgElement.height / 100) * canvasWidth; // Use canvasWidth for square aspect ratio
-
+ const elemWidth = (svgElement.width / 100) * canvasWidth * SVG_SCALE_FACTOR;
+ const elemHeight = (svgElement.height / 100) * canvasWidth * SVG_SCALE_FACTOR;
+
// Apply transform: translate to center, rotate, translate back
ctx.translate(elemX, elemY);
ctx.rotate((svgElement.rotation * Math.PI) / 180);
ctx.globalAlpha = svgElement.opacity;
-
+
// Draw the SVG
ctx.drawImage(
svgImage,
@@ -554,24 +555,24 @@ export const VideoCanvas = forwardRef<VideoCanvasHandle, VideoCanvasProps>(funct
elemWidth,
elemHeight
);
-
+
ctx.restore();
} else if (element.type === "image") {
const img = elementImagesRef.current.get(element.imagePath);
if (!img) continue;
-
+
ctx.save();
-
+
// Calculate element position and size in pixels (width and height are stored as percentage of canvas width for aspect ratio)
const elemX = (element.x / 100) * canvasWidth;
const elemY = (element.y / 100) * canvasHeight;
const elemWidth = (element.width / 100) * canvasWidth;
const elemHeight = (element.height / 100) * canvasWidth; // Use canvasWidth for square aspect ratio
-
+
ctx.translate(elemX, elemY);
ctx.rotate((element.rotation * Math.PI) / 180);
ctx.globalAlpha = element.opacity;
-
+
ctx.drawImage(
img,
-elemWidth / 2,
@@ -579,18 +580,18 @@ export const VideoCanvas = forwardRef<VideoCanvasHandle, VideoCanvasProps>(funct
elemWidth,
elemHeight
);
-
+
ctx.restore();
} else if (element.type === "text") {
ctx.save();
-
+
const elemX = (element.x / 100) * canvasWidth;
const elemY = (element.y / 100) * canvasHeight;
-
+
ctx.translate(elemX, elemY);
ctx.rotate((element.rotation * Math.PI) / 180);
ctx.globalAlpha = element.opacity;
-
+
// Configure text style with scaled fontSize
// Scale fontSize proportionally to canvas width (reference: 1080px)
const scaledFontSize = element.fontSize * (canvasWidth / 1080);
@@ -599,10 +600,10 @@ export const VideoCanvas = forwardRef<VideoCanvasHandle, VideoCanvasProps>(funct
ctx.fillStyle = element.color;
ctx.textAlign = 'center';
ctx.textBaseline = 'middle';
-
+
// Draw text
ctx.fillText(element.content, 0, 0);
-
+
ctx.restore();
}
}
@@ -794,6 +795,13 @@ export const VideoCanvas = forwardRef<VideoCanvasHandle, VideoCanvasProps>(funct
<div
ref={canvasContainerRef}
className="absolute inset-0 pointer-events-none"
+ onClick={(e) => {
+ // Deselect element if clicking on background (not on an element)
+ if (e.target === e.currentTarget && onElementSelect) {
+ onElementSelect(null);
+ }
+ }}
+ style={{ pointerEvents: 'auto' }}
>
{/* Sort elements by zIndex for proper layering */}
{[...canvasElements].sort((a, b) => a.zIndex - b.zIndex).map((element) => {
diff --git a/app/components/ui/editor/mockups/MacosDarkIdeMockup.tsx b/app/components/ui/editor/mockups/MacosDarkIdeMockup.tsx
index 35e5edd..babbbb4 100644
--- a/app/components/ui/editor/mockups/MacosDarkIdeMockup.tsx
+++ b/app/components/ui/editor/mockups/MacosDarkIdeMockup.tsx
@@ -107,7 +107,7 @@ export function MacosDarkIdeMockup({
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2.5" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"/>
</svg>
<span className="truncate" style={{ fontSize: `${searchFontSize}px`, color: textColor }}>
- {url || "freeshot"}
+ {url || "openvid"}
</span>
</div>
</div>
diff --git a/app/components/ui/editor/mockups/MacosGhostIdeMockup.tsx b/app/components/ui/editor/mockups/MacosGhostIdeMockup.tsx
index f2b9ef6..13936dc 100644
--- a/app/components/ui/editor/mockups/MacosGhostIdeMockup.tsx
+++ b/app/components/ui/editor/mockups/MacosGhostIdeMockup.tsx
@@ -107,7 +107,7 @@ export function MacosGhostIdeMockup({
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2.5" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" />
</svg>
<span className="truncate" style={{ fontSize: `${searchFontSize}px`, color: textColor }}>
- {url || "freeshot"}
+ {url || "openvid"}
</span>
</div>
</div>
diff --git a/app/components/ui/editor/mockups/VSCodeMockup.tsx b/app/components/ui/editor/mockups/VSCodeMockup.tsx
index 4ece80c..9c29792 100644
--- a/app/components/ui/editor/mockups/VSCodeMockup.tsx
+++ b/app/components/ui/editor/mockups/VSCodeMockup.tsx
@@ -119,7 +119,7 @@ export function VSCodeMockup({
className="truncate"
style={{ fontSize: `${searchFontSize}px`, color: textColor }}
>
- {url || "freeshot"}
+ {url || "openvid"}
</span>
</div>
</div>
diff --git a/app/components/ui/exportDropdown.tsx b/app/components/ui/exportDropdown.tsx
index fc2da42..ef6e553 100644
--- a/app/components/ui/exportDropdown.tsx
+++ b/app/components/ui/exportDropdown.tsx
@@ -1,55 +1,121 @@
import { Button } from "@/components/ui/button";
import { Icon } from "@iconify/react";
-import {
- DropdownMenu,
- DropdownMenuContent,
- DropdownMenuItem,
- DropdownMenuLabel,
- DropdownMenuSeparator,
- DropdownMenuTrigger,
-} from "@/components/ui/dropdown-menu";
-
-export function ExportDropdown() {
+import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover";
+import type { ExportQuality } from "@/hooks/useVideoExport";
+import { useState } from "react";
+
+interface ExportProgress {
+ status: "idle" | "preparing" | "encoding" | "finalizing" | "complete" | "error";
+ progress: number;
+ message: string;
+}
+
+interface ExportDropdownProps {
+ onExport: (quality: ExportQuality) => void;
+ exportProgress: ExportProgress;
+}
+
+export function ExportDropdown({ onExport, exportProgress }: ExportDropdownProps) {
+ const [isOpen, setIsOpen] = useState(false);
+ const isExporting = exportProgress.status !== "idle" &&
+ exportProgress.status !== "complete" &&
+ exportProgress.status !== "error";
+
+ const handleExport = (quality: ExportQuality) => {
+ setIsOpen(false);
+ onExport(quality);
+ };
+
return (
- <DropdownMenu>
- <DropdownMenuTrigger asChild>
- <Button variant="primary" className="px-3 py-2 text-sm gap-2" size="sm">
+ <Popover open={isOpen} onOpenChange={setIsOpen}>
+ <PopoverTrigger asChild>
+ <Button
+ variant="primary"
+ className="px-3 py-2 text-sm gap-2 min-w-27.5"
+ size="sm"
+ disabled={isExporting}
+ >
<Icon icon="icon-park-outline:export" width="18" />
Exportar
<Icon icon="mdi:chevron-down" width="16" className="opacity-50" />
</Button>
- </DropdownMenuTrigger>
- <DropdownMenuContent align="end" className="w-56 bg-[#1C1C1F] border-white/10 text-white shadow-2xl">
- <DropdownMenuLabel className="text-[10px] uppercase tracking-widest text-white/40 pb-2">
- Calidad de exportación
- </DropdownMenuLabel>
- <DropdownMenuSeparator className="bg-white/5" />
-
- <DropdownMenuItem className="flex flex-col items-start gap-1 py-3 cursor-pointer focus:bg-white/5 focus:text-white">
- <div className="flex items-center justify-between w-full">
- <span className="font-medium text-sm">1080p Full HD</span>
- <span className="bg-indigo-500/20 text-indigo-400 text-[9px] px-1.5 py-0.5 rounded font-bold">RECOMENDADO</span>
+ </PopoverTrigger>
+
+ <PopoverContent
+ align="end"
+ className="w-64 bg-[#1C1C1F] border-white/10 text-white shadow-2xl p-0 overflow-hidden"
+ >
+ <div className="flex flex-col bg-black border border-white/10 rounded-xl overflow-hidden shadow-2xl">
+ <div className="px-4 py-3 border-b border-white/10 bg-white/5">
+ <span className="text-[10px] font-medium uppercase tracking-[0.15em] text-white/50">
+ Calidad de exportación
+ </span>
</div>
- <span className="text-[10px] text-white/50">1920 x 1080 • Estándar web</span>
- </DropdownMenuItem>
-
- <DropdownMenuItem className="flex flex-col items-start gap-1 py-3 cursor-pointer focus:bg-white/5 focus:text-white">
- <span className="font-medium text-sm">720p HD</span>
- <span className="text-[10px] text-white/50">1280 x 720 • Archivo ligero</span>
- </DropdownMenuItem>
-
- <DropdownMenuItem className="flex flex-col items-start gap-1 py-3 cursor-pointer focus:bg-white/5 focus:text-white">
- <span className="font-medium text-sm">480p SD</span>
- <span className="text-[10px] text-white/50">854 x 480 • Calidad estándar</span>
- </DropdownMenuItem>
-
- <DropdownMenuSeparator className="bg-white/5" />
-
- <DropdownMenuItem className="flex flex-col items-start gap-1 py-3 focus:bg-orange-600/20 focus:text-orange-400 cursor-pointer text-orange-400/80">
- <span className="font-medium text-sm">GIF Animado</span>
- <span className="text-[10px] opacity-60">Ideal para redes sociales</span>
- </DropdownMenuItem>
- </DropdownMenuContent>
- </DropdownMenu>
+
+ <div className="flex flex-col max-h-95 overflow-y-auto custom-scrollbar">
+ <button
+ className="group flex flex-col items-start gap-1.5 p-4 hover:bg-white/5 transition-all text-left border-b border-white/10"
+ onClick={() => handleExport("4k")}
+ >
+ <div className="flex items-center justify-between w-full">
+ <span className="text-sm font-medium text-white group-hover:text-blue-400 transition-colors">4K Ultra HD</span>
+ <span className="border border-blue-500/30 text-blue-400 text-[9px] px-2 py-0.5 rounded-full font-bold tracking-tight">
+ RECOMENDADO
+ </span>
+ </div>
+ <span className="text-[11px] text-white/50 font-mono">3840 × 2160 • Máxima fidelidad</span>
+ </button>
+
+ <button
+ className="group flex flex-col items-start gap-1.5 p-4 hover:bg-white/5 transition-all text-left border-b border-white/10"
+ onClick={() => handleExport("2k")}
+ >
+ <div className="flex items-center justify-between w-full">
+ <span className="text-sm font-medium text-white group-hover:text-white/80 transition-colors">2K Quad HD</span>
+ <span className="border border-white/10 text-white/50 text-[9px] px-2 py-0.5 rounded-full font-bold">
+ PREMIUM
+ </span>
+ </div>
+ <span className="text-[11px] text-white/50 font-mono">2560 × 1440 • Balance ideal</span>
+ </button>
+
+ <button
+ className="group flex flex-col items-start gap-1.5 p-4 hover:bg-white/5 transition-all text-left border-b border-white/10"
+ onClick={() => handleExport("1080p")}
+ >
+ <span className="text-sm font-medium text-white group-hover:text-white/80 transition-colors">1080p Full HD</span>
+ <span className="text-[11px] text-white/50 font-mono">1920 × 1080 • Estándar web</span>
+ </button>
+
+ <button
+ className="group flex flex-col items-start gap-1.5 p-4 hover:bg-white/5 transition-all text-left border-b border-white/10"
+ onClick={() => handleExport("720p")}
+ >
+ <span className="text-sm font-medium text-white group-hover:text-white/80 transition-colors">720p HD</span>
+ <span className="text-[11px] text-white/50 font-mono">1280 × 720 • Archivo ligero</span>
+ </button>
+
+ <button
+ className="group flex flex-col items-start gap-1.5 p-4 hover:bg-white/5 transition-all text-left border-b border-white/10"
+ onClick={() => handleExport("480p")}
+ >
+ <span className="text-sm font-medium text-white group-hover:text-white/80 transition-colors">480p SD</span>
+ <span className="text-[11px] text-white/50 font-mono">854 × 480 • Calidad borrador</span>
+ </button>
+
+ <button
+ className="group flex flex-col items-start gap-1.5 p-4 hover:bg-orange-500/5 transition-all text-left"
+ onClick={() => handleExport("gif")}
+ >
+ <div className="flex items-center gap-2">
+ <span className="text-sm font-medium text-orange-400 group-hover:text-orange-300 transition-colors">GIF Animado</span>
+ <div className="h-1 w-1 rounded-full bg-orange-500/50"></div>
+ </div>
+ <span className="text-[11px] text-orange-400/70 font-mono">Loop sin audio • Redes sociales</span>
+ </button>
+ </div>
+ </div>
+ </PopoverContent>
+ </Popover>
);
-}
+}
\ No newline at end of file
diff --git a/app/components/ui/sidebar-tool.tsx b/app/components/ui/sidebar-tool.tsx
deleted file mode 100644
index 98965f4..0000000
--- a/app/components/ui/sidebar-tool.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-"use client";
-
-import { Icon } from "@iconify/react";
-
-interface SidebarToolProps {
- icon: string;
- isActive?: boolean;
- onClick?: () => void;
-}
-
-export function SidebarTool({ icon, isActive, onClick }: SidebarToolProps) {
- return (
- <button
- onClick={onClick}
- className={`p-2 rounded-md transition ${
- isActive
- ? "bg-white/10 text-white"
- : "hover:bg-white/5 text-[#A1A1AA]"
- }`}
- >
- <Icon icon={icon} width="20" />
- </button>
- );
-}
diff --git a/app/components/ui/slider-control.tsx b/app/components/ui/slider-control.tsx
deleted file mode 100644
index 6d9581f..0000000
--- a/app/components/ui/slider-control.tsx
+++ /dev/null
@@ -1,33 +0,0 @@
-"use client";
-
-import { Icon } from "@iconify/react";
-
-interface SliderControlProps {
- icon?: string;
- label: string;
- value: number;
- }
-
-export function SliderControl({ icon, label, value }: SliderControlProps) {
-
- return (
- <div>
- <div className="flex items-center gap-2 text-sm mb-2 text-[#A1A1AA]">
- {icon && <Icon icon={icon} width="16" />}
- <span>{label}</span>
- </div>
- <div className="flex items-center gap-3">
- <div className="flex-1 h-1.5 bg-[#27272A] rounded-full relative cursor-pointer">
- <div
- className="absolute left-0 top-0 h-full bg-gradient-primary rounded-full"
- style={{ width: `${value}%` }}
- ></div>
- <div
- className="absolute top-1/2 -translate-y-1/2 w-3.5 h-3.5 bg-white/70 rounded-full border border-white shadow"
- style={{ left: `calc(${value}% - 7px)` }}
- ></div>
- </div>
- </div>
- </div>
- );
-}
diff --git a/app/components/ui/step-row.tsx b/app/components/ui/step-row.tsx
deleted file mode 100644
index 0d49197..0000000
--- a/app/components/ui/step-row.tsx
+++ /dev/null
@@ -1,58 +0,0 @@
-"use client";
-import { ReactNode } from "react";
-
-interface StepRowProps {
- number: number;
- title: string;
- description: ReactNode;
- visual: ReactNode;
- actionButton?: ReactNode;
- isReversed: boolean;
-}
-
-export default function StepRow({
- number,
- title,
- description,
- visual,
- actionButton,
- isReversed
-}: StepRowProps) {
- return (
- <div className="grid grid-cols-1 lg:grid-cols-2 gap-16 lg:gap-24 items-center">
-
- <div className={`order-1 ${isReversed ? "lg:order-2" : "lg:order-1"}`}>
- <div className="flex items-center gap-5 mb-6 drop-shadow-[1.2px_1.2px_100.2px_rgba(183,203,248,1)]">
- <span className="relative flex items-center justify-center w-14 h-14 rounded-full bg-[#0E0E12] border border-white/10 text-white font-light text-2xl shrink-0 overflow-hidden group">
-
- <div
- className="absolute inset-0 opacity-40 transition-opacity group-hover:opacity-60"
- style={{
- backgroundImage: `repeating-linear-gradient(45deg, rgba(255,255,255,0.2) 0px, rgba(255,255,255,0.2) 1px, transparent 1px, transparent 10px)`,
- maskImage: 'radial-gradient(circle, black 40%, transparent 100%)',
- WebkitMaskImage: 'radial-gradient(circle, black 40%, transparent 100%)'
- }}
- />
-
- <div className="absolute inset-0 rounded-full bg-gradient-to-tr from-white/5 to-transparent pointer-events-none" />
-
- <span className="relative z-10">{number}</span>
- </span>
-
- <h3 className="text-3xl md:text-4xl font-light tracking-tight text-white drop-shadow-[1.2px_1.2px_100.2px_rgba(183,203,248,1)]">
- {title}
- </h3>
- </div>
- <div className="text-lg text-neutral-400 mb-10 leading-relaxed font-light">
- {description}
- </div>
- {actionButton && <div>{actionButton}</div>}
- </div>
-
- <div className={`order-2 ${isReversed ? "lg:order-1" : "lg:order-2"}`}>
- {visual}
- </div>
-
- </div>
- );
-}
\ No newline at end of file
diff --git a/app/components/ui/tab-button.tsx b/app/components/ui/tab-button.tsx
deleted file mode 100644
index f8d5afa..0000000
--- a/app/components/ui/tab-button.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-"use client";
-
-interface TabButtonProps {
- label: string;
- isActive?: boolean;
- onClick?: () => void;
-}
-
-export function TabButton({ label, isActive, onClick }: TabButtonProps) {
- return (
- <button
- onClick={onClick}
- className={`flex-1 py-1.5 rounded-md transition ${
- isActive
- ? "bg-white/10 text-white"
- : "hover:text-white text-[#A1A1AA]"
- }`}
- >
- {label}
- </button>
- );
-}
diff --git a/app/components/ui/wallpaper-grid.tsx b/app/components/ui/wallpaper-grid.tsx
deleted file mode 100644
index c0ca9b9..0000000
--- a/app/components/ui/wallpaper-grid.tsx
+++ /dev/null
@@ -1,51 +0,0 @@
-"use client";
-
-interface WallpaperGridProps {
- selectedIndex?: number;
- onSelect?: (index: number) => void;
- count?: number;
-}
-
-export const WALLPAPERS = [
- "https://avatars.githubusercontent.com/u/171596250?v=4",
- "https://avatars.githubusercontent.com/u/171596250?v=4",
- "https://avatars.githubusercontent.com/u/171596250?v=4",
- "https://avatars.githubusercontent.com/u/171596250?v=4",
- "https://avatars.githubusercontent.com/u/171596250?v=4",
- "https://avatars.githubusercontent.com/u/171596250?v=4",
- "https://avatars.githubusercontent.com/u/171596250?v=4",
-];
-
-export function WallpaperGrid({ selectedIndex = -1, onSelect }: WallpaperGridProps) {
- return (
- <div className="grid grid-cols-6 gap-2">
- {WALLPAPERS.map((imgSrc, i) => (
- <div
- key={i}
- onClick={() => onSelect?.(i)}
- className={`aspect-square rounded-full cursor-pointer hover:ring-2 ring-white/30 transition bg-cover bg-center ${
- selectedIndex === i ? "ring-2 ring-white shadow-md shadow-black/50" : ""
- }`}
- style={{
- backgroundImage: `url('${imgSrc}')`
- }}
- />
- ))}
-
- <div
- onClick={() => onSelect?.(-1)}
- className={`aspect-square rounded-full cursor-pointer hover:ring-2 ring-white/30 transition flex items-center justify-center border border-white/20 relative overflow-hidden bg-white ${
- selectedIndex === -1 ? "ring-2 ring-white shadow-lg shadow-black/40" : ""
- }`}
- style={{
- backgroundImage: 'linear-gradient(45deg, #ddd 25%, transparent 25%), linear-gradient(-45deg, #ddd 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #ddd 75%), linear-gradient(-45deg, transparent 75%, #ddd 75%)',
- backgroundSize: '8px 8px',
- backgroundPosition: '0 0, 0 4px, 4px -4px, -4px 0px'
- }}
- >
- <div className="absolute w-[140%] h-0.5 bg-red-500/80 rotate-45 z-10" />
- <div className="absolute inset-0 bg-black/5" />
- </div>
- </div>
- );
-}
\ No newline at end of file
diff --git a/lib/mockup-canvas/brave-glass.ts b/lib/mockup-canvas/brave-glass.ts
index 9e1526c..c4bb1a2 100644
--- a/lib/mockup-canvas/brave-glass.ts
+++ b/lib/mockup-canvas/brave-glass.ts
@@ -21,7 +21,7 @@ export function drawBraveGlassMockup(context: MockupCanvasContext): MockupDrawRe
const { ctx, x, y, width, height, config, cornerRadius, shadowBlur } = context;
const isDark = config.darkMode;
const frameColor = config.frameColor;
- const url = config.url || "https://freeshot.dev";
+ const url = config.url || "https://openvid.dev";
const headerOpacity = config.headerOpacity ?? 100;
const headerScale = (config.headerScale || 100) / 100;
diff --git a/lib/mockup-canvas/brave.ts b/lib/mockup-canvas/brave.ts
index acf7ca0..2a5058b 100644
--- a/lib/mockup-canvas/brave.ts
+++ b/lib/mockup-canvas/brave.ts
@@ -21,7 +21,7 @@ export function drawBraveMockup(context: MockupCanvasContext): MockupDrawResult
const { ctx, x, y, width, height, config, cornerRadius, shadowBlur } = context;
const isDark = config.darkMode;
const frameColor = config.frameColor;
- const url = config.url || "https://freeshot.dev";
+ const url = config.url || "https://openvid.dev";
const headerOpacity = config.headerOpacity ?? 100;
const headerScale = (config.headerScale || 100) / 100;
diff --git a/lib/mockup-canvas/chrome-glass.ts b/lib/mockup-canvas/chrome-glass.ts
index 2ff3195..1a3b44b 100644
--- a/lib/mockup-canvas/chrome-glass.ts
+++ b/lib/mockup-canvas/chrome-glass.ts
@@ -18,7 +18,7 @@ export function drawChromeGlassMockup(context: MockupCanvasContext): MockupDrawR
const { ctx, x, y, width, height, config, cornerRadius, shadowBlur } = context;
const isDark = config.darkMode;
const frameColor = config.frameColor;
- const url = config.url || "https://freeshot.dev";
+ const url = config.url || "https://openvid.dev";
const headerOpacity = config.headerOpacity ?? 100;
const headerScale = (config.headerScale || 100) / 100;
diff --git a/lib/mockup-canvas/chrome.ts b/lib/mockup-canvas/chrome.ts
index 8c31a42..af8c191 100644
--- a/lib/mockup-canvas/chrome.ts
+++ b/lib/mockup-canvas/chrome.ts
@@ -18,7 +18,7 @@ export function drawChromeMockup(context: MockupCanvasContext): MockupDrawResult
const { ctx, x, y, width, height, config, cornerRadius, shadowBlur } = context;
const isDark = config.darkMode;
const frameColor = config.frameColor;
- const url = config.url || "https://freeshot.dev";
+ const url = config.url || "https://openvid.dev";
const headerOpacity = config.headerOpacity ?? 100;
const headerScale = (config.headerScale || 100) / 100;
diff --git a/lib/mockup-canvas/macos-dark-ide.ts b/lib/mockup-canvas/macos-dark-ide.ts
index 5cb3e6f..bb66331 100644
--- a/lib/mockup-canvas/macos-dark-ide.ts
+++ b/lib/mockup-canvas/macos-dark-ide.ts
@@ -12,7 +12,7 @@ export function drawMacosDarkIdeMockup(context: MockupCanvasContext): MockupDraw
const { ctx, x, y, width, height, config, cornerRadius, shadowBlur } = context;
const isDark = config.darkMode;
const frameColor = config.frameColor;
- const url = config.url || "freeshot";
+ const url = config.url || "openvid";
const headerOpacity = config.headerOpacity ?? 100;
const headerScale = (config.headerScale || 100) / 100;
diff --git a/lib/mockup-canvas/macos-ghost-glass.ts b/lib/mockup-canvas/macos-ghost-glass.ts
index f6df034..b12da4a 100644
--- a/lib/mockup-canvas/macos-ghost-glass.ts
+++ b/lib/mockup-canvas/macos-ghost-glass.ts
@@ -22,7 +22,7 @@ export function drawMacosGhostGlassMockup(context: MockupCanvasContext): MockupD
const { ctx, x, y, width, height, config, cornerRadius, shadowBlur } = context;
const isDark = config.darkMode;
const frameColor = config.frameColor;
- const url = config.url || "https://freeshot.dev";
+ const url = config.url || "https://openvid.dev";
const headerOpacity = config.headerOpacity ?? 100;
const headerScale = (config.headerScale || 100) / 100;
diff --git a/lib/mockup-canvas/macos-ghost-ide.ts b/lib/mockup-canvas/macos-ghost-ide.ts
index 289d9d7..754a3e3 100644
--- a/lib/mockup-canvas/macos-ghost-ide.ts
+++ b/lib/mockup-canvas/macos-ghost-ide.ts
@@ -12,7 +12,7 @@ export function drawMacosGhostIdeMockup(context: MockupCanvasContext): MockupDra
const { ctx, x, y, width, height, config, cornerRadius, shadowBlur } = context;
const isDark = config.darkMode;
const frameColor = config.frameColor;
- const url = config.url || "freeshot";
+ const url = config.url || "openvid";
const headerOpacity = config.headerOpacity ?? 100;
const headerScale = (config.headerScale || 100) / 100;
diff --git a/lib/mockup-canvas/macos-ghost.ts b/lib/mockup-canvas/macos-ghost.ts
index 6ec6f3e..c509494 100644
--- a/lib/mockup-canvas/macos-ghost.ts
+++ b/lib/mockup-canvas/macos-ghost.ts
@@ -25,7 +25,7 @@ export function drawMacosGhostMockup(context: MockupCanvasContext): MockupDrawRe
const { ctx, x, y, width, height, config, cornerRadius, shadowBlur } = context;
const isDark = config.darkMode;
const frameColor = config.frameColor;
- const url = config.url || "https://freeshot.dev";
+ const url = config.url || "https://openvid.dev";
const headerOpacity = config.headerOpacity ?? 100;
// Escalado proporcional del header
diff --git a/lib/mockup-canvas/macos-glass.ts b/lib/mockup-canvas/macos-glass.ts
index 4443538..37152b4 100644
--- a/lib/mockup-canvas/macos-glass.ts
+++ b/lib/mockup-canvas/macos-glass.ts
@@ -26,7 +26,7 @@ export function drawMacosGlassMockup(context: MockupCanvasContext): MockupDrawRe
const { ctx, x, y, width, height, config, cornerRadius, shadowBlur } = context;
const isDark = config.darkMode;
const frameColor = config.frameColor;
- const url = config.url || "https://freeshot.dev";
+ const url = config.url || "https://openvid.dev";
const headerOpacity = config.headerOpacity ?? 100;
// Escalado proporcional del header
diff --git a/lib/mockup-canvas/macos.ts b/lib/mockup-canvas/macos.ts
index c7a3278..a8a8dca 100644
--- a/lib/mockup-canvas/macos.ts
+++ b/lib/mockup-canvas/macos.ts
@@ -25,7 +25,7 @@ export function drawMacosMockup(context: MockupCanvasContext): MockupDrawResult
const { ctx, x, y, width, height, config, cornerRadius, shadowBlur } = context;
const isDark = config.darkMode;
const frameColor = config.frameColor;
- const url = config.url || "https://freeshot.dev";
+ const url = config.url || "https://openvid.dev";
const headerOpacity = config.headerOpacity ?? 100;
// Escalado proporcional del header
diff --git a/lib/mockup-canvas/vscode.ts b/lib/mockup-canvas/vscode.ts
index 7925757..a055234 100644
--- a/lib/mockup-canvas/vscode.ts
+++ b/lib/mockup-canvas/vscode.ts
@@ -21,7 +21,7 @@ export function drawVSCodeMockup(context: MockupCanvasContext): MockupDrawResult
const { ctx, x, y, width, height, config, cornerRadius, shadowBlur } = context;
const isDark = config.darkMode;
const frameColor = config.frameColor;
- const url = config.url || "freeshot";
+ const url = config.url || "openvid";
const headerOpacity = config.headerOpacity ?? 100;
// Escalado proporcional del header
diff --git a/lib/mockup-data.tsx b/lib/mockup-data.tsx
index 1911958..fe11d05 100644
--- a/lib/mockup-data.tsx
+++ b/lib/mockup-data.tsx
@@ -29,7 +29,7 @@ export const MOCKUPS: Mockup[] = [
defaultConfig: {
darkMode: false,
frameColor: "#f6f6f6",
- url: "https://freeshot.dev",
+ url: "https://openvid.dev",
headerScale: 60,
cornerRadius: 12,
},
@@ -52,7 +52,7 @@ export const MOCKUPS: Mockup[] = [
defaultConfig: {
darkMode: false,
frameColor: "#f6f6f6",
- url: "https://freeshot.dev",
+ url: "https://openvid.dev",
headerScale: 60,
cornerRadius: 12,
},
@@ -90,7 +90,7 @@ export const MOCKUPS: Mockup[] = [
defaultConfig: {
darkMode: false,
frameColor: "#f6f6f6",
- url: "https://freeshot.dev",
+ url: "https://openvid.dev",
headerScale: 60,
cornerRadius: 12,
},
@@ -113,7 +113,7 @@ export const MOCKUPS: Mockup[] = [
defaultConfig: {
darkMode: false,
frameColor: "#f6f6f6",
- url: "https://freeshot.dev",
+ url: "https://openvid.dev",
headerScale: 60,
cornerRadius: 12,
},
@@ -153,7 +153,7 @@ export const MOCKUPS: Mockup[] = [
defaultConfig: {
darkMode: false,
frameColor: "#f6f6f6",
- url: "https://freeshot.dev",
+ url: "https://openvid.dev",
headerScale: 60,
cornerRadius: 12,
},
@@ -176,7 +176,7 @@ export const MOCKUPS: Mockup[] = [
defaultConfig: {
darkMode: false,
frameColor: "#f6f6f6",
- url: "https://freeshot.dev",
+ url: "https://openvid.dev",
headerScale: 60,
cornerRadius: 12,
},
@@ -198,7 +198,7 @@ export const MOCKUPS: Mockup[] = [
},
defaultConfig: {
darkMode: false,
- url: "https://freeshot.dev",
+ url: "https://openvid.dev",
headerScale: 60,
cornerRadius: 12,
},
@@ -221,7 +221,7 @@ export const MOCKUPS: Mockup[] = [
defaultConfig: {
darkMode: false,
frameColor: "#f6f6f6",
- url: "https://freeshot.dev",
+ url: "https://openvid.dev",
headerScale: 60,
cornerRadius: 12,
},
@@ -244,7 +244,7 @@ export const MOCKUPS: Mockup[] = [
defaultConfig: {
darkMode: false,
frameColor: "#f6f6f6",
- url: "https://freeshot.dev",
+ url: "https://openvid.dev",
headerScale: 60,
cornerRadius: 12,
},
@@ -341,7 +341,7 @@ export const MOCKUPS: Mockup[] = [
defaultConfig: {
darkMode: true,
frameColor: "#1e1e1e",
- url: "https://freeshot.dev",
+ url: "https://openvid.dev",
headerScale: 60,
cornerRadius: 8,
},
@@ -364,7 +364,7 @@ export const MOCKUPS: Mockup[] = [
defaultConfig: {
darkMode: true,
frameColor: "#1e1e1e",
- url: "https://freeshot.dev",
+ url: "https://openvid.dev",
headerScale: 60,
cornerRadius: 8,
},
@@ -387,7 +387,7 @@ export const MOCKUPS: Mockup[] = [
defaultConfig: {
darkMode: true,
frameColor: "#1e1e1e",
- url: "https://freeshot.dev",
+ url: "https://openvid.dev",
headerScale: 60,
cornerRadius: 8,
},
diff --git a/lib/thumbnail-cache.ts b/lib/thumbnail-cache.ts
index 5bae99a..46870cb 100644
--- a/lib/thumbnail-cache.ts
+++ b/lib/thumbnail-cache.ts
@@ -3,7 +3,7 @@
* Prevents regenerating thumbnails for the same video
*/
-const DB_NAME = "freeshot-thumbnails";
+const DB_NAME = "openvid-thumbnails";
const DB_VERSION = 1;
const STORE_NAME = "thumbnails";
diff --git a/lib/video-upload-cache.ts b/lib/video-upload-cache.ts
index f2258b6..5d01788 100644
--- a/lib/video-upload-cache.ts
+++ b/lib/video-upload-cache.ts
@@ -3,7 +3,7 @@
* Stores a single uploaded video at a time (replaces previous uploads)
*/
-const DB_NAME = "freeshot-uploaded-videos";
+const DB_NAME = "openvid-uploaded-videos";
const DB_VERSION = 1;
const STORE_NAME = "videos";
const SINGLE_VIDEO_KEY = "current-uploaded-video";
diff --git a/mockups.html b/mockups.html
index e991506..5f4a4c7 100644
--- a/mockups.html
+++ b/mockups.html
@@ -1048,7 +1048,7 @@
</path>
</svg>
<span class="flex-1 text-center text-[10px] font-medium truncate px-2 text-gray-500">
- https://freeshot.dev
+ https://openvid.dev
</span>
<svg class="w-2.5 h-2.5 text-gray-400" fill="none" stroke="currentColor"
viewBox="0 0 24 24">
@@ -1135,7 +1135,7 @@
</path>
</svg>
<span
- class="flex-1 text-center text-[10px] font-medium truncate px-2 text-gray-500">https://freeshot.dev</span>
+ class="flex-1 text-center text-[10px] font-medium truncate px-2 text-gray-500">https://openvid.dev</span>
<svg class="w-2.5 h-2.5 text-gray-400" fill="none" stroke="currentColor"
viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
@@ -1218,7 +1218,7 @@
</path>
</svg>
<span
- class="flex-1 text-center text-[10px] font-medium truncate px-2 text-gray-500">https://freeshot.dev</span>
+ class="flex-1 text-center text-[10px] font-medium truncate px-2 text-gray-500">https://openvid.dev</span>
<svg class="w-2.5 h-2.5 text-gray-400" fill="none" stroke="currentColor"
viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
@@ -1296,7 +1296,7 @@
</path>
</svg>
<span class="flex-1 text-center text-[10px] font-medium truncate px-2 text-gray-500">
- https://freeshot.dev
+ https://openvid.dev
</span>
<svg class="w-2.5 h-2.5 text-gray-400" fill="none" stroke="currentColor"
viewBox="0 0 24 24">
@@ -1677,7 +1677,7 @@
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"
stroke-width="2" />
</svg>
- <span class="truncate">freeshot.dev</span>
+ <span class="truncate">openvid.dev</span>
</div>
</div>
@@ -1779,7 +1779,7 @@
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"
stroke-width="2" />
</svg>
- <span class="truncate">freeshot.dev</span>
+ <span class="truncate">openvid.dev</span>
</div>
</div>
@@ -2230,7 +2230,7 @@
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5"
d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path>
</svg>
- <span class="text-[#cccccc] text-[11px]">freeshot</span>
+ <span class="text-[#cccccc] text-[11px]">openvid</span>
</div>
</div>
@@ -2295,7 +2295,7 @@
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5"
d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path>
</svg>
- <span class="text-[11px]">freeshot</span>
+ <span class="text-[11px]">openvid</span>
</div>
</div>
@@ -2345,7 +2345,7 @@
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5"
d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path>
</svg>
- <span class="text-[11px]">freeshot</span>
+ <span class="text-[11px]">openvid</span>
</div>
</div>
diff --git a/public/elements/arrows/.gitkeep b/public/elements/arrows/.gitkeep
deleted file mode 100644
index 8735cf0..0000000
--- a/public/elements/arrows/.gitkeep
+++ /dev/null
@@ -1,2 +0,0 @@
-# SVG Arrows
-# Place arrow SVG files here
diff --git a/public/elements/arrows/arrow-right.svg b/public/elements/arrows/arrow-right.svg
deleted file mode 100644
index 23c3ff9..0000000
--- a/public/elements/arrows/arrow-right.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 40">
- <path d="M 10 20 L 70 20 L 90 20 L 85 10 L 90 30 L 85 30 Z" fill="currentColor" stroke="currentColor" stroke-width="2"/>
-</svg>
diff --git a/public/elements/decorative/.gitkeep b/public/elements/decorative/.gitkeep
deleted file mode 100644
index 8d8aba9..0000000
--- a/public/elements/decorative/.gitkeep
+++ /dev/null
@@ -1,2 +0,0 @@
-# SVG Decorative Elements
-# Place decorative SVG files here
diff --git a/public/elements/decorative/star.svg b/public/elements/decorative/star.svg
deleted file mode 100644
index 34df5f8..0000000
--- a/public/elements/decorative/star.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
- <path d="M 50 10 L 61 35 L 90 35 L 68 53 L 79 78 L 50 60 L 21 78 L 32 53 L 10 35 L 39 35 Z" fill="currentColor"/>
-</svg>
diff --git a/public/elements/shapes/.gitkeep b/public/elements/shapes/.gitkeep
deleted file mode 100644
index b0c3632..0000000
--- a/public/elements/shapes/.gitkeep
+++ /dev/null
@@ -1,2 +0,0 @@
-# SVG Shapes
-# Place basic shape SVG files here
diff --git a/public/elements/shapes/circle.svg b/public/elements/shapes/circle.svg
deleted file mode 100644
index 9eb938a..0000000
--- a/public/elements/shapes/circle.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
- <circle cx="50" cy="50" r="45" fill="currentColor"/>
-</svg>
diff --git a/public/elements/shapes/rectangle.svg b/public/elements/shapes/rectangle.svg
deleted file mode 100644
index 7f123f4..0000000
--- a/public/elements/shapes/rectangle.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
- <rect width="100" height="100" fill="currentColor" rx="5"/>
-</svg>
diff --git a/public/elements/shapes/triangle.svg b/public/elements/shapes/triangle.svg
deleted file mode 100644
index 4c70a51..0000000
--- a/public/elements/shapes/triangle.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
- <polygon points="50,10 90,90 10,90" fill="currentColor"/>
-</svg>
diff --git a/public/svg/logo-freeshot.svg b/public/svg/logo-openvid.svg
similarity index 100%
rename from public/svg/logo-freeshot.svg
rename to public/svg/logo-openvid.svg
diff --git a/types/control-panel.types.ts b/types/control-panel.types.ts
index 3cddb7a..22349f2 100644
--- a/types/control-panel.types.ts
+++ b/types/control-panel.types.ts
@@ -47,7 +47,6 @@ export interface ControlPanelProps {
selectedCanvasElement?: CanvasElement | null;
onUpdateCanvasElement?: (id: string, updates: Partial<CanvasElement>) => void;
onDeleteCanvasElement?: (id: string) => void;
- onDuplicateCanvasElement?: (id: string) => void;
onBringToFront?: (id: string) => void;
onSendToBack?: (id: string) => void;
}
diff --git a/types/mockup.types.ts b/types/mockup.types.ts
index 184578c..f1a87bb 100644
--- a/types/mockup.types.ts
+++ b/types/mockup.types.ts
@@ -48,7 +48,7 @@ export interface MockupRenderProps {
export const DEFAULT_MOCKUP_CONFIG: MockupConfig = {
darkMode: false,
frameColor: "#f6f6f6",
- url: "https://freeshot.dev",
+ url: "https://openvid.dev",
headerScale: 60, // 100% = tamaño normal
headerOpacity: 100, // 100% = totalmente opaco
cornerRadius: 12,