import { clampZoom } from "@/lib/matrix/clampZoom.js"; import type { MarkupCanvasConfig } from "@/types"; export function withClampedZoom(config: Required, operation: (clamp: (scale: number) => number) => T): T { const clampFunction = (scale: number) => clampZoom(scale, config); return operation(clampFunction); }