Private
Public Access
Renders message content with markdown-to-jsx: bold/italic/strikethrough, inline code, fenced code blocks, blockquotes, lists (incl. nested and task lists), tables, footnotes, headings, and highlight (==text==). Raw HTML in message content is parsed to escaped literal text rather than rendered (disableParsingRawHTML), which is the XSS mitigation for this being user-generated content -- verified against both <img onerror> and <script> probes. Markdown image embeds degrade to a link instead of an <img>, since the app already has a first-class image upload and a second silent remote-image-embed path would duplicate it and leak the viewer's IP to arbitrary URLs. The inline message-edit control is upgraded from a single-line <input> to a <textarea> so multi-line markdown can actually be edited without losing newlines, mirroring the Composer's Enter-sends/Shift+Enter- newlines convention. Since CommonMark treats a single newline as a soft break (collapses to a space) rather than a visible line break, added a small code-fence- aware preprocessor that converts single newlines to hard breaks -- without it, existing multi-line messages sent via the Composer's Shift+Enter would silently collapse onto one line. Also fixes heading levels rendering at an identical capped size (should still step down by level, just capped lower than default), and adds CSS for markdown constructs the library already parsed but hadn't been styled for the dark theme: table borders, highlight/mark color, task-list checkbox accent, and footnote divider.
34 lines
815 B
JSON
34 lines
815 B
JSON
{
|
|
"name": "frontend",
|
|
"private": true,
|
|
"version": "0.0.0",
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "vite",
|
|
"build": "tsc -b && vite build",
|
|
"lint": "oxlint",
|
|
"preview": "vite preview"
|
|
},
|
|
"dependencies": {
|
|
"markdown-to-jsx": "^9.10.2",
|
|
"react": "^19.2.8",
|
|
"react-dom": "^19.2.8",
|
|
"react-router-dom": "^7.18.2",
|
|
"vite-plugin-pwa": "^1.3.0"
|
|
},
|
|
"devDependencies": {
|
|
"@types/node": "^24.13.3",
|
|
"@types/react": "^19.2.17",
|
|
"@types/react-dom": "^19.2.3",
|
|
"@vitejs/plugin-react": "^6.0.4",
|
|
"oxlint": "^1.75.0",
|
|
"typescript": "~6.0.2",
|
|
"vite": "^8.2.0",
|
|
"workbox-cacheable-response": "^7.4.1",
|
|
"workbox-expiration": "^7.4.1",
|
|
"workbox-precaching": "^7.4.1",
|
|
"workbox-routing": "^7.4.1",
|
|
"workbox-strategies": "^7.4.1"
|
|
}
|
|
}
|