/** * Measure the rendered pixel width of label text using a Canvas context configured * with the same font as shape edge labels (`cvaShapeLabel` / `ShapeLabelPill`). * * Results are cached per label text. Using Canvas.measureText avoids the forced * synchronous layout (reflow) that getBoundingClientRect triggers when called inside * a Google Maps onDraw callback — the previous implementation caused ~67ms of blocked * main-thread time per draw cycle during zoom (observed in Chrome DevTools trace). * * Falls back to DOM measurement if canvas is unavailable, and to a character-count * estimate in environments without DOM (SSR, jsdom). */ export declare const measureLabelWidth: (label: string) => number;