@humanspeak/svelte-markdown
Version:
Markdown and HTML renderer for Svelte 5 — built for rendering streaming AI agent output from Claude Code, ChatGPT, and agentic workflows. XSS-safe defaults, streaming-aware sanitization, token caching, TypeScript types, and Svelte 5 runes.
16 lines (15 loc) • 755 B
JavaScript
/**
* Streaming-compatible Shiki syntax-highlighting extension.
*
* Shipped ONLY via the `@humanspeak/svelte-markdown/extensions/shiki` subpath —
* intentionally NOT re-exported from the `extensions` barrel.
* `createShikiHighlighter.js` statically imports `shiki/core` from plain JS, so
* a barrel re-export would force every barrel consumer's bundler to resolve
* `shiki` (an optional peer dependency) even when they never use highlighting
* (guarded by `barrel-optional-deps.test.ts`).
*
* @module
*/
export { createShikiHighlighter, escapeHtml } from './createShikiHighlighter.js';
export { default as ShikiCode } from './ShikiCode.svelte';
export { SHIKI_CONTEXT_KEY, getShikiHighlighter, setShikiHighlighter } from './shikiContext.js';