From 9353310fed4b161660c964fe6943652f45d83a9b Mon Sep 17 00:00:00 2001 From: melsonic Date: Wed, 19 Mar 2025 23:32:18 +0530 Subject: [PATCH] added test cases in txtar.txt --- .../TestCLI_E2E/internal_linked_pdf.exp.pdf | Bin 65656 -> 65656 bytes .../testdata/TestCLI_E2E/no-nav-pdf.exp.pdf | Bin 90706 -> 90706 bytes .../TestCLI_E2E/renamed-board.exp.pdf | Bin 104441 -> 104441 bytes .../testdata/TestCLI_E2E/theme-pdf.exp.pdf | Bin 17334 -> 17334 bytes .../connection-icons/dagre/board.exp.json | 168 +++++++++++++++-- .../connection-icons/dagre/sketch.exp.svg | 177 +++++++++--------- .../txtar/connection-icons/elk/board.exp.json | 151 ++++++++++++++- .../txtar/connection-icons/elk/sketch.exp.svg | 177 +++++++++--------- .../txtar/icon-style/dagre/board.exp.json | 112 +++++++++++ .../txtar/icon-style/dagre/sketch.exp.svg | 95 ++++++++++ .../txtar/icon-style/elk/board.exp.json | 112 +++++++++++ .../txtar/icon-style/elk/sketch.exp.svg | 95 ++++++++++ e2etests/txtar.txt | 19 ++ 13 files changed, 914 insertions(+), 192 deletions(-) create mode 100644 e2etests/testdata/txtar/icon-style/dagre/board.exp.json create mode 100644 e2etests/testdata/txtar/icon-style/dagre/sketch.exp.svg create mode 100644 e2etests/testdata/txtar/icon-style/elk/board.exp.json create mode 100644 e2etests/testdata/txtar/icon-style/elk/sketch.exp.svg diff --git a/e2etests-cli/testdata/TestCLI_E2E/internal_linked_pdf.exp.pdf b/e2etests-cli/testdata/TestCLI_E2E/internal_linked_pdf.exp.pdf index 85be6ffc1b61b0ef956f779c11141c4337bcf2a5..c07c1a51acbc49df581768fb9ec0f64d0283ea2c 100644 GIT binary patch delta 394 zcmey-!1AMkWy52Z$xr#TCiAc+PcG#bn%uyuGeKPFZgqd-O|X|$jsPua^qi77<=>Fzlx0YW(o!%ppd7)1!fo+nphZPh*_AM zV~AOrn4*gr8Jb#Rh?y9epo1BP=$yG&Dq4XkuVyfgxsMhT%XHQ)5iM=EfL~ PHnFrYLNRahp8tCQzSmXlv9XcCzXt%()?@zw diff --git a/e2etests-cli/testdata/TestCLI_E2E/no-nav-pdf.exp.pdf b/e2etests-cli/testdata/TestCLI_E2E/no-nav-pdf.exp.pdf index c636403be4a0ac72cbd4044df695a2cbb4456fc4..eb7701aacbc5d708c86fc069649dd99b339ea53e 100644 GIT binary patch delta 180 zcmca~g!R%9)(x^!lLNY!FdA+C+I^vUGHaFrkgKv?Qh@Q0?_`B;gUPZ|ix^EdACPkO zpMI2|5yV%X4wNn0d@3tUVfyV@#`}zh(|5-)8ZsJBe;db`u54*!Y-DC^tjVSCo1fy6 zSdyxs;bLWEU}S1wYzURxULMbA%A{*zU}|ZsU;qLNc?w)$hM9q>1-h7pp@D_@^qYx{ Fl>povHU$6x delta 178 zcmca~g!R%9)(x^!(?8fSDo_6Xrk>GgbM;$S|H+f)8EglNy;hjK;*G&%S*azHtKRZ$ zJ}-5+dHMkxMv#cg=4bN``A)wb%XpvBc>3-*Mngu!>2Kp0)0HiZjE#*AEi}3Gee+XX z5=&AQG+eBV42(<-fT9q&?d9=|rcAm<=7uH)3I-sckf*=}W*D2A8JePrnOT~e8%@8N H$XE#gpcXrX diff --git a/e2etests-cli/testdata/TestCLI_E2E/renamed-board.exp.pdf b/e2etests-cli/testdata/TestCLI_E2E/renamed-board.exp.pdf index aace2ad9c9ed0fa050a1b40b2afe45dd0107fa7a..64124aeb77dd7e4731252a95cbbd70fc86a26ebc 100644 GIT binary patch delta 38 ocmeylp6%y)wuUW?zoxKT8W|gz8JkRJoXRK)<7}6m%6Nwf02^!!lK=n! delta 38 ocmeylp6%y)wuUW?zoxKT7#SNI8=6mNoXRK)<7}6m%6Nwf02?3-j{pDw diff --git a/e2etests-cli/testdata/TestCLI_E2E/theme-pdf.exp.pdf b/e2etests-cli/testdata/TestCLI_E2E/theme-pdf.exp.pdf index 7ecdb663f67b9a297a0f52ab44f23dab0137224a..60f30752490b9ae82b579b7ee6d2a4568e950661 100644 GIT binary patch delta 34 jcmdni&bY0eaRY}VyQPt_k(sf{WPV3c7<;p}V>c53tP%+V delta 34 jcmdni&bY0eaRY}VyM>Xlv9Y1$WPV3c7<;p}V>c53tNaN9 diff --git a/e2etests/testdata/txtar/connection-icons/dagre/board.exp.json b/e2etests/testdata/txtar/connection-icons/dagre/board.exp.json index 96c74348f..b6316b897 100644 --- a/e2etests/testdata/txtar/connection-icons/dagre/board.exp.json +++ b/e2etests/testdata/txtar/connection-icons/dagre/board.exp.json @@ -15,7 +15,7 @@ "id": "a", "type": "rectangle", "pos": { - "x": 0, + "x": 29, "y": 0 }, "width": 53, @@ -57,7 +57,7 @@ "id": "b", "type": "rectangle", "pos": { - "x": 186, + "x": 275, "y": 0 }, "width": 53, @@ -99,7 +99,7 @@ "id": "c", "type": "rectangle", "pos": { - "x": 339, + "x": 459, "y": 0 }, "width": 53, @@ -136,6 +136,90 @@ "labelPosition": "INSIDE_MIDDLE_CENTER", "zIndex": 0, "level": 1 + }, + { + "id": "producer", + "type": "rectangle", + "pos": { + "x": 0, + "y": 126 + }, + "width": 110, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "animated": false, + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "producer", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 65, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "consumer", + "type": "rectangle", + "pos": { + "x": 243, + "y": 126 + }, + "width": 116, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "animated": false, + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "consumer", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 71, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 } ], "connections": [ @@ -165,19 +249,19 @@ "link": "", "route": [ { - "x": 52.5, + "x": 82.5, "y": 33 }, { - "x": 106.0999984741211, + "x": 157.6999969482422, "y": 33 }, { - "x": 132.89999389648438, + "x": 196.10000610351562, "y": 33 }, { - "x": 186.5, + "x": 274.5, "y": 33 } ], @@ -226,19 +310,19 @@ "link": "", "route": [ { - "x": 239, + "x": 328.5, "y": 33 }, { - "x": 279, + "x": 392.8999938964844, "y": 33 }, { - "x": 299, + "x": 419, "y": 33 }, { - "x": 339, + "x": 459, "y": 33 } ], @@ -260,6 +344,68 @@ }, "iconPosition": "INSIDE_MIDDLE_CENTER", "zIndex": 0 + }, + { + "id": "(producer -> consumer)[0]", + "src": "producer", + "srcArrow": "none", + "dst": "consumer", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "link": "", + "route": [ + { + "x": 109.5, + "y": 159 + }, + { + "x": 163.10000610351562, + "y": 159 + }, + { + "x": 189.89999389648438, + "y": 159 + }, + { + "x": 243.5, + "y": 159 + } + ], + "isCurve": true, + "animated": false, + "tooltip": "", + "icon": { + "Scheme": "https", + "Opaque": "", + "User": null, + "Host": "icons.terrastruct.com", + "Path": "/aws/Application Integration/Amazon-Simple-Queue-Service-SQS.svg", + "RawPath": "/aws%2FApplication%20Integration%2FAmazon-Simple-Queue-Service-SQS.svg", + "OmitHost": false, + "ForceQuery": false, + "RawQuery": "", + "Fragment": "", + "RawFragment": "" + }, + "iconPosition": "INSIDE_MIDDLE_CENTER", + "iconBorderRadius": 20, + "zIndex": 0 } ], "root": { diff --git a/e2etests/testdata/txtar/connection-icons/dagre/sketch.exp.svg b/e2etests/testdata/txtar/connection-icons/dagre/sketch.exp.svg index 5e302b9c2..37e6cadc2 100644 --- a/e2etests/testdata/txtar/connection-icons/dagre/sketch.exp.svg +++ b/e2etests/testdata/txtar/connection-icons/dagre/sketch.exp.svg @@ -1,17 +1,17 @@ -abc hello - - - - - - + .d2-970759274 .fill-N1{fill:#0A0F25;} + .d2-970759274 .fill-N2{fill:#676C7E;} + .d2-970759274 .fill-N3{fill:#9499AB;} + .d2-970759274 .fill-N4{fill:#CFD2DD;} + .d2-970759274 .fill-N5{fill:#DEE1EB;} + .d2-970759274 .fill-N6{fill:#EEF1F8;} + .d2-970759274 .fill-N7{fill:#FFFFFF;} + .d2-970759274 .fill-B1{fill:#0D32B2;} + .d2-970759274 .fill-B2{fill:#0D32B2;} + .d2-970759274 .fill-B3{fill:#E3E9FD;} + .d2-970759274 .fill-B4{fill:#E3E9FD;} + .d2-970759274 .fill-B5{fill:#EDF0FD;} + .d2-970759274 .fill-B6{fill:#F7F8FE;} + .d2-970759274 .fill-AA2{fill:#4A6FF3;} + .d2-970759274 .fill-AA4{fill:#EDF0FD;} + .d2-970759274 .fill-AA5{fill:#F7F8FE;} + .d2-970759274 .fill-AB4{fill:#EDF0FD;} + .d2-970759274 .fill-AB5{fill:#F7F8FE;} + .d2-970759274 .stroke-N1{stroke:#0A0F25;} + .d2-970759274 .stroke-N2{stroke:#676C7E;} + .d2-970759274 .stroke-N3{stroke:#9499AB;} + .d2-970759274 .stroke-N4{stroke:#CFD2DD;} + .d2-970759274 .stroke-N5{stroke:#DEE1EB;} + .d2-970759274 .stroke-N6{stroke:#EEF1F8;} + .d2-970759274 .stroke-N7{stroke:#FFFFFF;} + .d2-970759274 .stroke-B1{stroke:#0D32B2;} + .d2-970759274 .stroke-B2{stroke:#0D32B2;} + .d2-970759274 .stroke-B3{stroke:#E3E9FD;} + .d2-970759274 .stroke-B4{stroke:#E3E9FD;} + .d2-970759274 .stroke-B5{stroke:#EDF0FD;} + .d2-970759274 .stroke-B6{stroke:#F7F8FE;} + .d2-970759274 .stroke-AA2{stroke:#4A6FF3;} + .d2-970759274 .stroke-AA4{stroke:#EDF0FD;} + .d2-970759274 .stroke-AA5{stroke:#F7F8FE;} + .d2-970759274 .stroke-AB4{stroke:#EDF0FD;} + .d2-970759274 .stroke-AB5{stroke:#F7F8FE;} + .d2-970759274 .background-color-N1{background-color:#0A0F25;} + .d2-970759274 .background-color-N2{background-color:#676C7E;} + .d2-970759274 .background-color-N3{background-color:#9499AB;} + .d2-970759274 .background-color-N4{background-color:#CFD2DD;} + .d2-970759274 .background-color-N5{background-color:#DEE1EB;} + .d2-970759274 .background-color-N6{background-color:#EEF1F8;} + .d2-970759274 .background-color-N7{background-color:#FFFFFF;} + .d2-970759274 .background-color-B1{background-color:#0D32B2;} + .d2-970759274 .background-color-B2{background-color:#0D32B2;} + .d2-970759274 .background-color-B3{background-color:#E3E9FD;} + .d2-970759274 .background-color-B4{background-color:#E3E9FD;} + .d2-970759274 .background-color-B5{background-color:#EDF0FD;} + .d2-970759274 .background-color-B6{background-color:#F7F8FE;} + .d2-970759274 .background-color-AA2{background-color:#4A6FF3;} + .d2-970759274 .background-color-AA4{background-color:#EDF0FD;} + .d2-970759274 .background-color-AA5{background-color:#F7F8FE;} + .d2-970759274 .background-color-AB4{background-color:#EDF0FD;} + .d2-970759274 .background-color-AB5{background-color:#F7F8FE;} + .d2-970759274 .color-N1{color:#0A0F25;} + .d2-970759274 .color-N2{color:#676C7E;} + .d2-970759274 .color-N3{color:#9499AB;} + .d2-970759274 .color-N4{color:#CFD2DD;} + .d2-970759274 .color-N5{color:#DEE1EB;} + .d2-970759274 .color-N6{color:#EEF1F8;} + .d2-970759274 .color-N7{color:#FFFFFF;} + .d2-970759274 .color-B1{color:#0D32B2;} + .d2-970759274 .color-B2{color:#0D32B2;} + .d2-970759274 .color-B3{color:#E3E9FD;} + .d2-970759274 .color-B4{color:#E3E9FD;} + .d2-970759274 .color-B5{color:#EDF0FD;} + .d2-970759274 .color-B6{color:#F7F8FE;} + .d2-970759274 .color-AA2{color:#4A6FF3;} + .d2-970759274 .color-AA4{color:#EDF0FD;} + .d2-970759274 .color-AA5{color:#F7F8FE;} + .d2-970759274 .color-AB4{color:#EDF0FD;} + .d2-970759274 .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-d2-970759274);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker-d2-970759274);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright-d2-970759274);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright-d2-970759274);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright-d2-970759274);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright-d2-970759274);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark-d2-970759274);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright-d2-970759274);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright-d2-970759274);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright-d2-970759274);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright-d2-970759274);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker-d2-970759274);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark-d2-970759274);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal-d2-970759274);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal-d2-970759274);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright-d2-970759274);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright-d2-970759274);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright-d2-970759274);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>abcproducerconsumer hello + + + + + + + + + \ No newline at end of file diff --git a/e2etests/testdata/txtar/connection-icons/elk/board.exp.json b/e2etests/testdata/txtar/connection-icons/elk/board.exp.json index 18f1b8346..d47b16302 100644 --- a/e2etests/testdata/txtar/connection-icons/elk/board.exp.json +++ b/e2etests/testdata/txtar/connection-icons/elk/board.exp.json @@ -15,7 +15,7 @@ "id": "a", "type": "rectangle", "pos": { - "x": 12, + "x": 69, "y": 12 }, "width": 53, @@ -57,7 +57,7 @@ "id": "b", "type": "rectangle", "pos": { - "x": 238, + "x": 378, "y": 12 }, "width": 53, @@ -99,7 +99,7 @@ "id": "c", "type": "rectangle", "pos": { - "x": 361, + "x": 501, "y": 12 }, "width": 53, @@ -136,6 +136,90 @@ "labelPosition": "INSIDE_MIDDLE_CENTER", "zIndex": 0, "level": 1 + }, + { + "id": "producer", + "type": "rectangle", + "pos": { + "x": 12, + "y": 98 + }, + "width": 110, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "animated": false, + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "producer", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 65, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "consumer", + "type": "rectangle", + "pos": { + "x": 192, + "y": 98 + }, + "width": 116, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "animated": false, + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "consumer", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 71, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 } ], "connections": [ @@ -165,11 +249,11 @@ "link": "", "route": [ { - "x": 65, + "x": 122, "y": 45 }, { - "x": 238, + "x": 378, "y": 45 } ], @@ -217,11 +301,11 @@ "link": "", "route": [ { - "x": 291, + "x": 431, "y": 45 }, { - "x": 361, + "x": 501, "y": 45 } ], @@ -242,6 +326,59 @@ }, "iconPosition": "INSIDE_MIDDLE_CENTER", "zIndex": 0 + }, + { + "id": "(producer -> consumer)[0]", + "src": "producer", + "srcArrow": "none", + "dst": "consumer", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "link": "", + "route": [ + { + "x": 122, + "y": 131 + }, + { + "x": 192, + "y": 131 + } + ], + "animated": false, + "tooltip": "", + "icon": { + "Scheme": "https", + "Opaque": "", + "User": null, + "Host": "icons.terrastruct.com", + "Path": "/aws/Application Integration/Amazon-Simple-Queue-Service-SQS.svg", + "RawPath": "/aws%2FApplication%20Integration%2FAmazon-Simple-Queue-Service-SQS.svg", + "OmitHost": false, + "ForceQuery": false, + "RawQuery": "", + "Fragment": "", + "RawFragment": "" + }, + "iconPosition": "INSIDE_MIDDLE_CENTER", + "iconBorderRadius": 20, + "zIndex": 0 } ], "root": { diff --git a/e2etests/testdata/txtar/connection-icons/elk/sketch.exp.svg b/e2etests/testdata/txtar/connection-icons/elk/sketch.exp.svg index be28cc05d..74f460928 100644 --- a/e2etests/testdata/txtar/connection-icons/elk/sketch.exp.svg +++ b/e2etests/testdata/txtar/connection-icons/elk/sketch.exp.svg @@ -1,17 +1,17 @@ -abc hello - - - - - - + .d2-674489035 .fill-N1{fill:#0A0F25;} + .d2-674489035 .fill-N2{fill:#676C7E;} + .d2-674489035 .fill-N3{fill:#9499AB;} + .d2-674489035 .fill-N4{fill:#CFD2DD;} + .d2-674489035 .fill-N5{fill:#DEE1EB;} + .d2-674489035 .fill-N6{fill:#EEF1F8;} + .d2-674489035 .fill-N7{fill:#FFFFFF;} + .d2-674489035 .fill-B1{fill:#0D32B2;} + .d2-674489035 .fill-B2{fill:#0D32B2;} + .d2-674489035 .fill-B3{fill:#E3E9FD;} + .d2-674489035 .fill-B4{fill:#E3E9FD;} + .d2-674489035 .fill-B5{fill:#EDF0FD;} + .d2-674489035 .fill-B6{fill:#F7F8FE;} + .d2-674489035 .fill-AA2{fill:#4A6FF3;} + .d2-674489035 .fill-AA4{fill:#EDF0FD;} + .d2-674489035 .fill-AA5{fill:#F7F8FE;} + .d2-674489035 .fill-AB4{fill:#EDF0FD;} + .d2-674489035 .fill-AB5{fill:#F7F8FE;} + .d2-674489035 .stroke-N1{stroke:#0A0F25;} + .d2-674489035 .stroke-N2{stroke:#676C7E;} + .d2-674489035 .stroke-N3{stroke:#9499AB;} + .d2-674489035 .stroke-N4{stroke:#CFD2DD;} + .d2-674489035 .stroke-N5{stroke:#DEE1EB;} + .d2-674489035 .stroke-N6{stroke:#EEF1F8;} + .d2-674489035 .stroke-N7{stroke:#FFFFFF;} + .d2-674489035 .stroke-B1{stroke:#0D32B2;} + .d2-674489035 .stroke-B2{stroke:#0D32B2;} + .d2-674489035 .stroke-B3{stroke:#E3E9FD;} + .d2-674489035 .stroke-B4{stroke:#E3E9FD;} + .d2-674489035 .stroke-B5{stroke:#EDF0FD;} + .d2-674489035 .stroke-B6{stroke:#F7F8FE;} + .d2-674489035 .stroke-AA2{stroke:#4A6FF3;} + .d2-674489035 .stroke-AA4{stroke:#EDF0FD;} + .d2-674489035 .stroke-AA5{stroke:#F7F8FE;} + .d2-674489035 .stroke-AB4{stroke:#EDF0FD;} + .d2-674489035 .stroke-AB5{stroke:#F7F8FE;} + .d2-674489035 .background-color-N1{background-color:#0A0F25;} + .d2-674489035 .background-color-N2{background-color:#676C7E;} + .d2-674489035 .background-color-N3{background-color:#9499AB;} + .d2-674489035 .background-color-N4{background-color:#CFD2DD;} + .d2-674489035 .background-color-N5{background-color:#DEE1EB;} + .d2-674489035 .background-color-N6{background-color:#EEF1F8;} + .d2-674489035 .background-color-N7{background-color:#FFFFFF;} + .d2-674489035 .background-color-B1{background-color:#0D32B2;} + .d2-674489035 .background-color-B2{background-color:#0D32B2;} + .d2-674489035 .background-color-B3{background-color:#E3E9FD;} + .d2-674489035 .background-color-B4{background-color:#E3E9FD;} + .d2-674489035 .background-color-B5{background-color:#EDF0FD;} + .d2-674489035 .background-color-B6{background-color:#F7F8FE;} + .d2-674489035 .background-color-AA2{background-color:#4A6FF3;} + .d2-674489035 .background-color-AA4{background-color:#EDF0FD;} + .d2-674489035 .background-color-AA5{background-color:#F7F8FE;} + .d2-674489035 .background-color-AB4{background-color:#EDF0FD;} + .d2-674489035 .background-color-AB5{background-color:#F7F8FE;} + .d2-674489035 .color-N1{color:#0A0F25;} + .d2-674489035 .color-N2{color:#676C7E;} + .d2-674489035 .color-N3{color:#9499AB;} + .d2-674489035 .color-N4{color:#CFD2DD;} + .d2-674489035 .color-N5{color:#DEE1EB;} + .d2-674489035 .color-N6{color:#EEF1F8;} + .d2-674489035 .color-N7{color:#FFFFFF;} + .d2-674489035 .color-B1{color:#0D32B2;} + .d2-674489035 .color-B2{color:#0D32B2;} + .d2-674489035 .color-B3{color:#E3E9FD;} + .d2-674489035 .color-B4{color:#E3E9FD;} + .d2-674489035 .color-B5{color:#EDF0FD;} + .d2-674489035 .color-B6{color:#F7F8FE;} + .d2-674489035 .color-AA2{color:#4A6FF3;} + .d2-674489035 .color-AA4{color:#EDF0FD;} + .d2-674489035 .color-AA5{color:#F7F8FE;} + .d2-674489035 .color-AB4{color:#EDF0FD;} + .d2-674489035 .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-d2-674489035);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker-d2-674489035);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright-d2-674489035);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright-d2-674489035);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright-d2-674489035);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright-d2-674489035);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark-d2-674489035);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright-d2-674489035);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright-d2-674489035);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright-d2-674489035);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright-d2-674489035);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker-d2-674489035);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark-d2-674489035);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal-d2-674489035);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal-d2-674489035);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright-d2-674489035);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright-d2-674489035);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright-d2-674489035);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>abcproducerconsumer hello + + + + + + + + + \ No newline at end of file diff --git a/e2etests/testdata/txtar/icon-style/dagre/board.exp.json b/e2etests/testdata/txtar/icon-style/dagre/board.exp.json new file mode 100644 index 000000000..ae8607e6d --- /dev/null +++ b/e2etests/testdata/txtar/icon-style/dagre/board.exp.json @@ -0,0 +1,112 @@ +{ + "name": "", + "config": { + "sketch": false, + "themeID": 0, + "darkThemeID": null, + "pad": null, + "center": null, + "layoutEngine": null + }, + "isFolderOnly": false, + "fontFamily": "SourceSansPro", + "shapes": [ + { + "id": "lambda", + "type": "image", + "pos": { + "x": 0, + "y": 0 + }, + "width": 128, + "height": 128, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "N7", + "stroke": "B1", + "animated": false, + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": { + "Scheme": "https", + "Opaque": "", + "User": null, + "Host": "icons.terrastruct.com", + "Path": "/aws/Compute/AWS-Lambda.svg", + "RawPath": "/aws%2FCompute%2FAWS-Lambda.svg", + "OmitHost": false, + "ForceQuery": false, + "RawQuery": "", + "Fragment": "", + "RawFragment": "" + }, + "iconBorderRadius": 20, + "iconPosition": "INSIDE_MIDDLE_CENTER", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "lambda", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 53, + "labelHeight": 21, + "labelPosition": "OUTSIDE_BOTTOM_CENTER", + "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": "", + "animated": false, + "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/icon-style/dagre/sketch.exp.svg b/e2etests/testdata/txtar/icon-style/dagre/sketch.exp.svg new file mode 100644 index 000000000..2a02a9a26 --- /dev/null +++ b/e2etests/testdata/txtar/icon-style/dagre/sketch.exp.svg @@ -0,0 +1,95 @@ + lambda + + + \ No newline at end of file diff --git a/e2etests/testdata/txtar/icon-style/elk/board.exp.json b/e2etests/testdata/txtar/icon-style/elk/board.exp.json new file mode 100644 index 000000000..67f46fcbf --- /dev/null +++ b/e2etests/testdata/txtar/icon-style/elk/board.exp.json @@ -0,0 +1,112 @@ +{ + "name": "", + "config": { + "sketch": false, + "themeID": 0, + "darkThemeID": null, + "pad": null, + "center": null, + "layoutEngine": null + }, + "isFolderOnly": false, + "fontFamily": "SourceSansPro", + "shapes": [ + { + "id": "lambda", + "type": "image", + "pos": { + "x": 12, + "y": 12 + }, + "width": 128, + "height": 128, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "N7", + "stroke": "B1", + "animated": false, + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": { + "Scheme": "https", + "Opaque": "", + "User": null, + "Host": "icons.terrastruct.com", + "Path": "/aws/Compute/AWS-Lambda.svg", + "RawPath": "/aws%2FCompute%2FAWS-Lambda.svg", + "OmitHost": false, + "ForceQuery": false, + "RawQuery": "", + "Fragment": "", + "RawFragment": "" + }, + "iconBorderRadius": 20, + "iconPosition": "INSIDE_MIDDLE_CENTER", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "lambda", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 53, + "labelHeight": 21, + "labelPosition": "OUTSIDE_BOTTOM_CENTER", + "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": "", + "animated": false, + "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/icon-style/elk/sketch.exp.svg b/e2etests/testdata/txtar/icon-style/elk/sketch.exp.svg new file mode 100644 index 000000000..7281fa4ab --- /dev/null +++ b/e2etests/testdata/txtar/icon-style/elk/sketch.exp.svg @@ -0,0 +1,95 @@ + lambda + + + \ No newline at end of file diff --git a/e2etests/txtar.txt b/e2etests/txtar.txt index ec6be2ce9..731562a89 100644 --- a/e2etests/txtar.txt +++ b/e2etests/txtar.txt @@ -171,6 +171,19 @@ a -> b: hi { style.underline: true } +-- icon-style -- + +lambda : { + icon: https://icons.terrastruct.com/aws%2FCompute%2FAWS-Lambda.svg + icon.style.border-radius: 20 +} + +lambda : { + shape: image + icon: https://icons.terrastruct.com/aws%2FCompute%2FAWS-Lambda.svg + icon.style.border-radius: 20 +} + -- none-fill -- vars: { @@ -776,6 +789,12 @@ b -> c: { icon: https://icons.terrastruct.com/essentials%2F213-alarm.svg } +direction: right +producer -> consumer: { + icon: https://icons.terrastruct.com/aws%2FApplication%20Integration%2FAmazon-Simple-Queue-Service-SQS.svg + icon.style.border-radius: 20 +} + -- model-view -- # Models user.style.fill: blue