freddyaboulton HF Staff commited on
Commit
069b6da
·
verified ·
1 Parent(s): df5cde2

Update components.json

Browse files
Files changed (1) hide show
  1. components.json +226 -16
components.json CHANGED
@@ -41,29 +41,239 @@
41
  "repo_url": "https://github.com/hysts/gradio-detection-viewer/"
42
  },
43
  {
44
- "id": "contribution-heatmap",
45
- "name": "Contribution Heatmap",
46
- "description": "Reusable GitHub-style contribution heatmap",
47
- "author": "ysharma",
48
- "tags": [
49
  "Business"
50
- ],
51
- "category": "Display",
52
- "html_template": "\n<div class=\"heatmap-container\">\n <div class=\"heatmap-header\">\n <h2>${(() => {\n const total = Object.values(value || {}).reduce((a, b) => a + b, 0);\n return '\ud83d\udcca ' + total.toLocaleString() + ' contributions in ' + year;\n })()}</h2>\n <div class=\"legend\">\n <span>Less</span>\n <div class=\"legend-box\" style=\"background:${c0}\"></div>\n <div class=\"legend-box\" style=\"background:${c1}\"></div>\n <div class=\"legend-box\" style=\"background:${c2}\"></div>\n <div class=\"legend-box\" style=\"background:${c3}\"></div>\n <div class=\"legend-box\" style=\"background:${c4}\"></div>\n <span>More</span>\n </div>\n </div>\n <div class=\"month-labels\">\n ${(() => {\n const months = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];\n return months.map((m, i) =>\n '<span style=\"grid-column:' + (Math.floor(i * 4.33) + 2) + '\">' + m + '</span>'\n ).join('');\n })()}\n </div>\n <div class=\"heatmap-grid\">\n <div class=\"day-labels\">\n <span></span><span>Mon</span><span></span><span>Wed</span><span></span><span>Fri</span><span></span>\n </div>\n <div class=\"cells\">\n ${(() => {\n const v = value || {};\n const sd = new Date(year, 0, 1);\n const pad = sd.getDay();\n const cells = [];\n for (let i = 0; i < pad; i++) cells.push('<div class=\"cell empty\"></div>');\n const totalDays = Math.floor((new Date(year, 11, 31) - sd) / 86400000) + 1;\n for (let d = 0; d < totalDays; d++) {\n const dt = new Date(year, 0, 1 + d);\n const key = dt.getFullYear() + '-' + String(dt.getMonth()+1).padStart(2,'0') + '-' + String(dt.getDate()).padStart(2,'0');\n const count = v[key] || 0;\n let lv = 0;\n if (count > 0) lv = 1;\n if (count >= 3) lv = 2;\n if (count >= 6) lv = 3;\n if (count >= 10) lv = 4;\n const mn = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];\n const tip = count + ' contributions on ' + mn[dt.getMonth()] + ' ' + dt.getDate() + ', ' + year;\n cells.push('<div class=\"cell level-' + lv + '\" data-date=\"' + key + '\" data-count=\"' + count + '\" title=\"' + tip + '\"></div>');\n }\n return cells.join('');\n })()}\n </div>\n </div>\n <div class=\"stats-bar\">\n ${(() => {\n const v = value || {};\n const totalDays = Math.floor((new Date(year, 11, 31) - new Date(year, 0, 1)) / 86400000) + 1;\n let streak = 0, maxStreak = 0, total = 0, active = 0, best = 0;\n const vals = [];\n for (let d = 0; d < totalDays; d++) {\n const dt = new Date(year, 0, 1 + d);\n const key = dt.getFullYear() + '-' + String(dt.getMonth()+1).padStart(2,'0') + '-' + String(dt.getDate()).padStart(2,'0');\n const c = v[key] || 0;\n total += c;\n if (c > 0) { streak++; maxStreak = Math.max(maxStreak, streak); active++; best = Math.max(best, c); vals.push(c); }\n else { streak = 0; }\n }\n const avg = vals.length ? (total / vals.length).toFixed(1) : '0';\n const stats = [\n ['\ud83d\udd25', maxStreak, 'Longest Streak'],\n ['\ud83d\udcc5', active, 'Active Days'],\n ['\u26a1', best, 'Best Day'],\n ['\ud83d\udcc8', avg, 'Avg / Active Day'],\n ['\ud83c\udfc6', total.toLocaleString(), 'Total'],\n ];\n return stats.map(s =>\n '<div class=\"stat\"><span class=\"stat-value\">' + s[1] + '</span><span class=\"stat-label\">' + s[0] + ' ' + s[2] + '</span></div>'\n ).join('');\n })()}\n </div>\n</div>\n",
53
- "css_template": "\n .heatmap-container {\n background: #0d1117;\n border-radius: 12px;\n padding: 24px;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;\n color: #c9d1d9;\n overflow-x: auto;\n }\n .heatmap-header {\n display: flex; justify-content: space-between; align-items: center;\n margin-bottom: 12px; flex-wrap: wrap; gap: 10px;\n }\n .heatmap-header h2 { margin: 0; font-size: 16px; font-weight: 500; color: #f0f6fc; }\n .legend { display: flex; align-items: center; gap: 4px; font-size: 11px; color: #8b949e; }\n .legend-box { width: 12px; height: 12px; border-radius: 2px; }\n .month-labels {\n display: grid; grid-template-columns: 30px repeat(53, 1fr);\n font-size: 11px; color: #8b949e; margin-bottom: 4px; padding-left: 2px;\n }\n .heatmap-grid { display: flex; gap: 4px; }\n .day-labels {\n display: grid; grid-template-rows: repeat(7, 1fr);\n font-size: 11px; color: #8b949e; width: 30px; gap: 2px;\n }\n .day-labels span { height: 13px; display: flex; align-items: center; }\n .cells {\n display: grid; grid-template-rows: repeat(7, 1fr);\n grid-auto-flow: column; gap: 2px; flex: 1;\n }\n .cell {\n width: 13px; height: 13px; border-radius: 2px; cursor: pointer;\n transition: all 0.15s ease; outline: 1px solid rgba(27,31,35,0.06);\n }\n .cell:hover {\n outline: 2px solid #58a6ff; outline-offset: -1px;\n transform: scale(1.3); z-index: 1;\n }\n .cell.empty { visibility: hidden; }\n .level-0 { background: ${c0}; }\n .level-1 { background: ${c1}; }\n .level-2 { background: ${c2}; }\n .level-3 { background: ${c3}; }\n .level-4 { background: ${c4}; }\n .stats-bar {\n display: flex; justify-content: space-around; margin-top: 20px;\n padding-top: 16px; border-top: 1px solid #21262d;\n flex-wrap: wrap; gap: 12px;\n }\n .stat { display: flex; flex-direction: column; align-items: center; gap: 4px; }\n .stat-value { font-size: 22px; font-weight: 700; color: ${c4}; }\n .stat-label { font-size: 12px; color: #8b949e; }\n",
54
- "js_on_load": "\n element.addEventListener('click', (e) => {\n if (e.target && e.target.classList.contains('cell') && !e.target.classList.contains('empty')) {\n const date = e.target.dataset.date;\n const cur = parseInt(e.target.dataset.count) || 0;\n const next = cur >= 12 ? 0 : cur + 1;\n const nv = {...(props.value || {})};\n if (next === 0) delete nv[date]; else nv[date] = next;\n props.value = nv;\n trigger('change');\n }\n });\n",
55
- "default_props": {
56
- "value": {},
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
  "year": 2025,
58
  "c0": "#161b22",
59
  "c1": "#0e4429",
60
  "c2": "#006d32",
61
  "c3": "#26a641",
62
  "c4": "#39d353"
63
- },
64
- "python_code": "class ContributionHeatmap(gr.HTML):\n \"\"\"Reusable GitHub-style contribution heatmap built on gr.HTML.\"\"\"\n\n def __init__(self, value=None, year=2025, theme=\"green\",\n c0=None, c1=None, c2=None, c3=None, c4=None, **kwargs):\n if value is None:\n value = {}\n # Use explicit c0-c4 if provided (from gr.HTML updates), else derive from theme\n colors = COLOR_SCHEMES.get(theme, COLOR_SCHEMES[\"green\"])\n super().__init__(\n value=value,\n year=year,\n c0=c0 or colors[0],\n c1=c1 or colors[1],\n c2=c2 or colors[2],\n c3=c3 or colors[3],\n c4=c4 or colors[4],\n html_template=HEATMAP_HTML,\n css_template=HEATMAP_CSS,\n js_on_load=HEATMAP_JS,\n **kwargs,\n )\n\n def api_info(self):\n return {\"type\": \"object\", \"description\": \"Dict mapping YYYY-MM-DD to int counts\"}\n",
65
- "head": "",
66
- "repo_url": "https://huggingface.co/spaces/ysharma/github-contribution-heatmap"
67
  },
