Repository navigation
Releases
v0.1.4 — icon-only inline toolbar
[0.1.4] - 2026-10-23
Changed
- The inline toolbar is icon-only. Diagram/Code, zoom out/in/reset, fullscreen and download
used to print their localized words on the buttons, so the strip above every diagram read as a
sentence and wrapped first in a narrow chat column. Each control is now a 16px stroked SVG in a
28px square; the words moved toaria-label(the accessible name) andtitle(the hover
tooltip), which is how the fullscreen viewer has worked since 0.1.x. - A hairline (
.dsh-pm-sep) now separates the Diagram/Code toggle from the actions, so the seven
identical squares read as two groups. The type badge stays textual — it captions the diagram,
it is not a control. - The icon set moved to
src/icons.js(ICON_PATHS+createIcon(doc, win, name)) and is shared
by the inline bar and the overlay, instead of the viewer owning a private copy. - New icons:
expand(two arrows out of opposite corners, the mirror of the viewer's inward
fitWindowbrackets),download(arrow into a tray),diagram(two connected boxes) and
code(angle brackets with a slash).
Added
titletooltips on the Diagram, Code, Fullscreen and Download controls, which previously only
carried anaria-label.test/regression-viewer-zoom-controls.test.mjs— C2 locks the contract: seven controls, no
visible text, an SVG with aviewBoxandaria-hidden, a localizedaria-labelandtitle,
and a group divider, all surviving a live language switch.
Notes
- The graphics are real paths, not glyphs:
✕,⤡and1:1render differently per platform and
U+2921 is missing from common Windows fonts. - No API, message-key or class-name change;
.dsh-pm-btnis simply icon-shaped now (28px square,
centred content), and the overlay's 40px override is unchanged.
v0.1.3 — Pele 1.9.0: better label rendering, drop-in swap
Pele 1.6.0 → 1.9.0
The bundled renderer moves forward three minor versions (packed size 682 KB → 706 KB, +3.5%).
lib/pele-runtime.js remains a byte-identical copy of pele's own dist/pele.global.js, and
prepack rebuilds it, so this release and a github: source install stay in step.
This is a drop-in swap, not a rewrite. Verified rather than assumed:
- the exported surface is unchanged —
PeleError,detectType,enableZoom,
forgetTextWidths,mount,parse,register,registered,render,supports; detectType()returns the same canonical type for all 16 probe samples, including the
graph→flowchartalias the detection table relies on;render()produces identicalwidth/heightfor every one of them;mount.d.tsis byte-identical between 1.6.0 and 1.9.0.
What the upgrade buys
List<T>andMap<K,V>labels keep their angle-bracket part instead of being eaten as HTML
(Pele 1.9.0, issue #31). Spot-checked in this repo: labels now renderList<T>/Map<K,V>.- Chinese and Japanese labels wrap between characters instead of stretching the diagram, and
closing punctuation stays on the line it follows (Pele 1.7.0). - Labels accept
<sub>,<sup>,<code>,<kbd>,<samp>,<tt>,<u>,<ins>,<var>,
<cite>and<dfn>. - Class diagrams wrap separate groups onto new rows to fit the pane instead of shrinking the whole
drawing — it matters in a narrow chat column. mount()no longer raises "ResizeObserver loop" errors when a diagram resizes.
Theme
Two Pele variables that were never mapped are now wired to DSH tokens: --pele-font-mono (from
--ds-font-family-code, so <code>/<kbd> labels use the host's monospace face) and
--pele-critical (the warning colour, falling back to the error colour). Both are also inlined
into standalone SVG exports.
--pele-series-1…--pele-series-8 and --pele-radius are deliberately left unmapped: DSH
publishes no chart-series or radius token, so Pele's own palette is better than eight invented
colours that would not follow the theme.
Also fixed
.gitattributespinslib/pele-runtime.jsandlib/client.jstoeol=lf. With the Windows
defaultcore.autocrlf=true, a checkout used to rewrite every newline in the runtime copy, which
then failed the build's own sha256 comparison againstnode_moduleson a clean clone.
The .dsh-pm-inline-stage wrapper stays: 1.9.0 still rewrites the mounted svg's whole style
attribute when the pane resizes, it only moved that work into requestAnimationFrame.
149/149 tests pass. Installing from github:lsy1998/dsh-pele-mermaid#v0.1.3 still executes no
install-time script.
v0.1.2 — the plugin now actually loads
The plugin now actually loads
0.1.1 installed cleanly and then did nothing — no diagram, no error. Two separate
identifiers had to be the published package name and were instead the bare
dsh-pele-mermaid. Each one silently disables the plugin.
1. cordis.patch.yml declared an unscoped entry name
- insert:
- id: ui-pele-mermaid
name: 'dsh-pele-mermaid' # ← must be '@lsy1998/dsh-pele-mermaid'name is not a label — it is a module specifier. The host runs loader.import(name)
and then locates the package manifest by matching package.json#name exactly. On a
machine without a stray node_modules/dsh-pele-mermaid link the import throws, the entry
is recorded as error, and startup carries on. The plugin is simply absent, and nothing
says so.
2. The client bundle registered under the bare name
window.__ModuleLoader__.load({ id: "dsh-pele-mermaid", factory: ... })The host derives every boot-graph row's id from the package name, executes the bundle,
then asserts factories.has(row.id). A short id leaves that false, so arrive() throws
"loaded without registering ... via __ModuleLoader__.load" and the browser half never
activates.
This second failure is the nastier one: the host half keeps working and serves
/dsh-pele-mermaid/pele-runtime.js with a 200, so everything looks installed while the
UI half is dead.
Both are now derived, not spelled out
scripts/build.mjs reads package.json#name for the bundle id, and cordis.patch.yml
carries the scoped name. Two tests assert both, deriving the expected value the same way.
The previous assertions hard-coded the wrong literals — which is how this survived review:
a pinned expectation enforces the bug instead of catching it.
Each new assertion was verified by re-injecting the bad id and watching the suite go red
(147 pass / 2 fail), then restoring.
Verified against a live host
Booted a real dsh profile with the fixed package and read back the boot manifest:
boot entry id=@lsy1998/dsh-pele-mermaid rev=5d3cbe15e60c
bundle HTTP 200 (64066 bytes)
bundle id @lsy1998/dsh-pele-mermaid
runtime route HTTP 200 (682005 bytes)
client id == boot row id : YES (arrive() will register)
host route mounted : YES
Full suite: 149/149.
v0.1.1 — fix pnpm 11 GitHub install failure
Fixes the pnpm 11 install failure
Installing this plugin from the GitHub repository failed under pnpm 11 with:
[ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED] Failed to prepare git-hosted package
fetched from "https://codeload.github.com/lsy1998/dsh-pele-mermaid/tar.gz/...":
The git-hosted package "@lsy1998/dsh-pele-mermaid@0.1.0" needs to execute build
scripts but is not in the "allowBuilds" allowlist.
Cause. The package declared a prepare script. pnpm 11 refuses to install a
git-hosted dependency whose package.json declares an install-time lifecycle
script (prepare, preinstall, install, postinstall) unless the consumer
allowlists it in pnpm-workspace.yaml. The DSH CLI owns that workspace file, so
an installer cannot approve the script there — the install simply aborts.
Fix. The prepare script was never needed on the install path. The build
outputs (lib/client.js, lib/pele-runtime.js) are committed on purpose,
precisely because a GitHub-source install runs no build step. The build now runs
from prepack instead:
- installing from GitHub executes no install-time script, so no
allowBuilds
entry is needed and the install succeeds as-is; npm pack/npm publishstill rebuild fresh artifacts before packing.
Verified by installing this tag from GitHub with pnpm 11.21.0 on Windows: the
install completes, and lib/index.js, lib/client.js, lib/pele-runtime.js,
bin/dsh-pele-mermaid.mjs, cordis.patch.yml and icon.svg are all present in
the installed package.
v0.1.0
First published release.
Mermaid code blocks render as SVG diagrams in the DeepSeek Harness Web UI via Pele, with no
mermaid.js runtime. Zoom, pan, a fullscreen viewer, and a standalone SVG export are included.
Install
npm install @lsy1998/dsh-pele-mermaid --registry=https://npm.pkg.github.com/
The package is published to GitHub Packages, not the public npm registry, so the
--registry flag (or a matching .npmrc entry) is required.
Alternatively, install straight from the source:
dsh plugin --profile web add -w --save-exact https://github.com/lsy1998/dsh-pele-mermaid
Highlights
Zoom and pan
- The inline diagram pane zooms and pans in place:
Ctrl/Cmd+ wheel zooms at the pointer,
drag pans, and+/-/0/arrow keys work too. A plain wheel still scrolls the page. The state
is per block and resets when the diagram re-renders. - The pane is a focusable viewport (
tabindex="0",role="group", localized label) that
announces its current zoom through a polite live region. - Inline zoom runs from 10% to 800% of the natural size, so it goes both below and above the
initial rendering. The zoom buttons and the+/-keys anchor on the centre of the area
currently visible, not the diagram's origin; Ctrl/Meta + wheel anchors at the pointer.
Fullscreen viewer
- The overlay's controls are icon-only (inline SVG on
currentColor), floating at the
bottom-right as a vertical group. The localized name travels inaria-labeland intitle, so
no control renders visible text. - A plain wheel zooms in the overlay: the diagram owns the whole window there, so there is
nothing to scroll and the event is always consumed. - No press inside the overlay closes it. Only the exit control and
Escapedo, so dragging and
clicking the diagram cannot dismiss it by accident. - Build stamp in the viewer bar:
v0.1.0+<commit> at <UTC time>, also carried in
data-build-stamp, so a page can be told apart from an older cached bundle no matter how it
was installed.
Export
- Download a standalone
.svgwhose root carries the resolved theme attributes.
Notes on this release
lib/client.jsandlib/pele-runtime.jsare committed build outputs on purpose. A DSH
profile can install this plugin straight from the GitHub source (github:lsy1998/dsh-pele-mermaid)
and that install path has no build step, so the browser bundle and the Pele runtime must be
present in the repository.- The npm package name is scoped (
@lsy1998/dsh-pele-mermaid) because GitHub Packages only
accepts scoped packages. The CLI command (dsh-pele-mermaid) and the Cordis plugin id stay
unscoped. - Requires Node >= 22.18.0.