diff --git a/README.md b/README.md index c640b1347..558c43f32 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ defendants: { # Accusations hans -> defendants: 'sueing for $100M' -# Offense +# Claim defendants.naka -> hans: Accused of cheating on his stream defendants.mc -> hans: Lost then withdrew with accusations defendants.chesscom -> hans: 72 page report of cheating diff --git a/ci/release/changelogs/next.md b/ci/release/changelogs/next.md index da3a38d00..743ebcb24 100644 --- a/ci/release/changelogs/next.md +++ b/ci/release/changelogs/next.md @@ -7,6 +7,7 @@ - Display version on CLI help invocation [#1400](https://github.com/terrastruct/d2/pull/1400) - Improved readability of connection labels when they overlap another connection. [#447](https://github.com/terrastruct/d2/pull/447) - Error message when `shape` is given a composite [#1415](https://github.com/terrastruct/d2/pull/1415) +- Improved rendering and text measurement for code shapes. [#1425](https://github.com/terrastruct/d2/pull/1425) - The autoformatter moves board declarations to the bottom of its scope. [#1424](https://github.com/terrastruct/d2/pull/1424) #### Bugfixes ⛑️ diff --git a/d2graph/d2graph.go b/d2graph/d2graph.go index 409e59cf0..a91c95e12 100644 --- a/d2graph/d2graph.go +++ b/d2graph/d2graph.go @@ -903,16 +903,21 @@ func (obj *Object) GetLabelSize(mtexts []*d2target.MText, ruler *textmeasure.Rul func (obj *Object) GetDefaultSize(mtexts []*d2target.MText, ruler *textmeasure.Ruler, fontFamily *d2fonts.FontFamily, labelDims d2target.TextDimensions, withLabelPadding bool) (*d2target.TextDimensions, error) { dims := d2target.TextDimensions{} + dslShape := strings.ToLower(obj.Shape.Value) - if withLabelPadding { + if dslShape == d2target.ShapeCode { + fontSize := obj.Text().FontSize + // 0.5em padding on each side + labelDims.Width += fontSize + labelDims.Height += fontSize + } else if withLabelPadding { labelDims.Width += INNER_LABEL_PADDING labelDims.Height += INNER_LABEL_PADDING } - switch strings.ToLower(obj.Shape.Value) { + switch dslShape { default: return d2target.NewTextDimensions(labelDims.Width, labelDims.Height), nil - case d2target.ShapeText: w := labelDims.Width if w < MIN_SHAPE_SIZE { @@ -1308,31 +1313,29 @@ func GetTextDimensions(mtexts []*d2target.MText, ruler *textmeasure.Ruler, t *d2 var w int var h int if t.Language != "" { - w, h = ruler.Measure(d2fonts.SourceCodePro.Font(t.FontSize, d2fonts.FONT_STYLE_REGULAR), t.Text) + originalLineHeight := ruler.LineHeightFactor + ruler.LineHeightFactor = textmeasure.CODE_LINE_HEIGHT + w, h = ruler.MeasureMono(d2fonts.SourceCodePro.Font(t.FontSize, d2fonts.FONT_STYLE_REGULAR), t.Text) + ruler.LineHeightFactor = originalLineHeight // count empty leading and trailing lines since ruler will not be able to measure it lines := strings.Split(t.Text, "\n") - leadingLines := 0 - for _, line := range lines { - if strings.TrimSpace(line) == "" { - leadingLines++ - } else { - break - } + hasLeading := false + if len(lines) > 0 && strings.TrimSpace(lines[0]) == "" { + hasLeading = true } - trailingLines := 0 + numTrailing := 0 for i := len(lines) - 1; i >= 0; i-- { if strings.TrimSpace(lines[i]) == "" { - trailingLines++ + numTrailing++ } else { break } } - h += t.FontSize * (leadingLines + trailingLines) - - // padding - w += 12 - h += 12 + if hasLeading && numTrailing < len(lines) { + h += t.FontSize + } + h += int(math.Ceil(textmeasure.CODE_LINE_HEIGHT * float64(t.FontSize*numTrailing))) } else { style := d2fonts.FONT_STYLE_REGULAR if t.IsBold { diff --git a/d2renderers/d2fonts/d2fonts.go b/d2renderers/d2fonts/d2fonts.go index 2c692ab35..2e1cad31d 100644 --- a/d2renderers/d2fonts/d2fonts.go +++ b/d2renderers/d2fonts/d2fonts.go @@ -199,6 +199,7 @@ func init() { Family: SourceSansPro, Style: FONT_STYLE_REGULAR, }] = b + b, err = fontFacesFS.ReadFile("ttf/SourceCodePro-Regular.ttf") if err != nil { panic(err) @@ -207,6 +208,7 @@ func init() { Family: SourceCodePro, Style: FONT_STYLE_REGULAR, }] = b + b, err = fontFacesFS.ReadFile("ttf/SourceCodePro-Bold.ttf") if err != nil { panic(err) @@ -215,6 +217,7 @@ func init() { Family: SourceCodePro, Style: FONT_STYLE_BOLD, }] = b + b, err = fontFacesFS.ReadFile("ttf/SourceCodePro-Semibold.ttf") if err != nil { panic(err) @@ -223,6 +226,7 @@ func init() { Family: SourceCodePro, Style: FONT_STYLE_SEMIBOLD, }] = b + b, err = fontFacesFS.ReadFile("ttf/SourceCodePro-Italic.ttf") if err != nil { panic(err) @@ -231,6 +235,7 @@ func init() { Family: SourceCodePro, Style: FONT_STYLE_ITALIC, }] = b + b, err = fontFacesFS.ReadFile("ttf/SourceSansPro-Bold.ttf") if err != nil { panic(err) @@ -239,6 +244,7 @@ func init() { Family: SourceSansPro, Style: FONT_STYLE_BOLD, }] = b + b, err = fontFacesFS.ReadFile("ttf/SourceSansPro-Semibold.ttf") if err != nil { panic(err) @@ -247,6 +253,7 @@ func init() { Family: SourceSansPro, Style: FONT_STYLE_SEMIBOLD, }] = b + b, err = fontFacesFS.ReadFile("ttf/SourceSansPro-Italic.ttf") if err != nil { panic(err) @@ -255,6 +262,7 @@ func init() { Family: SourceSansPro, Style: FONT_STYLE_ITALIC, }] = b + b, err = fontFacesFS.ReadFile("ttf/ArchitectsDaughter-Regular.ttf") if err != nil { panic(err) @@ -267,6 +275,7 @@ func init() { Family: HandDrawn, Style: FONT_STYLE_ITALIC, }] = b + b, err = fontFacesFS.ReadFile("ttf/FuzzyBubbles-Bold.ttf") if err != nil { panic(err) diff --git a/d2renderers/d2svg/d2svg.go b/d2renderers/d2svg/d2svg.go index 0c9c44943..a432c6dc3 100644 --- a/d2renderers/d2svg/d2svg.go +++ b/d2renderers/d2svg/d2svg.go @@ -1263,14 +1263,18 @@ func drawShape(writer io.Writer, diagramHash string, targetShape d2target.Shape, rectEl.Height = float64(targetShape.Height) rectEl.Stroke = targetShape.Stroke rectEl.ClassName = "shape" - rectEl.Style = fmt.Sprintf(`fill:%s`, style.Get(chroma.Background).Background.String()) + rectEl.Style = fmt.Sprintf(`fill:%s;stroke-width:%d;`, + style.Get(chroma.Background).Background.String(), + targetShape.StrokeWidth, + ) fmt.Fprint(writer, rectEl.Render()) - // Padding - fmt.Fprint(writer, ``) + // Padding = 0.5em + padding := float64(targetShape.FontSize) / 2. + fmt.Fprintf(writer, ``, padding, padding) + lineHeight := textmeasure.CODE_LINE_HEIGHT for index, tokens := range chroma.SplitTokensIntoLines(iterator.Tokens()) { - // TODO mono font looks better with 1.2 em (use px equivalent), but textmeasure needs to account for it. Not obvious how that should be done - fmt.Fprintf(writer, "", 1*float64(index+1)) + fmt.Fprintf(writer, "", 1+float64(index)*lineHeight) for _, token := range tokens { text := svgEscaper.Replace(token.String()) attr := styleAttr(svgStyles, token.Type) diff --git a/d2renderers/d2svg/dark_theme/testdata/code/dark_theme.exp.svg b/d2renderers/d2svg/dark_theme/testdata/code/dark_theme.exp.svg index 570b95a17..13ae0815f 100644 --- a/d2renderers/d2svg/dark_theme/testdata/code/dark_theme.exp.svg +++ b/d2renderers/d2svg/dark_theme/testdata/code/dark_theme.exp.svg @@ -1,34 +1,34 @@ -func main() { -  panic("TODO") -}func main() { -  panic("TODO") -}

Five is a sufficiently close approximation to infinity.

-
Don't hit me!!  I'm in the Twilight Zone!!!Don't hit me!!  I'm in the Twilight Zone!!! - - - - +func main() { +  panic("TODO") +}func main() { +  panic("TODO") +}

Five is a sufficiently close approximation to infinity.

+
Don't hit me!!  I'm in the Twilight Zone!!!Don't hit me!!  I'm in the Twilight Zone!!! + + + +
\ No newline at end of file diff --git a/e2etests/regression_test.go b/e2etests/regression_test.go index e542d469e..30362e97d 100644 --- a/e2etests/regression_test.go +++ b/e2etests/regression_test.go @@ -423,6 +423,108 @@ no leading: |python print "world" +| +`, + }, + { + name: "code_leading_newlines", + script: ` +5 leading: |python + + + + + + def hello(): + + print "world" +| +8 total: |python + # 1 leading + # 2 leading + # 3 leading + # 4 leading + # 5 leading + def hello(): + + print "world" +| +1 leading: |python + + def hello(): + + print "world" +| +4 total: |python + # 1 leading + def hello(): + + print "world" +| +2 leading: |python + + + def hello(): + + print "world" +| +5 total: |python + # 1 leading + # 2 leading + def hello(): + + print "world" +| +`, + }, + { + name: "code_trailing_newlines", + script: ` +5 trailing: |python + def hello(): + + print "world" + + + + + +| +8 total: |python + def hello(): + + print "world" + # 1 trailing + # 2 trailing + # 3 trailing + # 4 trailing + # 5 trailing +| +1 trailing: |python + def hello(): + + print "world" + +| +4 total: |python + def hello(): + + print "world" + # 1 trailing +| +2 trailing: |python + def hello(): + + print "world" + + +| +5 total: |python + def hello(): + + print "world" + # 1 trailing + # 2 trailing | `, }, diff --git a/e2etests/testdata/regression/code_leading_newlines/dagre/board.exp.json b/e2etests/testdata/regression/code_leading_newlines/dagre/board.exp.json new file mode 100644 index 000000000..f094c04af --- /dev/null +++ b/e2etests/testdata/regression/code_leading_newlines/dagre/board.exp.json @@ -0,0 +1,288 @@ +{ + "name": "", + "isFolderOnly": false, + "fontFamily": "SourceSansPro", + "shapes": [ + { + "id": "5 leading", + "type": "code", + "pos": { + "x": 0, + "y": 0 + }, + "width": 160, + "height": 182, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "N7", + "stroke": "N1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "\n\n\n\n\ndef hello():\n\n print \"world\"", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "python", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 144, + "labelHeight": 166, + "zIndex": 0, + "level": 1 + }, + { + "id": "8 total", + "type": "code", + "pos": { + "x": 220, + "y": 0 + }, + "width": 160, + "height": 182, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "N7", + "stroke": "N1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "# 1 leading\n# 2 leading\n# 3 leading\n# 4 leading\n# 5 leading\ndef hello():\n\n print \"world\"", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "python", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 144, + "labelHeight": 166, + "zIndex": 0, + "level": 1 + }, + { + "id": "1 leading", + "type": "code", + "pos": { + "x": 440, + "y": 42 + }, + "width": 160, + "height": 99, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "N7", + "stroke": "N1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "\ndef hello():\n\n print \"world\"", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "python", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 144, + "labelHeight": 83, + "zIndex": 0, + "level": 1 + }, + { + "id": "4 total", + "type": "code", + "pos": { + "x": 660, + "y": 42 + }, + "width": 160, + "height": 99, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "N7", + "stroke": "N1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "# 1 leading\ndef hello():\n\n print \"world\"", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "python", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 144, + "labelHeight": 83, + "zIndex": 0, + "level": 1 + }, + { + "id": "2 leading", + "type": "code", + "pos": { + "x": 880, + "y": 31 + }, + "width": 160, + "height": 120, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "N7", + "stroke": "N1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "\n\ndef hello():\n\n print \"world\"", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "python", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 144, + "labelHeight": 104, + "zIndex": 0, + "level": 1 + }, + { + "id": "5 total", + "type": "code", + "pos": { + "x": 1100, + "y": 31 + }, + "width": 160, + "height": 120, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "N7", + "stroke": "N1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "# 1 leading\n# 2 leading\ndef hello():\n\n print \"world\"", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "python", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 144, + "labelHeight": 104, + "zIndex": 0, + "level": 1 + } + ], + "connections": [], + "root": { + "id": "", + "type": "", + "pos": { + "x": 0, + "y": 0 + }, + "width": 0, + "height": 0, + "opacity": 0, + "strokeDash": 0, + "strokeWidth": 0, + "borderRadius": 0, + "fill": "N7", + "stroke": "", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "zIndex": 0, + "level": 0 + } +} diff --git a/e2etests/testdata/regression/code_leading_newlines/dagre/sketch.exp.svg b/e2etests/testdata/regression/code_leading_newlines/dagre/sketch.exp.svg new file mode 100644 index 000000000..0272c2eec --- /dev/null +++ b/e2etests/testdata/regression/code_leading_newlines/dagre/sketch.exp.svg @@ -0,0 +1,170 @@ + + + + + +def hello(): + +  print "world" + + + + +def hello(): + +  print "world"# 1 leading +# 2 leading +# 3 leading +# 4 leading +# 5 leading +def hello(): + +  print "world"# 1 leading +# 2 leading +# 3 leading +# 4 leading +# 5 leading +def hello(): + +  print "world" +def hello(): + +  print "world" +def hello(): + +  print "world"# 1 leading +def hello(): + +  print "world"# 1 leading +def hello(): + +  print "world" + +def hello(): + +  print "world" + +def hello(): + +  print "world"# 1 leading +# 2 leading +def hello(): + +  print "world"# 1 leading +# 2 leading +def hello(): + +  print "world" + + + + + + + + \ No newline at end of file diff --git a/e2etests/testdata/regression/code_leading_newlines/elk/board.exp.json b/e2etests/testdata/regression/code_leading_newlines/elk/board.exp.json new file mode 100644 index 000000000..833e2de59 --- /dev/null +++ b/e2etests/testdata/regression/code_leading_newlines/elk/board.exp.json @@ -0,0 +1,288 @@ +{ + "name": "", + "isFolderOnly": false, + "fontFamily": "SourceSansPro", + "shapes": [ + { + "id": "5 leading", + "type": "code", + "pos": { + "x": 12, + "y": 12 + }, + "width": 160, + "height": 182, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "N7", + "stroke": "N1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "\n\n\n\n\ndef hello():\n\n print \"world\"", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "python", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 144, + "labelHeight": 166, + "zIndex": 0, + "level": 1 + }, + { + "id": "8 total", + "type": "code", + "pos": { + "x": 192, + "y": 12 + }, + "width": 160, + "height": 182, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "N7", + "stroke": "N1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "# 1 leading\n# 2 leading\n# 3 leading\n# 4 leading\n# 5 leading\ndef hello():\n\n print \"world\"", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "python", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 144, + "labelHeight": 166, + "zIndex": 0, + "level": 1 + }, + { + "id": "1 leading", + "type": "code", + "pos": { + "x": 372, + "y": 53 + }, + "width": 160, + "height": 99, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "N7", + "stroke": "N1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "\ndef hello():\n\n print \"world\"", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "python", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 144, + "labelHeight": 83, + "zIndex": 0, + "level": 1 + }, + { + "id": "4 total", + "type": "code", + "pos": { + "x": 552, + "y": 53 + }, + "width": 160, + "height": 99, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "N7", + "stroke": "N1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "# 1 leading\ndef hello():\n\n print \"world\"", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "python", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 144, + "labelHeight": 83, + "zIndex": 0, + "level": 1 + }, + { + "id": "2 leading", + "type": "code", + "pos": { + "x": 732, + "y": 43 + }, + "width": 160, + "height": 120, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "N7", + "stroke": "N1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "\n\ndef hello():\n\n print \"world\"", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "python", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 144, + "labelHeight": 104, + "zIndex": 0, + "level": 1 + }, + { + "id": "5 total", + "type": "code", + "pos": { + "x": 912, + "y": 43 + }, + "width": 160, + "height": 120, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "N7", + "stroke": "N1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "# 1 leading\n# 2 leading\ndef hello():\n\n print \"world\"", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "python", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 144, + "labelHeight": 104, + "zIndex": 0, + "level": 1 + } + ], + "connections": [], + "root": { + "id": "", + "type": "", + "pos": { + "x": 0, + "y": 0 + }, + "width": 0, + "height": 0, + "opacity": 0, + "strokeDash": 0, + "strokeWidth": 0, + "borderRadius": 0, + "fill": "N7", + "stroke": "", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "zIndex": 0, + "level": 0 + } +} diff --git a/e2etests/testdata/regression/code_leading_newlines/elk/sketch.exp.svg b/e2etests/testdata/regression/code_leading_newlines/elk/sketch.exp.svg new file mode 100644 index 000000000..27a59f9fc --- /dev/null +++ b/e2etests/testdata/regression/code_leading_newlines/elk/sketch.exp.svg @@ -0,0 +1,170 @@ + + + + + +def hello(): + +  print "world" + + + + +def hello(): + +  print "world"# 1 leading +# 2 leading +# 3 leading +# 4 leading +# 5 leading +def hello(): + +  print "world"# 1 leading +# 2 leading +# 3 leading +# 4 leading +# 5 leading +def hello(): + +  print "world" +def hello(): + +  print "world" +def hello(): + +  print "world"# 1 leading +def hello(): + +  print "world"# 1 leading +def hello(): + +  print "world" + +def hello(): + +  print "world" + +def hello(): + +  print "world"# 1 leading +# 2 leading +def hello(): + +  print "world"# 1 leading +# 2 leading +def hello(): + +  print "world" + + + + + + + + \ No newline at end of file diff --git a/e2etests/testdata/regression/code_leading_trailing_newlines/dagre/board.exp.json b/e2etests/testdata/regression/code_leading_trailing_newlines/dagre/board.exp.json index 36e468eb3..8bf28c93d 100644 --- a/e2etests/testdata/regression/code_leading_trailing_newlines/dagre/board.exp.json +++ b/e2etests/testdata/regression/code_leading_trailing_newlines/dagre/board.exp.json @@ -10,8 +10,8 @@ "x": 0, "y": 0 }, - "width": 239, - "height": 150, + "width": 238, + "height": 183, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -38,8 +38,8 @@ "italic": false, "bold": true, "underline": false, - "labelWidth": 234, - "labelHeight": 145, + "labelWidth": 222, + "labelHeight": 167, "zIndex": 0, "level": 1 }, @@ -47,11 +47,11 @@ "id": "no trailing", "type": "code", "pos": { - "x": 299, - "y": 16 + "x": 298, + "y": 21 }, "width": 160, - "height": 118, + "height": 141, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -78,8 +78,8 @@ "italic": false, "bold": true, "underline": false, - "labelWidth": 155, - "labelHeight": 113, + "labelWidth": 144, + "labelHeight": 125, "zIndex": 0, "level": 1 }, @@ -87,11 +87,11 @@ "id": "no leading", "type": "code", "pos": { - "x": 519, - "y": 16 + "x": 518, + "y": 21 }, "width": 160, - "height": 118, + "height": 141, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -118,8 +118,8 @@ "italic": false, "bold": true, "underline": false, - "labelWidth": 155, - "labelHeight": 113, + "labelWidth": 144, + "labelHeight": 125, "zIndex": 0, "level": 1 } diff --git a/e2etests/testdata/regression/code_leading_trailing_newlines/dagre/sketch.exp.svg b/e2etests/testdata/regression/code_leading_trailing_newlines/dagre/sketch.exp.svg index 753aab3eb..aa621fc45 100644 --- a/e2etests/testdata/regression/code_leading_trailing_newlines/dagre/sketch.exp.svg +++ b/e2etests/testdata/regression/code_leading_trailing_newlines/dagre/sketch.exp.svg @@ -1,23 +1,23 @@ - - -# 2 leading, 2 trailing -def hello(): - -  print "world" - - - -# 2 leading, 2 trailing -def hello(): - -  print "world" - - - -# 2 leading -def hello(): - -  print "world" - -# 2 leading -def hello(): - -  print "world"# 2 trailing -def hello(): - -  print "world" - -# 2 trailing -def hello(): - -  print "world" - - - - - - + .d2-727258817 .fill-N1{fill:#0A0F25;} + .d2-727258817 .fill-N2{fill:#676C7E;} + .d2-727258817 .fill-N3{fill:#9499AB;} + .d2-727258817 .fill-N4{fill:#CFD2DD;} + .d2-727258817 .fill-N5{fill:#DEE1EB;} + .d2-727258817 .fill-N6{fill:#EEF1F8;} + .d2-727258817 .fill-N7{fill:#FFFFFF;} + .d2-727258817 .fill-B1{fill:#0D32B2;} + .d2-727258817 .fill-B2{fill:#0D32B2;} + .d2-727258817 .fill-B3{fill:#E3E9FD;} + .d2-727258817 .fill-B4{fill:#E3E9FD;} + .d2-727258817 .fill-B5{fill:#EDF0FD;} + .d2-727258817 .fill-B6{fill:#F7F8FE;} + .d2-727258817 .fill-AA2{fill:#4A6FF3;} + .d2-727258817 .fill-AA4{fill:#EDF0FD;} + .d2-727258817 .fill-AA5{fill:#F7F8FE;} + .d2-727258817 .fill-AB4{fill:#EDF0FD;} + .d2-727258817 .fill-AB5{fill:#F7F8FE;} + .d2-727258817 .stroke-N1{stroke:#0A0F25;} + .d2-727258817 .stroke-N2{stroke:#676C7E;} + .d2-727258817 .stroke-N3{stroke:#9499AB;} + .d2-727258817 .stroke-N4{stroke:#CFD2DD;} + .d2-727258817 .stroke-N5{stroke:#DEE1EB;} + .d2-727258817 .stroke-N6{stroke:#EEF1F8;} + .d2-727258817 .stroke-N7{stroke:#FFFFFF;} + .d2-727258817 .stroke-B1{stroke:#0D32B2;} + .d2-727258817 .stroke-B2{stroke:#0D32B2;} + .d2-727258817 .stroke-B3{stroke:#E3E9FD;} + .d2-727258817 .stroke-B4{stroke:#E3E9FD;} + .d2-727258817 .stroke-B5{stroke:#EDF0FD;} + .d2-727258817 .stroke-B6{stroke:#F7F8FE;} + .d2-727258817 .stroke-AA2{stroke:#4A6FF3;} + .d2-727258817 .stroke-AA4{stroke:#EDF0FD;} + .d2-727258817 .stroke-AA5{stroke:#F7F8FE;} + .d2-727258817 .stroke-AB4{stroke:#EDF0FD;} + .d2-727258817 .stroke-AB5{stroke:#F7F8FE;} + .d2-727258817 .background-color-N1{background-color:#0A0F25;} + .d2-727258817 .background-color-N2{background-color:#676C7E;} + .d2-727258817 .background-color-N3{background-color:#9499AB;} + .d2-727258817 .background-color-N4{background-color:#CFD2DD;} + .d2-727258817 .background-color-N5{background-color:#DEE1EB;} + .d2-727258817 .background-color-N6{background-color:#EEF1F8;} + .d2-727258817 .background-color-N7{background-color:#FFFFFF;} + .d2-727258817 .background-color-B1{background-color:#0D32B2;} + .d2-727258817 .background-color-B2{background-color:#0D32B2;} + .d2-727258817 .background-color-B3{background-color:#E3E9FD;} + .d2-727258817 .background-color-B4{background-color:#E3E9FD;} + .d2-727258817 .background-color-B5{background-color:#EDF0FD;} + .d2-727258817 .background-color-B6{background-color:#F7F8FE;} + .d2-727258817 .background-color-AA2{background-color:#4A6FF3;} + .d2-727258817 .background-color-AA4{background-color:#EDF0FD;} + .d2-727258817 .background-color-AA5{background-color:#F7F8FE;} + .d2-727258817 .background-color-AB4{background-color:#EDF0FD;} + .d2-727258817 .background-color-AB5{background-color:#F7F8FE;} + .d2-727258817 .color-N1{color:#0A0F25;} + .d2-727258817 .color-N2{color:#676C7E;} + .d2-727258817 .color-N3{color:#9499AB;} + .d2-727258817 .color-N4{color:#CFD2DD;} + .d2-727258817 .color-N5{color:#DEE1EB;} + .d2-727258817 .color-N6{color:#EEF1F8;} + .d2-727258817 .color-N7{color:#FFFFFF;} + .d2-727258817 .color-B1{color:#0D32B2;} + .d2-727258817 .color-B2{color:#0D32B2;} + .d2-727258817 .color-B3{color:#E3E9FD;} + .d2-727258817 .color-B4{color:#E3E9FD;} + .d2-727258817 .color-B5{color:#EDF0FD;} + .d2-727258817 .color-B6{color:#F7F8FE;} + .d2-727258817 .color-AA2{color:#4A6FF3;} + .d2-727258817 .color-AA4{color:#EDF0FD;} + .d2-727258817 .color-AA5{color:#F7F8FE;} + .d2-727258817 .color-AB4{color:#EDF0FD;} + .d2-727258817 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]> + +# 2 leading, 2 trailing +def hello(): + +  print "world" + + + +# 2 leading, 2 trailing +def hello(): + +  print "world" + + + +# 2 leading +def hello(): + +  print "world" + +# 2 leading +def hello(): + +  print "world"# 2 trailing +def hello(): + +  print "world" + +# 2 trailing +def hello(): + +  print "world" + + + + + + \ No newline at end of file diff --git a/e2etests/testdata/regression/code_leading_trailing_newlines/elk/board.exp.json b/e2etests/testdata/regression/code_leading_trailing_newlines/elk/board.exp.json index 4bec6de83..239a9eeb0 100644 --- a/e2etests/testdata/regression/code_leading_trailing_newlines/elk/board.exp.json +++ b/e2etests/testdata/regression/code_leading_trailing_newlines/elk/board.exp.json @@ -10,8 +10,8 @@ "x": 12, "y": 12 }, - "width": 239, - "height": 150, + "width": 238, + "height": 183, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -38,8 +38,8 @@ "italic": false, "bold": true, "underline": false, - "labelWidth": 234, - "labelHeight": 145, + "labelWidth": 222, + "labelHeight": 167, "zIndex": 0, "level": 1 }, @@ -47,11 +47,11 @@ "id": "no trailing", "type": "code", "pos": { - "x": 271, - "y": 28 + "x": 270, + "y": 33 }, "width": 160, - "height": 118, + "height": 141, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -78,8 +78,8 @@ "italic": false, "bold": true, "underline": false, - "labelWidth": 155, - "labelHeight": 113, + "labelWidth": 144, + "labelHeight": 125, "zIndex": 0, "level": 1 }, @@ -87,11 +87,11 @@ "id": "no leading", "type": "code", "pos": { - "x": 451, - "y": 28 + "x": 450, + "y": 33 }, "width": 160, - "height": 118, + "height": 141, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -118,8 +118,8 @@ "italic": false, "bold": true, "underline": false, - "labelWidth": 155, - "labelHeight": 113, + "labelWidth": 144, + "labelHeight": 125, "zIndex": 0, "level": 1 } diff --git a/e2etests/testdata/regression/code_leading_trailing_newlines/elk/sketch.exp.svg b/e2etests/testdata/regression/code_leading_trailing_newlines/elk/sketch.exp.svg index 9b953ab2f..557f1bc14 100644 --- a/e2etests/testdata/regression/code_leading_trailing_newlines/elk/sketch.exp.svg +++ b/e2etests/testdata/regression/code_leading_trailing_newlines/elk/sketch.exp.svg @@ -1,23 +1,23 @@ - - -# 2 leading, 2 trailing -def hello(): - -  print "world" - - - -# 2 leading, 2 trailing -def hello(): - -  print "world" - - - -# 2 leading -def hello(): - -  print "world" - -# 2 leading -def hello(): - -  print "world"# 2 trailing -def hello(): - -  print "world" - -# 2 trailing -def hello(): - -  print "world" - - - - - - + .d2-1104784228 .fill-N1{fill:#0A0F25;} + .d2-1104784228 .fill-N2{fill:#676C7E;} + .d2-1104784228 .fill-N3{fill:#9499AB;} + .d2-1104784228 .fill-N4{fill:#CFD2DD;} + .d2-1104784228 .fill-N5{fill:#DEE1EB;} + .d2-1104784228 .fill-N6{fill:#EEF1F8;} + .d2-1104784228 .fill-N7{fill:#FFFFFF;} + .d2-1104784228 .fill-B1{fill:#0D32B2;} + .d2-1104784228 .fill-B2{fill:#0D32B2;} + .d2-1104784228 .fill-B3{fill:#E3E9FD;} + .d2-1104784228 .fill-B4{fill:#E3E9FD;} + .d2-1104784228 .fill-B5{fill:#EDF0FD;} + .d2-1104784228 .fill-B6{fill:#F7F8FE;} + .d2-1104784228 .fill-AA2{fill:#4A6FF3;} + .d2-1104784228 .fill-AA4{fill:#EDF0FD;} + .d2-1104784228 .fill-AA5{fill:#F7F8FE;} + .d2-1104784228 .fill-AB4{fill:#EDF0FD;} + .d2-1104784228 .fill-AB5{fill:#F7F8FE;} + .d2-1104784228 .stroke-N1{stroke:#0A0F25;} + .d2-1104784228 .stroke-N2{stroke:#676C7E;} + .d2-1104784228 .stroke-N3{stroke:#9499AB;} + .d2-1104784228 .stroke-N4{stroke:#CFD2DD;} + .d2-1104784228 .stroke-N5{stroke:#DEE1EB;} + .d2-1104784228 .stroke-N6{stroke:#EEF1F8;} + .d2-1104784228 .stroke-N7{stroke:#FFFFFF;} + .d2-1104784228 .stroke-B1{stroke:#0D32B2;} + .d2-1104784228 .stroke-B2{stroke:#0D32B2;} + .d2-1104784228 .stroke-B3{stroke:#E3E9FD;} + .d2-1104784228 .stroke-B4{stroke:#E3E9FD;} + .d2-1104784228 .stroke-B5{stroke:#EDF0FD;} + .d2-1104784228 .stroke-B6{stroke:#F7F8FE;} + .d2-1104784228 .stroke-AA2{stroke:#4A6FF3;} + .d2-1104784228 .stroke-AA4{stroke:#EDF0FD;} + .d2-1104784228 .stroke-AA5{stroke:#F7F8FE;} + .d2-1104784228 .stroke-AB4{stroke:#EDF0FD;} + .d2-1104784228 .stroke-AB5{stroke:#F7F8FE;} + .d2-1104784228 .background-color-N1{background-color:#0A0F25;} + .d2-1104784228 .background-color-N2{background-color:#676C7E;} + .d2-1104784228 .background-color-N3{background-color:#9499AB;} + .d2-1104784228 .background-color-N4{background-color:#CFD2DD;} + .d2-1104784228 .background-color-N5{background-color:#DEE1EB;} + .d2-1104784228 .background-color-N6{background-color:#EEF1F8;} + .d2-1104784228 .background-color-N7{background-color:#FFFFFF;} + .d2-1104784228 .background-color-B1{background-color:#0D32B2;} + .d2-1104784228 .background-color-B2{background-color:#0D32B2;} + .d2-1104784228 .background-color-B3{background-color:#E3E9FD;} + .d2-1104784228 .background-color-B4{background-color:#E3E9FD;} + .d2-1104784228 .background-color-B5{background-color:#EDF0FD;} + .d2-1104784228 .background-color-B6{background-color:#F7F8FE;} + .d2-1104784228 .background-color-AA2{background-color:#4A6FF3;} + .d2-1104784228 .background-color-AA4{background-color:#EDF0FD;} + .d2-1104784228 .background-color-AA5{background-color:#F7F8FE;} + .d2-1104784228 .background-color-AB4{background-color:#EDF0FD;} + .d2-1104784228 .background-color-AB5{background-color:#F7F8FE;} + .d2-1104784228 .color-N1{color:#0A0F25;} + .d2-1104784228 .color-N2{color:#676C7E;} + .d2-1104784228 .color-N3{color:#9499AB;} + .d2-1104784228 .color-N4{color:#CFD2DD;} + .d2-1104784228 .color-N5{color:#DEE1EB;} + .d2-1104784228 .color-N6{color:#EEF1F8;} + .d2-1104784228 .color-N7{color:#FFFFFF;} + .d2-1104784228 .color-B1{color:#0D32B2;} + .d2-1104784228 .color-B2{color:#0D32B2;} + .d2-1104784228 .color-B3{color:#E3E9FD;} + .d2-1104784228 .color-B4{color:#E3E9FD;} + .d2-1104784228 .color-B5{color:#EDF0FD;} + .d2-1104784228 .color-B6{color:#F7F8FE;} + .d2-1104784228 .color-AA2{color:#4A6FF3;} + .d2-1104784228 .color-AA4{color:#EDF0FD;} + .d2-1104784228 .color-AA5{color:#F7F8FE;} + .d2-1104784228 .color-AB4{color:#EDF0FD;} + .d2-1104784228 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]> + +# 2 leading, 2 trailing +def hello(): + +  print "world" + + + +# 2 leading, 2 trailing +def hello(): + +  print "world" + + + +# 2 leading +def hello(): + +  print "world" + +# 2 leading +def hello(): + +  print "world"# 2 trailing +def hello(): + +  print "world" + +# 2 trailing +def hello(): + +  print "world" + + + + + + \ No newline at end of file diff --git a/e2etests/testdata/regression/code_trailing_newlines/dagre/board.exp.json b/e2etests/testdata/regression/code_trailing_newlines/dagre/board.exp.json new file mode 100644 index 000000000..60bfb6f5a --- /dev/null +++ b/e2etests/testdata/regression/code_trailing_newlines/dagre/board.exp.json @@ -0,0 +1,288 @@ +{ + "name": "", + "isFolderOnly": false, + "fontFamily": "SourceSansPro", + "shapes": [ + { + "id": "5 trailing", + "type": "code", + "pos": { + "x": 0, + "y": 0 + }, + "width": 160, + "height": 182, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "N7", + "stroke": "N1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "def hello():\n\n print \"world\"\n\n\n\n\n", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "python", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 144, + "labelHeight": 166, + "zIndex": 0, + "level": 1 + }, + { + "id": "8 total", + "type": "code", + "pos": { + "x": 220, + "y": 0 + }, + "width": 160, + "height": 182, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "N7", + "stroke": "N1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "def hello():\n\n print \"world\"\n# 1 trailing\n# 2 trailing\n# 3 trailing\n# 4 trailing\n# 5 trailing", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "python", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 144, + "labelHeight": 166, + "zIndex": 0, + "level": 1 + }, + { + "id": "1 trailing", + "type": "code", + "pos": { + "x": 440, + "y": 42 + }, + "width": 160, + "height": 99, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "N7", + "stroke": "N1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "def hello():\n\n print \"world\"\n", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "python", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 144, + "labelHeight": 83, + "zIndex": 0, + "level": 1 + }, + { + "id": "4 total", + "type": "code", + "pos": { + "x": 660, + "y": 42 + }, + "width": 160, + "height": 99, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "N7", + "stroke": "N1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "def hello():\n\n print \"world\"\n# 1 trailing", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "python", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 144, + "labelHeight": 83, + "zIndex": 0, + "level": 1 + }, + { + "id": "2 trailing", + "type": "code", + "pos": { + "x": 880, + "y": 31 + }, + "width": 160, + "height": 120, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "N7", + "stroke": "N1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "def hello():\n\n print \"world\"\n\n", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "python", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 144, + "labelHeight": 104, + "zIndex": 0, + "level": 1 + }, + { + "id": "5 total", + "type": "code", + "pos": { + "x": 1100, + "y": 31 + }, + "width": 160, + "height": 120, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "N7", + "stroke": "N1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "def hello():\n\n print \"world\"\n# 1 trailing\n# 2 trailing", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "python", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 144, + "labelHeight": 104, + "zIndex": 0, + "level": 1 + } + ], + "connections": [], + "root": { + "id": "", + "type": "", + "pos": { + "x": 0, + "y": 0 + }, + "width": 0, + "height": 0, + "opacity": 0, + "strokeDash": 0, + "strokeWidth": 0, + "borderRadius": 0, + "fill": "N7", + "stroke": "", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "zIndex": 0, + "level": 0 + } +} diff --git a/e2etests/testdata/regression/code_trailing_newlines/dagre/sketch.exp.svg b/e2etests/testdata/regression/code_trailing_newlines/dagre/sketch.exp.svg new file mode 100644 index 000000000..2e25e1154 --- /dev/null +++ b/e2etests/testdata/regression/code_trailing_newlines/dagre/sketch.exp.svg @@ -0,0 +1,170 @@ +def hello(): + +  print "world" + + + + +def hello(): + +  print "world" + + + + +def hello(): + +  print "world" +# 1 trailing +# 2 trailing +# 3 trailing +# 4 trailing +# 5 trailingdef hello(): + +  print "world" +# 1 trailing +# 2 trailing +# 3 trailing +# 4 trailing +# 5 trailingdef hello(): + +  print "world" +def hello(): + +  print "world" +def hello(): + +  print "world" +# 1 trailingdef hello(): + +  print "world" +# 1 trailingdef hello(): + +  print "world" + +def hello(): + +  print "world" + +def hello(): + +  print "world" +# 1 trailing +# 2 trailingdef hello(): + +  print "world" +# 1 trailing +# 2 trailing + + + + + + + + \ No newline at end of file diff --git a/e2etests/testdata/regression/code_trailing_newlines/elk/board.exp.json b/e2etests/testdata/regression/code_trailing_newlines/elk/board.exp.json new file mode 100644 index 000000000..8595e7b37 --- /dev/null +++ b/e2etests/testdata/regression/code_trailing_newlines/elk/board.exp.json @@ -0,0 +1,288 @@ +{ + "name": "", + "isFolderOnly": false, + "fontFamily": "SourceSansPro", + "shapes": [ + { + "id": "5 trailing", + "type": "code", + "pos": { + "x": 12, + "y": 12 + }, + "width": 160, + "height": 182, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "N7", + "stroke": "N1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "def hello():\n\n print \"world\"\n\n\n\n\n", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "python", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 144, + "labelHeight": 166, + "zIndex": 0, + "level": 1 + }, + { + "id": "8 total", + "type": "code", + "pos": { + "x": 192, + "y": 12 + }, + "width": 160, + "height": 182, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "N7", + "stroke": "N1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "def hello():\n\n print \"world\"\n# 1 trailing\n# 2 trailing\n# 3 trailing\n# 4 trailing\n# 5 trailing", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "python", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 144, + "labelHeight": 166, + "zIndex": 0, + "level": 1 + }, + { + "id": "1 trailing", + "type": "code", + "pos": { + "x": 372, + "y": 53 + }, + "width": 160, + "height": 99, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "N7", + "stroke": "N1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "def hello():\n\n print \"world\"\n", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "python", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 144, + "labelHeight": 83, + "zIndex": 0, + "level": 1 + }, + { + "id": "4 total", + "type": "code", + "pos": { + "x": 552, + "y": 53 + }, + "width": 160, + "height": 99, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "N7", + "stroke": "N1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "def hello():\n\n print \"world\"\n# 1 trailing", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "python", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 144, + "labelHeight": 83, + "zIndex": 0, + "level": 1 + }, + { + "id": "2 trailing", + "type": "code", + "pos": { + "x": 732, + "y": 43 + }, + "width": 160, + "height": 120, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "N7", + "stroke": "N1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "def hello():\n\n print \"world\"\n\n", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "python", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 144, + "labelHeight": 104, + "zIndex": 0, + "level": 1 + }, + { + "id": "5 total", + "type": "code", + "pos": { + "x": 912, + "y": 43 + }, + "width": 160, + "height": 120, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "N7", + "stroke": "N1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "def hello():\n\n print \"world\"\n# 1 trailing\n# 2 trailing", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "python", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 144, + "labelHeight": 104, + "zIndex": 0, + "level": 1 + } + ], + "connections": [], + "root": { + "id": "", + "type": "", + "pos": { + "x": 0, + "y": 0 + }, + "width": 0, + "height": 0, + "opacity": 0, + "strokeDash": 0, + "strokeWidth": 0, + "borderRadius": 0, + "fill": "N7", + "stroke": "", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "zIndex": 0, + "level": 0 + } +} diff --git a/e2etests/testdata/regression/code_trailing_newlines/elk/sketch.exp.svg b/e2etests/testdata/regression/code_trailing_newlines/elk/sketch.exp.svg new file mode 100644 index 000000000..1703eb59e --- /dev/null +++ b/e2etests/testdata/regression/code_trailing_newlines/elk/sketch.exp.svg @@ -0,0 +1,170 @@ +def hello(): + +  print "world" + + + + +def hello(): + +  print "world" + + + + +def hello(): + +  print "world" +# 1 trailing +# 2 trailing +# 3 trailing +# 4 trailing +# 5 trailingdef hello(): + +  print "world" +# 1 trailing +# 2 trailing +# 3 trailing +# 4 trailing +# 5 trailingdef hello(): + +  print "world" +def hello(): + +  print "world" +def hello(): + +  print "world" +# 1 trailingdef hello(): + +  print "world" +# 1 trailingdef hello(): + +  print "world" + +def hello(): + +  print "world" + +def hello(): + +  print "world" +# 1 trailing +# 2 trailingdef hello(): + +  print "world" +# 1 trailing +# 2 trailing + + + + + + + + \ No newline at end of file diff --git a/e2etests/testdata/regression/no-lexer/dagre/board.exp.json b/e2etests/testdata/regression/no-lexer/dagre/board.exp.json index c03fe0f4a..3cccc64e3 100644 --- a/e2etests/testdata/regression/no-lexer/dagre/board.exp.json +++ b/e2etests/testdata/regression/no-lexer/dagre/board.exp.json @@ -10,8 +10,8 @@ "x": 0, "y": 0 }, - "width": 73, - "height": 38, + "width": 74, + "height": 37, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -38,8 +38,8 @@ "italic": false, "bold": true, "underline": false, - "labelWidth": 68, - "labelHeight": 33, + "labelWidth": 58, + "labelHeight": 21, "zIndex": 0, "level": 1 } diff --git a/e2etests/testdata/regression/no-lexer/dagre/sketch.exp.svg b/e2etests/testdata/regression/no-lexer/dagre/sketch.exp.svg index 7fcf9f363..8d74d1396 100644 --- a/e2etests/testdata/regression/no-lexer/dagre/sketch.exp.svg +++ b/e2etests/testdata/regression/no-lexer/dagre/sketch.exp.svg @@ -1,9 +1,9 @@ -x -> yx -> y - - + .d2-1328841925 .fill-N1{fill:#0A0F25;} + .d2-1328841925 .fill-N2{fill:#676C7E;} + .d2-1328841925 .fill-N3{fill:#9499AB;} + .d2-1328841925 .fill-N4{fill:#CFD2DD;} + .d2-1328841925 .fill-N5{fill:#DEE1EB;} + .d2-1328841925 .fill-N6{fill:#EEF1F8;} + .d2-1328841925 .fill-N7{fill:#FFFFFF;} + .d2-1328841925 .fill-B1{fill:#0D32B2;} + .d2-1328841925 .fill-B2{fill:#0D32B2;} + .d2-1328841925 .fill-B3{fill:#E3E9FD;} + .d2-1328841925 .fill-B4{fill:#E3E9FD;} + .d2-1328841925 .fill-B5{fill:#EDF0FD;} + .d2-1328841925 .fill-B6{fill:#F7F8FE;} + .d2-1328841925 .fill-AA2{fill:#4A6FF3;} + .d2-1328841925 .fill-AA4{fill:#EDF0FD;} + .d2-1328841925 .fill-AA5{fill:#F7F8FE;} + .d2-1328841925 .fill-AB4{fill:#EDF0FD;} + .d2-1328841925 .fill-AB5{fill:#F7F8FE;} + .d2-1328841925 .stroke-N1{stroke:#0A0F25;} + .d2-1328841925 .stroke-N2{stroke:#676C7E;} + .d2-1328841925 .stroke-N3{stroke:#9499AB;} + .d2-1328841925 .stroke-N4{stroke:#CFD2DD;} + .d2-1328841925 .stroke-N5{stroke:#DEE1EB;} + .d2-1328841925 .stroke-N6{stroke:#EEF1F8;} + .d2-1328841925 .stroke-N7{stroke:#FFFFFF;} + .d2-1328841925 .stroke-B1{stroke:#0D32B2;} + .d2-1328841925 .stroke-B2{stroke:#0D32B2;} + .d2-1328841925 .stroke-B3{stroke:#E3E9FD;} + .d2-1328841925 .stroke-B4{stroke:#E3E9FD;} + .d2-1328841925 .stroke-B5{stroke:#EDF0FD;} + .d2-1328841925 .stroke-B6{stroke:#F7F8FE;} + .d2-1328841925 .stroke-AA2{stroke:#4A6FF3;} + .d2-1328841925 .stroke-AA4{stroke:#EDF0FD;} + .d2-1328841925 .stroke-AA5{stroke:#F7F8FE;} + .d2-1328841925 .stroke-AB4{stroke:#EDF0FD;} + .d2-1328841925 .stroke-AB5{stroke:#F7F8FE;} + .d2-1328841925 .background-color-N1{background-color:#0A0F25;} + .d2-1328841925 .background-color-N2{background-color:#676C7E;} + .d2-1328841925 .background-color-N3{background-color:#9499AB;} + .d2-1328841925 .background-color-N4{background-color:#CFD2DD;} + .d2-1328841925 .background-color-N5{background-color:#DEE1EB;} + .d2-1328841925 .background-color-N6{background-color:#EEF1F8;} + .d2-1328841925 .background-color-N7{background-color:#FFFFFF;} + .d2-1328841925 .background-color-B1{background-color:#0D32B2;} + .d2-1328841925 .background-color-B2{background-color:#0D32B2;} + .d2-1328841925 .background-color-B3{background-color:#E3E9FD;} + .d2-1328841925 .background-color-B4{background-color:#E3E9FD;} + .d2-1328841925 .background-color-B5{background-color:#EDF0FD;} + .d2-1328841925 .background-color-B6{background-color:#F7F8FE;} + .d2-1328841925 .background-color-AA2{background-color:#4A6FF3;} + .d2-1328841925 .background-color-AA4{background-color:#EDF0FD;} + .d2-1328841925 .background-color-AA5{background-color:#F7F8FE;} + .d2-1328841925 .background-color-AB4{background-color:#EDF0FD;} + .d2-1328841925 .background-color-AB5{background-color:#F7F8FE;} + .d2-1328841925 .color-N1{color:#0A0F25;} + .d2-1328841925 .color-N2{color:#676C7E;} + .d2-1328841925 .color-N3{color:#9499AB;} + .d2-1328841925 .color-N4{color:#CFD2DD;} + .d2-1328841925 .color-N5{color:#DEE1EB;} + .d2-1328841925 .color-N6{color:#EEF1F8;} + .d2-1328841925 .color-N7{color:#FFFFFF;} + .d2-1328841925 .color-B1{color:#0D32B2;} + .d2-1328841925 .color-B2{color:#0D32B2;} + .d2-1328841925 .color-B3{color:#E3E9FD;} + .d2-1328841925 .color-B4{color:#E3E9FD;} + .d2-1328841925 .color-B5{color:#EDF0FD;} + .d2-1328841925 .color-B6{color:#F7F8FE;} + .d2-1328841925 .color-AA2{color:#4A6FF3;} + .d2-1328841925 .color-AA4{color:#EDF0FD;} + .d2-1328841925 .color-AA5{color:#F7F8FE;} + .d2-1328841925 .color-AB4{color:#EDF0FD;} + .d2-1328841925 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>x -> yx -> y + + \ No newline at end of file diff --git a/e2etests/testdata/regression/no-lexer/elk/board.exp.json b/e2etests/testdata/regression/no-lexer/elk/board.exp.json index ac6d3eca9..b542d23ef 100644 --- a/e2etests/testdata/regression/no-lexer/elk/board.exp.json +++ b/e2etests/testdata/regression/no-lexer/elk/board.exp.json @@ -10,8 +10,8 @@ "x": 12, "y": 12 }, - "width": 73, - "height": 38, + "width": 74, + "height": 37, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -38,8 +38,8 @@ "italic": false, "bold": true, "underline": false, - "labelWidth": 68, - "labelHeight": 33, + "labelWidth": 58, + "labelHeight": 21, "zIndex": 0, "level": 1 } diff --git a/e2etests/testdata/regression/no-lexer/elk/sketch.exp.svg b/e2etests/testdata/regression/no-lexer/elk/sketch.exp.svg index cd9c9f9f8..44e2e4fe6 100644 --- a/e2etests/testdata/regression/no-lexer/elk/sketch.exp.svg +++ b/e2etests/testdata/regression/no-lexer/elk/sketch.exp.svg @@ -1,9 +1,9 @@ -x -> yx -> y - - + .d2-943498989 .fill-N1{fill:#0A0F25;} + .d2-943498989 .fill-N2{fill:#676C7E;} + .d2-943498989 .fill-N3{fill:#9499AB;} + .d2-943498989 .fill-N4{fill:#CFD2DD;} + .d2-943498989 .fill-N5{fill:#DEE1EB;} + .d2-943498989 .fill-N6{fill:#EEF1F8;} + .d2-943498989 .fill-N7{fill:#FFFFFF;} + .d2-943498989 .fill-B1{fill:#0D32B2;} + .d2-943498989 .fill-B2{fill:#0D32B2;} + .d2-943498989 .fill-B3{fill:#E3E9FD;} + .d2-943498989 .fill-B4{fill:#E3E9FD;} + .d2-943498989 .fill-B5{fill:#EDF0FD;} + .d2-943498989 .fill-B6{fill:#F7F8FE;} + .d2-943498989 .fill-AA2{fill:#4A6FF3;} + .d2-943498989 .fill-AA4{fill:#EDF0FD;} + .d2-943498989 .fill-AA5{fill:#F7F8FE;} + .d2-943498989 .fill-AB4{fill:#EDF0FD;} + .d2-943498989 .fill-AB5{fill:#F7F8FE;} + .d2-943498989 .stroke-N1{stroke:#0A0F25;} + .d2-943498989 .stroke-N2{stroke:#676C7E;} + .d2-943498989 .stroke-N3{stroke:#9499AB;} + .d2-943498989 .stroke-N4{stroke:#CFD2DD;} + .d2-943498989 .stroke-N5{stroke:#DEE1EB;} + .d2-943498989 .stroke-N6{stroke:#EEF1F8;} + .d2-943498989 .stroke-N7{stroke:#FFFFFF;} + .d2-943498989 .stroke-B1{stroke:#0D32B2;} + .d2-943498989 .stroke-B2{stroke:#0D32B2;} + .d2-943498989 .stroke-B3{stroke:#E3E9FD;} + .d2-943498989 .stroke-B4{stroke:#E3E9FD;} + .d2-943498989 .stroke-B5{stroke:#EDF0FD;} + .d2-943498989 .stroke-B6{stroke:#F7F8FE;} + .d2-943498989 .stroke-AA2{stroke:#4A6FF3;} + .d2-943498989 .stroke-AA4{stroke:#EDF0FD;} + .d2-943498989 .stroke-AA5{stroke:#F7F8FE;} + .d2-943498989 .stroke-AB4{stroke:#EDF0FD;} + .d2-943498989 .stroke-AB5{stroke:#F7F8FE;} + .d2-943498989 .background-color-N1{background-color:#0A0F25;} + .d2-943498989 .background-color-N2{background-color:#676C7E;} + .d2-943498989 .background-color-N3{background-color:#9499AB;} + .d2-943498989 .background-color-N4{background-color:#CFD2DD;} + .d2-943498989 .background-color-N5{background-color:#DEE1EB;} + .d2-943498989 .background-color-N6{background-color:#EEF1F8;} + .d2-943498989 .background-color-N7{background-color:#FFFFFF;} + .d2-943498989 .background-color-B1{background-color:#0D32B2;} + .d2-943498989 .background-color-B2{background-color:#0D32B2;} + .d2-943498989 .background-color-B3{background-color:#E3E9FD;} + .d2-943498989 .background-color-B4{background-color:#E3E9FD;} + .d2-943498989 .background-color-B5{background-color:#EDF0FD;} + .d2-943498989 .background-color-B6{background-color:#F7F8FE;} + .d2-943498989 .background-color-AA2{background-color:#4A6FF3;} + .d2-943498989 .background-color-AA4{background-color:#EDF0FD;} + .d2-943498989 .background-color-AA5{background-color:#F7F8FE;} + .d2-943498989 .background-color-AB4{background-color:#EDF0FD;} + .d2-943498989 .background-color-AB5{background-color:#F7F8FE;} + .d2-943498989 .color-N1{color:#0A0F25;} + .d2-943498989 .color-N2{color:#676C7E;} + .d2-943498989 .color-N3{color:#9499AB;} + .d2-943498989 .color-N4{color:#CFD2DD;} + .d2-943498989 .color-N5{color:#DEE1EB;} + .d2-943498989 .color-N6{color:#EEF1F8;} + .d2-943498989 .color-N7{color:#FFFFFF;} + .d2-943498989 .color-B1{color:#0D32B2;} + .d2-943498989 .color-B2{color:#0D32B2;} + .d2-943498989 .color-B3{color:#E3E9FD;} + .d2-943498989 .color-B4{color:#E3E9FD;} + .d2-943498989 .color-B5{color:#EDF0FD;} + .d2-943498989 .color-B6{color:#F7F8FE;} + .d2-943498989 .color-AA2{color:#4A6FF3;} + .d2-943498989 .color-AA4{color:#EDF0FD;} + .d2-943498989 .color-AA5{color:#F7F8FE;} + .d2-943498989 .color-AB4{color:#EDF0FD;} + .d2-943498989 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>x -> yx -> y + + \ No newline at end of file diff --git a/e2etests/testdata/regression/unnamed_class_table_code/dagre/board.exp.json b/e2etests/testdata/regression/unnamed_class_table_code/dagre/board.exp.json index 1f783180d..29430c79d 100644 --- a/e2etests/testdata/regression/unnamed_class_table_code/dagre/board.exp.json +++ b/e2etests/testdata/regression/unnamed_class_table_code/dagre/board.exp.json @@ -266,11 +266,11 @@ "id": "code", "type": "code", "pos": { - "x": 113, + "x": 112, "y": 754 }, - "width": 196, - "height": 70, + "width": 199, + "height": 78, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -297,8 +297,8 @@ "italic": false, "bold": true, "underline": false, - "labelWidth": 191, - "labelHeight": 65, + "labelWidth": 183, + "labelHeight": 62, "zIndex": 0, "level": 1 } diff --git a/e2etests/testdata/regression/unnamed_class_table_code/dagre/sketch.exp.svg b/e2etests/testdata/regression/unnamed_class_table_code/dagre/sketch.exp.svg index 5d92904df..00e67fc8b 100644 --- a/e2etests/testdata/regression/unnamed_class_table_code/dagre/sketch.exp.svg +++ b/e2etests/testdata/regression/unnamed_class_table_code/dagre/sketch.exp.svg @@ -1,23 +1,23 @@ --numint-timeoutint-pid+getStatus()Enum+getJobs()Job[]+setTimeout(seconds int)voididintnamestringemailstringpasswordstringlast_logindatetime:= 5 -:= a + 7 -fmt.Printf("%d", b)a := 5 -b := a + 7 -fmt.Printf("%d", b) - - + .d2-2076967551 .fill-N1{fill:#0A0F25;} + .d2-2076967551 .fill-N2{fill:#676C7E;} + .d2-2076967551 .fill-N3{fill:#9499AB;} + .d2-2076967551 .fill-N4{fill:#CFD2DD;} + .d2-2076967551 .fill-N5{fill:#DEE1EB;} + .d2-2076967551 .fill-N6{fill:#EEF1F8;} + .d2-2076967551 .fill-N7{fill:#FFFFFF;} + .d2-2076967551 .fill-B1{fill:#0D32B2;} + .d2-2076967551 .fill-B2{fill:#0D32B2;} + .d2-2076967551 .fill-B3{fill:#E3E9FD;} + .d2-2076967551 .fill-B4{fill:#E3E9FD;} + .d2-2076967551 .fill-B5{fill:#EDF0FD;} + .d2-2076967551 .fill-B6{fill:#F7F8FE;} + .d2-2076967551 .fill-AA2{fill:#4A6FF3;} + .d2-2076967551 .fill-AA4{fill:#EDF0FD;} + .d2-2076967551 .fill-AA5{fill:#F7F8FE;} + .d2-2076967551 .fill-AB4{fill:#EDF0FD;} + .d2-2076967551 .fill-AB5{fill:#F7F8FE;} + .d2-2076967551 .stroke-N1{stroke:#0A0F25;} + .d2-2076967551 .stroke-N2{stroke:#676C7E;} + .d2-2076967551 .stroke-N3{stroke:#9499AB;} + .d2-2076967551 .stroke-N4{stroke:#CFD2DD;} + .d2-2076967551 .stroke-N5{stroke:#DEE1EB;} + .d2-2076967551 .stroke-N6{stroke:#EEF1F8;} + .d2-2076967551 .stroke-N7{stroke:#FFFFFF;} + .d2-2076967551 .stroke-B1{stroke:#0D32B2;} + .d2-2076967551 .stroke-B2{stroke:#0D32B2;} + .d2-2076967551 .stroke-B3{stroke:#E3E9FD;} + .d2-2076967551 .stroke-B4{stroke:#E3E9FD;} + .d2-2076967551 .stroke-B5{stroke:#EDF0FD;} + .d2-2076967551 .stroke-B6{stroke:#F7F8FE;} + .d2-2076967551 .stroke-AA2{stroke:#4A6FF3;} + .d2-2076967551 .stroke-AA4{stroke:#EDF0FD;} + .d2-2076967551 .stroke-AA5{stroke:#F7F8FE;} + .d2-2076967551 .stroke-AB4{stroke:#EDF0FD;} + .d2-2076967551 .stroke-AB5{stroke:#F7F8FE;} + .d2-2076967551 .background-color-N1{background-color:#0A0F25;} + .d2-2076967551 .background-color-N2{background-color:#676C7E;} + .d2-2076967551 .background-color-N3{background-color:#9499AB;} + .d2-2076967551 .background-color-N4{background-color:#CFD2DD;} + .d2-2076967551 .background-color-N5{background-color:#DEE1EB;} + .d2-2076967551 .background-color-N6{background-color:#EEF1F8;} + .d2-2076967551 .background-color-N7{background-color:#FFFFFF;} + .d2-2076967551 .background-color-B1{background-color:#0D32B2;} + .d2-2076967551 .background-color-B2{background-color:#0D32B2;} + .d2-2076967551 .background-color-B3{background-color:#E3E9FD;} + .d2-2076967551 .background-color-B4{background-color:#E3E9FD;} + .d2-2076967551 .background-color-B5{background-color:#EDF0FD;} + .d2-2076967551 .background-color-B6{background-color:#F7F8FE;} + .d2-2076967551 .background-color-AA2{background-color:#4A6FF3;} + .d2-2076967551 .background-color-AA4{background-color:#EDF0FD;} + .d2-2076967551 .background-color-AA5{background-color:#F7F8FE;} + .d2-2076967551 .background-color-AB4{background-color:#EDF0FD;} + .d2-2076967551 .background-color-AB5{background-color:#F7F8FE;} + .d2-2076967551 .color-N1{color:#0A0F25;} + .d2-2076967551 .color-N2{color:#676C7E;} + .d2-2076967551 .color-N3{color:#9499AB;} + .d2-2076967551 .color-N4{color:#CFD2DD;} + .d2-2076967551 .color-N5{color:#DEE1EB;} + .d2-2076967551 .color-N6{color:#EEF1F8;} + .d2-2076967551 .color-N7{color:#FFFFFF;} + .d2-2076967551 .color-B1{color:#0D32B2;} + .d2-2076967551 .color-B2{color:#0D32B2;} + .d2-2076967551 .color-B3{color:#E3E9FD;} + .d2-2076967551 .color-B4{color:#E3E9FD;} + .d2-2076967551 .color-B5{color:#EDF0FD;} + .d2-2076967551 .color-B6{color:#F7F8FE;} + .d2-2076967551 .color-AA2{color:#4A6FF3;} + .d2-2076967551 .color-AA4{color:#EDF0FD;} + .d2-2076967551 .color-AA5{color:#F7F8FE;} + .d2-2076967551 .color-AB4{color:#EDF0FD;} + .d2-2076967551 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>-numint-timeoutint-pid+getStatus()Enum+getJobs()Job[]+setTimeout(seconds int)voididintnamestringemailstringpasswordstringlast_logindatetime:= 5 +:= a + 7 +fmt.Printf("%d", b)a := 5 +b := a + 7 +fmt.Printf("%d", b) + + \ No newline at end of file diff --git a/e2etests/testdata/regression/unnamed_class_table_code/elk/board.exp.json b/e2etests/testdata/regression/unnamed_class_table_code/elk/board.exp.json index 115ff55e5..e98b6ca39 100644 --- a/e2etests/testdata/regression/unnamed_class_table_code/elk/board.exp.json +++ b/e2etests/testdata/regression/unnamed_class_table_code/elk/board.exp.json @@ -266,11 +266,11 @@ "id": "code", "type": "code", "pos": { - "x": 125, + "x": 123, "y": 706 }, - "width": 196, - "height": 70, + "width": 199, + "height": 78, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -297,8 +297,8 @@ "italic": false, "bold": true, "underline": false, - "labelWidth": 191, - "labelHeight": 65, + "labelWidth": 183, + "labelHeight": 62, "zIndex": 0, "level": 1 } diff --git a/e2etests/testdata/regression/unnamed_class_table_code/elk/sketch.exp.svg b/e2etests/testdata/regression/unnamed_class_table_code/elk/sketch.exp.svg index 3207efd8a..9c95b4dd3 100644 --- a/e2etests/testdata/regression/unnamed_class_table_code/elk/sketch.exp.svg +++ b/e2etests/testdata/regression/unnamed_class_table_code/elk/sketch.exp.svg @@ -1,23 +1,23 @@ --numint-timeoutint-pid+getStatus()Enum+getJobs()Job[]+setTimeout(seconds int)voididintnamestringemailstringpasswordstringlast_logindatetime:= 5 -:= a + 7 -fmt.Printf("%d", b)a := 5 -b := a + 7 -fmt.Printf("%d", b) - - + .d2-3333819985 .fill-N1{fill:#0A0F25;} + .d2-3333819985 .fill-N2{fill:#676C7E;} + .d2-3333819985 .fill-N3{fill:#9499AB;} + .d2-3333819985 .fill-N4{fill:#CFD2DD;} + .d2-3333819985 .fill-N5{fill:#DEE1EB;} + .d2-3333819985 .fill-N6{fill:#EEF1F8;} + .d2-3333819985 .fill-N7{fill:#FFFFFF;} + .d2-3333819985 .fill-B1{fill:#0D32B2;} + .d2-3333819985 .fill-B2{fill:#0D32B2;} + .d2-3333819985 .fill-B3{fill:#E3E9FD;} + .d2-3333819985 .fill-B4{fill:#E3E9FD;} + .d2-3333819985 .fill-B5{fill:#EDF0FD;} + .d2-3333819985 .fill-B6{fill:#F7F8FE;} + .d2-3333819985 .fill-AA2{fill:#4A6FF3;} + .d2-3333819985 .fill-AA4{fill:#EDF0FD;} + .d2-3333819985 .fill-AA5{fill:#F7F8FE;} + .d2-3333819985 .fill-AB4{fill:#EDF0FD;} + .d2-3333819985 .fill-AB5{fill:#F7F8FE;} + .d2-3333819985 .stroke-N1{stroke:#0A0F25;} + .d2-3333819985 .stroke-N2{stroke:#676C7E;} + .d2-3333819985 .stroke-N3{stroke:#9499AB;} + .d2-3333819985 .stroke-N4{stroke:#CFD2DD;} + .d2-3333819985 .stroke-N5{stroke:#DEE1EB;} + .d2-3333819985 .stroke-N6{stroke:#EEF1F8;} + .d2-3333819985 .stroke-N7{stroke:#FFFFFF;} + .d2-3333819985 .stroke-B1{stroke:#0D32B2;} + .d2-3333819985 .stroke-B2{stroke:#0D32B2;} + .d2-3333819985 .stroke-B3{stroke:#E3E9FD;} + .d2-3333819985 .stroke-B4{stroke:#E3E9FD;} + .d2-3333819985 .stroke-B5{stroke:#EDF0FD;} + .d2-3333819985 .stroke-B6{stroke:#F7F8FE;} + .d2-3333819985 .stroke-AA2{stroke:#4A6FF3;} + .d2-3333819985 .stroke-AA4{stroke:#EDF0FD;} + .d2-3333819985 .stroke-AA5{stroke:#F7F8FE;} + .d2-3333819985 .stroke-AB4{stroke:#EDF0FD;} + .d2-3333819985 .stroke-AB5{stroke:#F7F8FE;} + .d2-3333819985 .background-color-N1{background-color:#0A0F25;} + .d2-3333819985 .background-color-N2{background-color:#676C7E;} + .d2-3333819985 .background-color-N3{background-color:#9499AB;} + .d2-3333819985 .background-color-N4{background-color:#CFD2DD;} + .d2-3333819985 .background-color-N5{background-color:#DEE1EB;} + .d2-3333819985 .background-color-N6{background-color:#EEF1F8;} + .d2-3333819985 .background-color-N7{background-color:#FFFFFF;} + .d2-3333819985 .background-color-B1{background-color:#0D32B2;} + .d2-3333819985 .background-color-B2{background-color:#0D32B2;} + .d2-3333819985 .background-color-B3{background-color:#E3E9FD;} + .d2-3333819985 .background-color-B4{background-color:#E3E9FD;} + .d2-3333819985 .background-color-B5{background-color:#EDF0FD;} + .d2-3333819985 .background-color-B6{background-color:#F7F8FE;} + .d2-3333819985 .background-color-AA2{background-color:#4A6FF3;} + .d2-3333819985 .background-color-AA4{background-color:#EDF0FD;} + .d2-3333819985 .background-color-AA5{background-color:#F7F8FE;} + .d2-3333819985 .background-color-AB4{background-color:#EDF0FD;} + .d2-3333819985 .background-color-AB5{background-color:#F7F8FE;} + .d2-3333819985 .color-N1{color:#0A0F25;} + .d2-3333819985 .color-N2{color:#676C7E;} + .d2-3333819985 .color-N3{color:#9499AB;} + .d2-3333819985 .color-N4{color:#CFD2DD;} + .d2-3333819985 .color-N5{color:#DEE1EB;} + .d2-3333819985 .color-N6{color:#EEF1F8;} + .d2-3333819985 .color-N7{color:#FFFFFF;} + .d2-3333819985 .color-B1{color:#0D32B2;} + .d2-3333819985 .color-B2{color:#0D32B2;} + .d2-3333819985 .color-B3{color:#E3E9FD;} + .d2-3333819985 .color-B4{color:#E3E9FD;} + .d2-3333819985 .color-B5{color:#EDF0FD;} + .d2-3333819985 .color-B6{color:#F7F8FE;} + .d2-3333819985 .color-AA2{color:#4A6FF3;} + .d2-3333819985 .color-AA4{color:#EDF0FD;} + .d2-3333819985 .color-AA5{color:#F7F8FE;} + .d2-3333819985 .color-AB4{color:#EDF0FD;} + .d2-3333819985 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>-numint-timeoutint-pid+getStatus()Enum+getJobs()Job[]+setTimeout(seconds int)voididintnamestringemailstringpasswordstringlast_logindatetime:= 5 +:= a + 7 +fmt.Printf("%d", b)a := 5 +b := a + 7 +fmt.Printf("%d", b) + + \ No newline at end of file diff --git a/e2etests/testdata/stable/code_snippet/dagre/board.exp.json b/e2etests/testdata/stable/code_snippet/dagre/board.exp.json index bb9463855..5ad185be7 100644 --- a/e2etests/testdata/stable/code_snippet/dagre/board.exp.json +++ b/e2etests/testdata/stable/code_snippet/dagre/board.exp.json @@ -11,7 +11,7 @@ "y": 166 }, "width": 755, - "height": 166, + "height": 203, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -38,8 +38,8 @@ "italic": false, "bold": true, "underline": false, - "labelWidth": 750, - "labelHeight": 161, + "labelWidth": 739, + "labelHeight": 187, "zIndex": 0, "level": 1 }, @@ -89,7 +89,7 @@ "type": "rectangle", "pos": { "x": 351, - "y": 432 + "y": 469 }, "width": 54, "height": 66, @@ -200,19 +200,19 @@ "route": [ { "x": 377.5, - "y": 332 + "y": 369 }, { "x": 377.5, - "y": 372 + "y": 409 }, { "x": 377.5, - "y": 392 + "y": 429 }, { "x": 377.5, - "y": 432 + "y": 469 } ], "isCurve": true, diff --git a/e2etests/testdata/stable/code_snippet/dagre/sketch.exp.svg b/e2etests/testdata/stable/code_snippet/dagre/sketch.exp.svg index 769193474..a50c9a775 100644 --- a/e2etests/testdata/stable/code_snippet/dagre/sketch.exp.svg +++ b/e2etests/testdata/stable/code_snippet/dagre/sketch.exp.svg @@ -1,30 +1,30 @@ -// RegisterHash registers a function that returns a new instance of the given -// hash function. This is intended to be called from the init function in -// packages that implement hash functions. -func RegisterHash(h Hash, f func() hash.Hash) { -    if h >= maxHash { -        panic("crypto: RegisterHash of unknown hash function") -    } -    hashes[h] = f -}// RegisterHash registers a function that returns a new instance of the given -// hash function. This is intended to be called from the init function in -// packages that implement hash functions. -func RegisterHash(h Hash, f func() hash.Hash) { -    if h >= maxHash { -        panic("crypto: RegisterHash of unknown hash function") -    } -    hashes[h] = f -}xy - - + .d2-1915554491 .fill-N1{fill:#0A0F25;} + .d2-1915554491 .fill-N2{fill:#676C7E;} + .d2-1915554491 .fill-N3{fill:#9499AB;} + .d2-1915554491 .fill-N4{fill:#CFD2DD;} + .d2-1915554491 .fill-N5{fill:#DEE1EB;} + .d2-1915554491 .fill-N6{fill:#EEF1F8;} + .d2-1915554491 .fill-N7{fill:#FFFFFF;} + .d2-1915554491 .fill-B1{fill:#0D32B2;} + .d2-1915554491 .fill-B2{fill:#0D32B2;} + .d2-1915554491 .fill-B3{fill:#E3E9FD;} + .d2-1915554491 .fill-B4{fill:#E3E9FD;} + .d2-1915554491 .fill-B5{fill:#EDF0FD;} + .d2-1915554491 .fill-B6{fill:#F7F8FE;} + .d2-1915554491 .fill-AA2{fill:#4A6FF3;} + .d2-1915554491 .fill-AA4{fill:#EDF0FD;} + .d2-1915554491 .fill-AA5{fill:#F7F8FE;} + .d2-1915554491 .fill-AB4{fill:#EDF0FD;} + .d2-1915554491 .fill-AB5{fill:#F7F8FE;} + .d2-1915554491 .stroke-N1{stroke:#0A0F25;} + .d2-1915554491 .stroke-N2{stroke:#676C7E;} + .d2-1915554491 .stroke-N3{stroke:#9499AB;} + .d2-1915554491 .stroke-N4{stroke:#CFD2DD;} + .d2-1915554491 .stroke-N5{stroke:#DEE1EB;} + .d2-1915554491 .stroke-N6{stroke:#EEF1F8;} + .d2-1915554491 .stroke-N7{stroke:#FFFFFF;} + .d2-1915554491 .stroke-B1{stroke:#0D32B2;} + .d2-1915554491 .stroke-B2{stroke:#0D32B2;} + .d2-1915554491 .stroke-B3{stroke:#E3E9FD;} + .d2-1915554491 .stroke-B4{stroke:#E3E9FD;} + .d2-1915554491 .stroke-B5{stroke:#EDF0FD;} + .d2-1915554491 .stroke-B6{stroke:#F7F8FE;} + .d2-1915554491 .stroke-AA2{stroke:#4A6FF3;} + .d2-1915554491 .stroke-AA4{stroke:#EDF0FD;} + .d2-1915554491 .stroke-AA5{stroke:#F7F8FE;} + .d2-1915554491 .stroke-AB4{stroke:#EDF0FD;} + .d2-1915554491 .stroke-AB5{stroke:#F7F8FE;} + .d2-1915554491 .background-color-N1{background-color:#0A0F25;} + .d2-1915554491 .background-color-N2{background-color:#676C7E;} + .d2-1915554491 .background-color-N3{background-color:#9499AB;} + .d2-1915554491 .background-color-N4{background-color:#CFD2DD;} + .d2-1915554491 .background-color-N5{background-color:#DEE1EB;} + .d2-1915554491 .background-color-N6{background-color:#EEF1F8;} + .d2-1915554491 .background-color-N7{background-color:#FFFFFF;} + .d2-1915554491 .background-color-B1{background-color:#0D32B2;} + .d2-1915554491 .background-color-B2{background-color:#0D32B2;} + .d2-1915554491 .background-color-B3{background-color:#E3E9FD;} + .d2-1915554491 .background-color-B4{background-color:#E3E9FD;} + .d2-1915554491 .background-color-B5{background-color:#EDF0FD;} + .d2-1915554491 .background-color-B6{background-color:#F7F8FE;} + .d2-1915554491 .background-color-AA2{background-color:#4A6FF3;} + .d2-1915554491 .background-color-AA4{background-color:#EDF0FD;} + .d2-1915554491 .background-color-AA5{background-color:#F7F8FE;} + .d2-1915554491 .background-color-AB4{background-color:#EDF0FD;} + .d2-1915554491 .background-color-AB5{background-color:#F7F8FE;} + .d2-1915554491 .color-N1{color:#0A0F25;} + .d2-1915554491 .color-N2{color:#676C7E;} + .d2-1915554491 .color-N3{color:#9499AB;} + .d2-1915554491 .color-N4{color:#CFD2DD;} + .d2-1915554491 .color-N5{color:#DEE1EB;} + .d2-1915554491 .color-N6{color:#EEF1F8;} + .d2-1915554491 .color-N7{color:#FFFFFF;} + .d2-1915554491 .color-B1{color:#0D32B2;} + .d2-1915554491 .color-B2{color:#0D32B2;} + .d2-1915554491 .color-B3{color:#E3E9FD;} + .d2-1915554491 .color-B4{color:#E3E9FD;} + .d2-1915554491 .color-B5{color:#EDF0FD;} + .d2-1915554491 .color-B6{color:#F7F8FE;} + .d2-1915554491 .color-AA2{color:#4A6FF3;} + .d2-1915554491 .color-AA4{color:#EDF0FD;} + .d2-1915554491 .color-AA5{color:#F7F8FE;} + .d2-1915554491 .color-AB4{color:#EDF0FD;} + .d2-1915554491 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>// RegisterHash registers a function that returns a new instance of the given +// hash function. This is intended to be called from the init function in +// packages that implement hash functions. +func RegisterHash(h Hash, f func() hash.Hash) { +    if h >= maxHash { +        panic("crypto: RegisterHash of unknown hash function") +    } +    hashes[h] = f +}// RegisterHash registers a function that returns a new instance of the given +// hash function. This is intended to be called from the init function in +// packages that implement hash functions. +func RegisterHash(h Hash, f func() hash.Hash) { +    if h >= maxHash { +        panic("crypto: RegisterHash of unknown hash function") +    } +    hashes[h] = f +}xy + + - + \ No newline at end of file diff --git a/e2etests/testdata/stable/code_snippet/elk/board.exp.json b/e2etests/testdata/stable/code_snippet/elk/board.exp.json index 2a6a4c19a..b5f7645e6 100644 --- a/e2etests/testdata/stable/code_snippet/elk/board.exp.json +++ b/e2etests/testdata/stable/code_snippet/elk/board.exp.json @@ -11,7 +11,7 @@ "y": 148 }, "width": 755, - "height": 166, + "height": 203, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -38,8 +38,8 @@ "italic": false, "bold": true, "underline": false, - "labelWidth": 750, - "labelHeight": 161, + "labelWidth": 739, + "labelHeight": 187, "zIndex": 0, "level": 1 }, @@ -89,7 +89,7 @@ "type": "rectangle", "pos": { "x": 362, - "y": 384 + "y": 421 }, "width": 54, "height": 66, @@ -191,11 +191,11 @@ "route": [ { "x": 389.5, - "y": 314 + "y": 351 }, { "x": 389.5, - "y": 384 + "y": 421 } ], "animated": false, diff --git a/e2etests/testdata/stable/code_snippet/elk/sketch.exp.svg b/e2etests/testdata/stable/code_snippet/elk/sketch.exp.svg index 02e9e460c..5739de56b 100644 --- a/e2etests/testdata/stable/code_snippet/elk/sketch.exp.svg +++ b/e2etests/testdata/stable/code_snippet/elk/sketch.exp.svg @@ -1,30 +1,30 @@ -// RegisterHash registers a function that returns a new instance of the given -// hash function. This is intended to be called from the init function in -// packages that implement hash functions. -func RegisterHash(h Hash, f func() hash.Hash) { -    if h >= maxHash { -        panic("crypto: RegisterHash of unknown hash function") -    } -    hashes[h] = f -}// RegisterHash registers a function that returns a new instance of the given -// hash function. This is intended to be called from the init function in -// packages that implement hash functions. -func RegisterHash(h Hash, f func() hash.Hash) { -    if h >= maxHash { -        panic("crypto: RegisterHash of unknown hash function") -    } -    hashes[h] = f -}xy - - + .d2-2801786394 .fill-N1{fill:#0A0F25;} + .d2-2801786394 .fill-N2{fill:#676C7E;} + .d2-2801786394 .fill-N3{fill:#9499AB;} + .d2-2801786394 .fill-N4{fill:#CFD2DD;} + .d2-2801786394 .fill-N5{fill:#DEE1EB;} + .d2-2801786394 .fill-N6{fill:#EEF1F8;} + .d2-2801786394 .fill-N7{fill:#FFFFFF;} + .d2-2801786394 .fill-B1{fill:#0D32B2;} + .d2-2801786394 .fill-B2{fill:#0D32B2;} + .d2-2801786394 .fill-B3{fill:#E3E9FD;} + .d2-2801786394 .fill-B4{fill:#E3E9FD;} + .d2-2801786394 .fill-B5{fill:#EDF0FD;} + .d2-2801786394 .fill-B6{fill:#F7F8FE;} + .d2-2801786394 .fill-AA2{fill:#4A6FF3;} + .d2-2801786394 .fill-AA4{fill:#EDF0FD;} + .d2-2801786394 .fill-AA5{fill:#F7F8FE;} + .d2-2801786394 .fill-AB4{fill:#EDF0FD;} + .d2-2801786394 .fill-AB5{fill:#F7F8FE;} + .d2-2801786394 .stroke-N1{stroke:#0A0F25;} + .d2-2801786394 .stroke-N2{stroke:#676C7E;} + .d2-2801786394 .stroke-N3{stroke:#9499AB;} + .d2-2801786394 .stroke-N4{stroke:#CFD2DD;} + .d2-2801786394 .stroke-N5{stroke:#DEE1EB;} + .d2-2801786394 .stroke-N6{stroke:#EEF1F8;} + .d2-2801786394 .stroke-N7{stroke:#FFFFFF;} + .d2-2801786394 .stroke-B1{stroke:#0D32B2;} + .d2-2801786394 .stroke-B2{stroke:#0D32B2;} + .d2-2801786394 .stroke-B3{stroke:#E3E9FD;} + .d2-2801786394 .stroke-B4{stroke:#E3E9FD;} + .d2-2801786394 .stroke-B5{stroke:#EDF0FD;} + .d2-2801786394 .stroke-B6{stroke:#F7F8FE;} + .d2-2801786394 .stroke-AA2{stroke:#4A6FF3;} + .d2-2801786394 .stroke-AA4{stroke:#EDF0FD;} + .d2-2801786394 .stroke-AA5{stroke:#F7F8FE;} + .d2-2801786394 .stroke-AB4{stroke:#EDF0FD;} + .d2-2801786394 .stroke-AB5{stroke:#F7F8FE;} + .d2-2801786394 .background-color-N1{background-color:#0A0F25;} + .d2-2801786394 .background-color-N2{background-color:#676C7E;} + .d2-2801786394 .background-color-N3{background-color:#9499AB;} + .d2-2801786394 .background-color-N4{background-color:#CFD2DD;} + .d2-2801786394 .background-color-N5{background-color:#DEE1EB;} + .d2-2801786394 .background-color-N6{background-color:#EEF1F8;} + .d2-2801786394 .background-color-N7{background-color:#FFFFFF;} + .d2-2801786394 .background-color-B1{background-color:#0D32B2;} + .d2-2801786394 .background-color-B2{background-color:#0D32B2;} + .d2-2801786394 .background-color-B3{background-color:#E3E9FD;} + .d2-2801786394 .background-color-B4{background-color:#E3E9FD;} + .d2-2801786394 .background-color-B5{background-color:#EDF0FD;} + .d2-2801786394 .background-color-B6{background-color:#F7F8FE;} + .d2-2801786394 .background-color-AA2{background-color:#4A6FF3;} + .d2-2801786394 .background-color-AA4{background-color:#EDF0FD;} + .d2-2801786394 .background-color-AA5{background-color:#F7F8FE;} + .d2-2801786394 .background-color-AB4{background-color:#EDF0FD;} + .d2-2801786394 .background-color-AB5{background-color:#F7F8FE;} + .d2-2801786394 .color-N1{color:#0A0F25;} + .d2-2801786394 .color-N2{color:#676C7E;} + .d2-2801786394 .color-N3{color:#9499AB;} + .d2-2801786394 .color-N4{color:#CFD2DD;} + .d2-2801786394 .color-N5{color:#DEE1EB;} + .d2-2801786394 .color-N6{color:#EEF1F8;} + .d2-2801786394 .color-N7{color:#FFFFFF;} + .d2-2801786394 .color-B1{color:#0D32B2;} + .d2-2801786394 .color-B2{color:#0D32B2;} + .d2-2801786394 .color-B3{color:#E3E9FD;} + .d2-2801786394 .color-B4{color:#E3E9FD;} + .d2-2801786394 .color-B5{color:#EDF0FD;} + .d2-2801786394 .color-B6{color:#F7F8FE;} + .d2-2801786394 .color-AA2{color:#4A6FF3;} + .d2-2801786394 .color-AA4{color:#EDF0FD;} + .d2-2801786394 .color-AA5{color:#F7F8FE;} + .d2-2801786394 .color-AB4{color:#EDF0FD;} + .d2-2801786394 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>// RegisterHash registers a function that returns a new instance of the given +// hash function. This is intended to be called from the init function in +// packages that implement hash functions. +func RegisterHash(h Hash, f func() hash.Hash) { +    if h >= maxHash { +        panic("crypto: RegisterHash of unknown hash function") +    } +    hashes[h] = f +}// RegisterHash registers a function that returns a new instance of the given +// hash function. This is intended to be called from the init function in +// packages that implement hash functions. +func RegisterHash(h Hash, f func() hash.Hash) { +    if h >= maxHash { +        panic("crypto: RegisterHash of unknown hash function") +    } +    hashes[h] = f +}xy + + - + \ No newline at end of file diff --git a/e2etests/testdata/stable/sequence_diagram_all_shapes/dagre/board.exp.json b/e2etests/testdata/stable/sequence_diagram_all_shapes/dagre/board.exp.json index dd6b3f0d2..52c1f0a9d 100644 --- a/e2etests/testdata/stable/sequence_diagram_all_shapes/dagre/board.exp.json +++ b/e2etests/testdata/stable/sequence_diagram_all_shapes/dagre/board.exp.json @@ -186,10 +186,10 @@ "type": "code", "pos": { "x": 922, - "y": 166 + "y": 158 }, - "width": 196, - "height": 70, + "width": 199, + "height": 78, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -216,8 +216,8 @@ "italic": false, "bold": false, "underline": false, - "labelWidth": 191, - "labelHeight": 65, + "labelWidth": 183, + "labelHeight": 62, "labelPosition": "INSIDE_MIDDLE_CENTER", "zIndex": 0, "level": 1 @@ -226,7 +226,7 @@ "id": "f", "type": "cylinder", "pos": { - "x": 1140, + "x": 1143, "y": 118 }, "width": 100, @@ -267,7 +267,7 @@ "id": "g", "type": "diamond", "pos": { - "x": 1290, + "x": 1293, "y": 144 }, "width": 100, @@ -308,7 +308,7 @@ "id": "h", "type": "document", "pos": { - "x": 1440, + "x": 1443, "y": 160 }, "width": 100, @@ -349,7 +349,7 @@ "id": "i", "type": "hexagon", "pos": { - "x": 1580, + "x": 1583, "y": 167 }, "width": 146, @@ -390,7 +390,7 @@ "id": "j", "type": "image", "pos": { - "x": 1766, + "x": 1769, "y": 87 }, "width": 128, @@ -443,7 +443,7 @@ "id": "k", "type": "oval", "pos": { - "x": 1932, + "x": 1935, "y": 163 }, "width": 100, @@ -484,7 +484,7 @@ "id": "l", "type": "package", "pos": { - "x": 2082, + "x": 2085, "y": 163 }, "width": 100, @@ -525,7 +525,7 @@ "id": "m", "type": "page", "pos": { - "x": 2226, + "x": 2229, "y": 149 }, "width": 113, @@ -566,7 +566,7 @@ "id": "n", "type": "parallelogram", "pos": { - "x": 2379, + "x": 2382, "y": 154 }, "width": 169, @@ -607,7 +607,7 @@ "id": "o", "type": "person", "pos": { - "x": 2568, + "x": 2571, "y": 64 }, "width": 100, @@ -648,7 +648,7 @@ "id": "p", "type": "queue", "pos": { - "x": 2708, + "x": 2711, "y": 170 }, "width": 151, @@ -689,7 +689,7 @@ "id": "q", "type": "rectangle", "pos": { - "x": 2899, + "x": 2902, "y": 133 }, "width": 103, @@ -730,7 +730,7 @@ "id": "r", "type": "step", "pos": { - "x": 3042, + "x": 3045, "y": 135 }, "width": 187, @@ -771,7 +771,7 @@ "id": "s", "type": "stored_data", "pos": { - "x": 3267, + "x": 3270, "y": 170 }, "width": 100, @@ -812,7 +812,7 @@ "id": "t", "type": "sql_table", "pos": { - "x": 3407, + "x": 3410, "y": 128 }, "width": 161, @@ -1078,7 +1078,7 @@ "y": 516 }, { - "x": 1020, + "x": 1021.5, "y": 516 } ], @@ -1112,11 +1112,11 @@ "labelPercentage": 0, "route": [ { - "x": 1020, + "x": 1021.5, "y": 586 }, { - "x": 1190, + "x": 1193, "y": 586 } ], @@ -1150,11 +1150,11 @@ "labelPercentage": 0, "route": [ { - "x": 1190, + "x": 1193, "y": 656 }, { - "x": 1340, + "x": 1343, "y": 656 } ], @@ -1188,11 +1188,11 @@ "labelPercentage": 0, "route": [ { - "x": 1340, + "x": 1343, "y": 726 }, { - "x": 1490, + "x": 1493, "y": 726 } ], @@ -1226,11 +1226,11 @@ "labelPercentage": 0, "route": [ { - "x": 1490, + "x": 1493, "y": 796 }, { - "x": 1653, + "x": 1656, "y": 796 } ], @@ -1264,11 +1264,11 @@ "labelPercentage": 0, "route": [ { - "x": 1653, + "x": 1656, "y": 866 }, { - "x": 1830, + "x": 1833, "y": 866 } ], @@ -1302,11 +1302,11 @@ "labelPercentage": 0, "route": [ { - "x": 1830, + "x": 1833, "y": 936 }, { - "x": 1982, + "x": 1985, "y": 936 } ], @@ -1340,11 +1340,11 @@ "labelPercentage": 0, "route": [ { - "x": 1982, + "x": 1985, "y": 1006 }, { - "x": 2132, + "x": 2135, "y": 1006 } ], @@ -1378,11 +1378,11 @@ "labelPercentage": 0, "route": [ { - "x": 2132, + "x": 2135, "y": 1076 }, { - "x": 2282.5, + "x": 2285.5, "y": 1076 } ], @@ -1416,11 +1416,11 @@ "labelPercentage": 0, "route": [ { - "x": 2282.5, + "x": 2285.5, "y": 1146 }, { - "x": 2463.5, + "x": 2466.5, "y": 1146 } ], @@ -1454,11 +1454,11 @@ "labelPercentage": 0, "route": [ { - "x": 2463.5, + "x": 2466.5, "y": 1216 }, { - "x": 2618, + "x": 2621, "y": 1216 } ], @@ -1492,11 +1492,11 @@ "labelPercentage": 0, "route": [ { - "x": 2618, + "x": 2621, "y": 1286 }, { - "x": 2783.5, + "x": 2786.5, "y": 1286 } ], @@ -1530,11 +1530,11 @@ "labelPercentage": 0, "route": [ { - "x": 2783.5, + "x": 2786.5, "y": 1356 }, { - "x": 2950.5, + "x": 2953.5, "y": 1356 } ], @@ -1568,11 +1568,11 @@ "labelPercentage": 0, "route": [ { - "x": 2950.5, + "x": 2953.5, "y": 1426 }, { - "x": 3135.5, + "x": 3138.5, "y": 1426 } ], @@ -1606,11 +1606,11 @@ "labelPercentage": 0, "route": [ { - "x": 3135.5, + "x": 3138.5, "y": 1496 }, { - "x": 3317, + "x": 3320, "y": 1496 } ], @@ -1644,11 +1644,11 @@ "labelPercentage": 0, "route": [ { - "x": 3317, + "x": 3320, "y": 1566 }, { - "x": 3487.5, + "x": 3490.5, "y": 1566 } ], @@ -1834,11 +1834,11 @@ "labelPercentage": 0, "route": [ { - "x": 1020, + "x": 1021.5, "y": 236 }, { - "x": 1020, + "x": 1021.5, "y": 1636 } ], @@ -1872,11 +1872,11 @@ "labelPercentage": 0, "route": [ { - "x": 1190, + "x": 1193, "y": 236 }, { - "x": 1190, + "x": 1193, "y": 1636 } ], @@ -1910,11 +1910,11 @@ "labelPercentage": 0, "route": [ { - "x": 1340, + "x": 1343, "y": 236 }, { - "x": 1340, + "x": 1343, "y": 1636 } ], @@ -1948,11 +1948,11 @@ "labelPercentage": 0, "route": [ { - "x": 1490, + "x": 1493, "y": 236 }, { - "x": 1490, + "x": 1493, "y": 1636 } ], @@ -1986,11 +1986,11 @@ "labelPercentage": 0, "route": [ { - "x": 1653, + "x": 1656, "y": 236 }, { - "x": 1653, + "x": 1656, "y": 1636 } ], @@ -2024,11 +2024,11 @@ "labelPercentage": 0, "route": [ { - "x": 1830, + "x": 1833, "y": 241 }, { - "x": 1830, + "x": 1833, "y": 1636 } ], @@ -2062,11 +2062,11 @@ "labelPercentage": 0, "route": [ { - "x": 1982, + "x": 1985, "y": 236 }, { - "x": 1982, + "x": 1985, "y": 1636 } ], @@ -2100,11 +2100,11 @@ "labelPercentage": 0, "route": [ { - "x": 2132, + "x": 2135, "y": 236 }, { - "x": 2132, + "x": 2135, "y": 1636 } ], @@ -2138,11 +2138,11 @@ "labelPercentage": 0, "route": [ { - "x": 2282.5, + "x": 2285.5, "y": 236 }, { - "x": 2282.5, + "x": 2285.5, "y": 1636 } ], @@ -2176,11 +2176,11 @@ "labelPercentage": 0, "route": [ { - "x": 2463.5, + "x": 2466.5, "y": 236 }, { - "x": 2463.5, + "x": 2466.5, "y": 1636 } ], @@ -2214,11 +2214,11 @@ "labelPercentage": 0, "route": [ { - "x": 2618, + "x": 2621, "y": 241 }, { - "x": 2618, + "x": 2621, "y": 1636 } ], @@ -2252,11 +2252,11 @@ "labelPercentage": 0, "route": [ { - "x": 2783.5, + "x": 2786.5, "y": 236 }, { - "x": 2783.5, + "x": 2786.5, "y": 1636 } ], @@ -2290,11 +2290,11 @@ "labelPercentage": 0, "route": [ { - "x": 2950.5, + "x": 2953.5, "y": 236 }, { - "x": 2950.5, + "x": 2953.5, "y": 1636 } ], @@ -2328,11 +2328,11 @@ "labelPercentage": 0, "route": [ { - "x": 3135.5, + "x": 3138.5, "y": 236 }, { - "x": 3135.5, + "x": 3138.5, "y": 1636 } ], @@ -2366,11 +2366,11 @@ "labelPercentage": 0, "route": [ { - "x": 3317, + "x": 3320, "y": 236 }, { - "x": 3317, + "x": 3320, "y": 1636 } ], @@ -2404,11 +2404,11 @@ "labelPercentage": 0, "route": [ { - "x": 3487.5, + "x": 3490.5, "y": 236 }, { - "x": 3487.5, + "x": 3490.5, "y": 1636 } ], diff --git a/e2etests/testdata/stable/sequence_diagram_all_shapes/dagre/sketch.exp.svg b/e2etests/testdata/stable/sequence_diagram_all_shapes/dagre/sketch.exp.svg index 1ef95f75f..04f7138a4 100644 --- a/e2etests/testdata/stable/sequence_diagram_all_shapes/dagre/sketch.exp.svg +++ b/e2etests/testdata/stable/sequence_diagram_all_shapes/dagre/sketch.exp.svg @@ -1,30 +1,30 @@ -a labelblabelsa class+public() boolvoid-private() intvoidcloudyyyy:= 5 -:= a + 7 -fmt.Printf("%d", b)a := 5 -b := a + 7 -fmt.Printf("%d", b)cyldiadocssix cornersa random iconoverpackdocs pagetoohard o saysinglepersona queuea squarea step at a timedatausersidintnamevarchar result := callThisFunction(obj, 5) midthis sideother side - + .d2-1497255283 .fill-N1{fill:#0A0F25;} + .d2-1497255283 .fill-N2{fill:#676C7E;} + .d2-1497255283 .fill-N3{fill:#9499AB;} + .d2-1497255283 .fill-N4{fill:#CFD2DD;} + .d2-1497255283 .fill-N5{fill:#DEE1EB;} + .d2-1497255283 .fill-N6{fill:#EEF1F8;} + .d2-1497255283 .fill-N7{fill:#FFFFFF;} + .d2-1497255283 .fill-B1{fill:#0D32B2;} + .d2-1497255283 .fill-B2{fill:#0D32B2;} + .d2-1497255283 .fill-B3{fill:#E3E9FD;} + .d2-1497255283 .fill-B4{fill:#E3E9FD;} + .d2-1497255283 .fill-B5{fill:#EDF0FD;} + .d2-1497255283 .fill-B6{fill:#F7F8FE;} + .d2-1497255283 .fill-AA2{fill:#4A6FF3;} + .d2-1497255283 .fill-AA4{fill:#EDF0FD;} + .d2-1497255283 .fill-AA5{fill:#F7F8FE;} + .d2-1497255283 .fill-AB4{fill:#EDF0FD;} + .d2-1497255283 .fill-AB5{fill:#F7F8FE;} + .d2-1497255283 .stroke-N1{stroke:#0A0F25;} + .d2-1497255283 .stroke-N2{stroke:#676C7E;} + .d2-1497255283 .stroke-N3{stroke:#9499AB;} + .d2-1497255283 .stroke-N4{stroke:#CFD2DD;} + .d2-1497255283 .stroke-N5{stroke:#DEE1EB;} + .d2-1497255283 .stroke-N6{stroke:#EEF1F8;} + .d2-1497255283 .stroke-N7{stroke:#FFFFFF;} + .d2-1497255283 .stroke-B1{stroke:#0D32B2;} + .d2-1497255283 .stroke-B2{stroke:#0D32B2;} + .d2-1497255283 .stroke-B3{stroke:#E3E9FD;} + .d2-1497255283 .stroke-B4{stroke:#E3E9FD;} + .d2-1497255283 .stroke-B5{stroke:#EDF0FD;} + .d2-1497255283 .stroke-B6{stroke:#F7F8FE;} + .d2-1497255283 .stroke-AA2{stroke:#4A6FF3;} + .d2-1497255283 .stroke-AA4{stroke:#EDF0FD;} + .d2-1497255283 .stroke-AA5{stroke:#F7F8FE;} + .d2-1497255283 .stroke-AB4{stroke:#EDF0FD;} + .d2-1497255283 .stroke-AB5{stroke:#F7F8FE;} + .d2-1497255283 .background-color-N1{background-color:#0A0F25;} + .d2-1497255283 .background-color-N2{background-color:#676C7E;} + .d2-1497255283 .background-color-N3{background-color:#9499AB;} + .d2-1497255283 .background-color-N4{background-color:#CFD2DD;} + .d2-1497255283 .background-color-N5{background-color:#DEE1EB;} + .d2-1497255283 .background-color-N6{background-color:#EEF1F8;} + .d2-1497255283 .background-color-N7{background-color:#FFFFFF;} + .d2-1497255283 .background-color-B1{background-color:#0D32B2;} + .d2-1497255283 .background-color-B2{background-color:#0D32B2;} + .d2-1497255283 .background-color-B3{background-color:#E3E9FD;} + .d2-1497255283 .background-color-B4{background-color:#E3E9FD;} + .d2-1497255283 .background-color-B5{background-color:#EDF0FD;} + .d2-1497255283 .background-color-B6{background-color:#F7F8FE;} + .d2-1497255283 .background-color-AA2{background-color:#4A6FF3;} + .d2-1497255283 .background-color-AA4{background-color:#EDF0FD;} + .d2-1497255283 .background-color-AA5{background-color:#F7F8FE;} + .d2-1497255283 .background-color-AB4{background-color:#EDF0FD;} + .d2-1497255283 .background-color-AB5{background-color:#F7F8FE;} + .d2-1497255283 .color-N1{color:#0A0F25;} + .d2-1497255283 .color-N2{color:#676C7E;} + .d2-1497255283 .color-N3{color:#9499AB;} + .d2-1497255283 .color-N4{color:#CFD2DD;} + .d2-1497255283 .color-N5{color:#DEE1EB;} + .d2-1497255283 .color-N6{color:#EEF1F8;} + .d2-1497255283 .color-N7{color:#FFFFFF;} + .d2-1497255283 .color-B1{color:#0D32B2;} + .d2-1497255283 .color-B2{color:#0D32B2;} + .d2-1497255283 .color-B3{color:#E3E9FD;} + .d2-1497255283 .color-B4{color:#E3E9FD;} + .d2-1497255283 .color-B5{color:#EDF0FD;} + .d2-1497255283 .color-B6{color:#F7F8FE;} + .d2-1497255283 .color-AA2{color:#4A6FF3;} + .d2-1497255283 .color-AA4{color:#EDF0FD;} + .d2-1497255283 .color-AA5{color:#F7F8FE;} + .d2-1497255283 .color-AB4{color:#EDF0FD;} + .d2-1497255283 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>a labelblabelsa class+public() boolvoid-private() intvoidcloudyyyy:= 5 +:= a + 7 +fmt.Printf("%d", b)a := 5 +b := a + 7 +fmt.Printf("%d", b)cyldiadocssix cornersa random iconoverpackdocs pagetoohard o saysinglepersona queuea squarea step at a timedatausersidintnamevarchar result := callThisFunction(obj, 5) midthis sideother side + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/e2etests/testdata/stable/sequence_diagram_all_shapes/elk/board.exp.json b/e2etests/testdata/stable/sequence_diagram_all_shapes/elk/board.exp.json index dd6b3f0d2..52c1f0a9d 100644 --- a/e2etests/testdata/stable/sequence_diagram_all_shapes/elk/board.exp.json +++ b/e2etests/testdata/stable/sequence_diagram_all_shapes/elk/board.exp.json @@ -186,10 +186,10 @@ "type": "code", "pos": { "x": 922, - "y": 166 + "y": 158 }, - "width": 196, - "height": 70, + "width": 199, + "height": 78, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -216,8 +216,8 @@ "italic": false, "bold": false, "underline": false, - "labelWidth": 191, - "labelHeight": 65, + "labelWidth": 183, + "labelHeight": 62, "labelPosition": "INSIDE_MIDDLE_CENTER", "zIndex": 0, "level": 1 @@ -226,7 +226,7 @@ "id": "f", "type": "cylinder", "pos": { - "x": 1140, + "x": 1143, "y": 118 }, "width": 100, @@ -267,7 +267,7 @@ "id": "g", "type": "diamond", "pos": { - "x": 1290, + "x": 1293, "y": 144 }, "width": 100, @@ -308,7 +308,7 @@ "id": "h", "type": "document", "pos": { - "x": 1440, + "x": 1443, "y": 160 }, "width": 100, @@ -349,7 +349,7 @@ "id": "i", "type": "hexagon", "pos": { - "x": 1580, + "x": 1583, "y": 167 }, "width": 146, @@ -390,7 +390,7 @@ "id": "j", "type": "image", "pos": { - "x": 1766, + "x": 1769, "y": 87 }, "width": 128, @@ -443,7 +443,7 @@ "id": "k", "type": "oval", "pos": { - "x": 1932, + "x": 1935, "y": 163 }, "width": 100, @@ -484,7 +484,7 @@ "id": "l", "type": "package", "pos": { - "x": 2082, + "x": 2085, "y": 163 }, "width": 100, @@ -525,7 +525,7 @@ "id": "m", "type": "page", "pos": { - "x": 2226, + "x": 2229, "y": 149 }, "width": 113, @@ -566,7 +566,7 @@ "id": "n", "type": "parallelogram", "pos": { - "x": 2379, + "x": 2382, "y": 154 }, "width": 169, @@ -607,7 +607,7 @@ "id": "o", "type": "person", "pos": { - "x": 2568, + "x": 2571, "y": 64 }, "width": 100, @@ -648,7 +648,7 @@ "id": "p", "type": "queue", "pos": { - "x": 2708, + "x": 2711, "y": 170 }, "width": 151, @@ -689,7 +689,7 @@ "id": "q", "type": "rectangle", "pos": { - "x": 2899, + "x": 2902, "y": 133 }, "width": 103, @@ -730,7 +730,7 @@ "id": "r", "type": "step", "pos": { - "x": 3042, + "x": 3045, "y": 135 }, "width": 187, @@ -771,7 +771,7 @@ "id": "s", "type": "stored_data", "pos": { - "x": 3267, + "x": 3270, "y": 170 }, "width": 100, @@ -812,7 +812,7 @@ "id": "t", "type": "sql_table", "pos": { - "x": 3407, + "x": 3410, "y": 128 }, "width": 161, @@ -1078,7 +1078,7 @@ "y": 516 }, { - "x": 1020, + "x": 1021.5, "y": 516 } ], @@ -1112,11 +1112,11 @@ "labelPercentage": 0, "route": [ { - "x": 1020, + "x": 1021.5, "y": 586 }, { - "x": 1190, + "x": 1193, "y": 586 } ], @@ -1150,11 +1150,11 @@ "labelPercentage": 0, "route": [ { - "x": 1190, + "x": 1193, "y": 656 }, { - "x": 1340, + "x": 1343, "y": 656 } ], @@ -1188,11 +1188,11 @@ "labelPercentage": 0, "route": [ { - "x": 1340, + "x": 1343, "y": 726 }, { - "x": 1490, + "x": 1493, "y": 726 } ], @@ -1226,11 +1226,11 @@ "labelPercentage": 0, "route": [ { - "x": 1490, + "x": 1493, "y": 796 }, { - "x": 1653, + "x": 1656, "y": 796 } ], @@ -1264,11 +1264,11 @@ "labelPercentage": 0, "route": [ { - "x": 1653, + "x": 1656, "y": 866 }, { - "x": 1830, + "x": 1833, "y": 866 } ], @@ -1302,11 +1302,11 @@ "labelPercentage": 0, "route": [ { - "x": 1830, + "x": 1833, "y": 936 }, { - "x": 1982, + "x": 1985, "y": 936 } ], @@ -1340,11 +1340,11 @@ "labelPercentage": 0, "route": [ { - "x": 1982, + "x": 1985, "y": 1006 }, { - "x": 2132, + "x": 2135, "y": 1006 } ], @@ -1378,11 +1378,11 @@ "labelPercentage": 0, "route": [ { - "x": 2132, + "x": 2135, "y": 1076 }, { - "x": 2282.5, + "x": 2285.5, "y": 1076 } ], @@ -1416,11 +1416,11 @@ "labelPercentage": 0, "route": [ { - "x": 2282.5, + "x": 2285.5, "y": 1146 }, { - "x": 2463.5, + "x": 2466.5, "y": 1146 } ], @@ -1454,11 +1454,11 @@ "labelPercentage": 0, "route": [ { - "x": 2463.5, + "x": 2466.5, "y": 1216 }, { - "x": 2618, + "x": 2621, "y": 1216 } ], @@ -1492,11 +1492,11 @@ "labelPercentage": 0, "route": [ { - "x": 2618, + "x": 2621, "y": 1286 }, { - "x": 2783.5, + "x": 2786.5, "y": 1286 } ], @@ -1530,11 +1530,11 @@ "labelPercentage": 0, "route": [ { - "x": 2783.5, + "x": 2786.5, "y": 1356 }, { - "x": 2950.5, + "x": 2953.5, "y": 1356 } ], @@ -1568,11 +1568,11 @@ "labelPercentage": 0, "route": [ { - "x": 2950.5, + "x": 2953.5, "y": 1426 }, { - "x": 3135.5, + "x": 3138.5, "y": 1426 } ], @@ -1606,11 +1606,11 @@ "labelPercentage": 0, "route": [ { - "x": 3135.5, + "x": 3138.5, "y": 1496 }, { - "x": 3317, + "x": 3320, "y": 1496 } ], @@ -1644,11 +1644,11 @@ "labelPercentage": 0, "route": [ { - "x": 3317, + "x": 3320, "y": 1566 }, { - "x": 3487.5, + "x": 3490.5, "y": 1566 } ], @@ -1834,11 +1834,11 @@ "labelPercentage": 0, "route": [ { - "x": 1020, + "x": 1021.5, "y": 236 }, { - "x": 1020, + "x": 1021.5, "y": 1636 } ], @@ -1872,11 +1872,11 @@ "labelPercentage": 0, "route": [ { - "x": 1190, + "x": 1193, "y": 236 }, { - "x": 1190, + "x": 1193, "y": 1636 } ], @@ -1910,11 +1910,11 @@ "labelPercentage": 0, "route": [ { - "x": 1340, + "x": 1343, "y": 236 }, { - "x": 1340, + "x": 1343, "y": 1636 } ], @@ -1948,11 +1948,11 @@ "labelPercentage": 0, "route": [ { - "x": 1490, + "x": 1493, "y": 236 }, { - "x": 1490, + "x": 1493, "y": 1636 } ], @@ -1986,11 +1986,11 @@ "labelPercentage": 0, "route": [ { - "x": 1653, + "x": 1656, "y": 236 }, { - "x": 1653, + "x": 1656, "y": 1636 } ], @@ -2024,11 +2024,11 @@ "labelPercentage": 0, "route": [ { - "x": 1830, + "x": 1833, "y": 241 }, { - "x": 1830, + "x": 1833, "y": 1636 } ], @@ -2062,11 +2062,11 @@ "labelPercentage": 0, "route": [ { - "x": 1982, + "x": 1985, "y": 236 }, { - "x": 1982, + "x": 1985, "y": 1636 } ], @@ -2100,11 +2100,11 @@ "labelPercentage": 0, "route": [ { - "x": 2132, + "x": 2135, "y": 236 }, { - "x": 2132, + "x": 2135, "y": 1636 } ], @@ -2138,11 +2138,11 @@ "labelPercentage": 0, "route": [ { - "x": 2282.5, + "x": 2285.5, "y": 236 }, { - "x": 2282.5, + "x": 2285.5, "y": 1636 } ], @@ -2176,11 +2176,11 @@ "labelPercentage": 0, "route": [ { - "x": 2463.5, + "x": 2466.5, "y": 236 }, { - "x": 2463.5, + "x": 2466.5, "y": 1636 } ], @@ -2214,11 +2214,11 @@ "labelPercentage": 0, "route": [ { - "x": 2618, + "x": 2621, "y": 241 }, { - "x": 2618, + "x": 2621, "y": 1636 } ], @@ -2252,11 +2252,11 @@ "labelPercentage": 0, "route": [ { - "x": 2783.5, + "x": 2786.5, "y": 236 }, { - "x": 2783.5, + "x": 2786.5, "y": 1636 } ], @@ -2290,11 +2290,11 @@ "labelPercentage": 0, "route": [ { - "x": 2950.5, + "x": 2953.5, "y": 236 }, { - "x": 2950.5, + "x": 2953.5, "y": 1636 } ], @@ -2328,11 +2328,11 @@ "labelPercentage": 0, "route": [ { - "x": 3135.5, + "x": 3138.5, "y": 236 }, { - "x": 3135.5, + "x": 3138.5, "y": 1636 } ], @@ -2366,11 +2366,11 @@ "labelPercentage": 0, "route": [ { - "x": 3317, + "x": 3320, "y": 236 }, { - "x": 3317, + "x": 3320, "y": 1636 } ], @@ -2404,11 +2404,11 @@ "labelPercentage": 0, "route": [ { - "x": 3487.5, + "x": 3490.5, "y": 236 }, { - "x": 3487.5, + "x": 3490.5, "y": 1636 } ], diff --git a/e2etests/testdata/stable/sequence_diagram_all_shapes/elk/sketch.exp.svg b/e2etests/testdata/stable/sequence_diagram_all_shapes/elk/sketch.exp.svg index 1ef95f75f..04f7138a4 100644 --- a/e2etests/testdata/stable/sequence_diagram_all_shapes/elk/sketch.exp.svg +++ b/e2etests/testdata/stable/sequence_diagram_all_shapes/elk/sketch.exp.svg @@ -1,30 +1,30 @@ -a labelblabelsa class+public() boolvoid-private() intvoidcloudyyyy:= 5 -:= a + 7 -fmt.Printf("%d", b)a := 5 -b := a + 7 -fmt.Printf("%d", b)cyldiadocssix cornersa random iconoverpackdocs pagetoohard o saysinglepersona queuea squarea step at a timedatausersidintnamevarchar result := callThisFunction(obj, 5) midthis sideother side - + .d2-1497255283 .fill-N1{fill:#0A0F25;} + .d2-1497255283 .fill-N2{fill:#676C7E;} + .d2-1497255283 .fill-N3{fill:#9499AB;} + .d2-1497255283 .fill-N4{fill:#CFD2DD;} + .d2-1497255283 .fill-N5{fill:#DEE1EB;} + .d2-1497255283 .fill-N6{fill:#EEF1F8;} + .d2-1497255283 .fill-N7{fill:#FFFFFF;} + .d2-1497255283 .fill-B1{fill:#0D32B2;} + .d2-1497255283 .fill-B2{fill:#0D32B2;} + .d2-1497255283 .fill-B3{fill:#E3E9FD;} + .d2-1497255283 .fill-B4{fill:#E3E9FD;} + .d2-1497255283 .fill-B5{fill:#EDF0FD;} + .d2-1497255283 .fill-B6{fill:#F7F8FE;} + .d2-1497255283 .fill-AA2{fill:#4A6FF3;} + .d2-1497255283 .fill-AA4{fill:#EDF0FD;} + .d2-1497255283 .fill-AA5{fill:#F7F8FE;} + .d2-1497255283 .fill-AB4{fill:#EDF0FD;} + .d2-1497255283 .fill-AB5{fill:#F7F8FE;} + .d2-1497255283 .stroke-N1{stroke:#0A0F25;} + .d2-1497255283 .stroke-N2{stroke:#676C7E;} + .d2-1497255283 .stroke-N3{stroke:#9499AB;} + .d2-1497255283 .stroke-N4{stroke:#CFD2DD;} + .d2-1497255283 .stroke-N5{stroke:#DEE1EB;} + .d2-1497255283 .stroke-N6{stroke:#EEF1F8;} + .d2-1497255283 .stroke-N7{stroke:#FFFFFF;} + .d2-1497255283 .stroke-B1{stroke:#0D32B2;} + .d2-1497255283 .stroke-B2{stroke:#0D32B2;} + .d2-1497255283 .stroke-B3{stroke:#E3E9FD;} + .d2-1497255283 .stroke-B4{stroke:#E3E9FD;} + .d2-1497255283 .stroke-B5{stroke:#EDF0FD;} + .d2-1497255283 .stroke-B6{stroke:#F7F8FE;} + .d2-1497255283 .stroke-AA2{stroke:#4A6FF3;} + .d2-1497255283 .stroke-AA4{stroke:#EDF0FD;} + .d2-1497255283 .stroke-AA5{stroke:#F7F8FE;} + .d2-1497255283 .stroke-AB4{stroke:#EDF0FD;} + .d2-1497255283 .stroke-AB5{stroke:#F7F8FE;} + .d2-1497255283 .background-color-N1{background-color:#0A0F25;} + .d2-1497255283 .background-color-N2{background-color:#676C7E;} + .d2-1497255283 .background-color-N3{background-color:#9499AB;} + .d2-1497255283 .background-color-N4{background-color:#CFD2DD;} + .d2-1497255283 .background-color-N5{background-color:#DEE1EB;} + .d2-1497255283 .background-color-N6{background-color:#EEF1F8;} + .d2-1497255283 .background-color-N7{background-color:#FFFFFF;} + .d2-1497255283 .background-color-B1{background-color:#0D32B2;} + .d2-1497255283 .background-color-B2{background-color:#0D32B2;} + .d2-1497255283 .background-color-B3{background-color:#E3E9FD;} + .d2-1497255283 .background-color-B4{background-color:#E3E9FD;} + .d2-1497255283 .background-color-B5{background-color:#EDF0FD;} + .d2-1497255283 .background-color-B6{background-color:#F7F8FE;} + .d2-1497255283 .background-color-AA2{background-color:#4A6FF3;} + .d2-1497255283 .background-color-AA4{background-color:#EDF0FD;} + .d2-1497255283 .background-color-AA5{background-color:#F7F8FE;} + .d2-1497255283 .background-color-AB4{background-color:#EDF0FD;} + .d2-1497255283 .background-color-AB5{background-color:#F7F8FE;} + .d2-1497255283 .color-N1{color:#0A0F25;} + .d2-1497255283 .color-N2{color:#676C7E;} + .d2-1497255283 .color-N3{color:#9499AB;} + .d2-1497255283 .color-N4{color:#CFD2DD;} + .d2-1497255283 .color-N5{color:#DEE1EB;} + .d2-1497255283 .color-N6{color:#EEF1F8;} + .d2-1497255283 .color-N7{color:#FFFFFF;} + .d2-1497255283 .color-B1{color:#0D32B2;} + .d2-1497255283 .color-B2{color:#0D32B2;} + .d2-1497255283 .color-B3{color:#E3E9FD;} + .d2-1497255283 .color-B4{color:#E3E9FD;} + .d2-1497255283 .color-B5{color:#EDF0FD;} + .d2-1497255283 .color-B6{color:#F7F8FE;} + .d2-1497255283 .color-AA2{color:#4A6FF3;} + .d2-1497255283 .color-AA4{color:#EDF0FD;} + .d2-1497255283 .color-AA5{color:#F7F8FE;} + .d2-1497255283 .color-AB4{color:#EDF0FD;} + .d2-1497255283 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>a labelblabelsa class+public() boolvoid-private() intvoidcloudyyyy:= 5 +:= a + 7 +fmt.Printf("%d", b)a := 5 +b := a + 7 +fmt.Printf("%d", b)cyldiadocssix cornersa random iconoverpackdocs pagetoohard o saysinglepersona queuea squarea step at a timedatausersidintnamevarchar result := callThisFunction(obj, 5) midthis sideother side + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/e2etests/testdata/stable/unnamed_only_height/dagre/board.exp.json b/e2etests/testdata/stable/unnamed_only_height/dagre/board.exp.json index 362c4f342..69bcf9374 100644 --- a/e2etests/testdata/stable/unnamed_only_height/dagre/board.exp.json +++ b/e2etests/testdata/stable/unnamed_only_height/dagre/board.exp.json @@ -266,10 +266,10 @@ "id": "code", "type": "code", "pos": { - "x": 116, + "x": 112, "y": 1224 }, - "width": 191, + "width": 199, "height": 512, "opacity": 1, "strokeDash": 0, @@ -297,8 +297,8 @@ "italic": false, "bold": true, "underline": false, - "labelWidth": 191, - "labelHeight": 65, + "labelWidth": 183, + "labelHeight": 62, "zIndex": 0, "level": 1 }, diff --git a/e2etests/testdata/stable/unnamed_only_height/dagre/sketch.exp.svg b/e2etests/testdata/stable/unnamed_only_height/dagre/sketch.exp.svg index 7735b6c68..6ba54fa65 100644 --- a/e2etests/testdata/stable/unnamed_only_height/dagre/sketch.exp.svg +++ b/e2etests/testdata/stable/unnamed_only_height/dagre/sketch.exp.svg @@ -1,23 +1,23 @@ --numint-timeoutint-pid+getStatus()Enum+getJobs()Job[]+setTimeout(seconds int)voididintnamestringemailstringpasswordstringlast_logindatetime:= 5 -:= a + 7 -fmt.Printf("%d", b)a := 5 -b := a + 7 -fmt.Printf("%d", b) + .d2-3104046 .fill-N1{fill:#0A0F25;} + .d2-3104046 .fill-N2{fill:#676C7E;} + .d2-3104046 .fill-N3{fill:#9499AB;} + .d2-3104046 .fill-N4{fill:#CFD2DD;} + .d2-3104046 .fill-N5{fill:#DEE1EB;} + .d2-3104046 .fill-N6{fill:#EEF1F8;} + .d2-3104046 .fill-N7{fill:#FFFFFF;} + .d2-3104046 .fill-B1{fill:#0D32B2;} + .d2-3104046 .fill-B2{fill:#0D32B2;} + .d2-3104046 .fill-B3{fill:#E3E9FD;} + .d2-3104046 .fill-B4{fill:#E3E9FD;} + .d2-3104046 .fill-B5{fill:#EDF0FD;} + .d2-3104046 .fill-B6{fill:#F7F8FE;} + .d2-3104046 .fill-AA2{fill:#4A6FF3;} + .d2-3104046 .fill-AA4{fill:#EDF0FD;} + .d2-3104046 .fill-AA5{fill:#F7F8FE;} + .d2-3104046 .fill-AB4{fill:#EDF0FD;} + .d2-3104046 .fill-AB5{fill:#F7F8FE;} + .d2-3104046 .stroke-N1{stroke:#0A0F25;} + .d2-3104046 .stroke-N2{stroke:#676C7E;} + .d2-3104046 .stroke-N3{stroke:#9499AB;} + .d2-3104046 .stroke-N4{stroke:#CFD2DD;} + .d2-3104046 .stroke-N5{stroke:#DEE1EB;} + .d2-3104046 .stroke-N6{stroke:#EEF1F8;} + .d2-3104046 .stroke-N7{stroke:#FFFFFF;} + .d2-3104046 .stroke-B1{stroke:#0D32B2;} + .d2-3104046 .stroke-B2{stroke:#0D32B2;} + .d2-3104046 .stroke-B3{stroke:#E3E9FD;} + .d2-3104046 .stroke-B4{stroke:#E3E9FD;} + .d2-3104046 .stroke-B5{stroke:#EDF0FD;} + .d2-3104046 .stroke-B6{stroke:#F7F8FE;} + .d2-3104046 .stroke-AA2{stroke:#4A6FF3;} + .d2-3104046 .stroke-AA4{stroke:#EDF0FD;} + .d2-3104046 .stroke-AA5{stroke:#F7F8FE;} + .d2-3104046 .stroke-AB4{stroke:#EDF0FD;} + .d2-3104046 .stroke-AB5{stroke:#F7F8FE;} + .d2-3104046 .background-color-N1{background-color:#0A0F25;} + .d2-3104046 .background-color-N2{background-color:#676C7E;} + .d2-3104046 .background-color-N3{background-color:#9499AB;} + .d2-3104046 .background-color-N4{background-color:#CFD2DD;} + .d2-3104046 .background-color-N5{background-color:#DEE1EB;} + .d2-3104046 .background-color-N6{background-color:#EEF1F8;} + .d2-3104046 .background-color-N7{background-color:#FFFFFF;} + .d2-3104046 .background-color-B1{background-color:#0D32B2;} + .d2-3104046 .background-color-B2{background-color:#0D32B2;} + .d2-3104046 .background-color-B3{background-color:#E3E9FD;} + .d2-3104046 .background-color-B4{background-color:#E3E9FD;} + .d2-3104046 .background-color-B5{background-color:#EDF0FD;} + .d2-3104046 .background-color-B6{background-color:#F7F8FE;} + .d2-3104046 .background-color-AA2{background-color:#4A6FF3;} + .d2-3104046 .background-color-AA4{background-color:#EDF0FD;} + .d2-3104046 .background-color-AA5{background-color:#F7F8FE;} + .d2-3104046 .background-color-AB4{background-color:#EDF0FD;} + .d2-3104046 .background-color-AB5{background-color:#F7F8FE;} + .d2-3104046 .color-N1{color:#0A0F25;} + .d2-3104046 .color-N2{color:#676C7E;} + .d2-3104046 .color-N3{color:#9499AB;} + .d2-3104046 .color-N4{color:#CFD2DD;} + .d2-3104046 .color-N5{color:#DEE1EB;} + .d2-3104046 .color-N6{color:#EEF1F8;} + .d2-3104046 .color-N7{color:#FFFFFF;} + .d2-3104046 .color-B1{color:#0D32B2;} + .d2-3104046 .color-B2{color:#0D32B2;} + .d2-3104046 .color-B3{color:#E3E9FD;} + .d2-3104046 .color-B4{color:#E3E9FD;} + .d2-3104046 .color-B5{color:#EDF0FD;} + .d2-3104046 .color-B6{color:#F7F8FE;} + .d2-3104046 .color-AA2{color:#4A6FF3;} + .d2-3104046 .color-AA4{color:#EDF0FD;} + .d2-3104046 .color-AA5{color:#F7F8FE;} + .d2-3104046 .color-AB4{color:#EDF0FD;} + .d2-3104046 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>-numint-timeoutint-pid+getStatus()Enum+getJobs()Job[]+setTimeout(seconds int)voididintnamestringemailstringpasswordstringlast_logindatetime:= 5 +:= a + 7 +fmt.Printf("%d", b)a := 5 +b := a + 7 +fmt.Printf("%d", b) - + \ No newline at end of file diff --git a/e2etests/testdata/stable/unnamed_only_height/elk/board.exp.json b/e2etests/testdata/stable/unnamed_only_height/elk/board.exp.json index b4c0804d3..8aae100af 100644 --- a/e2etests/testdata/stable/unnamed_only_height/elk/board.exp.json +++ b/e2etests/testdata/stable/unnamed_only_height/elk/board.exp.json @@ -266,10 +266,10 @@ "id": "code", "type": "code", "pos": { - "x": 127, + "x": 123, "y": 1176 }, - "width": 191, + "width": 199, "height": 512, "opacity": 1, "strokeDash": 0, @@ -297,8 +297,8 @@ "italic": false, "bold": true, "underline": false, - "labelWidth": 191, - "labelHeight": 65, + "labelWidth": 183, + "labelHeight": 62, "zIndex": 0, "level": 1 }, diff --git a/e2etests/testdata/stable/unnamed_only_height/elk/sketch.exp.svg b/e2etests/testdata/stable/unnamed_only_height/elk/sketch.exp.svg index 84eaeaf36..2d6a6d688 100644 --- a/e2etests/testdata/stable/unnamed_only_height/elk/sketch.exp.svg +++ b/e2etests/testdata/stable/unnamed_only_height/elk/sketch.exp.svg @@ -1,23 +1,23 @@ --numint-timeoutint-pid+getStatus()Enum+getJobs()Job[]+setTimeout(seconds int)voididintnamestringemailstringpasswordstringlast_logindatetime:= 5 -:= a + 7 -fmt.Printf("%d", b)a := 5 -b := a + 7 -fmt.Printf("%d", b) + .d2-1881986283 .fill-N1{fill:#0A0F25;} + .d2-1881986283 .fill-N2{fill:#676C7E;} + .d2-1881986283 .fill-N3{fill:#9499AB;} + .d2-1881986283 .fill-N4{fill:#CFD2DD;} + .d2-1881986283 .fill-N5{fill:#DEE1EB;} + .d2-1881986283 .fill-N6{fill:#EEF1F8;} + .d2-1881986283 .fill-N7{fill:#FFFFFF;} + .d2-1881986283 .fill-B1{fill:#0D32B2;} + .d2-1881986283 .fill-B2{fill:#0D32B2;} + .d2-1881986283 .fill-B3{fill:#E3E9FD;} + .d2-1881986283 .fill-B4{fill:#E3E9FD;} + .d2-1881986283 .fill-B5{fill:#EDF0FD;} + .d2-1881986283 .fill-B6{fill:#F7F8FE;} + .d2-1881986283 .fill-AA2{fill:#4A6FF3;} + .d2-1881986283 .fill-AA4{fill:#EDF0FD;} + .d2-1881986283 .fill-AA5{fill:#F7F8FE;} + .d2-1881986283 .fill-AB4{fill:#EDF0FD;} + .d2-1881986283 .fill-AB5{fill:#F7F8FE;} + .d2-1881986283 .stroke-N1{stroke:#0A0F25;} + .d2-1881986283 .stroke-N2{stroke:#676C7E;} + .d2-1881986283 .stroke-N3{stroke:#9499AB;} + .d2-1881986283 .stroke-N4{stroke:#CFD2DD;} + .d2-1881986283 .stroke-N5{stroke:#DEE1EB;} + .d2-1881986283 .stroke-N6{stroke:#EEF1F8;} + .d2-1881986283 .stroke-N7{stroke:#FFFFFF;} + .d2-1881986283 .stroke-B1{stroke:#0D32B2;} + .d2-1881986283 .stroke-B2{stroke:#0D32B2;} + .d2-1881986283 .stroke-B3{stroke:#E3E9FD;} + .d2-1881986283 .stroke-B4{stroke:#E3E9FD;} + .d2-1881986283 .stroke-B5{stroke:#EDF0FD;} + .d2-1881986283 .stroke-B6{stroke:#F7F8FE;} + .d2-1881986283 .stroke-AA2{stroke:#4A6FF3;} + .d2-1881986283 .stroke-AA4{stroke:#EDF0FD;} + .d2-1881986283 .stroke-AA5{stroke:#F7F8FE;} + .d2-1881986283 .stroke-AB4{stroke:#EDF0FD;} + .d2-1881986283 .stroke-AB5{stroke:#F7F8FE;} + .d2-1881986283 .background-color-N1{background-color:#0A0F25;} + .d2-1881986283 .background-color-N2{background-color:#676C7E;} + .d2-1881986283 .background-color-N3{background-color:#9499AB;} + .d2-1881986283 .background-color-N4{background-color:#CFD2DD;} + .d2-1881986283 .background-color-N5{background-color:#DEE1EB;} + .d2-1881986283 .background-color-N6{background-color:#EEF1F8;} + .d2-1881986283 .background-color-N7{background-color:#FFFFFF;} + .d2-1881986283 .background-color-B1{background-color:#0D32B2;} + .d2-1881986283 .background-color-B2{background-color:#0D32B2;} + .d2-1881986283 .background-color-B3{background-color:#E3E9FD;} + .d2-1881986283 .background-color-B4{background-color:#E3E9FD;} + .d2-1881986283 .background-color-B5{background-color:#EDF0FD;} + .d2-1881986283 .background-color-B6{background-color:#F7F8FE;} + .d2-1881986283 .background-color-AA2{background-color:#4A6FF3;} + .d2-1881986283 .background-color-AA4{background-color:#EDF0FD;} + .d2-1881986283 .background-color-AA5{background-color:#F7F8FE;} + .d2-1881986283 .background-color-AB4{background-color:#EDF0FD;} + .d2-1881986283 .background-color-AB5{background-color:#F7F8FE;} + .d2-1881986283 .color-N1{color:#0A0F25;} + .d2-1881986283 .color-N2{color:#676C7E;} + .d2-1881986283 .color-N3{color:#9499AB;} + .d2-1881986283 .color-N4{color:#CFD2DD;} + .d2-1881986283 .color-N5{color:#DEE1EB;} + .d2-1881986283 .color-N6{color:#EEF1F8;} + .d2-1881986283 .color-N7{color:#FFFFFF;} + .d2-1881986283 .color-B1{color:#0D32B2;} + .d2-1881986283 .color-B2{color:#0D32B2;} + .d2-1881986283 .color-B3{color:#E3E9FD;} + .d2-1881986283 .color-B4{color:#E3E9FD;} + .d2-1881986283 .color-B5{color:#EDF0FD;} + .d2-1881986283 .color-B6{color:#F7F8FE;} + .d2-1881986283 .color-AA2{color:#4A6FF3;} + .d2-1881986283 .color-AA4{color:#EDF0FD;} + .d2-1881986283 .color-AA5{color:#F7F8FE;} + .d2-1881986283 .color-AB4{color:#EDF0FD;} + .d2-1881986283 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>-numint-timeoutint-pid+getStatus()Enum+getJobs()Job[]+setTimeout(seconds int)voididintnamestringemailstringpasswordstringlast_logindatetime:= 5 +:= a + 7 +fmt.Printf("%d", b)a := 5 +b := a + 7 +fmt.Printf("%d", b) - + \ No newline at end of file diff --git a/e2etests/testdata/stable/unnamed_only_width/dagre/board.exp.json b/e2etests/testdata/stable/unnamed_only_width/dagre/board.exp.json index 508c0dfda..b5b4b51e9 100644 --- a/e2etests/testdata/stable/unnamed_only_width/dagre/board.exp.json +++ b/e2etests/testdata/stable/unnamed_only_width/dagre/board.exp.json @@ -270,7 +270,7 @@ "y": 754 }, "width": 512, - "height": 65, + "height": 78, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -297,8 +297,8 @@ "italic": false, "bold": true, "underline": false, - "labelWidth": 191, - "labelHeight": 65, + "labelWidth": 183, + "labelHeight": 62, "zIndex": 0, "level": 1 }, @@ -307,7 +307,7 @@ "type": "package", "pos": { "x": 0, - "y": 919 + "y": 932 }, "width": 512, "height": 100, @@ -347,7 +347,7 @@ "type": "rectangle", "pos": { "x": 206, - "y": 1119 + "y": 1132 }, "width": 100, "height": 100, @@ -504,19 +504,19 @@ "route": [ { "x": 256, - "y": 819 + "y": 832 }, { "x": 256, - "y": 859 + "y": 872 }, { "x": 256, - "y": 883 + "y": 896 }, { "x": 256, - "y": 939 + "y": 952 } ], "isCurve": true, @@ -551,19 +551,19 @@ "route": [ { "x": 256, - "y": 1019 + "y": 1032 }, { "x": 256, - "y": 1059 + "y": 1072 }, { "x": 256, - "y": 1079 + "y": 1092 }, { "x": 256, - "y": 1119 + "y": 1132 } ], "isCurve": true, diff --git a/e2etests/testdata/stable/unnamed_only_width/dagre/sketch.exp.svg b/e2etests/testdata/stable/unnamed_only_width/dagre/sketch.exp.svg index f2571ee8b..04ccf3de6 100644 --- a/e2etests/testdata/stable/unnamed_only_width/dagre/sketch.exp.svg +++ b/e2etests/testdata/stable/unnamed_only_width/dagre/sketch.exp.svg @@ -1,23 +1,23 @@ --numint-timeoutint-pid+getStatus()Enum+getJobs()Job[]+setTimeout(seconds int)voididintnamestringemailstringpasswordstringlast_logindatetime:= 5 -:= a + 7 -fmt.Printf("%d", b)a := 5 -b := a + 7 -fmt.Printf("%d", b) - - + .d2-255663644 .fill-N1{fill:#0A0F25;} + .d2-255663644 .fill-N2{fill:#676C7E;} + .d2-255663644 .fill-N3{fill:#9499AB;} + .d2-255663644 .fill-N4{fill:#CFD2DD;} + .d2-255663644 .fill-N5{fill:#DEE1EB;} + .d2-255663644 .fill-N6{fill:#EEF1F8;} + .d2-255663644 .fill-N7{fill:#FFFFFF;} + .d2-255663644 .fill-B1{fill:#0D32B2;} + .d2-255663644 .fill-B2{fill:#0D32B2;} + .d2-255663644 .fill-B3{fill:#E3E9FD;} + .d2-255663644 .fill-B4{fill:#E3E9FD;} + .d2-255663644 .fill-B5{fill:#EDF0FD;} + .d2-255663644 .fill-B6{fill:#F7F8FE;} + .d2-255663644 .fill-AA2{fill:#4A6FF3;} + .d2-255663644 .fill-AA4{fill:#EDF0FD;} + .d2-255663644 .fill-AA5{fill:#F7F8FE;} + .d2-255663644 .fill-AB4{fill:#EDF0FD;} + .d2-255663644 .fill-AB5{fill:#F7F8FE;} + .d2-255663644 .stroke-N1{stroke:#0A0F25;} + .d2-255663644 .stroke-N2{stroke:#676C7E;} + .d2-255663644 .stroke-N3{stroke:#9499AB;} + .d2-255663644 .stroke-N4{stroke:#CFD2DD;} + .d2-255663644 .stroke-N5{stroke:#DEE1EB;} + .d2-255663644 .stroke-N6{stroke:#EEF1F8;} + .d2-255663644 .stroke-N7{stroke:#FFFFFF;} + .d2-255663644 .stroke-B1{stroke:#0D32B2;} + .d2-255663644 .stroke-B2{stroke:#0D32B2;} + .d2-255663644 .stroke-B3{stroke:#E3E9FD;} + .d2-255663644 .stroke-B4{stroke:#E3E9FD;} + .d2-255663644 .stroke-B5{stroke:#EDF0FD;} + .d2-255663644 .stroke-B6{stroke:#F7F8FE;} + .d2-255663644 .stroke-AA2{stroke:#4A6FF3;} + .d2-255663644 .stroke-AA4{stroke:#EDF0FD;} + .d2-255663644 .stroke-AA5{stroke:#F7F8FE;} + .d2-255663644 .stroke-AB4{stroke:#EDF0FD;} + .d2-255663644 .stroke-AB5{stroke:#F7F8FE;} + .d2-255663644 .background-color-N1{background-color:#0A0F25;} + .d2-255663644 .background-color-N2{background-color:#676C7E;} + .d2-255663644 .background-color-N3{background-color:#9499AB;} + .d2-255663644 .background-color-N4{background-color:#CFD2DD;} + .d2-255663644 .background-color-N5{background-color:#DEE1EB;} + .d2-255663644 .background-color-N6{background-color:#EEF1F8;} + .d2-255663644 .background-color-N7{background-color:#FFFFFF;} + .d2-255663644 .background-color-B1{background-color:#0D32B2;} + .d2-255663644 .background-color-B2{background-color:#0D32B2;} + .d2-255663644 .background-color-B3{background-color:#E3E9FD;} + .d2-255663644 .background-color-B4{background-color:#E3E9FD;} + .d2-255663644 .background-color-B5{background-color:#EDF0FD;} + .d2-255663644 .background-color-B6{background-color:#F7F8FE;} + .d2-255663644 .background-color-AA2{background-color:#4A6FF3;} + .d2-255663644 .background-color-AA4{background-color:#EDF0FD;} + .d2-255663644 .background-color-AA5{background-color:#F7F8FE;} + .d2-255663644 .background-color-AB4{background-color:#EDF0FD;} + .d2-255663644 .background-color-AB5{background-color:#F7F8FE;} + .d2-255663644 .color-N1{color:#0A0F25;} + .d2-255663644 .color-N2{color:#676C7E;} + .d2-255663644 .color-N3{color:#9499AB;} + .d2-255663644 .color-N4{color:#CFD2DD;} + .d2-255663644 .color-N5{color:#DEE1EB;} + .d2-255663644 .color-N6{color:#EEF1F8;} + .d2-255663644 .color-N7{color:#FFFFFF;} + .d2-255663644 .color-B1{color:#0D32B2;} + .d2-255663644 .color-B2{color:#0D32B2;} + .d2-255663644 .color-B3{color:#E3E9FD;} + .d2-255663644 .color-B4{color:#E3E9FD;} + .d2-255663644 .color-B5{color:#EDF0FD;} + .d2-255663644 .color-B6{color:#F7F8FE;} + .d2-255663644 .color-AA2{color:#4A6FF3;} + .d2-255663644 .color-AA4{color:#EDF0FD;} + .d2-255663644 .color-AA5{color:#F7F8FE;} + .d2-255663644 .color-AB4{color:#EDF0FD;} + .d2-255663644 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>-numint-timeoutint-pid+getStatus()Enum+getJobs()Job[]+setTimeout(seconds int)voididintnamestringemailstringpasswordstringlast_logindatetime:= 5 +:= a + 7 +fmt.Printf("%d", b)a := 5 +b := a + 7 +fmt.Printf("%d", b) + + \ No newline at end of file diff --git a/e2etests/testdata/stable/unnamed_only_width/elk/board.exp.json b/e2etests/testdata/stable/unnamed_only_width/elk/board.exp.json index bbcdf884f..113d04be0 100644 --- a/e2etests/testdata/stable/unnamed_only_width/elk/board.exp.json +++ b/e2etests/testdata/stable/unnamed_only_width/elk/board.exp.json @@ -270,7 +270,7 @@ "y": 706 }, "width": 512, - "height": 65, + "height": 78, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -297,8 +297,8 @@ "italic": false, "bold": true, "underline": false, - "labelWidth": 191, - "labelHeight": 65, + "labelWidth": 183, + "labelHeight": 62, "zIndex": 0, "level": 1 }, @@ -307,7 +307,7 @@ "type": "package", "pos": { "x": 12, - "y": 841 + "y": 854 }, "width": 512, "height": 100, @@ -347,7 +347,7 @@ "type": "rectangle", "pos": { "x": 218, - "y": 1011 + "y": 1024 }, "width": 100, "height": 100, @@ -486,11 +486,11 @@ "route": [ { "x": 268, - "y": 771 + "y": 784 }, { "x": 268, - "y": 861 + "y": 874 } ], "animated": false, @@ -524,11 +524,11 @@ "route": [ { "x": 268, - "y": 941 + "y": 954 }, { "x": 268, - "y": 1011 + "y": 1024 } ], "animated": false, diff --git a/e2etests/testdata/stable/unnamed_only_width/elk/sketch.exp.svg b/e2etests/testdata/stable/unnamed_only_width/elk/sketch.exp.svg index 58de4f7c9..39fe80c54 100644 --- a/e2etests/testdata/stable/unnamed_only_width/elk/sketch.exp.svg +++ b/e2etests/testdata/stable/unnamed_only_width/elk/sketch.exp.svg @@ -1,23 +1,23 @@ --numint-timeoutint-pid+getStatus()Enum+getJobs()Job[]+setTimeout(seconds int)voididintnamestringemailstringpasswordstringlast_logindatetime:= 5 -:= a + 7 -fmt.Printf("%d", b)a := 5 -b := a + 7 -fmt.Printf("%d", b) - - + .d2-2488653063 .fill-N1{fill:#0A0F25;} + .d2-2488653063 .fill-N2{fill:#676C7E;} + .d2-2488653063 .fill-N3{fill:#9499AB;} + .d2-2488653063 .fill-N4{fill:#CFD2DD;} + .d2-2488653063 .fill-N5{fill:#DEE1EB;} + .d2-2488653063 .fill-N6{fill:#EEF1F8;} + .d2-2488653063 .fill-N7{fill:#FFFFFF;} + .d2-2488653063 .fill-B1{fill:#0D32B2;} + .d2-2488653063 .fill-B2{fill:#0D32B2;} + .d2-2488653063 .fill-B3{fill:#E3E9FD;} + .d2-2488653063 .fill-B4{fill:#E3E9FD;} + .d2-2488653063 .fill-B5{fill:#EDF0FD;} + .d2-2488653063 .fill-B6{fill:#F7F8FE;} + .d2-2488653063 .fill-AA2{fill:#4A6FF3;} + .d2-2488653063 .fill-AA4{fill:#EDF0FD;} + .d2-2488653063 .fill-AA5{fill:#F7F8FE;} + .d2-2488653063 .fill-AB4{fill:#EDF0FD;} + .d2-2488653063 .fill-AB5{fill:#F7F8FE;} + .d2-2488653063 .stroke-N1{stroke:#0A0F25;} + .d2-2488653063 .stroke-N2{stroke:#676C7E;} + .d2-2488653063 .stroke-N3{stroke:#9499AB;} + .d2-2488653063 .stroke-N4{stroke:#CFD2DD;} + .d2-2488653063 .stroke-N5{stroke:#DEE1EB;} + .d2-2488653063 .stroke-N6{stroke:#EEF1F8;} + .d2-2488653063 .stroke-N7{stroke:#FFFFFF;} + .d2-2488653063 .stroke-B1{stroke:#0D32B2;} + .d2-2488653063 .stroke-B2{stroke:#0D32B2;} + .d2-2488653063 .stroke-B3{stroke:#E3E9FD;} + .d2-2488653063 .stroke-B4{stroke:#E3E9FD;} + .d2-2488653063 .stroke-B5{stroke:#EDF0FD;} + .d2-2488653063 .stroke-B6{stroke:#F7F8FE;} + .d2-2488653063 .stroke-AA2{stroke:#4A6FF3;} + .d2-2488653063 .stroke-AA4{stroke:#EDF0FD;} + .d2-2488653063 .stroke-AA5{stroke:#F7F8FE;} + .d2-2488653063 .stroke-AB4{stroke:#EDF0FD;} + .d2-2488653063 .stroke-AB5{stroke:#F7F8FE;} + .d2-2488653063 .background-color-N1{background-color:#0A0F25;} + .d2-2488653063 .background-color-N2{background-color:#676C7E;} + .d2-2488653063 .background-color-N3{background-color:#9499AB;} + .d2-2488653063 .background-color-N4{background-color:#CFD2DD;} + .d2-2488653063 .background-color-N5{background-color:#DEE1EB;} + .d2-2488653063 .background-color-N6{background-color:#EEF1F8;} + .d2-2488653063 .background-color-N7{background-color:#FFFFFF;} + .d2-2488653063 .background-color-B1{background-color:#0D32B2;} + .d2-2488653063 .background-color-B2{background-color:#0D32B2;} + .d2-2488653063 .background-color-B3{background-color:#E3E9FD;} + .d2-2488653063 .background-color-B4{background-color:#E3E9FD;} + .d2-2488653063 .background-color-B5{background-color:#EDF0FD;} + .d2-2488653063 .background-color-B6{background-color:#F7F8FE;} + .d2-2488653063 .background-color-AA2{background-color:#4A6FF3;} + .d2-2488653063 .background-color-AA4{background-color:#EDF0FD;} + .d2-2488653063 .background-color-AA5{background-color:#F7F8FE;} + .d2-2488653063 .background-color-AB4{background-color:#EDF0FD;} + .d2-2488653063 .background-color-AB5{background-color:#F7F8FE;} + .d2-2488653063 .color-N1{color:#0A0F25;} + .d2-2488653063 .color-N2{color:#676C7E;} + .d2-2488653063 .color-N3{color:#9499AB;} + .d2-2488653063 .color-N4{color:#CFD2DD;} + .d2-2488653063 .color-N5{color:#DEE1EB;} + .d2-2488653063 .color-N6{color:#EEF1F8;} + .d2-2488653063 .color-N7{color:#FFFFFF;} + .d2-2488653063 .color-B1{color:#0D32B2;} + .d2-2488653063 .color-B2{color:#0D32B2;} + .d2-2488653063 .color-B3{color:#E3E9FD;} + .d2-2488653063 .color-B4{color:#E3E9FD;} + .d2-2488653063 .color-B5{color:#EDF0FD;} + .d2-2488653063 .color-B6{color:#F7F8FE;} + .d2-2488653063 .color-AA2{color:#4A6FF3;} + .d2-2488653063 .color-AA4{color:#EDF0FD;} + .d2-2488653063 .color-AA5{color:#F7F8FE;} + .d2-2488653063 .color-AB4{color:#EDF0FD;} + .d2-2488653063 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>-numint-timeoutint-pid+getStatus()Enum+getJobs()Job[]+setTimeout(seconds int)voididintnamestringemailstringpasswordstringlast_logindatetime:= 5 +:= a + 7 +fmt.Printf("%d", b)a := 5 +b := a + 7 +fmt.Printf("%d", b) + + \ No newline at end of file diff --git a/e2etests/testdata/themes/dark_terrastruct_flagship/dagre/board.exp.json b/e2etests/testdata/themes/dark_terrastruct_flagship/dagre/board.exp.json index 6443dd135..5c8ddbdef 100644 --- a/e2etests/testdata/themes/dark_terrastruct_flagship/dagre/board.exp.json +++ b/e2etests/testdata/themes/dark_terrastruct_flagship/dagre/board.exp.json @@ -10,8 +10,8 @@ "x": 0, "y": 438 }, - "width": 451, - "height": 1585, + "width": 450, + "height": 1694, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -52,7 +52,7 @@ "y": 503 }, "width": 336, - "height": 657, + "height": 766, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -90,7 +90,7 @@ "type": "stored_data", "pos": { "x": 140, - "y": 710 + "y": 765 }, "width": 130, "height": 66, @@ -131,7 +131,7 @@ "type": "rectangle", "pos": { "x": 203, - "y": 1062 + "y": 1171 }, "width": 146, "height": 66, @@ -172,7 +172,7 @@ "type": "rectangle", "pos": { "x": 20, - "y": 1832 + "y": 1941 }, "width": 147, "height": 161, @@ -213,7 +213,7 @@ "type": "hexagon", "pos": { "x": 67, - "y": 1878 + "y": 1987 }, "width": 59, "height": 69, @@ -253,8 +253,8 @@ "id": "network.data processor", "type": "rectangle", "pos": { - "x": 182, - "y": 1317 + "x": 181, + "y": 1426 }, "width": 189, "height": 192, @@ -294,8 +294,8 @@ "id": "network.data processor.storage", "type": "cylinder", "pos": { - "x": 222, - "y": 1359 + "x": 221, + "y": 1468 }, "width": 99, "height": 118, @@ -376,8 +376,8 @@ "id": "api server", "type": "rectangle", "pos": { - "x": 491, - "y": 1589 + "x": 490, + "y": 1698 }, "width": 116, "height": 66, @@ -418,7 +418,7 @@ "type": "page", "pos": { "x": 507, - "y": 1836 + "y": 1945 }, "width": 73, "height": 87, @@ -458,7 +458,7 @@ "id": "users", "type": "sql_table", "pos": { - "x": 306, + "x": 307, "y": 30 }, "width": 208, @@ -642,7 +642,7 @@ "id": "products", "type": "class", "pos": { - "x": 574, + "x": 575, "y": 0 }, "width": 242, @@ -706,7 +706,7 @@ "id": "markdown", "type": "text", "pos": { - "x": 876, + "x": 877, "y": 79 }, "width": 97, @@ -746,11 +746,11 @@ "id": "code", "type": "code", "pos": { - "x": 491, + "x": 490, "y": 497 }, - "width": 868, - "height": 406, + "width": 870, + "height": 515, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -777,8 +777,8 @@ "italic": false, "bold": true, "underline": false, - "labelWidth": 863, - "labelHeight": 401, + "labelWidth": 854, + "labelHeight": 499, "zIndex": 0, "level": 1 }, @@ -787,7 +787,7 @@ "type": "text", "pos": { "x": 723, - "y": 1031 + "y": 1140 }, "width": 404, "height": 52, @@ -849,20 +849,20 @@ "labelPercentage": 0, "route": [ { - "x": 204, - "y": 777 + "x": 205, + "y": 832 }, { - "x": 179.1999969482422, - "y": 957 + "x": 179.39999389648438, + "y": 1055.199951171875 }, { - "x": 186.39999389648438, - "y": 1014.2000122070312 + "x": 186.1999969482422, + "y": 1123.199951171875 }, { - "x": 240, - "y": 1063 + "x": 239, + "y": 1172 } ], "isCurve": true, @@ -896,20 +896,20 @@ "labelPercentage": 0, "route": [ { - "x": 215, - "y": 777 + "x": 214, + "y": 832 }, { - "x": 239.8000030517578, - "y": 957 + "x": 239.60000610351562, + "y": 1055.199951171875 }, { "x": 249.8000030517578, - "y": 1014.2000122070312 + "y": 1123.199951171875 }, { "x": 265, - "y": 1063 + "y": 1172 } ], "isCurve": true, @@ -943,20 +943,20 @@ "labelPercentage": 0, "route": [ { - "x": 230, - "y": 777 + "x": 226, + "y": 832 }, { - "x": 326.6000061035156, - "y": 957 + "x": 325.3999938964844, + "y": 1055.199951171875 }, { - "x": 341.1499938964844, - "y": 1014.2000122070312 + "x": 340.6499938964844, + "y": 1123.199951171875 }, { - "x": 302.75, - "y": 1063 + "x": 302.25, + "y": 1172 } ], "isCurve": true, @@ -990,32 +990,32 @@ "labelPercentage": 0, "route": [ { - "x": 276, - "y": 1128.5 + "x": 275.5, + "y": 1237.5 + }, + { + "x": 275.5, + "y": 1263.0999755859375 + }, + { + "x": 275.5, + "y": 1281.5999755859375 + }, + { + "x": 275.5, + "y": 1299.75 + }, + { + "x": 275.5, + "y": 1317.9000244140625 + }, + { + "x": 275.6000061035156, + "y": 1404.199951171875 }, { "x": 276, - "y": 1154.0999755859375 - }, - { - "x": 276, - "y": 1172.5999755859375 - }, - { - "x": 276, - "y": 1190.75 - }, - { - "x": 276, - "y": 1208.9000244140625 - }, - { - "x": 276, - "y": 1295.199951171875 - }, - { - "x": 276, - "y": 1350 + "y": 1459 } ], "isCurve": true, @@ -1129,143 +1129,143 @@ }, { "x": 74.75, - "y": 497.6000061035156 + "y": 508.5 }, { "x": 74.75, - "y": 573.5 + "y": 600.75 }, { "x": 74.75, - "y": 649.4000244140625 + "y": 693 }, { "x": 74.75, - "y": 752.7000122070312 + "y": 818.0999755859375 }, { "x": 74.75, - "y": 831.75 + "y": 913.5 }, { "x": 74.75, - "y": 910.7999877929688 + "y": 1008.9000244140625 }, { "x": 74.75, - "y": 982.2000122070312 + "y": 1091.199951171875 }, { "x": 74.75, - "y": 1010.25 + "y": 1119.25 }, { "x": 74.75, - "y": 1038.300048828125 + "y": 1147.300048828125 }, { "x": 74.75, - "y": 1073.5999755859375 + "y": 1182.5999755859375 }, { "x": 74.75, - "y": 1098.5 + "y": 1207.5 }, { "x": 74.75, - "y": 1123.4000244140625 + "y": 1232.4000244140625 }, { "x": 74.75, - "y": 1152.0999755859375 + "y": 1261.0999755859375 }, { "x": 74.75, - "y": 1170.25 + "y": 1279.25 }, { "x": 74.75, - "y": 1188.4000244140625 + "y": 1297.4000244140625 }, { "x": 74.75, - "y": 1212.5999755859375 + "y": 1321.5999755859375 }, { "x": 74.75, - "y": 1230.75 + "y": 1339.75 }, { "x": 74.75, - "y": 1248.9000244140625 + "y": 1357.9000244140625 }, { "x": 74.75, - "y": 1283.800048828125 + "y": 1392.800048828125 }, { "x": 74.75, - "y": 1318 + "y": 1427 }, { "x": 74.75, - "y": 1352.199951171875 + "y": 1461.199951171875 }, { "x": 74.75, - "y": 1397.800048828125 + "y": 1506.800048828125 }, { "x": 74.75, - "y": 1432 + "y": 1541 }, { "x": 74.75, - "y": 1466.199951171875 + "y": 1575.199951171875 }, { "x": 74.75, - "y": 1499 + "y": 1608 }, { "x": 74.75, - "y": 1514 + "y": 1623 }, { "x": 74.75, - "y": 1529 + "y": 1638 }, { "x": 74.75, - "y": 1555.5999755859375 + "y": 1664.5999755859375 }, { "x": 74.75, - "y": 1580.5 + "y": 1689.5 }, { "x": 74.75, - "y": 1605.4000244140625 + "y": 1714.4000244140625 }, { "x": 74.75, - "y": 1640.699951171875 + "y": 1749.699951171875 }, { "x": 74.75, - "y": 1668.75 + "y": 1777.75 }, { "x": 74.75, - "y": 1696.800048828125 + "y": 1805.800048828125 }, { "x": 77.5999984741211, - "y": 1796.5999755859375 + "y": 1905.5999755859375 }, { "x": 89, - "y": 1879 + "y": 1988 } ], "isCurve": true, @@ -1299,20 +1299,20 @@ "labelPercentage": 0, "route": [ { - "x": 490.5, - "y": 1634.699951171875 + "x": 490, + "y": 1743.7149658203125 }, { - "x": 195.3000030517578, - "y": 1699.3399658203125 + "x": 195.1999969482422, + "y": 1808.343017578125 }, { "x": 118.19999694824219, - "y": 1796.5999755859375 + "y": 1905.5999755859375 }, { "x": 105, - "y": 1879 + "y": 1988 } ], "isCurve": true, @@ -1346,20 +1346,20 @@ "labelPercentage": 0, "route": [ { - "x": 548.5, - "y": 1655 + "x": 548, + "y": 1764 }, { - "x": 548.5, - "y": 1703.4000244140625 + "x": 548, + "y": 1812.4000244140625 }, { - "x": 548.5999755859375, - "y": 1786 + "x": 548, + "y": 1895 }, { - "x": 549, - "y": 1826 + "x": 548, + "y": 1935 } ], "isCurve": true, @@ -1393,20 +1393,20 @@ "labelPercentage": 0, "route": [ { - "x": 276, - "y": 1509.5 + "x": 275.5, + "y": 1618.5 }, { - "x": 276, - "y": 1533.0999755859375 + "x": 275.5, + "y": 1642.0999755859375 }, { - "x": 318.8999938964844, - "y": 1552.0660400390625 + "x": 318.5, + "y": 1661 }, { "x": 490.5, - "y": 1604.3330078125 + "y": 1713 } ], "isCurve": true, @@ -1440,31 +1440,31 @@ "labelPercentage": 0, "route": [ { - "x": 924.5, + "x": 925, "y": 198.5 }, { - "x": 924.5, + "x": 925, "y": 308.8999938964844 }, { - "x": 924.5, + "x": 925, "y": 348.6000061035156 }, { - "x": 924.5, + "x": 925, "y": 366.75 }, { - "x": 924.5, + "x": 925, "y": 384.8999938964844 }, { - "x": 924.5, + "x": 925, "y": 457 }, { - "x": 924.5, + "x": 925, "y": 497 } ], @@ -1499,20 +1499,20 @@ "labelPercentage": 0, "route": [ { - "x": 924.5, - "y": 903 + "x": 925, + "y": 1012 }, { - "x": 924.5, - "y": 951.4000244140625 + "x": 925, + "y": 1060.4000244140625 }, { - "x": 924.5, - "y": 977.0999755859375 + "x": 925, + "y": 1086.0999755859375 }, { - "x": 924.5, - "y": 1031.5 + "x": 925, + "y": 1140.5 } ], "isCurve": true, diff --git a/e2etests/testdata/themes/dark_terrastruct_flagship/dagre/sketch.exp.svg b/e2etests/testdata/themes/dark_terrastruct_flagship/dagre/sketch.exp.svg index 95d6816a8..debe001a7 100644 --- a/e2etests/testdata/themes/dark_terrastruct_flagship/dagre/sketch.exp.svg +++ b/e2etests/testdata/themes/dark_terrastruct_flagship/dagre/sketch.exp.svg @@ -1,41 +1,41 @@ -networkuserapi serverlogsusersidintnamestringemailstringpasswordstringlast_logindatetimeproducts+idint+pricedecimal+skustring+namestring

A tale

+networkuserapi serverlogsusersidintnamestringemailstringpasswordstringlast_logindatetimeproducts+idint+pricedecimal+skustring+namestring

A tale

  • of
  • two cities
-
package main - -import ( -    "fmt" -) - -type City struct { -    Name       string -    Population int -} - -func tellTale(city1, city2 City) { -    fmt.Printf("There were two cities, %s and %s.\n", city1.Name, city2.Name) -    fmt.Printf("%s had a population of %d.\n", city1.Name, city1.Population) -    fmt.Printf("%s had a population of %d.\n", city2.Name, city2.Population) -    fmt.Println("Their tales were intertwined, and their people shared many adventures.") -} - -func main() { -    city1 := City{Name: "CityA", Population: 1000000} -    city2 := City{Name: "CityB", Population: 1200000} - -    tellTale(city1, city2) -}package main - -import ( -    "fmt" -) - -type City struct { -    Name       string -    Population int -} - -func tellTale(city1, city2 City) { -    fmt.Printf("There were two cities, %s and %s.\n", city1.Name, city2.Name) -    fmt.Printf("%s had a population of %d.\n", city1.Name, city1.Population) -    fmt.Printf("%s had a population of %d.\n", city2.Name, city2.Population) -    fmt.Println("Their tales were intertwined, and their people shared many adventures.") -} - -func main() { -    city1 := City{Name: "CityA", Population: 1000000} -    city2 := City{Name: "CityB", Population: 1200000} - -    tellTale(city1, city2) -}Cell Toweronline portaldata processorsatellitesTRANSMITTERuistorage sendsendsendphone logsmake call accessdisplaypersist - - +
package main + +import ( +    "fmt" +) + +type City struct { +    Name       string +    Population int +} + +func tellTale(city1, city2 City) { +    fmt.Printf("There were two cities, %s and %s.\n", city1.Name, city2.Name) +    fmt.Printf("%s had a population of %d.\n", city1.Name, city1.Population) +    fmt.Printf("%s had a population of %d.\n", city2.Name, city2.Population) +    fmt.Println("Their tales were intertwined, and their people shared many adventures.") +} + +func main() { +    city1 := City{Name: "CityA", Population: 1000000} +    city2 := City{Name: "CityB", Population: 1200000} + +    tellTale(city1, city2) +}package main + +import ( +    "fmt" +) + +type City struct { +    Name       string +    Population int +} + +func tellTale(city1, city2 City) { +    fmt.Printf("There were two cities, %s and %s.\n", city1.Name, city2.Name) +    fmt.Printf("%s had a population of %d.\n", city1.Name, city1.Population) +    fmt.Printf("%s had a population of %d.\n", city2.Name, city2.Population) +    fmt.Println("Their tales were intertwined, and their people shared many adventures.") +} + +func main() { +    city1 := City{Name: "CityA", Population: 1000000} +    city2 := City{Name: "CityB", Population: 1200000} + +    tellTale(city1, city2) +}Cell Toweronline portaldata processorsatellitesTRANSMITTERuistorage sendsendsendphone logsmake call accessdisplaypersist + + - - - - - + + + + + - - - - - - - - - - + + + + + + + + + + - - - + + +
\ No newline at end of file diff --git a/e2etests/testdata/themes/dark_terrastruct_flagship/elk/board.exp.json b/e2etests/testdata/themes/dark_terrastruct_flagship/elk/board.exp.json index 446b8df1a..1325c8be1 100644 --- a/e2etests/testdata/themes/dark_terrastruct_flagship/elk/board.exp.json +++ b/e2etests/testdata/themes/dark_terrastruct_flagship/elk/board.exp.json @@ -8,7 +8,7 @@ "type": "rectangle", "pos": { "x": 12, - "y": 859 + "y": 968 }, "width": 546, "height": 922, @@ -49,7 +49,7 @@ "type": "rectangle", "pos": { "x": 62, - "y": 909 + "y": 1018 }, "width": 246, "height": 423, @@ -90,7 +90,7 @@ "type": "stored_data", "pos": { "x": 115, - "y": 969 + "y": 1078 }, "width": 130, "height": 66, @@ -131,7 +131,7 @@ "type": "rectangle", "pos": { "x": 112, - "y": 1216 + "y": 1325 }, "width": 146, "height": 66, @@ -172,7 +172,7 @@ "type": "rectangle", "pos": { "x": 328, - "y": 914 + "y": 1023 }, "width": 180, "height": 169, @@ -213,7 +213,7 @@ "type": "hexagon", "pos": { "x": 378, - "y": 964 + "y": 1073 }, "width": 80, "height": 69, @@ -254,7 +254,7 @@ "type": "rectangle", "pos": { "x": 80, - "y": 1503 + "y": 1612 }, "width": 209, "height": 228, @@ -295,7 +295,7 @@ "type": "cylinder", "pos": { "x": 130, - "y": 1563 + "y": 1672 }, "width": 99, "height": 118, @@ -377,7 +377,7 @@ "type": "rectangle", "pos": { "x": 387, - "y": 1936 + "y": 2045 }, "width": 116, "height": 66, @@ -418,7 +418,7 @@ "type": "page", "pos": { "x": 403, - "y": 2173 + "y": 2282 }, "width": 73, "height": 87, @@ -746,11 +746,11 @@ "id": "code", "type": "code", "pos": { - "x": 493, + "x": 492, "y": 368 }, - "width": 868, - "height": 406, + "width": 870, + "height": 515, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -777,8 +777,8 @@ "italic": false, "bold": true, "underline": false, - "labelWidth": 863, - "labelHeight": 401, + "labelWidth": 854, + "labelHeight": 499, "zIndex": 0, "level": 1 }, @@ -787,7 +787,7 @@ "type": "text", "pos": { "x": 725, - "y": 859 + "y": 968 }, "width": 404, "height": 52, @@ -850,11 +850,11 @@ "route": [ { "x": 141, - "y": 1035 + "y": 1144 }, { "x": 141, - "y": 1216 + "y": 1325 } ], "animated": false, @@ -888,11 +888,11 @@ "route": [ { "x": 185, - "y": 1035 + "y": 1144 }, { "x": 185, - "y": 1216 + "y": 1325 } ], "animated": false, @@ -926,11 +926,11 @@ "route": [ { "x": 229, - "y": 1035 + "y": 1144 }, { "x": 229, - "y": 1216 + "y": 1325 } ], "animated": false, @@ -964,11 +964,11 @@ "route": [ { "x": 185, - "y": 1282 + "y": 1391 }, { "x": 185, - "y": 1553 + "y": 1662 } ], "animated": false, @@ -1014,7 +1014,7 @@ }, { "x": 190.75, - "y": 909 + "y": 1018 } ], "animated": false, @@ -1052,15 +1052,15 @@ }, { "x": 280, - "y": 814 + "y": 923 }, { "x": 404.6659851074219, - "y": 814 + "y": 923 }, { "x": 405, - "y": 964 + "y": 1073 } ], "animated": false, @@ -1094,27 +1094,27 @@ "route": [ { "x": 464.3330078125, - "y": 1936 + "y": 2045 }, { "x": 464.3330078125, - "y": 1896 + "y": 2005 }, { "x": 680.75, - "y": 1896 + "y": 2005 }, { "x": 680.75, - "y": 814 + "y": 923 }, { "x": 431.3330078125, - "y": 814 + "y": 923 }, { "x": 431, - "y": 964 + "y": 1073 } ], "animated": false, @@ -1148,11 +1148,11 @@ "route": [ { "x": 445, - "y": 2002 + "y": 2111 }, { "x": 445, - "y": 2163 + "y": 2272 } ], "animated": false, @@ -1186,19 +1186,19 @@ "route": [ { "x": 130.5, - "y": 1731 + "y": 1840 }, { "x": 130.5, - "y": 1896 + "y": 2005 }, { "x": 425.6659851074219, - "y": 1896 + "y": 2005 }, { "x": 425.6659851074219, - "y": 1936 + "y": 2045 } ], "animated": false, @@ -1270,11 +1270,11 @@ "route": [ { "x": 927.75, - "y": 774 + "y": 883 }, { "x": 927.75, - "y": 859 + "y": 968 } ], "animated": false, diff --git a/e2etests/testdata/themes/dark_terrastruct_flagship/elk/sketch.exp.svg b/e2etests/testdata/themes/dark_terrastruct_flagship/elk/sketch.exp.svg index 57fd5ed74..1e5b2de2b 100644 --- a/e2etests/testdata/themes/dark_terrastruct_flagship/elk/sketch.exp.svg +++ b/e2etests/testdata/themes/dark_terrastruct_flagship/elk/sketch.exp.svg @@ -1,41 +1,41 @@ -networkuserapi serverlogsusersidintnamestringemailstringpasswordstringlast_logindatetimeproducts+idint+pricedecimal+skustring+namestring

