Skip to content

[codex] Use official Markmap renderer#194

Draft
ThisIs-Developer wants to merge 3 commits into
mainfrom
codex/official-markmap-renderer
Draft

[codex] Use official Markmap renderer#194
ThisIs-Developer wants to merge 3 commits into
mainfrom
codex/official-markmap-renderer

Conversation

@ThisIs-Developer

Copy link
Copy Markdown
Owner

Summary

  • Replaced the custom Markmap SVG approximation with the official Markmap browser API from markmap.js.org: Transformer, feature asset loading, deriveOptions, and Markmap.create.
  • Added pinned Markmap runtime assets (d3, markmap-lib, markmap-view) to the lazy loader and desktop offline preparation flow.
  • Updated worker-rendered Markdown shells and shared diagram CSS so markmap fences render through a dedicated Markmap surface with explicit SVG dimensions.

Why

The old Markmap path generated a simplified static SVG and did not honor official Markmap parsing, frontmatter JSON options, rich HTML labels, KaTeX, folding metadata, or the interactive renderer behavior.

Validation

  • node --check script.js
  • node --check preview-worker.js
  • node --check desktop-app/prepare.js
  • node --check desktop-app/resources/js/script.js
  • node --check desktop-app/resources/js/preview-worker.js
  • node desktop-app/prepare.js
  • Browser render check at http://127.0.0.1:4173/index.html using the provided Markmap sample loaded through the app share URL. Verified a ready .markmap-container, rendered SVG, Markmap paths/circles/foreignObjects, links, and KaTeX asset loading.

@vercel

vercel Bot commented Jun 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
markdown-viwer Ready Ready Preview, Comment Jun 26, 2026 12:44pm

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 26, 2026

Copy link
Copy Markdown

Deploying markdown-viewer with  Cloudflare Pages  Cloudflare Pages

Latest commit: ee50f65
Status: ✅  Deploy successful!
Preview URL: https://148f8dc7.markdown-viewer.pages.dev
Branch Preview URL: https://codex-official-markmap-rende.markdown-viewer.pages.dev

View logs

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 26, 2026

Copy link
Copy Markdown

Deploying markdownviewer with  Cloudflare Pages  Cloudflare Pages

Latest commit: ee50f65
Status: ✅  Deploy successful!
Preview URL: https://70088a4d.markdownviewer.pages.dev
Branch Preview URL: https://codex-official-markmap-rende.markdownviewer.pages.dev

View logs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant