{"repo":"chesongsong/x-langjs","free":true,"listed":false,"github":"https://github.com/chesongsong/x-langjs","clone":"git clone https://github.com/chesongsong/x-langjs.git","description":"An ANTLR4-based domain-specific language that supports embedding x-lang code blocks in Markdown. After parsing and execution, the code is displayed as custom components by a pluggable rendering engine (any UI library). Suitable for scenarios such as AI dialogue and streaming reports.","language":"TypeScript","stars":11,"topics":["antlr4","markdown","parser"],"license":null,"category":"ui-components","readme_excerpt":"x-langjs 中文 ANTLR4 + TypeScript DSL runtime that executes x-langjs code blocks in Markdown and renders outputs through a pluggable UI layer. Fully custom rendering — the runtime does not depend on any UI component library. You register your own components (e.g. table, button, card) and implement their UI with any framework or library you choose (Vue, React, Element Plus, Ant Design, or plain HTML). The core only provides the DSL execution and a thin render contract; all visuals are under your control. Project Structure Install What can it do? 1. Register a custom UI component and render it from DSL Write button(\"Click me\") in a Markdown code block — x-langjs parses it, calls your setup , then calls your render to mount the UI: Full demo: playground/src/simple-demo.ts --- 2. Use any framework — Vue or React, your choice The render function receives a plain DOM container . You decide how to mount: Vue: React: Full demo: playground/src/simple-demo.ts --- 3. Listen to UI events from DSL components Components can emit events back to your JS layer via ctx.emit . Use app.on() to handle them: --- 4. Streaming support — renders incrementally as AI output arrives Call app.run() repeatedly with growing content. The engine diffs and only re-renders changed segments. Components that are still incomplete show their skeleton screen: Full streaming demo: playground/src/main.ts --- 5. Multi-turn conversation — one XLangApp per message bubble Each AI response is an independent render scope. Co","default_branch":null,"files":null,"tree":[],"storefront":"/r/chesongsong","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/chesongsong/x-langjs/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}