First step of docs/git-sync-plan.md. New workspace package @docmost/git-sync vendoring the PURE parts from docmost-sync (HEAD b03eb35): - lib: markdown-converter, markdown-document, canonicalize, docmost-schema, node-ops, diff, and an extracted markdown-to-prosemirror (only the pure marked->HTML->generateJSON path from upstream collaboration.ts; no websocket). - engine (pure, no IO): reconcile, layout, sanitize, stabilize, loop-guard. Ported the upstream pure-module + round-trip corpus tests (vitest): 314 pass, 3 expected upstream known-limitation fails. tsc clean. No server wiring yet. docmost-schema inlines getStyleProperty (as packages/mcp does — @tiptap/core 3.20.4 doesn't export it). IO engine (pull/push/git/settings) deferred to later Phase A/B steps; the editor-ext idempotency gate (plan §13.1) is the next step. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
37 lines
908 B
JSON
37 lines
908 B
JSON
{
|
|
"type": "doc",
|
|
"content": [
|
|
{
|
|
"type": "heading",
|
|
"attrs": { "level": 1 },
|
|
"content": [{ "type": "text", "text": "Level one heading" }]
|
|
},
|
|
{
|
|
"type": "paragraph",
|
|
"content": [{ "type": "text", "text": "A plain paragraph of text." }]
|
|
},
|
|
{
|
|
"type": "heading",
|
|
"attrs": { "level": 2 },
|
|
"content": [{ "type": "text", "text": "Level two heading" }]
|
|
},
|
|
{
|
|
"type": "paragraph",
|
|
"content": [
|
|
{ "type": "text", "text": "First line of a paragraph" },
|
|
{ "type": "hardBreak" },
|
|
{ "type": "text", "text": "second line after a hard break." }
|
|
]
|
|
},
|
|
{
|
|
"type": "heading",
|
|
"attrs": { "level": 3 },
|
|
"content": [{ "type": "text", "text": "Level three heading" }]
|
|
},
|
|
{
|
|
"type": "paragraph",
|
|
"content": [{ "type": "text", "text": "Closing paragraph." }]
|
|
}
|
|
]
|
|
}
|