+
+
+
https://user-images.githubusercontent.com/3120367/206125010-bd1fea8e-248a-43e7-8f85-0bbfca0c6e2a.mp4
@@ -238,7 +243,7 @@ let us know and we'll be happy to include it here!
### Community plugins
-- **Tree-sitter grammar**: [https://git.pleshevski.ru/pleshevskiy/tree-sitter-d2](https://git.pleshevski.ru/pleshevskiy/tree-sitter-d2)
+- **Tree-sitter grammar**: [https://github.com/ravsii/tree-sitter-d2](https://github.com/ravsii/tree-sitter-d2)
- **Emacs major mode**: [https://github.com/andorsk/d2-mode](https://github.com/andorsk/d2-mode)
- **Goldmark extension**: [https://github.com/FurqanSoftware/goldmark-d2](https://github.com/FurqanSoftware/goldmark-d2)
- **Telegram bot**: [https://github.com/meinside/telegram-d2-bot](https://github.com/meinside/telegram-d2-bot)
@@ -261,12 +266,16 @@ let us know and we'll be happy to include it here!
- **ent2d2**: [https://github.com/tmc/ent2d2](https://github.com/tmc/ent2d2)
- **MkDocs Plugin**: [https://github.com/landmaj/mkdocs-d2-plugin](https://github.com/landmaj/mkdocs-d2-plugin)
- **Remark Plugin**: [https://github.com/mech-a/remark-d2](https://github.com/mech-a/remark-d2)
+- **VitePress Plugin**: [https://github.com/BadgerHobbs/vitepress-plugin-d2](https://github.com/BadgerHobbs/vitepress-plugin-d2)
- **Zed extension**: [https://github.com/gabeidx/zed-d2](https://github.com/gabeidx/zed-d2)
+- **Hexo blog extension**: [https://github.com/leverimmy/hexo-d2](https://github.com/leverimmy/hexo-d2)
+- **Rehype Plugin**: [https://github.com/stereobooster/beoe/tree/main/packages/rehype-d2](https://github.com/stereobooster/beoe/tree/main/packages/rehype-d2)
### Misc
- **Comparison site**: [https://github.com/terrastruct/text-to-diagram-site](https://github.com/terrastruct/text-to-diagram-site)
- **Playground**: [https://github.com/terrastruct/d2-playground](https://github.com/terrastruct/d2-playground)
+- **IDE (paid)**: [https://app.terrastruct.com](https://app.terrastruct.com)
- **Language docs**: [https://github.com/terrastruct/d2-docs](https://github.com/terrastruct/d2-docs)
- **Hosted icons**: [https://icons.terrastruct.com](https://icons.terrastruct.com)
diff --git a/ci/peek-wasm-size.sh b/ci/peek-wasm-size.sh
new file mode 100755
index 000000000..5c3f85896
--- /dev/null
+++ b/ci/peek-wasm-size.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+OUTPUT_FILE="main.wasm"
+SOURCE_PACKAGE="./d2js"
+
+echo "Building WASM file..."
+GOOS=js GOARCH=wasm go build -ldflags='-s -w' -trimpath -o "$OUTPUT_FILE" "$SOURCE_PACKAGE"
+
+if [ $? -eq 0 ]; then
+ echo "Build successful."
+
+ if [ -f "$OUTPUT_FILE" ]; then
+ FILE_SIZE_BYTES=$(stat -f%z "$OUTPUT_FILE")
+ FILE_SIZE_MB=$(echo "scale=2; $FILE_SIZE_BYTES / 1024 / 1024" | bc)
+
+ echo "File size of $OUTPUT_FILE: $FILE_SIZE_MB MB"
+ else
+ echo "File $OUTPUT_FILE not found!"
+ exit 1
+ fi
+
+ echo "Deleting $OUTPUT_FILE..."
+ rm "$OUTPUT_FILE"
+ echo "File deleted."
+else
+ echo "Build failed."
+ exit 1
+fi
diff --git a/ci/release/build_in_docker.sh b/ci/release/build_in_docker.sh
index cbfcbcdec..839449137 100755
--- a/ci/release/build_in_docker.sh
+++ b/ci/release/build_in_docker.sh
@@ -4,7 +4,7 @@ cd -- "$(dirname "$0")/../.."
. ./ci/sub/lib.sh
tag="$(sh_c docker build \
- --build-arg GOVERSION="1.22.2.linux-$ARCH" \
+ --build-arg GOVERSION="1.23.6.linux-$ARCH" \
-qf ./ci/release/linux/Dockerfile ./ci/release/linux)"
docker_run \
-e DRY_RUN \
diff --git a/ci/release/changelogs/next.md b/ci/release/changelogs/next.md
index 41f1becc9..65780a72c 100644
--- a/ci/release/changelogs/next.md
+++ b/ci/release/changelogs/next.md
@@ -1,13 +1,9 @@
#### Features 🚀
-- Render: SVG files render in non-browser contexts (e.g. Inkscape, LaTeX) [#2147](https://github.com/terrastruct/d2/pull/2147)
-
#### Improvements 🧹
-- Lib: removes a dependency on external slog that was causing troubles with installation [#2137](https://github.com/terrastruct/d2/pull/2137)
-- CLI: attempts writing to path atomically, falling back to non-atomic if failed [#2141](https://github.com/terrastruct/d2/pull/2141)
-- Export: pptx has "created at" metadata removed, so successive runs yield the same result [#2169](https://github.com/terrastruct/d2/pull/2160)
-
#### Bugfixes ⛑️
-- Render: fixes edge case of a 3d shape with outside label being cut off [#2132](https://github.com/terrastruct/d2/pull/2132)
+---
+
+For the latest d2.js changes, see separate [changelog](https://github.com/terrastruct/d2/blob/master/d2js/js/CHANGELOG.md).
diff --git a/ci/release/changelogs/template.md b/ci/release/changelogs/template.md
index f3c0d2a77..65780a72c 100644
--- a/ci/release/changelogs/template.md
+++ b/ci/release/changelogs/template.md
@@ -3,3 +3,7 @@
#### Improvements 🧹
#### Bugfixes ⛑️
+
+---
+
+For the latest d2.js changes, see separate [changelog](https://github.com/terrastruct/d2/blob/master/d2js/js/CHANGELOG.md).
diff --git a/ci/release/changelogs/v0.6.8.md b/ci/release/changelogs/v0.6.8.md
new file mode 100644
index 000000000..74c24db4b
--- /dev/null
+++ b/ci/release/changelogs/v0.6.8.md
@@ -0,0 +1,17 @@
+#### Features 🚀
+
+- Render: SVG files render in non-browser contexts (e.g. Inkscape, LaTeX) [#2147](https://github.com/terrastruct/d2/pull/2147)
+
+#### Improvements 🧹
+
+- Lib: removes a dependency on external slog that was causing troubles with installation [#2137](https://github.com/terrastruct/d2/pull/2137)
+- CLI: attempts writing to path atomically, falling back to non-atomic if failed [#2141](https://github.com/terrastruct/d2/pull/2141)
+- Export: pptx has "created at" metadata removed, so successive runs yield the same result [#2169](https://github.com/terrastruct/d2/pull/2160)
+- Formatter: empty board keywords (e.g. `layers`) are removed [#2178](https://github.com/terrastruct/d2/pull/2178)
+- Render: a tooltip or link by itself will not expand width of shape [#2183](https://github.com/terrastruct/d2/pull/2183)
+
+#### Bugfixes ⛑️
+
+- Render: fixes edge case of a 3d shape with outside label being cut off [#2132](https://github.com/terrastruct/d2/pull/2132)
+- Composition: labels for boards set with shorthand `x: y` was not applied [#2182](https://github.com/terrastruct/d2/pull/2182)
+- Globs: double globs (`**`) were erroring when used with multiple scenario boards [#2195](https://github.com/terrastruct/d2/pull/2195)
diff --git a/ci/release/changelogs/v0.6.9.md b/ci/release/changelogs/v0.6.9.md
new file mode 100644
index 000000000..fb288461e
--- /dev/null
+++ b/ci/release/changelogs/v0.6.9.md
@@ -0,0 +1,35 @@
+#### Features 🚀
+
+- Animations: `style.animated: true` is supported on shapes [#2250](https://github.com/terrastruct/d2/pull/2250)
+- Connections now support `link` [#1955](https://github.com/terrastruct/d2/pull/1955)
+- Vars: vars in markdown blocks are substituted [#2218](https://github.com/terrastruct/d2/pull/2218)
+- Markdown: Github-flavored tables work in `md` blocks [#2221](https://github.com/terrastruct/d2/pull/2221)
+- Render: adds box arrowheads [#2227](https://github.com/terrastruct/d2/issues/2227)
+- `d2 fmt` now supports a `--check` flag [#2253](https://github.com/terrastruct/d2/pull/2253)
+- CLI: PNG output to stdout is supported using `--stdout-format png -` [#2291](https://github.com/terrastruct/d2/pull/2291)
+- Globs: `&connected` and `&leaf` filters are implemented [#2299](https://github.com/terrastruct/d2/pull/2299)
+- CLI: add --no-xml-tag for direct HTML embedding [#2302](https://github.com/terrastruct/d2/pull/2302)
+- CLI: `play` cmd added for opening d2 input in online playground [#2242](https://github.com/terrastruct/d2/pull/2242)
+
+#### Improvements 🧹
+
+- Composition: links pointing to own board are purged [#2203](https://github.com/terrastruct/d2/pull/2203)
+- Syntax: reserved keywords must be unquoted [#2231](https://github.com/terrastruct/d2/pull/2231)
+- Latex: Backslashes in Latex blocks do not escape [#2232](https://github.com/terrastruct/d2/pull/2232)
+ - This is a breaking change. Previously Latex blocks required escaping the backslash. So
+ for older D2 versions, you should remove the excess backslashes.
+- Links: non-http url scheme links are supported (e.g. `x.link: vscode://file/`) [#2237](https://github.com/terrastruct/d2/issues/2237)
+- Compiler: reserved keywords with missing values error instead of silently doing nothing [#2251](https://github.com/terrastruct/d2/pull/2251)
+- Render: SVG outputs conform to stricter HTML standards, e.g. no duplicate ids [#2273](https://github.com/terrastruct/d2/issues/2273)
+- Themes: theme names are consistently cased [#2322](https://github.com/terrastruct/d2/pull/2322)
+- Nears: constant nears avoid collision with edge routes [#2327](https://github.com/terrastruct/d2/pull/2327)
+
+#### Bugfixes ⛑️
+
+- Imports: fixes using substitutions in `icon` values [#2207](https://github.com/terrastruct/d2/pull/2207)
+- Markdown: fixes ampersands in URLs in markdown [#2219](https://github.com/terrastruct/d2/pull/2219)
+- Globs: fixes edge case where globs with imported boards would create empty boards [#2247](https://github.com/terrastruct/d2/pull/2247)
+- Sequence diagrams: fixes alignment of notes when self messages are above it [#2264](https://github.com/terrastruct/d2/pull/2264)
+- Null: fixes `null`ing a connection with absolute syntax [#2318](https://github.com/terrastruct/d2/issues/2318)
+- Gradients: works with connection fills [#2326](https://github.com/terrastruct/d2/pull/2326)
+- Latex: fixes backslashes doubling on successive parses [#2328](https://github.com/terrastruct/d2/pull/2328)
diff --git a/ci/release/changelogs/v0.7.0.md b/ci/release/changelogs/v0.7.0.md
new file mode 100644
index 000000000..b1828ca77
--- /dev/null
+++ b/ci/release/changelogs/v0.7.0.md
@@ -0,0 +1,59 @@
+#### Features 🚀
+
+- Icons:
+ - connections can include icons [#12](https://github.com/terrastruct/d2/issues/12)
+- Syntax:
+ - `suspend`/`unsuspend` to define models and instantiate them [#2394](https://github.com/terrastruct/d2/pull/2394)
+- Globs:
+ - support for filtering edges based on properties of endpoint nodes (e.g., `&src.style.fill: blue`) [#2395](https://github.com/terrastruct/d2/pull/2395)
+ - `level` filter implemented [#2473](https://github.com/terrastruct/d2/pull/2473)
+- Render:
+ - markdown, latex, and code can be used as object labels [#2204](https://github.com/terrastruct/d2/pull/2204)
+ - `shape: c4-person` to render a person shape like what the C4 model prescribes [#2397](https://github.com/terrastruct/d2/pull/2397)
+- Icons:
+ - border-radius should work on icon [#2409](https://github.com/terrastruct/d2/issues/2409)
+- Misc:
+ - Diagram legends are implemented [#2416](https://github.com/terrastruct/d2/pull/2416)
+
+#### Improvements 🧹
+
+- CLI:
+ - Support `validate` command. [#2415](https://github.com/terrastruct/d2/pull/2415)
+ - Watch mode ignores backup files (e.g. files created by certain editors like Helix). [#2131](https://github.com/terrastruct/d2/issues/2131)
+ - Support for `--omit-version` flag. [#2377](https://github.com/terrastruct/d2/issues/2377)
+ - Casing is ignored for plugin names [#2486](https://github.com/terrastruct/d2/pull/2486)
+- Compiler:
+ - `link`s can be set to root path, e.g. `/xyz`. [#2357](https://github.com/terrastruct/d2/issues/2357)
+ - When importing a file, attempt resolving substitutions at the imported file scope first [#2482](https://github.com/terrastruct/d2/pull/2482)
+ - validate gradient color stops. [#2492](https://github.com/terrastruct/d2/pull/2492)
+- Parser:
+ - impose max key length. It's almost certainly a mistake if an ID gets too long, e.g. missing quotes [#2465](https://github.com/terrastruct/d2/pull/2465)
+- Render:
+ - horizontal padding added for connection labels [#2461](https://github.com/terrastruct/d2/pull/2461)
+
+#### Bugfixes ⛑️
+
+- Compiler:
+ - fixes panic when `sql_shape` shape value had mixed casing [#2349](https://github.com/terrastruct/d2/pull/2349)
+ - fixes panic when importing from a file with spread substitutions in `vars` [#2427](https://github.com/terrastruct/d2/pull/2427)
+ - fixes support for `center` in `d2-config` [#2360](https://github.com/terrastruct/d2/pull/2360)
+ - fixes panic when comment lines appear in arrays [#2378](https://github.com/terrastruct/d2/pull/2378)
+ - fixes inconsistencies when objects were double quoted [#2390](https://github.com/terrastruct/d2/pull/2390)
+ - fixes globs not applying to spread substitutions [#2426](https://github.com/terrastruct/d2/issues/2426)
+ - fixes panic when classes were mixed with layers incorrectly [#2448](https://github.com/terrastruct/d2/pull/2448)
+ - fixes panic when gradient colors are used in sketch mode [#2481](https://github.com/terrastruct/d2/pull/2487)
+ - fixes panic using glob ampersand filters with composite values [#2489](https://github.com/terrastruct/d2/pull/2489)
+ - fixes leaf ampersand filter when used with imports [#2494](https://github.com/terrastruct/d2/pull/2494)
+- Formatter:
+ - fixes substitutions in quotes surrounded by text [#2462](https://github.com/terrastruct/d2/pull/2462)
+- CLI:
+ - fetch and render remote images of mimetype octet-stream correctly [#2370](https://github.com/terrastruct/d2/pull/2370)
+- Composition:
+ - spread importing scenarios/steps was not inheriting correctly [#2460](https://github.com/terrastruct/d2/pull/2460)
+ - imported fields were not merging with current fields/edges [#2464](https://github.com/terrastruct/d2/pull/2464)
+- Markdown:
+ - fixes nested var substitutions not working [#2456](https://github.com/terrastruct/d2/pull/2456)
+
+---
+
+For the latest d2.js changes, see separate [changelog](https://github.com/terrastruct/d2/blob/master/d2js/js/CHANGELOG.md).
diff --git a/ci/release/release-js.sh b/ci/release/release-js.sh
new file mode 100755
index 000000000..5cb5abea6
--- /dev/null
+++ b/ci/release/release-js.sh
@@ -0,0 +1,39 @@
+#!/bin/sh
+set -eu
+cd -- "$(dirname "$0")/../.."
+. "./ci/sub/lib.sh"
+
+VERSION=""
+
+help() {
+ cat <