Let project previews opt into the route-D core

This commit is contained in:
gloamxun committed 2026-10-20 23:09:32 +08:00
1 parent a8e7499ce3
commit fe7fd68321
5 files changed
+59 -7

No files matched your search

+1 -1
View File
@@ -568,6 +568,6 @@ It accepts blank-line-separated source with a small `\section`/`\textbf`/`\emph`
builder, and returns the v1-compatible preview shape plus per-page hashes and
SVG. Route-D paragraphs are laid out with CMR10 advances, kerns and ligatures, and the PDF `/W` array reports the same advances, so extracted text keeps word boundaries. `Document::insertion_classes` caps each insertion class to a page fraction and defers overflow to the next page. The v1 `/preview` and project APIs are unchanged and remain the default.
`POST /api/route-d/edit/{unit}` applies one paragraph edit to the last route-D
Project previews can opt into the new core with `POST /api/projects/{id}/preview?engine=route-d`; the same project preview without the query keeps the v1 pipeline. `POST /api/route-d/edit/{unit}` applies one paragraph edit to the last route-D
document and returns the same page list plus `changedPages` and
`recomputedPages`, exposing the checkpoint/page-hash diff from the core.