Expand description
boltz-markdown: CommonMark/GFM parsing + rendering primitives.
Layering: this crate must never depend on boltz-ui (see controls.rs
module docs) so that boltz-ui can depend on boltz-markdown without
creating a dependency cycle.
Modules§
Structs§
- Block
Quote Kind Colors - Checkbox
- A minimal checkbox: a bordered square that renders a checkmark glyph when
checked, and invokeson_click(toggling is the caller’s responsibility — this has no internal state, matching every other stateless-config component in this crate) on click. - Copy
- Copies the selected text to the clipboard.
- Copy
AsMarkdown - Copies the selected text as markdown to the clipboard.
- Copy
Button - A small icon button that copies
textto the clipboard on click. No internal “copied” state (that would require this to be a statefulEntity) — callers that want a “copied!” flash can track that externally and swapicon/tooltip. - Heading
Level Styles - LineCol
- Markdown
- Markdown
Element - Markdown
Font Config - Explicit font configuration, passed in by the caller instead of read from
a global
ThemeSettings(notheme_settingscrate exists in this workspace — see module docs above). - Markdown
Options - Markdown
Style - Parsed
Markdown - Path
With Range
Enums§
- Autoscroll
Behavior - Code
Block Renderer - Copy
Button Visibility - Markdown
Font - Scroll
Axes - Which axes a scrollable container should scroll along. Shaped closely
enough to
ui::ScrollAxesforelement.rs/rendered.rsto swap in later, but only wraps gpui’s ownoverflow_{x,y}_scroll+track_scroll(no custom scrollbar thumb/track rendering:boltz-gpuiexposes no primitive lower-level thanboltz-ui’sScrollbarsfor that, so this is a minimal passthrough fallback). - Wrap
Button Visibility
Traits§
- With
Scrollbar - Minimal
WithScrollbarreplacement: applies nativeoverflow_scroll+track_scrollfor the requested axes. Does not render a visible scrollbar thumb/track (seeScrollAxesdocs). Takes aStateful<Div>(i.e. after.id(...)) because gpui only implementsStatefulInteractiveElement(which providesoverflow_*_scroll/track_scroll) for stateful elements, not bareDiv.
Functions§
- icon_
svg - Renders a
boltz-iconsglyph viagpui::svg()directly — this crate deliberately avoidsboltz-ui’sIconcomponent (see module docs). - simple_
tooltip - Builds a
.tooltip(...)callback showingtexton hover, usable asdiv().tooltip(simple_tooltip("Copy")).
Type Aliases§
- Code
Block Render Fn - Code
Block Transform Fn - Code
Span Link Callback - A callback that can turn inline code span text into a link destination.