open-index/open-npm huggingface dataset:
npm package: @hellixit/mermaid-to-hellixitboard
Description: Mermaid to Hellixitboard Diagrams
Latest version: 0.1.2

# mermaid-to-hellixitboard

Convert mermaid diagrams to Hellixitboard diagrams.

## Set up

Install packages:

```
yarn
```

Start development playground:

```
yarn start
```

Build command:

```
yarn build
```

## Get started

```ts
parseMermaidToHellixitboard(diagramDefinition: string, config?: MermaidConfig)
```

The `diagramDefinition` is the mermaid diagram definition.
and `config` is the mermaid config. You can use the `config` param when you want to pass some custom config to mermaid.

Currently `mermaid-to-hellixitboard` only supports the :point_down: config params

```ts
{
  /**
   * Whether to start the diagram automatically when the page loads.
   * @default false
   */
  startOnLoad?: boolean;
  /**
   * The flowchart curve style.
   * @default "linear"
   */
  flowchart?: {
    curve?: "linear" | "basis";
  };
  /**
   * Theme variables
   * @default { fontSize: "20px" }
   */
  themeVariables?: {
    fontSize?: string;
  };
  /**
   * Maximum number of edges to be rendered.
   * @default 500
   */
  maxEdges?: number;
  /**
   * Maximum number of characters to be rendered.
   * @default 50000
   */
  maxTextSize?: number;
}
```

Example code:

```ts
import { parseMermaidToExcalidraw as parseMermaidToHellixitboard } from "@hellixit/mermaid-to-hellixitboard";

try {
  const { elements, files } = await parseMermaidToHellixitboard(
    diagramDefinition,
    {
      themeVariables: {
        fontSize: "25px",
      },
    }
  );
  // Render elements and files on Hellixitboard
} catch (e) {
  // Parse error, displaying error message to users
}
```

## API

Head over to the [docs](https://board.hellixit.cloud/docs).