@sigx/lynx-markdown
v0.11.0
Published
SignalX-native streaming markdown renderer for Lynx. Parses markdown in JS (zero deps) and renders to native <view>/<text> primitives, with incremental streaming for AI output.
Maintainers
Readme
@sigx/lynx-markdown
A SignalX-native, streaming-aware markdown renderer for Lynx.
It parses markdown in JavaScript (zero dependencies) and renders to native Lynx
<view>/<text>/<image> primitives — so it renders identically on every
platform (iOS, Android, Harmony) and is fully controllable from JS. Built for
AI output: as the source string grows token-by-token, finalized blocks keep a
stable identity and are never re-parsed or remounted, so completed content
doesn't flicker or reflow while new tokens stream in.
📚 Documentation
Full prop reference, streaming API, theming, the WYSIWYG editor and live examples → sigx.dev/lynx/modules/markdown/overview
Install
pnpm add @sigx/lynx-markdownA taste
import { MarkdownView } from '@sigx/lynx-markdown';
export default function ArticleScreen() {
return (
<MarkdownView
value={'# Hello\n\nThis is **markdown** with a [link](https://sigx.dev).'}
onLink={(href) => openUrl(href)}
/>
);
}createMarkdownStream() bridges a token loop to <MarkdownView> for AI output, coalescing bursts of tokens into a bounded number of re-renders. MarkdownEditor adds true-WYSIWYG editing on the native @sigx/lynx-richtext element, and components are overridable per node type (a ready-made daisyUI mapping ships in @sigx/lynx-daisyui). The supported syntax, full prop tables, streaming API, theming and editor/toolbar contracts are documented on the docs site.
License
MIT
