From e29c3d612504edf83864ad000ede78be3cf64e1f Mon Sep 17 00:00:00 2001 From: ashishj Date: Tue, 14 Jun 2022 20:36:26 +0200 Subject: [PATCH 01/24] #3095 Added support for commit & tag label font size --- docs/gitgraph.md | 56 +++++++++++++++++++++++++++++++++++++ src/diagrams/git/styles.js | 8 ++++-- src/themes/theme-base.js | 2 ++ src/themes/theme-dark.js | 2 ++ src/themes/theme-default.js | 2 ++ src/themes/theme-forest.js | 2 ++ src/themes/theme-neutral.js | 2 ++ 7 files changed, 71 insertions(+), 3 deletions(-) diff --git a/docs/gitgraph.md b/docs/gitgraph.md index fe8f9b05a0..3bd3b29694 100644 --- a/docs/gitgraph.md +++ b/docs/gitgraph.md @@ -819,6 +819,62 @@ Now let's override the default values for the `commitLabelColor` to `commitLabel ``` See how the commit label color and background color are changed to the values specified in the theme variables. + +### Customizing Commit Label Font Size +You can customize commit using the `commitLabelFontSize` theme variables for changing in the font soze of the commit label . + +Example: +Now let's override the default values for the `commitLabelFontSize` variable: + +```mermaid-example + %%{init: { 'logLevel': 'debug', 'theme': 'default' , 'themeVariables': { + 'commitLabelColor': '#ff0000', + 'commitLabelBackground': '#00ff00', + 'commitLabelFontSize': '16px' + } } }%% + gitGraph + commit + branch develop + commit tag:"v1.0.0" + commit + checkout main + commit type: HIGHLIGHT + commit + merge develop + commit + branch featureA + commit + +``` +See how the commit label font size changed. + +### Customizing Tag Label Font Size +You can customize commit using the `tagLabelFontSize` theme variables for changing in the font soze of the tag label . + +Example: +Now let's override the default values for the `tagLabelFontSize` variable: + +```mermaid-example + %%{init: { 'logLevel': 'debug', 'theme': 'default' , 'themeVariables': { + 'commitLabelColor': '#ff0000', + 'commitLabelBackground': '#00ff00', + 'tagLabelFontSize': '16px' + } } }%% + gitGraph + commit + branch develop + commit tag:"v1.0.0" + commit + checkout main + commit type: HIGHLIGHT + commit + merge develop + commit + branch featureA + commit + +``` +See how the tag label font size changed. ### Customizing Tag colors You can customize tag using the `tagLabelColor`,`tagLabelBackground` and `tagLabelBorder` theme variables for changes in the tag label color,tag label background color and tag label border respectively. Example: diff --git a/src/diagrams/git/styles.js b/src/diagrams/git/styles.js index 203af8c7df..7e09ff7e0e 100644 --- a/src/diagrams/git/styles.js +++ b/src/diagrams/git/styles.js @@ -26,9 +26,11 @@ const getStyles = (options) => stroke: ${options.lineColor}; stroke-dasharray: 2; } - .commit-label { font-size: 10px; fill: ${options.commitLabelColor};} - .commit-label-bkg { font-size: 10px; fill: ${options.commitLabelBackground}; opacity: 0.5; } - .tag-label { font-size: 10px; fill: ${options.tagLabelColor};} + .commit-label { font-size: ${options.commitLabelFontSize}; fill: ${options.commitLabelColor};} + .commit-label-bkg { font-size: ${options.commitLabelFontSize}; fill: ${ + options.commitLabelBackground + }; opacity: 0.5; } + .tag-label { font-size: ${options.tagLabelFontSize}; fill: ${options.tagLabelColor};} .tag-label-bkg { fill: ${options.tagLabelBackground}; stroke: ${options.tagLabelBorder}; } .tag-hole { fill: ${options.textColor}; } diff --git a/src/themes/theme-base.js b/src/themes/theme-base.js index 551103ee3a..35feae00e4 100644 --- a/src/themes/theme-base.js +++ b/src/themes/theme-base.js @@ -215,8 +215,10 @@ class Theme { this.tagLabelColor = this.tagLabelColor || this.primaryTextColor; this.tagLabelBackground = this.tagLabelBackground || this.primaryColor; this.tagLabelBorder = this.tagBorder || this.primaryBorderColor; + this.tagLabelFontSize = this.tagLabelFontSize || '10px'; this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor; this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor; + this.commitLabelFontSize = this.commitLabelFontSize || '10px'; } calculate(overrides) { if (typeof overrides !== 'object') { diff --git a/src/themes/theme-dark.js b/src/themes/theme-dark.js index ecccaa8769..a8b4c54772 100644 --- a/src/themes/theme-dark.js +++ b/src/themes/theme-dark.js @@ -214,8 +214,10 @@ class Theme { this.tagLabelColor = this.tagLabelColor || this.primaryTextColor; this.tagLabelBackground = this.tagLabelBackground || this.primaryColor; this.tagLabelBorder = this.tagBorder || this.primaryBorderColor; + this.tagLabelFontSize = this.tagLabelFontSize || '10px'; this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor; this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor; + this.commitLabelFontSize = this.commitLabelFontSize || '10px'; } calculate(overrides) { if (typeof overrides !== 'object') { diff --git a/src/themes/theme-default.js b/src/themes/theme-default.js index a91a9a249e..0d7939618a 100644 --- a/src/themes/theme-default.js +++ b/src/themes/theme-default.js @@ -253,8 +253,10 @@ class Theme { this.tagLabelColor = this.tagLabelColor || this.primaryTextColor; this.tagLabelBackground = this.tagLabelBackground || this.primaryColor; this.tagLabelBorder = this.tagBorder || this.primaryBorderColor; + this.tagLabelFontSize = this.tagLabelFontSize || '10px'; this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor; this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor; + this.commitLabelFontSize = this.commitLabelFontSize || '10px'; } calculate(overrides) { if (typeof overrides !== 'object') { diff --git a/src/themes/theme-forest.js b/src/themes/theme-forest.js index b92291d2a1..7f2566de39 100644 --- a/src/themes/theme-forest.js +++ b/src/themes/theme-forest.js @@ -215,8 +215,10 @@ class Theme { this.tagLabelColor = this.tagLabelColor || this.primaryTextColor; this.tagLabelBackground = this.tagLabelBackground || this.primaryColor; this.tagLabelBorder = this.tagBorder || this.primaryBorderColor; + this.tagLabelFontSize = this.tagLabelFontSize || '10px'; this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor; this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor; + this.commitLabelFontSize = this.commitLabelFontSize || '10px'; } calculate(overrides) { if (typeof overrides !== 'object') { diff --git a/src/themes/theme-neutral.js b/src/themes/theme-neutral.js index 78873392ef..9c1ad5d1b0 100644 --- a/src/themes/theme-neutral.js +++ b/src/themes/theme-neutral.js @@ -257,8 +257,10 @@ class Theme { this.tagLabelColor = this.tagLabelColor || this.primaryTextColor; this.tagLabelBackground = this.tagLabelBackground || this.primaryColor; this.tagLabelBorder = this.tagBorder || this.primaryBorderColor; + this.tagLabelFontSize = this.tagLabelFontSize || '10px'; this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor; this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor; + this.commitLabelFontSize = this.commitLabelFontSize || '10px'; } calculate(overrides) { if (typeof overrides !== 'object') { From 546eb285c42d748da6ee075fa027471f80d895bf Mon Sep 17 00:00:00 2001 From: pinghe Date: Sat, 18 Jun 2022 22:43:07 +0800 Subject: [PATCH 02/24] C4 diagram is fixed style, such as css color, so different css is not provided under different skins. updateElementStyle and UpdateElementStyle are written in the diagram last part. updateElementStyle is inconsistent with the original definition and updates the style of the relationship, including the offset of the text label relative to the original position. - [ ] Custom tags/stereotypes support and skinparam updates - - [ ] AddElementTag(tagStereo, ?bgColor, ?fontColor, ?borderColor, ?shadowing, ?shape, ?sprite, ?techn, ?legendText, ?legendSprite): Introduces a new element tag. The styles of the tagged elements are updated and the tag is displayed in the calculated legend. - - [ ] AddRelTag(tagStereo, ?textColor, ?lineColor, ?lineStyle, ?sprite, ?techn, ?legendText, ?legendSprite): Introduces a new Relationship tag. The styles of the tagged relationships are updated and the tag is displayed in the calculated legend. - - [X] UpdateElementStyle(elementName, ?bgColor, ?fontColor, ?borderColor, ?shadowing, ?shape, ?sprite, ?techn, ?legendText, ?legendSprite): This call updates the default style of the elements (component, ...) and creates no additional legend entry. - - [X] UpdateRelStyle(from, to, textColor, lineColor, ?offsetX, ?offsetY): This call updates the default relationship colors and creates no additional legend entry. Two new parameters, offsetX and offsetY, are added to set the offset of the original position of the text. - - [ ] RoundedBoxShape(): This call returns the name of the rounded box shape and can be used as ?shape argument. - - [ ] EightSidedShape(): This call returns the name of the eight sided shape and can be used as ?shape argument. - - [ ] DashedLine(): This call returns the name of the dashed line and can be used as ?lineStyle argument. - - [ ] DottedLine(): This call returns the name of the dotted line and can be used as ?lineStyle argument. - - [ ] BoldLine(): This call returns the name of the bold line and can be used as ?lineStyle argument. - - [X] UpdateLayoutConfig(?c4ShapeInRow, ?c4BoundaryInRow): New. This call updates the default c4ShapeInRow(4) and c4BoundaryInRow(2). --- demos/index.html | 26 +- src/defaultConfig.js | 368 ++++++++++++++++++++++- src/diagrams/c4/c4Db.js | 397 ++++++++++++++++++++++--- src/diagrams/c4/c4Renderer.js | 15 +- src/diagrams/c4/parser/c4Diagram.jison | 54 +++- src/diagrams/c4/svgDraw.js | 59 ++-- 6 files changed, 850 insertions(+), 69 deletions(-) diff --git a/demos/index.html b/demos/index.html index 0abe627a71..ccf9cdf2a9 100644 --- a/demos/index.html +++ b/demos/index.html @@ -20,6 +20,7 @@
+
C4Context title System Context diagram for Internet Banking System @@ -55,14 +56,22 @@ BiRel(SystemAA, SystemE, "Uses") Rel(SystemAA, SystemC, "Sends e-mails", "SMTP") Rel(SystemC, customerA, "Sends e-mails to") + + UpdateElementStyle(customerA, $fontColor="red", $bgColor="grey", $borderColor="red") + UpdateRelStyle(customerA, SystemAA, $textColor="blue", $lineColor="blue", $offsetX="5") + UpdateRelStyle(SystemAA, SystemE, $textColor="blue", $lineColor="blue", $offsetY="-10") + UpdateRelStyle(SystemAA, SystemC, $textColor="blue", $lineColor="blue", $offsetY="-40", $offsetX="-50") + UpdateRelStyle(SystemC, customerA, $textColor="red", $lineColor="red", $offsetX="-50", $offsetY="20") + + UpdateLayoutConfig($c4ShapeInRow="3", $c4BoundaryInRow="1")
C4Container title Container diagram for Internet Banking System - System_Ext(email_system, "E-Mail System", "The internal Microsoft Exchange system") - Person(customer, Customer, "A customer of the bank, with personal bank accounts") + System_Ext(email_system, "E-Mail System", "The internal Microsoft Exchange system", $tags="v1.0") + Person(customer, Customer, "A customer of the bank, with personal bank accounts", $tags="v1.0") Container_Boundary(c1, "Internet Banking") { Container(spa, "Single-Page App", "JavaScript, Angular", "Provides all the Internet banking functionality to cutomers via their web browser") @@ -76,17 +85,26 @@ System_Ext(banking_system, "Mainframe Banking System", "Stores all of the core banking information about customers, accounts, transactions, etc.") Rel(customer, web_app, "Uses", "HTTPS") + UpdateRelStyle(customer, web_app, $offsetY="60", $offsetX="90") Rel(customer, spa, "Uses", "HTTPS") + UpdateRelStyle(customer, spa, $offsetY="-40") Rel(customer, mobile_app, "Uses") + UpdateRelStyle(customer, mobile_app, $offsetY="-30") Rel(web_app, spa, "Delivers") + UpdateRelStyle(web_app, spa, $offsetX="130") Rel(spa, backend_api, "Uses", "async, JSON/HTTPS") Rel(mobile_app, backend_api, "Uses", "async, JSON/HTTPS") Rel_Back(database, backend_api, "Reads from and writes to", "sync, JDBC") Rel(email_system, customer, "Sends e-mails to") + UpdateRelStyle(email_system, customer, $offsetX="-45") Rel(backend_api, email_system, "Sends e-mails using", "sync, SMTP") + UpdateRelStyle(backend_api, email_system, $offsetY="-60") Rel(backend_api, banking_system, "Uses", "sync/async, XML/HTTPS") + UpdateRelStyle(backend_api, banking_system, $offsetY="-50", $offsetX="-140") + +
@@ -130,6 +148,10 @@ Rel(c1, c2, "Submits credentials to", "JSON/HTTPS") Rel(c2, c3, "Calls isAuthenticated() on") Rel(c3, c4, "select * from users where username = ?", "JDBC") + + UpdateRelStyle(c1, c2, $textColor="red", $offsetY="-40") + UpdateRelStyle(c2, c3, $textColor="red", $offsetX="-40", $offsetY="60") + UpdateRelStyle(c3, c4, $textColor="red", $offsetY="-40", $offsetX="10")
diff --git a/src/defaultConfig.js b/src/defaultConfig.js index d5c69dfdbe..f877097ed9 100644 --- a/src/defaultConfig.js +++ b/src/defaultConfig.js @@ -1084,14 +1084,21 @@ const config = { diagramMarginY: 10, /** - * | Parameter | Description | Type | Required | Values | - * | ----------- | --------------------- | ------- | -------- | ------------------ | - * | shapeMargin | Margin between shapes | Integer | Required | Any Positive Value | + * | Parameter | Description | Type | Required | Values | + * | ------------- | --------------------- | ------- | -------- | ------------------ | + * | c4ShapeMargin | Margin between shapes | Integer | Required | Any Positive Value | * * **Notes:** Default value: 50 */ c4ShapeMargin: 50, + /** + * | Parameter | Description | Type | Required | Values | + * | -------------- | ---------------------- | ------- | -------- | ------------------ | + * | c4ShapePadding | Padding between shapes | Integer | Required | Any Positive Value | + * + * **Notes:** Default value: 20 + */ c4ShapePadding: 20, /** @@ -1113,9 +1120,9 @@ const config = { height: 60, /** - * | Parameter | Description | Type | Required | Values | - * | --------- | ------------------------ | ------- | -------- | ------------------ | - * | boxMargin | Margin around loop boxes | Integer | Required | Any Positive Value | + * | Parameter | Description | Type | Required | Values | + * | --------- | ------------------- | ------- | -------- | ------------------ | + * | boxMargin | Margin around boxes | Integer | Required | Any Positive Value | * * **Notes:** Default value: 10 */ @@ -1133,97 +1140,446 @@ const config = { */ useMaxWidth: true, + /** + * | Parameter | Description | Type | Required | Values | + * | ------------ | ----------- | ------- | -------- | ------------------ | + * | c4ShapeInRow | See Notes | Integer | Required | Any Positive Value | + * + * **Notes:** How many shapes to place in each row. + * + * Default value: 4 + */ c4ShapeInRow: 4, + nextLinePaddingX: 0, + /** + * | Parameter | Description | Type | Required | Values | + * | --------------- | ----------- | ------- | -------- | ------------------ | + * | c4BoundaryInRow | See Notes | Integer | Required | Any Positive Value | + * + * **Notes:** How many boundarys to place in each row. + * + * Default value: 2 + */ c4BoundaryInRow: 2, + /** + * This sets the font size of Person shape for the diagram + * + * **Notes:** Default value: 14. + */ personFontSize: 14, + /** + * This sets the font family of Person shape for the diagram + * + * **Notes:** Default value: "Open Sans", sans-serif. + */ personFontFamily: '"Open Sans", sans-serif', + /** + * This sets the font weight of Person shape for the diagram + * + * **Notes:** Default value: normal. + */ personFontWeight: 'normal', + /** + * This sets the font size of External Person shape for the diagram + * + * **Notes:** Default value: 14. + */ external_personFontSize: 14, + /** + * This sets the font family of External Person shape for the diagram + * + * **Notes:** Default value: "Open Sans", sans-serif. + */ external_personFontFamily: '"Open Sans", sans-serif', + /** + * This sets the font weight of External Person shape for the diagram + * + * **Notes:** Default value: normal. + */ external_personFontWeight: 'normal', + /** + * This sets the font size of System shape for the diagram + * + * **Notes:** Default value: 14. + */ systemFontSize: 14, + /** + * This sets the font family of System shape for the diagram + * + * **Notes:** Default value: "Open Sans", sans-serif. + */ systemFontFamily: '"Open Sans", sans-serif', + /** + * This sets the font weight of System shape for the diagram + * + * **Notes:** Default value: normal. + */ systemFontWeight: 'normal', + /** + * This sets the font size of External System shape for the diagram + * + * **Notes:** Default value: 14. + */ external_systemFontSize: 14, + /** + * This sets the font family of External System shape for the diagram + * + * **Notes:** Default value: "Open Sans", sans-serif. + */ external_systemFontFamily: '"Open Sans", sans-serif', + /** + * This sets the font weight of External System shape for the diagram + * + * **Notes:** Default value: normal. + */ external_systemFontWeight: 'normal', + /** + * This sets the font size of System DB shape for the diagram + * + * **Notes:** Default value: 14. + */ system_dbFontSize: 14, + /** + * This sets the font family of System DB shape for the diagram + * + * **Notes:** Default value: "Open Sans", sans-serif. + */ system_dbFontFamily: '"Open Sans", sans-serif', + /** + * This sets the font weight of System DB shape for the diagram + * + * **Notes:** Default value: normal. + */ system_dbFontWeight: 'normal', + /** + * This sets the font size of External System DB shape for the diagram + * + * **Notes:** Default value: 14. + */ external_system_dbFontSize: 14, + /** + * This sets the font family of External System DB shape for the diagram + * + * **Notes:** Default value: "Open Sans", sans-serif. + */ external_system_dbFontFamily: '"Open Sans", sans-serif', + /** + * This sets the font weight of External System DB shape for the diagram + * + * **Notes:** Default value: normal. + */ external_system_dbFontWeight: 'normal', + /** + * This sets the font size of System Queue shape for the diagram + * + * **Notes:** Default value: 14. + */ system_queueFontSize: 14, + /** + * This sets the font family of System Queue shape for the diagram + * + * **Notes:** Default value: "Open Sans", sans-serif. + */ system_queueFontFamily: '"Open Sans", sans-serif', + /** + * This sets the font weight of System Queue shape for the diagram + * + * **Notes:** Default value: normal. + */ system_queueFontWeight: 'normal', + /** + * This sets the font size of External System Queue shape for the diagram + * + * **Notes:** Default value: 14. + */ external_system_queueFontSize: 14, + /** + * This sets the font family of External System Queue shape for the diagram + * + * **Notes:** Default value: "Open Sans", sans-serif. + */ external_system_queueFontFamily: '"Open Sans", sans-serif', + /** + * This sets the font weight of External System Queue shape for the diagram + * + * **Notes:** Default value: normal. + */ external_system_queueFontWeight: 'normal', + /** + * This sets the font size of Boundary shape for the diagram + * + * **Notes:** Default value: 14. + */ boundaryFontSize: 14, + /** + * This sets the font family of Boundary shape for the diagram + * + * **Notes:** Default value: "Open Sans", sans-serif. + */ boundaryFontFamily: '"Open Sans", sans-serif', + /** + * This sets the font weight of Boundary shape for the diagram + * + * **Notes:** Default value: normal. + */ boundaryFontWeight: 'normal', + /** + * This sets the font size of Message shape for the diagram + * + * **Notes:** Default value: 12. + */ messageFontSize: 12, + /** + * This sets the font family of Message shape for the diagram + * + * **Notes:** Default value: "Open Sans", sans-serif. + */ messageFontFamily: '"Open Sans", sans-serif', + /** + * This sets the font weight of Message shape for the diagram + * + * **Notes:** Default value: normal. + */ messageFontWeight: 'normal', + /** + * This sets the font size of Container shape for the diagram + * + * **Notes:** Default value: 14. + */ containerFontSize: 14, + /** + * This sets the font family of Container shape for the diagram + * + * **Notes:** Default value: "Open Sans", sans-serif. + */ containerFontFamily: '"Open Sans", sans-serif', + /** + * This sets the font weight of Container shape for the diagram + * + * **Notes:** Default value: normal. + */ containerFontWeight: 'normal', + /** + * This sets the font size of External Container shape for the diagram + * + * **Notes:** Default value: 14. + */ external_containerFontSize: 14, + /** + * This sets the font family of External Container shape for the diagram + * + * **Notes:** Default value: "Open Sans", sans-serif. + */ external_containerFontFamily: '"Open Sans", sans-serif', + /** + * This sets the font weight of External Container shape for the diagram + * + * **Notes:** Default value: normal. + */ external_containerFontWeight: 'normal', + /** + * This sets the font size of Container DB shape for the diagram + * + * **Notes:** Default value: 14. + */ container_dbFontSize: 14, + /** + * This sets the font family of Container DB shape for the diagram + * + * **Notes:** Default value: "Open Sans", sans-serif. + */ container_dbFontFamily: '"Open Sans", sans-serif', + /** + * This sets the font weight of Container DB shape for the diagram + * + * **Notes:** Default value: normal. + */ container_dbFontWeight: 'normal', + /** + * This sets the font size of External Container DB shape for the diagram + * + * **Notes:** Default value: 14. + */ external_container_dbFontSize: 14, + /** + * This sets the font family of External Container DB shape for the diagram + * + * **Notes:** Default value: "Open Sans", sans-serif. + */ external_container_dbFontFamily: '"Open Sans", sans-serif', + /** + * This sets the font weight of External Container DB shape for the diagram + * + * **Notes:** Default value: normal. + */ external_container_dbFontWeight: 'normal', + /** + * This sets the font size of Container Queue shape for the diagram + * + * **Notes:** Default value: 14. + */ container_queueFontSize: 14, + /** + * This sets the font family of Container Queue shape for the diagram + * + * **Notes:** Default value: "Open Sans", sans-serif. + */ container_queueFontFamily: '"Open Sans", sans-serif', + /** + * This sets the font weight of Container Queue shape for the diagram + * + * **Notes:** Default value: normal. + */ container_queueFontWeight: 'normal', + /** + * This sets the font size of External Container Queue shape for the diagram + * + * **Notes:** Default value: 14. + */ external_container_queueFontSize: 14, + /** + * This sets the font family of External Container Queue shape for the diagram + * + * **Notes:** Default value: "Open Sans", sans-serif. + */ external_container_queueFontFamily: '"Open Sans", sans-serif', + /** + * This sets the font weight of External Container Queue shape for the diagram + * + * **Notes:** Default value: normal. + */ external_container_queueFontWeight: 'normal', + /** + * This sets the font size of Component shape for the diagram + * + * **Notes:** Default value: 14. + */ componentFontSize: 14, + /** + * This sets the font family of Component shape for the diagram + * + * **Notes:** Default value: "Open Sans", sans-serif. + */ componentFontFamily: '"Open Sans", sans-serif', + /** + * This sets the font weight of Component shape for the diagram + * + * **Notes:** Default value: normal. + */ componentFontWeight: 'normal', + /** + * This sets the font size of External Component shape for the diagram + * + * **Notes:** Default value: 14. + */ external_componentFontSize: 14, + /** + * This sets the font family of External Component shape for the diagram + * + * **Notes:** Default value: "Open Sans", sans-serif. + */ external_componentFontFamily: '"Open Sans", sans-serif', + /** + * This sets the font weight of External Component shape for the diagram + * + * **Notes:** Default value: normal. + */ external_componentFontWeight: 'normal', + /** + * This sets the font size of Component DB shape for the diagram + * + * **Notes:** Default value: 14. + */ component_dbFontSize: 14, + /** + * This sets the font family of Component DB shape for the diagram + * + * **Notes:** Default value: "Open Sans", sans-serif. + */ component_dbFontFamily: '"Open Sans", sans-serif', + /** + * This sets the font weight of Component DB shape for the diagram + * + * **Notes:** Default value: normal. + */ component_dbFontWeight: 'normal', + /** + * This sets the font size of External Component DB shape for the diagram + * + * **Notes:** Default value: 14. + */ external_component_dbFontSize: 14, + /** + * This sets the font family of External Component DB shape for the diagram + * + * **Notes:** Default value: "Open Sans", sans-serif. + */ external_component_dbFontFamily: '"Open Sans", sans-serif', + /** + * This sets the font weight of External Component DB shape for the diagram + * + * **Notes:** Default value: normal. + */ external_component_dbFontWeight: 'normal', + /** + * This sets the font size of Component Queue shape for the diagram + * + * **Notes:** Default value: 14. + */ component_queueFontSize: 14, + /** + * This sets the font family of Component Queue shape for the diagram + * + * **Notes:** Default value: "Open Sans", sans-serif. + */ component_queueFontFamily: '"Open Sans", sans-serif', + /** + * This sets the font weight of Component Queue shape for the diagram + * + * **Notes:** Default value: normal. + */ component_queueFontWeight: 'normal', + /** + * This sets the font size of External Component Queue shape for the diagram + * + * **Notes:** Default value: 14. + */ external_component_queueFontSize: 14, + /** + * This sets the font family of External Component Queue shape for the diagram + * + * **Notes:** Default value: "Open Sans", sans-serif. + */ external_component_queueFontFamily: '"Open Sans", sans-serif', + /** + * This sets the font weight of External Component Queue shape for the diagram + * + * **Notes:** Default value: normal. + */ external_component_queueFontWeight: 'normal', /** diff --git a/src/diagrams/c4/c4Db.js b/src/diagrams/c4/c4Db.js index b346d9b165..d53d6d31ff 100644 --- a/src/diagrams/c4/c4Db.js +++ b/src/diagrams/c4/c4Db.js @@ -22,6 +22,8 @@ let rels = []; let title = ''; let wrapEnabled = false; let description = ''; +let c4ShapeInRow = 4; +let c4BoundaryInRow = 2; var c4Type; export const getC4Type = function () { @@ -65,22 +67,46 @@ export const addRel = function (type, from, to, label, techn, descr, sprite, tag rel.to = to; rel.label = { text: label }; + if (techn === undefined || techn === null) { + rel.techn = { text: '' }; + } else { + if (typeof techn === 'object') { + let [key, value] = Object.entries(techn)[0]; + rel[key] = { text: value }; + } else { + rel.techn = { text: techn }; + } + } + if (descr === undefined || descr === null) { rel.descr = { text: '' }; } else { - rel.descr = { text: descr }; + if (typeof descr === 'object') { + let [key, value] = Object.entries(descr)[0]; + rel[key] = { text: value }; + } else { + rel.descr = { text: descr }; + } } - if (techn === undefined || techn === null) { - rel.techn = { text: '' }; + if (typeof sprite === 'object') { + let [key, value] = Object.entries(sprite)[0]; + rel[key] = value; } else { - rel.techn = { text: techn }; + rel.sprite = sprite; + } + if (typeof tags === 'object') { + let [key, value] = Object.entries(tags)[0]; + rel[key] = value; + } else { + rel.tags = tags; + } + if (typeof link === 'object') { + let [key, value] = Object.entries(link)[0]; + rel[key] = value; + } else { + rel.link = link; } - - // rel.techn = techn; - rel.sprite = sprite; - rel.tags = tags; - rel.link = link; rel.wrap = autoWrap(); }; @@ -108,15 +134,35 @@ export const addPersonOrSystem = function (typeC4Shape, alias, label, descr, spr if (descr === undefined || descr === null) { personOrSystem.descr = { text: '' }; } else { - personOrSystem.descr = { text: descr }; + if (typeof descr === 'object') { + let [key, value] = Object.entries(descr)[0]; + personOrSystem[key] = { text: value }; + } else { + personOrSystem.descr = { text: descr }; + } } - personOrSystem.wrap = autoWrap(); - personOrSystem.sprite = sprite; - personOrSystem.tags = tags; - personOrSystem.link = link; + if (typeof sprite === 'object') { + let [key, value] = Object.entries(sprite)[0]; + personOrSystem[key] = value; + } else { + personOrSystem.sprite = sprite; + } + if (typeof tags === 'object') { + let [key, value] = Object.entries(tags)[0]; + personOrSystem[key] = value; + } else { + personOrSystem.tags = tags; + } + if (typeof link === 'object') { + let [key, value] = Object.entries(link)[0]; + personOrSystem[key] = value; + } else { + personOrSystem.link = link; + } personOrSystem.typeC4Shape = { text: typeC4Shape }; personOrSystem.parentBoundary = currentBoundaryParse; + personOrSystem.wrap = autoWrap(); }; //type, alias, label, ?techn, ?descr ?sprite, ?tags, $link @@ -143,18 +189,43 @@ export const addContainer = function (typeC4Shape, alias, label, techn, descr, s if (techn === undefined || techn === null) { container.techn = { text: '' }; } else { - container.techn = { text: techn }; + if (typeof techn === 'object') { + let [key, value] = Object.entries(techn)[0]; + container[key] = { text: value }; + } else { + container.techn = { text: techn }; + } } if (descr === undefined || descr === null) { container.descr = { text: '' }; } else { - container.descr = { text: descr }; + if (typeof descr === 'object') { + let [key, value] = Object.entries(descr)[0]; + container[key] = { text: value }; + } else { + container.descr = { text: descr }; + } } - container.sprite = sprite; - container.tags = tags; - container.link = link; + if (typeof sprite === 'object') { + let [key, value] = Object.entries(sprite)[0]; + container[key] = value; + } else { + container.sprite = sprite; + } + if (typeof tags === 'object') { + let [key, value] = Object.entries(tags)[0]; + container[key] = value; + } else { + container.tags = tags; + } + if (typeof link === 'object') { + let [key, value] = Object.entries(link)[0]; + container[key] = value; + } else { + container.link = link; + } container.wrap = autoWrap(); container.typeC4Shape = { text: typeC4Shape }; container.parentBoundary = currentBoundaryParse; @@ -184,18 +255,43 @@ export const addComponent = function (typeC4Shape, alias, label, techn, descr, s if (techn === undefined || techn === null) { component.techn = { text: '' }; } else { - component.techn = { text: techn }; + if (typeof techn === 'object') { + let [key, value] = Object.entries(techn)[0]; + component[key] = { text: value }; + } else { + component.techn = { text: techn }; + } } if (descr === undefined || descr === null) { component.descr = { text: '' }; } else { - component.descr = { text: descr }; + if (typeof descr === 'object') { + let [key, value] = Object.entries(descr)[0]; + component[key] = { text: value }; + } else { + component.descr = { text: descr }; + } } - component.sprite = sprite; - component.tags = tags; - component.link = link; + if (typeof sprite === 'object') { + let [key, value] = Object.entries(sprite)[0]; + component[key] = value; + } else { + component.sprite = sprite; + } + if (typeof tags === 'object') { + let [key, value] = Object.entries(tags)[0]; + component[key] = value; + } else { + component.tags = tags; + } + if (typeof link === 'object') { + let [key, value] = Object.entries(link)[0]; + component[key] = value; + } else { + component.link = link; + } component.wrap = autoWrap(); component.typeC4Shape = { text: typeC4Shape }; component.parentBoundary = currentBoundaryParse; @@ -227,11 +323,26 @@ export const addPersonOrSystemBoundary = function (alias, label, type, tags, lin if (type === undefined || type === null) { boundary.type = { text: 'system' }; } else { - boundary.type = { text: type }; + if (typeof type === 'object') { + let [key, value] = Object.entries(type)[0]; + boundary[key] = { text: value }; + } else { + boundary.type = { text: type }; + } } - boundary.tags = tags; - boundary.link = link; + if (typeof tags === 'object') { + let [key, value] = Object.entries(tags)[0]; + boundary[key] = value; + } else { + boundary.tags = tags; + } + if (typeof link === 'object') { + let [key, value] = Object.entries(link)[0]; + boundary[key] = value; + } else { + boundary.link = link; + } boundary.parentBoundary = currentBoundaryParse; boundary.wrap = autoWrap(); @@ -266,11 +377,26 @@ export const addContainerBoundary = function (alias, label, type, tags, link) { if (type === undefined || type === null) { boundary.type = { text: 'container' }; } else { - boundary.type = { text: type }; + if (typeof type === 'object') { + let [key, value] = Object.entries(type)[0]; + boundary[key] = { text: value }; + } else { + boundary.type = { text: type }; + } } - boundary.tags = tags; - boundary.link = link; + if (typeof tags === 'object') { + let [key, value] = Object.entries(tags)[0]; + boundary[key] = value; + } else { + boundary.tags = tags; + } + if (typeof link === 'object') { + let [key, value] = Object.entries(link)[0]; + boundary[key] = value; + } else { + boundary.link = link; + } boundary.parentBoundary = currentBoundaryParse; boundary.wrap = autoWrap(); @@ -314,17 +440,37 @@ export const addDeploymentNode = function ( if (type === undefined || type === null) { boundary.type = { text: 'node' }; } else { - boundary.type = { text: type }; + if (typeof type === 'object') { + let [key, value] = Object.entries(type)[0]; + boundary[key] = { text: value }; + } else { + boundary.type = { text: type }; + } } if (descr === undefined || descr === null) { boundary.descr = { text: '' }; } else { - boundary.descr = { text: type }; + if (typeof descr === 'object') { + let [key, value] = Object.entries(descr)[0]; + boundary[key] = { text: value }; + } else { + boundary.descr = { text: descr }; + } } - boundary.tags = tags; - boundary.link = link; + if (typeof tags === 'object') { + let [key, value] = Object.entries(tags)[0]; + boundary[key] = value; + } else { + boundary.tags = tags; + } + if (typeof link === 'object') { + let [key, value] = Object.entries(link)[0]; + boundary[key] = value; + } else { + boundary.link = link; + } boundary.nodeType = nodeType; boundary.parentBoundary = currentBoundaryParse; boundary.wrap = autoWrap(); @@ -341,6 +487,177 @@ export const popBoundaryParseStack = function () { boundaryParseStack.push(parentBoundaryParse); }; +//elementName, ?bgColor, ?fontColor, ?borderColor, ?shadowing, ?shape, ?sprite, ?techn, ?legendText, ?legendSprite +export const updateElStyle = function ( + typeC4Shape, + elementName, + bgColor, + fontColor, + borderColor, + shadowing, + shape, + sprite, + techn, + legendText, + legendSprite +) { + let old = c4ShapeArray.find((element) => element.alias === elementName); + if (old === undefined) { + old = boundarys.find((element) => element.alias === elementName); + if (old === undefined) { + return; + } + } + if (bgColor !== undefined && bgColor !== null) { + if (typeof bgColor === 'object') { + let [key, value] = Object.entries(bgColor)[0]; + old[key] = value; + } else { + old.bgColor = bgColor; + } + } + if (fontColor !== undefined && fontColor !== null) { + if (typeof fontColor === 'object') { + let [key, value] = Object.entries(fontColor)[0]; + old[key] = value; + } else { + old.fontColor = fontColor; + } + } + if (borderColor !== undefined && borderColor !== null) { + if (typeof borderColor === 'object') { + let [key, value] = Object.entries(borderColor)[0]; + old[key] = value; + } else { + old.borderColor = borderColor; + } + } + if (shadowing !== undefined && shadowing !== null) { + if (typeof shadowing === 'object') { + let [key, value] = Object.entries(shadowing)[0]; + old[key] = value; + } else { + old.shadowing = shadowing; + } + } + if (shape !== undefined && shape !== null) { + if (typeof shape === 'object') { + let [key, value] = Object.entries(shape)[0]; + old[key] = value; + } else { + old.shape = shape; + } + } + if (sprite !== undefined && sprite !== null) { + if (typeof sprite === 'object') { + let [key, value] = Object.entries(sprite)[0]; + old[key] = value; + } else { + old.sprite = sprite; + } + } + if (techn !== undefined && techn !== null) { + if (typeof techn === 'object') { + let [key, value] = Object.entries(techn)[0]; + old[key] = value; + } else { + old.techn = techn; + } + } + if (legendText !== undefined && legendText !== null) { + if (typeof legendText === 'object') { + let [key, value] = Object.entries(legendText)[0]; + old[key] = value; + } else { + old.legendText = legendText; + } + } + if (legendSprite !== undefined && legendSprite !== null) { + if (typeof legendSprite === 'object') { + let [key, value] = Object.entries(legendSprite)[0]; + old[key] = value; + } else { + old.legendSprite = legendSprite; + } + } +}; + +//textColor, lineColor, ?offsetX, ?offsetY +export const updateRelStyle = function ( + typeC4Shape, + from, + to, + textColor, + lineColor, + offsetX, + offsetY +) { + const old = rels.find((rel) => rel.from === from && rel.to === to); + if (old === undefined) { + return; + } + if (textColor !== undefined && textColor !== null) { + if (typeof textColor === 'object') { + let [key, value] = Object.entries(textColor)[0]; + old[key] = value; + } else { + old.textColor = textColor; + } + } + if (lineColor !== undefined && lineColor !== null) { + if (typeof lineColor === 'object') { + let [key, value] = Object.entries(lineColor)[0]; + old[key] = value; + } else { + old.lineColor = lineColor; + } + } + if (offsetX !== undefined && offsetX !== null) { + if (typeof offsetX === 'object') { + let [key, value] = Object.entries(offsetX)[0]; + old[key] = parseInt(value); + } else { + old.offsetX = parseInt(offsetX); + } + } + if (offsetY !== undefined && offsetY !== null) { + if (typeof offsetY === 'object') { + let [key, value] = Object.entries(offsetY)[0]; + old[key] = parseInt(value); + } else { + old.offsetY = parseInt(offsetY); + } + } +}; + +//?c4ShapeInRow, ?c4BoundaryInRow +export const updateLayoutConfig = function (typeC4Shape, c4ShapeInRowParam, c4BoundaryInRowParam) { + let c4ShapeInRowValue = c4ShapeInRow; + let c4BoundaryInRowValue = c4BoundaryInRow; + + if (typeof c4ShapeInRowParam === 'object') { + let [key, value] = Object.entries(c4ShapeInRowParam)[0]; + c4ShapeInRowValue = parseInt(value); + } else { + c4ShapeInRowValue = parseInt(c4ShapeInRowParam); + } + if (typeof c4BoundaryInRowParam === 'object') { + let [key, value] = Object.entries(c4BoundaryInRowParam)[0]; + c4BoundaryInRowValue = parseInt(value); + } else { + c4BoundaryInRowValue = parseInt(c4BoundaryInRowParam); + } + + if (c4ShapeInRowValue >= 1) c4ShapeInRow = c4ShapeInRowValue; + if (c4BoundaryInRowValue >= 1) c4BoundaryInRow = c4BoundaryInRowValue; +}; + +export const getC4ShapeInRow = function () { + return c4ShapeInRow; +}; +export const getC4BoundaryInRow = function () { + return c4BoundaryInRow; +}; export const getCurrentBoundaryParse = function () { return currentBoundaryParse; }; @@ -400,6 +717,13 @@ export const clear = function () { currentBoundaryParse = 'global'; boundaryParseStack = ['']; rels = []; + + boundaryParseStack = ['']; + title = ''; + wrapEnabled = false; + description = ''; + c4ShapeInRow = 4; + c4BoundaryInRow = 2; }; export const LINETYPE = { @@ -453,6 +777,9 @@ export default { addDeploymentNode, popBoundaryParseStack, addRel, + updateElStyle, + updateRelStyle, + updateLayoutConfig, autoWrap, setWrap, getC4ShapeArray, @@ -464,6 +791,8 @@ export default { getRels, getTitle, getC4Type, + getC4ShapeInRow, + getC4BoundaryInRow, setAccTitle, getAccTitle, getAccDescription, diff --git a/src/diagrams/c4/c4Renderer.js b/src/diagrams/c4/c4Renderer.js index d71e70e2ef..1ff42575a8 100644 --- a/src/diagrams/c4/c4Renderer.js +++ b/src/diagrams/c4/c4Renderer.js @@ -17,6 +17,9 @@ import addSVGAccessibilityFields from '../../accessibility'; let globalBoundaryMaxX = 0, globalBoundaryMaxY = 0; +let c4ShapeInRow = 4; +let c4BoundaryInRow = 2; + parser.yy = c4Db; let conf = {}; @@ -68,7 +71,7 @@ class Bounds { if ( _startx >= this.data.widthLimit || _stopx >= this.data.widthLimit || - this.nextData.cnt > conf.c4ShapeInRow + this.nextData.cnt > c4ShapeInRow ) { _startx = this.nextData.startx + c4Shape.margin + conf.nextLinePaddingX; _starty = this.nextData.stopy + c4Shape.margin * 2; @@ -448,7 +451,7 @@ function drawInsideBoundary(diagram, parentBoundaryAlias, parentBounds, currentB let currentBounds = new Bounds(); // Calculate the width limit of the boundar. label/type 的长度, currentBounds.data.widthLimit = - parentBounds.data.widthLimit / Math.min(conf.c4BoundaryInRow, currentBoundarys.length); + parentBounds.data.widthLimit / Math.min(c4BoundaryInRow, currentBoundarys.length); // Math.min( // conf.width * conf.c4ShapeInRow + conf.c4ShapeMargin * conf.c4ShapeInRow * 2, // parentBounds.data.widthLimit / Math.min(conf.c4BoundaryInRow, currentBoundarys.length) @@ -507,7 +510,7 @@ function drawInsideBoundary(diagram, parentBoundaryAlias, parentBounds, currentB Y = currentBoundary['descr'].Y + currentBoundary['descr'].height; } - if (i == 0 || i % conf.c4BoundaryInRow === 0) { + if (i == 0 || i % c4BoundaryInRow === 0) { // Calculate the drawing start point of the currentBoundarys. let _x = parentBounds.data.startx + conf.diagramMarginX; let _y = parentBounds.data.stopy + conf.diagramMarginY + Y; @@ -579,10 +582,15 @@ export const draw = function (text, id) { : select('body'); const doc = securityLevel === 'sandbox' ? sandboxElement.nodes()[0].contentDocument : document; + let db = parser.yy; + parser.yy.clear(); parser.yy.setWrap(conf.wrap); parser.parse(text + '\n'); + c4ShapeInRow = db.getC4ShapeInRow(); + c4BoundaryInRow = db.getC4BoundaryInRow(); + log.debug(`C:${JSON.stringify(conf, null, 2)}`); const diagram = @@ -593,6 +601,7 @@ export const draw = function (text, id) { svgDraw.insertClockIcon(diagram); let screenBounds = new Bounds(); + screenBounds.setData( conf.diagramMarginX, conf.diagramMarginX, diff --git a/src/diagrams/c4/parser/c4Diagram.jison b/src/diagrams/c4/parser/c4Diagram.jison index 9b57e3cf11..10783db537 100644 --- a/src/diagrams/c4/parser/c4Diagram.jison +++ b/src/diagrams/c4/parser/c4Diagram.jison @@ -61,14 +61,27 @@ %x rel_r %x rel_b +/* Custom tags/stereotypes */ +%x update_el_style +%x update_rel_style +%x update_layout_config + %x attribute %x string +%x string_kv +%x string_kv_key +%x string_kv_value %x open_directive %x type_directive %x arg_directive +%x close_directive +%x acc_title +%x acc_descr +%x acc_descr_multiline %% + \%\%\{ { this.begin('open_directive'); return 'open_directive'; } .*direction\s+TB[^\n]* return 'direction_tb'; .*direction\s+BT[^\n]* return 'direction_bt'; @@ -78,11 +91,21 @@ ":" { this.popState(); this.begin('arg_directive'); return ':'; } \}\%\% { this.popState(); this.popState(); return 'close_directive'; } ((?:(?!\}\%\%).|\n)*) return 'arg_directive'; -\%\%(?!\{)*[^\n]*(\r?\n?)+ /* skip comments */ -\%\%[^\n]*(\r?\n)* c /* skip comments */ + "title"\s[^#\n;]+ return 'title'; "accDescription"\s[^#\n;]+ return 'accDescription'; +accTitle\s*":"\s* { this.begin("acc_title");return 'acc_title'; } +(?!\n|;|#)*[^\n]* { this.popState(); return "acc_title_value"; } +accDescr\s*":"\s* { this.begin("acc_descr");return 'acc_descr'; } +(?!\n|;|#)*[^\n]* { this.popState(); return "acc_descr_value"; } +accDescr\s*"{"\s* { this.begin("acc_descr_multiline");} +[\}] { this.popState(); } +[^\}]* return "acc_descr_multiline_value"; + + +\%\%(?!\{)*[^\n]*(\r?\n?)+ /* skip comments */ +\%\%[^\n]*(\r?\n)* c /* skip comments */ \s*(\r?\n)+ return 'NEWLINE'; \s+ /* skip whitespace */ @@ -140,10 +163,14 @@ "Rel_Back" { this.begin("rel_b"); console.log('begin rel_b'); return 'REL_B';} "RelIndex" { this.begin("rel_index"); console.log('begin rel_index'); return 'REL_INDEX';} -<> return "EOF_IN_STRUCT"; -[(][ ]*[,] { console.log('begin attribute with ATTRIBUTE_EMPTY'); this.begin("attribute"); return "ATTRIBUTE_EMPTY";} -[(] { console.log('begin attribute'); this.begin("attribute"); } -[)] { console.log('STOP attribute'); this.popState();console.log('STOP diagram'); this.popState();} +"UpdateElementStyle" { this.begin("update_el_style"); console.log('begin update_el_style'); return 'UPDATE_EL_STYLE';} +"UpdateRelStyle" { this.begin("update_rel_style"); console.log('begin update_rel_style'); return 'UPDATE_REL_STYLE';} +"UpdateLayoutConfig" { this.begin("update_layout_config"); console.log('begin update_layout_config'); return 'UPDATE_LAYOUT_CONFIG';} + +<> return "EOF_IN_STRUCT"; +[(][ ]*[,] { console.log('begin attribute with ATTRIBUTE_EMPTY'); this.begin("attribute"); return "ATTRIBUTE_EMPTY";} +[(] { console.log('begin attribute'); this.begin("attribute"); } +[)] { console.log('STOP attribute'); this.popState();console.log('STOP diagram'); this.popState();} ",," { console.log(',,'); return 'ATTRIBUTE_EMPTY';} "," { console.log(','); } @@ -151,6 +178,13 @@ [ ]*["] { console.log('begin string'); this.begin("string");} ["] { console.log('STOP string'); this.popState(); } [^"]* { console.log('STR'); return "STR";} + +[ ]*[\$] { console.log('begin string_kv'); this.begin("string_kv");} +[^=]* { console.log('STR_KEY'); this.begin("string_kv_key"); return "STR_KEY";} +[=][ ]*["] { console.log('begin string_kv_value'); this.popState(); this.begin("string_kv_value"); } +[^"]+ { console.log('STR_VALUE'); return "STR_VALUE";} +["] { console.log('STOP string_kv_value'); this.popState(); this.popState(); } + [^,]+ { console.log('not STR'); return "STR";} '{' { /* this.begin("lbrace"); */ console.log('begin boundary block'); return "LBRACE";} @@ -235,6 +269,9 @@ otherStatements otherStatement : title {yy.setTitle($1.substring(6));$$=$1.substring(6);} | accDescription {yy.setAccDescription($1.substring(15));$$=$1.substring(15);} + | acc_title acc_title_value { $$=$2.trim();yy.setTitle($$); } + | acc_descr acc_descr_value { $$=$2.trim();yy.setAccDescription($$); } + | acc_descr_multiline_value { $$=$1.trim();yy.setAccDescription($$); } ; boundaryStatement @@ -297,6 +334,9 @@ diagramStatement | REL_R attributes {console.log($1,JSON.stringify($2)); yy.addRel('rel_r', ...$2); $$=$2;} | REL_B attributes {console.log($1,JSON.stringify($2)); yy.addRel('rel_b', ...$2); $$=$2;} | REL_INDEX attributes {console.log($1,JSON.stringify($2)); $2.splice(0, 1); yy.addRel('rel', ...$2); $$=$2;} + | UPDATE_EL_STYLE attributes {console.log($1,JSON.stringify($2)); yy.updateElStyle('update_el_style', ...$2); $$=$2;} + | UPDATE_REL_STYLE attributes {console.log($1,JSON.stringify($2)); yy.updateRelStyle('update_rel_style', ...$2); $$=$2;} + | UPDATE_LAYOUT_CONFIG attributes {console.log($1,JSON.stringify($2)); yy.updateLayoutConfig('update_layout_config', ...$2); $$=$2;} ; attributes @@ -306,7 +346,7 @@ attributes attribute : STR { $$ = $1.trim(); } + | STR_KEY STR_VALUE { console.log('kv: ', $1, $2); let kv={}; kv[$1.trim()]=$2.trim(); $$=kv; } | ATTRIBUTE { $$ = $1.trim(); } | ATTRIBUTE_EMPTY { $$ = ""; } ; - diff --git a/src/diagrams/c4/svgDraw.js b/src/diagrams/c4/svgDraw.js index fb3a276dba..c30a00c386 100644 --- a/src/diagrams/c4/svgDraw.js +++ b/src/diagrams/c4/svgDraw.js @@ -216,6 +216,11 @@ export const drawRels = (elem, rels, conf) => { const relsElem = elem.append('g'); let i = 0; for (let rel of rels) { + let textColor = rel.textColor ? rel.textColor : '#444444'; + let strokeColor = rel.lineColor ? rel.lineColor : '#444444'; + let offsetX = rel.offsetX ? parseInt(rel.offsetX) : 0; + let offsetY = rel.offsetY ? parseInt(rel.offsetY) : 0; + let url = ''; if (i === 0) { let line = relsElem.append('line'); @@ -225,7 +230,7 @@ export const drawRels = (elem, rels, conf) => { line.attr('y2', rel.endPoint.y); line.attr('stroke-width', '1'); - line.attr('stroke', '#444444'); + line.attr('stroke', strokeColor); line.style('fill', 'none'); if (rel.type !== 'rel_b') line.attr('marker-end', 'url(' + url + '#arrowhead)'); if (rel.type === 'birel' || rel.type === 'rel_b') @@ -236,7 +241,7 @@ export const drawRels = (elem, rels, conf) => { line .attr('fill', 'none') .attr('stroke-width', '1') - .attr('stroke', '#444444') + .attr('stroke', strokeColor) .attr( 'd', 'Mstartx,starty Qcontrolx,controly stopx,stopy ' @@ -261,11 +266,15 @@ export const drawRels = (elem, rels, conf) => { _drawTextCandidateFunc(conf)( rel.label.text, relsElem, - Math.min(rel.startPoint.x, rel.endPoint.x) + Math.abs(rel.endPoint.x - rel.startPoint.x) / 2, - Math.min(rel.startPoint.y, rel.endPoint.y) + Math.abs(rel.endPoint.y - rel.startPoint.y) / 2, + Math.min(rel.startPoint.x, rel.endPoint.x) + + Math.abs(rel.endPoint.x - rel.startPoint.x) / 2 + + offsetX, + Math.min(rel.startPoint.y, rel.endPoint.y) + + Math.abs(rel.endPoint.y - rel.startPoint.y) / 2 + + offsetY, rel.label.width, rel.label.height, - { fill: '#444444' }, + { fill: textColor }, messageConf ); @@ -275,14 +284,16 @@ export const drawRels = (elem, rels, conf) => { '[' + rel.techn.text + ']', relsElem, Math.min(rel.startPoint.x, rel.endPoint.x) + - Math.abs(rel.endPoint.x - rel.startPoint.x) / 2, + Math.abs(rel.endPoint.x - rel.startPoint.x) / 2 + + offsetX, Math.min(rel.startPoint.y, rel.endPoint.y) + Math.abs(rel.endPoint.y - rel.startPoint.y) / 2 + conf.messageFontSize + - 5, + 5 + + offsetY, Math.max(rel.label.width, rel.techn.width), rel.techn.height, - { fill: '#444444', 'font-style': 'italic' }, + { fill: textColor, 'font-style': 'italic' }, messageConf ); } @@ -299,13 +310,17 @@ export const drawRels = (elem, rels, conf) => { const drawBoundary = function (elem, boundary, conf) { const boundaryElem = elem.append('g'); + let fillColor = boundary.bgColor ? boundary.bgColor : 'none'; + let strokeColor = boundary.borderColor ? boundary.borderColor : '#444444'; + let fontColor = boundary.fontColor ? boundary.fontColor : 'black'; + let attrsValue = { 'stroke-width': 1.0, 'stroke-dasharray': '7.0,7.0' }; if (boundary.nodeType) attrsValue = { 'stroke-width': 1.0 }; let rectData = { x: boundary.x, y: boundary.y, - fill: 'none', - stroke: '#444444', + fill: fillColor, + stroke: strokeColor, width: boundary.width, height: boundary.height, rx: 2.5, @@ -319,6 +334,7 @@ const drawBoundary = function (elem, boundary, conf) { let boundaryConf = conf.boundaryFont(); boundaryConf.fontWeight = 'bold'; boundaryConf.fontSize = boundaryConf.fontSize + 2; + boundaryConf.fontColor = fontColor; _drawTextCandidateFunc(conf)( boundary.label.text, boundaryElem, @@ -333,6 +349,7 @@ const drawBoundary = function (elem, boundary, conf) { // draw type if (boundary.type && boundary.type.text !== '') { boundaryConf = conf.boundaryFont(); + boundaryConf.fontColor = fontColor; _drawTextCandidateFunc(conf)( boundary.type.text, boundaryElem, @@ -349,6 +366,7 @@ const drawBoundary = function (elem, boundary, conf) { if (boundary.descr && boundary.descr.text !== '') { boundaryConf = conf.boundaryFont(); boundaryConf.fontSize = boundaryConf.fontSize - 2; + boundaryConf.fontColor = fontColor; _drawTextCandidateFunc(conf)( boundary.descr.text, boundaryElem, @@ -363,8 +381,12 @@ const drawBoundary = function (elem, boundary, conf) { }; export const drawC4Shape = function (elem, c4Shape, conf) { - let fillColor = conf[c4Shape.typeC4Shape.text + '_bg_color']; - let strokeColor = conf[c4Shape.typeC4Shape.text + '_border_color']; + let fillColor = c4Shape.bgColor ? c4Shape.bgColor : conf[c4Shape.typeC4Shape.text + '_bg_color']; + let strokeColor = c4Shape.borderColor + ? c4Shape.borderColor + : conf[c4Shape.typeC4Shape.text + '_border_color']; + let fontColor = c4Shape.fontColor ? c4Shape.fontColor : '#FFFFFF'; + let personImg = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII='; switch (c4Shape.typeC4Shape.text) { @@ -473,7 +495,7 @@ export const drawC4Shape = function (elem, c4Shape, conf) { let c4ShapeFontConf = getC4ShapeFont(conf, c4Shape.typeC4Shape.text); c4ShapeElem .append('text') - .attr('fill', '#FFFFFF') + .attr('fill', fontColor) .attr('font-family', c4ShapeFontConf.fontFamily) .attr('font-size', c4ShapeFontConf.fontSize - 2) .attr('font-style', 'italic') @@ -502,6 +524,7 @@ export const drawC4Shape = function (elem, c4Shape, conf) { let textFontConf = conf[c4Shape.typeC4Shape.text + 'Font'](); textFontConf.fontWeight = 'bold'; textFontConf.fontSize = textFontConf.fontSize + 2; + textFontConf.fontColor = fontColor; _drawTextCandidateFunc(conf)( c4Shape.label.text, c4ShapeElem, @@ -509,12 +532,13 @@ export const drawC4Shape = function (elem, c4Shape, conf) { c4Shape.y + c4Shape.label.Y, c4Shape.width, c4Shape.height, - { fill: '#FFFFFF' }, + { fill: fontColor }, textFontConf ); // draw techn/type textFontConf = conf[c4Shape.typeC4Shape.text + 'Font'](); + textFontConf.fontColor = fontColor; if (c4Shape.thchn && c4Shape.thchn.text !== '') { _drawTextCandidateFunc(conf)( @@ -524,7 +548,7 @@ export const drawC4Shape = function (elem, c4Shape, conf) { c4Shape.y + c4Shape.thchn.Y, c4Shape.width, c4Shape.height, - { fill: '#FFFFFF', 'font-style': 'italic' }, + { fill: fontColor, 'font-style': 'italic' }, textFontConf ); } else if (c4Shape.type && c4Shape.type.text !== '') { @@ -535,7 +559,7 @@ export const drawC4Shape = function (elem, c4Shape, conf) { c4Shape.y + c4Shape.type.Y, c4Shape.width, c4Shape.height, - { fill: '#FFFFFF', 'font-style': 'italic' }, + { fill: fontColor, 'font-style': 'italic' }, textFontConf ); } @@ -543,6 +567,7 @@ export const drawC4Shape = function (elem, c4Shape, conf) { // draw descr if (c4Shape.descr && c4Shape.descr.text !== '') { textFontConf = conf.personFont(); + textFontConf.fontColor = fontColor; _drawTextCandidateFunc(conf)( c4Shape.descr.text, c4ShapeElem, @@ -550,7 +575,7 @@ export const drawC4Shape = function (elem, c4Shape, conf) { c4Shape.y + c4Shape.descr.Y, c4Shape.width, c4Shape.height, - { fill: '#FFFFFF' }, + { fill: fontColor }, textFontConf ); } From b0d65169abd23a78abad04730150518b184a1b4d Mon Sep 17 00:00:00 2001 From: pinghe Date: Sat, 18 Jun 2022 23:45:21 +0800 Subject: [PATCH 03/24] Updated the documentation on how to use C4. --- docs/c4c.md | 152 +++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 133 insertions(+), 19 deletions(-) diff --git a/docs/c4c.md b/docs/c4c.md index 9d1f1ec6f6..4facd44ba5 100644 --- a/docs/c4c.md +++ b/docs/c4c.md @@ -5,42 +5,156 @@ -Mermaid's c4 diagram sytax is compatible with plantUML. See example below: +Mermaid's c4 diagram syntax is compatible with plantUML. See example below: ```mermaid-example C4Context title System Context diagram for Internet Banking System + Enterprise_Boundary(b0, "BankBoundary0") { + Person(customerA, "Banking Customer A", "A customer of the bank, with personal bank accounts.") + Person(customerB, "Banking Customer B") + Person_Ext(customerC, "Banking Customer C", "desc") - Person(customerA, "Banking Customer A", "A customer of the bank, with personal bank accounts.") - Person(customerB, "Banking Customer B") - Person_Ext(customerC, "Banking Customer C") - System(SystemAA, "Internet Banking System", "Allows customers to view information about their bank accounts, and make payments.") + Person(customerD, "Banking Customer D", "A customer of the bank,
with personal bank accounts.") - Person(customerD, "Banking Customer D", "A customer of the bank,
with personal bank accounts.") + System(SystemAA, "Internet Banking System", "Allows customers to view information about their bank accounts, and make payments.") - Enterprise_Boundary(b1, "BankBoundary") { + Enterprise_Boundary(b1, "BankBoundary") { + + SystemDb_Ext(SystemE, "Mainframe Banking System", "Stores all of the core banking information about customers, accounts, transactions, etc.") - SystemDb_Ext(SystemE, "Mainframe Banking System", "Stores all of the core banking information about customers, accounts, transactions, etc.") + System_Boundary(b2, "BankBoundary2") { + System(SystemA, "Banking System A") + System(SystemB, "Banking System B", "A system of the bank, with personal bank accounts. next line.") + } - System_Boundary(b2, "BankBoundary2") { - System(SystemA, "Banking System A") - System(SystemB, "Banking System B", "A system of the bank, with personal bank accounts.") - } - - System_Ext(SystemC, "E-mail system", "The internal Microsoft Exchange e-mail system.") - SystemDb(SystemD, "Banking System D Database", "A system of the bank, with personal bank accounts.") + System_Ext(SystemC, "E-mail system", "The internal Microsoft Exchange e-mail system.") + SystemDb(SystemD, "Banking System D Database", "A system of the bank, with personal bank accounts.") - Boundary(b3, "BankBoundary3", "boundary") { - SystemQueue(SystemF, "Banking System F Queue", "A system of the bank, with personal bank accounts.") - SystemQueue_Ext(SystemG, "Banking System G Queue", "A system of the bank, with personal bank accounts.") + Boundary(b3, "BankBoundary3", "boundary") { + SystemQueue(SystemF, "Banking System F Queue", "A system of the bank.") + SystemQueue_Ext(SystemG, "Banking System G Queue", "A system of the bank, with personal bank accounts.") + } } } - + BiRel(customerA, SystemAA, "Uses") BiRel(SystemAA, SystemE, "Uses") Rel(SystemAA, SystemC, "Sends e-mails", "SMTP") Rel(SystemC, customerA, "Sends e-mails to") + UpdateElementStyle(customerA, $fontColor="red", $bgColor="grey", $borderColor="red") + UpdateRelStyle(customerA, SystemAA, $textColor="blue", $lineColor="blue", $offsetX="5") + UpdateRelStyle(SystemAA, SystemE, $textColor="blue", $lineColor="blue", $offsetY="-10") + UpdateRelStyle(SystemAA, SystemC, $textColor="blue", $lineColor="blue", $offsetY="-40", $offsetX="-50") + UpdateRelStyle(SystemC, customerA, $textColor="red", $lineColor="red", $offsetX="-50", $offsetY="20") + + UpdateLayoutConfig($c4ShapeInRow="3", $c4BoundaryInRow="1") + + +``` +For an example, see the source code demos/index.html + +5 types of C4 charts are supported. + + - System Context (C4Context) + - Container diagram (C4Container) + - Component diagram (C4Component) + - Dynamic diagram (C4Dynamic) + - Deployment diagram (C4Deployment) + +Please refer to the linked document [C4-PlantUML syntax](https://github.com/plantuml-stdlib/C4-PlantUML/blob/master/README.md) for how to write the c4 diagram. + +C4 diagram is fixed style, such as css color, so different css is not provided under different skins. +updateElementStyle and UpdateElementStyle are written in the diagram last part. updateElementStyle is inconsistent with the original definition and updates the style of the relationship, including the offset of the text label relative to the original position. + +The layout does not use a fully automated layout algorithm. The position of shapes is adjusted by changing the order in which statements are written. So there is no plan to support the following Layout statements. +The number of shapes per row and the number of boundaries can be adjusted using UpdateLayoutConfig. + +- Layout +- - Lay_U, Lay_Up +- - Lay_D, Lay_Down +- - Lay_L, Lay_Left +- - Lay_R, Lay_Right + +The following unfinished features are not supported in the short term. + +- [ ] sprite +- [ ] tags +- [ ] link +- [ ] Legend + +- [X] System Context +- - [X] Person(alias, label, ?descr, ?sprite, ?tags, $link) +- - [X] Person_Ext +- - [X] System(alias, label, ?descr, ?sprite, ?tags, $link) +- - [X] SystemDb +- - [X] SystemQueue +- - [X] System_Ext +- - [X] SystemDb_Ext +- - [X] SystemQueue_Ext +- - [X] Boundary(alias, label, ?type, ?tags, $link) +- - [X] Enterprise_Boundary(alias, label, ?tags, $link) +- - [X] System_Boundary + +- [X] Container diagram +- - [X] Container(alias, label, ?techn, ?descr, ?sprite, ?tags, $link) +- - [X] ContainerDb +- - [X] ContainerQueue +- - [X] Container_Ext +- - [X] ContainerDb_Ext +- - [X] ContainerQueue_Ext +- - [X] Container_Boundary(alias, label, ?tags, $link) + +- [X] Component diagram +- - [X] Component(alias, label, ?techn, ?descr, ?sprite, ?tags, $link) +- - [X] ComponentDb +- - [X] ComponentQueue +- - [X] Component_Ext +- - [X] ComponentDb_Ext +- - [X] ComponentQueue_Ext + +- [X] Dynamic diagram +- - [X] RelIndex(index, from, to, label, ?tags, $link) + +- [X] Deployment diagram +- - [X] Deployment_Node(alias, label, ?type, ?descr, ?sprite, ?tags, $link) +- - [X] Node(alias, label, ?type, ?descr, ?sprite, ?tags, $link): short name of Deployment_Node() +- - [X] Node_L(alias, label, ?type, ?descr, ?sprite, ?tags, $link): left aligned Node() +- - [X] Node_R(alias, label, ?type, ?descr, ?sprite, ?tags, $link): right aligned Node() + +- [X] Relationship Types +- - [X] Rel(from, to, label, ?techn, ?descr, ?sprite, ?tags, $link) +- - [X] BiRel (bidirectional relationship) +- - [X] Rel_U, Rel_Up +- - [X] Rel_D, Rel_Down +- - [X] Rel_L, Rel_Left +- - [X] Rel_R, Rel_Right +- - [X] Rel_Back +- - [X] RelIndex * Compatible with C4-Plantuml syntax, but ignores the index parameter. The sequence number is determined by the order in which the rel statements are written. + + + +- [ ] Custom tags/stereotypes support and skinparam updates +- - [ ] AddElementTag(tagStereo, ?bgColor, ?fontColor, ?borderColor, ?shadowing, ?shape, ?sprite, ?techn, ?legendText, ?legendSprite): Introduces a new element tag. The styles of the tagged elements are updated and the tag is displayed in the calculated legend. +- - [ ] AddRelTag(tagStereo, ?textColor, ?lineColor, ?lineStyle, ?sprite, ?techn, ?legendText, ?legendSprite): Introduces a new Relationship tag. The styles of the tagged relationships are updated and the tag is displayed in the calculated legend. +- - [X] UpdateElementStyle(elementName, ?bgColor, ?fontColor, ?borderColor, ?shadowing, ?shape, ?sprite, ?techn, ?legendText, ?legendSprite): This call updates the default style of the elements (component, ...) and creates no additional legend entry. +- - [X] UpdateRelStyle(from, to, ?textColor, ?lineColor, ?offsetX, ?offsetY): This call updates the default relationship colors and creates no additional legend entry. Two new parameters, offsetX and offsetY, are added to set the offset of the original position of the text. +- - [ ] RoundedBoxShape(): This call returns the name of the rounded box shape and can be used as ?shape argument. +- - [ ] EightSidedShape(): This call returns the name of the eight sided shape and can be used as ?shape argument. +- - [ ] DashedLine(): This call returns the name of the dashed line and can be used as ?lineStyle argument. +- - [ ] DottedLine(): This call returns the name of the dotted line and can be used as ?lineStyle argument. +- - [ ] BoldLine(): This call returns the name of the bold line and can be used as ?lineStyle argument. +- - [X] UpdateLayoutConfig(?c4ShapeInRow, ?c4BoundaryInRow): New. This call updates the default c4ShapeInRow(4) and c4BoundaryInRow(2). + + +There are two ways to assign parameters with question marks. One uses the non-named parameter assignment method in the order of the parameters, and the other uses the named parameter assignment method, where the name must start with a $ symbol. + +Example: UpdateRelStyle(from, to, ?textColor, ?lineColor, ?offsetX, ?offsetY) ``` +UpdateRelStyle(customerA, bankA, "red", "blue", "-40", "60") +UpdateRelStyle(customerA, bankA, $offsetX="-40", $offsetY="60", $lineColor="blue", $textColor="red") +UpdateRelStyle(customerA, bankA, $offsetY="60") +``` \ No newline at end of file From 0c5b4948cf63d321b4f4491a5e646a7749df78b0 Mon Sep 17 00:00:00 2001 From: pinghe Date: Mon, 20 Jun 2022 16:04:30 +0800 Subject: [PATCH 04/24] Update docs. --- README.md | 71 ++++++++++++++++ README.zh-CN.md | 71 ++++++++++++++++ demos/index.html | 18 ++++ docs/c4c.md | 209 ++++++++++++++++++++++++++++++++++++++++++++++- 4 files changed, 368 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5c2eefa8ce..cfb7435c9d 100644 --- a/README.md +++ b/README.md @@ -219,6 +219,77 @@ pie Sit down: 3: Me ``` +### C4 diagram [docs] + +``` +C4Context +title System Context diagram for Internet Banking System + +Person(customerA, "Banking Customer A", "A customer of the bank, with personal bank accounts.") +Person(customerB, "Banking Customer B") +Person_Ext(customerC, "Banking Customer C") +System(SystemAA, "Internet Banking System", "Allows customers to view information about their bank accounts, and make payments.") + +Person(customerD, "Banking Customer D", "A customer of the bank,
with personal bank accounts.") + +Enterprise_Boundary(b1, "BankBoundary") { + + SystemDb_Ext(SystemE, "Mainframe Banking System", "Stores all of the core banking information about customers, accounts, transactions, etc.") + + System_Boundary(b2, "BankBoundary2") { + System(SystemA, "Banking System A") + System(SystemB, "Banking System B", "A system of the bank, with personal bank accounts.") + } + + System_Ext(SystemC, "E-mail system", "The internal Microsoft Exchange e-mail system.") + SystemDb(SystemD, "Banking System D Database", "A system of the bank, with personal bank accounts.") + + Boundary(b3, "BankBoundary3", "boundary") { + SystemQueue(SystemF, "Banking System F Queue", "A system of the bank, with personal bank accounts.") + SystemQueue_Ext(SystemG, "Banking System G Queue", "A system of the bank, with personal bank accounts.") + } +} + +BiRel(customerA, SystemAA, "Uses") +BiRel(SystemAA, SystemE, "Uses") +Rel(SystemAA, SystemC, "Sends e-mails", "SMTP") +Rel(SystemC, customerA, "Sends e-mails to") +``` +```mermaid +C4Context +title System Context diagram for Internet Banking System + +Person(customerA, "Banking Customer A", "A customer of the bank, with personal bank accounts.") +Person(customerB, "Banking Customer B") +Person_Ext(customerC, "Banking Customer C") +System(SystemAA, "Internet Banking System", "Allows customers to view information about their bank accounts, and make payments.") + +Person(customerD, "Banking Customer D", "A customer of the bank,
with personal bank accounts.") + +Enterprise_Boundary(b1, "BankBoundary") { + + SystemDb_Ext(SystemE, "Mainframe Banking System", "Stores all of the core banking information about customers, accounts, transactions, etc.") + + System_Boundary(b2, "BankBoundary2") { + System(SystemA, "Banking System A") + System(SystemB, "Banking System B", "A system of the bank, with personal bank accounts.") + } + + System_Ext(SystemC, "E-mail system", "The internal Microsoft Exchange e-mail system.") + SystemDb(SystemD, "Banking System D Database", "A system of the bank, with personal bank accounts.") + + Boundary(b3, "BankBoundary3", "boundary") { + SystemQueue(SystemF, "Banking System F Queue", "A system of the bank, with personal bank accounts.") + SystemQueue_Ext(SystemG, "Banking System G Queue", "A system of the bank, with personal bank accounts.") + } +} + +BiRel(customerA, SystemAA, "Uses") +BiRel(SystemAA, SystemE, "Uses") +Rel(SystemAA, SystemC, "Sends e-mails", "SMTP") +Rel(SystemC, customerA, "Sends e-mails to") +``` + ## Release For those who have the permission to do so: diff --git a/README.zh-CN.md b/README.zh-CN.md index 63a3ee4aa6..9516712d71 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -202,6 +202,77 @@ pie Sit down: 3: Me ``` +### C4 图 [文档] + +``` +C4Context +title System Context diagram for Internet Banking System + +Person(customerA, "Banking Customer A", "A customer of the bank, with personal bank accounts.") +Person(customerB, "Banking Customer B") +Person_Ext(customerC, "Banking Customer C") +System(SystemAA, "Internet Banking System", "Allows customers to view information about their bank accounts, and make payments.") + +Person(customerD, "Banking Customer D", "A customer of the bank,
with personal bank accounts.") + +Enterprise_Boundary(b1, "BankBoundary") { + + SystemDb_Ext(SystemE, "Mainframe Banking System", "Stores all of the core banking information about customers, accounts, transactions, etc.") + + System_Boundary(b2, "BankBoundary2") { + System(SystemA, "Banking System A") + System(SystemB, "Banking System B", "A system of the bank, with personal bank accounts.") + } + + System_Ext(SystemC, "E-mail system", "The internal Microsoft Exchange e-mail system.") + SystemDb(SystemD, "Banking System D Database", "A system of the bank, with personal bank accounts.") + + Boundary(b3, "BankBoundary3", "boundary") { + SystemQueue(SystemF, "Banking System F Queue", "A system of the bank, with personal bank accounts.") + SystemQueue_Ext(SystemG, "Banking System G Queue", "A system of the bank, with personal bank accounts.") + } +} + +BiRel(customerA, SystemAA, "Uses") +BiRel(SystemAA, SystemE, "Uses") +Rel(SystemAA, SystemC, "Sends e-mails", "SMTP") +Rel(SystemC, customerA, "Sends e-mails to") +``` +```mermaid +C4Context +title System Context diagram for Internet Banking System + +Person(customerA, "Banking Customer A", "A customer of the bank, with personal bank accounts.") +Person(customerB, "Banking Customer B") +Person_Ext(customerC, "Banking Customer C") +System(SystemAA, "Internet Banking System", "Allows customers to view information about their bank accounts, and make payments.") + +Person(customerD, "Banking Customer D", "A customer of the bank,
with personal bank accounts.") + +Enterprise_Boundary(b1, "BankBoundary") { + + SystemDb_Ext(SystemE, "Mainframe Banking System", "Stores all of the core banking information about customers, accounts, transactions, etc.") + + System_Boundary(b2, "BankBoundary2") { + System(SystemA, "Banking System A") + System(SystemB, "Banking System B", "A system of the bank, with personal bank accounts.") + } + + System_Ext(SystemC, "E-mail system", "The internal Microsoft Exchange e-mail system.") + SystemDb(SystemD, "Banking System D Database", "A system of the bank, with personal bank accounts.") + + Boundary(b3, "BankBoundary3", "boundary") { + SystemQueue(SystemF, "Banking System F Queue", "A system of the bank, with personal bank accounts.") + SystemQueue_Ext(SystemG, "Banking System G Queue", "A system of the bank, with personal bank accounts.") + } +} + +BiRel(customerA, SystemAA, "Uses") +BiRel(SystemAA, SystemE, "Uses") +Rel(SystemAA, SystemC, "Sends e-mails", "SMTP") +Rel(SystemC, customerA, "Sends e-mails to") +``` + ## 发布 对于有权限的同学来说,你可以通过以下步骤来完成发布操作: diff --git a/demos/index.html b/demos/index.html index ccf9cdf2a9..23fe83bd80 100644 --- a/demos/index.html +++ b/demos/index.html @@ -133,6 +133,18 @@ Rel(ma, sign, "Uses", "JSON/HTTPS") Rel(ma, accounts, "Uses", "JSON/HTTPS") + + UpdateRelStyle(spa, sign, $offsetY="-40") + UpdateRelStyle(spa, accounts, $offsetX="40", $offsetY="40") + + UpdateRelStyle(ma, sign, $offsetX="-90", $offsetY="40") + UpdateRelStyle(ma, accounts, $offsetY="-40") + + UpdateRelStyle(sign, security, $offsetX="-160", $offsetY="10") + UpdateRelStyle(accounts, mbsfacade, $offsetX="140", $offsetY="10") + UpdateRelStyle(security, db, $offsetY="-40") + UpdateRelStyle(mbsfacade, mbs, $offsetY="-40") +
@@ -197,6 +209,12 @@ Rel(api, db, "Reads from and writes to", "JDBC") Rel(api, db2, "Reads from and writes to", "JDBC") Rel_R(db, db2, "Replicates data to") + + UpdateRelStyle(spa, api, $offsetY="-40") + UpdateRelStyle(web, spa, $offsetY="-40") + UpdateRelStyle(api, db, $offsetY="-20", $offsetX="5") + UpdateRelStyle(api, db2, $offsetX="-40", $offsetY="-20") + UpdateRelStyle(db, db2, $offsetY="-10")

diff --git a/docs/c4c.md b/docs/c4c.md index 4facd44ba5..5af7193e31 100644 --- a/docs/c4c.md +++ b/docs/c4c.md @@ -1,4 +1,4 @@ -# C4C Diagrams +# C4 Diagrams **Edit this Page** [![N|Solid](img/GitHub-Mark-32px.png)](https://github.com/mermaid-js/mermaid/blob/develop/docs/gitgraph.md) > C4 Diagram: This is an experimental diagram for now. The syntax and properties can change in future releases. Proper documentation will be provided when the syntax is stable. @@ -157,4 +157,211 @@ UpdateRelStyle(customerA, bankA, "red", "blue", "-40", "60") UpdateRelStyle(customerA, bankA, $offsetX="-40", $offsetY="60", $lineColor="blue", $textColor="red") UpdateRelStyle(customerA, bankA, $offsetY="60") +``` + +## C4 System Context Diagram (C4Context) + +```mermaid-example + C4Context + title System Context diagram for Internet Banking System + Enterprise_Boundary(b0, "BankBoundary0") { + Person(customerA, "Banking Customer A", "A customer of the bank, with personal bank accounts.") + Person(customerB, "Banking Customer B") + Person_Ext(customerC, "Banking Customer C", "desc") + + Person(customerD, "Banking Customer D", "A customer of the bank,
with personal bank accounts.") + + System(SystemAA, "Internet Banking System", "Allows customers to view information about their bank accounts, and make payments.") + + Enterprise_Boundary(b1, "BankBoundary") { + + SystemDb_Ext(SystemE, "Mainframe Banking System", "Stores all of the core banking information about customers, accounts, transactions, etc.") + + System_Boundary(b2, "BankBoundary2") { + System(SystemA, "Banking System A") + System(SystemB, "Banking System B", "A system of the bank, with personal bank accounts. next line.") + } + + System_Ext(SystemC, "E-mail system", "The internal Microsoft Exchange e-mail system.") + SystemDb(SystemD, "Banking System D Database", "A system of the bank, with personal bank accounts.") + + Boundary(b3, "BankBoundary3", "boundary") { + SystemQueue(SystemF, "Banking System F Queue", "A system of the bank.") + SystemQueue_Ext(SystemG, "Banking System G Queue", "A system of the bank, with personal bank accounts.") + } + } + } + + BiRel(customerA, SystemAA, "Uses") + BiRel(SystemAA, SystemE, "Uses") + Rel(SystemAA, SystemC, "Sends e-mails", "SMTP") + Rel(SystemC, customerA, "Sends e-mails to") + + UpdateElementStyle(customerA, $fontColor="red", $bgColor="grey", $borderColor="red") + UpdateRelStyle(customerA, SystemAA, $textColor="blue", $lineColor="blue", $offsetX="5") + UpdateRelStyle(SystemAA, SystemE, $textColor="blue", $lineColor="blue", $offsetY="-10") + UpdateRelStyle(SystemAA, SystemC, $textColor="blue", $lineColor="blue", $offsetY="-40", $offsetX="-50") + UpdateRelStyle(SystemC, customerA, $textColor="red", $lineColor="red", $offsetX="-50", $offsetY="20") + + UpdateLayoutConfig($c4ShapeInRow="3", $c4BoundaryInRow="1") + +``` + +## C4 Container diagram (C4Container) + +```mermaid-example + C4Container + title Container diagram for Internet Banking System + + System_Ext(email_system, "E-Mail System", "The internal Microsoft Exchange system", $tags="v1.0") + Person(customer, Customer, "A customer of the bank, with personal bank accounts", $tags="v1.0") + + Container_Boundary(c1, "Internet Banking") { + Container(spa, "Single-Page App", "JavaScript, Angular", "Provides all the Internet banking functionality to cutomers via their web browser") + Container_Ext(mobile_app, "Mobile App", "C#, Xamarin", "Provides a limited subset of the Internet banking functionality to customers via their mobile device") + Container(web_app, "Web Application", "Java, Spring MVC", "Delivers the static content and the Internet banking SPA") + ContainerDb(database, "Database", "SQL Database", "Stores user registration information, hashed auth credentials, access logs, etc.") + ContainerDb_Ext(backend_api, "API Application", "Java, Docker Container", "Provides Internet banking functionality via API") + + } + + System_Ext(banking_system, "Mainframe Banking System", "Stores all of the core banking information about customers, accounts, transactions, etc.") + + Rel(customer, web_app, "Uses", "HTTPS") + UpdateRelStyle(customer, web_app, $offsetY="60", $offsetX="90") + Rel(customer, spa, "Uses", "HTTPS") + UpdateRelStyle(customer, spa, $offsetY="-40") + Rel(customer, mobile_app, "Uses") + UpdateRelStyle(customer, mobile_app, $offsetY="-30") + + Rel(web_app, spa, "Delivers") + UpdateRelStyle(web_app, spa, $offsetX="130") + Rel(spa, backend_api, "Uses", "async, JSON/HTTPS") + Rel(mobile_app, backend_api, "Uses", "async, JSON/HTTPS") + Rel_Back(database, backend_api, "Reads from and writes to", "sync, JDBC") + + Rel(email_system, customer, "Sends e-mails to") + UpdateRelStyle(email_system, customer, $offsetX="-45") + Rel(backend_api, email_system, "Sends e-mails using", "sync, SMTP") + UpdateRelStyle(backend_api, email_system, $offsetY="-60") + Rel(backend_api, banking_system, "Uses", "sync/async, XML/HTTPS") + UpdateRelStyle(backend_api, banking_system, $offsetY="-50", $offsetX="-140") + +``` + +## C4 Component diagram (C4Component) +```mermaid-example + C4Component + title Component diagram for Internet Banking System - API Application + + Container(spa, "Single Page Application", "javascript and angular", "Provides all the internet banking functionality to customers via their web browser.") + Container(ma, "Mobile App", "Xamarin", "Provides a limited subset ot the internet banking functionality to customers via their mobile mobile device.") + ContainerDb(db, "Database", "Relational Database Schema", "Stores user registration information, hashed authentication credentials, access logs, etc.") + System_Ext(mbs, "Mainframe Banking System", "Stores all of the core banking information about customers, accounts, transactions, etc.") + + Container_Boundary(api, "API Application") { + Component(sign, "Sign In Controller", "MVC Rest Controlle", "Allows users to sign in to the internet banking system") + Component(accounts, "Accounts Summary Controller", "MVC Rest Controller", "Provides customers with a summary of their bank accounts") + Component(security, "Security Component", "Spring Bean", "Provides functionality related to singing in, changing passwords, etc.") + Component(mbsfacade, "Mainframe Banking System Facade", "Spring Bean", "A facade onto the mainframe banking system.") + + Rel(sign, security, "Uses") + Rel(accounts, mbsfacade, "Uses") + Rel(security, db, "Read & write to", "JDBC") + Rel(mbsfacade, mbs, "Uses", "XML/HTTPS") + } + + Rel_Back(spa, sign, "Uses", "JSON/HTTPS") + Rel(spa, accounts, "Uses", "JSON/HTTPS") + + Rel(ma, sign, "Uses", "JSON/HTTPS") + Rel(ma, accounts, "Uses", "JSON/HTTPS") + + UpdateRelStyle(spa, sign, $offsetY="-40") + UpdateRelStyle(spa, accounts, $offsetX="40", $offsetY="40") + + UpdateRelStyle(ma, sign, $offsetX="-90", $offsetY="40") + UpdateRelStyle(ma, accounts, $offsetY="-40") + + UpdateRelStyle(sign, security, $offsetX="-160", $offsetY="10") + UpdateRelStyle(accounts, mbsfacade, $offsetX="140", $offsetY="10") + UpdateRelStyle(security, db, $offsetY="-40") + UpdateRelStyle(mbsfacade, mbs, $offsetY="-40") + +``` + +## C4 Dynamic diagram (C4Dynamic) + +```mermaid-example + C4Dynamic + title Dynamic diagram for Internet Banking System - API Application + + ContainerDb(c4, "Database", "Relational Database Schema", "Stores user registration information, hashed authentication credentials, access logs, etc.") + Container(c1, "Single-Page Application", "JavaScript and Angular", "Provides all of the Internet banking functionality to customers via their web browser.") + Container_Boundary(b, "API Application") { + Component(c3, "Security Component", "Spring Bean", "Provides functionality Related to signing in, changing passwords, etc.") + Component(c2, "Sign In Controller", "Spring MVC Rest Controller", "Allows users to sign in to the Internet Banking System.") + } + Rel(c1, c2, "Submits credentials to", "JSON/HTTPS") + Rel(c2, c3, "Calls isAuthenticated() on") + Rel(c3, c4, "select * from users where username = ?", "JDBC") + + UpdateRelStyle(c1, c2, $textColor="red", $offsetY="-40") + UpdateRelStyle(c2, c3, $textColor="red", $offsetX="-40", $offsetY="60") + UpdateRelStyle(c3, c4, $textColor="red", $offsetY="-40", $offsetX="10") + +``` + +## C4 Deployment diagram (C4Deployment) + +```mermaid-example + C4Deployment + title Deployment Diagram for Internet Banking System - Live + + Deployment_Node(mob, "Customer's mobile device", "Apple IOS or Android"){ + Container(mobile, "Mobile App", "Xamarin", "Provides a limited subset of the Internet Banking functionality to customers via their mobile device.") + } + + Deployment_Node(comp, "Customer's computer", "Mircosoft Windows or Apple macOS"){ + Deployment_Node(browser, "Web Browser", "Google Chrome, Mozilla Firefox,
Apple Safari or Microsoft Edge"){ + Container(spa, "Single Page Application", "JavaScript and Angular", "Provides all of the Internet Banking functionality to customers via their web browser.") + } + } + + Deployment_Node(plc, "Big Bank plc", "Big Bank plc data center"){ + Deployment_Node(dn, "bigbank-api*** x8", "Ubuntu 16.04 LTS"){ + Deployment_Node(apache, "Apache Tomcat", "Apache Tomcat 8.x"){ + Container(api, "API Application", "Java and Spring MVC", "Provides Internet Banking functionality via a JSON/HTTPS API.") + } + } + Deployment_Node(bb2, "bigbank-web*** x4", "Ubuntu 16.04 LTS"){ + Deployment_Node(apache2, "Apache Tomcat", "Apache Tomcat 8.x"){ + Container(web, "Web Application", "Java and Spring MVC", "Delivers the static content and the Internet Banking single page application.") + } + } + Deployment_Node(bigbankdb01, "bigbank-db01", "Ubuntu 16.04 LTS"){ + Deployment_Node(oracle, "Oracle - Primary", "Oracle 12c"){ + ContainerDb(db, "Database", "Relational Database Schema", "Stores user registration information, hashed authentication credentials, access logs, etc.") + } + } + Deployment_Node(bigbankdb02, "bigbank-db02", "Ubuntu 16.04 LTS") { + Deployment_Node(oracle2, "Oracle - Secondary", "Oracle 12c") { + ContainerDb(db2, "Database", "Relational Database Schema", "Stores user registration information, hashed authentication credentials, access logs, etc.") + } + } + } + + Rel(mobile, api, "Makes API calls to", "json/HTTPS") + Rel(spa, api, "Makes API calls to", "json/HTTPS") + Rel_U(web, spa, "Delivers to the customer's web browser") + Rel(api, db, "Reads from and writes to", "JDBC") + Rel(api, db2, "Reads from and writes to", "JDBC") + Rel_R(db, db2, "Replicates data to") + + UpdateRelStyle(spa, api, $offsetY="-40") + UpdateRelStyle(web, spa, $offsetY="-40") + UpdateRelStyle(api, db, $offsetY="-20", $offsetX="5") + UpdateRelStyle(api, db2, $offsetX="-40", $offsetY="-20") + UpdateRelStyle(db, db2, $offsetY="-10") + ``` \ No newline at end of file From ec2da8e85d56e2ade16eb687a857ccbcde09d592 Mon Sep 17 00:00:00 2001 From: Knut Sveidqvist Date: Tue, 21 Jun 2022 21:17:53 +0200 Subject: [PATCH 05/24] Only allowing a subset of characters in themeVariables --- cypress/e2e/other/ghsa.spec.js | 10 +++++++ cypress/helpers/util.js | 50 ++++++++++++++++++++++++++++++++++ cypress/platform/ghsa1.html | 28 +++++++++++++++++++ src/styles.js | 6 +++- src/utils.js | 11 ++++++++ 5 files changed, 104 insertions(+), 1 deletion(-) create mode 100644 cypress/e2e/other/ghsa.spec.js create mode 100644 cypress/platform/ghsa1.html diff --git a/cypress/e2e/other/ghsa.spec.js b/cypress/e2e/other/ghsa.spec.js new file mode 100644 index 0000000000..5b168a8a8f --- /dev/null +++ b/cypress/e2e/other/ghsa.spec.js @@ -0,0 +1,10 @@ +import { urlSnapshotTest } from '../../helpers/util'; + +describe('CSS injections', () => { + it('should not allow CSS injections outside of the diagram', () => { + urlSnapshotTest('http://localhost:9000/ghsa1.html', { + logLevel: 1, + flowchart: { htmlLabels: false }, + }); + }); +}); diff --git a/cypress/helpers/util.js b/cypress/helpers/util.js index bef4099365..dd3fdd2c92 100644 --- a/cypress/helpers/util.js +++ b/cypress/helpers/util.js @@ -70,6 +70,56 @@ export const imgSnapshotTest = (graphStr, _options, api = false, validation) => } }; +export const urlSnapshotTest = (url, _options, api = false, validation) => { + cy.log(_options); + const options = Object.assign(_options); + if (!options.fontFamily) { + options.fontFamily = 'courier'; + } + if (!options.sequence) { + options.sequence = {}; + } + if (!options.sequence || (options.sequence && !options.sequence.actorFontFamily)) { + options.sequence.actorFontFamily = 'courier'; + } + if (options.sequence && !options.sequence.noteFontFamily) { + options.sequence.noteFontFamily = 'courier'; + } + options.sequence.actorFontFamily = 'courier'; + options.sequence.noteFontFamily = 'courier'; + options.sequence.messageFontFamily = 'courier'; + if (options.sequence && !options.sequence.actorFontFamily) { + options.sequence.actorFontFamily = 'courier'; + } + if (!options.fontSize) { + options.fontSize = '16px'; + } + const useAppli = Cypress.env('useAppli'); + const branch = Cypress.env('codeBranch'); + cy.log('Hello ' + useAppli ? 'Appli' : 'image-snapshot'); + const name = (options.name || cy.state('runnable').fullTitle()).replace(/\s+/g, '-'); + + if (useAppli) { + cy.eyesOpen({ + appName: 'Mermaid-' + branch, + testName: name, + batchName: branch, + }); + } + + cy.visit(url); + if (validation) cy.get('svg').should(validation); + cy.get('body'); + // Default name to test title + + if (useAppli) { + cy.eyesCheckWindow('Click!'); + cy.eyesClose(); + } else { + cy.matchImageSnapshot(name); + } +}; + export const renderGraph = (graphStr, options, api) => { const url = mermaidUrl(graphStr, options, api); diff --git a/cypress/platform/ghsa1.html b/cypress/platform/ghsa1.html new file mode 100644 index 0000000000..bf2008d7ed --- /dev/null +++ b/cypress/platform/ghsa1.html @@ -0,0 +1,28 @@ + + + +
+

This element does not belong to the SVG but we can style it

+
+ + + + + + + + diff --git a/src/styles.js b/src/styles.js index d965af6314..15e804ef98 100644 --- a/src/styles.js +++ b/src/styles.js @@ -10,6 +10,7 @@ import sequence from './diagrams/sequence/styles'; import stateDiagram from './diagrams/state/styles'; import journey from './diagrams/user-journey/styles'; import c4 from './diagrams/c4/styles'; +import { log } from './logger'; const themes = { flowchart, @@ -30,7 +31,10 @@ const themes = { c4, }; -export const calcThemeVariables = (theme, userOverRides) => theme.calcColors(userOverRides); +export const calcThemeVariables = (theme, userOverRides) => { + log.info('userOverides', userOverRides); + return theme.calcColors(userOverRides); +}; const getStyles = (type, userStyles, options) => { return ` { diff --git a/src/utils.js b/src/utils.js index 7d44e7f7a2..9b8387cc48 100644 --- a/src/utils.js +++ b/src/utils.js @@ -1044,6 +1044,17 @@ export const directiveSanitizer = (args) => { }); } } + if (args.themeVariables) { + const kArr = Object.keys(args.themeVariables); + for (let i = 0; i < kArr.length; i++) { + const k = kArr[i]; + const val = args.themeVariables[k]; + if (!val.match(/^[a-zA-Z0-9#;]+$/)) { + args.themeVariables[k] = ''; + } + } + } + log.debug('After sanitization', args); }; export const sanitizeCss = (str) => { const stringsearch = 'o'; From 610f154c740e04edb8aa5d837b51654d0d898d6f Mon Sep 17 00:00:00 2001 From: Knut Sveidqvist Date: Tue, 21 Jun 2022 21:46:37 +0200 Subject: [PATCH 06/24] Sanitizsation of incoming variables that are added to the userStyles --- cypress/platform/ghsa2.html | 28 ++++++++++++++++++++++++++++ src/mermaidAPI.js | 2 ++ src/utils.js | 8 ++++++++ 3 files changed, 38 insertions(+) create mode 100644 cypress/platform/ghsa2.html diff --git a/cypress/platform/ghsa2.html b/cypress/platform/ghsa2.html new file mode 100644 index 0000000000..b4e390c6c4 --- /dev/null +++ b/cypress/platform/ghsa2.html @@ -0,0 +1,28 @@ + + + +
+

This element does not belong to the SVG but we can style it

+
+ + + + + + + + diff --git a/src/mermaidAPI.js b/src/mermaidAPI.js index efa93791a8..750c73cb1a 100644 --- a/src/mermaidAPI.js +++ b/src/mermaidAPI.js @@ -385,6 +385,8 @@ const render = function (id, _txt, cb, container) { let userStyles = ''; // user provided theme CSS + // If you add more configuration driven data into the user styles make sure that the value is + // sanitized bye the santiizeCSS function if (cnf.themeCSS !== undefined) { userStyles += `\n${cnf.themeCSS}`; } diff --git a/src/utils.js b/src/utils.js index 9b8387cc48..4d7854c226 100644 --- a/src/utils.js +++ b/src/utils.js @@ -1032,6 +1032,14 @@ export const directiveSanitizer = (args) => { log.debug('sanitizing themeCss option'); args[key] = sanitizeCss(args[key]); } + if (key.indexOf('fontFamily') >= 0) { + log.debug('sanitizing fontFamily option'); + args[key] = sanitizeCss(args[key]); + } + if (key.indexOf('altFontFamily') >= 0) { + log.debug('sanitizing altFontFamily option'); + args[key] = sanitizeCss(args[key]); + } if (configKeys.indexOf(key) < 0) { log.debug('sanitize deleting option', key); delete args[key]; From ca909edbed557db93436b67001821829ef4849aa Mon Sep 17 00:00:00 2001 From: yutotnh <57719497+yutotnh@users.noreply.github.com> Date: Wed, 22 Jun 2022 12:39:10 +0900 Subject: [PATCH 07/24] fix: Typo for documents and comments --- README.md | 2 +- docs/Setup.md | 2 +- docs/c4c.md | 2 +- docs/gitgraph.md | 6 +++--- docs/newDiagram.md | 6 +++--- src/dagre-wrapper/GraphObjects.md | 4 ++-- src/dagre-wrapper/clusters.js | 2 +- src/dagre-wrapper/edges.js | 4 ++-- src/dagre-wrapper/index.js | 4 ++-- src/dagre-wrapper/markers.js | 2 +- src/dagre-wrapper/mermaid-graphlib.js | 4 ++-- src/dagre-wrapper/nodes.js | 2 +- src/dagre-wrapper/patterns.js | 2 +- src/diagrams/c4/c4Renderer.js | 2 +- src/diagrams/c4/svgDraw.js | 2 +- src/diagrams/class/classRenderer-v2.js | 4 ++-- src/diagrams/class/classRenderer.js | 2 +- src/diagrams/er/erRenderer.js | 4 ++-- src/diagrams/flowchart/flowDb.js | 2 +- src/diagrams/gantt/ganttRenderer.js | 2 +- src/diagrams/git/gitGraphRenderer.js | 6 +++--- src/diagrams/info/infoRenderer.js | 2 +- src/diagrams/pie/pieRenderer.js | 2 +- src/diagrams/requirement/requirementRenderer.js | 2 +- src/diagrams/sequence/sequenceRenderer.js | 2 +- src/diagrams/state/shapes.js | 2 +- src/diagrams/state/stateRenderer.js | 2 +- src/diagrams/user-journey/journeyRenderer.js | 2 +- src/themes/theme-base.js | 6 +++--- 29 files changed, 43 insertions(+), 43 deletions(-) diff --git a/README.md b/README.md index 5c2eefa8ce..52c0f03675 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ English | [简体中文](./README.zh-CN.md) ## About -Mermaid is a Javascript based diagramming and charting tool that uses Markdown-inspired text definitions and a renderer to create and modify complex diagrams. The main purpose of Mermaid is to help documentation catch up with development. +Mermaid is a JavaScript based diagramming and charting tool that uses Markdown-inspired text definitions and a renderer to create and modify complex diagrams. The main purpose of Mermaid is to help documentation catch up with development. > Doc-Rot is a Catch-22 that Mermaid helps to solve. diff --git a/docs/Setup.md b/docs/Setup.md index 7ef31381e1..65e8ef7710 100644 --- a/docs/Setup.md +++ b/docs/Setup.md @@ -118,7 +118,7 @@ Default value: ['secure', 'securityLevel', 'startOnLoad', 'maxTextSize'] This option controls if the generated ids of nodes in the SVG are generated randomly or based on a seed. If set to false, the IDs are generated based on the current date and thus are not -deterministic. This is the default behaviour. +deterministic. This is the default behavior. **Notes**: diff --git a/docs/c4c.md b/docs/c4c.md index 9d1f1ec6f6..86c275a06c 100644 --- a/docs/c4c.md +++ b/docs/c4c.md @@ -5,7 +5,7 @@ -Mermaid's c4 diagram sytax is compatible with plantUML. See example below: +Mermaid's c4 diagram syntax is compatible with plantUML. See example below: ```mermaid-example C4Context diff --git a/docs/gitgraph.md b/docs/gitgraph.md index fe8f9b05a0..ee8c321e01 100644 --- a/docs/gitgraph.md +++ b/docs/gitgraph.md @@ -189,12 +189,12 @@ To use the `cherry-pick` keyword, you must specify the id using the `id` attrib `cherry-pick id: "your_custom_id"` -Here, a new commt representing the cherry pick is created on the current branch, and is visually highlighted in the diagram with a **cherry** and a tag depicting the commit id from which it is cherry picked from. +Here, a new commit representing the cherry pick is created on the current branch, and is visually highlighted in the diagram with a **cherry** and a tag depicting the commit id from which it is cherry picked from. Few Important rules to note here are: 1. You need to provide the `id` for an existing commit to be cherry picked. If given commit id does not exist it will result in an error. For this make use of the `commit id:$value` format of declaring commits. See the examples from above. 2. The given commit must not exist on the current branch. Cherry picked commit must always be a different branch than the current branch. -3. Current branch must have atleast one commit, before you can cherry pick a commit, otherwise it will case an error is throw. +3. Current branch must have at least one commit, before you can cherry pick a commit, otherwise it will cause an error is throw. Let see an example: ```mermaid-example @@ -272,7 +272,7 @@ Usage example: ``` ## Commit labels Layout: Rotated or Horizontal -Mermaid supports two types of commit labels layout. The default layout is **rotated**, which means the labels are placed below the commit circle, rotated at 45 degress for better readability. This is particularly useful for commits with long labels. +Mermaid supports two types of commit labels layout. The default layout is **rotated**, which means the labels are placed below the commit circle, rotated at 45 degrees for better readability. This is particularly useful for commits with long labels. The other option is **horizontal**, which means the labels are placed below the commit circle centred horizontally, and are not rotated. This is particularly useful for commits with short labels. diff --git a/docs/newDiagram.md b/docs/newDiagram.md index b17a0d6423..d2c9545c22 100644 --- a/docs/newDiagram.md +++ b/docs/newDiagram.md @@ -110,7 +110,7 @@ Look at `graphDb.js` for more details on that object. ## Layout -If you are using a dagre based layout, please use flowchart-v2 as a template and by doing that you will be using dagre-wrapper instead of dagreD3 which we are m igrating away from. +If you are using a dagre based layout, please use flowchart-v2 as a template and by doing that you will be using dagre-wrapper instead of dagreD3 which we are migrating away from. ### Common parts of a diagram @@ -129,7 +129,7 @@ Here is example handling from flowcharts: Jison: ```jison -/* lexial grammar */ +/* lexical grammar */ %lex %x open_directive %x type_directive @@ -175,7 +175,7 @@ It is probably a good idea to keep the handling similar to this in your new diag The syntax for adding title and description looks like this: ``` accTitle: The title -accDescr: The dsscription +accDescr: The description accDescr { Syntax for a description text diff --git a/src/dagre-wrapper/GraphObjects.md b/src/dagre-wrapper/GraphObjects.md index 52c7cd27cc..416dfeb73d 100644 --- a/src/dagre-wrapper/GraphObjects.md +++ b/src/dagre-wrapper/GraphObjects.md @@ -23,7 +23,7 @@ flowchart The new nodes C1 and C2 are a special type of nodes, clusterNodes. ClusterNodes have have the nodes in the cluster including the cluster attached in a graph object. -When rendering this diagram it it beeing rendered recursivly. The diagram is rendered by the dagre-mermaid:render function which in turn will be used to render the node C1 and the node C2. The result of those renderings will be inserted as nodes in the "root" diagram. With this recursive approach it would be possible to have different layout direction for each cluster. +When rendering this diagram it it beeing rendered recursively. The diagram is rendered by the dagre-mermaid:render function which in turn will be used to render the node C1 and the node C2. The result of those renderings will be inserted as nodes in the "root" diagram. With this recursive approach it would be possible to have different layout direction for each cluster. ``` { clusterNode: true, graph } @@ -74,7 +74,7 @@ This is set by the renderer of the diagram and insert the data that the wrapper | property | description | | ---------- | ----------------------------------------------------------------------------------------------------------- | -| labelStyle | Css styles for the label. User for instance for stylling the labels for clusters | +| labelStyle | Css styles for the label. User for instance for styling the labels for clusters | | shape | The shape of the node. | | labelText | The text on the label | | rx | The corner radius - maybe part of the shape instead? Used for rects. | diff --git a/src/dagre-wrapper/clusters.js b/src/dagre-wrapper/clusters.js index 67e91daec1..40729deadc 100644 --- a/src/dagre-wrapper/clusters.js +++ b/src/dagre-wrapper/clusters.js @@ -78,7 +78,7 @@ const rect = (parent, node) => { }; /** - * Non visiable cluster where the note is group with its + * Non visible cluster where the note is group with its * * @param {any} parent * @param {any} node diff --git a/src/dagre-wrapper/edges.js b/src/dagre-wrapper/edges.js index dbee50b12c..60ded826ec 100644 --- a/src/dagre-wrapper/edges.js +++ b/src/dagre-wrapper/edges.js @@ -313,7 +313,7 @@ const cutPathAtIntersect = (_points, boundryNode) => { // check if point is inside the boundry rect if (!outsideNode(boundryNode, point) && !isInside) { // First point inside the rect found - // Calc the intersection coord between the point anf the last opint ouside the rect + // Calc the intersection coord between the point anf the last point outside the rect const inter = intersection(boundryNode, lastPointOutside, point); log.warn('abc88 inside', point, lastPointOutside, inter); log.warn('abc88 intersection', inter); @@ -391,7 +391,7 @@ export const insertEdge = function (elem, e, edge, clusterDb, diagramType, graph // } // isInside = true; // } else { - // // outtside + // // outside // lastPointOutside = point; // if (!isInside) points.push(point); // } diff --git a/src/dagre-wrapper/index.js b/src/dagre-wrapper/index.js index ca9f0945ca..daf130f0d8 100644 --- a/src/dagre-wrapper/index.js +++ b/src/dagre-wrapper/index.js @@ -61,7 +61,7 @@ const recursiveRender = (_elem, graph, diagramtype, parentCluster) => { log.warn('Recursive render complete ', newEl, node); } else { if (graph.children(v).length > 0) { - // This is a cluster but not to be rendered recusively + // This is a cluster but not to be rendered recursively // Render as before log.info('Cluster - the non recursive path XXX', v, node.id, node, graph); log.info(findNonClusterChild(node.id, graph)); @@ -117,7 +117,7 @@ const recursiveRender = (_elem, graph, diagramtype, parentCluster) => { } else { // Non cluster node if (graph.children(v).length > 0) { - // A cluster in the non-recurive way + // A cluster in the non-recursive way // positionCluster(node); insertCluster(clusters, node); clusterDb[node.id].node = node; diff --git a/src/dagre-wrapper/markers.js b/src/dagre-wrapper/markers.js index e383feb5ef..ca2a122002 100644 --- a/src/dagre-wrapper/markers.js +++ b/src/dagre-wrapper/markers.js @@ -244,7 +244,7 @@ const barb = (elem, type) => { .attr('d', 'M 19,7 L9,13 L14,7 L9,1 Z'); }; -// TODO rename the class diagram markers to something shape descriptive and semanitc free +// TODO rename the class diagram markers to something shape descriptive and semantic free const markers = { extension, composition, diff --git a/src/dagre-wrapper/mermaid-graphlib.js b/src/dagre-wrapper/mermaid-graphlib.js index 0479ee6400..aa7414ff72 100644 --- a/src/dagre-wrapper/mermaid-graphlib.js +++ b/src/dagre-wrapper/mermaid-graphlib.js @@ -210,7 +210,7 @@ export const adjustClustersAndEdges = (graph, depth) => { } else { log.debug('Opting in, graph '); } - // Go through the nodes and for each cluster found, save a replacment node, this can be used when + // Go through the nodes and for each cluster found, save a replacement node, this can be used when // faking a link to a cluster graph.nodes().forEach(function (id) { const children = graph.children(id); @@ -257,7 +257,7 @@ export const adjustClustersAndEdges = (graph, depth) => { }); // For clusters with incoming and/or outgoing edges translate those edges to a real node - // in the cluster inorder to fake the edge + // in the cluster in order to fake the edge graph.edges().forEach(function (e) { const edge = graph.edge(e); log.warn('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(e)); diff --git a/src/dagre-wrapper/nodes.js b/src/dagre-wrapper/nodes.js index d949ec88e0..5f608b9498 100644 --- a/src/dagre-wrapper/nodes.js +++ b/src/dagre-wrapper/nodes.js @@ -877,7 +877,7 @@ const class_box = (parent, node) => { ); verticalPos = interfaceBBox.height + rowPadding; } - // Positin the class title label + // Position the class title label let diffX = (maxWidth - classTitleBBox.width) / 2; select(classTitleLabel).attr( 'transform', diff --git a/src/dagre-wrapper/patterns.js b/src/dagre-wrapper/patterns.js index 3f007b0eea..75afa8bcc0 100644 --- a/src/dagre-wrapper/patterns.js +++ b/src/dagre-wrapper/patterns.js @@ -45,7 +45,7 @@ const dots = (elem, type) => { .attr('d', 'M 19,7 L9,13 L14,7 L9,1 Z'); }; -// TODO rename the class diagram markers to something shape descriptive and semanitc free +// TODO rename the class diagram markers to something shape descriptive and semantic free const patterns = { dots, }; diff --git a/src/diagrams/c4/c4Renderer.js b/src/diagrams/c4/c4Renderer.js index d71e70e2ef..e238aa8178 100644 --- a/src/diagrams/c4/c4Renderer.js +++ b/src/diagrams/c4/c4Renderer.js @@ -568,7 +568,7 @@ function drawInsideBoundary(diagram, parentBoundaryAlias, parentBounds, currentB export const draw = function (text, id) { conf = configApi.getConfig().c4; const securityLevel = configApi.getConfig().securityLevel; - // Handle root and ocument for when rendering in sanbox mode + // Handle root and Document for when rendering in sanbox mode let sandboxElement; if (securityLevel === 'sandbox') { sandboxElement = select('#i' + id); diff --git a/src/diagrams/c4/svgDraw.js b/src/diagrams/c4/svgDraw.js index fb3a276dba..8882ae78d8 100644 --- a/src/diagrams/c4/svgDraw.js +++ b/src/diagrams/c4/svgDraw.js @@ -315,7 +315,7 @@ const drawBoundary = function (elem, boundary, conf) { drawRect(boundaryElem, rectData); - // draw lable + // draw label let boundaryConf = conf.boundaryFont(); boundaryConf.fontWeight = 'bold'; boundaryConf.fontSize = boundaryConf.fontSize + 2; diff --git a/src/diagrams/class/classRenderer-v2.js b/src/diagrams/class/classRenderer-v2.js index 509c2198ac..e892134f47 100644 --- a/src/diagrams/class/classRenderer-v2.js +++ b/src/diagrams/class/classRenderer-v2.js @@ -138,7 +138,7 @@ export const addClasses = function (classes, g) { }; /** - * Add edges to graph based on parsed graph defninition + * Add edges to graph based on parsed graph definition * * @param relations * @param {object} g The graph object @@ -317,7 +317,7 @@ export const draw = function (text, id) { // flowDb.addVertex(subG.id, subG.title, 'group', undefined, subG.classes); // } - // Fetch the verices/nodes and edges/links from the parsed graph definition + // Fetch the vertices/nodes and edges/links from the parsed graph definition const classes = classDb.getClasses(); const relations = classDb.getRelations(); diff --git a/src/diagrams/class/classRenderer.js b/src/diagrams/class/classRenderer.js index e9ff20df8e..83f5aa8f2b 100644 --- a/src/diagrams/class/classRenderer.js +++ b/src/diagrams/class/classRenderer.js @@ -168,7 +168,7 @@ export const draw = function (text, id) { log.info('Rendering diagram ' + text); const securityLevel = getConfig().securityLevel; - // Handle root and ocument for when rendering in sanbox mode + // Handle root and Document for when rendering in sanbox mode let sandboxElement; if (securityLevel === 'sandbox') { sandboxElement = select('#i' + id); diff --git a/src/diagrams/er/erRenderer.js b/src/diagrams/er/erRenderer.js index a8589da72c..e43b75ac08 100644 --- a/src/diagrams/er/erRenderer.js +++ b/src/diagrams/er/erRenderer.js @@ -547,7 +547,7 @@ export const draw = function (text, id) { const parser = erParser.parser; parser.yy = erDb; const securityLevel = getConfig().securityLevel; - // Handle root and ocument for when rendering in sanbox mode + // Handle root and Document for when rendering in sanbox mode let sandboxElement; if (securityLevel === 'sandbox') { sandboxElement = select('#i' + id); @@ -575,7 +575,7 @@ export const draw = function (text, id) { // --- // 1. Create all the entities in the svg node at 0,0, but with the correct dimensions (allowing for text content) // 2. Make sure they are all added to the graph - // 3. Add all the edges (relationships) to the graph aswell + // 3. Add all the edges (relationships) to the graph as well // 4. Let dagre do its magic to layout the graph. This assigns: // - the centre co-ordinates for each node, bearing in mind the dimensions and edge relationships // - the path co-ordinates for each edge diff --git a/src/diagrams/flowchart/flowDb.js b/src/diagrams/flowchart/flowDb.js index 00dc61913d..5cdec50bfe 100644 --- a/src/diagrams/flowchart/flowDb.js +++ b/src/diagrams/flowchart/flowDb.js @@ -465,7 +465,7 @@ export const addSubGraph = function (_id, list, _title) { const prims = { boolean: {}, number: {}, string: {} }; const objs = []; - let dir; // = unbdefined; direction.trim(); + let dir; // = undefined; direction.trim(); const nodeList = a.filter(function (item) { const type = typeof item; if (item.stmt && item.stmt === 'dir') { diff --git a/src/diagrams/gantt/ganttRenderer.js b/src/diagrams/gantt/ganttRenderer.js index 2cf46eae57..0065f14d9e 100644 --- a/src/diagrams/gantt/ganttRenderer.js +++ b/src/diagrams/gantt/ganttRenderer.js @@ -30,7 +30,7 @@ export const draw = function (text, id) { parser.parse(text); const securityLevel = getConfig().securityLevel; - // Handle root and ocument for when rendering in sanbox mode + // Handle root and Document for when rendering in sanbox mode let sandboxElement; if (securityLevel === 'sandbox') { sandboxElement = select('#i' + id); diff --git a/src/diagrams/git/gitGraphRenderer.js b/src/diagrams/git/gitGraphRenderer.js index 2735ea83d4..6ee9f18553 100644 --- a/src/diagrams/git/gitGraphRenderer.js +++ b/src/diagrams/git/gitGraphRenderer.js @@ -65,9 +65,9 @@ const drawText = (txt) => { }; /** - * Draws the commits with its symbol and labels. The function has tywo modes, one which only + * Draws the commits with its symbol and labels. The function has two modes, one which only * calculates the positions and one that does the actual drawing. This for a simple way getting the - * vertical leyering rcorrect in the graph. + * vertical layering correct in the graph. * * @param {any} svg * @param {any} commits @@ -345,7 +345,7 @@ const findLane = (y1, y2, _depth) => { }; /** - * This function draw trhe lines between the commits. They were arrows initially. + * This function draw the lines between the commits. They were arrows initially. * * @param {any} svg * @param {any} commit1 diff --git a/src/diagrams/info/infoRenderer.js b/src/diagrams/info/infoRenderer.js index b01931a22f..7b8f68251a 100644 --- a/src/diagrams/info/infoRenderer.js +++ b/src/diagrams/info/infoRenderer.js @@ -28,7 +28,7 @@ export const draw = (text, id, version) => { log.debug('Renering info diagram\n' + text); const securityLevel = getConfig().securityLevel; - // Handle root and ocument for when rendering in sanbox mode + // Handle root and Document for when rendering in sanbox mode let sandboxElement; if (securityLevel === 'sandbox') { sandboxElement = select('#i' + id); diff --git a/src/diagrams/pie/pieRenderer.js b/src/diagrams/pie/pieRenderer.js index 0c3df72202..b44dc97be4 100644 --- a/src/diagrams/pie/pieRenderer.js +++ b/src/diagrams/pie/pieRenderer.js @@ -25,7 +25,7 @@ export const draw = (txt, id) => { log.debug('Rendering info diagram\n' + txt); const securityLevel = configApi.getConfig().securityLevel; - // Handle root and ocument for when rendering in sanbox mode + // Handle root and Document for when rendering in sanbox mode let sandboxElement; if (securityLevel === 'sandbox') { sandboxElement = select('#i' + id); diff --git a/src/diagrams/requirement/requirementRenderer.js b/src/diagrams/requirement/requirementRenderer.js index ee26565298..f69805f039 100644 --- a/src/diagrams/requirement/requirementRenderer.js +++ b/src/diagrams/requirement/requirementRenderer.js @@ -324,7 +324,7 @@ export const draw = (text, id) => { parser.parse(text); const securityLevel = getConfig().securityLevel; - // Handle root and ocument for when rendering in sanbox mode + // Handle root and Document for when rendering in sanbox mode let sandboxElement; if (securityLevel === 'sandbox') { sandboxElement = select('#i' + id); diff --git a/src/diagrams/sequence/sequenceRenderer.js b/src/diagrams/sequence/sequenceRenderer.js index caa285a8a5..d83d9dc2bb 100644 --- a/src/diagrams/sequence/sequenceRenderer.js +++ b/src/diagrams/sequence/sequenceRenderer.js @@ -587,7 +587,7 @@ function adjustLoopHeightForWrap(loopWidths, msg, preMargin, postMargin, addLoop export const draw = function (text, id) { conf = configApi.getConfig().sequence; const securityLevel = configApi.getConfig().securityLevel; - // Handle root and ocument for when rendering in sanbox mode + // Handle root and Document for when rendering in sanbox mode let sandboxElement; if (securityLevel === 'sandbox') { sandboxElement = select('#i' + id); diff --git a/src/diagrams/state/shapes.js b/src/diagrams/state/shapes.js index 2a25e00057..c3826856e9 100644 --- a/src/diagrams/state/shapes.js +++ b/src/diagrams/state/shapes.js @@ -362,7 +362,7 @@ export const drawNote = (text, g) => { /** * Starting point for drawing a state. The function finds out the specifics about the state and - * renders with approprtiate function. + * renders with appropriate function. * * @param {any} elem * @param {any} stateDef diff --git a/src/diagrams/state/stateRenderer.js b/src/diagrams/state/stateRenderer.js index 536a7672f4..89af9386cc 100644 --- a/src/diagrams/state/stateRenderer.js +++ b/src/diagrams/state/stateRenderer.js @@ -48,7 +48,7 @@ const insertMarkers = function (elem) { export const draw = function (text, id) { conf = getConfig().state; const securityLevel = getConfig().securityLevel; - // Handle root and ocument for when rendering in sanbox mode + // Handle root and Document for when rendering in sanbox mode let sandboxElement; if (securityLevel === 'sandbox') { sandboxElement = select('#i' + id); diff --git a/src/diagrams/user-journey/journeyRenderer.js b/src/diagrams/user-journey/journeyRenderer.js index 24ab8cb8a4..5fcaec0203 100644 --- a/src/diagrams/user-journey/journeyRenderer.js +++ b/src/diagrams/user-journey/journeyRenderer.js @@ -56,7 +56,7 @@ export const draw = function (text, id) { parser.parse(text + '\n'); const securityLevel = getConfig().securityLevel; - // Handle root and ocument for when rendering in sanbox mode + // Handle root and Document for when rendering in sanbox mode let sandboxElement; if (securityLevel === 'sandbox') { sandboxElement = select('#i' + id); diff --git a/src/themes/theme-base.js b/src/themes/theme-base.js index 551103ee3a..fcac86dd50 100644 --- a/src/themes/theme-base.js +++ b/src/themes/theme-base.js @@ -5,7 +5,7 @@ class Theme { /** # Base variables */ /** * - Background - used to know what the background color is of the diagram. This is used for - * deducing colors for istance line color. Defaulr value is #f4f4f4. + * deducing colors for instance line color. Default value is #f4f4f4. */ this.background = '#f4f4f4'; this.darkMode = false; @@ -21,7 +21,7 @@ class Theme { this.fontSize = '16px'; } updateColors() { - // The || is to make sure that if the variable has been defiend by a user override that value is to be used + // The || is to make sure that if the variable has been defined by a user override that value is to be used /* Main */ this.primaryTextColor = this.primaryTextColor || (this.darkMode ? '#eee' : '#333'); // invert(this.primaryColor); @@ -103,7 +103,7 @@ class Theme { /* state colors */ this.transitionColor = this.transitionColor || this.lineColor; this.transitionLabelColor = this.transitionLabelColor || this.textColor; - /* The color of the text tables of the tstates*/ + /* The color of the text tables of the states*/ this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor; this.stateBkg = this.stateBkg || this.mainBkg; From 2792bb41de047e2b7587d4ac5ce050a7eebc4f7c Mon Sep 17 00:00:00 2001 From: Knut Sveidqvist Date: Wed, 22 Jun 2022 08:16:55 +0200 Subject: [PATCH 08/24] Updated allowed characters to accomodate fonts and rgba colors --- src/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.js b/src/utils.js index 4d7854c226..805556dd6a 100644 --- a/src/utils.js +++ b/src/utils.js @@ -1057,7 +1057,7 @@ export const directiveSanitizer = (args) => { for (let i = 0; i < kArr.length; i++) { const k = kArr[i]; const val = args.themeVariables[k]; - if (!val.match(/^[a-zA-Z0-9#;]+$/)) { + if (!val.match(/^[a-zA-Z0-9#,";()%. ]+$/)) { args.themeVariables[k] = ''; } } From 673b375cd9f2db40fcd3653bf784530acef1101d Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Thu, 23 Jun 2022 09:15:17 +0300 Subject: [PATCH 09/24] fix: De-duplicates dependencies (#3167) closes #3166 --- package.json | 3 + yarn.lock | 480 +++------------------------------------------------ 2 files changed, 31 insertions(+), 452 deletions(-) diff --git a/package.json b/package.json index 8e03694fa5..3f1af21c8c 100644 --- a/package.json +++ b/package.json @@ -112,6 +112,9 @@ "webpack-merge": "^5.8.0", "webpack-node-externals": "^3.0.0" }, + "resolutions": { + "d3": "^7.0.0" + }, "files": [ "dist" ], diff --git a/yarn.lock b/yarn.lock index 607445c432..34b56f1409 100644 --- a/yarn.lock +++ b/yarn.lock @@ -314,14 +314,7 @@ "@jridgewell/gen-mapping" "^0.3.0" jsesc "^2.5.1" -"@babel/helper-annotate-as-pure@^7.16.0": - version "7.16.0" - resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.16.0.tgz#9a1f0ebcda53d9a2d00108c4ceace6a5d5f1f08d" - integrity sha512-ItmYF9vR4zA8cByDocY05o0LGUkp1zhbTQOH1NFyl5xXEqlTJQCEJjieriw+aFpxo16swMxUnUiKS7a/r4vtHg== - dependencies: - "@babel/types" "^7.16.0" - -"@babel/helper-annotate-as-pure@^7.16.7": +"@babel/helper-annotate-as-pure@^7.16.0", "@babel/helper-annotate-as-pure@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.16.7.tgz#bb2339a7534a9c128e3102024c60760a3a7f3862" integrity sha512-s6t2w/IPQVTAET1HitoowRGXooX8mCgtuP5195wD/QJPV6wYjpujCGF7JuMODVX2ZAJOf1GT6DT9MHEZvLOFSw== @@ -346,19 +339,7 @@ browserslist "^4.20.2" semver "^6.3.0" -"@babel/helper-create-class-features-plugin@^7.16.0": - version "7.16.0" - resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.16.0.tgz#090d4d166b342a03a9fec37ef4fd5aeb9c7c6a4b" - integrity sha512-XLwWvqEaq19zFlF5PTgOod4bUA+XbkR4WLQBct1bkzmxJGB0ZEJaoKF4c8cgH9oBtCDuYJ8BP5NB9uFiEgO5QA== - dependencies: - "@babel/helper-annotate-as-pure" "^7.16.0" - "@babel/helper-function-name" "^7.16.0" - "@babel/helper-member-expression-to-functions" "^7.16.0" - "@babel/helper-optimise-call-expression" "^7.16.0" - "@babel/helper-replace-supers" "^7.16.0" - "@babel/helper-split-export-declaration" "^7.16.0" - -"@babel/helper-create-class-features-plugin@^7.17.12", "@babel/helper-create-class-features-plugin@^7.18.0": +"@babel/helper-create-class-features-plugin@^7.16.0", "@babel/helper-create-class-features-plugin@^7.17.12", "@babel/helper-create-class-features-plugin@^7.18.0": version "7.18.0" resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.18.0.tgz#fac430912606331cb075ea8d82f9a4c145a4da19" integrity sha512-Kh8zTGR9de3J63e5nS0rQUdRs/kbtwoeQQ0sriS0lItjC96u8XXZN6lKpuyWd2coKSU13py/y+LTmThLuVX0Pg== @@ -371,15 +352,7 @@ "@babel/helper-replace-supers" "^7.16.7" "@babel/helper-split-export-declaration" "^7.16.7" -"@babel/helper-create-regexp-features-plugin@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.16.7.tgz#0cb82b9bac358eb73bfbd73985a776bfa6b14d48" - integrity sha512-fk5A6ymfp+O5+p2yCkXAu5Kyj6v0xh0RBeNcAkYUMDvvAAoxvSKXn+Jb37t/yWFiQVDFK1ELpUTD8/aLhCPu+g== - dependencies: - "@babel/helper-annotate-as-pure" "^7.16.7" - regexpu-core "^4.7.1" - -"@babel/helper-create-regexp-features-plugin@^7.17.12": +"@babel/helper-create-regexp-features-plugin@^7.16.7", "@babel/helper-create-regexp-features-plugin@^7.17.12": version "7.17.12" resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.17.12.tgz#bb37ca467f9694bbe55b884ae7a5cc1e0084e4fd" integrity sha512-b2aZrV4zvutr9AIa6/gA3wsZKRwTKYoDxYiFKcESS3Ug2GTXzwBEvMuuFLhCQpEnRXs1zng4ISAXSUxxKBIcxw== @@ -387,21 +360,7 @@ "@babel/helper-annotate-as-pure" "^7.16.7" regexpu-core "^5.0.1" -"@babel/helper-define-polyfill-provider@^0.3.0": - version "0.3.0" - resolved "https://registry.yarnpkg.com/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.0.tgz#c5b10cf4b324ff840140bb07e05b8564af2ae971" - integrity sha512-7hfT8lUljl/tM3h+izTX/pO3W3frz2ok6Pk+gzys8iJqDfZrZy2pXjRTZAvG2YmfHun1X4q8/UZRLatMfqc5Tg== - dependencies: - "@babel/helper-compilation-targets" "^7.13.0" - "@babel/helper-module-imports" "^7.12.13" - "@babel/helper-plugin-utils" "^7.13.0" - "@babel/traverse" "^7.13.0" - debug "^4.1.1" - lodash.debounce "^4.0.8" - resolve "^1.14.2" - semver "^6.1.2" - -"@babel/helper-define-polyfill-provider@^0.3.1": +"@babel/helper-define-polyfill-provider@^0.3.0", "@babel/helper-define-polyfill-provider@^0.3.1": version "0.3.1" resolved "https://registry.yarnpkg.com/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.1.tgz#52411b445bdb2e676869e5a74960d2d3826d2665" integrity sha512-J9hGMpJQmtWmj46B3kBHmL38UhJGhYX7eqkcq+2gsstyYt341HmPeWspihX43yVRA0mS+8GGk2Gckc7bY/HCmA== @@ -415,14 +374,7 @@ resolve "^1.14.2" semver "^6.1.2" -"@babel/helper-environment-visitor@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.16.7.tgz#ff484094a839bde9d89cd63cba017d7aae80ecd7" - integrity sha512-SLLb0AAn6PkUeAfKJCCOl9e1R53pQlGAfc4y4XuMRZfqeMYLE0dM1LMhqbGAlGQY0lfw5/ohoYWAe9V1yibRag== - dependencies: - "@babel/types" "^7.16.7" - -"@babel/helper-environment-visitor@^7.18.2": +"@babel/helper-environment-visitor@^7.16.7", "@babel/helper-environment-visitor@^7.18.2": version "7.18.2" resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.2.tgz#8a6d2dedb53f6bf248e31b4baf38739ee4a637bd" integrity sha512-14GQKWkX9oJzPiQQ7/J36FTXcD4kSp8egKjO9nINlSKiHITRA9q/R74qu8S9xlc/b/yjsJItQUeeh3xnGN0voQ== @@ -434,25 +386,7 @@ dependencies: "@babel/types" "^7.16.7" -"@babel/helper-function-name@^7.16.0": - version "7.16.0" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.16.0.tgz#b7dd0797d00bbfee4f07e9c4ea5b0e30c8bb1481" - integrity sha512-BZh4mEk1xi2h4HFjWUXRQX5AEx4rvaZxHgax9gcjdLWdkjsY7MKt5p0otjsg5noXw+pB+clMCjw+aEVYADMjog== - dependencies: - "@babel/helper-get-function-arity" "^7.16.0" - "@babel/template" "^7.16.0" - "@babel/types" "^7.16.0" - -"@babel/helper-function-name@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.16.7.tgz#f1ec51551fb1c8956bc8dd95f38523b6cf375f8f" - integrity sha512-QfDfEnIUyyBSR3HtrtGECuZ6DAyCkYFp7GHl75vFtTnn6pjKeK0T1DB5lLkFvBea8MdaiUABx3osbgLyInoejA== - dependencies: - "@babel/helper-get-function-arity" "^7.16.7" - "@babel/template" "^7.16.7" - "@babel/types" "^7.16.7" - -"@babel/helper-function-name@^7.17.9": +"@babel/helper-function-name@^7.16.0", "@babel/helper-function-name@^7.16.7", "@babel/helper-function-name@^7.17.9": version "7.17.9" resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.17.9.tgz#136fcd54bc1da82fcb47565cf16fd8e444b1ff12" integrity sha512-7cRisGlVtiVqZ0MW0/yFB4atgpGLWEHUVYnb448hZK4x+vih0YO5UoS11XIYtZYqHd0dIPMdUSv8q5K4LdMnIg== @@ -460,14 +394,7 @@ "@babel/template" "^7.16.7" "@babel/types" "^7.17.0" -"@babel/helper-get-function-arity@^7.16.0": - version "7.16.0" - resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.0.tgz#0088c7486b29a9cb5d948b1a1de46db66e089cfa" - integrity sha512-ASCquNcywC1NkYh/z7Cgp3w31YW8aojjYIlNg4VeJiHkqyP4AzIvr4qx7pYDb4/s8YcsZWqqOSxgkvjUz1kpDQ== - dependencies: - "@babel/types" "^7.16.0" - -"@babel/helper-get-function-arity@^7.16.7": +"@babel/helper-get-function-arity@^7.16.0", "@babel/helper-get-function-arity@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.7.tgz#ea08ac753117a669f1508ba06ebcc49156387419" integrity sha512-flc+RLSOBXzNzVhcLu6ujeHUrD6tANAOU5ojrRx/as+tbzf8+stUCj7+IfRRoAbEZqj/ahXEMsjhOhgeZsrnTw== @@ -481,35 +408,14 @@ dependencies: "@babel/types" "^7.16.7" -"@babel/helper-member-expression-to-functions@^7.16.0": - version "7.16.0" - resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.16.0.tgz#29287040efd197c77636ef75188e81da8bccd5a4" - integrity sha512-bsjlBFPuWT6IWhl28EdrQ+gTvSvj5tqVP5Xeftp07SEuz5pLnsXZuDkDD3Rfcxy0IsHmbZ+7B2/9SHzxO0T+sQ== - dependencies: - "@babel/types" "^7.16.0" - -"@babel/helper-member-expression-to-functions@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.16.7.tgz#42b9ca4b2b200123c3b7e726b0ae5153924905b0" - integrity sha512-VtJ/65tYiU/6AbMTDwyoXGPKHgTsfRarivm+YbB5uAzKUyuPjgZSgAFeG87FCigc7KNHu2Pegh1XIT3lXjvz3Q== - dependencies: - "@babel/types" "^7.16.7" - -"@babel/helper-member-expression-to-functions@^7.17.7": +"@babel/helper-member-expression-to-functions@^7.16.0", "@babel/helper-member-expression-to-functions@^7.16.7", "@babel/helper-member-expression-to-functions@^7.17.7": version "7.17.7" resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.17.7.tgz#a34013b57d8542a8c4ff8ba3f747c02452a4d8c4" integrity sha512-thxXgnQ8qQ11W2wVUObIqDL4p148VMxkt5T/qpN5k2fboRyzFGFmKsTGViquyM5QHKUy48OZoca8kw4ajaDPyw== dependencies: "@babel/types" "^7.17.0" -"@babel/helper-module-imports@^7.12.13", "@babel/helper-module-imports@^7.16.0": - version "7.16.0" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.16.0.tgz#90538e60b672ecf1b448f5f4f5433d37e79a3ec3" - integrity sha512-kkH7sWzKPq0xt3H1n+ghb4xEMP8k0U7XV3kkB+ZGy69kDk2ySFW1qPi06sjKzFY3t1j6XbJSqr4mF9L7CYVyhg== - dependencies: - "@babel/types" "^7.16.0" - -"@babel/helper-module-imports@^7.16.7": +"@babel/helper-module-imports@^7.12.13", "@babel/helper-module-imports@^7.16.0", "@babel/helper-module-imports@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.16.7.tgz#25612a8091a999704461c8a222d0efec5d091437" integrity sha512-LVtS6TqjJHFc+nYeITRo6VLXve70xmq7wPhWTqDJusJEgGmkAACWwMiTNrvfoQo6hEhFwAIixNkvB0jPXDL8Wg== @@ -530,14 +436,7 @@ "@babel/traverse" "^7.18.0" "@babel/types" "^7.18.0" -"@babel/helper-optimise-call-expression@^7.16.0": - version "7.16.0" - resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.16.0.tgz#cecdb145d70c54096b1564f8e9f10cd7d193b338" - integrity sha512-SuI467Gi2V8fkofm2JPnZzB/SUuXoJA5zXe/xzyPP2M04686RzFKFHPK6HDVN6JvWBIEW8tt9hPR7fXdn2Lgpw== - dependencies: - "@babel/types" "^7.16.0" - -"@babel/helper-optimise-call-expression@^7.16.7": +"@babel/helper-optimise-call-expression@^7.16.0", "@babel/helper-optimise-call-expression@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.16.7.tgz#a34e3560605abbd31a18546bd2aad3e6d9a174f2" integrity sha512-EtgBhg7rd/JcnpZFXpBy0ze1YRfdm7BnBX4uKMBd3ixa3RGAE002JZB66FJyNH7g0F38U05pXmA5P8cBh7z+1w== @@ -558,17 +457,7 @@ "@babel/helper-wrap-function" "^7.16.8" "@babel/types" "^7.16.8" -"@babel/helper-replace-supers@^7.16.0": - version "7.16.0" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.16.0.tgz#73055e8d3cf9bcba8ddb55cad93fedc860f68f17" - integrity sha512-TQxuQfSCdoha7cpRNJvfaYxxxzmbxXw/+6cS7V02eeDYyhxderSoMVALvwupA54/pZcOTtVeJ0xccp1nGWladA== - dependencies: - "@babel/helper-member-expression-to-functions" "^7.16.0" - "@babel/helper-optimise-call-expression" "^7.16.0" - "@babel/traverse" "^7.16.0" - "@babel/types" "^7.16.0" - -"@babel/helper-replace-supers@^7.16.7": +"@babel/helper-replace-supers@^7.16.0", "@babel/helper-replace-supers@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.16.7.tgz#e9f5f5f32ac90429c1a4bdec0f231ef0c2838ab1" integrity sha512-y9vsWilTNaVnVh6xiJfABzsNpgDPKev9HnAgz6Gb1p6UUwf9NepdlsV7VXGCftJM+jqD5f7JIEubcpLjZj5dBw== @@ -579,14 +468,7 @@ "@babel/traverse" "^7.16.7" "@babel/types" "^7.16.7" -"@babel/helper-simple-access@^7.17.7": - version "7.17.7" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.17.7.tgz#aaa473de92b7987c6dfa7ce9a7d9674724823367" - integrity sha512-txyMCGroZ96i+Pxr3Je3lzEJjqwaRC9buMUgtomcrLe5Nd0+fk1h0LLA+ixUF5OW7AhHuQ7Es1WcQJZmZsz2XA== - dependencies: - "@babel/types" "^7.17.0" - -"@babel/helper-simple-access@^7.18.2": +"@babel/helper-simple-access@^7.17.7", "@babel/helper-simple-access@^7.18.2": version "7.18.2" resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.18.2.tgz#4dc473c2169ac3a1c9f4a51cfcd091d1c36fcff9" integrity sha512-7LIrjYzndorDY88MycupkpQLKS1AFfsVRm2k/9PtKScSy5tZq0McZTj+DiMRynboZfIqOKvo03pmhTaUgiD6fQ== @@ -600,14 +482,7 @@ dependencies: "@babel/types" "^7.16.0" -"@babel/helper-split-export-declaration@^7.16.0": - version "7.16.0" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.0.tgz#29672f43663e936df370aaeb22beddb3baec7438" - integrity sha512-0YMMRpuDFNGTHNRiiqJX19GjNXA4H0E8jZ2ibccfSxaCogbm3am5WN/2nQNj0YnQwGWM1J06GOcQ2qnh3+0paw== - dependencies: - "@babel/types" "^7.16.0" - -"@babel/helper-split-export-declaration@^7.16.7": +"@babel/helper-split-export-declaration@^7.16.0", "@babel/helper-split-export-declaration@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz#0b648c0c42da9d3920d85ad585f2778620b8726b" integrity sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw== @@ -624,17 +499,7 @@ resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.16.7.tgz#b203ce62ce5fe153899b617c08957de860de4d23" integrity sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ== -"@babel/helper-wrap-function@^7.16.0": - version "7.16.0" - resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.16.0.tgz#b3cf318afce774dfe75b86767cd6d68f3482e57c" - integrity sha512-VVMGzYY3vkWgCJML+qVLvGIam902mJW0FvT7Avj1zEe0Gn7D93aWdLblYARTxEw+6DhZmtzhBM2zv0ekE5zg1g== - dependencies: - "@babel/helper-function-name" "^7.16.0" - "@babel/template" "^7.16.0" - "@babel/traverse" "^7.16.0" - "@babel/types" "^7.16.0" - -"@babel/helper-wrap-function@^7.16.8": +"@babel/helper-wrap-function@^7.16.0", "@babel/helper-wrap-function@^7.16.8": version "7.16.8" resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.16.8.tgz#58afda087c4cd235de92f7ceedebca2c41274200" integrity sha512-8RpyRVIAW1RcDDGTA+GpPAwV22wXCfKOoM9bet6TLkGIFTkRQSkH1nMQ5Yet4MpoXe1ZwHPVtNasc2w0uZMqnw== @@ -2739,15 +2604,7 @@ abort-controller@3.0.0: dependencies: event-target-shim "^5.0.0" -accepts@~1.3.4, accepts@~1.3.5: - version "1.3.7" - resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" - integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA== - dependencies: - mime-types "~2.1.24" - negotiator "0.6.2" - -accepts@~1.3.8: +accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.8: version "1.3.8" resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw== @@ -3810,16 +3667,16 @@ comma-separated-tokens@^1.0.1: resolved "https://registry.yarnpkg.com/comma-separated-tokens/-/comma-separated-tokens-1.0.8.tgz#632b80b6117867a158f1080ad498b2fbe7e3f5ea" integrity sha512-GHuDRO12Sypu2cV70d1dkA2EUmXHgntrzbpvOB+Qy+49ypNfGgFQIC2fhhXbnyrJRynDCAARsT7Ou0M6hirpfw== -commander@2, commander@^2.20.0: - version "2.20.3" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" - integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== - commander@7, commander@^7.0.0: version "7.2.0" resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== +commander@^2.20.0: + version "2.20.3" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== + commander@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/commander/-/commander-5.1.0.tgz#46abbd1652f8e059bddaef99bbdcb2ad9cf179ae" @@ -3957,7 +3814,7 @@ continuable-cache@^0.3.1: resolved "https://registry.yarnpkg.com/continuable-cache/-/continuable-cache-0.3.1.tgz#bd727a7faed77e71ff3985ac93351a912733ad0f" integrity sha1-vXJ6f67XfnH/OYWskzUakSczrQ8= -conventional-changelog-angular@^5.0.11: +conventional-changelog-angular@^5.0.11, conventional-changelog-angular@^5.0.12: version "5.0.13" resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.13.tgz#896885d63b914a70d4934b59d2fe7bde1832b28c" integrity sha512-i/gipMxs7s8L/QeuavPF2hLnJgH6pEZAttySB6aiQLWcX3puWDL3ACVmvBhJGxnAy52Qc15ua26BufY6KpmrVA== @@ -3965,14 +3822,6 @@ conventional-changelog-angular@^5.0.11: compare-func "^2.0.0" q "^1.5.1" -conventional-changelog-angular@^5.0.12: - version "5.0.12" - resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.12.tgz#c979b8b921cbfe26402eb3da5bbfda02d865a2b9" - integrity sha512-5GLsbnkR/7A89RyHLvvoExbiGbd9xKdKqDTrArnPbOqBqG/2wIosu0fHwpeIRI8Tl94MhVNBXcLJZl92ZQ5USw== - dependencies: - compare-func "^2.0.0" - q "^1.5.1" - conventional-changelog-atom@^2.0.8: version "2.0.8" resolved "https://registry.yarnpkg.com/conventional-changelog-atom/-/conventional-changelog-atom-2.0.8.tgz#a759ec61c22d1c1196925fca88fe3ae89fd7d8de" @@ -4324,11 +4173,6 @@ cypress@10.1.0: untildify "^4.0.0" yauzl "^2.10.0" -d3-array@1, d3-array@^1.1.1, d3-array@^1.2.0: - version "1.2.4" - resolved "https://registry.yarnpkg.com/d3-array/-/d3-array-1.2.4.tgz#635ce4d5eea759f6f605863dbcfc30edc737f71f" - integrity sha512-KHW6M86R+FUPYGb3R5XiYjXPq7VzwxZ22buHhAEVG5ztoEcZZMLov530mmccaqA1GghZArjQV46fuc8kUqhhHw== - "d3-array@2 - 3", "d3-array@2.10.0 - 3", "d3-array@2.5.0 - 3", d3-array@3: version "3.1.1" resolved "https://registry.yarnpkg.com/d3-array/-/d3-array-3.1.1.tgz#7797eb53ead6b9083c75a45a681e93fc41bc468c" @@ -4336,27 +4180,11 @@ d3-array@1, d3-array@^1.1.1, d3-array@^1.2.0: dependencies: internmap "1 - 2" -d3-axis@1: - version "1.0.12" - resolved "https://registry.yarnpkg.com/d3-axis/-/d3-axis-1.0.12.tgz#cdf20ba210cfbb43795af33756886fb3638daac9" - integrity sha512-ejINPfPSNdGFKEOAtnBtdkpr24c4d4jsei6Lg98mxf424ivoDP2956/5HDpIAtmHo85lqT4pruy+zEgvRUBqaQ== - d3-axis@3: version "3.0.0" resolved "https://registry.yarnpkg.com/d3-axis/-/d3-axis-3.0.0.tgz#c42a4a13e8131d637b745fc2973824cfeaf93322" integrity sha512-IH5tgjV4jE/GhHkRV0HiVYPDtvfjHQlQfJHs0usq7M30XcSBvOotpmH1IgkcXsO/5gEQZD43B//fc7SRT5S+xw== -d3-brush@1: - version "1.1.6" - resolved "https://registry.yarnpkg.com/d3-brush/-/d3-brush-1.1.6.tgz#b0a22c7372cabec128bdddf9bddc058592f89e9b" - integrity sha512-7RW+w7HfMCPyZLifTz/UnJmI5kdkXtpCbombUSs8xniAyo0vIbrDzDwUJB6eJOgl9u5DQOt2TQlYumxzD1SvYA== - dependencies: - d3-dispatch "1" - d3-drag "1" - d3-interpolate "1" - d3-selection "1" - d3-transition "1" - d3-brush@3: version "3.0.0" resolved "https://registry.yarnpkg.com/d3-brush/-/d3-brush-3.0.0.tgz#6f767c4ed8dcb79de7ede3e1c0f89e63ef64d31c" @@ -4368,14 +4196,6 @@ d3-brush@3: d3-selection "3" d3-transition "3" -d3-chord@1: - version "1.0.6" - resolved "https://registry.yarnpkg.com/d3-chord/-/d3-chord-1.0.6.tgz#309157e3f2db2c752f0280fedd35f2067ccbb15f" - integrity sha512-JXA2Dro1Fxw9rJe33Uv+Ckr5IrAa74TlfDEhE/jfLOaXegMQFQTAgAw9WnZL8+HxVBRXaRGCkrNU7pJeylRIuA== - dependencies: - d3-array "1" - d3-path "1" - d3-chord@3: version "3.0.1" resolved "https://registry.yarnpkg.com/d3-chord/-/d3-chord-3.0.1.tgz#d156d61f485fce8327e6abf339cb41d8cbba6966" @@ -4383,28 +4203,11 @@ d3-chord@3: dependencies: d3-path "1 - 3" -d3-collection@1: - version "1.0.7" - resolved "https://registry.yarnpkg.com/d3-collection/-/d3-collection-1.0.7.tgz#349bd2aa9977db071091c13144d5e4f16b5b310e" - integrity sha512-ii0/r5f4sjKNTfh84Di+DpztYwqKhEyUlKoPrzUFfeSkWxjW49xU2QzO9qrPrNkpdI0XJkfzvmTu8V2Zylln6A== - -d3-color@1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/d3-color/-/d3-color-1.4.1.tgz#c52002bf8846ada4424d55d97982fef26eb3bc8a" - integrity sha512-p2sTHSLCJI2QKunbGb7ocOh7DgTAn8IrLx21QRc/BSnodXM4sv6aLQlnfpvehFMLZEfBc6g9pH9SWQccFYfJ9Q== - "d3-color@1 - 3", d3-color@3: version "3.0.1" resolved "https://registry.yarnpkg.com/d3-color/-/d3-color-3.0.1.tgz#03316e595955d1fcd39d9f3610ad41bb90194d0a" integrity sha512-6/SlHkDOBLyQSJ1j1Ghs82OIUXpKWlR0hCsw0XrLSQhuUPuCSmLQ1QPH98vpnQxMUQM2/gfAkUEWsupVpd9JGw== -d3-contour@1: - version "1.3.2" - resolved "https://registry.yarnpkg.com/d3-contour/-/d3-contour-1.3.2.tgz#652aacd500d2264cb3423cee10db69f6f59bead3" - integrity sha512-hoPp4K/rJCu0ladiH6zmJUEz6+u3lgR+GSm/QdM2BBvDraU39Vr7YdDCicJcxP1z8i9B/2dJLgDC1NcvlF8WCg== - dependencies: - d3-array "^1.1.1" - d3-contour@3: version "3.0.1" resolved "https://registry.yarnpkg.com/d3-contour/-/d3-contour-3.0.1.tgz#2c64255d43059599cd0dba8fe4cc3d51ccdd9bbd" @@ -4419,24 +4222,11 @@ d3-delaunay@6: dependencies: delaunator "5" -d3-dispatch@1: - version "1.0.6" - resolved "https://registry.yarnpkg.com/d3-dispatch/-/d3-dispatch-1.0.6.tgz#00d37bcee4dd8cd97729dd893a0ac29caaba5d58" - integrity sha512-fVjoElzjhCEy+Hbn8KygnmMS7Or0a9sI2UzGwoB7cCtvI1XpVN9GpoYlnb3xt2YV66oXYb1fLJ8GMvP4hdU1RA== - "d3-dispatch@1 - 3", d3-dispatch@3: version "3.0.1" resolved "https://registry.yarnpkg.com/d3-dispatch/-/d3-dispatch-3.0.1.tgz#5fc75284e9c2375c36c839411a0cf550cbfc4d5e" integrity sha512-rzUyPU/S7rwUflMyLc1ETDeBj0NRuHKKAcvukozwhshr6g6c5d8zh4c2gQjY2bZ0dXeGLWc1PF174P2tVvKhfg== -d3-drag@1: - version "1.2.5" - resolved "https://registry.yarnpkg.com/d3-drag/-/d3-drag-1.2.5.tgz#2537f451acd39d31406677b7dc77c82f7d988f70" - integrity sha512-rD1ohlkKQwMZYkQlYVCrSFxsWPzI97+W+PaEIBNTMxRuxz9RF0Hi5nJWHGVJ3Om9d2fRTe1yOBINJyy/ahV95w== - dependencies: - d3-dispatch "1" - d3-selection "1" - "d3-drag@2 - 3", d3-drag@3: version "3.0.0" resolved "https://registry.yarnpkg.com/d3-drag/-/d3-drag-3.0.0.tgz#994aae9cd23c719f53b5e10e3a0a6108c69607ba" @@ -4445,15 +4235,6 @@ d3-drag@1: d3-dispatch "1 - 3" d3-selection "3" -d3-dsv@1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/d3-dsv/-/d3-dsv-1.2.0.tgz#9d5f75c3a5f8abd611f74d3f5847b0d4338b885c" - integrity sha512-9yVlqvZcSOMhCYzniHE7EVUws7Fa1zgw+/EAV2BxJoG3ME19V6BQFBwI855XQDsxyOuG7NibqRMTtiF/Qup46g== - dependencies: - commander "2" - iconv-lite "0.4" - rw "1" - "d3-dsv@1 - 3", d3-dsv@3: version "3.0.1" resolved "https://registry.yarnpkg.com/d3-dsv/-/d3-dsv-3.0.1.tgz#c63af978f4d6a0d084a52a673922be2160789b73" @@ -4463,23 +4244,11 @@ d3-dsv@1: iconv-lite "0.6" rw "1" -d3-ease@1: - version "1.0.7" - resolved "https://registry.yarnpkg.com/d3-ease/-/d3-ease-1.0.7.tgz#9a834890ef8b8ae8c558b2fe55bd57f5993b85e2" - integrity sha512-lx14ZPYkhNx0s/2HX5sLFUI3mbasHjSSpwO/KaaNACweVwxUruKyWVcb293wMv1RqTPZyZ8kSZ2NogUZNcLOFQ== - "d3-ease@1 - 3", d3-ease@3: version "3.0.1" resolved "https://registry.yarnpkg.com/d3-ease/-/d3-ease-3.0.1.tgz#9658ac38a2140d59d346160f1f6c30fda0bd12f4" integrity sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w== -d3-fetch@1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/d3-fetch/-/d3-fetch-1.2.0.tgz#15ce2ecfc41b092b1db50abd2c552c2316cf7fc7" - integrity sha512-yC78NBVcd2zFAyR/HnUiBS7Lf6inSCoWcSxFfw8FYL7ydiqe80SazNwoffcqOfs95XaLo7yebsmQqDKSsXUtvA== - dependencies: - d3-dsv "1" - d3-fetch@3: version "3.0.1" resolved "https://registry.yarnpkg.com/d3-fetch/-/d3-fetch-3.0.1.tgz#83141bff9856a0edb5e38de89cdcfe63d0a60a22" @@ -4487,16 +4256,6 @@ d3-fetch@3: dependencies: d3-dsv "1 - 3" -d3-force@1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/d3-force/-/d3-force-1.2.1.tgz#fd29a5d1ff181c9e7f0669e4bd72bdb0e914ec0b" - integrity sha512-HHvehyaiUlVo5CxBJ0yF/xny4xoaxFxDnBXNvNcfW9adORGZfyNF1dj6DGLKyk4Yh3brP/1h3rnDzdIAwL08zg== - dependencies: - d3-collection "1" - d3-dispatch "1" - d3-quadtree "1" - d3-timer "1" - d3-force@3: version "3.0.0" resolved "https://registry.yarnpkg.com/d3-force/-/d3-force-3.0.0.tgz#3e2ba1a61e70888fe3d9194e30d6d14eece155c4" @@ -4506,23 +4265,11 @@ d3-force@3: d3-quadtree "1 - 3" d3-timer "1 - 3" -d3-format@1: - version "1.4.5" - resolved "https://registry.yarnpkg.com/d3-format/-/d3-format-1.4.5.tgz#374f2ba1320e3717eb74a9356c67daee17a7edb4" - integrity sha512-J0piedu6Z8iB6TbIGfZgDzfXxUFN3qQRMofy2oPdXzQibYGqPB/9iMcxr/TGalU+2RsyDO+U4f33id8tbnSRMQ== - "d3-format@1 - 3", d3-format@3: version "3.1.0" resolved "https://registry.yarnpkg.com/d3-format/-/d3-format-3.1.0.tgz#9260e23a28ea5cb109e93b21a06e24e2ebd55641" integrity sha512-YyUI6AEuY/Wpt8KWLgZHsIU86atmikuoOmCfommt0LYHiQSPjvX2AcFc38PX0CBpr2RCyZhjex+NS/LPOv6YqA== -d3-geo@1: - version "1.12.1" - resolved "https://registry.yarnpkg.com/d3-geo/-/d3-geo-1.12.1.tgz#7fc2ab7414b72e59fbcbd603e80d9adc029b035f" - integrity sha512-XG4d1c/UJSEX9NfU02KwBL6BYPj8YKHxgBEw5om2ZnTRSbIcego6dhHwcxuSR3clxh0EpE38os1DVPOmnYtTPg== - dependencies: - d3-array "1" - d3-geo@3: version "3.0.1" resolved "https://registry.yarnpkg.com/d3-geo/-/d3-geo-3.0.1.tgz#4f92362fd8685d93e3b1fae0fd97dc8980b1ed7e" @@ -4530,23 +4277,11 @@ d3-geo@3: dependencies: d3-array "2.5.0 - 3" -d3-hierarchy@1: - version "1.1.9" - resolved "https://registry.yarnpkg.com/d3-hierarchy/-/d3-hierarchy-1.1.9.tgz#2f6bee24caaea43f8dc37545fa01628559647a83" - integrity sha512-j8tPxlqh1srJHAtxfvOUwKNYJkQuBFdM1+JAUfq6xqH5eAqf93L7oG1NVqDa4CpFZNvnNKtCYEUC8KY9yEn9lQ== - d3-hierarchy@3: version "3.1.1" resolved "https://registry.yarnpkg.com/d3-hierarchy/-/d3-hierarchy-3.1.1.tgz#9cbb0ffd2375137a351e6cfeed344a06d4ff4597" integrity sha512-LtAIu54UctRmhGKllleflmHalttH3zkfSi4NlKrTAoFKjC+AFBJohsCAdgCBYQwH0F8hIOGY89X1pPqAchlMkA== -d3-interpolate@1: - version "1.4.0" - resolved "https://registry.yarnpkg.com/d3-interpolate/-/d3-interpolate-1.4.0.tgz#526e79e2d80daa383f9e0c1c1c7dcc0f0583e987" - integrity sha512-V9znK0zc3jOPV4VD2zZn0sDhZU3WAE2bmlxdIwwQPPzPjvyLkd8B3JUVdS1IDUFDkWZ72c9qnv1GK2ZagTZ8EA== - dependencies: - d3-color "1" - "d3-interpolate@1 - 3", "d3-interpolate@1.2.0 - 3", d3-interpolate@3: version "3.0.1" resolved "https://registry.yarnpkg.com/d3-interpolate/-/d3-interpolate-3.0.1.tgz#3c47aa5b32c5b3dfb56ef3fd4342078a632b400d" @@ -4554,54 +4289,26 @@ d3-interpolate@1: dependencies: d3-color "1 - 3" -d3-path@1: - version "1.0.9" - resolved "https://registry.yarnpkg.com/d3-path/-/d3-path-1.0.9.tgz#48c050bb1fe8c262493a8caf5524e3e9591701cf" - integrity sha512-VLaYcn81dtHVTjEHd8B+pbe9yHWpXKZUC87PzoFmsFrJqgFwDe/qxfp5MlfsfM1V5E/iVt0MmEbWQ7FVIXh/bg== - "d3-path@1 - 3", d3-path@3: version "3.0.1" resolved "https://registry.yarnpkg.com/d3-path/-/d3-path-3.0.1.tgz#f09dec0aaffd770b7995f1a399152bf93052321e" integrity sha512-gq6gZom9AFZby0YLduxT1qmrp4xpBA1YZr19OI717WIdKE2OM5ETq5qrHLb301IgxhLwcuxvGZVLeeWc/k1I6w== -d3-polygon@1: - version "1.0.6" - resolved "https://registry.yarnpkg.com/d3-polygon/-/d3-polygon-1.0.6.tgz#0bf8cb8180a6dc107f518ddf7975e12abbfbd38e" - integrity sha512-k+RF7WvI08PC8reEoXa/w2nSg5AUMTi+peBD9cmFc+0ixHfbs4QmxxkarVal1IkVkgxVuk9JSHhJURHiyHKAuQ== - d3-polygon@3: version "3.0.1" resolved "https://registry.yarnpkg.com/d3-polygon/-/d3-polygon-3.0.1.tgz#0b45d3dd1c48a29c8e057e6135693ec80bf16398" integrity sha512-3vbA7vXYwfe1SYhED++fPUQlWSYTTGmFmQiany/gdbiWgU/iEyQzyymwL9SkJjFFuCS4902BSzewVGsHHmHtXg== -d3-quadtree@1: - version "1.0.7" - resolved "https://registry.yarnpkg.com/d3-quadtree/-/d3-quadtree-1.0.7.tgz#ca8b84df7bb53763fe3c2f24bd435137f4e53135" - integrity sha512-RKPAeXnkC59IDGD0Wu5mANy0Q2V28L+fNe65pOCXVdVuTJS3WPKaJlFHer32Rbh9gIo9qMuJXio8ra4+YmIymA== - "d3-quadtree@1 - 3", d3-quadtree@3: version "3.0.1" resolved "https://registry.yarnpkg.com/d3-quadtree/-/d3-quadtree-3.0.1.tgz#6dca3e8be2b393c9a9d514dabbd80a92deef1a4f" integrity sha512-04xDrxQTDTCFwP5H6hRhsRcb9xxv2RzkcsygFzmkSIOJy3PeRJP7sNk3VRIbKXcog561P9oU0/rVH6vDROAgUw== -d3-random@1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/d3-random/-/d3-random-1.1.2.tgz#2833be7c124360bf9e2d3fd4f33847cfe6cab291" - integrity sha512-6AK5BNpIFqP+cx/sreKzNjWbwZQCSUatxq+pPRmFIQaWuoD+NrbVWw7YWpHiXpCQ/NanKdtGDuB+VQcZDaEmYQ== - d3-random@3: version "3.0.1" resolved "https://registry.yarnpkg.com/d3-random/-/d3-random-3.0.1.tgz#d4926378d333d9c0bfd1e6fa0194d30aebaa20f4" integrity sha512-FXMe9GfxTxqd5D6jFsQ+DJ8BJS4E/fT5mqqdjovykEB2oFbTMDVdg1MGFxfQW+FBOGoB++k8swBrgwSHT1cUXQ== -d3-scale-chromatic@1: - version "1.5.0" - resolved "https://registry.yarnpkg.com/d3-scale-chromatic/-/d3-scale-chromatic-1.5.0.tgz#54e333fc78212f439b14641fb55801dd81135a98" - integrity sha512-ACcL46DYImpRFMBcpk9HhtIyC7bTBR4fNOPxwVSl0LfulDAwyiHyPOTqcDG1+t5d4P9W7t/2NAuWu59aKko/cg== - dependencies: - d3-color "1" - d3-interpolate "1" - d3-scale-chromatic@3: version "3.0.0" resolved "https://registry.yarnpkg.com/d3-scale-chromatic/-/d3-scale-chromatic-3.0.0.tgz#15b4ceb8ca2bb0dcb6d1a641ee03d59c3b62376a" @@ -4610,18 +4317,6 @@ d3-scale-chromatic@3: d3-color "1 - 3" d3-interpolate "1 - 3" -d3-scale@2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/d3-scale/-/d3-scale-2.2.2.tgz#4e880e0b2745acaaddd3ede26a9e908a9e17b81f" - integrity sha512-LbeEvGgIb8UMcAa0EATLNX0lelKWGYDQiPdHj+gLblGVhGLyNbaCn3EvrJf0A3Y/uOOU5aD6MTh5ZFCdEwGiCw== - dependencies: - d3-array "^1.2.0" - d3-collection "1" - d3-format "1" - d3-interpolate "1" - d3-time "1" - d3-time-format "2" - d3-scale@4: version "4.0.2" resolved "https://registry.yarnpkg.com/d3-scale/-/d3-scale-4.0.2.tgz#82b38e8e8ff7080764f8dcec77bd4be393689396" @@ -4633,23 +4328,11 @@ d3-scale@4: d3-time "2.1.1 - 3" d3-time-format "2 - 4" -d3-selection@1, d3-selection@^1.1.0: - version "1.4.2" - resolved "https://registry.yarnpkg.com/d3-selection/-/d3-selection-1.4.2.tgz#dcaa49522c0dbf32d6c1858afc26b6094555bc5c" - integrity sha512-SJ0BqYihzOjDnnlfyeHT0e30k0K1+5sR3d5fNueCNeuhZTnGw4M4o8mqJchSwgKMXCNFo+e2VTChiSJ0vYtXkg== - "d3-selection@2 - 3", d3-selection@3: version "3.0.0" resolved "https://registry.yarnpkg.com/d3-selection/-/d3-selection-3.0.0.tgz#c25338207efa72cc5b9bd1458a1a41901f1e1b31" integrity sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ== -d3-shape@1: - version "1.3.7" - resolved "https://registry.yarnpkg.com/d3-shape/-/d3-shape-1.3.7.tgz#df63801be07bc986bc54f63789b4fe502992b5d7" - integrity sha512-EUkvKjqPFUAZyOlhY5gzCxCeI0Aep04LwIRpsZ/mLFelJiUfnK56jo5JMDSE7yyP2kLSb6LtF+S5chMk7uqPqw== - dependencies: - d3-path "1" - d3-shape@3: version "3.0.1" resolved "https://registry.yarnpkg.com/d3-shape/-/d3-shape-3.0.1.tgz#9ccdfb28fd9b0d12f2d8aec234cd5c4a9ea27931" @@ -4657,13 +4340,6 @@ d3-shape@3: dependencies: d3-path "1 - 3" -d3-time-format@2: - version "2.3.0" - resolved "https://registry.yarnpkg.com/d3-time-format/-/d3-time-format-2.3.0.tgz#107bdc028667788a8924ba040faf1fbccd5a7850" - integrity sha512-guv6b2H37s2Uq/GefleCDtbe0XZAuy7Wa49VGkPVPMfLL9qObgBST3lEHJBMUp8S7NdLQAGIvr2KXk8Hc98iKQ== - dependencies: - d3-time "1" - "d3-time-format@2 - 4", d3-time-format@4: version "4.1.0" resolved "https://registry.yarnpkg.com/d3-time-format/-/d3-time-format-4.1.0.tgz#7ab5257a5041d11ecb4fe70a5c7d16a195bb408a" @@ -4671,11 +4347,6 @@ d3-time-format@2: dependencies: d3-time "1 - 3" -d3-time@1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/d3-time/-/d3-time-1.1.0.tgz#b1e19d307dae9c900b7e5b25ffc5dcc249a8a0f1" - integrity sha512-Xh0isrZ5rPYYdqhAVk8VLnMEidhz5aP7htAADH6MfzgmmicPkTo8LhkLxci61/lCB7n7UmE3bN0leRt+qvkLxA== - "d3-time@1 - 3", "d3-time@2.1.1 - 3", d3-time@3: version "3.0.0" resolved "https://registry.yarnpkg.com/d3-time/-/d3-time-3.0.0.tgz#65972cb98ae2d4954ef5c932e8704061335d4975" @@ -4683,28 +4354,11 @@ d3-time@1: dependencies: d3-array "2 - 3" -d3-timer@1: - version "1.0.10" - resolved "https://registry.yarnpkg.com/d3-timer/-/d3-timer-1.0.10.tgz#dfe76b8a91748831b13b6d9c793ffbd508dd9de5" - integrity sha512-B1JDm0XDaQC+uvo4DT79H0XmBskgS3l6Ve+1SBCfxgmtIb1AVrPIoqd+nPSv+loMX8szQ0sVUhGngL7D5QPiXw== - "d3-timer@1 - 3", d3-timer@3: version "3.0.1" resolved "https://registry.yarnpkg.com/d3-timer/-/d3-timer-3.0.1.tgz#6284d2a2708285b1abb7e201eda4380af35e63b0" integrity sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA== -d3-transition@1: - version "1.3.2" - resolved "https://registry.yarnpkg.com/d3-transition/-/d3-transition-1.3.2.tgz#a98ef2151be8d8600543434c1ca80140ae23b398" - integrity sha512-sc0gRU4PFqZ47lPVHloMn9tlPcv8jxgOQg+0zjhfZXMQuvppjG6YuwdMBE0TuqCZjeJkLecku/l9R0JPcRhaDA== - dependencies: - d3-color "1" - d3-dispatch "1" - d3-ease "1" - d3-interpolate "1" - d3-selection "^1.1.0" - d3-timer "1" - "d3-transition@2 - 3", d3-transition@3: version "3.0.1" resolved "https://registry.yarnpkg.com/d3-transition/-/d3-transition-3.0.1.tgz#6869fdde1448868077fdd5989200cb61b2a1645f" @@ -4716,22 +4370,6 @@ d3-transition@1: d3-interpolate "1 - 3" d3-timer "1 - 3" -d3-voronoi@1: - version "1.1.4" - resolved "https://registry.yarnpkg.com/d3-voronoi/-/d3-voronoi-1.1.4.tgz#dd3c78d7653d2bb359284ae478645d95944c8297" - integrity sha512-dArJ32hchFsrQ8uMiTBLq256MpnZjeuBtdHpaDlYuQyjU0CVzCJl/BVW+SkszaAeH95D/8gxqAhgx0ouAWAfRg== - -d3-zoom@1: - version "1.8.3" - resolved "https://registry.yarnpkg.com/d3-zoom/-/d3-zoom-1.8.3.tgz#b6a3dbe738c7763121cd05b8a7795ffe17f4fc0a" - integrity sha512-VoLXTK4wvy1a0JpH2Il+F2CiOhVu7VRXWF5M/LroMIh3/zBAC3WAt7QoIvPibOavVo20hN6/37vwAsdBejLyKQ== - dependencies: - d3-dispatch "1" - d3-drag "1" - d3-interpolate "1" - d3-selection "1" - d3-transition "1" - d3-zoom@3: version "3.0.0" resolved "https://registry.yarnpkg.com/d3-zoom/-/d3-zoom-3.0.0.tgz#d13f4165c73217ffeaa54295cd6969b3e7aee8f3" @@ -4743,44 +4381,7 @@ d3-zoom@3: d3-selection "2 - 3" d3-transition "2 - 3" -d3@^5.14: - version "5.16.0" - resolved "https://registry.yarnpkg.com/d3/-/d3-5.16.0.tgz#9c5e8d3b56403c79d4ed42fbd62f6113f199c877" - integrity sha512-4PL5hHaHwX4m7Zr1UapXW23apo6pexCgdetdJ5kTmADpG/7T9Gkxw0M0tf/pjoB63ezCCm0u5UaFYy2aMt0Mcw== - dependencies: - d3-array "1" - d3-axis "1" - d3-brush "1" - d3-chord "1" - d3-collection "1" - d3-color "1" - d3-contour "1" - d3-dispatch "1" - d3-drag "1" - d3-dsv "1" - d3-ease "1" - d3-fetch "1" - d3-force "1" - d3-format "1" - d3-geo "1" - d3-hierarchy "1" - d3-interpolate "1" - d3-path "1" - d3-polygon "1" - d3-quadtree "1" - d3-random "1" - d3-scale "2" - d3-scale-chromatic "1" - d3-selection "1" - d3-shape "1" - d3-time "1" - d3-time-format "2" - d3-timer "1" - d3-transition "1" - d3-voronoi "1" - d3-zoom "1" - -d3@^7.0.0: +d3@^5.14, d3@^7.0.0: version "7.2.1" resolved "https://registry.yarnpkg.com/d3/-/d3-7.2.1.tgz#97eafaa6fc8cd7c564c3ace1e6678cbecf63f3ea" integrity sha512-E/5sP0aeK6YPXI/+4QlefvBFgmcyR2jYftId0PrYWv4Y/gW3c3thp1XG4rQzF0eUwV9tR1x05X5eWuJ6rQXvew== @@ -6067,12 +5668,7 @@ flush-write-stream@^1.0.2: inherits "^2.0.3" readable-stream "^2.3.6" -follow-redirects@^1.0.0, follow-redirects@^1.14.0: - version "1.14.8" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.8.tgz#016996fb9a11a100566398b1c6839337d7bfa8fc" - integrity sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA== - -follow-redirects@^1.14.8: +follow-redirects@^1.0.0, follow-redirects@^1.14.0, follow-redirects@^1.14.8: version "1.15.0" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.0.tgz#06441868281c86d0dda4ad8bdaead2d02dca89d4" integrity sha512-aExlJShTV4qOUOL7yF1U5tvLCB0xQuudbf6toyYA0E/acBNw71mvjFTnLaRp50aQaYocMR0a/RMMBIHeZnGyjQ== @@ -6847,7 +6443,7 @@ husky@^8.0.0: resolved "https://registry.yarnpkg.com/husky/-/husky-8.0.1.tgz#511cb3e57de3e3190514ae49ed50f6bc3f50b3e9" integrity sha512-xs7/chUH/CKdOCs7Zy0Aev9e/dKOMZf3K1Az1nar3tzlv0jfqnYtu235bstsWTmXOR0EfINrPa97yy4Lz6RiKw== -iconv-lite@0.4, iconv-lite@0.4.24: +iconv-lite@0.4.24: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== @@ -8729,16 +8325,11 @@ micromatch@^4.0.2, micromatch@^4.0.4, micromatch@^4.0.5: braces "^3.0.2" picomatch "^2.3.1" -mime-db@1.52.0: +mime-db@1.52.0, "mime-db@>= 1.43.0 < 2": version "1.52.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== -"mime-db@>= 1.43.0 < 2": - version "1.51.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.51.0.tgz#d9ff62451859b18342d960850dc3cfb77e63fb0c" - integrity sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g== - mime-types@^2.1.12, mime-types@^2.1.27, mime-types@^2.1.31, mime-types@~2.1.17, mime-types@~2.1.19, mime-types@~2.1.24, mime-types@~2.1.34: version "2.1.35" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" @@ -9490,12 +9081,7 @@ picocolors@^1.0.0: resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== -picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3: - version "2.3.0" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.0.tgz#f1f061de8f6a4bf022892e2d128234fb98302972" - integrity sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw== - -picomatch@^2.3.1: +picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3, picomatch@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== @@ -10574,16 +10160,11 @@ side-channel@^1.0.4: get-intrinsic "^1.0.2" object-inspect "^1.9.0" -signal-exit@^3.0.0, signal-exit@^3.0.7: +signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7: version "3.0.7" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== -signal-exit@^3.0.2, signal-exit@^3.0.3: - version "3.0.6" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.6.tgz#24e630c4b0f03fea446a2bd299e62b4a6ca8d0af" - integrity sha512-sDl4qMFpijcGw22U5w63KmD3cZJfBuFlVNbVMKje2keoKML7X2UzWbc4XrmEbDwg0NXJc3yv4/ox7b+JWb57kQ== - sisteransi@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" @@ -11416,16 +10997,11 @@ tslib@^1.8.1: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.0.1: +tslib@^2.0.1, tslib@^2.1.0: version "2.4.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3" integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ== -tslib@^2.1.0: - version "2.3.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" - integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== - tsutils@^3.21.0: version "3.21.0" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" From 184b0942184ead36760e6c5ed683ffadcdd753dd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 23 Jun 2022 08:19:08 +0200 Subject: [PATCH 10/24] chore(deps): bump got from 11.8.3 to 11.8.5 (#3172) Bumps [got](https://github.com/sindresorhus/got) from 11.8.3 to 11.8.5. - [Release notes](https://github.com/sindresorhus/got/releases) - [Commits](https://github.com/sindresorhus/got/compare/v11.8.3...v11.8.5) --- updated-dependencies: - dependency-name: got dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 80 +++++++++++++++---------------------------------------- 1 file changed, 21 insertions(+), 59 deletions(-) diff --git a/yarn.lock b/yarn.lock index 34b56f1409..cc5861c91f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -386,7 +386,7 @@ dependencies: "@babel/types" "^7.16.7" -"@babel/helper-function-name@^7.16.0", "@babel/helper-function-name@^7.16.7", "@babel/helper-function-name@^7.17.9": +"@babel/helper-function-name@^7.16.7", "@babel/helper-function-name@^7.17.9": version "7.17.9" resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.17.9.tgz#136fcd54bc1da82fcb47565cf16fd8e444b1ff12" integrity sha512-7cRisGlVtiVqZ0MW0/yFB4atgpGLWEHUVYnb448hZK4x+vih0YO5UoS11XIYtZYqHd0dIPMdUSv8q5K4LdMnIg== @@ -394,13 +394,6 @@ "@babel/template" "^7.16.7" "@babel/types" "^7.17.0" -"@babel/helper-get-function-arity@^7.16.0", "@babel/helper-get-function-arity@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.7.tgz#ea08ac753117a669f1508ba06ebcc49156387419" - integrity sha512-flc+RLSOBXzNzVhcLu6ujeHUrD6tANAOU5ojrRx/as+tbzf8+stUCj7+IfRRoAbEZqj/ahXEMsjhOhgeZsrnTw== - dependencies: - "@babel/types" "^7.16.7" - "@babel/helper-hoist-variables@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz#86bcb19a77a509c7b77d0e22323ef588fa58c246" @@ -408,7 +401,7 @@ dependencies: "@babel/types" "^7.16.7" -"@babel/helper-member-expression-to-functions@^7.16.0", "@babel/helper-member-expression-to-functions@^7.16.7", "@babel/helper-member-expression-to-functions@^7.17.7": +"@babel/helper-member-expression-to-functions@^7.16.7", "@babel/helper-member-expression-to-functions@^7.17.7": version "7.17.7" resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.17.7.tgz#a34013b57d8542a8c4ff8ba3f747c02452a4d8c4" integrity sha512-thxXgnQ8qQ11W2wVUObIqDL4p148VMxkt5T/qpN5k2fboRyzFGFmKsTGViquyM5QHKUy48OZoca8kw4ajaDPyw== @@ -436,7 +429,7 @@ "@babel/traverse" "^7.18.0" "@babel/types" "^7.18.0" -"@babel/helper-optimise-call-expression@^7.16.0", "@babel/helper-optimise-call-expression@^7.16.7": +"@babel/helper-optimise-call-expression@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.16.7.tgz#a34e3560605abbd31a18546bd2aad3e6d9a174f2" integrity sha512-EtgBhg7rd/JcnpZFXpBy0ze1YRfdm7BnBX4uKMBd3ixa3RGAE002JZB66FJyNH7g0F38U05pXmA5P8cBh7z+1w== @@ -457,7 +450,7 @@ "@babel/helper-wrap-function" "^7.16.8" "@babel/types" "^7.16.8" -"@babel/helper-replace-supers@^7.16.0", "@babel/helper-replace-supers@^7.16.7": +"@babel/helper-replace-supers@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.16.7.tgz#e9f5f5f32ac90429c1a4bdec0f231ef0c2838ab1" integrity sha512-y9vsWilTNaVnVh6xiJfABzsNpgDPKev9HnAgz6Gb1p6UUwf9NepdlsV7VXGCftJM+jqD5f7JIEubcpLjZj5dBw== @@ -482,7 +475,7 @@ dependencies: "@babel/types" "^7.16.0" -"@babel/helper-split-export-declaration@^7.16.0", "@babel/helper-split-export-declaration@^7.16.7": +"@babel/helper-split-export-declaration@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz#0b648c0c42da9d3920d85ad585f2778620b8726b" integrity sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw== @@ -1357,7 +1350,7 @@ dependencies: regenerator-runtime "^0.13.4" -"@babel/template@^7.10.4", "@babel/template@^7.16.0", "@babel/template@^7.16.7", "@babel/template@^7.3.3": +"@babel/template@^7.10.4", "@babel/template@^7.16.7", "@babel/template@^7.3.3": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.16.7.tgz#8d126c8701fde4d66b264b3eba3d96f07666d155" integrity sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w== @@ -1366,7 +1359,7 @@ "@babel/parser" "^7.16.7" "@babel/types" "^7.16.7" -"@babel/traverse@^7.10.5", "@babel/traverse@^7.12.1", "@babel/traverse@^7.13.0", "@babel/traverse@^7.16.0", "@babel/traverse@^7.16.7", "@babel/traverse@^7.16.8", "@babel/traverse@^7.18.0", "@babel/traverse@^7.18.2", "@babel/traverse@^7.18.5", "@babel/traverse@^7.7.2": +"@babel/traverse@^7.10.5", "@babel/traverse@^7.12.1", "@babel/traverse@^7.13.0", "@babel/traverse@^7.16.7", "@babel/traverse@^7.16.8", "@babel/traverse@^7.18.0", "@babel/traverse@^7.18.2", "@babel/traverse@^7.18.5", "@babel/traverse@^7.7.2": version "7.18.5" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.18.5.tgz#94a8195ad9642801837988ab77f36e992d9a20cd" integrity sha512-aKXj1KT66sBj0vVzk6rEeAO6Z9aiiQ68wfDgge3nHhA/my6xMM/7HGQUNumKZaoa2qUPQ5whJG9aAifsxUKfLA== @@ -2208,7 +2201,12 @@ resolved "https://registry.yarnpkg.com/@types/ms/-/ms-0.7.31.tgz#31b7ca6407128a3d2bbc27fe2d21b345397f6197" integrity sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA== -"@types/node@*", "@types/node@>=12": +"@types/node@*": + version "18.0.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.0.0.tgz#67c7b724e1bcdd7a8821ce0d5ee184d3b4dd525a" + integrity sha512-cHlGmko4gWLVI27cGJntjs/Sj8th9aYwplmZFwmmgYQQvL5NUsgVJG7OddLvNfLqYS31KFN0s3qlaD9qCaxACA== + +"@types/node@>=12": version "17.0.17" resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.17.tgz#a8ddf6e0c2341718d74ee3dc413a13a042c45a0c" integrity sha512-e8PUNQy1HgJGV3iU/Bp2+D/DXh3PYeyli8LgIwsQcs1Ar1LoaWHSIT6Rw+H2rNJmiq6SNWiDytfx8+gYj7wDHw== @@ -3570,7 +3568,7 @@ clone-deep@^4.0.1: clone-response@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b" - integrity sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws= + integrity sha512-yjLXh88P599UOyPTFX0POsd7WxnbsVsGohcwzHOLspIhhpalPw1BcqED8NblyZLKcGrL8dTgMlcaZxV2jAD41Q== dependencies: mimic-response "^1.0.0" @@ -6067,9 +6065,9 @@ glur@^1.1.2: integrity sha1-8g6jbbEDv8KSNDkh8fkeg8NGdok= got@^11.0.2, got@^11.8.1: - version "11.8.3" - resolved "https://registry.yarnpkg.com/got/-/got-11.8.3.tgz#f496c8fdda5d729a90b4905d2b07dbd148170770" - integrity sha512-7gtQ5KiPh1RtGS9/Jbv1ofDpBFuq42gyfEib+ejaRBJuj/3tQFeR5+gw57e4ipaU8c/rCjvX6fkQz2lyDlGAOg== + version "11.8.5" + resolved "https://registry.yarnpkg.com/got/-/got-11.8.5.tgz#ce77d045136de56e8f024bebb82ea349bc730046" + integrity sha512-o0Je4NvQObAuZPHLFoRSkdG2lTgtcynqymzg2Vupdx6PorhaT5MCbIyXG6d4D94kk8ZG57QeosgdiqfJWhEhlQ== dependencies: "@sindresorhus/is" "^4.0.0" "@szmarczak/http-timer" "^4.0.5" @@ -7563,9 +7561,9 @@ jsprim@^2.0.2: verror "1.10.0" keyv@^4.0.0: - version "4.2.7" - resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.2.7.tgz#00b8994d46098e8eb8c933cb29aaaf18be5effea" - integrity sha512-HeOstD8SXvtWoQhMMBCelcUuZsiV7T7MwsADtOXT0KuwYP9nCxrSoMDeLXNDTLN3VFSuRp38JzoGbbTboq3QQw== + version "4.3.2" + resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.3.2.tgz#e839df676a0c7ee594c8835e7c1c83742558e5c2" + integrity sha512-kn8WmodVBe12lmHpA6W8OY7SNh6wVR+Z+wZESF4iF5FCazaVXGWOtnbnvX0tMQ1bO+/TmOD9LziuYMvrIIs0xw== dependencies: compress-brotli "^1.3.8" json-buffer "3.0.1" @@ -8500,11 +8498,6 @@ natural-compare@^1.4.0: resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= -negotiator@0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" - integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== - negotiator@0.6.3: version "0.6.3" resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" @@ -9542,13 +9535,6 @@ regenerate-unicode-properties@^10.0.1: dependencies: regenerate "^1.4.2" -regenerate-unicode-properties@^9.0.0: - version "9.0.0" - resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-9.0.0.tgz#54d09c7115e1f53dc2314a974b32c1c344efe326" - integrity sha512-3E12UeNSPfjrgwjkR81m5J7Aw/T55Tu7nUyZVQYCKEOs+2dkxEY+DpPtZzO4YruuiPb7NkYLVcyJC4+zCbk5pA== - dependencies: - regenerate "^1.4.2" - regenerate@^1.4.2: version "1.4.2" resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a" @@ -9579,18 +9565,6 @@ regexpp@^3.2.0: resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== -regexpu-core@^4.7.1: - version "4.8.0" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.8.0.tgz#e5605ba361b67b1718478501327502f4479a98f0" - integrity sha512-1F6bYsoYiz6is+oz70NWur2Vlh9KWtswuRuzJOfeYUrfPX2o8n74AnUVaOGDbUqVGO9fNHu48/pjJO4sNVwsOg== - dependencies: - regenerate "^1.4.2" - regenerate-unicode-properties "^9.0.0" - regjsgen "^0.5.2" - regjsparser "^0.7.0" - unicode-match-property-ecmascript "^2.0.0" - unicode-match-property-value-ecmascript "^2.0.0" - regexpu-core@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-5.0.1.tgz#c531122a7840de743dcf9c83e923b5560323ced3" @@ -9603,23 +9577,11 @@ regexpu-core@^5.0.1: unicode-match-property-ecmascript "^2.0.0" unicode-match-property-value-ecmascript "^2.0.0" -regjsgen@^0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.5.2.tgz#92ff295fb1deecbf6ecdab2543d207e91aa33733" - integrity sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A== - regjsgen@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.6.0.tgz#83414c5354afd7d6627b16af5f10f41c4e71808d" integrity sha512-ozE883Uigtqj3bx7OhL1KNbCzGyW2NQZPl6Hs09WTvCuZD5sTI4JY58bkbQWa/Y9hxIsvJ3M8Nbf7j54IqeZbA== -regjsparser@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.7.0.tgz#a6b667b54c885e18b52554cb4960ef71187e9968" - integrity sha512-A4pcaORqmNMDVwUjWoTzuhwMGpP+NykpfqAsEgI1FSH/EzC7lrN5TMd+kN8YCovX+jMpu8eaqXgXPCa0g8FQNQ== - dependencies: - jsesc "~0.5.0" - regjsparser@^0.8.2: version "0.8.4" resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.8.4.tgz#8a14285ffcc5de78c5b95d62bbf413b6bc132d5f" @@ -11808,7 +11770,7 @@ wrap-ansi@^7.0.0: wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== write-file-atomic@^4.0.1: version "4.0.1" From 8251bf204df0cb4d36975941310cfd7cbae3f149 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Thu, 23 Jun 2022 11:49:52 +0530 Subject: [PATCH 11/24] Run testomatio only for PRs within org. (#3165) --- .github/workflows/checks.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index e4d82e2d19..0e0744404e 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -12,6 +12,7 @@ jobs: test: runs-on: ubuntu-latest name: check tests + if: github.repository_owner == 'mermaid' steps: - uses: actions/checkout@v2 with: From 0e47c0ee6c797c1b84f36c2a15cb6c3361f13062 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Thu, 23 Jun 2022 11:50:32 +0530 Subject: [PATCH 12/24] fix #3019 Add word boundary to FK&PK. (#3168) --- src/diagrams/er/parser/erDiagram.jison | 2 +- src/diagrams/er/parser/erDiagram.spec.js | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/diagrams/er/parser/erDiagram.jison b/src/diagrams/er/parser/erDiagram.jison index 3d7a54fe97..64d395aed4 100644 --- a/src/diagrams/er/parser/erDiagram.jison +++ b/src/diagrams/er/parser/erDiagram.jison @@ -28,7 +28,7 @@ accDescr\s*"{"\s* { this.begin("acc_descr_multili "erDiagram" return 'ER_DIAGRAM'; "{" { this.begin("block"); return 'BLOCK_START'; } \s+ /* skip whitespace in block */ -(?:PK)|(?:FK) return 'ATTRIBUTE_KEY' +\b((?:PK)|(?:FK))\b return 'ATTRIBUTE_KEY' [A-Za-z][A-Za-z0-9\-_]* return 'ATTRIBUTE_WORD' \"[^"]*\" return 'COMMENT'; [\n]+ /* nothing */ diff --git a/src/diagrams/er/parser/erDiagram.spec.js b/src/diagrams/er/parser/erDiagram.spec.js index 20be2fbe1c..1e0a40104f 100644 --- a/src/diagrams/er/parser/erDiagram.spec.js +++ b/src/diagrams/er/parser/erDiagram.spec.js @@ -72,6 +72,19 @@ describe('when parsing ER diagram it...', function () { expect(entities[entity].attributes.length).toBe(1); }); + it('should allow an entity with attribute starting with fk or pk and a comment', function () { + const entity = 'BOOK'; + const attribute1 = 'int fk_title FK'; + const attribute2 = 'string pk_author PK'; + const attribute3 = 'float pk_price PK "comment"'; + + erDiagram.parser.parse( + `erDiagram\n${entity} {\n${attribute1} \n\n${attribute2}\n${attribute3}\n}` + ); + const entities = erDb.getEntities(); + expect(entities[entity].attributes.length).toBe(3); + }); + it('should allow an entity with multiple attributes to be defined', function () { const entity = 'BOOK'; const attribute1 = 'string title'; From 4b78a2106d72f0a1a0c03acc71bfdfdd8795db3b Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Fri, 24 Jun 2022 11:11:22 +0530 Subject: [PATCH 13/24] Update links to `mermaid.live` (#3163) * chore: update browsers list * Re enable markdown & jsdoc linting. * Update links to `mermaid.live` Co-authored-by: sidharthv96 --- .eslintrc.json | 4 ++-- .github/ISSUE_TEMPLATE/bug_report.md | 2 +- README.md | 22 +++++++++++----------- README.zh-CN.md | 4 ++-- docs/Configuration.md | 2 +- docs/README.md | 2 +- docs/development.md | 1 - docs/n00b-gettingStarted.md | 4 ++-- docs/n00b-overview.md | 2 +- docs/newDiagram.md | 26 ++++++++++++++------------ docs/usage.md | 4 ++-- package.json | 2 +- 12 files changed, 38 insertions(+), 37 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index dc5adb6f2e..9c755a0e2b 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -15,9 +15,9 @@ }, "extends": [ "eslint:recommended", - //"plugin:jsdoc/recommended", + "plugin:jsdoc/recommended", "plugin:json/recommended", - // "plugin:markdown/recommended", + "plugin:markdown/recommended", "plugin:prettier/recommended" ], "plugins": ["html", "jest", "jsdoc", "json", "prettier"], diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 74e02e6cb8..f8e453bd3a 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -24,7 +24,7 @@ A clear and concise description of what you expected to happen. If applicable, add screenshots to help explain your problem. **Code Sample** -If applicable, add the code sample or a link to the [live editor](https://mermaid-js.github.io/mermaid-live-editor). +If applicable, add the code sample or a link to the [live editor](https://mermaid.live). **Desktop (please complete the following information):** - OS: [e.g. iOS] diff --git a/README.md b/README.md index 5c2eefa8ce..4d86b6a439 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ But not having diagrams or docs ruins productivity and hurts organizational lear Mermaid addresses this problem by enabling users to create easily modifiable diagrams, it can also be made part of production scripts (and other pieces of code).

-Mermaid allows even non-programmers to easily create detailed diagrams through the [Mermaid Live Editor](https://mermaid-js.github.io/mermaid-live-editor/).
+Mermaid allows even non-programmers to easily create detailed diagrams through the [Mermaid Live Editor](https://mermaid.live/).
[Tutorials](./docs/Tutorials.md) has video tutorials. Use Mermaid with your favorite applications, check out the list of [Integrations and Usages of Mermaid](./docs/integrations.md). @@ -51,7 +51,7 @@ In our release process we rely heavily on visual regression tests using [applito __The following are some examples of the diagrams, charts and graphs that can be made using Mermaid. Click here jump into the [text syntax](https://mermaid-js.github.io/mermaid/#/n00b-syntaxReference).__ -### Flowchart [docs - live editor] +### Flowchart [docs - live editor] ``` flowchart LR @@ -71,7 +71,7 @@ C -->|Two| E[Result 2] ``` -### Sequence diagram [docs - live editor] +### Sequence diagram [docs - live editor] ``` sequenceDiagram @@ -96,7 +96,7 @@ John->>Bob: How about you? Bob-->>John: Jolly good! ``` -### Gantt chart [docs - live editor] +### Gantt chart [docs - live editor] ``` gantt @@ -119,7 +119,7 @@ gantt Parallel 4 : des6, after des4, 1d ``` -### Class diagram [docs - live editor] +### Class diagram [docs - live editor] ``` classDiagram @@ -158,7 +158,7 @@ class Class10 { } ``` -### State diagram [docs - live editor] +### State diagram [docs - live editor] ``` stateDiagram-v2 [*] --> Still @@ -178,24 +178,24 @@ Moving --> Crash Crash --> [*] ``` -### Pie chart [docs - live editor] +### Pie chart [docs - live editor] ``` pie "Dogs" : 386 -"Cats" : 85 +"Cats" : 85.9 "Rats" : 15 ``` ```mermaid pie "Dogs" : 386 -"Cats" : 85 +"Cats" : 85.9 "Rats" : 15 ``` -### Git graph [experimental - live editor] +### Git graph [experimental - live editor] -### User Journey diagram [docs - live editor] +### User Journey diagram [docs - live editor] ``` journey title My working day diff --git a/README.zh-CN.md b/README.zh-CN.md index 63a3ee4aa6..91297c3235 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -20,7 +20,7 @@ Mermaid 是一个基于 Javascript 的图表绘制工具,通过解析类 Markd 绘图和编写文档花费了开发者宝贵的开发时间,而且随着业务的变更,它很快就会过期。 但是如果缺少了图表或文档,对于生产力和团队新人的业务学习都会产生巨大的阻碍。
Mermaid 通过允许用户创建便于修改的图表来解决这一难题,它也可以作为生产脚本(或其他代码)的一部分。

-Mermaid 甚至能让非程序员也能通过 [Mermaid Live Editor](https://mermaid-js.github.io/mermaid-live-editor/) 轻松创建详细的图表。
+Mermaid 甚至能让非程序员也能通过 [Mermaid Live Editor](https://mermaid.live/) 轻松创建详细的图表。
你可以访问 [教程](./docs/Tutorials.md) 来查看 Live Editor 的视频教程,也可以查看 [Mermaid 的集成和使用](./docs/integrations.md) 这个清单来检查你的文档工具是否已经集成了 Mermaid 支持。 如果想要查看关于 Mermaid 更详细的介绍及基础使用方式,可以查看 [入门指引](./docs/n00b-overview.md), [用法](./docs/usage.md) 和 [教程](./docs/Tutorials.md). @@ -139,7 +139,7 @@ class Class10 { } ``` -### 状态图 [[docs - live editor] +### 状态图 [[docs - live editor] ``` stateDiagram-v2 diff --git a/docs/Configuration.md b/docs/Configuration.md index b121f3a06d..dcb50a5a97 100644 --- a/docs/Configuration.md +++ b/docs/Configuration.md @@ -5,7 +5,7 @@ Configuration is the second half of Mermaid, after deployment. Together Deployme This section will introduce the different methods of configuring of the behaviors and appearances of Mermaid Diagrams. The Following are the most commonly used methods, and are all tied to Mermaid [Deployment](./n00b-gettingStarted.md) methods. -## Configuration Section in the [Live Editor](https://mermaid-js.github.io/mermaid-live-editor). +## Configuration Section in the [Live Editor](https://mermaid.live/). ## The `initialize()` call, for when Mermaid is called via an API, or through a diff --git a/cypress/platform/xss10.html b/cypress/platform/xss10.html index b78817a786..1a863b4b7d 100644 --- a/cypress/platform/xss10.html +++ b/cypress/platform/xss10.html @@ -84,7 +84,7 @@ div.className = 'malware'; div.innerHTML = 'XSS Succeeded'; document.getElementsByTagName('body')[0].appendChild(div); - throw new Error('XSS Succeded'); + throw new Error('XSS Succeeded'); } var diagram = 'classDiagram\n'; @@ -105,4 +105,3 @@ - diff --git a/cypress/platform/xss11.html b/cypress/platform/xss11.html index 51d0074d9e..8eadfa43b1 100644 --- a/cypress/platform/xss11.html +++ b/cypress/platform/xss11.html @@ -84,7 +84,7 @@ div.className = 'malware'; div.innerHTML = 'XSS Succeeded'; document.getElementsByTagName('body')[0].appendChild(div); - throw new Error('XSS Succeded'); + throw new Error('XSS Succeeded'); } var diagram = 'stateDiagram-v2\n'; @@ -103,4 +103,3 @@ - diff --git a/cypress/platform/xss12.html b/cypress/platform/xss12.html index 8cdbc88c1d..ff37285424 100644 --- a/cypress/platform/xss12.html +++ b/cypress/platform/xss12.html @@ -84,7 +84,7 @@ div.className = 'malware'; div.innerHTML = 'XSS Succeeded'; document.getElementsByTagName('body')[0].appendChild(div); - throw new Error('XSS Succeded'); + throw new Error('XSS Succeeded'); } var diagram = 'stateDiagram-v2\n'; @@ -103,4 +103,3 @@ - diff --git a/cypress/platform/xss13.html b/cypress/platform/xss13.html index ca020c218c..f3e0ecc498 100644 --- a/cypress/platform/xss13.html +++ b/cypress/platform/xss13.html @@ -84,7 +84,7 @@ div.className = 'malware'; div.innerHTML = 'XSS Succeeded'; document.getElementsByTagName('body')[0].appendChild(div); - throw new Error('XSS Succeded'); + throw new Error('XSS Succeeded'); } var diagram = 'stateDiagram-v2\n'; @@ -103,4 +103,3 @@ - diff --git a/cypress/platform/xss14.html b/cypress/platform/xss14.html index 68b61a809e..75492bbf43 100644 --- a/cypress/platform/xss14.html +++ b/cypress/platform/xss14.html @@ -84,7 +84,7 @@ div.className = 'malware'; div.innerHTML = 'XSS Succeeded'; document.getElementsByTagName('body')[0].appendChild(div); - throw new Error('XSS Succeded'); + throw new Error('XSS Succeeded'); } var diagram = 'classDiagram\n'; @@ -105,4 +105,3 @@ - diff --git a/cypress/platform/xss15.html b/cypress/platform/xss15.html index 94506def5f..1d7cfd5e7d 100644 --- a/cypress/platform/xss15.html +++ b/cypress/platform/xss15.html @@ -84,7 +84,7 @@ div.className = 'malware'; div.innerHTML = 'XSS Succeeded'; document.getElementsByTagName('body')[0].appendChild(div); - throw new Error('XSS Succeded'); + throw new Error('XSS Succeeded'); } var diagram = `sequenceDiagram @@ -104,4 +104,3 @@ - diff --git a/cypress/platform/xss16.html b/cypress/platform/xss16.html index 076ed3c347..69355aea3e 100644 --- a/cypress/platform/xss16.html +++ b/cypress/platform/xss16.html @@ -84,7 +84,7 @@ div.className = 'malware'; div.innerHTML = 'XSS Succeeded'; document.getElementsByTagName('body')[0].appendChild(div); - throw new Error('XSS Succeded'); + throw new Error('XSS Succeeded'); } var diagram = `sequenceDiagram @@ -103,4 +103,3 @@ - diff --git a/cypress/platform/xss17.html b/cypress/platform/xss17.html index 26f6a208a2..874dcb7af3 100644 --- a/cypress/platform/xss17.html +++ b/cypress/platform/xss17.html @@ -84,7 +84,7 @@ div.className = 'malware'; div.innerHTML = 'XSS Succeeded'; document.getElementsByTagName('body')[0].appendChild(div); - throw new Error('XSS Succeded'); + throw new Error('XSS Succeeded'); } var diagram = `sequenceDiagram @@ -103,4 +103,3 @@ - diff --git a/cypress/platform/xss18.html b/cypress/platform/xss18.html index 5dc7df6215..c93e603b1c 100644 --- a/cypress/platform/xss18.html +++ b/cypress/platform/xss18.html @@ -84,7 +84,7 @@ div.className = 'malware'; div.innerHTML = 'XSS Succeeded'; document.getElementsByTagName('body')[0].appendChild(div); - throw new Error('XSS Succeded'); + throw new Error('XSS Succeeded'); } var diagram = `classDiagram @@ -102,4 +102,3 @@ - diff --git a/cypress/platform/xss19.html b/cypress/platform/xss19.html index b5c5a86e99..cce0d97a40 100644 --- a/cypress/platform/xss19.html +++ b/cypress/platform/xss19.html @@ -84,7 +84,7 @@ div.className = 'malware'; div.innerHTML = 'XSS Succeeded'; document.getElementsByTagName('body')[0].appendChild(div); - throw new Error('XSS Succeded'); + throw new Error('XSS Succeeded'); } var diagram = `classDiagram @@ -104,4 +104,3 @@ - diff --git a/cypress/platform/xss2.html b/cypress/platform/xss2.html index 3f11b8f95d..73b3a26247 100644 --- a/cypress/platform/xss2.html +++ b/cypress/platform/xss2.html @@ -28,7 +28,7 @@ div.className = 'malware'; div.innerHTML = 'XSS Succeeded'; document.getElementsByTagName('body')[0].appendChild(div); - throw new Error('XSS Succeded'); + throw new Error('XSS Succeeded'); } diff --git a/cypress/platform/xss20.html b/cypress/platform/xss20.html index 33d4dfccb5..b782d52f34 100644 --- a/cypress/platform/xss20.html +++ b/cypress/platform/xss20.html @@ -84,7 +84,7 @@ div.className = 'malware'; div.innerHTML = 'XSS Succeeded'; document.getElementsByTagName('body')[0].appendChild(div); - throw new Error('XSS Succeded'); + throw new Error('XSS Succeeded'); } // var diagram = ` graph TD @@ -102,4 +102,3 @@ - diff --git a/cypress/platform/xss21.html b/cypress/platform/xss21.html index 9a88d7afa7..ed243441fd 100644 --- a/cypress/platform/xss21.html +++ b/cypress/platform/xss21.html @@ -84,7 +84,7 @@ div.className = 'malware'; div.innerHTML = 'XSS Succeeded'; document.getElementsByTagName('body')[0].appendChild(div); - throw new Error('XSS Succeded'); + throw new Error('XSS Succeeded'); } // var diagram = ` graph TD @@ -102,4 +102,3 @@ - diff --git a/cypress/platform/xss3.html b/cypress/platform/xss3.html index 015aa0e1f6..c2e1113fa5 100644 --- a/cypress/platform/xss3.html +++ b/cypress/platform/xss3.html @@ -28,7 +28,7 @@ div.className = 'malware'; div.innerHTML = 'XSS Succeeded'; document.getElementsByTagName('body')[0].appendChild(div); - throw new Error('XSS Succeded'); + throw new Error('XSS Succeeded'); } diff --git a/cypress/platform/xss5.html b/cypress/platform/xss5.html index b1fd610c68..86d45eeec3 100644 --- a/cypress/platform/xss5.html +++ b/cypress/platform/xss5.html @@ -84,7 +84,7 @@ div.className = 'malware'; div.innerHTML = 'XSS Succeeded'; document.getElementsByTagName('body')[0].appendChild(div); - throw new Error('XSS Succeded'); + throw new Error('XSS Succeeded'); } var diagram = 'graph LR\n'; diagram += 'B-->D(" - diff --git a/cypress/platform/xss6.html b/cypress/platform/xss6.html index 2205b2f067..32eca43136 100644 --- a/cypress/platform/xss6.html +++ b/cypress/platform/xss6.html @@ -84,7 +84,7 @@ div.className = 'malware'; div.innerHTML = 'XSS Succeeded'; document.getElementsByTagName('body')[0].appendChild(div); - throw new Error('XSS Succeded'); + throw new Error('XSS Succeeded'); } var diagram = 'graph LR\n'; diagram += 'A()'; @@ -98,4 +98,3 @@ - diff --git a/cypress/platform/xss7.html b/cypress/platform/xss7.html index cbf795d18d..51fcb3ddf7 100644 --- a/cypress/platform/xss7.html +++ b/cypress/platform/xss7.html @@ -84,7 +84,7 @@ div.className = 'malware'; div.innerHTML = 'XSS Succeeded'; document.getElementsByTagName('body')[0].appendChild(div); - throw new Error('XSS Succeded'); + throw new Error('XSS Succeeded'); } var diagram = 'graph LR\n'; diagram += " B( - diff --git a/cypress/platform/xss9.html b/cypress/platform/xss9.html index 6b61d5810e..7d06e988ea 100644 --- a/cypress/platform/xss9.html +++ b/cypress/platform/xss9.html @@ -84,7 +84,7 @@ div.className = 'malware'; div.innerHTML = 'XSS Succeeded'; document.getElementsByTagName('body')[0].appendChild(div); - throw new Error('XSS Succeded'); + throw new Error('XSS Succeeded'); } var diagram = 'stateDiagram-v2\n'; @@ -99,4 +99,3 @@ - From 4d4b77f39fd4fa0914b5c13d30e2d03d373a0dff Mon Sep 17 00:00:00 2001 From: yutotnh <57719497+yutotnh@users.noreply.github.com> Date: Mon, 27 Jun 2022 12:34:28 +0900 Subject: [PATCH 17/24] fix: typo for source --- demos/index.html | 4 ++-- src/config.js | 4 ++-- src/dagre-wrapper/edges.spec.js | 2 +- src/diagrams/flowchart/parser/flow-comments.spec.js | 4 ++-- src/diagrams/flowchart/parser/flow.spec.js | 2 +- src/diagrams/state/stateDiagram-v2.spec.js | 8 ++++---- src/diagrams/state/stateDiagram.spec.js | 8 ++++---- src/mermaid.js | 6 +++--- src/mermaidAPI.js | 6 +++--- src/utils.js | 6 +++--- src/utils.spec.js | 6 +++--- 11 files changed, 28 insertions(+), 28 deletions(-) diff --git a/demos/index.html b/demos/index.html index 0abe627a71..2aa749b9de 100644 --- a/demos/index.html +++ b/demos/index.html @@ -65,7 +65,7 @@ Person(customer, Customer, "A customer of the bank, with personal bank accounts") Container_Boundary(c1, "Internet Banking") { - Container(spa, "Single-Page App", "JavaScript, Angular", "Provides all the Internet banking functionality to cutomers via their web browser") + Container(spa, "Single-Page App", "JavaScript, Angular", "Provides all the Internet banking functionality to customers via their web browser") Container_Ext(mobile_app, "Mobile App", "C#, Xamarin", "Provides a limited subset of the Internet banking functionality to customers via their mobile device") Container(web_app, "Web Application", "Java, Spring MVC", "Delivers the static content and the Internet banking SPA") ContainerDb(database, "Database", "SQL Database", "Stores user registration information, hashed auth credentials, access logs, etc.") @@ -99,7 +99,7 @@ System_Ext(mbs, "Mainframe Banking System", "Stores all of the core banking information about customers, accounts, transactions, etc.") Container_Boundary(api, "API Application") { - Component(sign, "Sign In Controller", "MVC Rest Controlle", "Allows users to sign in to the internet banking system") + Component(sign, "Sign In Controller", "MVC Rest Controller", "Allows users to sign in to the internet banking system") Component(accounts, "Accounts Summary Controller", "MVC Rest Controller", "Provides customers with a summary of their bank accounts") Component(security, "Security Component", "Spring Bean", "Provides functionality related to singing in, changing passwords, etc.") Component(mbsfacade, "Mainframe Banking System Facade", "Spring Bean", "A facade onto the mainframe banking system.") diff --git a/src/config.js b/src/config.js index 24fe5b4d08..f438318c7c 100644 --- a/src/config.js +++ b/src/config.js @@ -21,7 +21,7 @@ export const updateCurrentConfig = (siteCfg, _directives) => { const d = _directives[i]; sanitize(d); - // Apply the data from the directive where the the overrides the themeVaraibles + // Apply the data from the directive where the the overrides the themeVariables sumOfDirectives = assignWithDepth(sumOfDirectives, d); } @@ -67,7 +67,7 @@ export const setSiteConfig = (conf) => { return siteConfig; }; -export const saveConfigFromInitilize = (conf) => { +export const saveConfigFromInitialize = (conf) => { configFromInitialize = assignWithDepth({}, conf); }; diff --git a/src/dagre-wrapper/edges.spec.js b/src/dagre-wrapper/edges.spec.js index f087812f8d..627691a8e5 100644 --- a/src/dagre-wrapper/edges.spec.js +++ b/src/dagre-wrapper/edges.spec.js @@ -30,7 +30,7 @@ describe('Graphlib decorations', () => { expect(int.x).toBeCloseTo(192.4609375); expect(int.y).toBeCloseTo(145.15711441743503); }); - it('case 3 - intersection on otop of box outside point greater then inside point', function () { + it('case 3 - intersection on top of box outside point greater then inside point', function () { const o = { x: 157, y: 39 }; const i = { x: 104, y: 105 }; const node2 = { diff --git a/src/diagrams/flowchart/parser/flow-comments.spec.js b/src/diagrams/flowchart/parser/flow-comments.spec.js index 861d392362..7aeed304cc 100644 --- a/src/diagrams/flowchart/parser/flow-comments.spec.js +++ b/src/diagrams/flowchart/parser/flow-comments.spec.js @@ -58,7 +58,7 @@ describe('[Comments] when parsing', () => { }); it('should handle comments at the end no trailing newline', function () { - const res = flow.parser.parse('graph TD;\n A-->B\n%% Commento'); + const res = flow.parser.parse('graph TD;\n A-->B\n%% Comment'); const vert = flow.parser.yy.getVertices(); const edges = flow.parser.yy.getEdges(); @@ -73,7 +73,7 @@ describe('[Comments] when parsing', () => { }); it('should handle comments at the end many trailing newlines', function () { - const res = flow.parser.parse('graph TD;\n A-->B\n%% Commento\n\n\n'); + const res = flow.parser.parse('graph TD;\n A-->B\n%% Comment\n\n\n'); const vert = flow.parser.yy.getVertices(); const edges = flow.parser.yy.getEdges(); diff --git a/src/diagrams/flowchart/parser/flow.spec.js b/src/diagrams/flowchart/parser/flow.spec.js index b2b01f84f4..6b440da798 100644 --- a/src/diagrams/flowchart/parser/flow.spec.js +++ b/src/diagrams/flowchart/parser/flow.spec.js @@ -12,7 +12,7 @@ describe('parsing a flow chart', function () { flow.parser.yy.clear(); }); - it('should handle a trailing whitespaces after statememnts', function () { + it('should handle a trailing whitespaces after statements', function () { const res = flow.parser.parse('graph TD;\n\n\n %% Comment\n A-->B; \n B-->C;'); const vert = flow.parser.yy.getVertices(); diff --git a/src/diagrams/state/stateDiagram-v2.spec.js b/src/diagrams/state/stateDiagram-v2.spec.js index 701fec62bb..ad224f14da 100644 --- a/src/diagrams/state/stateDiagram-v2.spec.js +++ b/src/diagrams/state/stateDiagram-v2.spec.js @@ -107,8 +107,8 @@ describe('state diagram, ', function () { }); it('handle "as" in state names 2', function () { const str = `stateDiagram-v2 - assembleas - state assembleas + assemblies + state assemblies `; parser.parse(str); @@ -207,14 +207,14 @@ describe('state diagram, ', function () { parser.parse(str); }); - it('should handle state deifintions with separation of id', function () { + it('should handle state definitions with separation of id', function () { const str = `stateDiagram-v2\n state "Long state description" as state1 `; parser.parse(str); }); - it('should handle state deifintions with separation of id', function () { + it('should handle state definitions with separation of id', function () { const str = `stateDiagram-v2 state "Not Shooting State" as NotShooting { state "Idle mode" as Idle diff --git a/src/diagrams/state/stateDiagram.spec.js b/src/diagrams/state/stateDiagram.spec.js index 0b2b30a1e1..144dd16e58 100644 --- a/src/diagrams/state/stateDiagram.spec.js +++ b/src/diagrams/state/stateDiagram.spec.js @@ -122,8 +122,8 @@ describe('state diagram, ', function () { }); it('handle "as" in state names 2', function () { const str = `stateDiagram - assembleas - state assembleas + assemblies + state assemblies `; parser.parse(str); @@ -222,14 +222,14 @@ describe('state diagram, ', function () { parser.parse(str); }); - it('should handle state deifintions with separation of id', function () { + it('should handle state defintions with separation of id', function () { const str = `stateDiagram\n state "Long state description" as state1 `; parser.parse(str); }); - it('should handle state deifintions with separation of id', function () { + it('should handle state defintions with separation of id', function () { const str = `stateDiagram state "Not Shooting State" as NotShooting { state "Idle mode" as Idle diff --git a/src/mermaid.js b/src/mermaid.js index 5181eb557f..3ea510a7f4 100644 --- a/src/mermaid.js +++ b/src/mermaid.js @@ -90,7 +90,7 @@ const initThrowsErrors = function () { mermaidAPI.updateSiteConfig({ gantt: mermaid.ganttConfig }); } - const idGeneratior = new utils.initIdGeneratior(conf.deterministicIds, conf.deterministicIDSeed); + const idGenerator = new utils.initIdGenerator(conf.deterministicIds, conf.deterministicIDSeed); let txt; @@ -105,7 +105,7 @@ const initThrowsErrors = function () { continue; } - const id = `mermaid-${idGeneratior.next()}`; + const id = `mermaid-${idGenerator.next()}`; // Fetch the graph definition including tags txt = element.innerHTML; @@ -189,7 +189,7 @@ if (typeof document !== 'undefined') { } /** - * ## setParseErrorHandler Alternativet to directly setting parseError using: + * ## setParseErrorHandler Alternative to directly setting parseError using: * * ```js * mermaid.parseError = function(err,hash){= diff --git a/src/mermaidAPI.js b/src/mermaidAPI.js index efa93791a8..91c06c2b9c 100644 --- a/src/mermaidAPI.js +++ b/src/mermaidAPI.js @@ -272,7 +272,7 @@ const render = function (id, _txt, cb, container) { // let d3Iframe; let root = select('body'); - // In regular execurtion the container will be the div with a mermaid class + // In regular execution the container will be the div with a mermaid class if (typeof container !== 'undefined') { if (cnf.securityLevel === 'sandbox') { // IF we are in sandboxed mode, we do everyting mermaid related @@ -317,7 +317,7 @@ const render = function (id, _txt, cb, container) { } else { // No container was provided // If there is an existsing element with the id, we remove it - // this likley a previously rendered diagram + // this likely a previously rendered diagram const existingSvg = document.getElementById(id); if (existingSvg) { existingSvg.remove(); @@ -741,7 +741,7 @@ function initialize(options) { } } // Set default options - configApi.saveConfigFromInitilize(options); + configApi.saveConfigFromInitialize(options); if (options && options.theme && theme[options.theme]) { // Todo merge with user options diff --git a/src/utils.js b/src/utils.js index 7d44e7f7a2..2cbb8b7723 100644 --- a/src/utils.js +++ b/src/utils.js @@ -945,7 +945,7 @@ export const setupGraphViewbox = function (graph, svgElem, padding, useMaxWidth) // Ensure the viewBox includes the whole svgBounds area with extra space for padding const vBox = `0 0 ${width} ${height}`; log.debug( - 'Grpah.label', + 'Graph.label', graph._label, 'swidth', sWidth, @@ -966,7 +966,7 @@ export const setupGraphViewbox = function (graph, svgElem, padding, useMaxWidth) svgElem.select('g').attr('transform', `translate(${tx}, ${ty})`); }; -export const initIdGeneratior = class iterator { +export const initIdGenerator = class iterator { constructor(deterministic, seed) { this.deterministic = deterministic; this.seed = seed; @@ -1080,7 +1080,7 @@ export default { memoize, runFunc, entityDecode, - initIdGeneratior, + initIdGenerator: initIdGenerator, directiveSanitizer, sanitizeCss, }; diff --git a/src/utils.spec.js b/src/utils.spec.js index 2e8d335d0f..b079beeeb1 100644 --- a/src/utils.spec.js +++ b/src/utils.spec.js @@ -302,7 +302,7 @@ describe('when calculating SVG size', function () { describe('when initializing the id generator', function () { it('should return a random number generator based on Date', function (done) { - const idGenerator = new utils.initIdGeneratior(false); + const idGenerator = new utils.initIdGenerator(false); expect(typeof idGenerator.next).toEqual('function'); const lastId = idGenerator.next(); setTimeout(() => { @@ -312,7 +312,7 @@ describe('when initializing the id generator', function () { }); it('should return a non random number generator', function () { - const idGenerator = new utils.initIdGeneratior(true); + const idGenerator = new utils.initIdGenerator(true); expect(typeof idGenerator.next).toEqual('function'); const start = 0; const lastId = idGenerator.next(); @@ -321,7 +321,7 @@ describe('when initializing the id generator', function () { }); it('should return a non random number generator based on seed', function () { - const idGenerator = new utils.initIdGeneratior(true, 'thisIsASeed'); + const idGenerator = new utils.initIdGenerator(true, 'thisIsASeed'); expect(typeof idGenerator.next).toEqual('function'); const start = 11; const lastId = idGenerator.next(); From 4ff0a32ea57001727fe3955ca6b5c68ec0a043b9 Mon Sep 17 00:00:00 2001 From: mmorel-35 Date: Mon, 27 Jun 2022 07:03:45 +0000 Subject: [PATCH 18/24] chore: update browsers list --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index cc5861c91f..8cc5b4676e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3355,9 +3355,9 @@ camelcase@^6.2.0: integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg== caniuse-lite@^1.0.30001332: - version "1.0.30001357" - resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001357.tgz" - integrity sha512-b+KbWHdHePp+ZpNj+RDHFChZmuN+J5EvuQUlee9jOQIUAdhv9uvAZeEtUeLAknXbkiu1uxjQ9NLp1ie894CuWg== + version "1.0.30001359" + resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001359.tgz" + integrity sha512-Xln/BAsPzEuiVLgJ2/45IaqD9jShtk3Y33anKb4+yLwQzws3+v6odKfpgES/cDEaZMLzSChpIGdbOYtH9MyuHw== caseless@~0.12.0: version "0.12.0" From ea47bcd682f6c12caea61f11a7b5a425769cd4c9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Jun 2022 10:06:35 +0200 Subject: [PATCH 19/24] chore(deps-dev): bump @commitlint/cli from 17.0.2 to 17.0.3 (#3180) Bumps [@commitlint/cli](https://github.com/conventional-changelog/commitlint/tree/HEAD/@commitlint/cli) from 17.0.2 to 17.0.3. - [Release notes](https://github.com/conventional-changelog/commitlint/releases) - [Changelog](https://github.com/conventional-changelog/commitlint/blob/master/@commitlint/cli/CHANGELOG.md) - [Commits](https://github.com/conventional-changelog/commitlint/commits/v17.0.3/@commitlint/cli) --- updated-dependencies: - dependency-name: "@commitlint/cli" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 72 +++++++++++++++++++++++++++++++------------------------ 1 file changed, 41 insertions(+), 31 deletions(-) diff --git a/yarn.lock b/yarn.lock index 8cc5b4676e..2f9d30d5ce 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1394,13 +1394,13 @@ integrity sha512-mgmE7XBYY/21erpzhexk4Cj1cyTQ9LzvnTxtzM17BJ7ERMNE6W72mQRo0I1Ud8eFJ+RVVIcBNhLFZ3GX4XFz5w== "@commitlint/cli@^17.0.0": - version "17.0.2" - resolved "https://registry.yarnpkg.com/@commitlint/cli/-/cli-17.0.2.tgz#57c925fb5f09b8e4a83448d94db291ddf7aa58ee" - integrity sha512-Axe89Js0YzGGd4gxo3JLlF7yIdjOVpG1LbOorGc6PfYF+drBh14PvarSDLzyd2TNqdylUCq9wb9/A88ZjIdyhA== + version "17.0.3" + resolved "https://registry.yarnpkg.com/@commitlint/cli/-/cli-17.0.3.tgz#50be9d9a8d79f6c47bfd2703638fe65215eb2526" + integrity sha512-oAo2vi5d8QZnAbtU5+0cR2j+A7PO8zuccux65R/EycwvsZrDVyW518FFrnJK2UQxbRtHFFIG+NjQ6vOiJV0Q8A== dependencies: "@commitlint/format" "^17.0.0" - "@commitlint/lint" "^17.0.0" - "@commitlint/load" "^17.0.0" + "@commitlint/lint" "^17.0.3" + "@commitlint/load" "^17.0.3" "@commitlint/read" "^17.0.0" "@commitlint/types" "^17.0.0" execa "^5.0.0" @@ -1416,13 +1416,13 @@ dependencies: conventional-changelog-conventionalcommits "^5.0.0" -"@commitlint/config-validator@^17.0.0": - version "17.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/config-validator/-/config-validator-17.0.0.tgz#49ab09f3ca0ac3449e79ea389cb4942423162ac0" - integrity sha512-78IQjoZWR4kDHp/U5y17euEWzswJpPkA9TDL5F6oZZZaLIEreWzrDZD5PWtM8MsSRl/K2LDU/UrzYju2bKLMpA== +"@commitlint/config-validator@^17.0.3": + version "17.0.3" + resolved "https://registry.yarnpkg.com/@commitlint/config-validator/-/config-validator-17.0.3.tgz#5d1ec17eece1f85a0d06c05d168a039b313eb5d7" + integrity sha512-3tLRPQJKapksGE7Kee9axv+9z5I2GDHitDH4q63q7NmNA0wkB+DAorJ0RHz2/K00Zb1/MVdHzhCga34FJvDihQ== dependencies: "@commitlint/types" "^17.0.0" - ajv "^6.12.6" + ajv "^8.11.0" "@commitlint/ensure@^17.0.0": version "17.0.0" @@ -1445,32 +1445,32 @@ "@commitlint/types" "^17.0.0" chalk "^4.1.0" -"@commitlint/is-ignored@^17.0.0": - version "17.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/is-ignored/-/is-ignored-17.0.0.tgz#64f53517b390689e58aa3c29fbf1e05b7d4fbd65" - integrity sha512-UmacD0XM/wWykgdXn5CEWVS4XGuqzU+ZGvM2hwv85+SXGnIOaG88XHrt81u37ZeVt1riWW+YdOxcJW6+nd5v5w== +"@commitlint/is-ignored@^17.0.3": + version "17.0.3" + resolved "https://registry.yarnpkg.com/@commitlint/is-ignored/-/is-ignored-17.0.3.tgz#0e1c725c1e50aea5852fb1260bc92b2ee1856425" + integrity sha512-/wgCXAvPtFTQZxsVxj7owLeRf5wwzcXLaYmrZPR4a87iD4sCvUIRl1/ogYrtOyUmHwWfQsvjqIB4mWE/SqWSnA== dependencies: "@commitlint/types" "^17.0.0" semver "7.3.7" -"@commitlint/lint@^17.0.0": - version "17.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/lint/-/lint-17.0.0.tgz#38ef61e0e977d738f738233fbcdf33a5fc04cf96" - integrity sha512-5FL7VLvGJQby24q0pd4UdM8FNFcL+ER1T/UBf8A9KRL5+QXV1Rkl6Zhcl7+SGpGlVo6Yo0pm6aLW716LVKWLGg== +"@commitlint/lint@^17.0.3": + version "17.0.3" + resolved "https://registry.yarnpkg.com/@commitlint/lint/-/lint-17.0.3.tgz#98542a48f03b5c144309e24cbe1c032366ea75e2" + integrity sha512-2o1fk7JUdxBUgszyt41sHC/8Nd5PXNpkmuOo9jvGIjDHzOwXyV0PSdbEVTH3xGz9NEmjohFHr5l+N+T9fcxong== dependencies: - "@commitlint/is-ignored" "^17.0.0" + "@commitlint/is-ignored" "^17.0.3" "@commitlint/parse" "^17.0.0" "@commitlint/rules" "^17.0.0" "@commitlint/types" "^17.0.0" -"@commitlint/load@^17.0.0": - version "17.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/load/-/load-17.0.0.tgz#0bbefe6d8b99276714c5ea8ef32de2bd2f082698" - integrity sha512-XaiHF4yWQOPAI0O6wXvk+NYLtJn/Xb7jgZEeKd4C1ZWd7vR7u8z5h0PkWxSr0uLZGQsElGxv3fiZ32C5+q6M8w== +"@commitlint/load@^17.0.3": + version "17.0.3" + resolved "https://registry.yarnpkg.com/@commitlint/load/-/load-17.0.3.tgz#683aa484a5515714512e442f2f4b11f75e66097a" + integrity sha512-3Dhvr7GcKbKa/ey4QJ5MZH3+J7QFlARohUow6hftQyNjzoXXROm+RwpBes4dDFrXG1xDw9QPXA7uzrOShCd4bw== dependencies: - "@commitlint/config-validator" "^17.0.0" + "@commitlint/config-validator" "^17.0.3" "@commitlint/execute-rule" "^17.0.0" - "@commitlint/resolve-extends" "^17.0.0" + "@commitlint/resolve-extends" "^17.0.3" "@commitlint/types" "^17.0.0" "@types/node" ">=12" chalk "^4.1.0" @@ -1504,12 +1504,12 @@ fs-extra "^10.0.0" git-raw-commits "^2.0.0" -"@commitlint/resolve-extends@^17.0.0": - version "17.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/resolve-extends/-/resolve-extends-17.0.0.tgz#3a40ee08184b984acf475ebc962641f435e3a639" - integrity sha512-wi60WiJmwaQ7lzMXK8Vbc18Hq9tE2j/6iv2AFfPUGV7fvfY6Sf1iNKuUHirSqR0fquUyufIXe4y/K9A6LVIIvw== +"@commitlint/resolve-extends@^17.0.3": + version "17.0.3" + resolved "https://registry.yarnpkg.com/@commitlint/resolve-extends/-/resolve-extends-17.0.3.tgz#43b237899e2abd59d16af091521b888c8a071412" + integrity sha512-H/RFMvrcBeJCMdnVC4i8I94108UDccIHrTke2tyQEg9nXQnR5/Hd6MhyNWkREvcrxh9Y+33JLb+PiPiaBxCtBA== dependencies: - "@commitlint/config-validator" "^17.0.0" + "@commitlint/config-validator" "^17.0.3" "@commitlint/types" "^17.0.0" import-fresh "^3.0.0" lodash "^4.17.19" @@ -2705,7 +2705,7 @@ ajv-keywords@^5.0.0: dependencies: fast-deep-equal "^3.1.3" -ajv@^6.10.0, ajv@^6.12.3, ajv@^6.12.4, ajv@^6.12.5, ajv@^6.12.6: +ajv@^6.10.0, ajv@^6.12.3, ajv@^6.12.4, ajv@^6.12.5: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -2725,6 +2725,16 @@ ajv@^8.0.0, ajv@^8.8.0: require-from-string "^2.0.2" uri-js "^4.2.2" +ajv@^8.11.0: + version "8.11.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.11.0.tgz#977e91dd96ca669f54a11e23e378e33b884a565f" + integrity sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg== + dependencies: + fast-deep-equal "^3.1.1" + json-schema-traverse "^1.0.0" + require-from-string "^2.0.2" + uri-js "^4.2.2" + amdefine@>=0.0.4: version "1.0.1" resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" From 2c437628d5b40eefbe1fdcdd896044de9719ca26 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Jun 2022 11:06:38 +0200 Subject: [PATCH 20/24] chore(deps-dev): bump cypress from 10.1.0 to 10.2.0 (#3178) Bumps [cypress](https://github.com/cypress-io/cypress) from 10.1.0 to 10.2.0. - [Release notes](https://github.com/cypress-io/cypress/releases) - [Changelog](https://github.com/cypress-io/cypress/blob/develop/.releaserc.base.js) - [Commits](https://github.com/cypress-io/cypress/compare/v10.1.0...v10.2.0) --- updated-dependencies: - dependency-name: cypress dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 15 +++++---------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 46e67c01df..c172e80208 100644 --- a/package.json +++ b/package.json @@ -81,7 +81,7 @@ "concurrently": "^7.0.0", "coveralls": "^3.0.2", "css-to-string-loader": "^0.1.3", - "cypress": "10.1.0", + "cypress": "10.2.0", "cypress-image-snapshot": "^4.0.1", "documentation": "13.2.0", "eslint": "^8.4.1", diff --git a/yarn.lock b/yarn.lock index 2f9d30d5ce..3112f9e796 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2201,16 +2201,11 @@ resolved "https://registry.yarnpkg.com/@types/ms/-/ms-0.7.31.tgz#31b7ca6407128a3d2bbc27fe2d21b345397f6197" integrity sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA== -"@types/node@*": +"@types/node@*", "@types/node@>=12": version "18.0.0" resolved "https://registry.yarnpkg.com/@types/node/-/node-18.0.0.tgz#67c7b724e1bcdd7a8821ce0d5ee184d3b4dd525a" integrity sha512-cHlGmko4gWLVI27cGJntjs/Sj8th9aYwplmZFwmmgYQQvL5NUsgVJG7OddLvNfLqYS31KFN0s3qlaD9qCaxACA== -"@types/node@>=12": - version "17.0.17" - resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.17.tgz#a8ddf6e0c2341718d74ee3dc413a13a042c45a0c" - integrity sha512-e8PUNQy1HgJGV3iU/Bp2+D/DXh3PYeyli8LgIwsQcs1Ar1LoaWHSIT6Rw+H2rNJmiq6SNWiDytfx8+gYj7wDHw== - "@types/node@^14.14.31": version "14.18.0" resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.0.tgz#98df2397f6936bfbff4f089e40e06fa5dd88d32a" @@ -4133,10 +4128,10 @@ cypress-image-snapshot@^4.0.1: pkg-dir "^3.0.0" term-img "^4.0.0" -cypress@10.1.0: - version "10.1.0" - resolved "https://registry.yarnpkg.com/cypress/-/cypress-10.1.0.tgz#6514a26c721822a02bc194e9a7f72c3142aea174" - integrity sha512-aQ4JVZVib4Xd9FZW8IRZfKelUvqF4y5A+oUbNvn8TlsBmEfIg3m5Xd6Mt6PVU/jHiVJ9Psl905B3ZPnrDcmyuQ== +cypress@10.2.0: + version "10.2.0" + resolved "https://registry.yarnpkg.com/cypress/-/cypress-10.2.0.tgz#ca078abfceb13be2a33cbba6e0e80ded770f542a" + integrity sha512-+i9lY5ENlfi2mJwsggzR+XASOIgMd7S/Gd3/13NCpv596n3YSplMAueBTIxNLcxDpTcIksp+9pM3UaDrJDpFqA== dependencies: "@cypress/request" "^2.88.10" "@cypress/xvfb" "^1.2.4" From 3ba6e70c964ea77fc91999967c638446d1737903 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Jun 2022 11:06:53 +0200 Subject: [PATCH 21/24] chore(deps-dev): bump lint-staged from 13.0.2 to 13.0.3 (#3177) Bumps [lint-staged](https://github.com/okonet/lint-staged) from 13.0.2 to 13.0.3. - [Release notes](https://github.com/okonet/lint-staged/releases) - [Commits](https://github.com/okonet/lint-staged/compare/v13.0.2...v13.0.3) --- updated-dependencies: - dependency-name: lint-staged dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 3112f9e796..880f1dae3c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7686,9 +7686,9 @@ lines-and-columns@^1.1.6: integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== lint-staged@^13.0.0: - version "13.0.2" - resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-13.0.2.tgz#35a1c57130e9ad5b1dea784972a40777ba433dd5" - integrity sha512-qQLfLTh9z34eMzfEHENC+QBskZfxjomrf+snF3xJ4BzilORbD989NLqQ00ughsF/A+PT41e87+WsMFabf9++pQ== + version "13.0.3" + resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-13.0.3.tgz#d7cdf03a3830b327a2b63c6aec953d71d9dc48c6" + integrity sha512-9hmrwSCFroTSYLjflGI8Uk+GWAwMB4OlpU4bMJEAT5d/llQwtYKoim4bLOyLCuWFAhWEupE0vkIFqtw/WIsPug== dependencies: cli-truncate "^3.1.0" colorette "^2.0.17" From 1410badb05e871dc552c9a7030dd1a0acf465ffe Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Jun 2022 11:07:03 +0200 Subject: [PATCH 22/24] chore(deps-dev): bump @commitlint/config-conventional (#3179) Bumps [@commitlint/config-conventional](https://github.com/conventional-changelog/commitlint/tree/HEAD/@commitlint/config-conventional) from 17.0.2 to 17.0.3. - [Release notes](https://github.com/conventional-changelog/commitlint/releases) - [Changelog](https://github.com/conventional-changelog/commitlint/blob/master/@commitlint/config-conventional/CHANGELOG.md) - [Commits](https://github.com/conventional-changelog/commitlint/commits/v17.0.3/@commitlint/config-conventional) --- updated-dependencies: - dependency-name: "@commitlint/config-conventional" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 880f1dae3c..8192774fc9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1410,9 +1410,9 @@ yargs "^17.0.0" "@commitlint/config-conventional@^17.0.0": - version "17.0.2" - resolved "https://registry.yarnpkg.com/@commitlint/config-conventional/-/config-conventional-17.0.2.tgz#298c9076e25c1e8760f04ee1be8ce43c856a4b72" - integrity sha512-MfP0I/JbxKkzo+HXWB7B3WstGS4BiniotU3d3xQ9gK8cR0DbeZ4MuyGCWF65YDyrcDTS3WlrJ3ndSPA1pqhoPw== + version "17.0.3" + resolved "https://registry.yarnpkg.com/@commitlint/config-conventional/-/config-conventional-17.0.3.tgz#61e937357ce63ea08a2017e58b918748fcf3abc5" + integrity sha512-HCnzTm5ATwwwzNVq5Y57poS0a1oOOcd5pc1MmBpLbGmSysc4i7F/++JuwtdFPu16sgM3H9J/j2zznRLOSGVO2A== dependencies: conventional-changelog-conventionalcommits "^5.0.0" From 5110e427869b4c5a660d69968909ca7e98e4af2b Mon Sep 17 00:00:00 2001 From: Knut Sveidqvist Date: Tue, 28 Jun 2022 18:50:41 +0200 Subject: [PATCH 23/24] Better balance check --- src/utils.js | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/utils.js b/src/utils.js index 805556dd6a..be28ef8df7 100644 --- a/src/utils.js +++ b/src/utils.js @@ -1057,7 +1057,7 @@ export const directiveSanitizer = (args) => { for (let i = 0; i < kArr.length; i++) { const k = kArr[i]; const val = args.themeVariables[k]; - if (!val.match(/^[a-zA-Z0-9#,";()%. ]+$/)) { + if (val && val.match && !val.match(/^[a-zA-Z0-9#,";()%. ]+$/)) { args.themeVariables[k] = ''; } } @@ -1065,9 +1065,19 @@ export const directiveSanitizer = (args) => { log.debug('After sanitization', args); }; export const sanitizeCss = (str) => { - const stringsearch = 'o'; - const startCnt = (str.match(/\{/g) || []).length; - const endCnt = (str.match(/\}/g) || []).length; + let startCnt = 0; + let endCnt = 0; + + for (let i = 0; i < str.length; i++) { + if (startCnt < endCnt) { + return '{ /* ERROR: Unbalanced CSS */ }'; + } + if (str[i] === '{') { + startCnt++; + } else if (str[i] === '}') { + endCnt++; + } + } if (startCnt !== endCnt) { return '{ /* ERROR: Unbalanced CSS */ }'; } From 1509ee68bede6c6dc12bcc196d54b89f3b97ac4a Mon Sep 17 00:00:00 2001 From: ashishj Date: Tue, 28 Jun 2022 20:02:51 +0200 Subject: [PATCH 24/24] Updated the release version to 9.1.4 --- docs/Setup.md | 438 +++++++++++++++++++++++++++++++++++++++++++++++- docs/index.html | 2 +- package.json | 2 +- 3 files changed, 433 insertions(+), 9 deletions(-) diff --git a/docs/Setup.md b/docs/Setup.md index 65e8ef7710..04026f5d88 100644 --- a/docs/Setup.md +++ b/docs/Setup.md @@ -118,7 +118,7 @@ Default value: ['secure', 'securityLevel', 'startOnLoad', 'maxTextSize'] This option controls if the generated ids of nodes in the SVG are generated randomly or based on a seed. If set to false, the IDs are generated based on the current date and thus are not -deterministic. This is the default behavior. +deterministic. This is the default behaviour. **Notes**: @@ -924,12 +924,20 @@ The object containing configurations specific for c4 diagrams ### c4ShapeMargin -| Parameter | Description | Type | Required | Values | -| ----------- | --------------------- | ------- | -------- | ------------------ | -| shapeMargin | Margin between shapes | Integer | Required | Any Positive Value | +| Parameter | Description | Type | Required | Values | +| ------------- | --------------------- | ------- | -------- | ------------------ | +| c4ShapeMargin | Margin between shapes | Integer | Required | Any Positive Value | **Notes:** Default value: 50 +### c4ShapePadding + +| Parameter | Description | Type | Required | Values | +| -------------- | ---------------------- | ------- | -------- | ------------------ | +| c4ShapePadding | Padding between shapes | Integer | Required | Any Positive Value | + +**Notes:** Default value: 20 + ### width | Parameter | Description | Type | Required | Values | @@ -948,9 +956,9 @@ The object containing configurations specific for c4 diagrams ### boxMargin -| Parameter | Description | Type | Required | Values | -| --------- | ------------------------ | ------- | -------- | ------------------ | -| boxMargin | Margin around loop boxes | Integer | Required | Any Positive Value | +| Parameter | Description | Type | Required | Values | +| --------- | ------------------- | ------- | -------- | ------------------ | +| boxMargin | Margin around boxes | Integer | Required | Any Positive Value | **Notes:** Default value: 10 @@ -965,6 +973,422 @@ scaling with the available space. If set to false, the absolute space required i Default value: true +### c4ShapeInRow + +| Parameter | Description | Type | Required | Values | +| ------------ | ----------- | ------- | -------- | ------------------ | +| c4ShapeInRow | See Notes | Integer | Required | Any Positive Value | + +**Notes:** How many shapes to place in each row. + +Default value: 4 + +### c4BoundaryInRow + +| Parameter | Description | Type | Required | Values | +| --------------- | ----------- | ------- | -------- | ------------------ | +| c4BoundaryInRow | See Notes | Integer | Required | Any Positive Value | + +**Notes:** How many boundarys to place in each row. + +Default value: 2 + +### personFontSize + +This sets the font size of Person shape for the diagram + +**Notes:** Default value: 14. + +### personFontFamily + +This sets the font family of Person shape for the diagram + +**Notes:** Default value: "Open Sans", sans-serif. + +### personFontWeight + +This sets the font weight of Person shape for the diagram + +**Notes:** Default value: normal. + +### external_personFontSize + +This sets the font size of External Person shape for the diagram + +**Notes:** Default value: 14. + +### external_personFontFamily + +This sets the font family of External Person shape for the diagram + +**Notes:** Default value: "Open Sans", sans-serif. + +### external_personFontWeight + +This sets the font weight of External Person shape for the diagram + +**Notes:** Default value: normal. + +### systemFontSize + +This sets the font size of System shape for the diagram + +**Notes:** Default value: 14. + +### systemFontFamily + +This sets the font family of System shape for the diagram + +**Notes:** Default value: "Open Sans", sans-serif. + +### systemFontWeight + +This sets the font weight of System shape for the diagram + +**Notes:** Default value: normal. + +### external_systemFontSize + +This sets the font size of External System shape for the diagram + +**Notes:** Default value: 14. + +### external_systemFontFamily + +This sets the font family of External System shape for the diagram + +**Notes:** Default value: "Open Sans", sans-serif. + +### external_systemFontWeight + +This sets the font weight of External System shape for the diagram + +**Notes:** Default value: normal. + +### system_dbFontSize + +This sets the font size of System DB shape for the diagram + +**Notes:** Default value: 14. + +### system_dbFontFamily + +This sets the font family of System DB shape for the diagram + +**Notes:** Default value: "Open Sans", sans-serif. + +### system_dbFontWeight + +This sets the font weight of System DB shape for the diagram + +**Notes:** Default value: normal. + +### external_system_dbFontSize + +This sets the font size of External System DB shape for the diagram + +**Notes:** Default value: 14. + +### external_system_dbFontFamily + +This sets the font family of External System DB shape for the diagram + +**Notes:** Default value: "Open Sans", sans-serif. + +### external_system_dbFontWeight + +This sets the font weight of External System DB shape for the diagram + +**Notes:** Default value: normal. + +### system_queueFontSize + +This sets the font size of System Queue shape for the diagram + +**Notes:** Default value: 14. + +### system_queueFontFamily + +This sets the font family of System Queue shape for the diagram + +**Notes:** Default value: "Open Sans", sans-serif. + +### system_queueFontWeight + +This sets the font weight of System Queue shape for the diagram + +**Notes:** Default value: normal. + +### external_system_queueFontSize + +This sets the font size of External System Queue shape for the diagram + +**Notes:** Default value: 14. + +### external_system_queueFontFamily + +This sets the font family of External System Queue shape for the diagram + +**Notes:** Default value: "Open Sans", sans-serif. + +### external_system_queueFontWeight + +This sets the font weight of External System Queue shape for the diagram + +**Notes:** Default value: normal. + +### boundaryFontSize + +This sets the font size of Boundary shape for the diagram + +**Notes:** Default value: 14. + +### boundaryFontFamily + +This sets the font family of Boundary shape for the diagram + +**Notes:** Default value: "Open Sans", sans-serif. + +### boundaryFontWeight + +This sets the font weight of Boundary shape for the diagram + +**Notes:** Default value: normal. + +### messageFontSize + +This sets the font size of Message shape for the diagram + +**Notes:** Default value: 12. + +### messageFontFamily + +This sets the font family of Message shape for the diagram + +**Notes:** Default value: "Open Sans", sans-serif. + +### messageFontWeight + +This sets the font weight of Message shape for the diagram + +**Notes:** Default value: normal. + +### containerFontSize + +This sets the font size of Container shape for the diagram + +**Notes:** Default value: 14. + +### containerFontFamily + +This sets the font family of Container shape for the diagram + +**Notes:** Default value: "Open Sans", sans-serif. + +### containerFontWeight + +This sets the font weight of Container shape for the diagram + +**Notes:** Default value: normal. + +### external_containerFontSize + +This sets the font size of External Container shape for the diagram + +**Notes:** Default value: 14. + +### external_containerFontFamily + +This sets the font family of External Container shape for the diagram + +**Notes:** Default value: "Open Sans", sans-serif. + +### external_containerFontWeight + +This sets the font weight of External Container shape for the diagram + +**Notes:** Default value: normal. + +### container_dbFontSize + +This sets the font size of Container DB shape for the diagram + +**Notes:** Default value: 14. + +### container_dbFontFamily + +This sets the font family of Container DB shape for the diagram + +**Notes:** Default value: "Open Sans", sans-serif. + +### container_dbFontWeight + +This sets the font weight of Container DB shape for the diagram + +**Notes:** Default value: normal. + +### external_container_dbFontSize + +This sets the font size of External Container DB shape for the diagram + +**Notes:** Default value: 14. + +### external_container_dbFontFamily + +This sets the font family of External Container DB shape for the diagram + +**Notes:** Default value: "Open Sans", sans-serif. + +### external_container_dbFontWeight + +This sets the font weight of External Container DB shape for the diagram + +**Notes:** Default value: normal. + +### container_queueFontSize + +This sets the font size of Container Queue shape for the diagram + +**Notes:** Default value: 14. + +### container_queueFontFamily + +This sets the font family of Container Queue shape for the diagram + +**Notes:** Default value: "Open Sans", sans-serif. + +### container_queueFontWeight + +This sets the font weight of Container Queue shape for the diagram + +**Notes:** Default value: normal. + +### external_container_queueFontSize + +This sets the font size of External Container Queue shape for the diagram + +**Notes:** Default value: 14. + +### external_container_queueFontFamily + +This sets the font family of External Container Queue shape for the diagram + +**Notes:** Default value: "Open Sans", sans-serif. + +### external_container_queueFontWeight + +This sets the font weight of External Container Queue shape for the diagram + +**Notes:** Default value: normal. + +### componentFontSize + +This sets the font size of Component shape for the diagram + +**Notes:** Default value: 14. + +### componentFontFamily + +This sets the font family of Component shape for the diagram + +**Notes:** Default value: "Open Sans", sans-serif. + +### componentFontWeight + +This sets the font weight of Component shape for the diagram + +**Notes:** Default value: normal. + +### external_componentFontSize + +This sets the font size of External Component shape for the diagram + +**Notes:** Default value: 14. + +### external_componentFontFamily + +This sets the font family of External Component shape for the diagram + +**Notes:** Default value: "Open Sans", sans-serif. + +### external_componentFontWeight + +This sets the font weight of External Component shape for the diagram + +**Notes:** Default value: normal. + +### component_dbFontSize + +This sets the font size of Component DB shape for the diagram + +**Notes:** Default value: 14. + +### component_dbFontFamily + +This sets the font family of Component DB shape for the diagram + +**Notes:** Default value: "Open Sans", sans-serif. + +### component_dbFontWeight + +This sets the font weight of Component DB shape for the diagram + +**Notes:** Default value: normal. + +### external_component_dbFontSize + +This sets the font size of External Component DB shape for the diagram + +**Notes:** Default value: 14. + +### external_component_dbFontFamily + +This sets the font family of External Component DB shape for the diagram + +**Notes:** Default value: "Open Sans", sans-serif. + +### external_component_dbFontWeight + +This sets the font weight of External Component DB shape for the diagram + +**Notes:** Default value: normal. + +### component_queueFontSize + +This sets the font size of Component Queue shape for the diagram + +**Notes:** Default value: 14. + +### component_queueFontFamily + +This sets the font family of Component Queue shape for the diagram + +**Notes:** Default value: "Open Sans", sans-serif. + +### component_queueFontWeight + +This sets the font weight of Component Queue shape for the diagram + +**Notes:** Default value: normal. + +### external_component_queueFontSize + +This sets the font size of External Component Queue shape for the diagram + +**Notes:** Default value: 14. + +### external_component_queueFontFamily + +This sets the font family of External Component Queue shape for the diagram + +**Notes:** Default value: "Open Sans", sans-serif. + +### external_component_queueFontWeight + +This sets the font weight of External Component Queue shape for the diagram + +**Notes:** Default value: normal. + ### wrap This sets the auto-wrap state for the diagram diff --git a/docs/index.html b/docs/index.html index 48d3d2735d..8cd2488bb6 100644 --- a/docs/index.html +++ b/docs/index.html @@ -17,7 +17,7 @@ /> - +