TorchLean API

NN.Widgets.Core.UI

Widgets UI helpers #

TorchLean has multiple ProofWidgets-based viewers (IR graphs, autograd tapes, RL rollouts, etc.). Several widgets share the same compact HTML helpers (monospace, pill, status badges, DOT label escaping).

This file centralizes those helpers so:

Design notes:

References:

Mark a macro-generated command as the source location of its widget panel.

Instances For

    Render a string as monospace code, using VS Code theme fonts when available.

    Instances For

      Render a small “pill” badge (used for compact key/value metadata).

      Instances For

        Render a success badge.

        Instances For

          Render a warning badge.

          Instances For

            Render an error badge.

            Instances For

              Render a boolean flag: green when set, muted otherwise.

              Instances For

                Escape a string so it is safe to embed inside a double-quoted DOT node label.

                Instances For