Skip to content

Releases: obsidianmd/pele

1.6.0

Choose a tag to compare

@github-actions github-actions released this 17 Oct 14:36
  • 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.source and Mounted.error. Mounted.result is now undefined until a diagram renders successfully.
  • onError now 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-error to 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

Choose a tag to compare

@github-actions github-actions released this 15 Oct 19:36

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

Choose a tag to compare

@github-actions github-actions released this 15 Oct 19:29

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 next refresh(). 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

Choose a tag to compare

@github-actions github-actions released this 15 Oct 17:11

New

  • Added pele/global, a browser script that exposes the full API as the global pele for use with a <script> tag.
  • Added a sanitize option to mount() for passing SVG through your app’s sanitizer before insertion.
  • Added an onError callback to mount() 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-visible support.

Breaking changes

  • Removed watch from mount() and enableZoom(). Container resizing is now always observed.
  • Removed Mounted.fit(). Use refresh() instead.
  • Mounted.update() and Mounted.refresh() no longer return a result. Read Mounted.result for the current drawing.
  • Removed Zoom.resized().

1.4.0

Choose a tag to compare

@github-actions github-actions released this 14 Oct 18:02

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

Choose a tag to compare

@github-actions github-actions released this 09 Oct 22:55

New

  • render() accepts a model returned by parse(), so the same diagram can be rendered at different widths or with different fonts without parsing again. parse() now accepts config.
  • mount() supports watch: false for apps that manage resizing and font loading themselves. Call fit() after resizing and refresh() after font or theme changes.
  • Exported forgetTextWidths() to clear cached measurements after a web font loads.
  • enableZoom() supports watch: false, with resized() for host-managed resizing.
  • Added links: false and images: false to 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 onRender throws 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

Choose a tag to compare

@github-actions github-actions released this 09 Oct 14:40
  • 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-critical for 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 showDataLabel is enabled, bar values appear outside the bars; showDataLabelOutsideBar no longer changes their position.
  • Added the linkRel render option to set the rel attribute on every diagram link, including internal links. It defaults to noopener. Use noopener nofollow to add nofollow, 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

Choose a tag to compare

@github-actions github-actions released this 07 Oct 04:03
  • Fixed zoom resetting immediately in a block container.

1.1.0

Choose a tag to compare

@github-actions github-actions released this 07 Oct 03:18
  • 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 with enableZoom().
  • Added corner radius variable --pele-radius.

1.0.4

Choose a tag to compare

@github-actions github-actions released this 06 Oct 23:26

Limit flowcharts to 5,000 edges by default. Change the limit with the new maxEdges option.