A tale

+networkuserapi serverlogsusersidintnamestringemailstringpasswordstringlast_logindatetimeproducts+idint+pricedecimal+skustring+namestring

A tale

  • of
  • two cities
-
package main - -import ( -    "fmt" -) - -type City struct { -    Name       string -    Population int -} - -func tellTale(city1, city2 City) { -    fmt.Printf("There were two cities, %s and %s.\n", city1.Name, city2.Name) -    fmt.Printf("%s had a population of %d.\n", city1.Name, city1.Population) -    fmt.Printf("%s had a population of %d.\n", city2.Name, city2.Population) -    fmt.Println("Their tales were intertwined, and their people shared many adventures.") -} - -func main() { -    city1 := City{Name: "CityA", Population: 1000000} -    city2 := City{Name: "CityB", Population: 1200000} - -    tellTale(city1, city2) -}package main - -import ( -    "fmt" -) - -type City struct { -    Name       string -    Population int -} - -func tellTale(city1, city2 City) { -    fmt.Printf("There were two cities, %s and %s.\n", city1.Name, city2.Name) -    fmt.Printf("%s had a population of %d.\n", city1.Name, city1.Population) -    fmt.Printf("%s had a population of %d.\n", city2.Name, city2.Population) -    fmt.Println("Their tales were intertwined, and their people shared many adventures.") -} - -func main() { -    city1 := City{Name: "CityA", Population: 1000000} -    city2 := City{Name: "CityB", Population: 1200000} - -    tellTale(city1, city2) -}Cell Toweronline portaldata processorsatellitesTRANSMITTERuistorage sendsendsendphone logsmake call accessdisplaypersist - - +
package main + +import ( +    "fmt" +) + +type City struct { +    Name       string +    Population int +} + +func tellTale(city1, city2 City) { +    fmt.Printf("There were two cities, %s and %s.\n", city1.Name, city2.Name) +    fmt.Printf("%s had a population of %d.\n", city1.Name, city1.Population) +    fmt.Printf("%s had a population of %d.\n", city2.Name, city2.Population) +    fmt.Println("Their tales were intertwined, and their people shared many adventures.") +} + +func main() { +    city1 := City{Name: "CityA", Population: 1000000} +    city2 := City{Name: "CityB", Population: 1200000} + +    tellTale(city1, city2) +}package main + +import ( +    "fmt" +) + +type City struct { +    Name       string +    Population int +} + +func tellTale(city1, city2 City) { +    fmt.Printf("There were two cities, %s and %s.\n", city1.Name, city2.Name) +    fmt.Printf("%s had a population of %d.\n", city1.Name, city1.Population) +    fmt.Printf("%s had a population of %d.\n", city2.Name, city2.Population) +    fmt.Println("Their tales were intertwined, and their people shared many adventures.") +} + +func main() { +    city1 := City{Name: "CityA", Population: 1000000} +    city2 := City{Name: "CityB", Population: 1200000} + +    tellTale(city1, city2) +}Cell Toweronline portaldata processorsatellitesTRANSMITTERuistorage sendsendsendphone logsmake call accessdisplaypersist + + - - + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/e2etests/testdata/themes/terminal/dagre/board.exp.json b/e2etests/testdata/themes/terminal/dagre/board.exp.json index 24fd60583..cfc9b7163 100644 --- a/e2etests/testdata/themes/terminal/dagre/board.exp.json +++ b/e2etests/testdata/themes/terminal/dagre/board.exp.json @@ -10,8 +10,8 @@ "x": 0, "y": 438 }, - "width": 501, - "height": 1585, + "width": 500, + "height": 1694, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -53,7 +53,7 @@ "y": 503 }, "width": 384, - "height": 657, + "height": 766, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -92,7 +92,7 @@ "type": "stored_data", "pos": { "x": 138, - "y": 710 + "y": 765 }, "width": 161, "height": 66, @@ -132,8 +132,8 @@ "id": "network.cell tower.transmitter", "type": "rectangle", "pos": { - "x": 244, - "y": 1062 + "x": 243, + "y": 1171 }, "width": 151, "height": 66, @@ -174,7 +174,7 @@ "type": "rectangle", "pos": { "x": 20, - "y": 1832 + "y": 1941 }, "width": 157, "height": 161, @@ -216,7 +216,7 @@ "type": "hexagon", "pos": { "x": 71, - "y": 1878 + "y": 1987 }, "width": 65, "height": 69, @@ -257,7 +257,7 @@ "type": "rectangle", "pos": { "x": 218, - "y": 1317 + "y": 1426 }, "width": 202, "height": 192, @@ -299,7 +299,7 @@ "type": "cylinder", "pos": { "x": 258, - "y": 1359 + "y": 1468 }, "width": 112, "height": 118, @@ -381,7 +381,7 @@ "type": "rectangle", "pos": { "x": 540, - "y": 1589 + "y": 1698 }, "width": 142, "height": 66, @@ -422,7 +422,7 @@ "type": "page", "pos": { "x": 565, - "y": 1836 + "y": 1945 }, "width": 82, "height": 87, @@ -462,7 +462,7 @@ "id": "users", "type": "sql_table", "pos": { - "x": 286, + "x": 287, "y": 30 }, "width": 262, @@ -646,7 +646,7 @@ "id": "products", "type": "class", "pos": { - "x": 608, + "x": 609, "y": 0 }, "width": 242, @@ -710,7 +710,7 @@ "id": "markdown", "type": "text", "pos": { - "x": 910, + "x": 911, "y": 79 }, "width": 128, @@ -753,8 +753,8 @@ "x": 540, "y": 497 }, - "width": 868, - "height": 406, + "width": 870, + "height": 515, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -781,8 +781,8 @@ "italic": false, "bold": true, "underline": false, - "labelWidth": 863, - "labelHeight": 401, + "labelWidth": 854, + "labelHeight": 499, "zIndex": 0, "level": 1 }, @@ -790,8 +790,8 @@ "id": "ex", "type": "text", "pos": { - "x": 772, - "y": 1031 + "x": 773, + "y": 1140 }, "width": 404, "height": 52, @@ -852,20 +852,20 @@ "labelPercentage": 0, "route": [ { - "x": 217, - "y": 777 + "x": 218, + "y": 832 }, { - "x": 186.39999389648438, - "y": 957 + "x": 186.60000610351562, + "y": 1055.199951171875 }, { - "x": 196.9499969482422, - "y": 1014.2000122070312 + "x": 196.75, + "y": 1123.199951171875 }, { - "x": 269.75, - "y": 1063 + "x": 268.75, + "y": 1172 } ], "isCurve": true, @@ -898,20 +898,20 @@ "labelPercentage": 0, "route": [ { - "x": 228, - "y": 777 + "x": 227, + "y": 832 }, { - "x": 251.39999389648438, - "y": 957 + "x": 251.1999969482422, + "y": 1055.199951171875 }, { "x": 265.25, - "y": 1014.2000122070312 + "y": 1123.199951171875 }, { "x": 297.25, - "y": 1063 + "y": 1172 } ], "isCurve": true, @@ -944,20 +944,20 @@ "labelPercentage": 0, "route": [ { - "x": 249, - "y": 777 + "x": 244, + "y": 832 }, { - "x": 368.20001220703125, - "y": 957 + "x": 366.79998779296875, + "y": 1055.199951171875 }, { - "x": 387.79998779296875, - "y": 1014.2000122070312 + "x": 387.29998779296875, + "y": 1123.199951171875 }, { - "x": 347, - "y": 1063 + "x": 346.5, + "y": 1172 } ], "isCurve": true, @@ -990,32 +990,32 @@ "labelPercentage": 0, "route": [ { - "x": 319, - "y": 1128.5 + "x": 318.5, + "y": 1237.5 + }, + { + "x": 318.5, + "y": 1263.0999755859375 + }, + { + "x": 318.5, + "y": 1281.5999755859375 + }, + { + "x": 318.5, + "y": 1299.75 + }, + { + "x": 318.5, + "y": 1317.9000244140625 + }, + { + "x": 318.6000061035156, + "y": 1404.199951171875 }, { "x": 319, - "y": 1154.0999755859375 - }, - { - "x": 319, - "y": 1172.5999755859375 - }, - { - "x": 319, - "y": 1190.75 - }, - { - "x": 319, - "y": 1208.9000244140625 - }, - { - "x": 319, - "y": 1295.199951171875 - }, - { - "x": 319, - "y": 1350 + "y": 1459 } ], "isCurve": true, @@ -1127,143 +1127,143 @@ }, { "x": 76.25, - "y": 497.6000061035156 + "y": 508.5 }, { "x": 76.25, - "y": 573.5 + "y": 600.75 }, { "x": 76.25, - "y": 649.4000244140625 + "y": 693 }, { "x": 76.25, - "y": 752.7000122070312 + "y": 818.0999755859375 }, { "x": 76.25, - "y": 831.75 + "y": 913.5 }, { "x": 76.25, - "y": 910.7999877929688 + "y": 1008.9000244140625 }, { "x": 76.25, - "y": 982.2000122070312 + "y": 1091.199951171875 }, { "x": 76.25, - "y": 1010.25 + "y": 1119.25 }, { "x": 76.25, - "y": 1038.300048828125 + "y": 1147.300048828125 }, { "x": 76.25, - "y": 1073.5999755859375 + "y": 1182.5999755859375 }, { "x": 76.25, - "y": 1098.5 + "y": 1207.5 }, { "x": 76.25, - "y": 1123.4000244140625 + "y": 1232.4000244140625 }, { "x": 76.25, - "y": 1152.0999755859375 + "y": 1261.0999755859375 }, { "x": 76.25, - "y": 1170.25 + "y": 1279.25 }, { "x": 76.25, - "y": 1188.4000244140625 + "y": 1297.4000244140625 }, { "x": 76.25, - "y": 1212.5999755859375 + "y": 1321.5999755859375 }, { "x": 76.25, - "y": 1230.75 + "y": 1339.75 }, { "x": 76.25, - "y": 1248.9000244140625 + "y": 1357.9000244140625 }, { "x": 76.25, - "y": 1283.800048828125 + "y": 1392.800048828125 }, { "x": 76.25, - "y": 1318 + "y": 1427 }, { "x": 76.25, - "y": 1352.199951171875 + "y": 1461.199951171875 }, { "x": 76.25, - "y": 1397.800048828125 + "y": 1506.800048828125 }, { "x": 76.25, - "y": 1432 + "y": 1541 }, { "x": 76.25, - "y": 1466.199951171875 + "y": 1575.199951171875 }, { "x": 76.25, - "y": 1499 + "y": 1608 }, { "x": 76.25, - "y": 1514 + "y": 1623 }, { "x": 76.25, - "y": 1529 + "y": 1638 }, { "x": 76.25, - "y": 1555.5999755859375 + "y": 1664.5999755859375 }, { "x": 76.25, - "y": 1580.5 + "y": 1689.5 }, { "x": 76.25, - "y": 1605.4000244140625 + "y": 1714.4000244140625 }, { "x": 76.25, - "y": 1640.699951171875 + "y": 1749.699951171875 }, { "x": 76.25, - "y": 1668.75 + "y": 1777.75 }, { "x": 76.25, - "y": 1696.800048828125 + "y": 1805.800048828125 }, { "x": 79.80000305175781, - "y": 1796.5999755859375 + "y": 1905.5999755859375 }, { "x": 94, - "y": 1879 + "y": 1988 } ], "isCurve": true, @@ -1296,20 +1296,20 @@ "labelPercentage": 0, "route": [ { - "x": 540.25, - "y": 1635.81494140625 + "x": 539.75, + "y": 1744.8299560546875 }, { - "x": 212.6490020751953, - "y": 1699.56298828125 + "x": 212.5489959716797, + "y": 1808.5660400390625 }, { "x": 127.19999694824219, - "y": 1796.5999755859375 + "y": 1905.5999755859375 }, { "x": 113, - "y": 1879 + "y": 1988 } ], "isCurve": true, @@ -1342,20 +1342,20 @@ "labelPercentage": 0, "route": [ { - "x": 611.25, - "y": 1655 + "x": 610.75, + "y": 1764 }, { - "x": 611.25, - "y": 1703.4000244140625 + "x": 610.75, + "y": 1812.4000244140625 }, { - "x": 611.2000122070312, - "y": 1786 + "x": 610.7999877929688, + "y": 1895 }, { "x": 611, - "y": 1826 + "y": 1935 } ], "isCurve": true, @@ -1388,20 +1388,20 @@ "labelPercentage": 0, "route": [ { - "x": 319, - "y": 1509.5 + "x": 318.5, + "y": 1618.5 }, { - "x": 319, - "y": 1533.0999755859375 + "x": 318.5, + "y": 1642.0999755859375 }, { - "x": 363.20001220703125, - "y": 1551.5999755859375 + "x": 362.75, + "y": 1660.5670166015625 }, { - "x": 540, - "y": 1602 + "x": 539.75, + "y": 1710.8349609375 } ], "isCurve": true, @@ -1434,31 +1434,31 @@ "labelPercentage": 0, "route": [ { - "x": 974.25, + "x": 974.75, "y": 198.5 }, { - "x": 974.25, + "x": 974.75, "y": 308.8999938964844 }, { - "x": 974.25, + "x": 974.75, "y": 348.6000061035156 }, { - "x": 974.25, + "x": 974.75, "y": 366.75 }, { - "x": 974.25, + "x": 974.75, "y": 384.8999938964844 }, { - "x": 974.25, + "x": 974.75, "y": 457 }, { - "x": 974.25, + "x": 974.75, "y": 497 } ], @@ -1492,20 +1492,20 @@ "labelPercentage": 0, "route": [ { - "x": 974.25, - "y": 903 + "x": 974.75, + "y": 1012 }, { - "x": 974.25, - "y": 951.4000244140625 + "x": 974.75, + "y": 1060.4000244140625 }, { - "x": 974.25, - "y": 977.0999755859375 + "x": 974.75, + "y": 1086.0999755859375 }, { - "x": 974.25, - "y": 1031.5 + "x": 974.75, + "y": 1140.5 } ], "isCurve": true, diff --git a/e2etests/testdata/themes/terminal/dagre/sketch.exp.svg b/e2etests/testdata/themes/terminal/dagre/sketch.exp.svg index 2bf9e7dfe..54faee7ce 100644 --- a/e2etests/testdata/themes/terminal/dagre/sketch.exp.svg +++ b/e2etests/testdata/themes/terminal/dagre/sketch.exp.svg @@ -1,34 +1,34 @@ -containerscloudtall cylinderclass2-numint-timeoutint-pid+getStatus()Enum+getJobs()Job[]+setTimeout(seconds int)voidusersidintnamestringemailstringpasswordstringlast_logindatetimecontainer

