Turn any idea, plan, or codebase into a beautiful interactive diagram. An agent skill for Claude Code, Codex, and more.
HTML agent-skillsai-agentsarchitecture-diagramclaude-codeclaude-skillscodexcoding-agentsdeepseek-harnessdeveloper-toolsdiagramsdiagrams-as-codedsh-pluginflowchartllmmermaidopencodesequence-diagramsoftware-architecturesystem-designvisualization
v2.2: print stylesheet + local-font fallback for exports
tt-a1i09c93a0aed05
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 9f1d680d..eaf144ce 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -2,6 +2,13 @@All notable changes are documented here. Format loosely follows [Keep a Changelog](https://keepachangelog.com/).+## [2.2.0] — 2026-04-15++### Added+- **Print stylesheet.** <kbd>Cmd</kbd>+<kbd>P</kbd> (or browser print) now produces a clean, print-ready page: toolbar and toasts hidden, dark background replaced with white, grid removed, card/container borders switched to light gray, `break-inside: avoid` on diagram + cards so nothing splits mid-element. Works regardless of current theme.+- **Font fallback improvement for exported images.** The serialized SVG now includes a `local()`-only `@font-face` block for JetBrains Mono at weights 400/500/600/700 so that raster exports can pick up a locally-installed JetBrains Mono (common on developer machines) and fall through cleanly to `ui-monospace` / Menlo otherwise. Previously the sandboxed image-rendering context couldn't reach the Google Fonts URL in the `<link>`, resulting in plain monospace even when users had the font installed.+- `archify-print.png` screenshot wired into the README preview section.+## [2.1.0] — 2026-04-15### Addeddiff --git a/README.md b/README.mdindex 9135b4e3..c73a61c7 100644--- a/README.md+++ b/README.md@@ -13,7 +13,7 @@ Archify is a [Claude Skill](https://support.claude.com/en/articles/12512180-usin-+## Preview@@ -27,6 +27,10 @@ The Export menu with the 1× / 2× / 4× scale selector and Copy-to-clipboard:+Print-ready out of the box — <kbd>Cmd</kbd>+<kbd>P</kbd> drops the toolbar, the dark background, and the grid automatically:+++Live example: [`examples/web-app.html`](examples/web-app.html) — open in a browser, press <kbd>T</kbd> to toggle theme, <kbd>E</kbd> to open Export. Append `?theme=light` or `?openExport=1` to the URL for deterministic screenshots.## What's newdiff --git a/archify.zip b/archify.zipindex 24327f08..568c7ad0 100644Binary files a/archify.zip and b/archify.zip differdiff --git a/archify/assets/template.html b/archify/assets/template.htmlindex 1c414909..fc6548fc 100644--- a/archify/assets/template.html+++ b/archify/assets/template.html@@ -199,6 +199,30 @@font-size: 0.75rem;}+ /* ==========================================================+ Print stylesheet — hide interactive controls, force light,+ drop the grid so the diagram doesn't waste ink.+ ========================================================== */+ @media print {+ :root, [data-theme="dark"], [data-theme="light"] {+ --bg: #ffffff;+ --grid: transparent;+ --panel: #ffffff;+ --panel-border: #e2e8f0;+ --text: #0f172a;+ --text-muted: #475569;+ --text-dim: #94a3b8;+ --mask: #ffffff;+ }+ body { background: #ffffff !important; padding: 0; }+ .toolbar, .archify-toast { display: none !important; }+ .diagram-container, .card { box-shadow: none; border-color: #e2e8f0; }+ /* Ensure elements break sensibly across pages */+ .card { break-inside: avoid; }+ .diagram-container { break-inside: avoid; }+ h1, .subtitle { color: #0f172a; }+ }+/* ==========================================================TOOLBAR (theme toggle + export menu)========================================================== */@@ -700,11 +724,23 @@return n + ': ' + computed.getPropertyValue(n).trim() + ';';}).join(' ');+ // Prepend a local()-only @font-face block for each weight so that the+ // sandboxed image-rendering context used during PNG/JPEG/WebP export+ // can find JetBrains Mono if the user has it installed locally, and+ // falls through cleanly to the monospace stack otherwise. The usual+ // Google-Fonts <link> in the host document is unreachable from the+ // serialized SVG, so url()-sourced faces would just hang.+ var fontFallback = [400, 500, 600, 700].map(function (w) {+ return "@font-face { font-family: 'JetBrains Mono'; font-weight: " + w ++ "; src: local('JetBrains Mono'), local('JetBrainsMono-Regular'); }";+ }).join('\n');+// IMPORTANT: inject the resolved variables AFTER hostStyle, otherwise// hostStyle's ":root, [data-theme=\"dark\"] { ... }" rule overrides our// chosen theme via later-in-cascade equal-specificity. Keep this order.var style = document.createElementNS('http://www.w3.org/2000/svg', 'style');style.textContent =+ fontFallback + "\n" +"svg { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace; }\n" +hostStyle + "\n" +":root, svg { " + vars + " }\n";diff --git a/examples/images/archify-print.png b/examples/images/archify-print.pngnew file mode 100644index 00000000..8c00c1e0Binary files /dev/null and b/examples/images/archify-print.png differdiff --git a/examples/web-app.html b/examples/web-app.htmlindex dda1799a..b280a5dc 100644--- a/examples/web-app.html+++ b/examples/web-app.html@@ -199,6 +199,30 @@font-size: 0.75rem;}+ /* ==========================================================+ Print stylesheet — hide interactive controls, force light,+ drop the grid so the diagram doesn't waste ink.+ ========================================================== */+ @media print {+ :root, [data-theme="dark"], [data-theme="light"] {+ --bg: #ffffff;+ --grid: transparent;+ --panel: #ffffff;+ --panel-border: #e2e8f0;+ --text: #0f172a;+ --text-muted: #475569;+ --text-dim: #94a3b8;+ --mask: #ffffff;+ }+ body { background: #ffffff !important; padding: 0; }+ .toolbar, .archify-toast { display: none !important; }+ .diagram-container, .card { box-shadow: none; border-color: #e2e8f0; }+ /* Ensure elements break sensibly across pages */+ .card { break-inside: avoid; }+ .diagram-container { break-inside: avoid; }+ h1, .subtitle { color: #0f172a; }+ }+/* ==========================================================TOOLBAR (theme toggle + export menu)========================================================== */@@ -595,7 +619,7 @@<!-- Footer --><p class="footer">- Try <kbd>T</kbd> to toggle theme · <kbd>E</kbd> for Export · pick 1× / 2× / 4× scale · PNG / JPEG / WebP / SVG or copy to clipboard+ Try <kbd>T</kbd> to toggle theme · <kbd>E</kbd> for Export · pick 1× / 2× / 4× scale · PNG / JPEG / WebP / SVG or copy to clipboard · <kbd>Cmd</kbd>+<kbd>P</kbd> for a clean printable page</p></div>@@ -700,11 +724,23 @@return n + ': ' + computed.getPropertyValue(n).trim() + ';';}).join(' ');+ // Prepend a local()-only @font-face block for each weight so that the+ // sandboxed image-rendering context used during PNG/JPEG/WebP export+ // can find JetBrains Mono if the user has it installed locally, and+ // falls through cleanly to the monospace stack otherwise. The usual+ // Google-Fonts <link> in the host document is unreachable from the+ // serialized SVG, so url()-sourced faces would just hang.+ var fontFallback = [400, 500, 600, 700].map(function (w) {+ return "@font-face { font-family: 'JetBrains Mono'; font-weight: " + w ++ "; src: local('JetBrains Mono'), local('JetBrainsMono-Regular'); }";+ }).join('\n');+// IMPORTANT: inject the resolved variables AFTER hostStyle, otherwise// hostStyle's ":root, [data-theme=\"dark\"] { ... }" rule overrides our// chosen theme via later-in-cascade equal-specificity. Keep this order.var style = document.createElementNS('http://www.w3.org/2000/svg', 'style');style.textContent =+ fontFallback + "\n" +"svg { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace; }\n" +hostStyle + "\n" +":root, svg { " + vars + " }\n";@@ -954,6 +990,7 @@Archify.exportMenu = { open: open, close: close, isOpen: isOpen, run: runExport };+ // Auto-open on page load for demo/screenshot purposes: ?openExport=1try {if (new URLSearchParams(window.location.search).get('openExport') === '1') {setTimeout(open, 60);