llm_markdown_renderer 0.2.1
llm_markdown_renderer: ^0.2.1 copied to clipboard
Renders Markdown streamed token by token from an LLM without jank. Incremental parsing, stable partial code fences, tables and lists, syntax highlighting.
0.2.1 #
Add homepage, refresh the demo GIF, and fix the demo's frame-time readout and sample text.
0.2.0 #
Breaking (pre-1.0): the public API is smaller.
LineBuffer,parseInlinesandisSafeLinkUrlare no longer exported; they were implementation details. UseIncrementalMarkdownParserandStreamingMarkdowninstead.
Improvements:
- Right-to-left text: paragraphs, headings and table cells take the direction of their first strong character (Arabic, Hebrew), list markers and block-quote bars mirror in right-to-left contexts, and code stays left-to-right.
- Accessibility: headings are semantic headers and lists expose list/list-item roles.
- Reading
MarkdownStreamController.documentno longer copies the block list twice (about 2x faster for very large documents). - Add
benchmark/append_cost.dart, golden tests, accessibility, RTL and text-scale tests,doc/integrations.md(Firebase AI, OpenAI-compatible and Anthropic streaming), CI, GitHub Pages demo and contribution docs. - Stricter lints (
strict-casts,strict-inference,strict-raw-typesand more).
0.1.1 #
- Fix table columns being sized slightly too narrow, which made cell text wrap mid-word (for example
Highlightin/g). It showed up whenMarkdownTheme.fromThemewas built from aThemeDatacreated outsideMaterialApp. Column widths now come from Flutter's own layout and still never shrink while a table streams in. - Add a demo GIF to the pub.dev screenshots.
0.1.0 #
Initial release.
- Incremental, chunk-boundary-independent Markdown parser (
IncrementalMarkdownParser), usable without Flutter. StreamingMarkdownwidget with controller (MarkdownStreamController.append),Stream<String>and static constructors.- Stable rendering of unclosed code fences, tables, lists, emphasis and links while streaming.
- Syntax-highlighted code blocks with copy button; pure-Dart incremental highlighter for 18 languages and a pluggable
CodeHighlighterinterface. MarkdownTheme/SyntaxThemestyling viaThemeExtension.- Example chat app simulating a streaming LLM.
