diff --git a/src/components/interactives/KasutiEmbroidery.tsx b/src/components/interactives/KasutiEmbroidery.tsx
index d265df7..6aa0a99 100644
--- a/src/components/interactives/KasutiEmbroidery.tsx
+++ b/src/components/interactives/KasutiEmbroidery.tsx
@@ -1,5 +1,5 @@
import confetti from 'canvas-confetti';
-import { Plus, RotateCcw, Undo2 } from 'lucide-react';
+import { ChevronLeft, ChevronRight, Download, Plus, RotateCcw, Undo2, Upload } from 'lucide-react';
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
import { Badge } from '@/components/ui/badge';
@@ -446,22 +446,27 @@ function toXY([r, c]: V): { x: number; y: number } {
// ─── Mini pattern preview for the reel ──────────────────────────────────────
+const MINI_SIZE = 60;
+const MINI_PAD = 4;
+
const MiniPreview: React.FC<{ pattern: Pattern; active: boolean }> = ({ pattern, active }) => {
const [rows, cols] = pattern.bbox;
- const pad = 4;
- const cell = 14;
- const w = cols * cell + pad * 2;
- const h = rows * cell + pad * 2;
+ // Scale to fit the fixed MINI_SIZE square so big motifs (Snowflake, Rose) don't overshoot.
+ const span = Math.max(rows, cols, 1);
+ const inner = MINI_SIZE - MINI_PAD * 2;
+ const cell = inner / span;
+ const offsetR = (inner - rows * cell) / 2;
+ const offsetC = (inner - cols * cell) / 2;
return (
-
)}
- {count > 0 && connected && oddCount === 0 && (
-
- Connected and every vertex has even degree — a complete alternating tour exists.
-
- )}
- {count > 0 && connected && oddCount > 0 && (
-
- Connected, but {oddCount} vertex{oddCount === 1 ? '' : 'es'} {oddCount === 1 ? 'has' : 'have'} odd degree — you may not be able to close the tour.
-
+ {count > 0 && connected && (
+ Connected — ready to stitch.
)}
+ {loadError && {loadError}
}
-
-
+
+
+
+
+
+
+
+