markdown text expanded to 800x400

-
:= 5 -:= a + 7 -fmt.Printf("%d", b)a := 5 -b := a + 7 -fmt.Printf("%d", b):= 5 -:= a + 7 -fmt.Printf("%d", b)a := 5 -b := a + 7 -fmt.Printf("%d", b)circle containerdiamond containeroval containerhexagon containerdiamondcirclehexagonoval +
:= 5 +:= a + 7 +fmt.Printf("%d", b)a := 5 +b := a + 7 +fmt.Printf("%d", b):= 5 +:= a + 7 +fmt.Printf("%d", b)a := 5 +b := a + 7 +fmt.Printf("%d", b)circle containerdiamond containeroval containerhexagon containerdiamondcirclehexagonoval - - + + diff --git a/e2etests/testdata/todo/shape_set_width_height/elk/board.exp.json b/e2etests/testdata/todo/shape_set_width_height/elk/board.exp.json index f83df4dbe..702ac2fd4 100644 --- a/e2etests/testdata/todo/shape_set_width_height/elk/board.exp.json +++ b/e2etests/testdata/todo/shape_set_width_height/elk/board.exp.json @@ -829,8 +829,8 @@ "italic": false, "bold": true, "underline": false, - "labelWidth": 191, - "labelHeight": 65, + "labelWidth": 183, + "labelHeight": 62, "zIndex": 0, "level": 1 }, @@ -838,11 +838,11 @@ "id": "small code", "type": "code", "pos": { - "x": 2200, + "x": 2196, "y": 1972 }, - "width": 191, - "height": 65, + "width": 199, + "height": 78, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -869,8 +869,8 @@ "italic": false, "bold": true, "underline": false, - "labelWidth": 191, - "labelHeight": 65, + "labelWidth": 183, + "labelHeight": 62, "zIndex": 0, "level": 1 } diff --git a/e2etests/testdata/todo/shape_set_width_height/elk/sketch.exp.svg b/e2etests/testdata/todo/shape_set_width_height/elk/sketch.exp.svg index 5081e5695..af9f86845 100644 --- a/e2etests/testdata/todo/shape_set_width_height/elk/sketch.exp.svg +++ b/e2etests/testdata/todo/shape_set_width_height/elk/sketch.exp.svg @@ -1,34 +1,34 @@ -containerscloudtall cylinderclass2-numint-timeoutint-pid+getStatus()Enum+getJobs()Job[]+setTimeout(seconds int)voidusersidintnamestringemailstringpasswordstringlast_logindatetimecontainer

