import { BarcodeFormat, QRCodeWriter } from "@zxing/library"; export interface PairingQrCodeProps { value: string; size?: number; } /** Render a QR as native SVG so no invitation bytes touch a canvas export. */ export function PairingQrCode(props: PairingQrCodeProps) { const matrix = new QRCodeWriter().encode( props.value, BarcodeFormat.QR_CODE, 0, 0, new Map(), ); const path: string[] = []; for (let y = 0; y < matrix.getHeight(); y++) { for (let x = 0; x < matrix.getWidth(); x++) { if (matrix.get(x, y)) path.push(`M${x} ${y}h1v1h-1z`); } } const size = props.size ?? 236; return ( ); }