@industry-theme/git-panels 0.1.12 → 0.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -107,70 +107,59 @@ const createLucideIcon = (iconName, iconNode) => {
107
107
  * This source code is licensed under the ISC license.
108
108
  * See the LICENSE file in the root directory of this source tree.
109
109
  */
110
- const __iconNode$m = [
110
+ const __iconNode$j = [
111
111
  ["path", { d: "M8 2v4", key: "1cmpym" }],
112
112
  ["path", { d: "M16 2v4", key: "4m81vk" }],
113
113
  ["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
114
114
  ["path", { d: "M3 10h18", key: "8toen8" }]
115
115
  ];
116
- const Calendar = createLucideIcon("calendar", __iconNode$m);
116
+ const Calendar = createLucideIcon("calendar", __iconNode$j);
117
117
  /**
118
118
  * @license lucide-react v0.552.0 - ISC
119
119
  *
120
120
  * This source code is licensed under the ISC license.
121
121
  * See the LICENSE file in the root directory of this source tree.
122
122
  */
123
- const __iconNode$l = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
124
- const Check = createLucideIcon("check", __iconNode$l);
123
+ const __iconNode$i = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
124
+ const Check = createLucideIcon("check", __iconNode$i);
125
125
  /**
126
126
  * @license lucide-react v0.552.0 - ISC
127
127
  *
128
128
  * This source code is licensed under the ISC license.
129
129
  * See the LICENSE file in the root directory of this source tree.
130
130
  */
131
- const __iconNode$k = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
132
- const ChevronDown = createLucideIcon("chevron-down", __iconNode$k);
131
+ const __iconNode$h = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
132
+ const ChevronDown = createLucideIcon("chevron-down", __iconNode$h);
133
133
  /**
134
134
  * @license lucide-react v0.552.0 - ISC
135
135
  *
136
136
  * This source code is licensed under the ISC license.
137
137
  * See the LICENSE file in the root directory of this source tree.
138
138
  */
139
- const __iconNode$j = [
139
+ const __iconNode$g = [
140
140
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
141
141
  ["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
142
142
  ["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
143
143
  ];
144
- const CircleAlert = createLucideIcon("circle-alert", __iconNode$j);
144
+ const CircleAlert = createLucideIcon("circle-alert", __iconNode$g);
145
145
  /**
146
146
  * @license lucide-react v0.552.0 - ISC
147
147
  *
148
148
  * This source code is licensed under the ISC license.
149
149
  * See the LICENSE file in the root directory of this source tree.
150
150
  */
151
- const __iconNode$i = [
152
- ["path", { d: "M12 6v6l4 2", key: "mmk7yg" }],
153
- ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]
154
- ];
155
- const Clock = createLucideIcon("clock", __iconNode$i);
156
- /**
157
- * @license lucide-react v0.552.0 - ISC
158
- *
159
- * This source code is licensed under the ISC license.
160
- * See the LICENSE file in the root directory of this source tree.
161
- */
162
- const __iconNode$h = [
151
+ const __iconNode$f = [
163
152
  ["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
164
153
  ["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2", key: "zix9uf" }]
165
154
  ];
166
- const Copy = createLucideIcon("copy", __iconNode$h);
155
+ const Copy = createLucideIcon("copy", __iconNode$f);
167
156
  /**
168
157
  * @license lucide-react v0.552.0 - ISC
169
158
  *
170
159
  * This source code is licensed under the ISC license.
171
160
  * See the LICENSE file in the root directory of this source tree.
172
161
  */
173
- const __iconNode$g = [
162
+ const __iconNode$e = [
174
163
  ["path", { d: "m15 15 6 6", key: "1s409w" }],
175
164
  ["path", { d: "m15 9 6-6", key: "ko1vev" }],
176
165
  ["path", { d: "M21 16v5h-5", key: "1ck2sf" }],
@@ -180,26 +169,26 @@ const __iconNode$g = [
180
169
  ["path", { d: "M3 8V3h5", key: "1ln10m" }],
181
170
  ["path", { d: "M9 9 3 3", key: "v551iv" }]
182
171
  ];
183
- const Expand = createLucideIcon("expand", __iconNode$g);
172
+ const Expand = createLucideIcon("expand", __iconNode$e);
184
173
  /**
185
174
  * @license lucide-react v0.552.0 - ISC
186
175
  *
187
176
  * This source code is licensed under the ISC license.
188
177
  * See the LICENSE file in the root directory of this source tree.
189
178
  */
190
- const __iconNode$f = [
179
+ const __iconNode$d = [
191
180
  ["path", { d: "M15 3h6v6", key: "1q9fwt" }],
192
181
  ["path", { d: "M10 14 21 3", key: "gplh6r" }],
193
182
  ["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
194
183
  ];
195
- const ExternalLink = createLucideIcon("external-link", __iconNode$f);
184
+ const ExternalLink = createLucideIcon("external-link", __iconNode$d);
196
185
  /**
197
186
  * @license lucide-react v0.552.0 - ISC
198
187
  *
199
188
  * This source code is licensed under the ISC license.
200
189
  * See the LICENSE file in the root directory of this source tree.
201
190
  */
202
- const __iconNode$e = [
191
+ const __iconNode$c = [
203
192
  [
204
193
  "path",
205
194
  {
@@ -212,70 +201,59 @@ const __iconNode$e = [
212
201
  ["path", { d: "M16 13H8", key: "t4e002" }],
213
202
  ["path", { d: "M16 17H8", key: "z1uh3a" }]
214
203
  ];
215
- const FileText = createLucideIcon("file-text", __iconNode$e);
204
+ const FileText = createLucideIcon("file-text", __iconNode$c);
216
205
  /**
217
206
  * @license lucide-react v0.552.0 - ISC
218
207
  *
219
208
  * This source code is licensed under the ISC license.
220
209
  * See the LICENSE file in the root directory of this source tree.
221
210
  */
222
- const __iconNode$d = [
211
+ const __iconNode$b = [
223
212
  ["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }],
224
213
  ["line", { x1: "3", x2: "9", y1: "12", y2: "12", key: "1dyftd" }],
225
214
  ["line", { x1: "15", x2: "21", y1: "12", y2: "12", key: "oup4p8" }]
226
215
  ];
227
- const GitCommitHorizontal = createLucideIcon("git-commit-horizontal", __iconNode$d);
216
+ const GitCommitHorizontal = createLucideIcon("git-commit-horizontal", __iconNode$b);
228
217
  /**
229
218
  * @license lucide-react v0.552.0 - ISC
230
219
  *
231
220
  * This source code is licensed under the ISC license.
232
221
  * See the LICENSE file in the root directory of this source tree.
233
222
  */
234
- const __iconNode$c = [
223
+ const __iconNode$a = [
235
224
  ["circle", { cx: "18", cy: "18", r: "3", key: "1xkwt0" }],
236
225
  ["circle", { cx: "6", cy: "6", r: "3", key: "1lh9wr" }],
237
226
  ["path", { d: "M13 6h3a2 2 0 0 1 2 2v7", key: "1yeb86" }],
238
227
  ["line", { x1: "6", x2: "6", y1: "9", y2: "21", key: "rroup" }]
239
228
  ];
240
- const GitPullRequest = createLucideIcon("git-pull-request", __iconNode$c);
229
+ const GitPullRequest = createLucideIcon("git-pull-request", __iconNode$a);
241
230
  /**
242
231
  * @license lucide-react v0.552.0 - ISC
243
232
  *
244
233
  * This source code is licensed under the ISC license.
245
234
  * See the LICENSE file in the root directory of this source tree.
246
235
  */
247
- const __iconNode$b = [
236
+ const __iconNode$9 = [
248
237
  ["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "1357e3" }],
249
238
  ["path", { d: "M3 3v5h5", key: "1xhq8a" }],
250
239
  ["path", { d: "M12 7v5l4 2", key: "1fdv2h" }]
251
240
  ];
252
- const History = createLucideIcon("history", __iconNode$b);
241
+ const History = createLucideIcon("history", __iconNode$9);
253
242
  /**
254
243
  * @license lucide-react v0.552.0 - ISC
255
244
  *
256
245
  * This source code is licensed under the ISC license.
257
246
  * See the LICENSE file in the root directory of this source tree.
258
247
  */
259
- const __iconNode$a = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]];
260
- const LoaderCircle = createLucideIcon("loader-circle", __iconNode$a);
248
+ const __iconNode$8 = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]];
249
+ const LoaderCircle = createLucideIcon("loader-circle", __iconNode$8);
261
250
  /**
262
251
  * @license lucide-react v0.552.0 - ISC
263
252
  *
264
253
  * This source code is licensed under the ISC license.
265
254
  * See the LICENSE file in the root directory of this source tree.
266
255
  */
267
- const __iconNode$9 = [
268
- ["path", { d: "m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7", key: "132q7q" }],
269
- ["rect", { x: "2", y: "4", width: "20", height: "16", rx: "2", key: "izxlao" }]
270
- ];
271
- const Mail = createLucideIcon("mail", __iconNode$9);
272
- /**
273
- * @license lucide-react v0.552.0 - ISC
274
- *
275
- * This source code is licensed under the ISC license.
276
- * See the LICENSE file in the root directory of this source tree.
277
- */
278
- const __iconNode$8 = [
256
+ const __iconNode$7 = [
279
257
  [
280
258
  "path",
281
259
  {
@@ -284,45 +262,45 @@ const __iconNode$8 = [
284
262
  }
285
263
  ]
286
264
  ];
287
- const MessageSquare = createLucideIcon("message-square", __iconNode$8);
265
+ const MessageSquare = createLucideIcon("message-square", __iconNode$7);
288
266
  /**
289
267
  * @license lucide-react v0.552.0 - ISC
290
268
  *
291
269
  * This source code is licensed under the ISC license.
292
270
  * See the LICENSE file in the root directory of this source tree.
293
271
  */
294
- const __iconNode$7 = [["path", { d: "M5 12h14", key: "1ays0h" }]];
295
- const Minus = createLucideIcon("minus", __iconNode$7);
272
+ const __iconNode$6 = [["path", { d: "M5 12h14", key: "1ays0h" }]];
273
+ const Minus = createLucideIcon("minus", __iconNode$6);
296
274
  /**
297
275
  * @license lucide-react v0.552.0 - ISC
298
276
  *
299
277
  * This source code is licensed under the ISC license.
300
278
  * See the LICENSE file in the root directory of this source tree.
301
279
  */
302
- const __iconNode$6 = [
280
+ const __iconNode$5 = [
303
281
  ["rect", { width: "20", height: "14", x: "2", y: "3", rx: "2", key: "48i651" }],
304
282
  ["line", { x1: "8", x2: "16", y1: "21", y2: "21", key: "1svkeh" }],
305
283
  ["line", { x1: "12", x2: "12", y1: "17", y2: "21", key: "vw1qmm" }]
306
284
  ];
307
- const Monitor = createLucideIcon("monitor", __iconNode$6);
285
+ const Monitor = createLucideIcon("monitor", __iconNode$5);
308
286
  /**
309
287
  * @license lucide-react v0.552.0 - ISC
310
288
  *
311
289
  * This source code is licensed under the ISC license.
312
290
  * See the LICENSE file in the root directory of this source tree.
313
291
  */
314
- const __iconNode$5 = [
292
+ const __iconNode$4 = [
315
293
  ["path", { d: "M18 8L22 12L18 16", key: "1r0oui" }],
316
294
  ["path", { d: "M2 12H22", key: "1m8cig" }]
317
295
  ];
318
- const MoveRight = createLucideIcon("move-right", __iconNode$5);
296
+ const MoveRight = createLucideIcon("move-right", __iconNode$4);
319
297
  /**
320
298
  * @license lucide-react v0.552.0 - ISC
321
299
  *
322
300
  * This source code is licensed under the ISC license.
323
301
  * See the LICENSE file in the root directory of this source tree.
324
302
  */
325
- const __iconNode$4 = [
303
+ const __iconNode$3 = [
326
304
  [
327
305
  "path",
328
306
  {
@@ -331,42 +309,31 @@ const __iconNode$4 = [
331
309
  }
332
310
  ]
333
311
  ];
334
- const Play = createLucideIcon("play", __iconNode$4);
312
+ const Play = createLucideIcon("play", __iconNode$3);
335
313
  /**
336
314
  * @license lucide-react v0.552.0 - ISC
337
315
  *
338
316
  * This source code is licensed under the ISC license.
339
317
  * See the LICENSE file in the root directory of this source tree.
340
318
  */
341
- const __iconNode$3 = [
319
+ const __iconNode$2 = [
342
320
  ["path", { d: "M5 12h14", key: "1ays0h" }],
343
321
  ["path", { d: "M12 5v14", key: "s699le" }]
344
322
  ];
345
- const Plus = createLucideIcon("plus", __iconNode$3);
323
+ const Plus = createLucideIcon("plus", __iconNode$2);
346
324
  /**
347
325
  * @license lucide-react v0.552.0 - ISC
348
326
  *
349
327
  * This source code is licensed under the ISC license.
350
328
  * See the LICENSE file in the root directory of this source tree.
351
329
  */
352
- const __iconNode$2 = [
330
+ const __iconNode$1 = [
353
331
  ["path", { d: "M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "14sxne" }],
354
332
  ["path", { d: "M3 3v5h5", key: "1xhq8a" }],
355
333
  ["path", { d: "M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16", key: "1hlbsb" }],
356
334
  ["path", { d: "M16 16h5v5", key: "ccwih5" }]
357
335
  ];
358
- const RefreshCcw = createLucideIcon("refresh-ccw", __iconNode$2);
359
- /**
360
- * @license lucide-react v0.552.0 - ISC
361
- *
362
- * This source code is licensed under the ISC license.
363
- * See the LICENSE file in the root directory of this source tree.
364
- */
365
- const __iconNode$1 = [
366
- ["path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2", key: "975kel" }],
367
- ["circle", { cx: "12", cy: "7", r: "4", key: "17ys0d" }]
368
- ];
369
- const User = createLucideIcon("user", __iconNode$1);
336
+ const RefreshCcw = createLucideIcon("refresh-ccw", __iconNode$1);
370
337
  /**
371
338
  * @license lucide-react v0.552.0 - ISC
372
339
  *
@@ -415,7 +382,8 @@ function formatRelativeTime(dateStr) {
415
382
  const hours = Math.floor(minutes / 60);
416
383
  if (hours < 24) return `${hours} hour${hours === 1 ? "" : "s"} ago`;
417
384
  const days = Math.floor(hours / 24);
418
- if (days < 30) return `${days} day${days === 1 ? "" : "s"} ago`;
385
+ if (days === 1) return "Yesterday";
386
+ if (days < 30) return `${days} days ago`;
419
387
  const months = Math.floor(days / 30);
420
388
  if (months < 12) return `${months} month${months === 1 ? "" : "s"} ago`;
421
389
  const years = Math.floor(months / 12);
@@ -444,6 +412,7 @@ const GitCommitHistoryPanel = ({
444
412
  var _a;
445
413
  const { theme: theme2 } = useTheme();
446
414
  const [limit, setLimit] = useState(25);
415
+ const [selectedHash, setSelectedHash] = useState(null);
447
416
  const commitsSlice = context.getSlice("commits");
448
417
  const hasCommits = context.hasSlice("commits");
449
418
  const isLoading = context.isSliceLoading("commits");
@@ -487,7 +456,7 @@ const GitCommitHistoryPanel = ({
487
456
  display: "flex",
488
457
  flexDirection: "column",
489
458
  height: "100%",
490
- backgroundColor: theme2.colors.backgroundSecondary,
459
+ backgroundColor: theme2.colors.background,
491
460
  overflow: "hidden"
492
461
  };
493
462
  const renderState = (message) => /* @__PURE__ */ jsx("div", { style: containerStyle, children: /* @__PURE__ */ jsx(
@@ -511,6 +480,7 @@ const GitCommitHistoryPanel = ({
511
480
  return renderState("Commit history data is not available.");
512
481
  }
513
482
  return /* @__PURE__ */ jsxs("div", { style: containerStyle, children: [
483
+ /* @__PURE__ */ jsx("style", { children: `.hide-scrollbar::-webkit-scrollbar { display: none; }` }),
514
484
  /* @__PURE__ */ jsxs(
515
485
  "div",
516
486
  {
@@ -519,20 +489,32 @@ const GitCommitHistoryPanel = ({
519
489
  minHeight: "40px",
520
490
  padding: "0 12px",
521
491
  borderBottom: `1px solid ${theme2.colors.border}`,
492
+ backgroundColor: theme2.colors.background,
522
493
  display: "flex",
523
494
  alignItems: "center",
524
495
  justifyContent: "space-between",
525
- color: theme2.colors.textSecondary,
526
- textTransform: "uppercase",
527
- fontWeight: 600,
528
- fontSize: theme2.fontSizes[1],
529
496
  boxSizing: "border-box"
530
497
  },
531
498
  children: [
532
- /* @__PURE__ */ jsxs("span", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
533
- /* @__PURE__ */ jsx(History, { size: 14 }),
534
- "Commit History"
535
- ] }),
499
+ /* @__PURE__ */ jsxs(
500
+ "div",
501
+ {
502
+ style: {
503
+ display: "flex",
504
+ alignItems: "center",
505
+ gap: "8px",
506
+ color: theme2.colors.textSecondary,
507
+ fontFamily: theme2.fonts.heading,
508
+ fontSize: theme2.fontSizes[0],
509
+ fontWeight: 600,
510
+ textTransform: "uppercase"
511
+ },
512
+ children: [
513
+ /* @__PURE__ */ jsx(History, { size: 14 }),
514
+ "Commit History"
515
+ ]
516
+ }
517
+ ),
536
518
  /* @__PURE__ */ jsxs(
537
519
  "button",
538
520
  {
@@ -549,7 +531,8 @@ const GitCommitHistoryPanel = ({
549
531
  backgroundColor: theme2.colors.background,
550
532
  color: theme2.colors.text,
551
533
  cursor: isLoading ? "default" : "pointer",
552
- fontSize: "12px",
534
+ fontFamily: theme2.fonts.body,
535
+ fontSize: theme2.fontSizes[0],
553
536
  fontWeight: 500,
554
537
  opacity: isLoading ? 0.7 : 1
555
538
  },
@@ -568,11 +551,12 @@ const GitCommitHistoryPanel = ({
568
551
  style: {
569
552
  flex: 1,
570
553
  overflowY: "auto",
571
- padding: "16px",
572
554
  display: "flex",
573
555
  flexDirection: "column",
574
- gap: "10px"
556
+ scrollbarWidth: "none",
557
+ msOverflowStyle: "none"
575
558
  },
559
+ className: "hide-scrollbar",
576
560
  children: [
577
561
  isLoading && commits.length === 0 && /* @__PURE__ */ jsx(
578
562
  "div",
@@ -589,19 +573,20 @@ const GitCommitHistoryPanel = ({
589
573
  children: "Loading commit history..."
590
574
  }
591
575
  ),
592
- !isLoading && sortedCommits.length === 0 && /* @__PURE__ */ jsx(
576
+ !isLoading && sortedCommits.length === 0 && /* @__PURE__ */ jsxs(
593
577
  "div",
594
578
  {
595
579
  style: {
596
- flex: 1,
597
- display: "flex",
598
- alignItems: "center",
599
- justifyContent: "center",
580
+ marginTop: "48px",
600
581
  textAlign: "center",
601
582
  color: theme2.colors.textSecondary,
602
- fontSize: theme2.fontSizes[1]
583
+ fontFamily: theme2.fonts.body
603
584
  },
604
- children: "No commits found."
585
+ children: [
586
+ /* @__PURE__ */ jsx(History, { size: 32, style: { marginBottom: "12px" } }),
587
+ /* @__PURE__ */ jsx("div", { style: { fontFamily: theme2.fonts.heading, fontSize: theme2.fontSizes[1], fontWeight: 600 }, children: "No commits found" }),
588
+ /* @__PURE__ */ jsx("div", { style: { marginTop: "4px", fontSize: theme2.fontSizes[0] }, children: "There are no commits to display." })
589
+ ]
605
590
  }
606
591
  ),
607
592
  sortedCommits.map((commit) => /* @__PURE__ */ jsx(
@@ -609,7 +594,9 @@ const GitCommitHistoryPanel = ({
609
594
  {
610
595
  commit,
611
596
  theme: theme2,
597
+ isSelected: selectedHash === commit.hash,
612
598
  onClick: () => {
599
+ setSelectedHash(commit.hash);
613
600
  events.emit({
614
601
  type: "git-panels.commit:selected",
615
602
  source: "git-panels.commit-history",
@@ -625,41 +612,48 @@ const GitCommitHistoryPanel = ({
625
612
  )
626
613
  ] });
627
614
  };
628
- const CommitCard = ({ commit, theme: theme2, onClick }) => {
615
+ const CommitCard = ({ commit, theme: theme2, isSelected, onClick }) => {
616
+ const [isHovered, setIsHovered] = useState(false);
617
+ const isActive = isHovered || isSelected;
629
618
  const firstLine = commit.message.split("\n")[0];
630
619
  const relative = formatRelativeTime(commit.date);
631
620
  return /* @__PURE__ */ jsxs(
632
621
  "div",
633
622
  {
634
623
  onClick,
624
+ role: "button",
625
+ tabIndex: 0,
626
+ onKeyDown: (e) => {
627
+ if (e.key === "Enter" || e.key === " ") {
628
+ e.preventDefault();
629
+ onClick == null ? void 0 : onClick();
630
+ }
631
+ },
632
+ onMouseEnter: () => setIsHovered(true),
633
+ onMouseLeave: () => setIsHovered(false),
635
634
  style: {
636
- padding: "12px",
637
- backgroundColor: theme2.colors.background,
638
- borderRadius: "6px",
639
- border: `1px solid ${theme2.colors.border}`,
635
+ borderBottom: `1px solid ${theme2.colors.border}`,
636
+ padding: "16px",
637
+ backgroundColor: isActive ? theme2.colors.background : theme2.colors.backgroundSecondary,
640
638
  display: "flex",
641
639
  flexDirection: "column",
642
- gap: "6px",
640
+ gap: "8px",
643
641
  cursor: onClick ? "pointer" : "default",
644
- transition: "border-color 0.15s ease"
645
- },
646
- onMouseEnter: (e) => {
647
- if (onClick) {
648
- e.currentTarget.style.borderColor = theme2.colors.primary;
649
- }
650
- },
651
- onMouseLeave: (e) => {
652
- e.currentTarget.style.borderColor = theme2.colors.border;
642
+ minWidth: 0,
643
+ transition: "background-color 0.15s ease"
653
644
  },
654
645
  children: [
655
646
  /* @__PURE__ */ jsx(
656
647
  "div",
657
648
  {
658
649
  style: {
650
+ fontFamily: theme2.fonts.heading,
659
651
  fontSize: theme2.fontSizes[2],
660
- color: theme2.colors.text,
661
- fontWeight: 500,
662
- lineHeight: 1.4
652
+ fontWeight: 600,
653
+ color: isActive ? theme2.colors.primary : theme2.colors.text,
654
+ lineHeight: 1.3,
655
+ wordBreak: "break-word",
656
+ transition: "color 0.15s ease"
663
657
  },
664
658
  children: firstLine
665
659
  }
@@ -669,40 +663,18 @@ const CommitCard = ({ commit, theme: theme2, onClick }) => {
669
663
  {
670
664
  style: {
671
665
  display: "flex",
672
- flexWrap: "wrap",
673
- gap: "8px",
674
666
  alignItems: "center",
675
- fontSize: theme2.fontSizes[1],
676
- color: theme2.colors.textSecondary
667
+ gap: "4px",
668
+ color: theme2.colors.textSecondary,
669
+ fontFamily: theme2.fonts.body,
670
+ fontSize: theme2.fontSizes[0]
677
671
  },
678
672
  children: [
679
- commit.author && /* @__PURE__ */ jsx("span", { children: commit.author }),
680
- /* @__PURE__ */ jsx("span", { style: { fontSize: "10px" }, children: "•" }),
681
- /* @__PURE__ */ jsx(
682
- "span",
683
- {
684
- style: {
685
- fontFamily: theme2.fonts.monospace,
686
- fontSize: "11px"
687
- },
688
- children: commit.hash.substring(0, 8)
689
- }
690
- ),
691
- /* @__PURE__ */ jsx("span", { style: { fontSize: "10px" }, children: "•" }),
692
- /* @__PURE__ */ jsxs(
693
- "span",
694
- {
695
- style: {
696
- display: "inline-flex",
697
- alignItems: "center",
698
- gap: "4px"
699
- },
700
- children: [
701
- /* @__PURE__ */ jsx(Clock, { size: 12 }),
702
- /* @__PURE__ */ jsx("span", { title: new Date(commit.date).toLocaleString(), children: relative })
703
- ]
704
- }
705
- )
673
+ /* @__PURE__ */ jsx("span", { title: new Date(commit.date).toLocaleString(), children: relative }),
674
+ commit.author && /* @__PURE__ */ jsxs("span", { children: [
675
+ "by ",
676
+ commit.author
677
+ ] })
706
678
  ]
707
679
  }
708
680
  )
@@ -44947,23 +44919,51 @@ const GitCommitDetailPanelContent = ({
44947
44919
  backgroundColor: theme2.colors.backgroundSecondary,
44948
44920
  display: "flex",
44949
44921
  alignItems: "center",
44950
- gap: "12px",
44922
+ gap: "8px",
44951
44923
  boxSizing: "border-box"
44952
44924
  },
44953
44925
  children: [
44954
- /* @__PURE__ */ jsx(GitCommitHorizontal, { size: 14, style: { color: theme2.colors.primary } }),
44955
- /* @__PURE__ */ jsx(
44926
+ selectedCommit.files && selectedCommit.files.length > 0 && /* @__PURE__ */ jsxs(
44956
44927
  "span",
44957
44928
  {
44958
44929
  style: {
44959
- fontFamily: theme2.fonts.monospace,
44960
- fontSize: theme2.fontSizes[1],
44961
- color: theme2.colors.primary,
44962
- backgroundColor: `${theme2.colors.primary}15`,
44963
- padding: "2px 8px",
44964
- borderRadius: "4px"
44930
+ color: theme2.colors.textSecondary,
44931
+ fontSize: theme2.fontSizes[0],
44932
+ fontFamily: theme2.fonts.body
44933
+ },
44934
+ children: [
44935
+ /* @__PURE__ */ jsxs("span", { style: { color: theme2.colors.primary }, children: [
44936
+ selectedCommit.files.length,
44937
+ " ",
44938
+ selectedCommit.files.length === 1 ? "file" : "files"
44939
+ ] }),
44940
+ " changed"
44941
+ ]
44942
+ }
44943
+ ),
44944
+ /* @__PURE__ */ jsxs(
44945
+ "span",
44946
+ {
44947
+ style: {
44948
+ display: "inline-flex",
44949
+ alignItems: "center",
44950
+ gap: "6px",
44951
+ color: theme2.colors.textSecondary,
44952
+ fontSize: theme2.fontSizes[0],
44953
+ fontFamily: theme2.fonts.body
44965
44954
  },
44966
- children: shortHash
44955
+ children: [
44956
+ /* @__PURE__ */ jsx("span", { style: { color: theme2.colors.primary }, children: relative }),
44957
+ /* @__PURE__ */ jsxs("span", { children: [
44958
+ "by ",
44959
+ /* @__PURE__ */ jsx("span", { style: { color: theme2.colors.primary }, children: selectedCommit.author })
44960
+ ] }),
44961
+ /* @__PURE__ */ jsx("span", { children: "as" }),
44962
+ /* @__PURE__ */ jsxs("span", { style: { fontFamily: theme2.fonts.monospace }, children: [
44963
+ "sha ",
44964
+ shortHash
44965
+ ] })
44966
+ ]
44967
44967
  }
44968
44968
  ),
44969
44969
  selectedCommit.stats && /* @__PURE__ */ jsxs(
@@ -44972,8 +44972,14 @@ const GitCommitDetailPanelContent = ({
44972
44972
  style: {
44973
44973
  display: "inline-flex",
44974
44974
  alignItems: "center",
44975
- gap: "8px",
44976
- fontSize: theme2.fontSizes[0]
44975
+ gap: "6px",
44976
+ padding: "4px 10px",
44977
+ borderRadius: "999px",
44978
+ backgroundColor: `${theme2.colors.primary}20`,
44979
+ color: theme2.colors.primary,
44980
+ fontFamily: theme2.fonts.heading,
44981
+ fontSize: theme2.fontSizes[0],
44982
+ fontWeight: 600
44977
44983
  },
44978
44984
  children: [
44979
44985
  /* @__PURE__ */ jsxs("span", { style: { color: theme2.colors.success || "#22c55e", display: "inline-flex", alignItems: "center", gap: "2px" }, children: [
@@ -45060,111 +45066,12 @@ const GitCommitDetailPanelContent = ({
45060
45066
  children: firstLine
45061
45067
  }
45062
45068
  ),
45063
- /* @__PURE__ */ jsxs(
45064
- "div",
45065
- {
45066
- style: {
45067
- display: "flex",
45068
- flexDirection: "column",
45069
- gap: "8px",
45070
- padding: "12px",
45071
- marginBottom: "16px",
45072
- backgroundColor: theme2.colors.backgroundSecondary,
45073
- borderRadius: "8px",
45074
- border: `1px solid ${theme2.colors.border}`
45075
- },
45076
- children: [
45077
- /* @__PURE__ */ jsxs(
45078
- "div",
45079
- {
45080
- style: {
45081
- display: "flex",
45082
- alignItems: "center",
45083
- gap: "8px",
45084
- fontSize: theme2.fontSizes[1]
45085
- },
45086
- children: [
45087
- /* @__PURE__ */ jsx(User, { size: 14, style: { color: theme2.colors.textSecondary } }),
45088
- /* @__PURE__ */ jsx("span", { style: { color: theme2.colors.text }, children: selectedCommit.author }),
45089
- selectedCommit.authorEmail && /* @__PURE__ */ jsxs(
45090
- "span",
45091
- {
45092
- style: {
45093
- display: "inline-flex",
45094
- alignItems: "center",
45095
- gap: "4px",
45096
- color: theme2.colors.textSecondary,
45097
- fontSize: theme2.fontSizes[0]
45098
- },
45099
- children: [
45100
- /* @__PURE__ */ jsx(Mail, { size: 12 }),
45101
- selectedCommit.authorEmail
45102
- ]
45103
- }
45104
- )
45105
- ]
45106
- }
45107
- ),
45108
- /* @__PURE__ */ jsxs(
45109
- "div",
45110
- {
45111
- style: {
45112
- display: "flex",
45113
- alignItems: "center",
45114
- gap: "8px",
45115
- fontSize: theme2.fontSizes[1]
45116
- },
45117
- children: [
45118
- /* @__PURE__ */ jsx(Clock, { size: 14, style: { color: theme2.colors.textSecondary } }),
45119
- /* @__PURE__ */ jsx("span", { style: { color: theme2.colors.text }, children: formatDate(selectedCommit.date) }),
45120
- /* @__PURE__ */ jsxs("span", { style: { color: theme2.colors.textSecondary }, children: [
45121
- "(",
45122
- relative,
45123
- ")"
45124
- ] })
45125
- ]
45126
- }
45127
- ),
45128
- /* @__PURE__ */ jsxs(
45129
- "div",
45130
- {
45131
- style: {
45132
- display: "flex",
45133
- alignItems: "center",
45134
- gap: "8px",
45135
- fontSize: theme2.fontSizes[1]
45136
- },
45137
- children: [
45138
- /* @__PURE__ */ jsx(GitCommitHorizontal, { size: 14, style: { color: theme2.colors.textSecondary } }),
45139
- /* @__PURE__ */ jsx(
45140
- "code",
45141
- {
45142
- style: {
45143
- fontFamily: theme2.fonts.monospace,
45144
- fontSize: theme2.fontSizes[0],
45145
- color: theme2.colors.text,
45146
- backgroundColor: theme2.colors.background,
45147
- padding: "2px 6px",
45148
- borderRadius: "4px"
45149
- },
45150
- children: selectedCommit.hash
45151
- }
45152
- )
45153
- ]
45154
- }
45155
- )
45156
- ]
45157
- }
45158
- ),
45159
45069
  messageBody && /* @__PURE__ */ jsx(
45160
45070
  "div",
45161
45071
  {
45162
45072
  style: {
45163
- marginBottom: "16px",
45164
- padding: "16px",
45165
- backgroundColor: theme2.colors.backgroundSecondary,
45166
- borderRadius: "8px",
45167
- border: `1px solid ${theme2.colors.border}`
45073
+ borderTop: `1px solid ${theme2.colors.border}`,
45074
+ paddingTop: "16px"
45168
45075
  },
45169
45076
  children: /* @__PURE__ */ jsx(
45170
45077
  DocumentView,
@@ -45176,124 +45083,12 @@ const GitCommitDetailPanelContent = ({
45176
45083
  }
45177
45084
  )
45178
45085
  }
45179
- ),
45180
- selectedCommit.files && selectedCommit.files.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
45181
- /* @__PURE__ */ jsxs(
45182
- "h2",
45183
- {
45184
- style: {
45185
- margin: 0,
45186
- marginBottom: "12px",
45187
- fontFamily: theme2.fonts.heading,
45188
- fontSize: theme2.fontSizes[2],
45189
- fontWeight: 600,
45190
- color: theme2.colors.text,
45191
- display: "flex",
45192
- alignItems: "center",
45193
- gap: "8px"
45194
- },
45195
- children: [
45196
- /* @__PURE__ */ jsx(FileText, { size: 16 }),
45197
- "Files Changed (",
45198
- selectedCommit.files.length,
45199
- ")"
45200
- ]
45201
- }
45202
- ),
45203
- /* @__PURE__ */ jsx(
45204
- "div",
45205
- {
45206
- style: {
45207
- display: "flex",
45208
- flexDirection: "column",
45209
- gap: "4px"
45210
- },
45211
- children: selectedCommit.files.map((file) => /* @__PURE__ */ jsx(FileChangeRow, { file, theme: theme2 }, file.filename))
45212
- }
45213
- )
45214
- ] })
45086
+ )
45215
45087
  ]
45216
45088
  }
45217
45089
  )
45218
45090
  ] });
45219
45091
  };
45220
- const FileChangeRow = ({ file, theme: theme2 }) => {
45221
- const statusColors = {
45222
- added: theme2.colors.success || "#22c55e",
45223
- removed: theme2.colors.error || "#ef4444",
45224
- modified: theme2.colors.warning || "#f59e0b",
45225
- renamed: theme2.colors.info || "#3b82f6"
45226
- };
45227
- const statusColor = statusColors[file.status] || theme2.colors.textSecondary;
45228
- return /* @__PURE__ */ jsxs(
45229
- "div",
45230
- {
45231
- style: {
45232
- display: "flex",
45233
- alignItems: "center",
45234
- gap: "8px",
45235
- padding: "8px 12px",
45236
- backgroundColor: theme2.colors.backgroundSecondary,
45237
- borderRadius: "6px",
45238
- border: `1px solid ${theme2.colors.border}`,
45239
- fontSize: theme2.fontSizes[1]
45240
- },
45241
- children: [
45242
- /* @__PURE__ */ jsx(
45243
- "span",
45244
- {
45245
- style: {
45246
- width: "8px",
45247
- height: "8px",
45248
- borderRadius: "50%",
45249
- backgroundColor: statusColor,
45250
- flexShrink: 0
45251
- },
45252
- title: file.status
45253
- }
45254
- ),
45255
- /* @__PURE__ */ jsx(
45256
- "span",
45257
- {
45258
- style: {
45259
- flex: 1,
45260
- fontFamily: theme2.fonts.monospace,
45261
- fontSize: theme2.fontSizes[0],
45262
- color: theme2.colors.text,
45263
- overflow: "hidden",
45264
- textOverflow: "ellipsis",
45265
- whiteSpace: "nowrap"
45266
- },
45267
- title: file.filename,
45268
- children: file.filename
45269
- }
45270
- ),
45271
- /* @__PURE__ */ jsxs(
45272
- "span",
45273
- {
45274
- style: {
45275
- display: "inline-flex",
45276
- alignItems: "center",
45277
- gap: "6px",
45278
- fontSize: theme2.fontSizes[0],
45279
- flexShrink: 0
45280
- },
45281
- children: [
45282
- file.additions > 0 && /* @__PURE__ */ jsxs("span", { style: { color: theme2.colors.success || "#22c55e" }, children: [
45283
- "+",
45284
- file.additions
45285
- ] }),
45286
- file.deletions > 0 && /* @__PURE__ */ jsxs("span", { style: { color: theme2.colors.error || "#ef4444" }, children: [
45287
- "-",
45288
- file.deletions
45289
- ] })
45290
- ]
45291
- }
45292
- )
45293
- ]
45294
- }
45295
- );
45296
- };
45297
45092
  const GitCommitDetailPanel = GitCommitDetailPanelContent;
45298
45093
  const GitCommitDetailPanelPreview = () => {
45299
45094
  const { theme: theme2 } = useTheme();