foldable_impl

foldable_impl#

Low-level implementation details of the foldable system.

This module contains low-level wrappers that handle folding and unfolding as well as hyperlinking (and unfolding) internal nodes.

Classes

DeferredPlaceholder

A deferred part.

DeferredWithThunk

Stores a deferred placeholder along with its thunk.

FoldableTreeNodeImpl

Concrete implementation of a node that can be expanded or collapsed.

HyperlinkTarget

Wraps a node so that it can be targeted by a hyperlink.

NodeHyperlink

Builds a hyperlink to another node, based on that node's JAX keypath.

StringCopyButton

Builds a button that, when clicked, copies the given path.

Functions

collecting_deferred_renderings()

Context manager that defers and collects maybe_defer_rendering calls.

display_streaming_as_root(root_node, deferreds)

Displays a root node in an IPython notebook in a streaming fashion.

maybe_defer_rendering(main_thunk, ...)

Possibly defers rendering of a part in interactive contexts.

render_to_html_as_root(root_node[, ...])

Renders a root node to HTML.

render_to_text_as_root(root_node[, ...])

Renders a root node to text.