- Markdown blocks (
|md ... |) now render in the SVG preview again. D2 emits Markdown as<foreignObject>, which the preview's SVG sanitizer previously stripped, leaving such blocks blank.
- Authoritative SVG sanitization now runs in-browser via a bundled DOMPurify (3.4.10). The SVG is base64-encoded and sanitized before it is inserted into the DOM, so embedded scripts never execute.
<foreignObject>is re-allowed with scripts,on*handlers,javascript:URLs, and<iframe>still removed.
- Plugin verification configuration for local compatibility checks (
./gradlew verifyPlugin)
- SVG sanitization and process environment hardening for preview rendering
- Markdown preview D2 rendering (used experimental Markdown plugin APIs that caused compatibility warnings)
- WSL2 support: run D2 CLI through Windows Subsystem for Linux with a new "Use WSL" toggle and optional distribution selector in settings
- Style property autocomplete: suggests 19 D2 style properties (
opacity,fill,stroke,font-size,bold, etc.) when typing insidestyle { }blocks, with automatic exclusion of already-defined properties
- Theme-aware scrollbar styling in SVG preview that adapts to light and dark themes
- Configurable preview background with five options: IDE Theme (matches your editor), Transparent (checkerboard), Light, Dark, and Custom (with color picker)
- Preview rendering now uses stdin and the original file's directory for D2 CLI execution, fixing issues with imports and relative paths in D2 files
- Makefile with version bumping and common development tasks
- Export support for additional formats: PDF, TXT, and PPTX (in addition to existing SVG and PNG)
- Copy to clipboard button in preview status bar for error messages
- Removed deprecated API usage in the completion auto-popup implementation.
- Comprehensive autocomplete feature:
- Identifier completion: Suggests defined objects and connections from the current file
- Node property completion: Suggests
shape,icon,style, andlabelproperties when inside node blocks, excluding already-defined properties - Shape value completion: Suggests all 18 available D2 shapes (rectangle, circle, diamond, etc.) after
shape:property - Dynamic refresh: Autocomplete list updates as you type, picking up newly added identifiers
- Context-aware: Excludes the current node name when completing inside that node's block
- Improved syntax highlighting: numbers with units (e.g.,
283.56USD) are no longer incorrectly highlighted as numeric literals.
- Live SVG preview support for rendering D2 diagrams with compositions.
- Preview mode toggle (PNG or SVG/HTML) to the preview toolbar.
- Export now matches the active preview mode (.png or .svg).
- Configurable auto-refresh debounce delay in D2 settings.
--animate-interval=1000support for multi-step diagrams (layers/scenarios/steps).
- Changing D2 settings now automatically re-renders the preview.