Prose
moleculesThe markdown style contract: headings, lists, quotes, inline and block code, tables and images for renderMarkdown output or your own markup, themed by the --md-* tokens.
Release notes
html={renderMarkdown(source)}: headings, lists, a quote, a table, a fenced code block and autolinked URLs.
tsumikit 0.62
The conversation release: everything needed to build an assistant panel, still with zero runtime dependencies.
Highlights
ConversationFeedsticks to the bottom and keeps the viewport still when history loadsComposergains a toolbar row and prompt historyrenderMarkdownturns chat text into safe HTML forProse
Upgrading from 0.61? Nothing breaks: every new prop is optional.
| Component | Change | Breaking |
|---|---|---|
| ChatBubble | timestamp, footer, markdown | no |
| StatusBar | new | no |
| DataTable | responsive="stack" | no |
import { renderMarkdown } from '@dorsk/tsumikit';
const html = renderMarkdown(message.text);Full changelog on GitHub, or see https://dorskfr.github.io/tsumikit for the demo.
Default and compact rhythm
compact tightens the vertical rhythm for chat bubbles and dense panels.
Incident 0412
cache-01 ran out of memory at 08:39.
- 502s on api-gateway for 4 minutes
- no data loss
Follow-up: raise maxmemory.
Incident 0412
cache-01 ran out of memory at 08:39.
- 502s on api-gateway for 4 minutes
- no data loss
Follow-up: raise maxmemory.
Safety and overflow
renderMarkdown escapes raw HTML and keeps only http(s), mailto, relative and #anchor links; long tokens and wide tables wrap, long code lines scroll inside their block.
Links are scheme-checked: docs and mail work, [click me](javascript:alert(1)) stays text.
Raw HTML is escaped: <img src=x onerror=alert(1)> <script>alert(1)</script>
An unbroken token wraps: sha256:9f12e485513e4d6eb987d81a95cead559f12e485513e4d6eb987d81a95cead55
| Six columns | that wrap | their cells | instead of | widening | the page |
|---|---|---|---|---|---|
| api-gateway-eu-west-1 | worker-02-eu-west-1 | cache-01-us-east-1 | postgres-primary | media-transcode | search-index |
kubectl -n cyberia logs deploy/api-gateway --since=1h --timestamps --all-containers --prefix | grep -E "5[0-9]{2}" | tail -n 200Own markup and options
children styles hand-written markup; renderMarkdown(src, { tables: false, autolink: false, highlight }) turns features off or plugs a highlighter.
On-call handover
Two alerts are still open. Check worker-02 before the 09:00 deploy.
- cache-01: memory alarm, acknowledged
- search-index: slow queries, investigating
Tables off: | a | b |
Autolink off: https://example.com
SELECT * FROM services WHERE status = 'danger';Measure
Lines stop at --measure (68ch) however wide the pane; style="max-inline-size: none" lets the text fill the box.
Markdown that runs edge to edge on a wide pane is tiring to read: the eye loses the line start on every return. Capping the measure keeps each line between 45 and 75 characters, where reading speed and comprehension are best, while tables, code blocks and images still fill the prose box.
Markdown that runs edge to edge on a wide pane is tiring to read: the eye loses the line start on every return. Capping the measure keeps each line between 45 and 75 characters, where reading speed and comprehension are best, while tables, code blocks and images still fill the prose box.
Wrapping code blocks
wrap breaks long code lines instead of scrolling them sideways, for narrow panels that must never scroll horizontally.
kubectl -n workloads rollout restart deployment/api-gateway --context production-eu-west-1kubectl -n workloads rollout restart deployment/api-gateway --context production-eu-west-1Props
| Prop | Type | Default | Description |
|---|---|---|---|
html | HTMLValue | — | Rendered as-is: it MUST be trusted or sanitized, tsumikit does not sanitize it unless `sanitize` is set. Pass `TrustedHTML` under Trusted Types. |
sanitize | boolean | SanitizeOptions | — | Sanitize `html` client-side: `setHTML` where supported, else `fallback`. |
children | Snippet | — | |
compact | boolean | false | Tighter vertical rhythm for chat bubbles. |
wrap | boolean | false | Code blocks wrap long lines instead of scrolling sideways. |
class | string | '' | |
style | string | '' |