import type { MarkupCanvasConfig } from "@/types/index.js"; import { RULER_Z_INDEX } from "./constants"; export function createCornerBox(config: Required): HTMLElement { const corner = document.createElement("div"); corner.className = "canvas-ruler corner-box"; corner.style.cssText = ` position: absolute; top: 0; left: 0; width: ${config.rulerSize}px; height: ${config.rulerSize}px; background: var(--ruler-background-color); border-right: 1px solid var(--ruler-border-color); border-bottom: 1px solid var(--ruler-border-color); z-index: ${RULER_Z_INDEX.CORNER}; display: flex; align-items: center; justify-content: center; font-family: ${config.rulerFontFamily}; font-size: ${config.rulerFontSize - 2}px; color: var(--ruler-text-color); pointer-events: none; `; corner.textContent = config.rulerUnits; return corner; }