devguyrash2 downloadsNative-scale zoom, drag panning and independent fit-to-view lightboxes for rendered Mermaid diagrams.
An Obsidian plugin that adds native-scale navigation, semantic interaction, source editing and image export to existing Mermaid SVGs.
Plugin ID: viewgram. Display name: Viewgram. Author: DevGuyRash. Repository: DevGuyRash/viewgram. npm package name: viewgram.
Open a note containing a Mermaid code block in Reading view or Live Preview. Viewgram adds controls to diagrams that Obsidian can render with measurable dimensions; it uses the host's existing renderer.
Desktop behavior has been qualified as described below. Real mobile keyboards/touch and coexistence with Mica remain unqualified.
Download main.js, manifest.json and styles.css from the Viewgram releases. These are the only runtime files. Manual installation is available independently of the Community directory listing and its review status.
Close Obsidian before placing those three files in <vault>/.obsidian/plugins/viewgram/, preserve any data.json, then enable Viewgram in Community plugins. Use the actual Obsidian configuration directory if it has a custom name.
For an existing, confirmed DevGuyRash installation with ID devguyrash-mermaid-viewer, disable that plugin and close Obsidian before migrating its settings. From the Viewgram source checkout, pass the actual absolute configuration-directory path:
node scripts/migrate-settings.mjs "/absolute/vault/.obsidian"
The helper verifies the legacy manifest's ID and author and requires object-shaped settings JSON. It creates a unique owner-only backup in the legacy folder, then copies the original settings bytes to plugins/viewgram/data.json without replacing existing target data. It refuses symlinks and a mismatched publisher, preserves unknown settings keys, and does not change enabled-plugin lists. If there is no legacy data.json, no settings migration is needed. Keep the old folder and backups for rollback, and ensure the old plugin is disabled before enabling Viewgram.
The third-party mermaid-viewer namespace is separate. The helper does not inspect or copy it; do not infer ownership from that ID or display name. See placement.
100%, minus/plus, editable percentage and presets are grouped; Fit width is a separate preset or W shortcut. Ordinary wheel/trackpad gestures pan overflowing diagrams, returning note scrolling at an edge. Ctrl/Command-wheel zooms around the pointer; Shift-wheel pans horizontally. Left/middle dragging, keyboard panning and the direction pad remain available. R resets zoom, pan and automatic height.Node 22+ and npm:
npm ci --ignore-scripts
npm run build
Only dist/main.js, dist/manifest.json and dist/styles.css are runtime artifacts. Obsidian and CodeMirror are supplied by the host, not bundled. The demo's Mermaid dependency is development-only.
Source checkout belongs outside a vault, for example ~/repos/viewgram. Installation uses <vault>/.obsidian/plugins/viewgram/. Settings are loaded and saved only in this namespace; the explicit helper above is the only supported migration from the confirmed devguyrash-mermaid-viewer installation. No settings migration runs automatically, and a build does not install or enable anything. Leave third-party mermaid-viewer folders, data and enabled state untouched. See placement.
Maintainers follow RELEASING.md to synchronize versions, build, publish the matching GitHub Release and verify its downloaded runtime files. Source pushes do not publish updates automatically. Obsidian users choose Community plugins → Check for updates → Update or Update all; later releases do not require another initial directory submission.
Viewgram 0.1.0 has been built from the renamed source with the existing Node/esbuild script. The runtime manifest and MIT notices are verified during release preparation. No new test suite or native/mobile qualification was run for this rename; historical qualification below retains its original scope. Building or publishing a release does not install or enable it in a vault.
The pre-rename upgrade builds on main c56fbe9. Its completed qualification passed the plugin/demo build, TypeScript check, 145 Node checks, 38 development parser cases and all 64 browser cases. Eleven browser cases use the exact installed Mermaid 11.13 bundle as an isolated fixture; it is not shipped with the plugin. A subsequent scoped caret-color repair addresses an invisible black caret on dark source-editor backgrounds. Historical artifacts, focused repair evidence and qualification limits are recorded in upgrade verification; those receipts do not qualify renamed artifacts.
Desktop qualification also passed inside Obsidian 1.14.4 in isolated synthetic vaults: all 36 required native diagram fixtures, 13 focused behavior cases and 12 extended cases. Reading and Live Preview exercised actual note writes, unsaved text and undo, invalid/stale-source refusal, gestures and pane sizing, default/Cyber Glow syntax colors, semantic hover, native downloads, OS clipboard readback, settings failure recovery and unload. The native runs exposed and resolved host settings error handling, legacy syntax-token highlighting and outer editor interference with Live Preview gestures. Native acceptance qualifies the built files; installation and enablement are separate operations. A sparse-chain SVG microprobe confirmed bounded local highlight mutations; it excludes paint and app latency. Mica, real mobile keyboards/touch, native relative links/popouts, embeds and full-app performance remain unqualified.
The test sources are included for continuity, but are not an automatic install/build hook.
npm run typecheck
npm test
npm run test:taxonomy
npm run test:browser
npm run demo serves the review harness at http://127.0.0.1:4173. The build also creates demo/standalone.html. Browser tests default to /usr/bin/chromium; set CHROMIUM_PATH when necessary.
The fixture matrix covers 24 recognized diagram families through 36 full-source variants, plus two diagnostic/layout cases and nine unsupported native families. Recognition, parsing, SVG output and viewer behavior are distinct. See type matrix.
The viewport design was adapted from earlier code owned by the author.
Test diagrams and the minimal hostile-CSS fixture are synthetic.
Copyright (c) 2026 DevGuyRash. Released under the MIT License.