markdown text expanded to 800x400

-
:= 5 -:= a + 7 -fmt.Printf("%d", b)a := 5 -b := a + 7 -fmt.Printf("%d", b):= 5 -:= a + 7 -fmt.Printf("%d", b)a := 5 -b := a + 7 -fmt.Printf("%d", b)circle containerdiamond containeroval containerhexagon containerdiamondcirclehexagonoval +:= 5 +:= a + 7 +fmt.Printf("%d", b)a := 5 +b := a + 7 +fmt.Printf("%d", b):= 5 +:= a + 7 +fmt.Printf("%d", b)a := 5 +b := a + 7 +fmt.Printf("%d", b)circle containerdiamond containeroval containerhexagon containerdiamondcirclehexagonoval - - + + diff --git a/lib/textmeasure/textmeasure.go b/lib/textmeasure/textmeasure.go index ea104e18a..8df3a346e 100644 --- a/lib/textmeasure/textmeasure.go +++ b/lib/textmeasure/textmeasure.go @@ -18,6 +18,7 @@ import ( const TAB_SIZE = 4 const SIZELESS_FONT_SIZE = 0 +const CODE_LINE_HEIGHT = 1.3 // ASCII is a set of all ASCII runes. These runes are codepoints from 32 to 127 inclusive. var ASCII []rune @@ -214,6 +215,14 @@ func (t *Ruler) scaleUnicode(w float64, font d2fonts.Font, s string) float64 { return w } +func (t *Ruler) MeasureMono(font d2fonts.Font, s string) (width, height int) { + originalBoundsWithDot := t.boundsWithDot + t.boundsWithDot = true + width, height = t.Measure(font, s) + t.boundsWithDot = originalBoundsWithDot + return width, height +} + func (t *Ruler) Measure(font d2fonts.Font, s string) (width, height int) { w, h := t.MeasurePrecise(font, s) w = t.scaleUnicode(w, font, s)