web: ProseMirror vendored + the composer's markdown core (#531) (#887)
The rich composer's document layer, pure and Node-tested: schema (the feed's allowlist minus render-only concerns — no headings/images), a MarkdownParser built on markdown.js's houseParser so composer and feed can never disagree, a zero-escape MarkdownSerializer (plain text serializes verbatim; escapes only where generated syntax would corrupt; strike stays single-tilde; hard_break → plain \n so wire bytes don't drift under old clients), and the doc⇄plaintext offset mapping the frozen typeahead contract rides on. vendor/prosemirror.js is one ESM bundle (class identity across PM packages) with markdown-it kept external → ./markdown-it.js, so the page holds exactly one Markdown parser and embed loads never pay for the editor. No UI change — the view glue lands next.
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
4 files changed,
+14713
−1
package.json+1 −1test/composer.test.mjs+211 −0web/static/composer-md.js+366 −0web/static/vendor/prosemirror.js+14135 −0
package.jsonLoading diff…
test/composer.test.mjsLoading diff…
web/static/composer-md.jsLoading diff…
web/static/vendor/prosemirror.jsLoading diff…