@bgub/fig-virtual
v0.1.0
Published
Native Fig adapter for TanStack Virtual Core
Readme
@bgub/fig-virtual
useVirtualizer from /element adapts TanStack Virtual Core to Fig's render and
abort-based lifecycle. It retains the core instance across renders, publishes
scroll changes synchronously, and releases observers when unmounted. Pass the
same element options used by Virtual Core; defaults cover browser element
measurement, offset observation, and scrolling.
The lifecycle follows the public framework-adapter methods used by TanStack's
React adapter (_didMount, _willUpdate), with Fig hooks in place of React hooks.
Transcript selection, audio timing and auto-scroll policy remain application code.
Build before importing: pnpm --filter @bgub/fig-virtual build. Tests cover visible
range changes, option updates, stable instances and observer teardown. Variable
height transcript measurements and touch selection still require application
browser validation before replacing the current React virtualizer.
