mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
Add tool metadata to shared constants and i18n entries across all 21 locales for the new HTML to Image screenshot tool.
1261 lines
29 KiB
TypeScript
1261 lines
29 KiB
TypeScript
import type { CategoryInfo, SocialMediaPreset, Tool } from "./types.js";
|
|
|
|
export const CATEGORIES: CategoryInfo[] = [
|
|
{ id: "essentials", name: "Essentials", icon: "Layers", color: "#3B82F6" },
|
|
{ id: "optimization", name: "Optimization", icon: "Zap", color: "#10B981" },
|
|
{ id: "adjustments", name: "Adjustments", icon: "SlidersHorizontal", color: "#8B5CF6" },
|
|
{ id: "watermark", name: "Watermark & Overlay", icon: "Stamp", color: "#EF4444" },
|
|
{ id: "utilities", name: "Utilities", icon: "Wrench", color: "#6366F1" },
|
|
{ id: "layout", name: "Layout & Composition", icon: "LayoutGrid", color: "#EC4899" },
|
|
{ id: "format", name: "Format & Conversion", icon: "FileType", color: "#14B8A6" },
|
|
{ id: "ai", name: "AI Tools", icon: "Sparkles", color: "#F59E0B" },
|
|
];
|
|
|
|
export const TOOLS: Tool[] = [
|
|
// Essentials
|
|
{
|
|
id: "resize",
|
|
name: "Resize",
|
|
description: "Resize by pixels, percentage, or social media presets",
|
|
category: "essentials",
|
|
icon: "Maximize2",
|
|
route: "/resize",
|
|
},
|
|
{
|
|
id: "crop",
|
|
name: "Crop",
|
|
description: "Freeform crop, aspect ratio presets, shape crop",
|
|
category: "essentials",
|
|
icon: "Crop",
|
|
route: "/crop",
|
|
},
|
|
{
|
|
id: "rotate",
|
|
name: "Rotate & Flip",
|
|
description: "Rotate, flip, and straighten images",
|
|
category: "essentials",
|
|
icon: "RotateCw",
|
|
route: "/rotate",
|
|
},
|
|
{
|
|
id: "convert",
|
|
name: "Convert",
|
|
description: "Convert between image formats",
|
|
category: "essentials",
|
|
icon: "FileOutput",
|
|
route: "/convert",
|
|
},
|
|
{
|
|
id: "compress",
|
|
name: "Compress",
|
|
description: "Reduce file size by quality or target size",
|
|
category: "essentials",
|
|
icon: "Minimize2",
|
|
route: "/compress",
|
|
},
|
|
// Optimization
|
|
{
|
|
id: "optimize-for-web",
|
|
name: "Optimize for Web",
|
|
description:
|
|
"Optimize images for web with format conversion, quality control, and live preview",
|
|
category: "optimization",
|
|
icon: "Globe",
|
|
route: "/optimize-for-web",
|
|
},
|
|
{
|
|
id: "strip-metadata",
|
|
name: "Remove Metadata",
|
|
description: "Remove EXIF, GPS, and camera info",
|
|
category: "optimization",
|
|
icon: "ShieldOff",
|
|
route: "/strip-metadata",
|
|
},
|
|
{
|
|
id: "edit-metadata",
|
|
name: "Edit Metadata",
|
|
description: "Edit EXIF, GPS, and camera info",
|
|
category: "optimization",
|
|
icon: "PenLine",
|
|
route: "/edit-metadata",
|
|
},
|
|
{
|
|
id: "bulk-rename",
|
|
name: "Bulk Rename",
|
|
description: "Rename multiple files with patterns",
|
|
category: "optimization",
|
|
icon: "FilePen",
|
|
route: "/bulk-rename",
|
|
},
|
|
{
|
|
id: "image-to-pdf",
|
|
name: "Image to PDF",
|
|
description: "Combine images into a PDF document",
|
|
category: "optimization",
|
|
icon: "FileText",
|
|
route: "/image-to-pdf",
|
|
},
|
|
{
|
|
id: "favicon",
|
|
name: "Favicon Generator",
|
|
description: "Generate all favicon and app icon sizes",
|
|
category: "optimization",
|
|
icon: "AppWindow",
|
|
route: "/favicon",
|
|
},
|
|
// Adjustments
|
|
{
|
|
id: "adjust-colors",
|
|
name: "Adjust Colors",
|
|
description: "Brightness, contrast, exposure, saturation, temperature, sharpness, and effects",
|
|
category: "adjustments",
|
|
icon: "SlidersHorizontal",
|
|
route: "/adjust-colors",
|
|
},
|
|
{
|
|
id: "sharpening",
|
|
name: "Sharpening",
|
|
description: "Adaptive, unsharp mask, and high-pass sharpening with presets",
|
|
category: "adjustments",
|
|
icon: "Focus",
|
|
route: "/sharpening",
|
|
},
|
|
{
|
|
id: "replace-color",
|
|
name: "Replace & Invert Color",
|
|
description: "Replace specific colors or invert",
|
|
category: "adjustments",
|
|
icon: "Pipette",
|
|
route: "/replace-color",
|
|
},
|
|
{
|
|
id: "color-blindness",
|
|
name: "Color Blindness Simulation",
|
|
description: "Simulate how images appear with color vision deficiency",
|
|
category: "adjustments",
|
|
icon: "Eye",
|
|
route: "/color-blindness",
|
|
},
|
|
// AI Tools
|
|
{
|
|
id: "remove-background",
|
|
name: "Remove Background",
|
|
description: "AI-powered background removal",
|
|
category: "ai",
|
|
icon: "Eraser",
|
|
route: "/remove-background",
|
|
},
|
|
{
|
|
id: "upscale",
|
|
name: "Image Upscaling",
|
|
description: "AI super-resolution enhancement",
|
|
category: "ai",
|
|
icon: "ZoomIn",
|
|
route: "/upscale",
|
|
},
|
|
{
|
|
id: "erase-object",
|
|
name: "Object Eraser",
|
|
description: "Remove unwanted objects with AI",
|
|
category: "ai",
|
|
icon: "Wand",
|
|
route: "/erase-object",
|
|
},
|
|
{
|
|
id: "ocr",
|
|
name: "OCR / Text Extraction",
|
|
description: "Extract text from images",
|
|
category: "ai",
|
|
icon: "ScanText",
|
|
route: "/ocr",
|
|
},
|
|
{
|
|
id: "blur-faces",
|
|
name: "Face / PII Blur",
|
|
description: "Auto-detect and blur faces and sensitive info",
|
|
category: "ai",
|
|
icon: "EyeOff",
|
|
route: "/blur-faces",
|
|
},
|
|
{
|
|
id: "smart-crop",
|
|
name: "Smart Crop",
|
|
description: "Smart subject, face, or trim-based cropping",
|
|
category: "ai",
|
|
icon: "Crosshair",
|
|
route: "/smart-crop",
|
|
},
|
|
{
|
|
id: "image-enhancement",
|
|
name: "Image Enhancement",
|
|
description: "One-click auto-improve with smart analysis",
|
|
category: "ai",
|
|
icon: "Sparkles",
|
|
route: "/image-enhancement",
|
|
},
|
|
{
|
|
id: "enhance-faces",
|
|
name: "Face Enhancement",
|
|
description: "Restore and enhance faces with AI",
|
|
category: "ai",
|
|
icon: "ScanFace",
|
|
route: "/enhance-faces",
|
|
},
|
|
{
|
|
id: "colorize",
|
|
name: "AI Colorization",
|
|
description: "Convert B&W photos to full color with AI",
|
|
category: "ai",
|
|
icon: "Palette",
|
|
route: "/colorize",
|
|
},
|
|
{
|
|
id: "noise-removal",
|
|
name: "Noise Removal",
|
|
description: "AI-powered noise and grain removal",
|
|
category: "ai",
|
|
icon: "AudioLines",
|
|
route: "/noise-removal",
|
|
},
|
|
{
|
|
id: "red-eye-removal",
|
|
name: "Red Eye Removal",
|
|
description: "AI-detect and fix red eye in flash photos",
|
|
category: "ai",
|
|
icon: "ScanEye",
|
|
route: "/red-eye-removal",
|
|
},
|
|
{
|
|
id: "restore-photo",
|
|
name: "Photo Restoration",
|
|
description: "Fix scratches, tears, and damage on old photos with AI",
|
|
category: "ai",
|
|
icon: "Undo2",
|
|
route: "/restore-photo",
|
|
},
|
|
{
|
|
id: "passport-photo",
|
|
name: "Passport Photo",
|
|
description: "AI-powered passport and ID photo generator",
|
|
category: "ai",
|
|
icon: "UserCheck",
|
|
route: "/passport-photo",
|
|
},
|
|
{
|
|
id: "content-aware-resize",
|
|
name: "Content-Aware Resize",
|
|
description: "Seam carving resize that preserves important content with face protection",
|
|
category: "ai",
|
|
icon: "Scaling",
|
|
route: "/content-aware-resize",
|
|
},
|
|
{
|
|
id: "ai-canvas-expand",
|
|
name: "AI Canvas Expand",
|
|
description: "Expand canvas with AI-powered fill",
|
|
category: "ai",
|
|
icon: "Expand",
|
|
route: "/ai-canvas-expand",
|
|
},
|
|
{
|
|
id: "transparency-fixer",
|
|
name: "PNG Transparency Fixer",
|
|
description: "Fix fake transparent PNGs in one click",
|
|
category: "ai",
|
|
icon: "ShieldCheck",
|
|
route: "/transparency-fixer",
|
|
},
|
|
// Watermark & Overlay
|
|
{
|
|
id: "watermark-text",
|
|
name: "Text Watermark",
|
|
description: "Add text watermark overlay",
|
|
category: "watermark",
|
|
icon: "Type",
|
|
route: "/watermark-text",
|
|
},
|
|
{
|
|
id: "watermark-image",
|
|
name: "Image Watermark",
|
|
description: "Overlay a logo as watermark",
|
|
category: "watermark",
|
|
icon: "Image",
|
|
route: "/watermark-image",
|
|
},
|
|
{
|
|
id: "text-overlay",
|
|
name: "Text Overlay",
|
|
description: "Add styled text to images",
|
|
category: "watermark",
|
|
icon: "TextCursorInput",
|
|
route: "/text-overlay",
|
|
},
|
|
{
|
|
id: "compose",
|
|
name: "Image Composition",
|
|
description: "Layer images with position and opacity",
|
|
category: "watermark",
|
|
icon: "Layers",
|
|
route: "/compose",
|
|
},
|
|
{
|
|
id: "meme-generator",
|
|
name: "Meme Generator",
|
|
description: "Create memes with templates and custom text",
|
|
category: "watermark",
|
|
icon: "Laugh",
|
|
route: "/meme-generator",
|
|
},
|
|
// Utilities
|
|
{
|
|
id: "info",
|
|
name: "Image Info",
|
|
description: "View all metadata and image properties",
|
|
category: "utilities",
|
|
icon: "Info",
|
|
route: "/info",
|
|
},
|
|
{
|
|
id: "compare",
|
|
name: "Image Compare",
|
|
description: "Side-by-side comparison of two images",
|
|
category: "utilities",
|
|
icon: "Columns2",
|
|
route: "/compare",
|
|
},
|
|
{
|
|
id: "find-duplicates",
|
|
name: "Find Duplicates",
|
|
description: "Detect duplicate and near-duplicate images",
|
|
category: "utilities",
|
|
icon: "Copy",
|
|
route: "/find-duplicates",
|
|
},
|
|
{
|
|
id: "color-palette",
|
|
name: "Color Palette",
|
|
description: "Extract dominant colors from image",
|
|
category: "utilities",
|
|
icon: "Droplets",
|
|
route: "/color-palette",
|
|
},
|
|
{
|
|
id: "qr-generate",
|
|
name: "QR Code Generator",
|
|
description: "Generate styled QR codes with custom colors, patterns, and logos",
|
|
category: "utilities",
|
|
icon: "QrCode",
|
|
route: "/qr-generate",
|
|
},
|
|
{
|
|
id: "html-to-image",
|
|
name: "HTML to Image",
|
|
description: "Capture webpages as high-quality images",
|
|
category: "utilities",
|
|
icon: "Globe",
|
|
route: "/html-to-image",
|
|
},
|
|
{
|
|
id: "barcode-read",
|
|
name: "Barcode Reader",
|
|
description: "Scan images for QR codes, barcodes, and 2D codes",
|
|
category: "utilities",
|
|
icon: "ScanLine",
|
|
route: "/barcode-read",
|
|
},
|
|
{
|
|
id: "image-to-base64",
|
|
name: "Image to Base64",
|
|
description: "Convert images to base64 strings for embedding in HTML, CSS, and more",
|
|
category: "utilities",
|
|
icon: "Code",
|
|
route: "/image-to-base64",
|
|
},
|
|
// Layout & Composition
|
|
{
|
|
id: "collage",
|
|
name: "Collage / Grid",
|
|
description: "Combine images into beautiful grid collages with 25+ templates",
|
|
category: "layout",
|
|
icon: "LayoutGrid",
|
|
route: "/collage",
|
|
},
|
|
{
|
|
id: "stitch",
|
|
name: "Stitch / Combine",
|
|
description: "Join images side by side, stacked, or in a grid",
|
|
category: "layout",
|
|
icon: "Columns2",
|
|
route: "/stitch",
|
|
},
|
|
{
|
|
id: "split",
|
|
name: "Image Splitting",
|
|
description: "Split images into grid tiles or by pixel size with live preview",
|
|
category: "layout",
|
|
icon: "Grid3x3",
|
|
route: "/split",
|
|
},
|
|
{
|
|
id: "border",
|
|
name: "Border & Frame",
|
|
description: "Add borders, rounded corners, shadows",
|
|
category: "layout",
|
|
icon: "Frame",
|
|
route: "/border",
|
|
},
|
|
{
|
|
id: "beautify",
|
|
name: "Beautify Screenshot",
|
|
description: "Add gradient backgrounds, device frames, shadows, and social media sizing",
|
|
category: "layout",
|
|
icon: "ImagePlus",
|
|
route: "/beautify",
|
|
},
|
|
// Format & Conversion
|
|
{
|
|
id: "svg-to-raster",
|
|
name: "SVG to Raster",
|
|
description: "Convert SVG to PNG, JPEG, WebP, AVIF, TIFF, GIF, or HEIF at custom scale and DPI",
|
|
category: "format",
|
|
icon: "FileImage",
|
|
route: "/svg-to-raster",
|
|
},
|
|
{
|
|
id: "vectorize",
|
|
name: "Image to SVG",
|
|
description: "Vectorize images using tracing",
|
|
category: "format",
|
|
icon: "PenTool",
|
|
route: "/vectorize",
|
|
},
|
|
{
|
|
id: "gif-tools",
|
|
name: "GIF Tools",
|
|
description:
|
|
"Resize, optimize, change speed, reverse, extract frames, and rotate animated GIFs",
|
|
category: "format",
|
|
icon: "Film",
|
|
route: "/gif-tools",
|
|
},
|
|
{
|
|
id: "pdf-to-image",
|
|
name: "PDF to Image",
|
|
description: "Convert PDF pages to images",
|
|
category: "format",
|
|
icon: "BookImage",
|
|
route: "/pdf-to-image",
|
|
},
|
|
];
|
|
|
|
export const SOCIAL_MEDIA_PRESETS: SocialMediaPreset[] = [
|
|
{ platform: "Instagram", name: "Post (Square)", width: 1080, height: 1080 },
|
|
{ platform: "Instagram", name: "Story / Reel", width: 1080, height: 1920 },
|
|
{ platform: "Instagram", name: "Profile Picture", width: 320, height: 320 },
|
|
{ platform: "Instagram", name: "Landscape Post", width: 1080, height: 566 },
|
|
{ platform: "Instagram", name: "Portrait Post", width: 1080, height: 1350 },
|
|
{ platform: "Twitter/X", name: "Post Image", width: 1200, height: 675 },
|
|
{ platform: "Twitter/X", name: "Header", width: 1500, height: 500 },
|
|
{ platform: "Twitter/X", name: "Profile Picture", width: 400, height: 400 },
|
|
{ platform: "Facebook", name: "Post Image", width: 1200, height: 630 },
|
|
{ platform: "Facebook", name: "Cover Photo", width: 820, height: 312 },
|
|
{ platform: "Facebook", name: "Profile Picture", width: 170, height: 170 },
|
|
{ platform: "Facebook", name: "Event Cover", width: 1920, height: 1005 },
|
|
{ platform: "YouTube", name: "Thumbnail", width: 1280, height: 720 },
|
|
{ platform: "YouTube", name: "Channel Banner", width: 2560, height: 1440 },
|
|
{ platform: "YouTube", name: "Profile Picture", width: 800, height: 800 },
|
|
{ platform: "LinkedIn", name: "Post Image", width: 1200, height: 627 },
|
|
{ platform: "LinkedIn", name: "Banner", width: 1584, height: 396 },
|
|
{ platform: "LinkedIn", name: "Profile Picture", width: 400, height: 400 },
|
|
{ platform: "TikTok", name: "Video Cover", width: 1080, height: 1920 },
|
|
{ platform: "TikTok", name: "Profile Picture", width: 200, height: 200 },
|
|
{ platform: "WhatsApp", name: "Profile Picture", width: 500, height: 500 },
|
|
{ platform: "Pinterest", name: "Pin", width: 1000, height: 1500 },
|
|
{ platform: "Threads", name: "Post Image", width: 1080, height: 1080 },
|
|
];
|
|
|
|
export interface SmartCropFacePreset {
|
|
id: string;
|
|
label: string;
|
|
multiplier: number;
|
|
}
|
|
|
|
export const SMART_CROP_FACE_PRESETS: SmartCropFacePreset[] = [
|
|
{ id: "closeup", label: "Close-up", multiplier: 1.8 },
|
|
{ id: "head-shoulders", label: "Head & Shoulders", multiplier: 2.8 },
|
|
{ id: "upper-body", label: "Upper Body", multiplier: 4.5 },
|
|
{ id: "half-body", label: "Half Body", multiplier: 7.0 },
|
|
];
|
|
|
|
// ---------------------------------------------------------------------------
|
|
// Passport / ID Photo Specs
|
|
// ---------------------------------------------------------------------------
|
|
|
|
export type PassportRegion = "americas" | "europe" | "asia" | "africa" | "oceania" | "middle-east";
|
|
|
|
export interface PassportDocumentSpec {
|
|
type: string;
|
|
label: string;
|
|
width: number; // mm
|
|
height: number; // mm
|
|
dpi: number;
|
|
headHeightMin: number; // fraction of photo height
|
|
headHeightMax: number; // fraction of photo height
|
|
eyeLineFromBottom: number; // fraction of photo height
|
|
bgColor: string; // default background hex
|
|
bgColors: string[]; // allowed background colors
|
|
}
|
|
|
|
export interface PassportSpec {
|
|
code: string;
|
|
name: string;
|
|
flag: string;
|
|
region: PassportRegion;
|
|
documents: PassportDocumentSpec[];
|
|
}
|
|
|
|
export const PASSPORT_SPECS: PassportSpec[] = [
|
|
// Americas
|
|
{
|
|
code: "US",
|
|
name: "United States",
|
|
flag: "🇺🇸",
|
|
region: "americas",
|
|
documents: [
|
|
{
|
|
type: "passport",
|
|
label: "US Passport",
|
|
width: 51,
|
|
height: 51,
|
|
dpi: 300,
|
|
headHeightMin: 0.5,
|
|
headHeightMax: 0.69,
|
|
eyeLineFromBottom: 0.56,
|
|
bgColor: "#FFFFFF",
|
|
bgColors: ["#FFFFFF"],
|
|
},
|
|
],
|
|
},
|
|
{
|
|
code: "CA",
|
|
name: "Canada",
|
|
flag: "🇨🇦",
|
|
region: "americas",
|
|
documents: [
|
|
{
|
|
type: "passport",
|
|
label: "Canadian Passport",
|
|
width: 50,
|
|
height: 70,
|
|
dpi: 300,
|
|
headHeightMin: 0.44,
|
|
headHeightMax: 0.51,
|
|
eyeLineFromBottom: 0.55,
|
|
bgColor: "#FFFFFF",
|
|
bgColors: ["#FFFFFF"],
|
|
},
|
|
],
|
|
},
|
|
{
|
|
code: "BR",
|
|
name: "Brazil",
|
|
flag: "🇧🇷",
|
|
region: "americas",
|
|
documents: [
|
|
{
|
|
type: "passport",
|
|
label: "Brazilian Passport",
|
|
width: 50,
|
|
height: 70,
|
|
dpi: 300,
|
|
headHeightMin: 0.5,
|
|
headHeightMax: 0.69,
|
|
eyeLineFromBottom: 0.56,
|
|
bgColor: "#FFFFFF",
|
|
bgColors: ["#FFFFFF"],
|
|
},
|
|
],
|
|
},
|
|
{
|
|
code: "MX",
|
|
name: "Mexico",
|
|
flag: "🇲🇽",
|
|
region: "americas",
|
|
documents: [
|
|
{
|
|
type: "passport",
|
|
label: "Mexican Passport",
|
|
width: 35,
|
|
height: 45,
|
|
dpi: 300,
|
|
headHeightMin: 0.7,
|
|
headHeightMax: 0.8,
|
|
eyeLineFromBottom: 0.63,
|
|
bgColor: "#FFFFFF",
|
|
bgColors: ["#FFFFFF"],
|
|
},
|
|
],
|
|
},
|
|
// Europe
|
|
{
|
|
code: "GB",
|
|
name: "United Kingdom",
|
|
flag: "🇬🇧",
|
|
region: "europe",
|
|
documents: [
|
|
{
|
|
type: "passport",
|
|
label: "UK Passport",
|
|
width: 35,
|
|
height: 45,
|
|
dpi: 300,
|
|
headHeightMin: 0.7,
|
|
headHeightMax: 0.8,
|
|
eyeLineFromBottom: 0.63,
|
|
bgColor: "#D4D4D4",
|
|
bgColors: ["#D4D4D4"],
|
|
},
|
|
],
|
|
},
|
|
{
|
|
code: "EU",
|
|
name: "European Union",
|
|
flag: "🇪🇺",
|
|
region: "europe",
|
|
documents: [
|
|
{
|
|
type: "passport",
|
|
label: "EU Passport (ICAO)",
|
|
width: 35,
|
|
height: 45,
|
|
dpi: 300,
|
|
headHeightMin: 0.7,
|
|
headHeightMax: 0.8,
|
|
eyeLineFromBottom: 0.63,
|
|
bgColor: "#FFFFFF",
|
|
bgColors: ["#FFFFFF", "#D4D4D4"],
|
|
},
|
|
],
|
|
},
|
|
{
|
|
code: "DE",
|
|
name: "Germany",
|
|
flag: "🇩🇪",
|
|
region: "europe",
|
|
documents: [
|
|
{
|
|
type: "passport",
|
|
label: "German Passport",
|
|
width: 35,
|
|
height: 45,
|
|
dpi: 300,
|
|
headHeightMin: 0.7,
|
|
headHeightMax: 0.8,
|
|
eyeLineFromBottom: 0.63,
|
|
bgColor: "#D4D4D4",
|
|
bgColors: ["#D4D4D4"],
|
|
},
|
|
],
|
|
},
|
|
{
|
|
code: "FR",
|
|
name: "France",
|
|
flag: "🇫🇷",
|
|
region: "europe",
|
|
documents: [
|
|
{
|
|
type: "passport",
|
|
label: "French Passport",
|
|
width: 35,
|
|
height: 45,
|
|
dpi: 300,
|
|
headHeightMin: 0.7,
|
|
headHeightMax: 0.8,
|
|
eyeLineFromBottom: 0.63,
|
|
bgColor: "#D4D4D4",
|
|
bgColors: ["#D4D4D4", "#BFDBFE"],
|
|
},
|
|
],
|
|
},
|
|
{
|
|
code: "RU",
|
|
name: "Russia",
|
|
flag: "🇷🇺",
|
|
region: "europe",
|
|
documents: [
|
|
{
|
|
type: "passport",
|
|
label: "Russian Passport",
|
|
width: 35,
|
|
height: 45,
|
|
dpi: 300,
|
|
headHeightMin: 0.7,
|
|
headHeightMax: 0.8,
|
|
eyeLineFromBottom: 0.63,
|
|
bgColor: "#FFFFFF",
|
|
bgColors: ["#FFFFFF"],
|
|
},
|
|
],
|
|
},
|
|
{
|
|
code: "TR",
|
|
name: "Turkey",
|
|
flag: "🇹🇷",
|
|
region: "europe",
|
|
documents: [
|
|
{
|
|
type: "passport",
|
|
label: "Turkish Passport",
|
|
width: 50,
|
|
height: 60,
|
|
dpi: 300,
|
|
headHeightMin: 0.7,
|
|
headHeightMax: 0.8,
|
|
eyeLineFromBottom: 0.63,
|
|
bgColor: "#FFFFFF",
|
|
bgColors: ["#FFFFFF"],
|
|
},
|
|
],
|
|
},
|
|
{
|
|
code: "IE",
|
|
name: "Ireland",
|
|
flag: "\u{1F1EE}\u{1F1EA}",
|
|
region: "europe",
|
|
documents: [
|
|
{
|
|
type: "passport",
|
|
label: "Irish Passport",
|
|
width: 35,
|
|
height: 45,
|
|
dpi: 300,
|
|
headHeightMin: 0.7,
|
|
headHeightMax: 0.8,
|
|
eyeLineFromBottom: 0.63,
|
|
bgColor: "#FFFFFF",
|
|
bgColors: ["#FFFFFF"],
|
|
},
|
|
],
|
|
},
|
|
{
|
|
code: "IT",
|
|
name: "Italy",
|
|
flag: "\u{1F1EE}\u{1F1F9}",
|
|
region: "europe",
|
|
documents: [
|
|
{
|
|
type: "passport",
|
|
label: "Italian Passport",
|
|
width: 35,
|
|
height: 45,
|
|
dpi: 300,
|
|
headHeightMin: 0.7,
|
|
headHeightMax: 0.8,
|
|
eyeLineFromBottom: 0.63,
|
|
bgColor: "#FFFFFF",
|
|
bgColors: ["#FFFFFF"],
|
|
},
|
|
],
|
|
},
|
|
{
|
|
code: "ES",
|
|
name: "Spain",
|
|
flag: "\u{1F1EA}\u{1F1F8}",
|
|
region: "europe",
|
|
documents: [
|
|
{
|
|
type: "passport",
|
|
label: "Spanish Passport",
|
|
width: 26,
|
|
height: 32,
|
|
dpi: 300,
|
|
headHeightMin: 0.7,
|
|
headHeightMax: 0.8,
|
|
eyeLineFromBottom: 0.63,
|
|
bgColor: "#FFFFFF",
|
|
bgColors: ["#FFFFFF"],
|
|
},
|
|
],
|
|
},
|
|
{
|
|
code: "NL",
|
|
name: "Netherlands",
|
|
flag: "\u{1F1F3}\u{1F1F1}",
|
|
region: "europe",
|
|
documents: [
|
|
{
|
|
type: "passport",
|
|
label: "Dutch Passport",
|
|
width: 35,
|
|
height: 45,
|
|
dpi: 300,
|
|
headHeightMin: 0.7,
|
|
headHeightMax: 0.8,
|
|
eyeLineFromBottom: 0.63,
|
|
bgColor: "#FFFFFF",
|
|
bgColors: ["#FFFFFF"],
|
|
},
|
|
],
|
|
},
|
|
{
|
|
code: "PL",
|
|
name: "Poland",
|
|
flag: "\u{1F1F5}\u{1F1F1}",
|
|
region: "europe",
|
|
documents: [
|
|
{
|
|
type: "passport",
|
|
label: "Polish Passport",
|
|
width: 35,
|
|
height: 45,
|
|
dpi: 300,
|
|
headHeightMin: 0.7,
|
|
headHeightMax: 0.8,
|
|
eyeLineFromBottom: 0.63,
|
|
bgColor: "#FFFFFF",
|
|
bgColors: ["#FFFFFF"],
|
|
},
|
|
],
|
|
},
|
|
{
|
|
code: "SE",
|
|
name: "Sweden",
|
|
flag: "\u{1F1F8}\u{1F1EA}",
|
|
region: "europe",
|
|
documents: [
|
|
{
|
|
type: "passport",
|
|
label: "Swedish Passport",
|
|
width: 35,
|
|
height: 45,
|
|
dpi: 300,
|
|
headHeightMin: 0.7,
|
|
headHeightMax: 0.8,
|
|
eyeLineFromBottom: 0.63,
|
|
bgColor: "#FFFFFF",
|
|
bgColors: ["#FFFFFF"],
|
|
},
|
|
],
|
|
},
|
|
// Asia
|
|
{
|
|
code: "IN",
|
|
name: "India",
|
|
flag: "🇮🇳",
|
|
region: "asia",
|
|
documents: [
|
|
{
|
|
type: "passport",
|
|
label: "Indian Passport",
|
|
width: 51,
|
|
height: 51,
|
|
dpi: 300,
|
|
headHeightMin: 0.5,
|
|
headHeightMax: 0.69,
|
|
eyeLineFromBottom: 0.56,
|
|
bgColor: "#FFFFFF",
|
|
bgColors: ["#FFFFFF"],
|
|
},
|
|
],
|
|
},
|
|
{
|
|
code: "CN",
|
|
name: "China",
|
|
flag: "🇨🇳",
|
|
region: "asia",
|
|
documents: [
|
|
{
|
|
type: "passport",
|
|
label: "Chinese Passport",
|
|
width: 33,
|
|
height: 48,
|
|
dpi: 300,
|
|
headHeightMin: 0.7,
|
|
headHeightMax: 0.8,
|
|
eyeLineFromBottom: 0.63,
|
|
bgColor: "#FFFFFF",
|
|
bgColors: ["#FFFFFF"],
|
|
},
|
|
],
|
|
},
|
|
{
|
|
code: "JP",
|
|
name: "Japan",
|
|
flag: "🇯🇵",
|
|
region: "asia",
|
|
documents: [
|
|
{
|
|
type: "passport",
|
|
label: "Japanese Passport",
|
|
width: 35,
|
|
height: 45,
|
|
dpi: 300,
|
|
headHeightMin: 0.7,
|
|
headHeightMax: 0.8,
|
|
eyeLineFromBottom: 0.63,
|
|
bgColor: "#FFFFFF",
|
|
bgColors: ["#FFFFFF"],
|
|
},
|
|
],
|
|
},
|
|
{
|
|
code: "KR",
|
|
name: "South Korea",
|
|
flag: "🇰🇷",
|
|
region: "asia",
|
|
documents: [
|
|
{
|
|
type: "passport",
|
|
label: "Korean Passport",
|
|
width: 35,
|
|
height: 45,
|
|
dpi: 300,
|
|
headHeightMin: 0.7,
|
|
headHeightMax: 0.8,
|
|
eyeLineFromBottom: 0.63,
|
|
bgColor: "#FFFFFF",
|
|
bgColors: ["#FFFFFF"],
|
|
},
|
|
],
|
|
},
|
|
{
|
|
code: "TH",
|
|
name: "Thailand",
|
|
flag: "🇹🇭",
|
|
region: "asia",
|
|
documents: [
|
|
{
|
|
type: "passport",
|
|
label: "Thai Passport",
|
|
width: 35,
|
|
height: 45,
|
|
dpi: 300,
|
|
headHeightMin: 0.7,
|
|
headHeightMax: 0.8,
|
|
eyeLineFromBottom: 0.63,
|
|
bgColor: "#FFFFFF",
|
|
bgColors: ["#FFFFFF"],
|
|
},
|
|
],
|
|
},
|
|
{
|
|
code: "PH",
|
|
name: "Philippines",
|
|
flag: "🇵🇭",
|
|
region: "asia",
|
|
documents: [
|
|
{
|
|
type: "passport",
|
|
label: "Philippine Passport",
|
|
width: 35,
|
|
height: 45,
|
|
dpi: 300,
|
|
headHeightMin: 0.7,
|
|
headHeightMax: 0.8,
|
|
eyeLineFromBottom: 0.63,
|
|
bgColor: "#FFFFFF",
|
|
bgColors: ["#FFFFFF"],
|
|
},
|
|
],
|
|
},
|
|
{
|
|
code: "ID",
|
|
name: "Indonesia",
|
|
flag: "🇮🇩",
|
|
region: "asia",
|
|
documents: [
|
|
{
|
|
type: "passport",
|
|
label: "Indonesian Passport",
|
|
width: 30,
|
|
height: 40,
|
|
dpi: 300,
|
|
headHeightMin: 0.7,
|
|
headHeightMax: 0.8,
|
|
eyeLineFromBottom: 0.63,
|
|
bgColor: "#EF4444",
|
|
bgColors: ["#EF4444"],
|
|
},
|
|
],
|
|
},
|
|
{
|
|
code: "SG",
|
|
name: "Singapore",
|
|
flag: "\u{1F1F8}\u{1F1EC}",
|
|
region: "asia",
|
|
documents: [
|
|
{
|
|
type: "passport",
|
|
label: "Singapore Passport",
|
|
width: 35,
|
|
height: 45,
|
|
dpi: 300,
|
|
headHeightMin: 0.7,
|
|
headHeightMax: 0.8,
|
|
eyeLineFromBottom: 0.63,
|
|
bgColor: "#FFFFFF",
|
|
bgColors: ["#FFFFFF"],
|
|
},
|
|
],
|
|
},
|
|
{
|
|
code: "MY",
|
|
name: "Malaysia",
|
|
flag: "\u{1F1F2}\u{1F1FE}",
|
|
region: "asia",
|
|
documents: [
|
|
{
|
|
type: "passport",
|
|
label: "Malaysian Passport",
|
|
width: 35,
|
|
height: 50,
|
|
dpi: 300,
|
|
headHeightMin: 0.7,
|
|
headHeightMax: 0.8,
|
|
eyeLineFromBottom: 0.63,
|
|
bgColor: "#FFFFFF",
|
|
bgColors: ["#FFFFFF"],
|
|
},
|
|
],
|
|
},
|
|
{
|
|
code: "VN",
|
|
name: "Vietnam",
|
|
flag: "\u{1F1FB}\u{1F1F3}",
|
|
region: "asia",
|
|
documents: [
|
|
{
|
|
type: "passport",
|
|
label: "Vietnamese Passport",
|
|
width: 40,
|
|
height: 60,
|
|
dpi: 300,
|
|
headHeightMin: 0.7,
|
|
headHeightMax: 0.8,
|
|
eyeLineFromBottom: 0.63,
|
|
bgColor: "#FFFFFF",
|
|
bgColors: ["#FFFFFF"],
|
|
},
|
|
],
|
|
},
|
|
{
|
|
code: "PK",
|
|
name: "Pakistan",
|
|
flag: "\u{1F1F5}\u{1F1F0}",
|
|
region: "asia",
|
|
documents: [
|
|
{
|
|
type: "passport",
|
|
label: "Pakistani Passport",
|
|
width: 35,
|
|
height: 45,
|
|
dpi: 300,
|
|
headHeightMin: 0.7,
|
|
headHeightMax: 0.8,
|
|
eyeLineFromBottom: 0.63,
|
|
bgColor: "#FFFFFF",
|
|
bgColors: ["#FFFFFF", "#BFDBFE"],
|
|
},
|
|
],
|
|
},
|
|
{
|
|
code: "BD",
|
|
name: "Bangladesh",
|
|
flag: "\u{1F1E7}\u{1F1E9}",
|
|
region: "asia",
|
|
documents: [
|
|
{
|
|
type: "passport",
|
|
label: "Bangladeshi Passport",
|
|
width: 35,
|
|
height: 45,
|
|
dpi: 300,
|
|
headHeightMin: 0.7,
|
|
headHeightMax: 0.8,
|
|
eyeLineFromBottom: 0.63,
|
|
bgColor: "#FFFFFF",
|
|
bgColors: ["#FFFFFF"],
|
|
},
|
|
],
|
|
},
|
|
// Oceania
|
|
{
|
|
code: "AU",
|
|
name: "Australia",
|
|
flag: "🇦🇺",
|
|
region: "oceania",
|
|
documents: [
|
|
{
|
|
type: "passport",
|
|
label: "Australian Passport",
|
|
width: 35,
|
|
height: 45,
|
|
dpi: 300,
|
|
headHeightMin: 0.7,
|
|
headHeightMax: 0.8,
|
|
eyeLineFromBottom: 0.63,
|
|
bgColor: "#FFFFFF",
|
|
bgColors: ["#FFFFFF"],
|
|
},
|
|
],
|
|
},
|
|
{
|
|
code: "NZ",
|
|
name: "New Zealand",
|
|
flag: "\u{1F1F3}\u{1F1FF}",
|
|
region: "oceania",
|
|
documents: [
|
|
{
|
|
type: "passport",
|
|
label: "New Zealand Passport",
|
|
width: 35,
|
|
height: 45,
|
|
dpi: 300,
|
|
headHeightMin: 0.7,
|
|
headHeightMax: 0.8,
|
|
eyeLineFromBottom: 0.63,
|
|
bgColor: "#FFFFFF",
|
|
bgColors: ["#FFFFFF"],
|
|
},
|
|
],
|
|
},
|
|
// Middle East
|
|
{
|
|
code: "SA",
|
|
name: "Saudi Arabia",
|
|
flag: "🇸🇦",
|
|
region: "middle-east",
|
|
documents: [
|
|
{
|
|
type: "passport",
|
|
label: "Saudi Passport",
|
|
width: 40,
|
|
height: 60,
|
|
dpi: 300,
|
|
headHeightMin: 0.7,
|
|
headHeightMax: 0.8,
|
|
eyeLineFromBottom: 0.63,
|
|
bgColor: "#FFFFFF",
|
|
bgColors: ["#FFFFFF"],
|
|
},
|
|
],
|
|
},
|
|
{
|
|
code: "AE",
|
|
name: "United Arab Emirates",
|
|
flag: "\u{1F1E6}\u{1F1EA}",
|
|
region: "middle-east",
|
|
documents: [
|
|
{
|
|
type: "passport",
|
|
label: "UAE Passport",
|
|
width: 43,
|
|
height: 55,
|
|
dpi: 300,
|
|
headHeightMin: 0.7,
|
|
headHeightMax: 0.8,
|
|
eyeLineFromBottom: 0.63,
|
|
bgColor: "#FFFFFF",
|
|
bgColors: ["#FFFFFF"],
|
|
},
|
|
],
|
|
},
|
|
// Africa
|
|
{
|
|
code: "NG",
|
|
name: "Nigeria",
|
|
flag: "🇳🇬",
|
|
region: "africa",
|
|
documents: [
|
|
{
|
|
type: "passport",
|
|
label: "Nigerian Passport",
|
|
width: 35,
|
|
height: 45,
|
|
dpi: 300,
|
|
headHeightMin: 0.7,
|
|
headHeightMax: 0.8,
|
|
eyeLineFromBottom: 0.63,
|
|
bgColor: "#FFFFFF",
|
|
bgColors: ["#FFFFFF"],
|
|
},
|
|
],
|
|
},
|
|
{
|
|
code: "EG",
|
|
name: "Egypt",
|
|
flag: "\u{1F1EA}\u{1F1EC}",
|
|
region: "africa",
|
|
documents: [
|
|
{
|
|
type: "passport",
|
|
label: "Egyptian Passport",
|
|
width: 40,
|
|
height: 60,
|
|
dpi: 300,
|
|
headHeightMin: 0.7,
|
|
headHeightMax: 0.8,
|
|
eyeLineFromBottom: 0.63,
|
|
bgColor: "#FFFFFF",
|
|
bgColors: ["#FFFFFF"],
|
|
},
|
|
],
|
|
},
|
|
{
|
|
code: "ZA",
|
|
name: "South Africa",
|
|
flag: "\u{1F1FF}\u{1F1E6}",
|
|
region: "africa",
|
|
documents: [
|
|
{
|
|
type: "passport",
|
|
label: "South African Passport",
|
|
width: 35,
|
|
height: 45,
|
|
dpi: 300,
|
|
headHeightMin: 0.7,
|
|
headHeightMax: 0.8,
|
|
eyeLineFromBottom: 0.63,
|
|
bgColor: "#FFFFFF",
|
|
bgColors: ["#FFFFFF"],
|
|
},
|
|
],
|
|
},
|
|
];
|
|
|
|
export interface PrintLayout {
|
|
id: string;
|
|
label: string;
|
|
width: number; // mm
|
|
height: number; // mm
|
|
}
|
|
|
|
export const PRINT_LAYOUTS: PrintLayout[] = [
|
|
{ id: "4x6", label: "4x6 inch", width: 102, height: 152 },
|
|
{ id: "a4", label: "A4", width: 210, height: 297 },
|
|
{ id: "none", label: "None", width: 0, height: 0 },
|
|
];
|
|
|
|
export const APP_VERSION = "1.17.1";
|
|
|
|
/**
|
|
* Tool IDs that require the Python sidecar (AI/ML tools).
|
|
* Used by the frontend for progress/timeout behavior.
|
|
*/
|
|
export const PYTHON_SIDECAR_TOOLS = [
|
|
"remove-background",
|
|
"upscale",
|
|
"blur-faces",
|
|
"erase-object",
|
|
"ocr",
|
|
"colorize",
|
|
"enhance-faces",
|
|
"noise-removal",
|
|
"smart-crop",
|
|
"red-eye-removal",
|
|
"restore-photo",
|
|
"passport-photo",
|
|
"transparency-fixer",
|
|
"ai-canvas-expand",
|
|
] as const;
|