cel-tui
    Preparing search index...

    Function measureContentHeight

    • Measure a node tree's intrinsic content height at the provided width.

      This is a content-measurement helper, not a viewport/clipping helper. The caller-provided width is the authoritative wrapping width for the measured subtree. Measurement starts at the given node, ignores that node's own main-axis height constraints, and walks downward through its descendants. Descendant sizing rules still apply normally.

      Use this for intrinsically sized content such as scrollback/message history chunks. If a wrapper's visible height is controlled by height, flex, or percentage sizing, measure the content subtree inside that wrapper instead.

      Parameters

      • node: Node
      • options: { width: number }

      Returns number

      const addedHeight = measureContentHeight(
      VStack({}, olderMessages.map(renderMessage)),
      { width: historyContentWidth },
      );

      scrollOffset += addedHeight;