Pele – Mermaid diagrams as themeable SVG(pele.run) |
Pele – Mermaid diagrams as themeable SVG(pele.run) |
[1]: https://d2lang.com/
Why not
tech that approaches new change with religious recklessness rather than critical thinking will lose out because of users that are tired of regressions and breakages.Styling seems like a trivial problem by comparison.
The playground also has a Compare mode https://pele.run/playground
Have you given much thought to diffing diagrams? The source can be version controlled and a source diff can be seen, but a visual diff would be amazing and easily sway me from writing prose to writing diagrams.
Edit: So is #7 (and almost #8), #9, 10, 11, 12 are identical as well
I use a build script for my static website that renders markdown files into HTML files and swaps out any mermaid codeblocks with rendered SVGs. I used mermaidjs for this but it is very heavy for this purpose (needs an entire chromium instance for the rendering).
This seemed like a perfect fit for my use case and I already swapped it in. I noticed that the layouts were not 1 to 1, but to my pleasant surprise I actually liked the ones Pele renders better than mermaidjs.
This, in and of itself, is sufficient reason for me to switch, even if it were slower than Mermaid.js.
I’ve not even made it through the list yet and I’m sold.
Much of the work uses SVG as an intermediary so this Pele pattern works great. OP is a TypeScript project, seems great for that ecosystem.
Searching found this go-mermaid library [1] that operates similarly with SVG its target. We have a Golang TUI picture/SVG widget and a Golang WASM/browser embedder, so I just forked it and had an LLM add a live Mermaid/SVG demo using them [2]. The demo is intended for go-mermaid so it uses its rasterizer, composited to our widget.
(took <15 minutes since I had worked similarly just days ago and had the components at the ready, plus could point at Pele; these LLMs are ridiculous at forging from patterns)
Cool thing is that same visual experience can be had in a terminal if it supports Kitty graphics protocol.
It still boggles my mind that mermaid's devs think you need an entire freakin' browser to render an SVG. Sometimes I think people need to be reminded of the fundamentals.
I tried to find the source code of it but I was unable in finding so
Edit: found it, https://github.com/obsidianmd/pele
Also folks, this is a good reminder to please have a github icon on the top of the page to easily show git/github links if the app is open source, also helps in the fact that I can star your projects and bookmark them more easily :-D
> Mermaid.js has transitioned to "mermaid.ai" and is losing its original vision. Take a look at their new site.
> The latest version of Mermaid (12.1) ships with yet another layout engine (three now), and has a questionable safety record (see CVEs). In Obsidian 1.13 we had to introduce a new toggle/warning because of potential unsafe Mermaid diagrams.
Adoption of coding agents is motivated by understanding and productivity. That's not traditionally a religious aspiration.
In software engineering, and in so many other settings too, LLMs can act as a strong catalyst, or strong damper for curiosity and critical thinking. The same way that when you used to find a thread on StackOverflow about the exact problem you were facing, you could either copy/paste the solution and forge ahead, or else use those breadcrumbs to research and more deeply understand the problem and its prospective solutions -- you can drive the model to the same effect.
If you are looking to think critically, it can be an absolutely fantastic partner in that endeavor. If you are looking to slap together a solution for a problem you don't care to understand, it can do that too. How you want to use it is up to you. And how other people use it can and will be everywhere across that spectrum.
Joining “thinking critically” and a tool that has no truth basis is concerning. You may as well put numbers inside a raffle box and just take one out instead of using a calculator.
There’s no definition of correct that LLM tooling enforces, so how can it be a partner in thinking?
That’s the main issue with slop coding. It would be way more useful to send pseudocode out if you can. Logical semantic is always independent of programming syntax. No need to generate code.
Good layout is a lot more like writing, in that you have to think about how the intended recipient will perceive and what you want them to notice in which order, and how to make it easy to follow the various relationships