g3-toolkit API Reference
    Preparing search index...

    Function buildTypeVisualMap

    • Build a type-to-visual mapping from a set of observed node types. Returns a stable mapping: same type always gets the same color/shape (sorted alphabetically, then indexed).

      Parameters

      • nodeTypes: ReadonlySet<string>

      Returns Map<
          string,
          {
              color: string;
              shape: | "ellipse"
              | "rectangle"
              | "diamond"
              | "hexagon"
              | "triangle"
              | "star"
              | "round-rectangle"
              | "barrel";
          },
      >