@termaxjs/view-core
v0.2.1
Published
Zero-dependency high-performance Markdown & .todo parser, AST tokenizer, LaTeX math, and SVG diagrams
Maintainers
Readme
@termaxjs/view-core
Zero-dependency high-performance Markdown &
.todoparser, AST tokenizer, LaTeX math compiler, and SVG vector diagram generator.
Part of the Termax View engine family.
Features
- Zero Runtime Dependencies — 0 external npm dependencies.
- MicroTokenizer Highlighting — Native syntax highlighting for 19+ languages.
- LaTeX Math Formulas — Native compilation of inline
$E=mc^2$and display$$\sum ...$$math without KaTeX. - Mermaid Vector Diagrams — Direct compilation to crisp SVG elements (Flowcharts, Sequences, Pie charts) without Mermaid.js.
.todoPlain-Text Task System — Line-oriented task parser with 3-state checkbox toggling, priorities(A)–(D), due dates, and tags.- Safe-by-Default Sanitization — Neutralizes malicious XSS vectors and unsafe schemes.
Installation
npm install @termaxjs/view-core
# or
pnpm add @termaxjs/view-coreUsage
import { renderMarkdown, renderTodo, parseTodo } from '@termaxjs/view-core';
// 1. Render Markdown
const { html, warnings } = renderMarkdown('# Hello Termax View\n$$E = mc^2$$', {
highlight: true,
math: true,
mermaid: true,
});
// 2. Render .todo
const todo = renderTodo(`
# Sprint Tasks (.todo)
[x] (A) 2026-09-18 Zero-dep AST tokenizer +core @dev
[>] (B) 2026-09-25 .todo React Studio +react @ui
`);License
Apache-2.0
