UNPKG

@indielayer/ui

Version:

Indielayer UI Components with Tailwind CSS build for Vue 3

23 lines (22 loc) 423 B
import { assert as f } from "../utils/assert.js"; function o({ cachedBounds: e, itemCount: s, itemSize: t }) { if (s === 0) return 0; if (typeof t == "number") return s * t; { const r = e.get( e.size === 0 ? 0 : e.size - 1 ); f(r !== void 0, "Unexpected bounds cache miss"); const i = (r.scrollOffset + r.size) / e.size; return s * i; } } export { o as getEstimatedSize };