diff --git a/docs/adding-new-shape.md b/docs/adding-new-shape.md index b409d7c80..64a177237 100644 --- a/docs/adding-new-shape.md +++ b/docs/adding-new-shape.md @@ -101,7 +101,7 @@ To add a new shape: - **Example**: ```typescript - import { Node, RenderOptions } from '../../types.d.ts'; + import { Node, RenderOptions } from '../../types.ts'; export const myNewShape = async ( parent: SVGAElement, @@ -117,7 +117,7 @@ To add a new shape: ### 2. Register the Shape -- **Register the shape**: Add your shape to the `shapes` object in the main shapes module. This allows your shape to be recognized and used within the system. +- **Register the shape**: Add your shape to the `shapes` object in the [main shapes module](../rendering-util/rendering-elements/shapes.ts). This allows your shape to be recognized and used within the system. - **Example**: @@ -126,9 +126,14 @@ To add a new shape: const shapes = { ..., - 'my-new-shape': myNewShape, - // Shortened alias (if any). - 'm-nsh': myNewShape + { + semanticName: 'My Shape', + name: 'Shape Name', + shortName: '', + description: '', + aliases: ['', '', '', ''], + handler: myNewShape, + }, }; ``` diff --git a/packages/mermaid/src/docs/adding-new-shape.md b/packages/mermaid/src/docs/adding-new-shape.md index b04d5f794..8ba5d083c 100644 --- a/packages/mermaid/src/docs/adding-new-shape.md +++ b/packages/mermaid/src/docs/adding-new-shape.md @@ -95,7 +95,7 @@ To add a new shape: - **Example**: ```typescript - import { Node, RenderOptions } from '../../types.d.ts'; + import { Node, RenderOptions } from '../../types.ts'; export const myNewShape = async ( parent: SVGAElement, @@ -111,7 +111,7 @@ To add a new shape: ### 2. Register the Shape -- **Register the shape**: Add your shape to the `shapes` object in the main shapes module. This allows your shape to be recognized and used within the system. +- **Register the shape**: Add your shape to the `shapes` object in the [main shapes module](../rendering-util/rendering-elements/shapes.ts). This allows your shape to be recognized and used within the system. - **Example**: @@ -120,9 +120,14 @@ To add a new shape: const shapes = { ..., - 'my-new-shape': myNewShape, - // Shortened alias (if any). - 'm-nsh': myNewShape + { + semanticName: 'My Shape', + name: 'Shape Name', + shortName: '', + description: '', + aliases: ['', '', '', ''], + handler: myNewShape, + }, }; ```