e.preventDefault()}
+ onDrop={(e) => {
+ e.preventDefault();
+ if (e.dataTransfer.files?.[0]) handlePrimaryFileSelect(e.dataTransfer.files[0]);
}}
- />
+ onClick={() => fileInputRef.current?.click()}
+ className="border-2 border-dashed border-rule hover:border-accent rounded-3xl p-7 sm:p-9 text-center bg-paper/60 hover:bg-accent/5 transition-all cursor-pointer group"
+ >
+
{
+ if (e.target.files?.[0]) handlePrimaryFileSelect(e.target.files[0]);
+ }}
+ />
-
-
+
+
+
+
+
+ Drag and drop your image here
+
+
+ Supports JPG, PNG, WebP up to 12MB. Zero server retention.
+
-
- Upload your image to edit
-
-
- Drag & drop your photo here, or click to browse. Supports JPG, PNG, WebP up to 12MB.
-
+ {/* PROMINENT ACTION BUTTONS DIRECTLY BELOW PHOTO UPLOAD */}
+
+
-
-
Select Photo
-
+ {samplePresets.length > 0 && (
+
+ )}
)}
@@ -789,19 +941,41 @@ export function DynamicToolWorkspace({
onChange={(e) => setPromptText(e.target.value)}
placeholder={
resolveLocalised(tool.textToImageConfig?.placeholder, locale) ||
- 'Describe what you want to create...'
+ 'Describe what you want to create (e.g. A solitary astronaut standing on crystal sands under a violet nebula, cinematic rim lighting, 8k resolution)...'
}
className="w-full p-4 rounded-2xl border border-rule bg-paper text-ink text-sm font-body placeholder:text-muted focus:outline-none focus:border-accent focus:ring-2 focus:ring-accent/20"
/>
-
+ {/* Quick Prompt Ideas */}
+
+
Quick prompt inspiration:
+
+ {[
+ 'Cinematic 35mm portrait with golden hour rim light',
+ 'Makoto Shinkai anime cityscape under starry skies',
+ '3D Disney character with luminous amber eyes',
+ 'Hyperrealistic wildlife in lush emerald rain forest'
+ ].map((samplePrompt) => (
+
+ ))}
+
+
+
+
Aspect:
{['1:1', '16:9', '9:16', '4:3'].map((ratio) => (
)}
diff --git a/src/components/tools/MaskCanvasEditor.tsx b/src/components/tools/MaskCanvasEditor.tsx
index 7ed8d6f..44866cc 100644
--- a/src/components/tools/MaskCanvasEditor.tsx
+++ b/src/components/tools/MaskCanvasEditor.tsx
@@ -14,11 +14,14 @@ import {
Maximize2
} from 'lucide-react';
import { MaskingConfig, resolveLocalised } from '@/types';
+import { ProcessingOverlay } from './ProcessingOverlay';
interface MaskCanvasEditorProps {
imageUrl: string;
config?: MaskingConfig;
locale?: string;
+ isProcessing?: boolean;
+ toolName?: string;
onMaskChange?: (hasMask: boolean) => void;
onExportReady?: (getMaskBlob: () => Promise
) => void;
}
@@ -27,6 +30,8 @@ export function MaskCanvasEditor({
imageUrl,
config,
locale = 'en',
+ isProcessing = false,
+ toolName,
onMaskChange,
onExportReady,
}: MaskCanvasEditorProps) {
@@ -520,6 +525,9 @@ export function MaskCanvasEditor({
}}
/>
)}
+
+ {/* Laser Scanning Processing Animation Overlay */}
+ {isProcessing && }
{/* Canvas Helper Hint */}
diff --git a/src/components/tools/ProcessingOverlay.tsx b/src/components/tools/ProcessingOverlay.tsx
new file mode 100644
index 0000000..9f4b9be
--- /dev/null
+++ b/src/components/tools/ProcessingOverlay.tsx
@@ -0,0 +1,140 @@
+'use client';
+
+import React, { useState, useEffect } from 'react';
+import { Sparkles, Cpu, Layers, Zap, ShieldCheck } from 'lucide-react';
+
+interface ProcessingOverlayProps {
+ toolName?: string;
+ stageMessages?: string[];
+ aspectRatio?: string;
+}
+
+export function ProcessingOverlay({
+ toolName = 'Neural Vision Model',
+ stageMessages,
+ aspectRatio = 'aspect-[4/3] sm:aspect-[16/10]',
+}: ProcessingOverlayProps) {
+ const defaultStages = [
+ 'Initializing volatile GPU tensor core...',
+ 'Analyzing photographic topology & lighting coordinates...',
+ 'Synthesizing generative neural model...',
+ 'Reconstructing sub-pixel micro-details & HD polish...',
+ 'Finalizing crystal-clear preview...',
+ ];
+
+ const stages = stageMessages && stageMessages.length > 0 ? stageMessages : defaultStages;
+
+ const [currentStageIdx, setCurrentStageIdx] = useState(0);
+ const [progress, setProgress] = useState(12);
+ const [elapsedSec, setElapsedSec] = useState(0);
+
+ // Smooth elapsed timer
+ useEffect(() => {
+ const timer = setInterval(() => {
+ setElapsedSec((prev) => +(prev + 0.1).toFixed(1));
+ }, 100);
+ return () => clearInterval(timer);
+ }, []);
+
+ // Cycle through inference stages & smooth progress curve
+ useEffect(() => {
+ const stageInterval = setInterval(() => {
+ setCurrentStageIdx((prev) => (prev < stages.length - 1 ? prev + 1 : prev));
+ }, 900);
+
+ const progressInterval = setInterval(() => {
+ setProgress((prev) => {
+ if (prev >= 94) return 94; // Wait for server resolution
+ const delta = Math.max(1, Math.floor((95 - prev) * 0.15));
+ return Math.min(94, prev + delta);
+ });
+ }, 150);
+
+ return () => {
+ clearInterval(stageInterval);
+ clearInterval(progressInterval);
+ };
+ }, [stages.length]);
+
+ return (
+
+ {/* 1. Moving Laser Scanning Beam */}
+
+
+ {/* 2. Cybernetic Vision Grid Overlay */}
+
+
+ {/* 3. Corner Targeting Reticles */}
+
+
+
+
+
+ {/* 4. Central Holographic HUD Card */}
+
+
+ {/* Top Badges */}
+
+
+
+ GPU Tensor Model
+
+
+ {elapsedSec.toFixed(1)}s
+
+
+
+ {/* Radar Spinner & Icon */}
+
+ {/* Outer glowing pulsed ring */}
+
+ {/* Rotating gradient track */}
+
+ {/* Inner pulsating core */}
+
+
+
+
+
+ {/* Dynamic Stage Title & Progress */}
+
+
+
+
+ Processing {toolName}
+
+ {progress}%
+
+
+ {/* Glowing Animated Progress Bar */}
+
+
+ {/* Current Step Description */}
+
+ {stages[currentStageIdx]}
+
+
+
+ {/* Reassurance Footer */}
+
+
+ Volatile GPU RAM Execution · Zero Server Storage
+
+
+
+
+ );
+}
diff --git a/src/lib/api/mockEngine.ts b/src/lib/api/mockEngine.ts
index 1aae3af..f13e886 100644
--- a/src/lib/api/mockEngine.ts
+++ b/src/lib/api/mockEngine.ts
@@ -7,8 +7,8 @@ export async function generateMockNeuralResult(
toolId: string,
variantId?: string
): Promise<{ buffer: Buffer; contentType: string }> {
- // Simulate 350ms neural inference latency
- await new Promise((resolve) => setTimeout(resolve, 350));
+ // Simulate realistic 1600ms neural inference latency to showcase laser scanning HUD
+ await new Promise((resolve) => setTimeout(resolve, 1600));
// If buffer is a small text seed (e.g. text-to-image), create a valid synthetic image buffer
if (imageBuffer.length < 500) {