Repository: maxGraph/maxGraph
Pull request #796: refactor!: remove ARROW, EDGESTYLE, PERIMETER enums
Author: login: tbouffard
Labels: name: refactor
description: Code refactoring
Created: 2025-05-01T09:08:15Z | Merged: 2025-05-02T17:27:38Z

This slightly decreases the size of applications. In maxGraph examples, the decrease is about 0.5 kB.

BREAKING CHANGES: some enums have been removed. Use the string counterparts from related types:
  - `constants.ARROW` --> `ArrowValue` 
  - `constants.EDGESTYLE` --> `EdgeStyleValue` 
  - `constants.PERIMETER` --> `PerimeterValue`

## Notes

Covers #378

### Impact on the size of the examples

| Example                      | v0.19.0 | With #795 and #796 |
|-----------------------------|---------|------------|
| js-example                  | 475.30 kB | 474.01 kB |
| js-example-selected-features | 415.10 kB | 413.98 kB |
| js-example-without-default  | 347.33 kB | 346.21 kB |
| ts-example                  | 438.64 kB | 437.42 kB |
| ts-example-selected-features | 380.70 kB |  379.54 kB |
| ts-example-without-default  | 329.90 kB | 328.74 kB |

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

## Summary by CodeRabbit

- **Breaking Changes**
  - Removed several enums for arrow, edge style, and perimeter types; use corresponding string values instead.
- **Documentation**
  - Improved and clarified documentation for edge styles, perimeters, and type aliases, including registration names and usage guidance.
  - Updated changelog to reflect expanded breaking changes and migration instructions.
  - Updated code examples to use string values for style properties.
- **Chores**
  - Adjusted build configuration to slightly lower chunk size warning limits in example projects.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->


