diff --git a/ci/release/changelogs/next.md b/ci/release/changelogs/next.md index e7fd1d63f..3f9617cd4 100644 --- a/ci/release/changelogs/next.md +++ b/ci/release/changelogs/next.md @@ -9,3 +9,4 @@ #### Bugfixes ⛑️ - Sequence diagram multi-line edge labels no longer can collide with other elements [#2049](https://github.com/terrastruct/d2/pull/2049) +- Sequence diagram long self-referential edge labels no longer can collide neighboring actors (or its own) lifeline edges [#2050](https://github.com/terrastruct/d2/pull/2050) diff --git a/d2layouts/d2sequence/sequence_diagram.go b/d2layouts/d2sequence/sequence_diagram.go index 3dea32b4f..e5ec4d4d7 100644 --- a/d2layouts/d2sequence/sequence_diagram.go +++ b/d2layouts/d2sequence/sequence_diagram.go @@ -50,6 +50,9 @@ func getObjEarliestLineNum(o *d2graph.Object) int { if ref.MapKey == nil { continue } + if ref.Key.HasGlob() { + continue + } min = go2.IntMin(min, ref.MapKey.Range.Start.Line) } return min @@ -61,6 +64,9 @@ func getEdgeEarliestLineNum(e *d2graph.Edge) int { if ref.MapKey == nil { continue } + if ref.Edge.Src.HasGlob() || ref.Edge.Dst.HasGlob() { + continue + } min = go2.IntMin(min, ref.MapKey.Range.Start.Line) } return min @@ -167,11 +173,17 @@ func newSequenceDiagram(objects []*d2graph.Object, messages []*d2graph.Edge) (*s // by distributing the label length across the actors rank difference rankDiff := math.Abs(float64(sd.objectRank[message.Src]) - float64(sd.objectRank[message.Dst])) if rankDiff != 0 { - // rankDiff = 0 for self edges distributedLabelWidth := float64(message.LabelDimensions.Width) / rankDiff for rank := go2.IntMin(sd.objectRank[message.Src], sd.objectRank[message.Dst]); rank <= go2.IntMax(sd.objectRank[message.Src], sd.objectRank[message.Dst])-1; rank++ { sd.actorXStep[rank] = math.Max(sd.actorXStep[rank], distributedLabelWidth+HORIZONTAL_PAD) } + } else { + // self edge + nextRank := sd.objectRank[message.Src] + if nextRank < len(sd.actorXStep) { + labelAdjust := float64(message.LabelDimensions.Width) + label.PADDING*4 + sd.actorXStep[nextRank] = math.Max(sd.actorXStep[nextRank], labelAdjust) + } } sd.lastMessage[message.Src] = message if _, exists := sd.firstMessage[message.Src]; !exists { @@ -240,6 +252,9 @@ func (sd *sequenceDiagram) placeGroup(group *d2graph.Object) { for _, n := range sd.notes { inGroup := false for _, ref := range n.References { + if ref.Key.HasGlob() { + continue + } curr := ref.ScopeObj for curr != nil { if curr == group { @@ -571,7 +586,7 @@ func (sd *sequenceDiagram) routeMessages() error { isToSibling := currSrc == currDst if isSelfMessage || isToDescendant || isFromDescendant || isToSibling { - midX := startX + SELF_MESSAGE_HORIZONTAL_TRAVEL + midX := startX + math.Max(SELF_MESSAGE_HORIZONTAL_TRAVEL, float64(message.LabelDimensions.Width)/2.+label.PADDING*2) startY := messageOffset + noteOffset endY := startY + math.Max(float64(message.LabelDimensions.Height), MIN_MESSAGE_DISTANCE)*1.5 message.Route = []*geo.Point{ diff --git a/d2renderers/d2svg/appendix/testdata/diagram_wider_than_tooltip/sketch.exp.svg b/d2renderers/d2svg/appendix/testdata/diagram_wider_than_tooltip/sketch.exp.svg index 796bcbca4..61252ce3e 100644 --- a/d2renderers/d2svg/appendix/testdata/diagram_wider_than_tooltip/sketch.exp.svg +++ b/d2renderers/d2svg/appendix/testdata/diagram_wider_than_tooltip/sketch.exp.svg @@ -1,19 +1,19 @@ -customerissuerstoreLike starbucks or somethingacquirerI'm not sure what this isnetworkcustomer bankstore bankinitial transactionpayment processor behind the scenessimplified 1 banana please$10 dollarsthinking: wow, inflationchecks bank accountSavings: $11I can do that, here's my cardRun this cardProcess to card issuerProcess this payment$10 debit$10 creditAn error in judgement is about to occurLike starbucks or something1I'm not sure what this is2 + .d2-3594683676 .fill-N1{fill:#0A0F25;} + .d2-3594683676 .fill-N2{fill:#676C7E;} + .d2-3594683676 .fill-N3{fill:#9499AB;} + .d2-3594683676 .fill-N4{fill:#CFD2DD;} + .d2-3594683676 .fill-N5{fill:#DEE1EB;} + .d2-3594683676 .fill-N6{fill:#EEF1F8;} + .d2-3594683676 .fill-N7{fill:#FFFFFF;} + .d2-3594683676 .fill-B1{fill:#0D32B2;} + .d2-3594683676 .fill-B2{fill:#0D32B2;} + .d2-3594683676 .fill-B3{fill:#E3E9FD;} + .d2-3594683676 .fill-B4{fill:#E3E9FD;} + .d2-3594683676 .fill-B5{fill:#EDF0FD;} + .d2-3594683676 .fill-B6{fill:#F7F8FE;} + .d2-3594683676 .fill-AA2{fill:#4A6FF3;} + .d2-3594683676 .fill-AA4{fill:#EDF0FD;} + .d2-3594683676 .fill-AA5{fill:#F7F8FE;} + .d2-3594683676 .fill-AB4{fill:#EDF0FD;} + .d2-3594683676 .fill-AB5{fill:#F7F8FE;} + .d2-3594683676 .stroke-N1{stroke:#0A0F25;} + .d2-3594683676 .stroke-N2{stroke:#676C7E;} + .d2-3594683676 .stroke-N3{stroke:#9499AB;} + .d2-3594683676 .stroke-N4{stroke:#CFD2DD;} + .d2-3594683676 .stroke-N5{stroke:#DEE1EB;} + .d2-3594683676 .stroke-N6{stroke:#EEF1F8;} + .d2-3594683676 .stroke-N7{stroke:#FFFFFF;} + .d2-3594683676 .stroke-B1{stroke:#0D32B2;} + .d2-3594683676 .stroke-B2{stroke:#0D32B2;} + .d2-3594683676 .stroke-B3{stroke:#E3E9FD;} + .d2-3594683676 .stroke-B4{stroke:#E3E9FD;} + .d2-3594683676 .stroke-B5{stroke:#EDF0FD;} + .d2-3594683676 .stroke-B6{stroke:#F7F8FE;} + .d2-3594683676 .stroke-AA2{stroke:#4A6FF3;} + .d2-3594683676 .stroke-AA4{stroke:#EDF0FD;} + .d2-3594683676 .stroke-AA5{stroke:#F7F8FE;} + .d2-3594683676 .stroke-AB4{stroke:#EDF0FD;} + .d2-3594683676 .stroke-AB5{stroke:#F7F8FE;} + .d2-3594683676 .background-color-N1{background-color:#0A0F25;} + .d2-3594683676 .background-color-N2{background-color:#676C7E;} + .d2-3594683676 .background-color-N3{background-color:#9499AB;} + .d2-3594683676 .background-color-N4{background-color:#CFD2DD;} + .d2-3594683676 .background-color-N5{background-color:#DEE1EB;} + .d2-3594683676 .background-color-N6{background-color:#EEF1F8;} + .d2-3594683676 .background-color-N7{background-color:#FFFFFF;} + .d2-3594683676 .background-color-B1{background-color:#0D32B2;} + .d2-3594683676 .background-color-B2{background-color:#0D32B2;} + .d2-3594683676 .background-color-B3{background-color:#E3E9FD;} + .d2-3594683676 .background-color-B4{background-color:#E3E9FD;} + .d2-3594683676 .background-color-B5{background-color:#EDF0FD;} + .d2-3594683676 .background-color-B6{background-color:#F7F8FE;} + .d2-3594683676 .background-color-AA2{background-color:#4A6FF3;} + .d2-3594683676 .background-color-AA4{background-color:#EDF0FD;} + .d2-3594683676 .background-color-AA5{background-color:#F7F8FE;} + .d2-3594683676 .background-color-AB4{background-color:#EDF0FD;} + .d2-3594683676 .background-color-AB5{background-color:#F7F8FE;} + .d2-3594683676 .color-N1{color:#0A0F25;} + .d2-3594683676 .color-N2{color:#676C7E;} + .d2-3594683676 .color-N3{color:#9499AB;} + .d2-3594683676 .color-N4{color:#CFD2DD;} + .d2-3594683676 .color-N5{color:#DEE1EB;} + .d2-3594683676 .color-N6{color:#EEF1F8;} + .d2-3594683676 .color-N7{color:#FFFFFF;} + .d2-3594683676 .color-B1{color:#0D32B2;} + .d2-3594683676 .color-B2{color:#0D32B2;} + .d2-3594683676 .color-B3{color:#E3E9FD;} + .d2-3594683676 .color-B4{color:#E3E9FD;} + .d2-3594683676 .color-B5{color:#EDF0FD;} + .d2-3594683676 .color-B6{color:#F7F8FE;} + .d2-3594683676 .color-AA2{color:#4A6FF3;} + .d2-3594683676 .color-AA4{color:#EDF0FD;} + .d2-3594683676 .color-AA5{color:#F7F8FE;} + .d2-3594683676 .color-AB4{color:#EDF0FD;} + .d2-3594683676 .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}]]>customerissuerstoreLike starbucks or somethingacquirerI'm not sure what this isnetworkcustomer bankstore bankinitial transactionpayment processor behind the scenessimplified 1 banana please$10 dollarsthinking: wow, inflationchecks bank accountSavings: $11I can do that, here's my cardRun this cardProcess to card issuerProcess this payment$10 debit$10 creditAn error in judgement is about to occurLike starbucks or something1I'm not sure what this is2 @@ -113,7 +113,7 @@ - + diff --git a/e2etests/testdata/stable/sequence_diagram_self_edges/dagre/board.exp.json b/e2etests/testdata/stable/sequence_diagram_self_edges/dagre/board.exp.json index 8e06a76a8..df6e137e2 100644 --- a/e2etests/testdata/stable/sequence_diagram_self_edges/dagre/board.exp.json +++ b/e2etests/testdata/stable/sequence_diagram_self_edges/dagre/board.exp.json @@ -446,11 +446,11 @@ "y": 508 }, { - "x": 292, + "x": 293.5, "y": 508 }, { - "x": 292, + "x": 293.5, "y": 553 }, { diff --git a/e2etests/testdata/stable/sequence_diagram_self_edges/dagre/sketch.exp.svg b/e2etests/testdata/stable/sequence_diagram_self_edges/dagre/sketch.exp.svg index 8445f2b97..5ec23ca6d 100644 --- a/e2etests/testdata/stable/sequence_diagram_self_edges/dagre/sketch.exp.svg +++ b/e2etests/testdata/stable/sequence_diagram_self_edges/dagre/sketch.exp.svg @@ -1,16 +1,16 @@ -ab a self edge herebetween actorsto descendantto deeper descendantto parentactor - + .d2-3578670073 .fill-N1{fill:#0A0F25;} + .d2-3578670073 .fill-N2{fill:#676C7E;} + .d2-3578670073 .fill-N3{fill:#9499AB;} + .d2-3578670073 .fill-N4{fill:#CFD2DD;} + .d2-3578670073 .fill-N5{fill:#DEE1EB;} + .d2-3578670073 .fill-N6{fill:#EEF1F8;} + .d2-3578670073 .fill-N7{fill:#FFFFFF;} + .d2-3578670073 .fill-B1{fill:#0D32B2;} + .d2-3578670073 .fill-B2{fill:#0D32B2;} + .d2-3578670073 .fill-B3{fill:#E3E9FD;} + .d2-3578670073 .fill-B4{fill:#E3E9FD;} + .d2-3578670073 .fill-B5{fill:#EDF0FD;} + .d2-3578670073 .fill-B6{fill:#F7F8FE;} + .d2-3578670073 .fill-AA2{fill:#4A6FF3;} + .d2-3578670073 .fill-AA4{fill:#EDF0FD;} + .d2-3578670073 .fill-AA5{fill:#F7F8FE;} + .d2-3578670073 .fill-AB4{fill:#EDF0FD;} + .d2-3578670073 .fill-AB5{fill:#F7F8FE;} + .d2-3578670073 .stroke-N1{stroke:#0A0F25;} + .d2-3578670073 .stroke-N2{stroke:#676C7E;} + .d2-3578670073 .stroke-N3{stroke:#9499AB;} + .d2-3578670073 .stroke-N4{stroke:#CFD2DD;} + .d2-3578670073 .stroke-N5{stroke:#DEE1EB;} + .d2-3578670073 .stroke-N6{stroke:#EEF1F8;} + .d2-3578670073 .stroke-N7{stroke:#FFFFFF;} + .d2-3578670073 .stroke-B1{stroke:#0D32B2;} + .d2-3578670073 .stroke-B2{stroke:#0D32B2;} + .d2-3578670073 .stroke-B3{stroke:#E3E9FD;} + .d2-3578670073 .stroke-B4{stroke:#E3E9FD;} + .d2-3578670073 .stroke-B5{stroke:#EDF0FD;} + .d2-3578670073 .stroke-B6{stroke:#F7F8FE;} + .d2-3578670073 .stroke-AA2{stroke:#4A6FF3;} + .d2-3578670073 .stroke-AA4{stroke:#EDF0FD;} + .d2-3578670073 .stroke-AA5{stroke:#F7F8FE;} + .d2-3578670073 .stroke-AB4{stroke:#EDF0FD;} + .d2-3578670073 .stroke-AB5{stroke:#F7F8FE;} + .d2-3578670073 .background-color-N1{background-color:#0A0F25;} + .d2-3578670073 .background-color-N2{background-color:#676C7E;} + .d2-3578670073 .background-color-N3{background-color:#9499AB;} + .d2-3578670073 .background-color-N4{background-color:#CFD2DD;} + .d2-3578670073 .background-color-N5{background-color:#DEE1EB;} + .d2-3578670073 .background-color-N6{background-color:#EEF1F8;} + .d2-3578670073 .background-color-N7{background-color:#FFFFFF;} + .d2-3578670073 .background-color-B1{background-color:#0D32B2;} + .d2-3578670073 .background-color-B2{background-color:#0D32B2;} + .d2-3578670073 .background-color-B3{background-color:#E3E9FD;} + .d2-3578670073 .background-color-B4{background-color:#E3E9FD;} + .d2-3578670073 .background-color-B5{background-color:#EDF0FD;} + .d2-3578670073 .background-color-B6{background-color:#F7F8FE;} + .d2-3578670073 .background-color-AA2{background-color:#4A6FF3;} + .d2-3578670073 .background-color-AA4{background-color:#EDF0FD;} + .d2-3578670073 .background-color-AA5{background-color:#F7F8FE;} + .d2-3578670073 .background-color-AB4{background-color:#EDF0FD;} + .d2-3578670073 .background-color-AB5{background-color:#F7F8FE;} + .d2-3578670073 .color-N1{color:#0A0F25;} + .d2-3578670073 .color-N2{color:#676C7E;} + .d2-3578670073 .color-N3{color:#9499AB;} + .d2-3578670073 .color-N4{color:#CFD2DD;} + .d2-3578670073 .color-N5{color:#DEE1EB;} + .d2-3578670073 .color-N6{color:#EEF1F8;} + .d2-3578670073 .color-N7{color:#FFFFFF;} + .d2-3578670073 .color-B1{color:#0D32B2;} + .d2-3578670073 .color-B2{color:#0D32B2;} + .d2-3578670073 .color-B3{color:#E3E9FD;} + .d2-3578670073 .color-B4{color:#E3E9FD;} + .d2-3578670073 .color-B5{color:#EDF0FD;} + .d2-3578670073 .color-B6{color:#F7F8FE;} + .d2-3578670073 .color-AA2{color:#4A6FF3;} + .d2-3578670073 .color-AA4{color:#EDF0FD;} + .d2-3578670073 .color-AA5{color:#F7F8FE;} + .d2-3578670073 .color-AB4{color:#EDF0FD;} + .d2-3578670073 .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}]]>ab a self edge herebetween actorsto descendantto deeper descendantto parentactor + - + \ No newline at end of file diff --git a/e2etests/testdata/stable/sequence_diagram_self_edges/elk/board.exp.json b/e2etests/testdata/stable/sequence_diagram_self_edges/elk/board.exp.json index 8e06a76a8..df6e137e2 100644 --- a/e2etests/testdata/stable/sequence_diagram_self_edges/elk/board.exp.json +++ b/e2etests/testdata/stable/sequence_diagram_self_edges/elk/board.exp.json @@ -446,11 +446,11 @@ "y": 508 }, { - "x": 292, + "x": 293.5, "y": 508 }, { - "x": 292, + "x": 293.5, "y": 553 }, { diff --git a/e2etests/testdata/stable/sequence_diagram_self_edges/elk/sketch.exp.svg b/e2etests/testdata/stable/sequence_diagram_self_edges/elk/sketch.exp.svg index 8445f2b97..5ec23ca6d 100644 --- a/e2etests/testdata/stable/sequence_diagram_self_edges/elk/sketch.exp.svg +++ b/e2etests/testdata/stable/sequence_diagram_self_edges/elk/sketch.exp.svg @@ -1,16 +1,16 @@ -ab a self edge herebetween actorsto descendantto deeper descendantto parentactor - + .d2-3578670073 .fill-N1{fill:#0A0F25;} + .d2-3578670073 .fill-N2{fill:#676C7E;} + .d2-3578670073 .fill-N3{fill:#9499AB;} + .d2-3578670073 .fill-N4{fill:#CFD2DD;} + .d2-3578670073 .fill-N5{fill:#DEE1EB;} + .d2-3578670073 .fill-N6{fill:#EEF1F8;} + .d2-3578670073 .fill-N7{fill:#FFFFFF;} + .d2-3578670073 .fill-B1{fill:#0D32B2;} + .d2-3578670073 .fill-B2{fill:#0D32B2;} + .d2-3578670073 .fill-B3{fill:#E3E9FD;} + .d2-3578670073 .fill-B4{fill:#E3E9FD;} + .d2-3578670073 .fill-B5{fill:#EDF0FD;} + .d2-3578670073 .fill-B6{fill:#F7F8FE;} + .d2-3578670073 .fill-AA2{fill:#4A6FF3;} + .d2-3578670073 .fill-AA4{fill:#EDF0FD;} + .d2-3578670073 .fill-AA5{fill:#F7F8FE;} + .d2-3578670073 .fill-AB4{fill:#EDF0FD;} + .d2-3578670073 .fill-AB5{fill:#F7F8FE;} + .d2-3578670073 .stroke-N1{stroke:#0A0F25;} + .d2-3578670073 .stroke-N2{stroke:#676C7E;} + .d2-3578670073 .stroke-N3{stroke:#9499AB;} + .d2-3578670073 .stroke-N4{stroke:#CFD2DD;} + .d2-3578670073 .stroke-N5{stroke:#DEE1EB;} + .d2-3578670073 .stroke-N6{stroke:#EEF1F8;} + .d2-3578670073 .stroke-N7{stroke:#FFFFFF;} + .d2-3578670073 .stroke-B1{stroke:#0D32B2;} + .d2-3578670073 .stroke-B2{stroke:#0D32B2;} + .d2-3578670073 .stroke-B3{stroke:#E3E9FD;} + .d2-3578670073 .stroke-B4{stroke:#E3E9FD;} + .d2-3578670073 .stroke-B5{stroke:#EDF0FD;} + .d2-3578670073 .stroke-B6{stroke:#F7F8FE;} + .d2-3578670073 .stroke-AA2{stroke:#4A6FF3;} + .d2-3578670073 .stroke-AA4{stroke:#EDF0FD;} + .d2-3578670073 .stroke-AA5{stroke:#F7F8FE;} + .d2-3578670073 .stroke-AB4{stroke:#EDF0FD;} + .d2-3578670073 .stroke-AB5{stroke:#F7F8FE;} + .d2-3578670073 .background-color-N1{background-color:#0A0F25;} + .d2-3578670073 .background-color-N2{background-color:#676C7E;} + .d2-3578670073 .background-color-N3{background-color:#9499AB;} + .d2-3578670073 .background-color-N4{background-color:#CFD2DD;} + .d2-3578670073 .background-color-N5{background-color:#DEE1EB;} + .d2-3578670073 .background-color-N6{background-color:#EEF1F8;} + .d2-3578670073 .background-color-N7{background-color:#FFFFFF;} + .d2-3578670073 .background-color-B1{background-color:#0D32B2;} + .d2-3578670073 .background-color-B2{background-color:#0D32B2;} + .d2-3578670073 .background-color-B3{background-color:#E3E9FD;} + .d2-3578670073 .background-color-B4{background-color:#E3E9FD;} + .d2-3578670073 .background-color-B5{background-color:#EDF0FD;} + .d2-3578670073 .background-color-B6{background-color:#F7F8FE;} + .d2-3578670073 .background-color-AA2{background-color:#4A6FF3;} + .d2-3578670073 .background-color-AA4{background-color:#EDF0FD;} + .d2-3578670073 .background-color-AA5{background-color:#F7F8FE;} + .d2-3578670073 .background-color-AB4{background-color:#EDF0FD;} + .d2-3578670073 .background-color-AB5{background-color:#F7F8FE;} + .d2-3578670073 .color-N1{color:#0A0F25;} + .d2-3578670073 .color-N2{color:#676C7E;} + .d2-3578670073 .color-N3{color:#9499AB;} + .d2-3578670073 .color-N4{color:#CFD2DD;} + .d2-3578670073 .color-N5{color:#DEE1EB;} + .d2-3578670073 .color-N6{color:#EEF1F8;} + .d2-3578670073 .color-N7{color:#FFFFFF;} + .d2-3578670073 .color-B1{color:#0D32B2;} + .d2-3578670073 .color-B2{color:#0D32B2;} + .d2-3578670073 .color-B3{color:#E3E9FD;} + .d2-3578670073 .color-B4{color:#E3E9FD;} + .d2-3578670073 .color-B5{color:#EDF0FD;} + .d2-3578670073 .color-B6{color:#F7F8FE;} + .d2-3578670073 .color-AA2{color:#4A6FF3;} + .d2-3578670073 .color-AA4{color:#EDF0FD;} + .d2-3578670073 .color-AA5{color:#F7F8FE;} + .d2-3578670073 .color-AB4{color:#EDF0FD;} + .d2-3578670073 .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}]]>ab a self edge herebetween actorsto descendantto deeper descendantto parentactor + - + \ No newline at end of file diff --git a/e2etests/testdata/txtar/sequence-fontsize/dagre/board.exp.json b/e2etests/testdata/txtar/sequence-fontsize/dagre/board.exp.json new file mode 100644 index 000000000..823823ad6 --- /dev/null +++ b/e2etests/testdata/txtar/sequence-fontsize/dagre/board.exp.json @@ -0,0 +1,488 @@ +{ + "name": "", + "isFolderOnly": false, + "fontFamily": "SourceSansPro", + "shapes": [ + { + "id": "Front-End", + "type": "rectangle", + "pos": { + "x": 12, + "y": 52 + }, + "width": 111, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B5", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "Front-End", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 66, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "Libreria", + "type": "rectangle", + "pos": { + "x": 367, + "y": 52 + }, + "width": 100, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B5", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "Libreria", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 50, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "CD", + "type": "rectangle", + "pos": { + "x": 1249, + "y": 52 + }, + "width": 100, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "N7", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "CD", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 20, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "Front-End.t1", + "type": "rectangle", + "pos": { + "x": 61, + "y": 193 + }, + "width": 12, + "height": 272, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B4", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 14, + "labelHeight": 21, + "zIndex": 2, + "level": 2 + }, + { + "id": "Libreria.t1", + "type": "rectangle", + "pos": { + "x": 411, + "y": 193 + }, + "width": 12, + "height": 272, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B4", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 14, + "labelHeight": 21, + "zIndex": 2, + "level": 2 + } + ], + "connections": [ + { + "id": "(Front-End.t1 -> Libreria.t1)[0]", + "src": "Front-End.t1", + "srcArrow": "none", + "dst": "Libreria.t1", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "generatePresentationPayload()", + "fontSize": 24, + "fontFamily": "DEFAULT", + "language": "", + "color": "black", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 309, + "labelHeight": 31, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "route": [ + { + "x": 73.5, + "y": 203 + }, + { + "x": 411, + "y": 203 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 4 + }, + { + "id": "Libreria.(t1 -> t1)[0]", + "src": "Libreria.t1", + "srcArrow": "none", + "dst": "Libreria.t1", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "Generar y Firmar\nPrueba de TitularidadPrueba de TitularidadPrueba de TitularidadPrueba de Titularidad", + "fontSize": 24, + "fontFamily": "DEFAULT", + "language": "", + "color": "black", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 862, + "labelHeight": 55, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "route": [ + { + "x": 423, + "y": 288 + }, + { + "x": 858, + "y": 288 + }, + { + "x": 858, + "y": 370.5 + }, + { + "x": 423, + "y": 370.5 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 4 + }, + { + "id": "(Libreria.t1 -> Front-End.t1)[0]", + "src": "Libreria.t1", + "srcArrow": "none", + "dst": "Front-End.t1", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "Presentacion Firmada", + "fontSize": 24, + "fontFamily": "DEFAULT", + "language": "", + "color": "black", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 217, + "labelHeight": 31, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "route": [ + { + "x": 411, + "y": 455.5 + }, + { + "x": 73.5, + "y": 455.5 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 4 + }, + { + "id": "(Front-End -- )[0]", + "src": "Front-End", + "srcArrow": "none", + "dst": "Front-End-lifeline-end-2397425183", + "dstArrow": "none", + "opacity": 1, + "strokeDash": 6, + "strokeWidth": 2, + "stroke": "B2", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 67.5, + "y": 118 + }, + { + "x": 67.5, + "y": 525.5 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 1 + }, + { + "id": "(Libreria -- )[0]", + "src": "Libreria", + "srcArrow": "none", + "dst": "Libreria-lifeline-end-2001012606", + "dstArrow": "none", + "opacity": 1, + "strokeDash": 6, + "strokeWidth": 2, + "stroke": "B2", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 417, + "y": 118 + }, + { + "x": 417, + "y": 525.5 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 1 + }, + { + "id": "(CD -- )[0]", + "src": "CD", + "srcArrow": "none", + "dst": "CD-lifeline-end-3941115933", + "dstArrow": "none", + "opacity": 1, + "strokeDash": 6, + "strokeWidth": 2, + "stroke": "B2", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 1299, + "y": 118 + }, + { + "x": 1299, + "y": 525.5 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 1 + } + ], + "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/txtar/sequence-fontsize/dagre/sketch.exp.svg b/e2etests/testdata/txtar/sequence-fontsize/dagre/sketch.exp.svg new file mode 100644 index 000000000..575f01f00 --- /dev/null +++ b/e2etests/testdata/txtar/sequence-fontsize/dagre/sketch.exp.svg @@ -0,0 +1,107 @@ +Front-EndLibreriaCD generatePresentationPayload()Generar y FirmarPrueba de TitularidadPrueba de TitularidadPrueba de TitularidadPrueba de TitularidadPresentacion Firmada + + + + + + + + \ No newline at end of file diff --git a/e2etests/testdata/txtar/sequence-fontsize/elk/board.exp.json b/e2etests/testdata/txtar/sequence-fontsize/elk/board.exp.json new file mode 100644 index 000000000..823823ad6 --- /dev/null +++ b/e2etests/testdata/txtar/sequence-fontsize/elk/board.exp.json @@ -0,0 +1,488 @@ +{ + "name": "", + "isFolderOnly": false, + "fontFamily": "SourceSansPro", + "shapes": [ + { + "id": "Front-End", + "type": "rectangle", + "pos": { + "x": 12, + "y": 52 + }, + "width": 111, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B5", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "Front-End", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 66, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "Libreria", + "type": "rectangle", + "pos": { + "x": 367, + "y": 52 + }, + "width": 100, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B5", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "Libreria", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 50, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "CD", + "type": "rectangle", + "pos": { + "x": 1249, + "y": 52 + }, + "width": 100, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "N7", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "CD", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 20, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "Front-End.t1", + "type": "rectangle", + "pos": { + "x": 61, + "y": 193 + }, + "width": 12, + "height": 272, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B4", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 14, + "labelHeight": 21, + "zIndex": 2, + "level": 2 + }, + { + "id": "Libreria.t1", + "type": "rectangle", + "pos": { + "x": 411, + "y": 193 + }, + "width": 12, + "height": 272, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B4", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 14, + "labelHeight": 21, + "zIndex": 2, + "level": 2 + } + ], + "connections": [ + { + "id": "(Front-End.t1 -> Libreria.t1)[0]", + "src": "Front-End.t1", + "srcArrow": "none", + "dst": "Libreria.t1", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "generatePresentationPayload()", + "fontSize": 24, + "fontFamily": "DEFAULT", + "language": "", + "color": "black", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 309, + "labelHeight": 31, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "route": [ + { + "x": 73.5, + "y": 203 + }, + { + "x": 411, + "y": 203 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 4 + }, + { + "id": "Libreria.(t1 -> t1)[0]", + "src": "Libreria.t1", + "srcArrow": "none", + "dst": "Libreria.t1", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "Generar y Firmar\nPrueba de TitularidadPrueba de TitularidadPrueba de TitularidadPrueba de Titularidad", + "fontSize": 24, + "fontFamily": "DEFAULT", + "language": "", + "color": "black", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 862, + "labelHeight": 55, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "route": [ + { + "x": 423, + "y": 288 + }, + { + "x": 858, + "y": 288 + }, + { + "x": 858, + "y": 370.5 + }, + { + "x": 423, + "y": 370.5 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 4 + }, + { + "id": "(Libreria.t1 -> Front-End.t1)[0]", + "src": "Libreria.t1", + "srcArrow": "none", + "dst": "Front-End.t1", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "Presentacion Firmada", + "fontSize": 24, + "fontFamily": "DEFAULT", + "language": "", + "color": "black", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 217, + "labelHeight": 31, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "route": [ + { + "x": 411, + "y": 455.5 + }, + { + "x": 73.5, + "y": 455.5 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 4 + }, + { + "id": "(Front-End -- )[0]", + "src": "Front-End", + "srcArrow": "none", + "dst": "Front-End-lifeline-end-2397425183", + "dstArrow": "none", + "opacity": 1, + "strokeDash": 6, + "strokeWidth": 2, + "stroke": "B2", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 67.5, + "y": 118 + }, + { + "x": 67.5, + "y": 525.5 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 1 + }, + { + "id": "(Libreria -- )[0]", + "src": "Libreria", + "srcArrow": "none", + "dst": "Libreria-lifeline-end-2001012606", + "dstArrow": "none", + "opacity": 1, + "strokeDash": 6, + "strokeWidth": 2, + "stroke": "B2", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 417, + "y": 118 + }, + { + "x": 417, + "y": 525.5 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 1 + }, + { + "id": "(CD -- )[0]", + "src": "CD", + "srcArrow": "none", + "dst": "CD-lifeline-end-3941115933", + "dstArrow": "none", + "opacity": 1, + "strokeDash": 6, + "strokeWidth": 2, + "stroke": "B2", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 1299, + "y": 118 + }, + { + "x": 1299, + "y": 525.5 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 1 + } + ], + "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/txtar/sequence-fontsize/elk/sketch.exp.svg b/e2etests/testdata/txtar/sequence-fontsize/elk/sketch.exp.svg new file mode 100644 index 000000000..575f01f00 --- /dev/null +++ b/e2etests/testdata/txtar/sequence-fontsize/elk/sketch.exp.svg @@ -0,0 +1,107 @@ +Front-EndLibreriaCD generatePresentationPayload()Generar y FirmarPrueba de TitularidadPrueba de TitularidadPrueba de TitularidadPrueba de TitularidadPresentacion Firmada + + + + + + + + \ No newline at end of file diff --git a/e2etests/testdata/txtar/sequence-multiline-self-reference/dagre/board.exp.json b/e2etests/testdata/txtar/sequence-multiline-self-reference/dagre/board.exp.json index 1defc0860..4e415a14b 100644 --- a/e2etests/testdata/txtar/sequence-multiline-self-reference/dagre/board.exp.json +++ b/e2etests/testdata/txtar/sequence-multiline-self-reference/dagre/board.exp.json @@ -48,7 +48,7 @@ "id": "y", "type": "rectangle", "pos": { - "x": 162, + "x": 293, "y": 52 }, "width": 100, @@ -116,11 +116,11 @@ "y": 188 }, { - "x": 142, + "x": 202.5, "y": 188 }, { - "x": 142, + "x": 202.5, "y": 267.5 }, { @@ -162,11 +162,11 @@ "y": 337.5 }, { - "x": 142, + "x": 202.5, "y": 337.5 }, { - "x": 142, + "x": 202.5, "y": 393 }, { @@ -208,7 +208,7 @@ "y": 473 }, { - "x": 212, + "x": 343, "y": 473 } ], @@ -242,19 +242,19 @@ "labelPercentage": 0, "route": [ { - "x": 212, + "x": 343, "y": 553 }, { - "x": 292, + "x": 483.5, "y": 553 }, { - "x": 292, + "x": 483.5, "y": 632.5 }, { - "x": 212, + "x": 343, "y": 632.5 } ], @@ -326,11 +326,11 @@ "labelPercentage": 0, "route": [ { - "x": 212, + "x": 343, "y": 118 }, { - "x": 212, + "x": 343, "y": 702.5 } ], diff --git a/e2etests/testdata/txtar/sequence-multiline-self-reference/dagre/sketch.exp.svg b/e2etests/testdata/txtar/sequence-multiline-self-reference/dagre/sketch.exp.svg index 60a3e9f0f..fbd50633b 100644 --- a/e2etests/testdata/txtar/sequence-multiline-self-reference/dagre/sketch.exp.svg +++ b/e2etests/testdata/txtar/sequence-multiline-self-reference/dagre/sketch.exp.svg @@ -1,16 +1,16 @@ -xy self referential long description which ismultirow3 rowsself referential long description which ismultirownormalself referential long description which ismultirow3 rows - + .d2-462515424 .fill-N1{fill:#0A0F25;} + .d2-462515424 .fill-N2{fill:#676C7E;} + .d2-462515424 .fill-N3{fill:#9499AB;} + .d2-462515424 .fill-N4{fill:#CFD2DD;} + .d2-462515424 .fill-N5{fill:#DEE1EB;} + .d2-462515424 .fill-N6{fill:#EEF1F8;} + .d2-462515424 .fill-N7{fill:#FFFFFF;} + .d2-462515424 .fill-B1{fill:#0D32B2;} + .d2-462515424 .fill-B2{fill:#0D32B2;} + .d2-462515424 .fill-B3{fill:#E3E9FD;} + .d2-462515424 .fill-B4{fill:#E3E9FD;} + .d2-462515424 .fill-B5{fill:#EDF0FD;} + .d2-462515424 .fill-B6{fill:#F7F8FE;} + .d2-462515424 .fill-AA2{fill:#4A6FF3;} + .d2-462515424 .fill-AA4{fill:#EDF0FD;} + .d2-462515424 .fill-AA5{fill:#F7F8FE;} + .d2-462515424 .fill-AB4{fill:#EDF0FD;} + .d2-462515424 .fill-AB5{fill:#F7F8FE;} + .d2-462515424 .stroke-N1{stroke:#0A0F25;} + .d2-462515424 .stroke-N2{stroke:#676C7E;} + .d2-462515424 .stroke-N3{stroke:#9499AB;} + .d2-462515424 .stroke-N4{stroke:#CFD2DD;} + .d2-462515424 .stroke-N5{stroke:#DEE1EB;} + .d2-462515424 .stroke-N6{stroke:#EEF1F8;} + .d2-462515424 .stroke-N7{stroke:#FFFFFF;} + .d2-462515424 .stroke-B1{stroke:#0D32B2;} + .d2-462515424 .stroke-B2{stroke:#0D32B2;} + .d2-462515424 .stroke-B3{stroke:#E3E9FD;} + .d2-462515424 .stroke-B4{stroke:#E3E9FD;} + .d2-462515424 .stroke-B5{stroke:#EDF0FD;} + .d2-462515424 .stroke-B6{stroke:#F7F8FE;} + .d2-462515424 .stroke-AA2{stroke:#4A6FF3;} + .d2-462515424 .stroke-AA4{stroke:#EDF0FD;} + .d2-462515424 .stroke-AA5{stroke:#F7F8FE;} + .d2-462515424 .stroke-AB4{stroke:#EDF0FD;} + .d2-462515424 .stroke-AB5{stroke:#F7F8FE;} + .d2-462515424 .background-color-N1{background-color:#0A0F25;} + .d2-462515424 .background-color-N2{background-color:#676C7E;} + .d2-462515424 .background-color-N3{background-color:#9499AB;} + .d2-462515424 .background-color-N4{background-color:#CFD2DD;} + .d2-462515424 .background-color-N5{background-color:#DEE1EB;} + .d2-462515424 .background-color-N6{background-color:#EEF1F8;} + .d2-462515424 .background-color-N7{background-color:#FFFFFF;} + .d2-462515424 .background-color-B1{background-color:#0D32B2;} + .d2-462515424 .background-color-B2{background-color:#0D32B2;} + .d2-462515424 .background-color-B3{background-color:#E3E9FD;} + .d2-462515424 .background-color-B4{background-color:#E3E9FD;} + .d2-462515424 .background-color-B5{background-color:#EDF0FD;} + .d2-462515424 .background-color-B6{background-color:#F7F8FE;} + .d2-462515424 .background-color-AA2{background-color:#4A6FF3;} + .d2-462515424 .background-color-AA4{background-color:#EDF0FD;} + .d2-462515424 .background-color-AA5{background-color:#F7F8FE;} + .d2-462515424 .background-color-AB4{background-color:#EDF0FD;} + .d2-462515424 .background-color-AB5{background-color:#F7F8FE;} + .d2-462515424 .color-N1{color:#0A0F25;} + .d2-462515424 .color-N2{color:#676C7E;} + .d2-462515424 .color-N3{color:#9499AB;} + .d2-462515424 .color-N4{color:#CFD2DD;} + .d2-462515424 .color-N5{color:#DEE1EB;} + .d2-462515424 .color-N6{color:#EEF1F8;} + .d2-462515424 .color-N7{color:#FFFFFF;} + .d2-462515424 .color-B1{color:#0D32B2;} + .d2-462515424 .color-B2{color:#0D32B2;} + .d2-462515424 .color-B3{color:#E3E9FD;} + .d2-462515424 .color-B4{color:#E3E9FD;} + .d2-462515424 .color-B5{color:#EDF0FD;} + .d2-462515424 .color-B6{color:#F7F8FE;} + .d2-462515424 .color-AA2{color:#4A6FF3;} + .d2-462515424 .color-AA4{color:#EDF0FD;} + .d2-462515424 .color-AA5{color:#F7F8FE;} + .d2-462515424 .color-AB4{color:#EDF0FD;} + .d2-462515424 .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}]]>xy self referential long description which ismultirow3 rowsself referential long description which ismultirownormalself referential long description which ismultirow3 rows + - - - - - + + + + + \ No newline at end of file diff --git a/e2etests/testdata/txtar/sequence-multiline-self-reference/elk/board.exp.json b/e2etests/testdata/txtar/sequence-multiline-self-reference/elk/board.exp.json index 1defc0860..4e415a14b 100644 --- a/e2etests/testdata/txtar/sequence-multiline-self-reference/elk/board.exp.json +++ b/e2etests/testdata/txtar/sequence-multiline-self-reference/elk/board.exp.json @@ -48,7 +48,7 @@ "id": "y", "type": "rectangle", "pos": { - "x": 162, + "x": 293, "y": 52 }, "width": 100, @@ -116,11 +116,11 @@ "y": 188 }, { - "x": 142, + "x": 202.5, "y": 188 }, { - "x": 142, + "x": 202.5, "y": 267.5 }, { @@ -162,11 +162,11 @@ "y": 337.5 }, { - "x": 142, + "x": 202.5, "y": 337.5 }, { - "x": 142, + "x": 202.5, "y": 393 }, { @@ -208,7 +208,7 @@ "y": 473 }, { - "x": 212, + "x": 343, "y": 473 } ], @@ -242,19 +242,19 @@ "labelPercentage": 0, "route": [ { - "x": 212, + "x": 343, "y": 553 }, { - "x": 292, + "x": 483.5, "y": 553 }, { - "x": 292, + "x": 483.5, "y": 632.5 }, { - "x": 212, + "x": 343, "y": 632.5 } ], @@ -326,11 +326,11 @@ "labelPercentage": 0, "route": [ { - "x": 212, + "x": 343, "y": 118 }, { - "x": 212, + "x": 343, "y": 702.5 } ], diff --git a/e2etests/testdata/txtar/sequence-multiline-self-reference/elk/sketch.exp.svg b/e2etests/testdata/txtar/sequence-multiline-self-reference/elk/sketch.exp.svg index 60a3e9f0f..fbd50633b 100644 --- a/e2etests/testdata/txtar/sequence-multiline-self-reference/elk/sketch.exp.svg +++ b/e2etests/testdata/txtar/sequence-multiline-self-reference/elk/sketch.exp.svg @@ -1,16 +1,16 @@ -xy self referential long description which ismultirow3 rowsself referential long description which ismultirownormalself referential long description which ismultirow3 rows - + .d2-462515424 .fill-N1{fill:#0A0F25;} + .d2-462515424 .fill-N2{fill:#676C7E;} + .d2-462515424 .fill-N3{fill:#9499AB;} + .d2-462515424 .fill-N4{fill:#CFD2DD;} + .d2-462515424 .fill-N5{fill:#DEE1EB;} + .d2-462515424 .fill-N6{fill:#EEF1F8;} + .d2-462515424 .fill-N7{fill:#FFFFFF;} + .d2-462515424 .fill-B1{fill:#0D32B2;} + .d2-462515424 .fill-B2{fill:#0D32B2;} + .d2-462515424 .fill-B3{fill:#E3E9FD;} + .d2-462515424 .fill-B4{fill:#E3E9FD;} + .d2-462515424 .fill-B5{fill:#EDF0FD;} + .d2-462515424 .fill-B6{fill:#F7F8FE;} + .d2-462515424 .fill-AA2{fill:#4A6FF3;} + .d2-462515424 .fill-AA4{fill:#EDF0FD;} + .d2-462515424 .fill-AA5{fill:#F7F8FE;} + .d2-462515424 .fill-AB4{fill:#EDF0FD;} + .d2-462515424 .fill-AB5{fill:#F7F8FE;} + .d2-462515424 .stroke-N1{stroke:#0A0F25;} + .d2-462515424 .stroke-N2{stroke:#676C7E;} + .d2-462515424 .stroke-N3{stroke:#9499AB;} + .d2-462515424 .stroke-N4{stroke:#CFD2DD;} + .d2-462515424 .stroke-N5{stroke:#DEE1EB;} + .d2-462515424 .stroke-N6{stroke:#EEF1F8;} + .d2-462515424 .stroke-N7{stroke:#FFFFFF;} + .d2-462515424 .stroke-B1{stroke:#0D32B2;} + .d2-462515424 .stroke-B2{stroke:#0D32B2;} + .d2-462515424 .stroke-B3{stroke:#E3E9FD;} + .d2-462515424 .stroke-B4{stroke:#E3E9FD;} + .d2-462515424 .stroke-B5{stroke:#EDF0FD;} + .d2-462515424 .stroke-B6{stroke:#F7F8FE;} + .d2-462515424 .stroke-AA2{stroke:#4A6FF3;} + .d2-462515424 .stroke-AA4{stroke:#EDF0FD;} + .d2-462515424 .stroke-AA5{stroke:#F7F8FE;} + .d2-462515424 .stroke-AB4{stroke:#EDF0FD;} + .d2-462515424 .stroke-AB5{stroke:#F7F8FE;} + .d2-462515424 .background-color-N1{background-color:#0A0F25;} + .d2-462515424 .background-color-N2{background-color:#676C7E;} + .d2-462515424 .background-color-N3{background-color:#9499AB;} + .d2-462515424 .background-color-N4{background-color:#CFD2DD;} + .d2-462515424 .background-color-N5{background-color:#DEE1EB;} + .d2-462515424 .background-color-N6{background-color:#EEF1F8;} + .d2-462515424 .background-color-N7{background-color:#FFFFFF;} + .d2-462515424 .background-color-B1{background-color:#0D32B2;} + .d2-462515424 .background-color-B2{background-color:#0D32B2;} + .d2-462515424 .background-color-B3{background-color:#E3E9FD;} + .d2-462515424 .background-color-B4{background-color:#E3E9FD;} + .d2-462515424 .background-color-B5{background-color:#EDF0FD;} + .d2-462515424 .background-color-B6{background-color:#F7F8FE;} + .d2-462515424 .background-color-AA2{background-color:#4A6FF3;} + .d2-462515424 .background-color-AA4{background-color:#EDF0FD;} + .d2-462515424 .background-color-AA5{background-color:#F7F8FE;} + .d2-462515424 .background-color-AB4{background-color:#EDF0FD;} + .d2-462515424 .background-color-AB5{background-color:#F7F8FE;} + .d2-462515424 .color-N1{color:#0A0F25;} + .d2-462515424 .color-N2{color:#676C7E;} + .d2-462515424 .color-N3{color:#9499AB;} + .d2-462515424 .color-N4{color:#CFD2DD;} + .d2-462515424 .color-N5{color:#DEE1EB;} + .d2-462515424 .color-N6{color:#EEF1F8;} + .d2-462515424 .color-N7{color:#FFFFFF;} + .d2-462515424 .color-B1{color:#0D32B2;} + .d2-462515424 .color-B2{color:#0D32B2;} + .d2-462515424 .color-B3{color:#E3E9FD;} + .d2-462515424 .color-B4{color:#E3E9FD;} + .d2-462515424 .color-B5{color:#EDF0FD;} + .d2-462515424 .color-B6{color:#F7F8FE;} + .d2-462515424 .color-AA2{color:#4A6FF3;} + .d2-462515424 .color-AA4{color:#EDF0FD;} + .d2-462515424 .color-AA5{color:#F7F8FE;} + .d2-462515424 .color-AB4{color:#EDF0FD;} + .d2-462515424 .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}]]>xy self referential long description which ismultirow3 rowsself referential long description which ismultirownormalself referential long description which ismultirow3 rows + - - - - - + + + + + \ No newline at end of file diff --git a/e2etests/txtar.txt b/e2etests/txtar.txt index 5807fdb7a..82c816b95 100644 --- a/e2etests/txtar.txt +++ b/e2etests/txtar.txt @@ -338,3 +338,15 @@ b a -> b: okay then a -> b: one\ntwo\nthree\nfour\nfive\nsix\nseven\neight\nnine\nten a -> b: one\ntwo\nthree\nfour\nfive + +-- sequence-fontsize -- +shape: sequence_diagram +(** -> **)[*].style.font-size: 24 +(** -> **)[*].style.font-color: black +Front-End +Libreria +CD + +Front-End.t1 -> Libreria.t1: generatePresentationPayload() +Libreria.t1 -> Libreria.t1: Generar y Firmar\nPrueba de TitularidadPrueba de TitularidadPrueba de TitularidadPrueba de Titularidad +Libreria.t1 -> Front-End.t1: Presentacion Firmada