From cddd1ba84a9fc7792483e30ddc32b2c88338c94f Mon Sep 17 00:00:00 2001 From: KIRCHSTH Date: Sun, 16 Jul 2023 01:17:23 +0200 Subject: [PATCH] Update C4-PlantUML to v2.7.0 --- C4/C4.puml | 83 ++++++++++++++++++++++- C4/C4_Component.puml | 28 ++------ C4/C4_Container.puml | 28 ++------ C4/C4_Context.puml | 46 +++++-------- C4/C4_Dynamic.puml | 92 +++++++++++--------------- C4/INFO | 2 +- C4/themes/puml-theme-C4_blue.puml | 55 +++++++++++++++ C4/themes/puml-theme-C4_brown.puml | 55 +++++++++++++++ C4/themes/puml-theme-C4_green.puml | 55 +++++++++++++++ C4/themes/puml-theme-C4_sandstone.puml | 23 +++++++ C4/themes/puml-theme-C4_superhero.puml | 23 +++++++ C4/themes/puml-theme-C4_united.puml | 23 +++++++ C4/themes/puml-theme-C4_violet.puml | 55 +++++++++++++++ 13 files changed, 434 insertions(+), 134 deletions(-) diff --git a/C4/C4.puml b/C4/C4.puml index 5c769258a..ca9408758 100644 --- a/C4/C4.puml +++ b/C4/C4.puml @@ -4,7 +4,7 @@ ' ################################## !function C4Version() ' 2 spaces and ' are used as unique marker, that the release scripts makes the correct version update - !$c4Version = "2.6.0" + !$c4Version = "2.7.0" !return $c4Version !end function @@ -132,6 +132,10 @@ skinparam queue { StereotypeFontSize $STEREOTYPE_FONT_SIZE } +skinparam participant { + StereotypeFontSize $STEREOTYPE_FONT_SIZE +} + skinparam arrow { Color $ARROW_COLOR FontColor $ARROW_FONT_COLOR @@ -353,6 +357,9 @@ skinparam package { !$tagSkin = $tagSkin + $elementTagSkinparams("person", $tagStereo, $bgColor, $fontColor, $borderColor, $shadowing, "") ' actor has style awesome, therefore $fontColor is ignored and text uses $bgColor too !$tagSkin = $tagSkin + $elementTagSkinparams("actor", $tagStereo, $bgColor, $bgColor, $borderColor, $shadowing, "") + ' sequence requires participant + !$tagSkin = $tagSkin + $elementTagSkinparams("participant", $tagStereo, $bgColor, $fontColor, $borderColor, $shadowing, "") + !$tagSkin = $tagSkin + $elementTagSkinparams("sequencebox", $tagStereo, $bgColor, $fontColor, $borderColor, $shadowing, "") !if (%strpos($tagStereo, "boundary") >= 0 && $bgColor != "") !$tagSkin = $tagSkin + "skinparam package<<" + $tagStereo + ">>StereotypeFontColor " + $bgColor + %newline() !$tagSkin = $tagSkin + "skinparam rectangle<<" + $tagStereo + ">>StereotypeFontColor " + $bgColor + %newline() @@ -893,8 +900,16 @@ $elementSkin !if (%strpos($text, "\n") >= 0) !while (%strpos($text, "\n") >= 0) !$brPos = %strpos($text, "\n") - !$multiLine = $multiLine + %substr($text, 0, $brPos) + $usedNewLine + !if ($brPos > 0) + !$multiLine = $multiLine + %substr($text, 0, $brPos) + $usedNewLine + !else + ' non breaking change that newLine breaks with formats can be used with \n\n + !$multiLine = $multiLine + "" + $usedNewLine + !endif !$text = %substr($text, $brPos+2) + !if (%strlen($text) == 0) + !$text = "" + !endif !endwhile !else !while ($width>0 && %strlen($text) > $width) @@ -965,6 +980,17 @@ $elementSkin !return $element !endfunction +!function $getElementLine($umlShape, $elementType, $alias, $label, $techn, $descr, $sprite, $tags, $link) + !$sprite=$toElementArg($sprite, $tags, "ElementTagSprite", $elementType) + !$techn=$toElementArg($techn, $tags, "ElementTagTechn", $elementType) + !$baseProp = $getElementBase($label, $techn, $descr, $sprite) + $getProps() + !$stereo = $toStereos($elementType,$tags) + !$calcLink = $getLink($link) + + !$line = $umlShape + " " + %chr(34) + $baseProp + %chr(34) +" " + $stereo + " as " + $alias + $calcLink + !return $line +!endfunction + ' Element properties ' ################################## @@ -1267,6 +1293,57 @@ rectangle "$getBoundary($label, $type)" $toStereos("boundary", $boundaryTags) as ' Boundary Styling UpdateBoundaryStyle("", $bgColor=$BOUNDARY_BG_COLOR, $fontColor=$BOUNDARY_COLOR, $borderColor=$BOUNDARY_COLOR) +' Index +' ################################## + +' Dynamic/Sequence diagram supports (automatically) numbered interactions: +' preferred function calls +' (Uppercase) LastIndex(): return the last used index (function which can be used as argument) +' (Uppercase) Index($offset=1): returns current index and calculates next index (function which can be used as argument) +' (Uppercase) SetIndex($new_index): returns new set index and calculates next index (function which can be used as argument) + +' old procedures calls +' (lowercase) increment($offset=1): increase current index (procedure which has no direct output) +' (lowercase) setIndex($new_index): set the new index (procedure which has no direct output) + +!$lastIndex = 0 +!$index = 1 + +!procedure increment($offset=1) + !$lastIndex = $index + !$index = $index + $offset +!endprocedure + +!procedure setIndex($new_index) + !$lastIndex = $index + !$index = $new_index +!endprocedure + +!function Index($offset=1) + !$lastIndex = $index + !$index = $lastIndex + $offset + !return $lastIndex +!endfunction + +!function LastIndex() + !return $lastIndex +!endfunction + +!function SetIndex($new_index, $offset=1) + !$lastIndex = $new_index + !$index = $new_index + $offset + !return $lastIndex +!endfunction + +!unquoted function $getPrefix($index) + !if ($index == "") + !$pre = Index() + ": " + !else + !$pre = $index + ": " + !endif + !return $pre +!endfunction + ' Relationship ' ################################## @@ -1438,7 +1515,7 @@ $from -[hidden]L- $to !endprocedure ' PlantUML bug: lines which does "not match" with the orientation/direction of the diagram -' uses the same length therefore the method offers no direction at all. +' use the same length therefore the method offers no direction at all. ' If a direction is required the Lay_...() methods can be used !unquoted procedure Lay_Distance($from, $to, $distance="0") $from $getHiddenLine($distance) $to diff --git a/C4/C4_Component.puml b/C4/C4_Component.puml index 1bf8e193b..8c7e9150d 100644 --- a/C4/C4_Component.puml +++ b/C4/C4_Component.puml @@ -53,42 +53,26 @@ endlegend ' Elements ' ################################## -!function $getComponent($label, $techn, $descr, $sprite) - !return $getElementBase($label, $techn, $descr, $sprite) -!endfunction - !unquoted procedure Component($alias, $label, $techn="", $descr="", $sprite="", $tags="", $link="") -!$sprite=$toElementArg($sprite, $tags, "ElementTagSprite", "component") -!$techn=$toElementArg($techn, $tags, "ElementTagTechn", "component") -rectangle "$getComponent($label, $techn, $descr, $sprite)$getProps()" $toStereos("component",$tags) as $alias $getLink($link) + $getElementLine("rectangle", "component", $alias, $label, $techn, $descr, $sprite, $tags, $link) !endprocedure !unquoted procedure ComponentDb($alias, $label, $techn="", $descr="", $sprite="", $tags="", $link="") -!$sprite=$toElementArg($sprite, $tags, "ElementTagSprite", "component") -!$techn=$toElementArg($techn, $tags, "ElementTagTechn", "component") -database "$getComponent($label, $techn, $descr, $sprite)$getProps()" $toStereos("component",$tags) as $alias $getLink($link) + $getElementLine("database", "component", $alias, $label, $techn, $descr, $sprite, $tags, $link) !endprocedure !unquoted procedure ComponentQueue($alias, $label, $techn="", $descr="", $sprite="", $tags="", $link="") -!$sprite=$toElementArg($sprite, $tags, "ElementTagSprite", "component") -!$techn=$toElementArg($techn, $tags, "ElementTagTechn", "component") -queue "$getComponent($label, $techn, $descr, $sprite)$getProps()" $toStereos("component",$tags) as $alias $getLink($link) + $getElementLine("queue", "component", $alias, $label, $techn, $descr, $sprite, $tags, $link) !endprocedure !unquoted procedure Component_Ext($alias, $label, $techn="", $descr="", $sprite="", $tags="", $link="") -!$sprite=$toElementArg($sprite, $tags, "ElementTagSprite", "external_component") -!$techn=$toElementArg($techn, $tags, "ElementTagTechn", "external_component") -rectangle "$getComponent($label, $techn, $descr, $sprite)$getProps()" $toStereos("external_component",$tags) as $alias $getLink($link) + $getElementLine("rectangle", "external_component", $alias, $label, $techn, $descr, $sprite, $tags, $link) !endprocedure !unquoted procedure ComponentDb_Ext($alias, $label, $techn="", $descr="", $sprite="", $tags="", $link="") -!$sprite=$toElementArg($sprite, $tags, "ElementTagSprite", "external_component") -!$techn=$toElementArg($techn, $tags, "ElementTagTechn", "external_component") -database "$getComponent($label, $techn, $descr, $sprite)$getProps()" $toStereos("external_component",$tags) as $alias $getLink($link) + $getElementLine("database", "external_component", $alias, $label, $techn, $descr, $sprite, $tags, $link) !endprocedure !unquoted procedure ComponentQueue_Ext($alias, $label, $techn="", $descr="", $sprite="", $tags="", $link="") -!$sprite=$toElementArg($sprite, $tags, "ElementTagSprite", "external_component") -!$techn=$toElementArg($techn, $tags, "ElementTagTechn", "external_component") -queue "$getComponent($label, $techn, $descr, $sprite)$getProps()" $toStereos("external_component",$tags) as $alias $getLink($link) + $getElementLine("queue", "external_component", $alias, $label, $techn, $descr, $sprite, $tags, $link) !endprocedure diff --git a/C4/C4_Container.puml b/C4/C4_Container.puml index 3b8eeeeb0..f584f8372 100644 --- a/C4/C4_Container.puml +++ b/C4/C4_Container.puml @@ -60,44 +60,28 @@ endlegend ' Elements ' ################################## -!function $getContainer($label, $techn, $descr, $sprite) - !return $getElementBase($label, $techn, $descr, $sprite) -!endfunction - !unquoted procedure Container($alias, $label, $techn="", $descr="", $sprite="", $tags="", $link="") -!$sprite=$toElementArg($sprite, $tags, "ElementTagSprite", "container") -!$techn=$toElementArg($techn, $tags, "ElementTagTechn", "container") -rectangle "$getContainer($label, $techn, $descr, $sprite)$getProps()" $toStereos("container", $tags) as $alias $getLink($link) + $getElementLine("rectangle", "container", $alias, $label, $techn, $descr, $sprite, $tags, $link) !endprocedure !unquoted procedure ContainerDb($alias, $label, $techn="", $descr="", $sprite="", $tags="", $link="") -!$sprite=$toElementArg($sprite, $tags, "ElementTagSprite", "container") -!$techn=$toElementArg($techn, $tags, "ElementTagTechn", "container") -database "$getContainer($label, $techn, $descr, $sprite)$getProps()" $toStereos("container", $tags) as $alias $getLink($link) + $getElementLine("database", "container", $alias, $label, $techn, $descr, $sprite, $tags, $link) !endprocedure !unquoted procedure ContainerQueue($alias, $label, $techn="", $descr="", $sprite="", $tags="", $link="") -!$sprite=$toElementArg($sprite, $tags, "ElementTagSprite", "container") -!$techn=$toElementArg($techn, $tags, "ElementTagTechn", "container") -queue "$getContainer($label, $techn, $descr, $sprite)$getProps()" $toStereos("container", $tags) as $alias $getLink($link) + $getElementLine("queue", "container", $alias, $label, $techn, $descr, $sprite, $tags, $link) !endprocedure !unquoted procedure Container_Ext($alias, $label, $techn="", $descr="", $sprite="", $tags="", $link="") -!$sprite=$toElementArg($sprite, $tags, "ElementTagSprite", "external_container") -!$techn=$toElementArg($techn, $tags, "ElementTagTechn", "external_container") -rectangle "$getContainer($label, $techn, $descr, $sprite)$getProps()" $toStereos("external_container", $tags) as $alias $getLink($link) + $getElementLine("rectangle", "external_container", $alias, $label, $techn, $descr, $sprite, $tags, $link) !endprocedure !unquoted procedure ContainerDb_Ext($alias, $label, $techn="", $descr="", $sprite="", $tags="", $link="") -!$sprite=$toElementArg($sprite, $tags, "ElementTagSprite", "external_container") -!$techn=$toElementArg($techn, $tags, "ElementTagTechn", "external_container") -database "$getContainer($label, $techn, $descr, $sprite)$getProps()" $toStereos("external_container", $tags) as $alias $getLink($link) + $getElementLine("database", "external_container", $alias, $label, $techn, $descr, $sprite, $tags, $link) !endprocedure !unquoted procedure ContainerQueue_Ext($alias, $label, $techn="", $descr="", $sprite="", $tags="", $link="") -!$sprite=$toElementArg($sprite, $tags, "ElementTagSprite", "external_container") -!$techn=$toElementArg($techn, $tags, "ElementTagTechn", "external_container") -queue "$getContainer($label, $techn, $descr, $sprite)$getProps()" $toStereos("external_container", $tags) as $alias $getLink($link) + $getElementLine("queue", "external_container", $alias, $label, $techn, $descr, $sprite, $tags, $link) !endprocedure ' Boundaries diff --git a/C4/C4_Context.puml b/C4/C4_Context.puml index 589c3a88c..5a6b22feb 100644 --- a/C4/C4_Context.puml +++ b/C4/C4_Context.puml @@ -349,10 +349,6 @@ UpdateElementStyle("external_person") !return $getElementBase($label, $type, $descr, $sprite) !endfunction -!function $getSystem($label, $type, $descr, $sprite) - !return $getElementBase($label, $type, $descr, $sprite) -!endfunction - !unquoted procedure Person($alias, $label, $descr="", $sprite="", $tags="", $link="", $type="") !$sprite=$toElementArg($sprite, $tags, "ElementTagSprite", "person") ' $type reuses $techn definition of $tags @@ -380,45 +376,33 @@ rectangle "$getPerson($label, $type, $descr, $sprite)$getProps()" $toStereos("ex !endprocedure !unquoted procedure System($alias, $label, $descr="", $sprite="", $tags="", $link="", $type="") -!$sprite=$toElementArg($sprite, $tags, "ElementTagSprite", "system") -' $type reuses $techn definition of $tags -!$type=$toElementArg($type, $tags, "ElementTagTechn", "system") -rectangle "$getSystem($label, $type, $descr, $sprite)$getProps()" $toStereos("system", $tags) as $alias $getLink($link) -!endprocedure - -!unquoted procedure System_Ext($alias, $label, $descr="", $sprite="", $tags="", $link="", $type="") -!$sprite=$toElementArg($sprite, $tags, "ElementTagSprite", "external_system") -' $type reuses $techn definition of $tags -!$type=$toElementArg($type, $tags, "ElementTagTechn", "external_system") -rectangle "$getSystem($label, $type, $descr, $sprite)$getProps()" $toStereos("external_system", $tags) as $alias $getLink($link) + ' $type reuses $techn definition of $tags + $getElementLine("rectangle", "system", $alias, $label, $type, $descr, $sprite, $tags, $link) !endprocedure !unquoted procedure SystemDb($alias, $label, $descr="", $sprite="", $tags="", $link="", $type="") -!$sprite=$toElementArg($sprite, $tags, "ElementTagSprite", "system") -' $type reuses $techn definition of $tags -!$type=$toElementArg($type, $tags, "ElementTagTechn", "system") -database "$getSystem($label, $type, $descr, $sprite)$getProps()" $toStereos("system", $tags) as $alias $getLink($link) + ' $type reuses $techn definition of $tags + $getElementLine("database", "system", $alias, $label, $type, $descr, $sprite, $tags, $link) !endprocedure !unquoted procedure SystemQueue($alias, $label, $descr="", $sprite="", $tags="", $link="", $type="") -!$sprite=$toElementArg($sprite, $tags, "ElementTagSprite", "system") -' $type reuses $techn definition of $tags -!$type=$toElementArg($type, $tags, "ElementTagTechn", "system") -queue "$getSystem($label, $type, $descr, $sprite)$getProps()" $toStereos("system", $tags) as $alias $getLink($link) + ' $type reuses $techn definition of $tags + $getElementLine("queue", "system", $alias, $label, $type, $descr, $sprite, $tags, $link) +!endprocedure + +!unquoted procedure System_Ext($alias, $label, $descr="", $sprite="", $tags="", $link="", $type="") + ' $type reuses $techn definition of $tags + $getElementLine("rectangle", "external_system", $alias, $label, $type, $descr, $sprite, $tags, $link) !endprocedure !unquoted procedure SystemDb_Ext($alias, $label, $descr="", $sprite="", $tags="", $link="", $type="") -!$sprite=$toElementArg($sprite, $tags, "ElementTagSprite", "external_system") -' $type reuses $techn definition of $tags -!$type=$toElementArg($type, $tags, "ElementTagTechn", "external_system") -database "$getSystem($label, $type, $descr, $sprite)$getProps()" $toStereos("external_system", $tags) as $alias $getLink($link) + ' $type reuses $techn definition of $tags + $getElementLine("database", "external_system", $alias, $label, $type, $descr, $sprite, $tags, $link) !endprocedure !unquoted procedure SystemQueue_Ext($alias, $label, $descr="", $sprite="", $tags="", $link="", $type="") -!$sprite=$toElementArg($sprite, $tags, "ElementTagSprite", "external_system") -' $type reuses $techn definition of $tags -!$type=$toElementArg($type, $tags, "ElementTagTechn", "external_system") -queue "$getSystem($label, $type, $descr, $sprite)$getProps()" $toStereos("external_system", $tags) as $alias $getLink($link) + ' $type reuses $techn definition of $tags + $getElementLine("queue", "external_system", $alias, $label, $type, $descr, $sprite, $tags, $link) !endprocedure ' Boundaries diff --git a/C4/C4_Dynamic.puml b/C4/C4_Dynamic.puml index 77d56947e..8e81cd3b4 100644 --- a/C4/C4_Dynamic.puml +++ b/C4/C4_Dynamic.puml @@ -15,38 +15,6 @@ ' (Uppercase) Index($offset=1): returns current index and calculates next index (function which can be used as argument) ' (Uppercase) SetIndex($new_index): returns new set index and calculates next index (function which can be used as argument) -' Index -' ################################## - -!$lastIndex = 0 -!$index = 1 - -!procedure increment($offset=1) - !$lastIndex = $index - !$index = $index + $offset -!endprocedure - -!procedure setIndex($new_index) - !$lastIndex = $index - !$index = $new_index -!endprocedure - -!function Index($offset=1) - !$lastIndex = $index - !$index = $lastIndex + $offset - !return $lastIndex -!endfunction - -!function LastIndex() - !return $lastIndex -!endfunction - -!function SetIndex($new_index, $offset=1) - !$lastIndex = $new_index - !$index = $new_index + $offset - !return $lastIndex -!endfunction - ' Relationship override ' ################################## @@ -60,39 +28,47 @@ $getRel($direction, $alias1, $alias2, $e_index + ": " + $label, "", "", "", "", $getRel($direction, $alias1, $alias2, $e_index + ": " + $label, $techn, "", "", "", "") !endprocedure -!unquoted procedure Rel($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") -$getRel("-->>", $from, $to, Index() + ": " + $label, $techn, $descr, $sprite, $tags, $link) +' all RelIndex... calls are outdated, Rel(..., $index=...) calls should be used !!!! + +!unquoted procedure Rel($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="", $index="") +!$pre = $getPrefix($index) +$getRel("-->>", $from, $to, $pre + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure !unquoted procedure RelIndex($e_index, $from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") $getRel("-->>", $from, $to, $e_index + ": " + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure -!unquoted procedure Rel_Back($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") -$getRel("<<--", $from, $to, Index() + ": " + $label, $techn, $descr, $sprite, $tags, $link) +!unquoted procedure Rel_Back($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="", $index="") +!$pre = $getPrefix($index) +$getRel("<<--", $from, $to, $pre + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure !unquoted procedure RelIndex_Back($e_index, $from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") $getRel("<<--", $from, $to, $e_index + ": " + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure -!unquoted procedure Rel_Neighbor($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") -$getRel("->>", $from, $to, Index() + ": " + $label, $techn, $descr, $sprite, $tags, $link) +!unquoted procedure Rel_Neighbor($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="", $index="") +!$pre = $getPrefix($index) +$getRel("->>", $from, $to, $pre + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure !unquoted procedure RelIndex_Neighbor($e_index, $from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") $getRel("->>", $from, $to, $e_index + ": " + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure -!unquoted procedure Rel_Back_Neighbor($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") -$getRel("<<-", $from, $to, Index() + ": " + $label, $techn, $descr, $sprite, $tags, $link) +!unquoted procedure Rel_Back_Neighbor($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="", $index="") +!$pre = $getPrefix($index) +$getRel("<<-", $from, $to, $pre + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure !unquoted procedure RelIndex_Back_Neighbor($e_index, $from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") $getRel("<<-", $from, $to, $e_index + ": " + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure -!unquoted procedure Rel_D($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") -$getRel($down("-","->>"), $from, $to, Index() + ": " + $label, $techn, $descr, $sprite, $tags, $link) +!unquoted procedure Rel_D($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="", $index="") +!$pre = $getPrefix($index) +$getRel($down("-","->>"), $from, $to, $pre + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure -!unquoted procedure Rel_Down($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") -$getRel($down("-","->>"), $from, $to, Index() + ": " + $label, $techn, $descr, $sprite, $tags, $link) +!unquoted procedure Rel_Down($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="", $index="") +!$pre = $getPrefix($index) +$getRel($down("-","->>"), $from, $to, $pre + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure !unquoted procedure RelIndex_D($e_index, $from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") $getRel($down("-","->>"), $from, $to, $e_index + ": " + $label, $techn, $descr, $sprite, $tags, $link) @@ -101,11 +77,13 @@ $getRel($down("-","->>"), $from, $to, $e_index + ": " + $label, $techn, $descr, $getRel($down("-","->>"), $from, $to, $e_index + ": " + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure -!unquoted procedure Rel_U($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") -$getRel($up("-","->>"), $from, $to, Index() + ": " + $label, $techn, $descr, $sprite, $tags, $link) +!unquoted procedure Rel_U($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="", $index="") +!$pre = $getPrefix($index) +$getRel($up("-","->>"), $from, $to, $pre + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure -!unquoted procedure Rel_Up($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") -$getRel($up("-","->>"), $from, $to, Index() + ": " + $label, $techn, $descr, $sprite, $tags, $link) +!unquoted procedure Rel_Up($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="", $index="") +!$pre = $getPrefix($index) +$getRel($up("-","->>"), $from, $to, $pre + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure !unquoted procedure RelIndex_U($e_index, $from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") $getRel($up("-","->>"), $from, $to, $e_index + ": " + $label, $techn, $descr, $sprite, $tags, $link) @@ -114,11 +92,13 @@ $getRel($up("-","->>"), $from, $to, $e_index + ": " + $label, $techn, $descr, $s $getRel($up("-","->>"), $from, $to, $e_index + ": " + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure -!unquoted procedure Rel_L($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") -$getRel($left("-","->>"), $from, $to, Index() + ": " + $label, $techn, $descr, $sprite, $tags, $link) +!unquoted procedure Rel_L($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="", $index="") +!$pre = $getPrefix($index) +$getRel($left("-","->>"), $from, $to, $pre + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure !unquoted procedure Rel_Left($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") -$getRel($left("-","->>"), $from, $to, Index() + ": " + $label, $techn, $descr, $sprite, $tags, $link) +!$pre = $getPrefix($index) +$getRel($left("-","->>"), $from, $to, $pre + $label, $techn, $descr, $sprite, $tags, $link, $index="") !endprocedure !unquoted procedure RelIndex_L($e_index, $from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") $getRel($left("-","->>"), $from, $to, $e_index + ": " + $label, $techn, $descr, $sprite, $tags, $link) @@ -127,11 +107,13 @@ $getRel($left("-","->>"), $from, $to, $e_index + ": " + $label, $techn, $descr, $getRel($left("-","->>"), $from, $to, $e_index + ": " + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure -!unquoted procedure Rel_R($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") -$getRel($right("-","->>"), $from, $to, Index() + ": " + $label, $techn, $descr, $sprite, $tags, $link) +!unquoted procedure Rel_R($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="", $index="") +!$pre = $getPrefix($index) +$getRel($right("-","->>"), $from, $to, $pre + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure -!unquoted procedure Rel_Right($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") -$getRel($right("-","->>"), $from, $to, Index() + ": " + $label, $techn, $descr, $sprite, $tags, $link) +!unquoted procedure Rel_Right($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="", $index="") +!$pre = $getPrefix($index) +$getRel($right("-","->>"), $from, $to, $pre + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure !unquoted procedure RelIndex_R($e_index, $from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") $getRel($right("-","->>"), $from, $to, $e_index + ": " + $label, $techn, $descr, $sprite, $tags, $link) diff --git a/C4/INFO b/C4/INFO index bb196692b..49e3c220e 100644 --- a/C4/INFO +++ b/C4/INFO @@ -1,2 +1,2 @@ -VERSION=2.6.0 +VERSION=2.7.0 SOURCE=https://github.com/plantuml-stdlib/C4-PlantUML diff --git a/C4/themes/puml-theme-C4_blue.puml b/C4/themes/puml-theme-C4_blue.puml index 504be3ffc..5172351ca 100644 --- a/C4/themes/puml-theme-C4_blue.puml +++ b/C4/themes/puml-theme-C4_blue.puml @@ -30,3 +30,58 @@ !$EXTERNAL_COMPONENT_BG_COLOR ?= "#CCCCCC" !$EXTERNAL_COMPONENT_BORDER_COLOR ?= "#BFBFBF" + +' <<<<<<<<<<<<< sequence diagram is styled via skinparam and style + +' $BOUNDARY_BG_COLOR... have to be defined in theme itself that it can be used in styles,... +' (no default values which are defined in C4.puml) +' If skinparams and styles are defined with concrete values no variables are required +!$BOUNDARY_BG_COLOR ?= "transparent" +!$BOUNDARY_COLOR ?= "#444444" +!$ARROW_COLOR ?= "#666666" + +' replace transparent with concrete background that it can be used as font color too +!if ($BOUNDARY_BG_COLOR == "transparent") + !$SEQUENCE_BG_COLOR = white +!else + !$SEQUENCE_BG_COLOR = $BOUNDARY_BG_COLOR +!endif + +' "C4 styled" default is no foot boxes +hide footbox +' "C4 styled" default is that lifeline is arrow color +skinparam SequenceLifelineBorderColor $ARROW_COLOR + +skinparam SequenceGroupBodyBackgroundColor $SEQUENCE_BG_COLOR +skinparam SequenceGroupFontColor $BOUNDARY_COLOR +skinparam SequenceGroupBackgroundColor $BOUNDARY_COLOR +skinparam SequenceGroupHeaderFontColor $SEQUENCE_BG_COLOR +skinparam SequenceGroupBorderColor $BOUNDARY_COLOR + +skinparam SequenceReferenceBackgroundColor $SEQUENCE_BG_COLOR +skinparam SequenceReferenceFontColor $BOUNDARY_COLOR +skinparam SequenceReferenceHeaderBackgroundColor $BOUNDARY_COLOR +' VIA STYLE +' skinparam SequenceReferenceHeaderFontColor $SEQUENCE_BG_COLOR + +skinparam SequenceReferenceBorderColor $BOUNDARY_COLOR + +skinparam SequenceDividerBackgroundColor $SEQUENCE_BG_COLOR +skinparam SequenceDividerFontColor $BOUNDARY_COLOR +skinparam SequenceDividerBorderColor $BOUNDARY_COLOR + +' VIA STYLE +' skinparam SequenceDelayFontColor green + + +' <<<<<<<<<<<<< end sequence diagram diff --git a/C4/themes/puml-theme-C4_brown.puml b/C4/themes/puml-theme-C4_brown.puml index 28d0dfd5c..9428ec990 100644 --- a/C4/themes/puml-theme-C4_brown.puml +++ b/C4/themes/puml-theme-C4_brown.puml @@ -30,3 +30,58 @@ !$EXTERNAL_COMPONENT_BG_COLOR ?= "#CCCCCC" !$EXTERNAL_COMPONENT_BORDER_COLOR ?= "#BFBFBF" +' <<<<<<<<<<<<< sequence diagram is styled via skinparam and style + +' $BOUNDARY_BG_COLOR... have to be defined in theme itself that it can be used in styles,... +' (no default values which are defined in C4.puml) +' If skinparams and styles are defined with concrete values no variables are required +!$BOUNDARY_BG_COLOR ?= "transparent" +!$BOUNDARY_COLOR ?= "#444444" +!$ARROW_COLOR ?= "#666666" + +' replace transparent with concrete background that it can be used as font color too +!if ($BOUNDARY_BG_COLOR == "transparent") + !$SEQUENCE_BG_COLOR = white +!else + !$SEQUENCE_BG_COLOR = $BOUNDARY_BG_COLOR +!endif + +' "C4 styled" default is no foot boxes +hide footbox +' "C4 styled" default is that lifeline is arrow color +skinparam SequenceLifelineBorderColor $ARROW_COLOR + +skinparam SequenceGroupBodyBackgroundColor $SEQUENCE_BG_COLOR +skinparam SequenceGroupFontColor $BOUNDARY_COLOR +skinparam SequenceGroupBackgroundColor $BOUNDARY_COLOR +skinparam SequenceGroupHeaderFontColor $SEQUENCE_BG_COLOR +skinparam SequenceGroupBorderColor $BOUNDARY_COLOR + +skinparam SequenceReferenceBackgroundColor $SEQUENCE_BG_COLOR +skinparam SequenceReferenceFontColor $BOUNDARY_COLOR +skinparam SequenceReferenceHeaderBackgroundColor $BOUNDARY_COLOR +' VIA STYLE +' skinparam SequenceReferenceHeaderFontColor $SEQUENCE_BG_COLOR + +skinparam SequenceReferenceBorderColor $BOUNDARY_COLOR + +skinparam SequenceDividerBackgroundColor $SEQUENCE_BG_COLOR +skinparam SequenceDividerFontColor $BOUNDARY_COLOR +skinparam SequenceDividerBorderColor $BOUNDARY_COLOR + +' VIA STYLE +' skinparam SequenceDelayFontColor green + + +' <<<<<<<<<<<<< end sequence diagram + diff --git a/C4/themes/puml-theme-C4_green.puml b/C4/themes/puml-theme-C4_green.puml index ef95b97dc..0e73a6b77 100644 --- a/C4/themes/puml-theme-C4_green.puml +++ b/C4/themes/puml-theme-C4_green.puml @@ -30,3 +30,58 @@ !$EXTERNAL_COMPONENT_BG_COLOR ?= "#CCCCCC" !$EXTERNAL_COMPONENT_BORDER_COLOR ?= "#BFBFBF" +' <<<<<<<<<<<<< sequence diagram is styled via skinparam and style + +' $BOUNDARY_BG_COLOR... have to be defined in theme itself that it can be used in styles,... +' (no default values which are defined in C4.puml) +' If skinparams and styles are defined with concrete values no variables are required +!$BOUNDARY_BG_COLOR ?= "transparent" +!$BOUNDARY_COLOR ?= "#444444" +!$ARROW_COLOR ?= "#666666" + +' replace transparent with concrete background that it can be used as font color too +!if ($BOUNDARY_BG_COLOR == "transparent") + !$SEQUENCE_BG_COLOR = white +!else + !$SEQUENCE_BG_COLOR = $BOUNDARY_BG_COLOR +!endif + +' "C4 styled" default is no foot boxes +hide footbox +' "C4 styled" default is that lifeline is arrow color +skinparam SequenceLifelineBorderColor $ARROW_COLOR + +skinparam SequenceGroupBodyBackgroundColor $SEQUENCE_BG_COLOR +skinparam SequenceGroupFontColor $BOUNDARY_COLOR +skinparam SequenceGroupBackgroundColor $BOUNDARY_COLOR +skinparam SequenceGroupHeaderFontColor $SEQUENCE_BG_COLOR +skinparam SequenceGroupBorderColor $BOUNDARY_COLOR + +skinparam SequenceReferenceBackgroundColor $SEQUENCE_BG_COLOR +skinparam SequenceReferenceFontColor $BOUNDARY_COLOR +skinparam SequenceReferenceHeaderBackgroundColor $BOUNDARY_COLOR +' VIA STYLE +' skinparam SequenceReferenceHeaderFontColor $SEQUENCE_BG_COLOR + +skinparam SequenceReferenceBorderColor $BOUNDARY_COLOR + +skinparam SequenceDividerBackgroundColor $SEQUENCE_BG_COLOR +skinparam SequenceDividerFontColor $BOUNDARY_COLOR +skinparam SequenceDividerBorderColor $BOUNDARY_COLOR + +' VIA STYLE +' skinparam SequenceDelayFontColor green + + +' <<<<<<<<<<<<< end sequence diagram + diff --git a/C4/themes/puml-theme-C4_sandstone.puml b/C4/themes/puml-theme-C4_sandstone.puml index 5ffd1c67f..583c5be24 100644 --- a/C4/themes/puml-theme-C4_sandstone.puml +++ b/C4/themes/puml-theme-C4_sandstone.puml @@ -57,3 +57,26 @@ !$LEGEND_FONT_COLOR ?= $LIGHT !$LEGEND_BG_COLOR ?= $SECONDARY !$LEGEND_BORDER_COLOR ?= $SECONDARY_DARK + +' <<<<<<<<<<<<< sequence diagram is styled via skinparam and style + +' "C4 styled" default is no foot boxes +hide footbox + +' fix wrong ReferenceHeaderFontColor + + +' fix invisible SequenceDelayFontColor + + +' <<<<<<<<<<<<< end sequence diagram diff --git a/C4/themes/puml-theme-C4_superhero.puml b/C4/themes/puml-theme-C4_superhero.puml index 0f2cddf1f..1b5aa5b2a 100644 --- a/C4/themes/puml-theme-C4_superhero.puml +++ b/C4/themes/puml-theme-C4_superhero.puml @@ -59,3 +59,26 @@ !$LEGEND_FONT_COLOR ?= $LIGHT !$LEGEND_BG_COLOR ?= $SECONDARY !$LEGEND_BORDER_COLOR ?= $SECONDARY_DARK + +' <<<<<<<<<<<<< sequence diagram is styled via skinparam and style + +' "C4 styled" default is no foot boxes +hide footbox + +' fix wrong ReferenceHeaderFontColor + + +' fix invisible SequenceDelayFontColor + + +' <<<<<<<<<<<<< end sequence diagram diff --git a/C4/themes/puml-theme-C4_united.puml b/C4/themes/puml-theme-C4_united.puml index 4c558a183..74d3855b2 100644 --- a/C4/themes/puml-theme-C4_united.puml +++ b/C4/themes/puml-theme-C4_united.puml @@ -57,3 +57,26 @@ !$LEGEND_FONT_COLOR ?= $LIGHT !$LEGEND_BG_COLOR ?= $SECONDARY !$LEGEND_BORDER_COLOR ?= $SECONDARY_DARK + +' <<<<<<<<<<<<< sequence diagram is styled via skinparam and style + +' "C4 styled" default is no foot boxes +hide footbox + +' fix wrong ReferenceHeaderFontColor + + +' fix invisible SequenceDelayFontColor + + +' <<<<<<<<<<<<< end sequence diagram diff --git a/C4/themes/puml-theme-C4_violet.puml b/C4/themes/puml-theme-C4_violet.puml index ae6b4939d..be9fb7b0f 100644 --- a/C4/themes/puml-theme-C4_violet.puml +++ b/C4/themes/puml-theme-C4_violet.puml @@ -30,3 +30,58 @@ !$EXTERNAL_COMPONENT_BG_COLOR ?= "#CCCCCC" !$EXTERNAL_COMPONENT_BORDER_COLOR ?= "#BFBFBF" +' <<<<<<<<<<<<< sequence diagram is styled via skinparam and style + +' $BOUNDARY_BG_COLOR... have to be defined in theme itself that it can be used in styles,... +' (no default values which are defined in C4.puml) +' If skinparams and styles are defined with concrete values no variables are required +!$BOUNDARY_BG_COLOR ?= "transparent" +!$BOUNDARY_COLOR ?= "#444444" +!$ARROW_COLOR ?= "#666666" + +' replace transparent with concrete background that it can be used as font color too +!if ($BOUNDARY_BG_COLOR == "transparent") + !$SEQUENCE_BG_COLOR = white +!else + !$SEQUENCE_BG_COLOR = $BOUNDARY_BG_COLOR +!endif + +' "C4 styled" default is no foot boxes +hide footbox +' "C4 styled" default is that lifeline is arrow color +skinparam SequenceLifelineBorderColor $ARROW_COLOR + +skinparam SequenceGroupBodyBackgroundColor $SEQUENCE_BG_COLOR +skinparam SequenceGroupFontColor $BOUNDARY_COLOR +skinparam SequenceGroupBackgroundColor $BOUNDARY_COLOR +skinparam SequenceGroupHeaderFontColor $SEQUENCE_BG_COLOR +skinparam SequenceGroupBorderColor $BOUNDARY_COLOR + +skinparam SequenceReferenceBackgroundColor $SEQUENCE_BG_COLOR +skinparam SequenceReferenceFontColor $BOUNDARY_COLOR +skinparam SequenceReferenceHeaderBackgroundColor $BOUNDARY_COLOR +' VIA STYLE +' skinparam SequenceReferenceHeaderFontColor $SEQUENCE_BG_COLOR + +skinparam SequenceReferenceBorderColor $BOUNDARY_COLOR + +skinparam SequenceDividerBackgroundColor $SEQUENCE_BG_COLOR +skinparam SequenceDividerFontColor $BOUNDARY_COLOR +skinparam SequenceDividerBorderColor $BOUNDARY_COLOR + +' VIA STYLE +' skinparam SequenceDelayFontColor green + + +' <<<<<<<<<<<<< end sequence diagram +