Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
d2renderers/d2latex/mathjax.js
d2renderers/d2latex/polyfills.js
d2renderers/d2latex/setup.js
d2renderers/d2sketch/rough.js
lib/png/generate_png.js
d2js
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,9 @@ D2 intends to integrate with a variety of layout engines, e.g. `dot`, as well as
single-purpose layout types like sequence diagrams. You can choose whichever layout engine
you like and works best for the diagram you're making.

Sketch-mode rendering uses [rough-go](https://github.com/d2lang/rough-go), a native Go
port of Rough.js 4.0.4.

## Comparison

For a comparison against other popular text-to-diagram tools, see
Expand Down
32 changes: 32 additions & 0 deletions THIRD_PARTY_NOTICES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,38 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Rough-go
https://github.com/d2lang/rough-go

Rough-go is a native Go port of Rough.js 4.0.4. The port is based on:

Rough.js 4.0.4
https://github.com/rough-stuff/rough
commit 35302b8f1119ad004b4550f9a4d4162d3d845b0a

MIT License

Copyright (c) 2019 Preet Shihn
Copyright (c) 2026 rough-go contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

elk-go
https://github.com/d2lang/elk-go

Expand Down
1 change: 1 addition & 0 deletions ci/release/changelogs/next.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#### Improvements 🧹

- d2dagre: replace the embedded JavaScript runtime with the native Go Dagro port without changing layout output
- d2sketch: replace the embedded Rough.js runtime with the native Go rough-go port without changing sketch output
- d2elk: replace the embedded JavaScript runtime with the native Go elk-go port, preserving layouts apart from sub-pixel floating-point rounding
- d2ascii:
- sql_table and uml class shapes are supported [#2623](https://github.com/d2lang/d2/pull/2623)
Expand Down
32 changes: 32 additions & 0 deletions d2js/js/THIRD_PARTY_NOTICES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,38 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Rough-go
https://github.com/d2lang/rough-go

Rough-go is a native Go port of Rough.js 4.0.4. The port is based on:

Rough.js 4.0.4
https://github.com/rough-stuff/rough
commit 35302b8f1119ad004b4550f9a4d4162d3d845b0a

MIT License

Copyright (c) 2019 Preet Shihn
Copyright (c) 2026 rough-go contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

elk-go
https://github.com/d2lang/elk-go

Expand Down
4 changes: 4 additions & 0 deletions d2renderers/d2sketch/NOTICE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
The native sketch renderer uses rough-go, a Go port of Rough.js 4.0.4.

Source and license details are included in the repository-root
THIRD_PARTY_NOTICES.txt and in https://github.com/d2lang/rough-go.
Loading
Loading