Repository navigation
Releases: obsidianmd/pele
Releases · obsidianmd/pele
Release list
1.6.0
mount()now displays parsing and rendering errors in the diagram container. Invalid updates keep the last successful drawing dimmed, with the error shown along its bottom edge.- Added
Mounted.sourceandMounted.error.Mounted.resultis nowundefineduntil a diagram renders successfully. onErrornow handles initial rendering failures and failed updates, in addition to automatic redraw failures.- Mounted diagrams now receive unique SVG IDs by default, preventing conflicts between diagrams on the same page.
- Added
--pele-errorto customize the error text color.
API change: Parsing and rendering failures from mount() and update() are displayed in place instead of thrown. Use onError or Mounted.error to handle them.
1.5.2
Fixes
- Fixed diagrams keeping text widths measured with a fallback font after a web font loads, e.g. added with the FontFace API.
1.5.1
Improvements
mount()no longer listens for font loads in each document, so loading a font that no diagram uses no longer re-renders every diagram on the nextrefresh(). Diagrams rendered while a web font is loading are still re-rendered once it loads.- Pie charts have thinner borders between slices.
Fixes
- Fixed percentage labels outside a pie chart overlapping when thin slices are next to each other.
1.5.0
New
- Added
pele/global, a browser script that exposes the full API as the globalpelefor use with a<script>tag. - Added a
sanitizeoption tomount()for passing SVG through your app’s sanitizer before insertion. - Added an
onErrorcallback tomount()for render failures after resizing, font loading, or showing a hidden diagram.
Improvements
refresh()re-renders only when the container width or fonts have changed.- Hidden diagrams defer updates until shown, while parsing errors are still reported immediately.
- Mounted diagrams share one resize observer with their zoom controls.
- Diagrams that cannot be zoomed no longer attach wheel or gesture listeners, avoiding unnecessary delays when scrolling.
Fixes
- Fixed diagrams using outdated font measurements after a web font loads while they are hidden.
- Fixed failed updates losing track of font changes.
- Prevented pending font loads from keeping removed diagrams in memory.
- Fixed rendering failures caused by newer JavaScript methods unavailable in Safari 15.0.
- Fixed zoom focus handling in browsers without
:focus-visiblesupport.
Breaking changes
- Removed
watchfrommount()andenableZoom(). Container resizing is now always observed. - Removed
Mounted.fit(). Userefresh()instead. Mounted.update()andMounted.refresh()no longer return a result. ReadMounted.resultfor the current drawing.- Removed
Zoom.resized().
1.4.0
Improved layouts for narrow screens across diagram types:
- Sequence diagrams wrap participant names, messages and notes. Railroad diagrams fold long sequences onto connected rows.
- Journey and event modeling diagrams support vertical layouts. Ishikawa diagrams switch to a vertical cause tree.
- Packet diagrams split fields into shorter rows, preserving bit numbers and labels.
- Tree views wrap filenames and place descriptions beneath them. Architecture, block, C4, quadrant and Wardley diagrams use space more efficiently.
- Swimlanes switch to vertical flows on narrow screens while keeping steps in their lanes.
- Improved swimlane routing to separate handoffs and decision return paths, avoid obstacles, and reduce unnecessary spacing.
- Improved C4 routing around shapes and boundaries, with clearer separation between connections and labels kept beside their arrows.
1.3.0
New
render()accepts a model returned byparse(), so the same diagram can be rendered at different widths or with different fonts without parsing again.parse()now acceptsconfig.mount()supportswatch: falsefor apps that manage resizing and font loading themselves. Callfit()after resizing andrefresh()after font or theme changes.- Exported
forgetTextWidths()to clear cached measurements after a web font loads. enableZoom()supportswatch: false, withresized()for host-managed resizing.- Added
links: falseandimages: falseto omit all diagram links and images, including relative addresses and internal links.
Improvements
- Mounted diagrams parse once and reuse the model for subsequent renders.
- Mounting a new diagram in the same container stops the previous mount.
Fixes
- Removed diagrams and font-listener bookkeeping can be garbage collected without calling
destroy(). - Diagrams mounted or updated outside the document are measured again when reinserted.
refresh()transfers observation and remeasures fonts after a diagram moves to another window.- Failed updates preserve the previous diagram. If
onRenderthrows after rendering, the new drawing remains committed. - Disallowed link targets and images are omitted instead of replaced with
about:blank, preventing blocked links from navigating to a blank page.
1.2.0
- Improved flowchart and state-diagram connections with simpler curves, better spacing between edges, and clearer arrowheads and labels.
- Flowcharts preserve the order of nodes as written when rearranging them would not reduce crossings.
- Stepped flowchart connections use separate tracks and rounded corners.
- Added
--pele-criticalfor critical Gantt tasks and high Kanban priorities. Low Kanban priorities use the muted color. Gantt task labels have more space beside their bars. - XY chart lines render over bars regardless of declaration order. When
showDataLabelis enabled, bar values appear outside the bars;showDataLabelOutsideBarno longer changes their position. - Added the
linkRelrender option to set therelattribute on every diagram link, including internal links. It defaults tonoopener. Usenoopener nofollowto addnofollow, or an empty string to omit the attribute. - Expanded the website’s examples with a page for each diagram type, including Mermaid’s documentation examples and additional layout examples. Example cards adapt to their container width.
1.1.1
- Fixed zoom resetting immediately in a block container.
1.1.0
- Added zoom controls. Allow diagrams to be zoomed and panned, with buttons, pinch, Ctrl/⌘ + wheel, drag, double-click and keyboard. On by default with
mount()(zoom: 'auto' | true | false), and available for any rendered SVG withenableZoom(). - Added corner radius variable
--pele-radius.
1.0.4
Limit flowcharts to 5,000 edges by default. Change the limit with the new maxEdges option.