// apps/web/src/components/editor/editor-status-bar.tsx import { useEditorStore } from "@/stores/editor-store"; export function EditorStatusBar() { const cursorPosition = useEditorStore((s) => s.cursorPosition); const canvasSize = useEditorStore((s) => s.canvasSize); const zoom = useEditorStore((s) => s.zoom); const setZoom = useEditorStore((s) => s.setZoom); const sourceImageUrl = useEditorStore((s) => s.sourceImageUrl); const zoomPercent = Math.round(zoom * 100); return (
{sourceImageUrl && ( <> X: {cursorPosition.x} Y: {cursorPosition.y} )}
{sourceImageUrl && `${canvasSize.width} x ${canvasSize.height} px`}
{ const val = Number.parseFloat(e.target.value); if (!Number.isNaN(val) && val > 0) setZoom(val / 100); }} className="w-14 bg-transparent text-right text-xs border-none outline-none" min={0.01} max={6400} step={0.1} /> %
); }