diff --git a/.vscode/launch.json b/.vscode/launch.json index 7d17e55d2..b5b770182 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -13,17 +13,17 @@ "smartStep": true, "console": "integratedTerminal" }, - { - "name": "Docs generation", - "type": "node", - "request": "launch", - "args": ["scripts/docs.cli.mts"], - // we'll need to change this to --import in Node.JS v20.6.0 and up - "runtimeArgs": ["--loader", "tsx/esm"], - "cwd": "${workspaceRoot}/packages/mermaid", - "skipFiles": ["/**", "**/node_modules/**"], - "smartStep": true, - "internalConsoleOptions": "openOnSessionStart" - } + // { + // "name": "Docs generation", + // "type": "node", + // "request": "launch", + // "args": ["scripts/docs.cli.mts"], + // // we'll need to change this to --import in Node.JS v20.6.0 and up + // "runtimeArgs": ["--loader", "tsx/esm"], + // "cwd": "${workspaceRoot}/packages/mermaid", + // "skipFiles": ["/**", "**/node_modules/**"], + // "smartStep": true, + // "internalConsoleOptions": "openOnSessionStart" + // } ] } diff --git a/cypress/platform/knsv2.html b/cypress/platform/knsv2.html index 658a2aa9e..1f593ee3d 100644 --- a/cypress/platform/knsv2.html +++ b/cypress/platform/knsv2.html @@ -75,27 +75,80 @@ +
+---
+config:
+  theme: neo
+  look: neo
+  layout: elk
+  elk.mergeEdges: true
+  themeVariables: {}
+---
+
+stateDiagram
+  direction TB
+  A --> B
+  A --> C
+  A --> D
+  A --> E
+  A --> F
+      
+
+---
+config:
+  theme: default
+  look: classic
+  layout: elk
+---
+flowchart TD
+ subgraph subgraph_ao83d50qa["Subgraph"]
+        C("Let me think")
+  end
+    A["Easter"] -- Get eggs --> B("Go shopping")
+    B o--o C
+    B --> H["H"]
+    C -- One --> D["Laptop"]
+    C -- Two --> E["iPhone"]
+    C -- Three --> F["fa:fa-car Car"]
+    C --> G["G"]
+    G --> H
+    H --> C & E
+    D --> E
+    F --> E
+    style B stroke:#FF6D00,stroke-width:4px,stroke-dasharray: 0,fill:#FFFFFF
+
+
+      
+
+---
+config:
+  theme: default
+  look: classic
+  layout: elk
+---
+flowchart TD
+ subgraph subgraph_ao83d50qa["Subgraph1"]
+        C("Let me think")
+  end
+    A["Easter"] -- Get eggs --> B("Go shopping")
+    B o--o C
+    B --> H["H"]
+    C -- One --> D["Laptop"]
+    C -- Two --> E["iPhone"]
+    C -- Three --> F["fa:fa-car Car"]
+    C --> G["G"]
+    G --> H
+    H --> C & E
+    D --> E
+    F --> E
+    style B stroke:#FF6D00,stroke-width:4px,stroke-dasharray: 0,fill:#FFFFFF
+
+
+      
-flowchart LR
-subgraph Apa["Apa"]
-    A["Start"]
-    B["This is B"]
-end
-    A --> B & C["C"]
-    Apa --> C
-      
-
-flowchart LR
-subgraph Apa["Apa"]
-    B["This is B"]
-    A["Start"]
-end
-    A --> B & C["C"]
-    Apa --> C
-      
-
 flowchart RL
 subgraph Apa["Apa"]
   subgraph Gorilla
@@ -301,7 +354,7 @@ stateDiagram
   end note
       
-
+    
 stateDiagram-v2
     direction LR
     [*] --> Active
@@ -317,24 +370,25 @@ stateDiagram-v2
 
     
   
 
diff --git a/packages/mermaid/src/config.type.ts b/packages/mermaid/src/config.type.ts
index 0da68187a..afe636144 100644
--- a/packages/mermaid/src/config.type.ts
+++ b/packages/mermaid/src/config.type.ts
@@ -68,7 +68,7 @@ export interface MermaidConfig {
    * Defines which main look to use for the diagram.
    *
    */
-  look?: 'classic' | 'handdrawn' | 'neo';
+  look?: 'classic' | 'handdrawn';
   /**
    * Defines the seed to be used when using handdrawn look. This is important for the automated tests as they will always find differences without the seed. The default value is 0 which gives a random seed.
    *
diff --git a/packages/mermaid/src/rendering-util/rendering-elements/nodes.js b/packages/mermaid/src/rendering-util/rendering-elements/nodes.js
index 964a9a9b3..57aad7524 100644
--- a/packages/mermaid/src/rendering-util/rendering-elements/nodes.js
+++ b/packages/mermaid/src/rendering-util/rendering-elements/nodes.js
@@ -85,6 +85,8 @@ export const insertNode = async (elem, node, dir) => {
   newEl.attr('data-id', node.id);
   newEl.attr('data-node', true);
   newEl.attr('data-et', 'node');
+  newEl.attr('data-look', node.look);
+
   if (node.tooltip) {
     el.attr('title', node.tooltip);
   }
diff --git a/packages/mermaid/src/styles.ts b/packages/mermaid/src/styles.ts
index d106971ad..8cc5767b6 100644
--- a/packages/mermaid/src/styles.ts
+++ b/packages/mermaid/src/styles.ts
@@ -72,6 +72,11 @@ const getStyles = (
   .node .neo-node {
     stroke: ${options.nodeBorder};
   }
+
+  [data-look="neo"].node rect {
+    stroke: ${options.nodeBorder};
+    stroke: red !important
+  }
   ${userStyles}
 `;
 };