Diff:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index cadc5cc89b..258e664216 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,7 +10,11 @@ For more details on the contents of a release, see [the GitHub release page] (ht
 _**Note:** Yet to be released breaking changes appear here._
 
 **Breaking Changes**:
-- the `SHAPE` enum has been removed. Use values of the `ShapeValue` type instead.
+- Some enums have been removed. Use the string counterparts from related types:
+  - `constants.ARROW` --> `ArrowValue` 
+  - `constants.EDGESTYLE` --> `EdgeStyleValue` 
+  - `constants.PERIMETER` --> `PerimeterValue`
+  - `constants.SHAPE` --> `ShapeValue`
 
 ## 0.19.0
 
diff --git a/packages/core/src/types.ts b/packages/core/src/types.ts
index eaa0191e90..cb3f2b321a 100644
--- a/packages/core/src/types.ts
+++ b/packages/core/src/types.ts
@@ -930,6 +930,9 @@ export type OverflowValue = 'fill' | 'width' | 'auto' | 'hidden' | 'scroll' | 'v
 export type WhiteSpaceValue = 'normal' | 'wrap' | 'nowrap' | 'pre';
 /**
  * Names used to register the edge markers provided out-of-the-box by maxGraph with {@link MarkerShape.addMarker}.
+ *
+ * Can be used as a value for {@link CellStateStyle.startArrow} and {@link CellStateStyle.endArrow}.
+ *
  * @category Style
  */
 export type ArrowValue =
@@ -1228,6 +1231,8 @@ export type PerimeterFunction = (
 /**
  * Names used to register the perimeter provided out-of-the-box by maxGraph with {@link StyleRegistry.putValue}.
  *
+ * Can be used as a value for {@link CellStateStyle.perimeter}.
+ *
  * @category Perimeter
  */
 export type PerimeterValue =
@@ -1259,6 +1264,9 @@ export type EdgeStyleFunction = (
 
 /**
  * Names used to register the edge styles (a.k.a. connectors) provided out-of-the-box by maxGraph with {@link StyleRegistry.putValue}.
+ *
+ * Can be used as a value for {@link CellStateStyle.edgeStyle}.
+ *
  * @since 0.14.0
  * @category EdgeStyle
  */
diff --git a/packages/core/src/util/Constants.ts b/packages/core/src/util/Constants.ts
index f6c9eefe2c..40cbd47f88 100644
--- a/packages/core/src/util/Constants.ts
+++ b/packages/core/src/util/Constants.ts
@@ -442,27 +442,6 @@ export enum FONT {
   STRIKETHROUGH = 8,
 }
 
-export enum ARROW {
-  /** for classic arrow markers. */
-  CLASSIC = 'classic',
-  /** for thin classic arrow markers. */
-  CLASSIC_THIN = 'classicThin',
-  /** for block arrow markers. */
-  BLOCK = 'block',
-  /** for thin block arrow markers. */
-  BLOCK_THIN = 'blockThin',
-  /** for open arrow markers. */
-  OPEN = 'open',
-  /** for thin open arrow markers. */
-  OPEN_THIN = 'openThin',
-  /** for oval arrow markers. */
-  OVAL = 'oval',
-  /** for diamond arrow markers. */
-  DIAMOND = 'diamond',
-  /** for thin diamond arrow markers. */
-  DIAMOND_THIN = 'diamondThin',
-}
-
 export enum ALIGN {
   /** left horizontal alignment. */
   LEFT = 'left',
@@ -518,30 +497,3 @@ export enum ELBOW {
   VERTICAL = 'vertical',
   HORIZONTAL = 'horizontal',
 }
-
-/**
- * Names used to register the edge styles (a.k.a. connectors) provided out-of-the-box by maxGraph with {@link StyleRegistry.putValue}.
- * Can be used as a value for {@link CellStateStyle.edgeStyle}.
- */
-export enum EDGESTYLE {
-  ELBOW = 'elbowEdgeStyle',
-  ENTITY_RELATION = 'entityRelationEdgeStyle',
-  LOOP = 'loopEdgeStyle',
-  SIDETOSIDE = 'sideToSideEdgeStyle',
-  TOPTOBOTTOM = 'topToBottomEdgeStyle',
-  ORTHOGONAL = 'orthogonalEdgeStyle',
-  SEGMENT = 'segmentEdgeStyle',
-  MANHATTAN = 'manhattanEdgeStyle',
-}
-
-/**
- * Names used to register the perimeters provided out-of-the-box by maxGraph with {@link StyleRegistry.putValue}.
- * Can be used as a value for {@link CellStateStyle.perimeter}.
- */
-export enum PERIMETER {
-  ELLIPSE = 'ellipsePerimeter',
-  RECTANGLE = 'rectanglePerimeter',
-  RHOMBUS = 'rhombusPerimeter',
-  HEXAGON = 'hexagonPerimeter',
-  TRIANGLE = 'trianglePerimeter',
-}
diff --git a/packages/core/src/view/style/Stylesheet.ts b/packages/core/src/view/style/Stylesheet.ts
index 029c96f9a5..321164fa4d 100644
--- a/packages/core/src/view/style/Stylesheet.ts
+++ b/packages/core/src/view/style/Stylesheet.ts
@@ -133,7 +133,7 @@ export class Stylesheet {
    * ```javascript
    * const style = {} as CellStateStyle;
    * style.shape = 'rectangle';
-   * style.perimeter = PERIMETER.RECTANGLE;
+   * style.perimeter = 'rectanglePerimeter';
    * style.rounded = true;
    * graph.getStylesheet().putCellStyle('rounded', style);
    * ```
diff --git a/packages/core/src/view/style/edge/Elbow.ts b/packages/core/src/view/style/edge/Elbow.ts
index ab219d7f31..37161ae3ce 100644
--- a/packages/core/src/view/style/edge/Elbow.ts
+++ b/packages/core/src/view/style/edge/Elbow.ts
@@ -27,6 +27,8 @@ import type { EdgeStyleFunction } from '../../../types';
 /**
  * Uses either {@link SideToSide} or {@link TopToBottom} depending on the horizontal flag in the cell style.
  * {@link SideToSide} is used if horizontal is `true` or unspecified.
+ *
+ * This EdgeStyle is registered under `elbowEdgeStyle` in {@link StyleRegistry} when using {@link Graph} or calling {@link registerDefaultEdgeStyles}.
  */
 export const ElbowConnector: EdgeStyleFunction = (
   state: CellState,
@@ -48,7 +50,7 @@ export const ElbowConnector: EdgeStyleFunction = (
       const top = Math.min(source.y, target.y);
       const bottom = Math.max(source.y + source.height, target.y + target.height);
 
-      pt = <Point>state.view.transformControlPoint(state, pt);
+      pt = state.view.transformControlPoint(state, pt)!;
       vertical = pt.y < top || pt.y > bottom;
       horizontal = pt.x < left || pt.x > right;
     } else {
diff --git a/packages/core/src/view/style/edge/EntityRelation.ts b/packages/core/src/view/style/edge/EntityRelation.ts
index 88c44f94e9..1b742e5310 100644
--- a/packages/core/src/view/style/edge/EntityRelation.ts
+++ b/packages/core/src/view/style/edge/EntityRelation.ts
@@ -25,15 +25,17 @@ import type { EdgeStyleFunction } from '../../../types';
 import { EntityRelationConnectorConfig } from '../config';
 
 /**
- * Implements an entity relation style for edges (as used in database
- * schema diagrams). At the time the function is called, the result
- * array contains a placeholder (null) for the first absolute point,
+ * Implements an entity relation style for edges (as used in database schema diagrams).
+ *
+ * At the time the function is called, the result array contains a placeholder (`null`) for the first absolute point,
  * that is, the point where the edge and source terminal are connected.
- * The implementation of the style then adds all intermediate waypoints
- * except for the last point, that is, the connection point between the
- * edge and the target terminal. The first ant the last point in the
- * result array are then replaced with Point that take into account
- * the terminal's perimeter and next point on the edge.
+ *
+ * The implementation of the style then adds all intermediate waypoints except for the last point,
+ * that is, the connection point between the edge and the target terminal.
+ *
+ * The first and the last point in the result array are then replaced with Point that take into account the terminal's perimeter and next point on the edge.
+ *
+ * This EdgeStyle is registered under `entityRelationEdgeStyle` in {@link StyleRegistry} when using {@link Graph} or calling {@link registerDefaultEdgeStyles}.
  *
  * @param state {@link CellState} that represents the edge to be updated.
  * @param source {@link CellState} that represents the source terminal.
diff --git a/packages/core/src/view/style/edge/Loop.ts b/packages/core/src/view/style/edge/Loop.ts
index b64c063986..837f7813a3 100644
--- a/packages/core/src/view/style/edge/Loop.ts
+++ b/packages/core/src/view/style/edge/Loop.ts
@@ -25,6 +25,8 @@ import type { EdgeStyleFunction } from '../../../types';
 
 /**
  * Implements a self-reference, aka. loop.
+ *
+ * This EdgeStyle is registered under `loopEdgeStyle` in {@link StyleRegistry} when using {@link Graph} or calling {@link registerDefaultEdgeStyles}.
  */
 export const Loop: EdgeStyleFunction = (
   state: CellState,
diff --git a/packages/core/src/view/style/edge/Manhattan.ts b/packages/core/src/view/style/edge/Manhattan.ts
index 5a76b9f9ae..0f2ec4a99d 100644
--- a/packages/core/src/view/style/edge/Manhattan.ts
+++ b/packages/core/src/view/style/edge/Manhattan.ts
@@ -28,6 +28,8 @@ import { SegmentConnector } from './Segment';
  * ManhattanConnector code is based on code from https://github.com/mwangm/mxgraph-manhattan-connector
  *
  * Implements router to find the shortest route that avoids cells using manhattan distance as metric.
+ *
+ * This EdgeStyle is registered under `manhattanEdgeStyle` in {@link StyleRegistry} when using {@link Graph} or calling {@link registerDefaultEdgeStyles}.
  */
 export const ManhattanConnector: EdgeStyleFunction = (
   state: CellState,
diff --git a/packages/core/src/view/style/edge/Orthogonal.ts b/packages/core/src/view/style/edge/Orthogonal.ts
index ff093309a1..c51a6daf71 100644
--- a/packages/core/src/view/style/edge/Orthogonal.ts
+++ b/packages/core/src/view/style/edge/Orthogonal.ts
@@ -144,6 +144,8 @@ function getJettySize(state: CellState, isSource: boolean): number {
 /**
  * Implements a local orthogonal router between the given cells.
  *
+ * This EdgeStyle is registered under `orthogonalEdgeStyle` in {@link StyleRegistry} when using {@link Graph} or calling {@link registerDefaultEdgeStyles}.
+ *
  * @param state {@link CellState} that represents the edge to be updated.
  * @param sourceScaled {@link CellState} that represents the source terminal.
  * @param targetScaled {@link CellState} that represents the target terminal.
diff --git a/packages/core/src/view/style/edge/Segment.ts b/packages/core/src/view/style/edge/Segment.ts
index 252b7308b7..f5e1f4aad7 100644
--- a/packages/core/src/view/style/edge/Segment.ts
+++ b/packages/core/src/view/style/edge/Segment.ts
@@ -27,6 +27,8 @@ import type { EdgeStyleFunction } from '../../../types';
  * Implements an orthogonal edge style.
  * Use {@link EdgeSegmentHandler} as an interactive handler for this style.
  *
+ * This EdgeStyle is registered under `segmentEdgeStyle` in {@link StyleRegistry} when using {@link Graph} or calling {@link registerDefaultEdgeStyles}.
+ *
  * @param state {@link CellState} that represents the edge to be updated.
  * @param sourceScaled {@link CellState} that represents the source terminal.
  * @param targetScaled {@link CellState} that represents the target terminal.
diff --git a/packages/core/src/view/style/edge/SideToSide.ts b/packages/core/src/view/style/edge/SideToSide.ts
index 540aa94fda..9e946a5962 100644
--- a/packages/core/src/view/style/edge/SideToSide.ts
+++ b/packages/core/src/view/style/edge/SideToSide.ts
@@ -24,6 +24,8 @@ import type { EdgeStyleFunction } from '../../../types';
 
 /**
  * Implements a horizontal elbow edge.
+ *
+ * This EdgeStyle is registered under `sideToSideEdgeStyle` in {@link StyleRegistry} when using {@link Graph} or calling {@link registerDefaultEdgeStyles}.
  */
 export const SideToSide: EdgeStyleFunction = (
   state: CellState,
diff --git a/packages/core/src/view/style/edge/TopToBottom.ts b/packages/core/src/view/style/edge/TopToBottom.ts
index 0fb06072b8..be96d44ec1 100644
--- a/packages/core/src/view/style/edge/TopToBottom.ts
+++ b/packages/core/src/view/style/edge/TopToBottom.ts
@@ -24,6 +24,8 @@ import type { EdgeStyleFunction } from '../../../types';
 
 /**
  * Implements a vertical elbow edge.
+ *
+ * This EdgeStyle is registered under `topToBottomEdgeStyle` in {@link StyleRegistry} when using {@link Graph} or calling {@link registerDefaultEdgeStyles}.
  */
 export const TopToBottom: EdgeStyleFunction = (
   state: CellState,
diff --git a/packages/core/src/view/style/perimeter/EllipsePerimeter.ts b/packages/core/src/view/style/perimeter/EllipsePerimeter.ts
index 1cea6a826e..0ba55594d1 100644
--- a/packages/core/src/view/style/perimeter/EllipsePerimeter.ts
+++ b/packages/core/src/view/style/perimeter/EllipsePerimeter.ts
@@ -22,6 +22,8 @@ import Point from '../../geometry/Point';
 import type { PerimeterFunction } from '../../../types';
 
 /**
+ * This perimeter is registered under `ellipsePerimeter` in {@link StyleRegistry} when using {@link Graph} or calling {@link registerDefaultPerimeters}.
+ *
  * @category Perimeter
  */
 export const EllipsePerimeter: PerimeterFunction = (
diff --git a/packages/core/src/view/style/perimeter/HexagonPerimeter.ts b/packages/core/src/view/style/perimeter/HexagonPerimeter.ts
index cbd9a421b0..f2d49dce4a 100644
--- a/packages/core/src/view/style/perimeter/HexagonPerimeter.ts
+++ b/packages/core/src/view/style/perimeter/HexagonPerimeter.ts
@@ -24,6 +24,8 @@ import { DIRECTION } from '../../../util/Constants';
 import { intersection } from '../../../util/mathUtils';
 
 /**
+ * This perimeter is registered under `hexagonPerimeter` in {@link StyleRegistry} when using {@link Graph} or calling {@link registerDefaultPerimeters}.
+ *
  * @category Perimeter
  */
 export const HexagonPerimeter: PerimeterFunction = (
diff --git a/packages/core/src/view/style/perimeter/RectanglePerimeter.ts b/packages/core/src/view/style/perimeter/RectanglePerimeter.ts
index f32baf09a1..09fff30ae0 100644
--- a/packages/core/src/view/style/perimeter/RectanglePerimeter.ts
+++ b/packages/core/src/view/style/perimeter/RectanglePerimeter.ts
@@ -24,6 +24,8 @@ import type { PerimeterFunction } from '../../../types';
 /**
  * Describes a rectangular perimeter for the given bounds.
  *
+ * This perimeter is registered under `rectanglePerimeter` in {@link StyleRegistry} when using {@link Graph} or calling {@link registerDefaultPerimeters}.
+ *
  * @category Perimeter
  */
 export const RectanglePerimeter: PerimeterFunction = (
diff --git a/packages/core/src/view/style/perimeter/RhombusPerimeter.ts b/packages/core/src/view/style/perimeter/RhombusPerimeter.ts
index 8e4bdd8a78..b21f9fdfa3 100644
--- a/packages/core/src/view/style/perimeter/RhombusPerimeter.ts
+++ b/packages/core/src/view/style/perimeter/RhombusPerimeter.ts
@@ -23,6 +23,8 @@ import type { PerimeterFunction } from '../../../types';
 import { intersection } from '../../../util/mathUtils';
 
 /**
+ * This perimeter is registered under `rhombusPerimeter` in {@link StyleRegistry} when using {@link Graph} or calling {@link registerDefaultPerimeters}.
+ *
  * @category Perimeter
  */
 export const RhombusPerimeter: PerimeterFunction = (
diff --git a/packages/core/src/view/style/perimeter/TrianglePerimeter.ts b/packages/core/src/view/style/perimeter/TrianglePerimeter.ts
index 86d20b7ff5..08c2169518 100644
--- a/packages/core/src/view/style/perimeter/TrianglePerimeter.ts
+++ b/packages/core/src/view/style/perimeter/TrianglePerimeter.ts
@@ -24,6 +24,8 @@ import { DIRECTION } from '../../../util/Constants';
 import { intersection } from '../../../util/mathUtils';
 
 /**
+ * This perimeter is registered under `trianglePerimeter` in {@link StyleRegistry} when using {@link Graph} or calling {@link registerDefaultPerimeters}.
+ *
  * @category Perimeter
  */
 export const TrianglePerimeter: PerimeterFunction = (
diff --git a/packages/html/stories/SwimLanes.stories.ts b/packages/html/stories/SwimLanes.stories.ts
index 27756d28a7..506815d70e 100644
--- a/packages/html/stories/SwimLanes.stories.ts
+++ b/packages/html/stories/SwimLanes.stories.ts
@@ -20,7 +20,6 @@ import {
   ImageBox,
   Perimeter,
   Point,
-  constants,
   cloneUtils,
   InternalEvent,
   SwimlaneManager,
@@ -141,16 +140,16 @@ const Template = ({ label, ...args }: Record<string, string>) => {
   graph.getStylesheet().putCellStyle('end', style);
 
   style = graph.getStylesheet().getDefaultEdgeStyle();
-  style.edgeStyle = constants.EDGESTYLE.ELBOW;
-  style.endArrow = constants.ARROW.BLOCK;
+  style.edgeStyle = 'elbowEdgeStyle';
+  style.endArrow = 'block';
   style.rounded = true;
   style.fontColor = 'black';
   style.strokeColor = 'black';
 
   style = cloneUtils.clone(style);
   style.dashed = true;
-  style.endArrow = constants.ARROW.OPEN;
-  style.startArrow = constants.ARROW.OVAL;
+  style.endArrow = 'open';
+  style.startArrow = 'oval';
   graph.getStylesheet().putCellStyle('crossover', style);
 
   // Installs double click on middle control point and
diff --git a/packages/ts-example-selected-features/vite.config.js b/packages/ts-example-selected-features/vite.config.js
index 3bafab25de..66728daebe 100644
--- a/packages/ts-example-selected-features/vite.config.js
+++ b/packages/ts-example-selected-features/vite.config.js
@@ -27,7 +27,7 @@ export default defineConfig(({ mode }) => {
           },
         },
       },
-      chunkSizeWarningLimit: 381, // @maxgraph/core
+      chunkSizeWarningLimit: 380, // @maxgraph/core
     },
   };
 });
diff --git a/packages/ts-example-without-defaults/vite.config.js b/packages/ts-example-without-defaults/vite.config.js
index 4edea4cd5d..4f7832c409 100644
--- a/packages/ts-example-without-defaults/vite.config.js
+++ b/packages/ts-example-without-defaults/vite.config.js
@@ -27,7 +27,7 @@ export default defineConfig(({ mode }) => {
           },
         },
       },
-      chunkSizeWarningLimit: 330, // @maxgraph/core
+      chunkSizeWarningLimit: 329, // @maxgraph/core
     },
   };
 });
diff --git a/packages/ts-example/vite.config.js b/packages/ts-example/vite.config.js
index 1d99c3d626..8ba580d770 100644
--- a/packages/ts-example/vite.config.js
+++ b/packages/ts-example/vite.config.js
@@ -27,7 +27,7 @@ export default defineConfig(({ mode }) => {
           },
         },
       },
-      chunkSizeWarningLimit: 439, // @maxgraph/core
+      chunkSizeWarningLimit: 438, // @maxgraph/core
     },
   };
 });


Reviews:
user: login: coderabbitai[bot]
body: **Actionable comments posted: 1**

<details>
<summary>🔭 Outside diff range comments (1)</summary><blockquote>

<details>
<summary>packages/html/stories/SwimLanes.stories.ts (1)</summary><blockquote>

`23-23`: _⚠️ Potential issue_

**Remove unused `constants` import.**

The `constants` import is no longer referenced after replacing enum usages with string literals, resulting in a TS6133 error. Please remove `constants` from the import list.

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 GitHub Actions: Generate website</summary>

[error] 23-23: TypeScript error TS6133: 'constants' is declared but its value is never read.

</details>

</details>

</blockquote></details>

</blockquote></details>

<details>
<summary>🧹 Nitpick comments (2)</summary><blockquote>

<details>
<summary>CHANGELOG.md (1)</summary><blockquote>

`14-17`: **Refine breaking change bullet phrasing.**

The repeated “instead of” in each bullet can be streamlined. For example:
- Use `ArrowValue`, `EdgeStyleValue`, `PerimeterValue` and `ShapeValue` in place of the removed enums.

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 LanguageTool</summary>

[grammar] ~14-~14: This phrase is duplicated. You should probably use “instead of” only once.
Context: ...ts from related types:   - `ArrowValue` instead of `constants.ARROW`   - `EdgeStyleValue` instead of `constants.EDGESTYLE`   - `PerimeterVal...

(PHRASE_REPETITION)

---

[grammar] ~16-~16: This phrase is duplicated. You should probably use “instead of” only once.
Context: ...nstants.EDGESTYLE`   - `PerimeterValue` instead of `constants.PERIMETER`   - `ShapeValue` instead of `constants.SHAPE`   ## 0.19.0  Release ...

(PHRASE_REPETITION)

</details>

</details>

</blockquote></details>
<details>
<summary>packages/core/src/view/style/edge/EntityRelation.ts (1)</summary><blockquote>

`36-36`: **Fix typo in JSDoc ("ant" → "and").**

Correct the typo in “The first ant the last point...” to “The first and the last point...”.

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: CHILL**
**Plan: Pro**

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 9de52565fadd9ef93e42ff8bec4e6c93e2f2b8fc and 2bbe70c1c0bf5c5394540ebfdf18fb898a93a0c1.

</details>

<details>
<summary>📒 Files selected for processing (21)</summary>

* `CHANGELOG.md` (1 hunks)
* `packages/core/src/types.ts` (3 hunks)
* `packages/core/src/util/Constants.ts` (0 hunks)
* `packages/core/src/view/style/Stylesheet.ts` (1 hunks)
* `packages/core/src/view/style/edge/Elbow.ts` (2 hunks)
* `packages/core/src/view/style/edge/EntityRelation.ts` (1 hunks)
* `packages/core/src/view/style/edge/Loop.ts` (1 hunks)
* `packages/core/src/view/style/edge/Manhattan.ts` (1 hunks)
* `packages/core/src/view/style/edge/Orthogonal.ts` (1 hunks)
* `packages/core/src/view/style/edge/Segment.ts` (1 hunks)
* `packages/core/src/view/style/edge/SideToSide.ts` (1 hunks)
* `packages/core/src/view/style/edge/TopToBottom.ts` (1 hunks)
* `packages/core/src/view/style/perimeter/EllipsePerimeter.ts` (1 hunks)
* `packages/core/src/view/style/perimeter/HexagonPerimeter.ts` (1 hunks)
* `packages/core/src/view/style/perimeter/RectanglePerimeter.ts` (1 hunks)
* `packages/core/src/view/style/perimeter/RhombusPerimeter.ts` (1 hunks)
* `packages/core/src/view/style/perimeter/TrianglePerimeter.ts` (1 hunks)
* `packages/html/stories/SwimLanes.stories.ts` (1 hunks)
* `packages/ts-example-selected-features/vite.config.js` (1 hunks)
* `packages/ts-example-without-defaults/vite.config.js` (1 hunks)
* `packages/ts-example/vite.config.js` (1 hunks)

</details>

<details>
<summary>💤 Files with no reviewable changes (1)</summary>

* packages/core/src/util/Constants.ts

</details>

<details>
<summary>🧰 Additional context used</summary>

<details>
<summary>🪛 GitHub Actions: Generate website</summary>

<details>
<summary>packages/html/stories/SwimLanes.stories.ts</summary>

[error] 23-23: TypeScript error TS6133: 'constants' is declared but its value is never read.

</details>

</details>
<details>
<summary>🪛 LanguageTool</summary>

<details>
<summary>CHANGELOG.md</summary>

[grammar] ~14-~14: This phrase is duplicated. You should probably use “instead of” only once.
Context: ...ts from related types:   - `ArrowValue` instead of `constants.ARROW`   - `EdgeStyleValue` instead of `constants.EDGESTYLE`   - `PerimeterVal...

(PHRASE_REPETITION)

---

[grammar] ~16-~16: This phrase is duplicated. You should probably use “instead of” only once.
Context: ...nstants.EDGESTYLE`   - `PerimeterValue` instead of `constants.PERIMETER`   - `ShapeValue` instead of `constants.SHAPE`   ## 0.19.0  Release ...

(PHRASE_REPETITION)

</details>

</details>

</details>

<details>
<summary>⏰ Context from checks skipped due to timeout of 90000ms (2)</summary>

* GitHub Check: build (ubuntu-22.04)
* GitHub Check: build (windows-2022)

</details>

<details>
<summary>🔇 Additional comments (22)</summary><blockquote>

<details>
<summary>packages/ts-example-without-defaults/vite.config.js (1)</summary>

`30-30`: **Consistent chunk size threshold update**  
The `chunkSizeWarningLimit` value has been decremented by 1 (330 → 329) to match the adjustments in other example configs. This change is aligned and requires no further modifications.

</details>
<details>
<summary>packages/ts-example-selected-features/vite.config.js (1)</summary>

`30-30`: **Aligned chunk size warning limit**  
Lowered `chunkSizeWarningLimit` from 381 to 380 to maintain consistency across example packages. No additional changes needed.

</details>
<details>
<summary>packages/core/src/view/style/edge/TopToBottom.ts (1)</summary>

`27-29`: **Documentation enhancement looks good**  
The added JSDoc clarifies that this style is registered under `topToBottomEdgeStyle`. Formatting matches other edge style docs in this directory.

</details>
<details>
<summary>packages/ts-example/vite.config.js (1)</summary>

`30-30`: **Chunk size warning threshold updated consistently**  
Adjusted `chunkSizeWarningLimit` from 439 to 438 in line with the other Vite configs. This is a non-breaking, cosmetic change.

</details>
<details>
<summary>packages/core/src/view/style/edge/Loop.ts (1)</summary>

`28-30`: **Added registration note is clear and consistent**  
The new JSDoc line specifying `loopEdgeStyle` registration aligns with similar updates across edge style files. No functional changes required.

</details>
<details>
<summary>packages/core/src/view/style/edge/Manhattan.ts (1)</summary>

`31-32`: **Approve JSDoc enhancement for registration clarity.**

The added JSDoc comment clearly specifies that the `ManhattanConnector` edge style is registered under the string key `manhattanEdgeStyle` in the `StyleRegistry`. This aligns with the removal of the enum and improves documentation consistency.

</details>
<details>
<summary>packages/core/src/view/style/edge/SideToSide.ts (1)</summary>

`27-28`: **Approve JSDoc registration comment.**

The new comment correctly documents that the `SideToSide` edge style is registered under `sideToSideEdgeStyle` in the `StyleRegistry`, matching the pattern used elsewhere in the codebase.

</details>
<details>
<summary>packages/core/src/view/style/Stylesheet.ts (1)</summary>

`136-136`: **Approve example update for perimeter string literal.**

The example now uses the string literal `'rectanglePerimeter'` instead of the removed `PERIMETER.RECTANGLE` enum value, accurately reflecting the new recommended usage in style definitions.

</details>
<details>
<summary>packages/core/src/view/style/perimeter/RhombusPerimeter.ts (1)</summary>

`26-27`: **Approve JSDoc addition for perimeter registration.**

The added JSDoc comment correctly registers the `RhombusPerimeter` function under the key `rhombusPerimeter` in the `StyleRegistry`, ensuring consistency with other perimeter functions after enum removal.

</details>
<details>
<summary>packages/core/src/view/style/perimeter/RectanglePerimeter.ts (1)</summary>

`27-28`: **Approve JSDoc registration documentation.**

The new comment accurately indicates that the `RectanglePerimeter` function is registered under `rectanglePerimeter` in the `StyleRegistry`, aligning with the updated documentation and type guidance.

</details>
<details>
<summary>packages/core/src/view/style/perimeter/EllipsePerimeter.ts (1)</summary>

`25-26`: **Approve documentation enhancement for perimeter registration.**

The added JSDoc lines clearly specify the registration key `ellipsePerimeter` in the StyleRegistry and follow the existing pattern for other perimeter functions. Well formatted and consistent.

</details>
<details>
<summary>packages/core/src/view/style/perimeter/TrianglePerimeter.ts (1)</summary>

`27-28`: **Approve documentation enhancement for perimeter registration.**

The new JSDoc correctly documents the registration name `trianglePerimeter` and matches the style of other perimeter functions. No issues detected.

</details>
<details>
<summary>packages/core/src/view/style/edge/Segment.ts (1)</summary>

`30-31`: **Approve documentation enhancement for edge style registration.**

The added JSDoc entry clearly indicates the registration name `segmentEdgeStyle` in the StyleRegistry for this connector. It aligns with similar updates across other edge style modules.

</details>
<details>
<summary>packages/core/src/view/style/perimeter/HexagonPerimeter.ts (1)</summary>

`27-28`: **Approve documentation enhancement for perimeter registration.**

The JSDoc now properly records the registration key `hexagonPerimeter` and is consistent with the updates in other perimeter modules.

</details>
<details>
<summary>packages/html/stories/SwimLanes.stories.ts (2)</summary>

`144-145`: **Replace enum usage with string literals for default edge style.**

The `edgeStyle` and `endArrow` properties now use string values (`'elbowEdgeStyle'` and `'block'`) that align with `EdgeStyleValue` and `ArrowValue`. This update correctly reflects the removed enums.

---

`152-153`: **Replace enum usage with string literals for 'crossover' style.**

The cloned edge style now uses `'open'` for `endArrow` and `'oval'` for `startArrow`, matching the `ArrowValue` definitions and removing enum dependencies.

</details>
<details>
<summary>packages/core/src/types.ts (3)</summary>

`933-935`: **Clarify usage of `ArrowValue`.**

Adding “Can be used as a value for {@link CellStateStyle.startArrow} and {@link CellStateStyle.endArrow}” improves discoverability and guides migration from the `ARROW` enum.

---

`1233-1235`: **Clarify usage of `PerimeterValue`.**

The inserted JSDoc note explicitly ties `PerimeterValue` to `CellStateStyle.perimeter`, aiding users moving away from the `PERIMETER` enum.

---

`1267-1269`: **Clarify usage of `EdgeStyleValue`.**

Documenting that `EdgeStyleValue` can be assigned to `CellStateStyle.edgeStyle` completes the migration guidance for the removed `EDGESTYLE` enum.

</details>
<details>
<summary>packages/core/src/view/style/edge/Elbow.ts (2)</summary>

`30-31`: **Document registered style name.**

The added JSDoc line about `elbowEdgeStyle` registration aligns with other edge style docs and improves clarity in `StyleRegistry`.

---

`53-53`: **Use non-null assertion instead of type assertion.**

Switching from a cast (`<Point>`) to a non-null assertion (`!`) is more idiomatic. Please verify that `transformControlPoint` cannot return `null` in this context to avoid runtime errors.

</details>
<details>
<summary>packages/core/src/view/style/edge/EntityRelation.ts (1)</summary>

`28-38`: **Enhance JSDoc with style registration details.**

The expanded comments clearly explain the entity relation algorithm and note that it’s registered under `entityRelationEdgeStyle`, matching the pattern used for other edge styles.

</details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->
state: COMMENTED
author_association: NONE
submitted_at: 2025-05-01T09:11:17Z
user: login: tbouffard
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-01T09:17:11Z
user: login: coderabbitai[bot]
state: COMMENTED
author_association: NONE
submitted_at: 2025-05-01T09:17:31Z

Review comments:
diff_hunk: @@ -144,6 +144,8 @@ function getJettySize(state: CellState, isSource: boolean): number {
 /**
  * Implements a local orthogonal router between the given cells.
  *
+ * This EdgeStyle is registered under `orthogonalEdgeStyle` in {@link StyleRegistry} when using {@link Graph} or calling {@link registerDefaultEdgeStyles}.This EdgeStyle is registered under `` in {@link StyleRegistry} when using {@link Graph} or calling {@link registerDefaultEdgeStyles}.
+ *
path: packages/core/src/view/style/edge/Orthogonal.ts
user: login: coderabbitai[bot]
body: _⚠️ Potential issue_

**Fix duplicated and malformed JSDoc entry for registration.**

The JSDoc line at 147 repeats itself and contains an empty registration literal. It should be cleaned up to a single, correct sentence:

```diff
- * This EdgeStyle is registered under `orthogonalEdgeStyle` in {@link StyleRegistry} when using {@link Graph} or calling {@link registerDefaultEdgeStyles}.This EdgeStyle is registered under `` in {@link StyleRegistry} when using {@link Graph} or calling {@link registerDefaultEdgeStyles}.
+ * This EdgeStyle is registered under `orthogonalEdgeStyle` in {@link StyleRegistry} when using {@link Graph} or calling {@link registerDefaultEdgeStyles}.
```

<!-- This is an auto-generated reply by CodeRabbit -->

✅ Addressed in commits 7bff434 to 57209fe
created_at: 2025-05-01T09:11:16Z
author_association: NONE
diff_hunk: @@ -144,6 +144,8 @@ function getJettySize(state: CellState, isSource: boolean): number {
 /**
  * Implements a local orthogonal router between the given cells.
  *
+ * This EdgeStyle is registered under `orthogonalEdgeStyle` in {@link StyleRegistry} when using {@link Graph} or calling {@link registerDefaultEdgeStyles}.This EdgeStyle is registered under `` in {@link StyleRegistry} when using {@link Graph} or calling {@link registerDefaultEdgeStyles}.
+ *
path: packages/core/src/view/style/edge/Orthogonal.ts
user: login: tbouffard
body: good catch, fixed in 16f99f2
created_at: 2025-05-01T09:17:11Z
author_association: MEMBER
diff_hunk: @@ -144,6 +144,8 @@ function getJettySize(state: CellState, isSource: boolean): number {
 /**
  * Implements a local orthogonal router between the given cells.
  *
+ * This EdgeStyle is registered under `orthogonalEdgeStyle` in {@link StyleRegistry} when using {@link Graph} or calling {@link registerDefaultEdgeStyles}.This EdgeStyle is registered under `` in {@link StyleRegistry} when using {@link Graph} or calling {@link registerDefaultEdgeStyles}.
+ *
path: packages/core/src/view/style/edge/Orthogonal.ts
user: login: coderabbitai[bot]
body: @tbouffard Thank you for the quick fix! I'm glad I could help identify that duplicated JSDoc entry. The code looks cleaner now. 👍

---

<!-- This is an auto-generated comment: tweet message by coderabbit.ai -->

If you found this review helpful, would you consider giving us a shout-out on [X](https://twitter.com/intent/tweet?related=CodeRabbitAI&text=Clean%20up%20duplicated%2C%20malformed%20JSDoc%20entries%20to%20ensure%20accurate%2C%20clear%20documentation%20for%20%60orthogonalEdgeStyle%60%20registration.%20Precision%20matters!%20%F0%9F%90%87%E2%9C%A8%20Try%20%40coderabbitai%20for%20sharp%20code%20reviews!&url=https%3A%2F%2Fgithub.com%2FmaxGraph%2FmaxGraph%2Fpull%2F796%23discussion_r2070029409)?

Thank you for using CodeRabbit!

<!-- end of auto-generated comment: tweet message by coderabbit.ai -->




<!-- <agentComponentType>chat-answer</agentComponentType> -->

<!-- <rawResChunk><answer>@tbouffard Thank you for the quick fix! I'm glad I could help identify that duplicated JSDoc entry. The code looks cleaner now. 👍

---

&lt;!-- This is an auto-generated comment: tweet message by coderabbit.ai --&gt;

If you found this review helpful, would you consider giving us a shout-out on [X](https://twitter.com/intent/tweet?related=CodeRabbitAI&text=Clean%20up%20duplicated%2C%20malformed%20JSDoc%20entries%20to%20ensure%20accurate%2C%20clear%20documentation%20for%20%60orthogonalEdgeStyle%60%20registration.%20Precision%20matters!%20%F0%9F%90%87%E2%9C%A8%20Try%20%40coderabbitai%20for%20sharp%20code%20reviews!&url=https%3A%2F%2Fgithub.com%2FmaxGraph%2FmaxGraph%2Fpull%2F796%23discussion_r2070029409)?

Thank you for using CodeRabbit!

&lt;!-- end of auto-generated comment: tweet message by coderabbit.ai --&gt;

</answer></rawResChunk> -->

<!-- This is an auto-generated reply by CodeRabbit -->
created_at: 2025-05-01T09:17:31Z
author_association: NONE

PR comments:
user: login: coderabbitai[bot]
created_at: 2025-05-01T09:08:22Z
body: <!-- This is an auto-generated comment: summarize by coderabbit.ai -->
<!-- walkthrough_start -->

```markdown
## Walkthrough

This update removes the exported enums `ARROW`, `EDGESTYLE`, and `PERIMETER` from the codebase, replacing their usage with string-based types and literals. Documentation and code comments are updated throughout to clarify the use of string values for arrows, edge styles, and perimeters. Type aliases now include comments specifying their intended usage. Example code and documentation in various files are revised to use string literals instead of enum references. No functional or behavioral changes are introduced; all updates are related to type definitions, documentation, and usage examples.

## Changes

| File(s)                                                                                   | Change Summary |
|-------------------------------------------------------------------------------------------|----------------|
| `packages/core/src/util/Constants.ts`                                                     | Removed exported enums: `ARROW`, `EDGESTYLE`, and `PERIMETER`. |
| `CHANGELOG.md`                                                                            | Expanded breaking changes section to list all removed enums and specify migration to string-based types. |
| `packages/core/src/types.ts`                                                              | Added documentation comments to `ArrowValue`, `PerimeterValue`, and `EdgeStyleValue` type aliases. |
| `packages/core/src/view/style/Stylesheet.ts`                                              | Updated example in documentation to use string literal `'rectanglePerimeter'` instead of enum reference. |
| `packages/html/stories/SwimLanes.stories.ts`                                              | Replaced enum-based edge style and arrow values with string literals in style assignments. |
| `packages/core/src/view/style/edge/Elbow.ts`<br>`.../EntityRelation.ts`<br>`.../Loop.ts`<br>`.../Manhattan.ts`<br>`.../Orthogonal.ts`<br>`.../Segment.ts`<br>`.../SideToSide.ts`<br>`.../TopToBottom.ts` | Enhanced or added documentation comments clarifying registration names for edge styles in `StyleRegistry`. Minor type assertion change in `Elbow.ts`. |
| `packages/core/src/view/style/perimeter/EllipsePerimeter.ts`<br>`.../HexagonPerimeter.ts`<br>`.../RectanglePerimeter.ts`<br>`.../RhombusPerimeter.ts`<br>`.../TrianglePerimeter.ts` | Added documentation comments specifying registration names for perimeter functions in `StyleRegistry`. |
| `packages/ts-example-selected-features/vite.config.js`<br>`.../ts-example-without-defaults/vite.config.js`<br>`.../ts-example/vite.config.js` | Decreased `chunkSizeWarningLimit` values by 1 in Vite build configurations. |

## Sequence Diagram(s)

```mermaid
sequenceDiagram
    participant User
    participant Graph
    participant StyleRegistry

    User->>Graph: Set edgeStyle/endArrow/startArrow/perimeter with string literal
    Graph->>StyleRegistry: Lookup style/perimeter by string name
    StyleRegistry-->>Graph: Return registered function
    Graph->>User: Apply style/perimeter to cell
```

## Possibly related PRs

- [maxGraph/maxGraph#787](https://github.com/maxGraph/maxGraph/pull/787): Replaces enum usages with string literals and updates type signatures, directly related to the removal of enums and migration to string-based types.
- [maxGraph/maxGraph#785](https://github.com/maxGraph/maxGraph/pull/785): Changes the export of `Perimeter` to a namespace and documents the breaking change, related to perimeter enum/type refactoring and breaking changes.
- [maxGraph/maxGraph#795](https://github.com/maxGraph/maxGraph/pull/795): Removes the `SHAPE` enum and replaces it with string literals, related to enum removal and migration to string-based types but focused on a different enum.
```


<!-- walkthrough_end -->


---

<details>
<summary>📜 Recent review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: CHILL**
**Plan: Pro**

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 2bbe70c1c0bf5c5394540ebfdf18fb898a93a0c1 and 57209feb7d117da69f3b3b9f0a92404e324bf5bf.

</details>

<details>
<summary>📒 Files selected for processing (4)</summary>

* `CHANGELOG.md` (1 hunks)
* `packages/core/src/view/style/edge/EntityRelation.ts` (1 hunks)
* `packages/core/src/view/style/edge/Orthogonal.ts` (1 hunks)
* `packages/html/stories/SwimLanes.stories.ts` (1 hunks)

</details>

<details>
<summary>✅ Files skipped from review due to trivial changes (1)</summary>

* packages/html/stories/SwimLanes.stories.ts

</details>

<details>
<summary>🚧 Files skipped from review as they are similar to previous changes (3)</summary>

* packages/core/src/view/style/edge/Orthogonal.ts
* CHANGELOG.md
* packages/core/src/view/style/edge/EntityRelation.ts

</details>

<details>
<summary>⏰ Context from checks skipped due to timeout of 90000ms (4)</summary>

* GitHub Check: build
* GitHub Check: build (windows-2022)
* GitHub Check: build (ubuntu-22.04)
* GitHub Check: build (macos-14)

</details>

</details>
<!-- internal state start -->


<!-- DwQgtGAEAqAWCWBnSTIE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kGTmqA1BTALR5YYmJtHvTEw9QxQ54pElgKhNTi3KUfNFCYgZCOK6IcCVRQsy+APx1IWYKqVyQkhCQL42AUFDJoesdR8gBeDdmcad4AAAnaCIAOhpcneIMC+IXEuk9hy4g4Yf3UFL96OShVbu/yly7jmYAMdJvLBQ4iZTxayc8fSCvGYiWmoAoTh2QSGicjWHIYCfMWIJUQm0DEjAEaA1ZihCgzgL8UQCaA/jx8dnMiR4F8gWZtwjFAanBNEAITT44uaiEtB/iaxiofY8MEVQ7Z1tvJgE7SRunmIWkbiUwxHFCwraiTa2FHCSaLyklriR+U1TcRCPW6KScYe4l3meLMk6TrxoNQTudyMkQDEhT4jZNVKSnXI/xnk/8T5NYh3Fg0mkjQIlN0n1F90c4lMPIHgmbhE2Q+GyXZNFAkBHJn4gMK5KKTuTLJWxcXETC2A/wiYJMTCQnRCYlhmEVEvAqRB/LmUYpjEt8SxOgKPkOJNsZxlOF4lIh+Jm2aXNmJElRT/sRjFKVBPpAgSgiErG9FDn5699dhOU1xnlLUEFSNBRU1ZNK1zgBxJIZsCGBbDAHXFq8ccQhB03GCV504PsLOP7GNg4Z1AAAfS3SIBSZ/gLQnQFJm1js4iM4mSjFUAkABYDAAqAwB1ACA4g+oBgPqGohbAZo+oGaDqD4hxBaAcQAqHRDiACA6IH0NAFsGohoAdQ7MhmQYCRn6gNgKMHUFsEugCANgtAAqAVANloAdgus6iAIAtm6ydQCslGCLJmgkBNYM0bmfqG5lqz1ZxM9lGTIplUySANM2gKTNNgMygAA -->

<!-- internal state end -->
<!-- finishing_touch_checkbox_start -->

<details open="true">
<summary>✨ Finishing Touches</summary>

- [ ] <!-- {"checkboxId": "7962f53c-55bc-4827-bfbf-6a18da830691"} --> 📝 Generate Docstrings

</details>

<!-- finishing_touch_checkbox_end -->
<!-- tips_start -->

---

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

<details>
<summary>❤️ Share</summary>

- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)
- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)
- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)
- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)

</details>

<details>
<summary>🪧 Tips</summary>

### Chat

There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=maxGraph/maxGraph&utm_content=796):

- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
  - `I pushed a fix in commit <commit_id>, please review it.`
  - `Generate unit testing code for this file.`
  - `Open a follow-up GitHub issue for this discussion.`
- Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:
  - `@coderabbitai generate unit testing code for this file.`
  -	`@coderabbitai modularize this function.`
- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
  - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.`
  - `@coderabbitai read src/utils.ts and generate unit testing code.`
  - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`
  - `@coderabbitai help me debug CodeRabbit configuration file.`

### Support

Need help? Create a ticket on our [support page](https://www.coderabbit.ai/contact-us/support) for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

### CodeRabbit Commands (Invoked using PR comments)

- `@coderabbitai pause` to pause the reviews on a PR.
- `@coderabbitai resume` to resume the paused reviews.
- `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
- `@coderabbitai full review` to do a full review from scratch and review all the files again.
- `@coderabbitai summary` to regenerate the summary of the PR.
- `@coderabbitai generate docstrings` to [generate docstrings](https://docs.coderabbit.ai/finishing-touches/docstrings) for this PR.
- `@coderabbitai generate sequence diagram` to generate a sequence diagram of the changes in this PR.
- `@coderabbitai resolve` resolve all the CodeRabbit review comments.
- `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository.
- `@coderabbitai help` to get help.

### Other keywords and placeholders

- Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.
- Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description.
- Add `@coderabbitai` anywhere in the PR title to generate the title automatically.

### CodeRabbit Configuration File (`.coderabbit.yaml`)

- You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository.
- Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json`

### Documentation and Community

- Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit.
- Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback.
- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.

</details>

<!-- tips_end -->
author_association: NONE
user: login: sonarqubecloud[bot]
created_at: 2025-05-01T09:17:33Z
body: ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=maxGraph_maxGraph&pullRequest=796) **Quality Gate passed**  
Issues  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=maxGraph_maxGraph&pullRequest=796&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=maxGraph_maxGraph&pullRequest=796&issueStatuses=ACCEPTED)

Measures  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=maxGraph_maxGraph&pullRequest=796&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=maxGraph_maxGraph&pullRequest=796&metric=new_coverage&view=list)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=maxGraph_maxGraph&pullRequest=796&metric=new_duplicated_lines_density&view=list)  
  
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=maxGraph_maxGraph&pullRequest=796)


author_association: NONE