Commit History
18 days ago
-
feat: port the template's new page layout to the editor and published articles
The editor view and the published page now use the research-article-template layout mirrored in frontend/src/styles/template-layout/: one CSS grid with named lines (screen, page, toc, outset, body, margin) and the 1280+ / 1101-1279 / <=1100 tiers, for both the "article" and "paper" templates. Published page (backend/src/publisher): - layout-chrome.ts renders the template markup: centered hero (title, subtitle, then banner), meta columns (authors, affiliations, published + reading time + DOI, Resources with PDF/Cite buttons and the links row), line TOC rail with slim top bar and drawer, paper hero with link pills, footer without citation/DOI blocks for "paper" - <main class="tiptap"> is the page grid; wide, full-width and sidenote wrappers get the template classes, wide embeds get html-embed--wide - the generated layout runtime replaces the old inline TOC/hash scripts: heading anchors, scroll-spy, margin sidenote placement, Cite popover, debug grid on ?grid - <html data-t…eab9566 -
build: mirror the research-article-template page layout
Add `npm run sync:template-layout` (backend/scripts/sync-template-layout.mjs). It copies the template's grid tokens and layout stylesheets into frontend/src/styles/template-layout/ with @custom-media resolved (neither Vite nor the publisher runs PostCSS), lifts the paper hero styles out of HeroPaper.astro, copies the link icons, and bundles the layout scripts (TOC, heading anchors, sidenotes, meta columns, debug grid on ?grid) into backend/src/publisher/layout-runtime.generated.ts. `--check` reports drift. Co-authored-by: Cursor <cursoragent@cursor.com>e5e073b -
feat(backend): import a research-article-template MDX article as an editor seed
Add scripts/import-showcase.ts (npm run import:showcase -- <content dir>): parses article.mdx and its chapters with remark-mdx, maps the template components onto the editor's nodes, converts the BibTeX bibliography to CSL-JSON, inlines the embeds (banner from the frontmatter included) and copies the images, audio and data files they use. The doc is checked against the publisher schema and the script reports what it simplified or dropped. Co-authored-by: Cursor <cursoragent@cursor.com>b9d291f
20 days ago
-
feat(embed-studio): tweak panel, inspect, automatic check, launcher, inline edit
- Tweak panel: embeds declare 2 to 6 settings in a data-embed-config JSON block (contract + agent prompt updated, runtime 1.2.0 exposes them as ctx.config and applies embedConfig messages live). Sliders, colors, selects, toggles and text update the preview instantly with no model call and are saved back as "manual tweak" versions. - Inspect: a point-and-click inspector in the studio preview; the picked element becomes an @this pointer for the next message, and a label held by a text setting can be edited without the AI. - Automatic check after each iteration: POST /api/embed-check renders the chart in headless Chromium (light/dark, 360/680 px, CDN-only network, one at a time) with the embed checker, now in src/embed-check, and the studio shows "N checks passed, 1 warning [Fix]". - Launcher for new figures (description, CSV drop, 4 gallery starters from GET /api/embed-starters, existing charts) from the top bar and the slash menu, instead of opening a random chart.…4953bfd -
feat(embeds): shared Embed.mount runtime, checker, gallery and evals
- Own the embed runtime and authoring guides in embed-kit/ and generate the runtime and agent skill into backend/src from them. - Embed Studio prompts and tools target the Embed.mount contract; seed embeds are migrated to it. - Add a headless checker (check:embeds), an eval harness with comparison report, and a gallery of showcase embeds and banners. Co-authored-by: Cursor <cursoragent@cursor.com>4e112fd