68
  {
69
  "id": "spin-wheel",
 
41
  "repo_url": "https://github.com/hysts/gradio-detection-viewer/"
42
  },
43
  {
44
+ "id": "contribution-heatmap",
45
+ "name": "Contribution Heatmap",
46
+ "description": "Reusable GitHub-style contribution heatmap",
47
+ "author": "ysharma",
48
+ "tags": [
49
  "Business"
50
+ ],
51
+ "category": "Display",
52
+ "html_template": "\n<div class=\"heatmap-container\">\n <div class=\"heatmap-header\">\n <h2>${(() => {\n const total = Object.values(value || {}).reduce((a, b) => a + b, 0);\n return '\ud83d\udcca ' + total.toLocaleString() + ' contributions in ' + year;\n })()}</h2>\n <div class=\"legend\">\n <span>Less</span>\n <div class=\"legend-box\" style=\"background:${c0}\"></div>\n <div class=\"legend-box\" style=\"background:${c1}\"></div>\n <div class=\"legend-box\" style=\"background:${c2}\"></div>\n <div class=\"legend-box\" style=\"background:${c3}\"></div>\n <div class=\"legend-box\" style=\"background:${c4}\"></div>\n <span>More</span>\n </div>\n </div>\n <div class=\"month-labels\">\n ${(() => {\n const months = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];\n return months.map((m, i) =>\n '<span style=\"grid-column:' + (Math.floor(i * 4.33) + 2) + '\">' + m + '</span>'\n ).join('');\n })()}\n </div>\n <div class=\"heatmap-grid\">\n <div class=\"day-labels\">\n <span></span><span>Mon</span><span></span><span>Wed</span><span></span><span>Fri</span><span></span>\n </div>\n <div class=\"cells\">\n ${(() => {\n const v = value || {};\n const sd = new Date(year, 0, 1);\n const pad = sd.getDay();\n const cells = [];\n for (let i = 0; i < pad; i++) cells.push('<div class=\"cell empty\"></div>');\n const totalDays = Math.floor((new Date(year, 11, 31) - sd) / 86400000) + 1;\n for (let d = 0; d < totalDays; d++) {\n const dt = new Date(year, 0, 1 + d);\n const key = dt.getFullYear() + '-' + String(dt.getMonth()+1).padStart(2,'0') + '-' + String(dt.getDate()).padStart(2,'0');\n const count = v[key] || 0;\n let lv = 0;\n if (count > 0) lv = 1;\n if (count >= 3) lv = 2;\n if (count >= 6) lv = 3;\n if (count >= 10) lv = 4;\n const mn = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];\n const tip = count + ' contributions on ' + mn[dt.getMonth()] + ' ' + dt.getDate() + ', ' + year;\n cells.push('<div class=\"cell level-' + lv + '\" data-date=\"' + key + '\" data-count=\"' + count + '\" title=\"' + tip + '\"></div>');\n }\n return cells.join('');\n })()}\n </div>\n </div>\n <div class=\"stats-bar\">\n ${(() => {\n const v = value || {};\n const totalDays = Math.floor((new Date(year, 11, 31) - new Date(year, 0, 1)) / 86400000) + 1;\n let streak = 0, maxStreak = 0, total = 0, active = 0, best = 0;\n const vals = [];\n for (let d = 0; d < totalDays; d++) {\n const dt = new Date(year, 0, 1 + d);\n const key = dt.getFullYear() + '-' + String(dt.getMonth()+1).padStart(2,'0') + '-' + String(dt.getDate()).padStart(2,'0');\n const c = v[key] || 0;\n total += c;\n if (c > 0) { streak++; maxStreak = Math.max(maxStreak, streak); active++; best = Math.max(best, c); vals.push(c); }\n else { streak = 0; }\n }\n const avg = vals.length ? (total / vals.length).toFixed(1) : '0';\n const stats = [\n ['\ud83d\udd25', maxStreak, 'Longest Streak'],\n ['\ud83d\udcc5', active, 'Active Days'],\n ['\u26a1', best, 'Best Day'],\n ['\ud83d\udcc8', avg, 'Avg / Active Day'],\n ['\ud83c\udfc6', total.toLocaleString(), 'Total'],\n ];\n return stats.map(s =>\n '<div class=\"stat\"><span class=\"stat-value\">' + s[1] + '</span><span class=\"stat-label\">' + s[0] + ' ' + s[2] + '</span></div>'\n ).join('');\n })()}\n </div>\n</div>\n",
53
+ "css_template": "\n .heatmap-container {\n background: #0d1117;\n border-radius: 12px;\n padding: 24px;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;\n color: #c9d1d9;\n overflow-x: auto;\n }\n .heatmap-header {\n display: flex; justify-content: space-between; align-items: center;\n margin-bottom: 12px; flex-wrap: wrap; gap: 10px;\n }\n .heatmap-header h2 { margin: 0; font-size: 16px; font-weight: 500; color: #f0f6fc; }\n .legend { display: flex; align-items: center; gap: 4px; font-size: 11px; color: #8b949e; }\n .legend-box { width: 12px; height: 12px; border-radius: 2px; }\n .month-labels {\n display: grid; grid-template-columns: 30px repeat(53, 1fr);\n font-size: 11px; color: #8b949e; margin-bottom: 4px; padding-left: 2px;\n }\n .heatmap-grid { display: flex; gap: 4px; }\n .day-labels {\n display: grid; grid-template-rows: repeat(7, 1fr);\n font-size: 11px; color: #8b949e; width: 30px; gap: 2px;\n }\n .day-labels span { height: 13px; display: flex; align-items: center; }\n .cells {\n display: grid; grid-template-rows: repeat(7, 1fr);\n grid-auto-flow: column; gap: 2px; flex: 1;\n }\n .cell {\n width: 13px; height: 13px; border-radius: 2px; cursor: pointer;\n transition: all 0.15s ease; outline: 1px solid rgba(27,31,35,0.06);\n }\n .cell:hover {\n outline: 2px solid #58a6ff; outline-offset: -1px;\n transform: scale(1.3); z-index: 1;\n }\n .cell.empty { visibility: hidden; }\n .level-0 { background: ${c0}; }\n .level-1 { background: ${c1}; }\n .level-2 { background: ${c2}; }\n .level-3 { background: ${c3}; }\n .level-4 { background: ${c4}; }\n .stats-bar {\n display: flex; justify-content: space-around; margin-top: 20px;\n padding-top: 16px; border-top: 1px solid #21262d;\n flex-wrap: wrap; gap: 12px;\n }\n .stat { display: flex; flex-direction: column; align-items: center; gap: 4px; }\n .stat-value { font-size: 22px; font-weight: 700; color: ${c4}; }\n .stat-label { font-size: 12px; color: #8b949e; }\n",
54
+ "js_on_load": "\n element.addEventListener('click', (e) => {\n if (e.target && e.target.classList.contains('cell') && !e.target.classList.contains('empty')) {\n const date = e.target.dataset.date;\n const cur = parseInt(e.target.dataset.count) || 0;\n const next = cur >= 12 ? 0 : cur + 1;\n const nv = {...(props.value || {})};\n if (next === 0) delete nv[date]; else nv[date] = next;\n props.value = nv;\n trigger('change');\n }\n });\n",
55
+ "default_props": {
56
+ "value": {
57
+ "2025-01-01": 15,
58
+ "2025-01-02": 10,
59
+ "2025-01-05": 2,
60
+ "2025-01-06": 2,
61
+ "2025-01-07": 3,
62
+ "2025-01-08": 7,
63
+ "2025-01-13": 1,
64
+ "2025-01-14": 3,
65
+ "2025-01-15": 1,
66
+ "2025-01-17": 1,
67
+ "2025-01-19": 5,
68
+ "2025-01-20": 4,
69
+ "2025-01-22": 1,
70
+ "2025-01-26": 2,
71
+ "2025-01-27": 11,
72
+ "2025-01-28": 1,
73
+ "2025-01-29": 2,
74
+ "2025-02-02": 2,
75
+ "2025-02-04": 8,
76
+ "2025-02-05": 2,
77
+ "2025-02-07": 2,
78
+ "2025-02-09": 7,
79
+ "2025-02-10": 2,
80
+ "2025-02-11": 6,
81
+ "2025-02-12": 15,
82
+ "2025-02-13": 1,
83
+ "2025-02-15": 1,
84
+ "2025-02-19": 1,
85
+ "2025-02-21": 9,
86
+ "2025-02-22": 9,
87
+ "2025-02-26": 1,
88
+ "2025-02-27": 1,
89
+ "2025-02-28": 8,
90
+ "2025-03-01": 8,
91
+ "2025-03-02": 7,
92
+ "2025-03-05": 1,
93
+ "2025-03-07": 13,
94
+ "2025-03-08": 5,
95
+ "2025-03-09": 2,
96
+ "2025-03-11": 2,
97
+ "2025-03-12": 4,
98
+ "2025-03-14": 3,
99
+ "2025-03-15": 3,
100
+ "2025-03-16": 3,
101
+ "2025-03-18": 3,
102
+ "2025-03-20": 5,
103
+ "2025-03-21": 5,
104
+ "2025-03-22": 15,
105
+ "2025-03-25": 2,
106
+ "2025-03-27": 1,
107
+ "2025-03-28": 3,
108
+ "2025-04-03": 2,
109
+ "2025-04-04": 1,
110
+ "2025-04-07": 1,
111
+ "2025-04-11": 1,
112
+ "2025-04-13": 7,
113
+ "2025-04-14": 2,
114
+ "2025-04-17": 1,
115
+ "2025-04-19": 1,
116
+ "2025-04-21": 4,
117
+ "2025-04-22": 2,
118
+ "2025-04-23": 3,
119
+ "2025-04-24": 1,
120
+ "2025-04-27": 1,
121
+ "2025-04-29": 6,
122
+ "2025-04-30": 1,
123
+ "2025-05-01": 8,
124
+ "2025-05-05": 4,
125
+ "2025-05-07": 2,
126
+ "2025-05-09": 1,
127
+ "2025-05-11": 3,
128
+ "2025-05-12": 1,
129
+ "2025-05-13": 5,
130
+ "2025-05-16": 13,
131
+ "2025-05-17": 8,
132
+ "2025-05-18": 2,
133
+ "2025-05-19": 11,
134
+ "2025-05-21": 1,
135
+ "2025-05-24": 4,
136
+ "2025-05-27": 8,
137
+ "2025-05-28": 2,
138
+ "2025-05-29": 1,
139
+ "2025-05-30": 1,
140
+ "2025-06-01": 5,
141
+ "2025-06-02": 3,
142
+ "2025-06-04": 3,
143
+ "2025-06-05": 2,
144
+ "2025-06-07": 5,
145
+ "2025-06-14": 11,
146
+ "2025-06-15": 5,
147
+ "2025-06-19": 6,
148
+ "2025-06-20": 5,
149
+ "2025-06-22": 8,
150
+ "2025-06-24": 5,
151
+ "2025-06-25": 9,
152
+ "2025-06-27": 5,
153
+ "2025-06-28": 5,
154
+ "2025-06-29": 6,
155
+ "2025-06-30": 3,
156
+ "2025-07-01": 1,
157
+ "2025-07-02": 5,
158
+ "2025-07-05": 2,
159
+ "2025-07-08": 1,
160
+ "2025-07-10": 2,
161
+ "2025-07-12": 3,
162
+ "2025-07-13": 2,
163
+ "2025-07-14": 5,
164
+ "2025-07-15": 5,
165
+ "2025-07-16": 1,
166
+ "2025-07-18": 9,
167
+ "2025-07-19": 9,
168
+ "2025-07-20": 2,
169
+ "2025-07-22": 3,
170
+ "2025-07-24": 5,
171
+ "2025-07-25": 1,
172
+ "2025-07-27": 5,
173
+ "2025-07-30": 2,
174
+ "2025-08-01": 13,
175
+ "2025-08-02": 3,
176
+ "2025-08-03": 2,
177
+ "2025-08-04": 9,
178
+ "2025-08-05": 4,
179
+ "2025-08-07": 1,
180
+ "2025-08-09": 5,
181
+ "2025-08-12": 2,
182
+ "2025-08-13": 5,
183
+ "2025-08-14": 4,
184
+ "2025-08-15": 4,
185
+ "2025-08-18": 6,
186
+ "2025-08-19": 6,
187
+ "2025-08-20": 2,
188
+ "2025-08-24": 6,
189
+ "2025-08-25": 3,
190
+ "2025-08-26": 12,
191
+ "2025-08-27": 14,
192
+ "2025-08-29": 1,
193
+ "2025-08-31": 5,
194
+ "2025-09-01": 1,
195
+ "2025-09-02": 3,
196
+ "2025-09-03": 2,
197
+ "2025-09-04": 14,
198
+ "2025-09-05": 6,
199
+ "2025-09-06": 9,
200
+ "2025-09-07": 4,
201
+ "2025-09-08": 1,
202
+ "2025-09-10": 1,
203
+ "2025-09-16": 4,
204
+ "2025-09-18": 4,
205
+ "2025-09-19": 2,
206
+ "2025-09-20": 3,
207
+ "2025-09-23": 2,
208
+ "2025-09-24": 6,
209
+ "2025-09-25": 3,
210
+ "2025-09-27": 1,
211
+ "2025-09-28": 5,
212
+ "2025-09-29": 5,
213
+ "2025-10-02": 2,
214
+ "2025-10-03": 2,
215
+ "2025-10-06": 8,
216
+ "2025-10-07": 8,
217
+ "2025-10-08": 8,
218
+ "2025-10-09": 3,
219
+ "2025-10-10": 15,
220
+ "2025-10-13": 2,
221
+ "2025-10-14": 9,
222
+ "2025-10-15": 1,
223
+ "2025-10-16": 2,
224
+ "2025-10-17": 1,
225
+ "2025-10-20": 6,
226
+ "2025-10-23": 9,
227
+ "2025-10-26": 1,
228
+ "2025-10-28": 2,
229
+ "2025-10-31": 1,
230
+ "2025-11-01": 2,
231
+ "2025-11-02": 1,
232
+ "2025-11-03": 1,
233
+ "2025-11-05": 1,
234
+ "2025-11-06": 5,
235
+ "2025-11-07": 2,
236
+ "2025-11-09": 3,
237
+ "2025-11-10": 2,
238
+ "2025-11-11": 1,
239
+ "2025-11-13": 2,
240
+ "2025-11-14": 1,
241
+ "2025-11-15": 1,
242
+ "2025-11-17": 4,
243
+ "2025-11-19": 2,
244
+ "2025-11-20": 11,
245
+ "2025-11-21": 9,
246
+ "2025-11-23": 1,
247
+ "2025-11-24": 3,
248
+ "2025-11-27": 7,
249
+ "2025-11-28": 1,
250
+ "2025-11-29": 5,
251
+ "2025-12-01": 2,
252
+ "2025-12-03": 1,
253
+ "2025-12-05": 1,
254
+ "2025-12-07": 6,
255
+ "2025-12-08": 1,
256
+ "2025-12-09": 3,
257
+ "2025-12-10": 4,
258
+ "2025-12-15": 2,
259
+ "2025-12-19": 3,
260
+ "2025-12-20": 15,
261
+ "2025-12-23": 5,
262
+ "2025-12-25": 2,
263
+ "2025-12-26": 1,
264
+ "2025-12-28": 4,
265
+ "2025-12-29": 2
266
+ },
267
  "year": 2025,
268
  "c0": "#161b22",
269
  "c1": "#0e4429",
270
  "c2": "#006d32",
271
  "c3": "#26a641",
272
  "c4": "#39d353"
273
+ },
274
+ "python_code": "class ContributionHeatmap(gr.HTML):\n \"\"\"Reusable GitHub-style contribution heatmap built on gr.HTML.\"\"\"\n\n def __init__(self, value=None, year=2025, theme=\"green\",\n c0=None, c1=None, c2=None, c3=None, c4=None, **kwargs):\n if value is None:\n value = {}\n # Use explicit c0-c4 if provided (from gr.HTML updates), else derive from theme\n colors = COLOR_SCHEMES.get(theme, COLOR_SCHEMES[\"green\"])\n super().__init__(\n value=value,\n year=year,\n c0=c0 or colors[0],\n c1=c1 or colors[1],\n c2=c2 or colors[2],\n c3=c3 or colors[3],\n c4=c4 or colors[4],\n html_template=HEATMAP_HTML,\n css_template=HEATMAP_CSS,\n js_on_load=HEATMAP_JS,\n **kwargs,\n )\n\n def api_info(self):\n return {\"type\": \"object\", \"description\": \"Dict mapping YYYY-MM-DD to int counts\"}\n",
275
+ "head": "",
276
+ "repo_url": "https://huggingface.co/spaces/ysharma/github-contribution-heatmap"
277
  },
278
  {
279
  "id": "spin-wheel",