Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 30 additions & 1 deletion THEMES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# CommitPulse Themes

All 30 available themes for your CommitPulse badge. Use the `?theme=<slug>` query parameter to apply a theme.
All 35 available themes for your CommitPulse badge. Use the `?theme=<slug>` query parameter to apply a theme.

```
https://commitpulse.vercel.app/api/streak?user=YOUR_USERNAME&theme=<slug>
Expand All @@ -12,6 +12,7 @@ https://commitpulse.vercel.app/api/streak?user=YOUR_USERNAME&theme=<slug>

| Theme | Background | Text | Accent |
| ---------------- | ---------- | --------- | --------- |
| default | `#0d1117` | `#ffffff` | `#2da44e` |
| dark | `#0d1117` | `#c9d1d9` | `#58a6ff` |
| light | `#ffffff` | `#24292f` | `#0969da` |
| neon | `#000000` | `#00ffcc` | `#ff00ff` |
Expand Down Expand Up @@ -41,6 +42,10 @@ https://commitpulse.vercel.app/api/streak?user=YOUR_USERNAME&theme=<slug>
| monokai | `#272822` | `#f8f8f2` | `#a6e22e` |
| retro-terminal | `#000000` | `#00ff41` | `#00ff41` |
| midnight_ocean | `#020c1b` | `#ccd6f6` | `#0af5ff` |
| india | `#0a0a0a` | `#ffffff` | `#FF9933` |
| enterprise | `#1a1a2e` | `#e2e8f0` | `#6366f1` |
| catppuccin_mocha | `#1e1e2e` | `#cdd6f4` | `#cba6f7` |
| one_dark | `#282c34` | `#abb2bf` | `#61afef` |
| ayu_mirage | `#212733` | `#D9D7CE` | `#FFCC66` |

---
Expand Down Expand Up @@ -395,6 +400,30 @@ https://commitpulse.vercel.app/api/streak?user=YOUR_USERNAME&theme=<slug>

---

### Catppuccin Mocha

![catppuccin_mocha](https://commitpulse.vercel.app/api/streak?user=jhasourav07&theme=catppuccin_mocha)

| Parameter | Value |
| --------- | ------ |
| `bg` | 1e1e2e |
| `text` | cdd6f4 |
| `accent` | cba6f7 |

---

### One Dark

![one_dark](https://commitpulse.vercel.app/api/streak?user=jhasourav07&theme=one_dark)

| Parameter | Value |
| --------- | ------ |
| `bg` | 282c34 |
| `text` | abb2bf |
| `accent` | 61afef |

---

### Ayu Mirage

![ayu_mirage](https://commitpulse.vercel.app/api/streak?user=jhasourav07&theme=ayu_mirage)
Expand Down
10 changes: 10 additions & 0 deletions app/generator/components/EditorPanel.presets-and-reset.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@ import { render, screen, fireEvent } from '@testing-library/react';
import { EditorPanel } from './EditorPanel';
import type { GeneratorState } from '../types';

// Mock fetch to prevent real network requests from CommitPulseSection
vi.stubGlobal(
'fetch',
vi.fn().mockResolvedValue({
ok: false,
status: 404,
json: () => Promise.resolve({ error: 'User not found' }),
})
);

const mockState: GeneratorState = {
name: 'Original Name',
description: 'Original Description',
Expand Down
2 changes: 1 addition & 1 deletion app/not-found.mock-integrations.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ vi.mock('@/utils/clipboard', () => ({
}));

// --- TYPED INTERFACES FOR MOCKED MODULES ---
interface MockClipboardService {
interface _MockClipboardService {
writeText: (text: string) => Promise<void>;
readText?: () => Promise<string>;
}
Expand Down
9 changes: 8 additions & 1 deletion components/Leaderboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,14 @@ interface PodiumItemProps {
isFirst: boolean;
}

function PodiumItem({ contributor, rank, height, variant, delay, isFirst }: PodiumItemProps) {
function PodiumItem({
contributor,
rank,
height: _height,
variant,
delay,
isFirst,
}: PodiumItemProps) {
const styles = {
gold: {
ring: 'ring-[#eab308]/70',
Expand Down
2 changes: 1 addition & 1 deletion components/ScrollToBottom.error-resilience.test.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { render, screen, fireEvent } from '@testing-library/react';
import '@testing-library/jest-dom/vitest';
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
import React, { Component, type ErrorInfo, type ReactNode } from 'react';
import React, { Component, type ErrorInfo as _ErrorInfo, type ReactNode } from 'react';

let reducedMotion = false;

Expand Down
10 changes: 9 additions & 1 deletion components/burnout/BurnoutRiskTable.test.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
import { describe, it, expect, beforeEach } from 'vitest';
import React from 'react';
import { describe, it, expect, beforeEach, vi } from 'vitest';
import { render, screen, fireEvent } from '@testing-library/react';
import BurnoutRiskTable from './BurnoutRiskTable';

vi.mock('next/image', () => ({
default: (props: React.ComponentProps<'img'>) => {
// eslint-disable-next-line @next/next/no-img-element, jsx-a11y/alt-text
return <img {...props} />;
},
}));

const mockContributors = [
{
username: 'alice',
Expand Down
8 changes: 6 additions & 2 deletions lib/svg/themes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ describe('themes object', () => {
// ── Theme count ───────────────────────────────────────────────────────────────

describe('theme count', () => {
it('contains exactly 29 preset themes matching THEMES.md documentation', () => {
it('contains exactly 35 preset themes matching THEMES.md documentation', () => {
// If this fails, either a theme was added to themes.ts without updating
// THEMES.md, or a theme was removed without updating the docs.
// Update this count when intentionally adding/removing themes.
expect(themeNames).toHaveLength(33);
expect(themeNames).toHaveLength(35);
});

it('contains all expected theme keys', () => {
Expand Down Expand Up @@ -81,6 +81,10 @@ describe('theme count', () => {
'monokai',
'midnight_ocean',
'india',
'catppuccin_mocha',
'one_dark',
'enterprise',
'ayu_mirage',
];
for (const key of expectedKeys) {
expect(themeNames).toContain(key);
Expand Down
2 changes: 2 additions & 0 deletions lib/svg/themes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ export const themes: Record<string, BadgeTheme> = {
enterprise: makeTheme('1a1a2e', 'e2e8f0', '6366f1', '8b5cf6'),
// India theme β€” saffron accent (#FF9933), India green negative (#138808)
india: makeTheme('0a0a0a', 'ffffff', 'FF9933', '138808'),
catppuccin_mocha: makeTheme('1e1e2e', 'cdd6f4', 'cba6f7', 'f38ba8'),
one_dark: makeTheme('282c34', 'abb2bf', '61afef', 'e06c75'),
ayu_mirage: makeTheme('212733', 'D9D7CE', 'FFCC66', 'FF3333'),
};

Expand Down
Loading