terrastruct / d2 Goto Github PK
View Code? Open in Web Editor NEWD2 is a modern diagram scripting language that turns text to diagrams.
Home Page: https://d2lang.com
License: Mozilla Public License 2.0
D2 is a modern diagram scripting language that turns text to diagrams.
Home Page: https://d2lang.com
License: Mozilla Public License 2.0
If something does panic within D2, the CLI should include a link to Github issues in the terminal display in case users want to report it.
something to do with font sizes and baselines
like building a .deb from the latest release and installing that. See docs on --edge
.
classes should aggregate styles so you don't have to apply the same set of styles in a bunch of places
Currently we base64 encode fonts (to WOFF mimetype) and include directly in the SVG. This is to ensure the SVG has reproducible appearance everywhere and regardless of network connections.
However, this can make the SVG file unwieldy:
The alternatives are:
dagre doesn't handle container connections so the solution is to connect to a container's child, then cut the edge at the container's border. This works well if something outside is connecting to the container, but if it is from a child/descendant, then it will show up as an edge between descendants. Perhaps we can add a dummy node outside the container, and use that for connections going to a container from a descendant.
example:
container.first -> container.second: 1->2
container -> container.second: container->2
autocomplete list of shapes, choosing objects accessible from scope, etc
just need to figure out how to adjust textmeasure accordingly, which will take some digging
By sources I mean whether it's bundled or if not, where the binary is.
Make sure it doesn't clash with label, use a default width/height
d2 ./static/d2/*.d2 ./static/generated/*.svg
https://github.com/kieler/elkjs
Should be a plugin like dagre.
Allow layout plugins to adjust the output SVG if they were used.
i can't find an open-source standalone renderer for sequence diagrams. There's some that are integrated into other tools, but they're coupled with their tool. Might have to build one from scratch, which shouldn't be too hard.
Will probably also have to modify syntax
Standalone code snippets are implemented, but markdown can also have code blocks that need to be brought under the fold of consistent measurements, font, syntax highlighting
Should be clear that we're just documenting what the code bundles apart from the Go stdlib and our own code.
e.g. parent.*.shape: oval
.
Just have to watch out for ambiguous syntax
And the &
symbol as a followup.
Change every circle red:
*: {
&shape: circle
style.fill: red
}
just dealing with CGO
allow CLI to pass a flag to syntax highlighter for both standalone code snippets and markdown code blocks
Not sure what the best way is. For customization, perhaps a .config
extension that overrides themes colors?
Currently the renderer adds a bit of padding around the bounding box, but it should be configurable
Binary include/exclude, or number? E.g. xPadding=40 yPadding=0. Probably just binary
Layouts might be non-instant, can throw a loading sign/animation up for larger diagrams.
Can auto-create a SQL table diagram
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.