/** * Resolves a CSS length value to a pixel number using a hidden DOM probe. * * Used by the JS positioning fallback: consumer offsets can be numbers, * `${n}px` strings, tokenised `var(--ds-space-100, 8px)` strings, `calc()` * expressions, viewport units, etc. Parsing arbitrary CSS in JS is fragile * (and impossible for `calc(var(...))` without a layout context), so we let * the browser do the math. * * The probe is appended to `container` so it inherits the same containing * block, font size, and custom-property scope as the popover. * * Cost: one synchronous reflow on first cacheable resolution per * (container, value) pair, then a `WeakMap` lookup. Resolutions involving * `var(` are intentionally not cached. */ export declare function resolveCssLengthToPixels({ value, container, }: { value: number | string; container: HTMLElement; }): number;