@re-news/article-detail-renderer
v0.5.28
Published
Standalone React renderer for Re News article detail pages.
Readme
@re-news/article-detail-renderer
Standalone React renderer for article detail pages created in Re News Admin.
The renderer is deliberately separate from the admin editor. It accepts serialized rich text JSON from the editor, or trusted article HTML, and renders frontend article markup with package-owned CSS.
The renderer does not require the Re News Admin stylesheet, Chakra provider, Chakra theme, or host CSS variables.
Usage
import { ArticleRichText } from '@re-news/article-detail-renderer'
import '@re-news/article-detail-renderer/style.css'
export function ArticlePage({ content }) {
return <ArticleRichText content={content} />
}ArticleDetailRenderer is also exported for complete article pages. The stylesheet import above is the only renderer setup required. Host applications may add their own styles, but should scope them outside the .re-news-renderer root.
The package expects React 19 and the optional interactive block peers listed in package.json (lucide-react, ApexCharts, React ApexCharts, page-flip, and react-pdf). SSR can render article content and chart data without a browser; interactive charts hydrate in the browser. Install react-pdf when rendering PDF blocks.
Build
npm run buildThe build emits ESM, CJS, CSS, source maps, and TypeScript declarations under dist/.
