| 48 | } |
| 49 | |
| 50 | interface CommitGraphProps |
| 51 | extends Omit<React.ComponentProps<'div'>, 'children'> { |
| 52 | /** Commits in topological order (newest first). Each commit includes parent hashes. */ |
| 53 | commits: Commit[] |
| 54 | /** Number of hash characters to display. @default 7 */ |
| 55 | truncateHash?: number |
| 56 | /** Pixel width per rail column. @default 24 */ |
| 57 | railWidth?: number |
| 58 | /** Rail index → rail/dot color (6-digit hex). Unlisted rails fall back to the built-in palette. */ |
| 59 | railColors?: Record<number, string> |
| 60 | /** Branch/ref name → badge color (6-digit hex). Unlisted refs fall back to the rail color. */ |
| 61 | refColors?: Record<string, string> |
| 62 | /** Tag name → badge color (6-digit hex). Unlisted tags fall back to the rail color. */ |
| 63 | tagColors?: Record<string, string> |
| 64 | } |
| 65 | |
| 66 | const RAIL_COLORS = [ |
| 67 | '#3b82f6', |
nothing calls this directly
no outgoing calls
no test coverage detected