@industry-theme/git-panels 0.1.9 → 0.1.11

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.
@@ -1,6 +1,6 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import * as React2 from "react";
3
- import React2__default, { forwardRef, createElement, createContext, useContext, useState, useEffect, useMemo, useRef, useImperativeHandle, useCallback, useLayoutEffect } from "react";
3
+ import React2__default, { forwardRef, createElement, createContext, useContext, useState, useMemo, useEffect, useRef, useImperativeHandle, useCallback, useLayoutEffect } from "react";
4
4
  import { createPortal } from "react-dom";
5
5
  /**
6
6
  * @license lucide-react v0.552.0 - ISC
@@ -107,78 +107,70 @@ 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$k = [
110
+ const __iconNode$h = [
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$k);
116
+ const Calendar = createLucideIcon("calendar", __iconNode$h);
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$j = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
124
- const Check = createLucideIcon("check", __iconNode$j);
123
+ const __iconNode$g = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
124
+ const Check = createLucideIcon("check", __iconNode$g);
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$i = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
132
- const ChevronDown = createLucideIcon("chevron-down", __iconNode$i);
131
+ const __iconNode$f = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
132
+ const ChevronDown = createLucideIcon("chevron-down", __iconNode$f);
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$h = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]];
140
- const ChevronUp = createLucideIcon("chevron-up", __iconNode$h);
141
- /**
142
- * @license lucide-react v0.552.0 - ISC
143
- *
144
- * This source code is licensed under the ISC license.
145
- * See the LICENSE file in the root directory of this source tree.
146
- */
147
- const __iconNode$g = [
139
+ const __iconNode$e = [
148
140
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
149
141
  ["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
150
142
  ["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
151
143
  ];
152
- const CircleAlert = createLucideIcon("circle-alert", __iconNode$g);
144
+ const CircleAlert = createLucideIcon("circle-alert", __iconNode$e);
153
145
  /**
154
146
  * @license lucide-react v0.552.0 - ISC
155
147
  *
156
148
  * This source code is licensed under the ISC license.
157
149
  * See the LICENSE file in the root directory of this source tree.
158
150
  */
159
- const __iconNode$f = [
151
+ const __iconNode$d = [
160
152
  ["path", { d: "M12 6v6l4 2", key: "mmk7yg" }],
161
153
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]
162
154
  ];
163
- const Clock = createLucideIcon("clock", __iconNode$f);
155
+ const Clock = createLucideIcon("clock", __iconNode$d);
164
156
  /**
165
157
  * @license lucide-react v0.552.0 - ISC
166
158
  *
167
159
  * This source code is licensed under the ISC license.
168
160
  * See the LICENSE file in the root directory of this source tree.
169
161
  */
170
- const __iconNode$e = [
162
+ const __iconNode$c = [
171
163
  ["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
172
164
  ["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" }]
173
165
  ];
174
- const Copy = createLucideIcon("copy", __iconNode$e);
166
+ const Copy = createLucideIcon("copy", __iconNode$c);
175
167
  /**
176
168
  * @license lucide-react v0.552.0 - ISC
177
169
  *
178
170
  * This source code is licensed under the ISC license.
179
171
  * See the LICENSE file in the root directory of this source tree.
180
172
  */
181
- const __iconNode$d = [
173
+ const __iconNode$b = [
182
174
  ["path", { d: "m15 15 6 6", key: "1s409w" }],
183
175
  ["path", { d: "m15 9 6-6", key: "ko1vev" }],
184
176
  ["path", { d: "M21 16v5h-5", key: "1ck2sf" }],
@@ -188,26 +180,26 @@ const __iconNode$d = [
188
180
  ["path", { d: "M3 8V3h5", key: "1ln10m" }],
189
181
  ["path", { d: "M9 9 3 3", key: "v551iv" }]
190
182
  ];
191
- const Expand = createLucideIcon("expand", __iconNode$d);
183
+ const Expand = createLucideIcon("expand", __iconNode$b);
192
184
  /**
193
185
  * @license lucide-react v0.552.0 - ISC
194
186
  *
195
187
  * This source code is licensed under the ISC license.
196
188
  * See the LICENSE file in the root directory of this source tree.
197
189
  */
198
- const __iconNode$c = [
190
+ const __iconNode$a = [
199
191
  ["path", { d: "M15 3h6v6", key: "1q9fwt" }],
200
192
  ["path", { d: "M10 14 21 3", key: "gplh6r" }],
201
193
  ["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
202
194
  ];
203
- const ExternalLink = createLucideIcon("external-link", __iconNode$c);
195
+ const ExternalLink = createLucideIcon("external-link", __iconNode$a);
204
196
  /**
205
197
  * @license lucide-react v0.552.0 - ISC
206
198
  *
207
199
  * This source code is licensed under the ISC license.
208
200
  * See the LICENSE file in the root directory of this source tree.
209
201
  */
210
- const __iconNode$b = [
202
+ const __iconNode$9 = [
211
203
  [
212
204
  "path",
213
205
  {
@@ -220,32 +212,7 @@ const __iconNode$b = [
220
212
  ["path", { d: "M16 13H8", key: "t4e002" }],
221
213
  ["path", { d: "M16 17H8", key: "z1uh3a" }]
222
214
  ];
223
- const FileText = createLucideIcon("file-text", __iconNode$b);
224
- /**
225
- * @license lucide-react v0.552.0 - ISC
226
- *
227
- * This source code is licensed under the ISC license.
228
- * See the LICENSE file in the root directory of this source tree.
229
- */
230
- const __iconNode$a = [
231
- ["line", { x1: "6", x2: "6", y1: "3", y2: "15", key: "17qcm7" }],
232
- ["circle", { cx: "18", cy: "6", r: "3", key: "1h7g24" }],
233
- ["circle", { cx: "6", cy: "18", r: "3", key: "fqmcym" }],
234
- ["path", { d: "M18 9a9 9 0 0 1-9 9", key: "n2h4wq" }]
235
- ];
236
- const GitBranch = createLucideIcon("git-branch", __iconNode$a);
237
- /**
238
- * @license lucide-react v0.552.0 - ISC
239
- *
240
- * This source code is licensed under the ISC license.
241
- * See the LICENSE file in the root directory of this source tree.
242
- */
243
- const __iconNode$9 = [
244
- ["circle", { cx: "18", cy: "18", r: "3", key: "1xkwt0" }],
245
- ["circle", { cx: "6", cy: "6", r: "3", key: "1lh9wr" }],
246
- ["path", { d: "M6 21V9a9 9 0 0 0 9 9", key: "7kw0sc" }]
247
- ];
248
- const GitMerge = createLucideIcon("git-merge", __iconNode$9);
215
+ const FileText = createLucideIcon("file-text", __iconNode$9);
249
216
  /**
250
217
  * @license lucide-react v0.552.0 - ISC
251
218
  *
@@ -358,158 +325,6 @@ const __iconNode = [
358
325
  ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
359
326
  ];
360
327
  const X = createLucideIcon("x", __iconNode);
361
- var terminalTheme$1 = {
362
- space: [0, 4, 8, 16, 32, 64, 128, 256, 512],
363
- fonts: {
364
- body: '"SF Mono", "Monaco", "Inconsolata", "Fira Code", monospace',
365
- heading: '"SF Mono", "Monaco", "Inconsolata", "Fira Code", monospace',
366
- monospace: '"SF Mono", "Monaco", "Inconsolata", "Fira Code", monospace'
367
- },
368
- fontSizes: [12, 14, 16, 18, 20, 24, 32, 48, 64, 96],
369
- fontScale: 1,
370
- fontWeights: {
371
- body: 400,
372
- heading: 500,
373
- bold: 600,
374
- light: 300,
375
- medium: 500,
376
- semibold: 600
377
- },
378
- lineHeights: {
379
- body: 1.6,
380
- heading: 1.3,
381
- tight: 1.4,
382
- relaxed: 1.8
383
- },
384
- breakpoints: ["640px", "768px", "1024px", "1280px"],
385
- sizes: [16, 32, 64, 128, 256, 512, 768, 1024, 1536],
386
- radii: [0, 2, 4, 6, 8, 12, 16, 24],
387
- shadows: [
388
- "none",
389
- "0 1px 2px 0 rgba(0, 0, 0, 0.05)",
390
- "0 2px 4px 0 rgba(0, 0, 0, 0.06)",
391
- "0 4px 6px 0 rgba(0, 0, 0, 0.07)",
392
- "0 8px 12px 0 rgba(0, 0, 0, 0.08)",
393
- "0 16px 24px 0 rgba(0, 0, 0, 0.10)"
394
- ],
395
- zIndices: [0, 1, 10, 20, 30, 40, 50],
396
- colors: {
397
- text: "#e4e4e4",
398
- background: "rgba(10, 10, 10, 0.85)",
399
- primary: "#66b3ff",
400
- secondary: "#80c4ff",
401
- accent: "#66ff99",
402
- highlight: "rgba(102, 179, 255, 0.15)",
403
- muted: "rgba(26, 26, 26, 0.8)",
404
- success: "#66ff99",
405
- warning: "#ffcc66",
406
- error: "#ff6666",
407
- info: "#66b3ff",
408
- border: "rgba(255, 255, 255, 0.1)",
409
- backgroundSecondary: "rgba(15, 15, 15, 0.9)",
410
- backgroundTertiary: "rgba(20, 20, 20, 0.9)",
411
- backgroundLight: "rgba(255, 255, 255, 0.05)",
412
- backgroundHover: "rgba(102, 179, 255, 0.08)",
413
- surface: "rgba(15, 15, 15, 0.95)",
414
- textSecondary: "rgba(255, 255, 255, 0.7)",
415
- textTertiary: "rgba(255, 255, 255, 0.5)",
416
- textMuted: "rgba(255, 255, 255, 0.4)",
417
- highlightBg: "rgba(255, 235, 59, 0.25)",
418
- highlightBorder: "rgba(255, 235, 59, 0.5)"
419
- },
420
- modes: {
421
- light: {
422
- text: "#1a1a1a",
423
- background: "rgba(255, 255, 255, 0.9)",
424
- primary: "#0066cc",
425
- secondary: "#0052a3",
426
- accent: "#00cc88",
427
- highlight: "rgba(0, 102, 204, 0.08)",
428
- muted: "rgba(245, 245, 245, 0.8)",
429
- success: "#00cc88",
430
- warning: "#ffaa00",
431
- error: "#ff3333",
432
- info: "#0066cc",
433
- border: "rgba(0, 0, 0, 0.1)",
434
- backgroundSecondary: "rgba(250, 250, 250, 0.9)",
435
- backgroundTertiary: "rgba(245, 245, 245, 0.9)",
436
- backgroundLight: "rgba(0, 0, 0, 0.02)",
437
- backgroundHover: "rgba(0, 102, 204, 0.04)",
438
- surface: "rgba(255, 255, 255, 0.95)",
439
- textSecondary: "rgba(0, 0, 0, 0.6)",
440
- textTertiary: "rgba(0, 0, 0, 0.4)",
441
- textMuted: "rgba(0, 0, 0, 0.3)",
442
- highlightBg: "rgba(255, 235, 59, 0.3)",
443
- highlightBorder: "rgba(255, 235, 59, 0.6)"
444
- }
445
- },
446
- buttons: {
447
- primary: {
448
- color: "white",
449
- bg: "primary",
450
- borderWidth: 0,
451
- "&:hover": {
452
- bg: "secondary"
453
- }
454
- },
455
- secondary: {
456
- color: "primary",
457
- bg: "transparent",
458
- borderWidth: 1,
459
- borderStyle: "solid",
460
- borderColor: "primary",
461
- "&:hover": {
462
- bg: "highlight"
463
- }
464
- },
465
- ghost: {
466
- color: "text",
467
- bg: "transparent",
468
- "&:hover": {
469
- bg: "backgroundHover"
470
- }
471
- }
472
- },
473
- text: {
474
- heading: {
475
- fontFamily: "heading",
476
- fontWeight: "heading",
477
- lineHeight: "heading"
478
- },
479
- body: {
480
- fontFamily: "body",
481
- fontWeight: "body",
482
- lineHeight: "body"
483
- },
484
- caption: {
485
- fontSize: 1,
486
- color: "textSecondary"
487
- }
488
- },
489
- cards: {
490
- primary: {
491
- bg: "surface",
492
- border: "1px solid",
493
- borderColor: "border",
494
- borderRadius: 1
495
- },
496
- secondary: {
497
- bg: "backgroundSecondary",
498
- border: "1px solid",
499
- borderColor: "border",
500
- borderRadius: 1
501
- }
502
- }
503
- };
504
- function getMode(theme2, mode) {
505
- if (!mode || !theme2.modes || !theme2.modes[mode]) {
506
- return theme2.colors;
507
- }
508
- return {
509
- ...theme2.colors,
510
- ...theme2.modes[mode]
511
- };
512
- }
513
328
  var ThemeContext$1;
514
329
  var getThemeContext$1 = () => {
515
330
  if (typeof window !== "undefined") {
@@ -533,46 +348,6 @@ var useTheme = () => {
533
348
  }
534
349
  return context;
535
350
  };
536
- var ThemeProvider = ({
537
- children: children2,
538
- theme: customTheme = theme$1,
539
- initialMode
540
- }) => {
541
- const [mode, setMode] = useState(initialMode);
542
- const activeTheme = React2__default.useMemo(() => {
543
- if (!mode || !customTheme.modes || !customTheme.modes[mode]) {
544
- return customTheme;
545
- }
546
- return {
547
- ...customTheme,
548
- colors: getMode(customTheme, mode)
549
- };
550
- }, [customTheme, mode]);
551
- useEffect(() => {
552
- if (!initialMode) {
553
- const savedMode = localStorage.getItem("principlemd-theme-mode");
554
- if (savedMode) {
555
- setMode(savedMode);
556
- }
557
- }
558
- }, [initialMode]);
559
- useEffect(() => {
560
- if (mode) {
561
- localStorage.setItem("principlemd-theme-mode", mode);
562
- } else {
563
- localStorage.removeItem("principlemd-theme-mode");
564
- }
565
- }, [mode]);
566
- const value = {
567
- theme: activeTheme,
568
- mode,
569
- setMode
570
- };
571
- return /* @__PURE__ */ React2__default.createElement(ThemeContextSingleton.Provider, {
572
- value
573
- }, children2);
574
- };
575
- var theme$1 = terminalTheme$1;
576
351
  function formatRelativeTime(dateStr) {
577
352
  if (!dateStr) return "Unknown";
578
353
  const date = new Date(dateStr);
@@ -930,6 +705,7 @@ const GitPullRequestsPanel = ({
930
705
  var _a;
931
706
  const { theme: theme2 } = useTheme();
932
707
  const [filter, setFilter] = useState("open");
708
+ const [selectedPrId, setSelectedPrId] = useState(null);
933
709
  const prSlice = context.getSlice("pullRequests");
934
710
  const hasPRs = context.hasSlice("pullRequests");
935
711
  const isLoading = context.isSliceLoading("pullRequests");
@@ -971,6 +747,7 @@ const GitPullRequestsPanel = ({
971
747
  }
972
748
  };
973
749
  const handlePRClick = (pr) => {
750
+ setSelectedPrId(pr.id);
974
751
  events.emit({
975
752
  type: "git-panels.pull-request:selected",
976
753
  source: "git-panels.pull-requests",
@@ -1064,6 +841,7 @@ const GitPullRequestsPanel = ({
1064
841
  );
1065
842
  }
1066
843
  return /* @__PURE__ */ jsxs("div", { style: containerStyle, children: [
844
+ /* @__PURE__ */ jsx("style", { children: `.hide-scrollbar::-webkit-scrollbar { display: none; }` }),
1067
845
  /* @__PURE__ */ jsxs(
1068
846
  "div",
1069
847
  {
@@ -1181,8 +959,11 @@ const GitPullRequestsPanel = ({
1181
959
  flex: 1,
1182
960
  overflowY: "auto",
1183
961
  display: "flex",
1184
- flexDirection: "column"
962
+ flexDirection: "column",
963
+ scrollbarWidth: "none",
964
+ msOverflowStyle: "none"
1185
965
  },
966
+ className: "hide-scrollbar",
1186
967
  children: filteredPullRequests.length === 0 ? /* @__PURE__ */ jsxs(
1187
968
  "div",
1188
969
  {
@@ -1202,14 +983,15 @@ const GitPullRequestsPanel = ({
1202
983
  ] })
1203
984
  ]
1204
985
  }
1205
- ) : filteredPullRequests.map((pr) => /* @__PURE__ */ jsx(PullRequestCard, { pr, theme: theme2, onClick: () => handlePRClick(pr) }, pr.id))
986
+ ) : filteredPullRequests.map((pr) => /* @__PURE__ */ jsx(PullRequestCard, { pr, theme: theme2, isSelected: selectedPrId === pr.id, onClick: () => handlePRClick(pr) }, pr.id))
1206
987
  }
1207
988
  )
1208
989
  ] });
1209
990
  };
1210
- const PullRequestCard = ({ pr, theme: theme2, onClick }) => {
1211
- var _a, _b, _c;
1212
- const [isExpanded, setIsExpanded] = useState(false);
991
+ const PullRequestCard = ({ pr, theme: theme2, isSelected, onClick }) => {
992
+ var _a;
993
+ const [isHovered, setIsHovered] = useState(false);
994
+ const isActive = isHovered || isSelected;
1213
995
  const isMerged = pr.merged_at !== null;
1214
996
  const isOpen = pr.state === "open";
1215
997
  const totalComments = (pr.comments || 0) + (pr.review_comments || 0);
@@ -1225,57 +1007,33 @@ const PullRequestCard = ({ pr, theme: theme2, onClick }) => {
1225
1007
  onClick == null ? void 0 : onClick();
1226
1008
  }
1227
1009
  },
1010
+ onMouseEnter: () => setIsHovered(true),
1011
+ onMouseLeave: () => setIsHovered(false),
1228
1012
  style: {
1229
1013
  borderBottom: `1px solid ${theme2.colors.border}`,
1230
- padding: "12px 16px",
1231
- backgroundColor: theme2.colors.backgroundSecondary,
1014
+ padding: "16px 16px",
1015
+ backgroundColor: isActive ? theme2.colors.background : theme2.colors.backgroundSecondary,
1232
1016
  display: "flex",
1233
1017
  flexDirection: "column",
1234
1018
  gap: "8px",
1235
1019
  cursor: onClick ? "pointer" : "default",
1236
- minWidth: 0
1020
+ minWidth: 0,
1021
+ transition: "background-color 0.15s ease"
1237
1022
  },
1238
1023
  children: [
1239
- /* @__PURE__ */ jsxs(
1024
+ /* @__PURE__ */ jsx(
1240
1025
  "div",
1241
1026
  {
1242
1027
  style: {
1243
- display: "flex",
1244
- alignItems: "baseline",
1245
- gap: "8px"
1028
+ fontFamily: theme2.fonts.heading,
1029
+ fontSize: theme2.fontSizes[2],
1030
+ fontWeight: 600,
1031
+ color: isActive ? theme2.colors.primary : theme2.colors.text,
1032
+ lineHeight: 1.3,
1033
+ wordBreak: "break-word",
1034
+ transition: "color 0.15s ease"
1246
1035
  },
1247
- children: [
1248
- /* @__PURE__ */ jsxs(
1249
- "span",
1250
- {
1251
- style: {
1252
- fontFamily: theme2.fonts.heading,
1253
- fontSize: theme2.fontSizes[1],
1254
- fontWeight: 600,
1255
- color: theme2.colors.textSecondary,
1256
- flexShrink: 0
1257
- },
1258
- children: [
1259
- "#",
1260
- pr.number
1261
- ]
1262
- }
1263
- ),
1264
- /* @__PURE__ */ jsx(
1265
- "span",
1266
- {
1267
- style: {
1268
- fontFamily: theme2.fonts.heading,
1269
- fontSize: theme2.fontSizes[2],
1270
- fontWeight: 600,
1271
- color: theme2.colors.text,
1272
- lineHeight: 1.3,
1273
- wordBreak: "break-word"
1274
- },
1275
- children: pr.title
1276
- }
1277
- )
1278
- ]
1036
+ children: pr.title
1279
1037
  }
1280
1038
  ),
1281
1039
  /* @__PURE__ */ jsxs(
@@ -1308,6 +1066,20 @@ const PullRequestCard = ({ pr, theme: theme2, onClick }) => {
1308
1066
  children: "Draft"
1309
1067
  }
1310
1068
  ),
1069
+ /* @__PURE__ */ jsxs(
1070
+ "span",
1071
+ {
1072
+ style: {
1073
+ fontFamily: theme2.fonts.heading,
1074
+ fontWeight: 600,
1075
+ color: theme2.colors.textSecondary
1076
+ },
1077
+ children: [
1078
+ "#",
1079
+ pr.number
1080
+ ]
1081
+ }
1082
+ ),
1311
1083
  /* @__PURE__ */ jsxs("span", { children: [
1312
1084
  "by ",
1313
1085
  ((_a = pr.user) == null ? void 0 : _a.login) ?? "unknown"
@@ -1359,76 +1131,6 @@ const PullRequestCard = ({ pr, theme: theme2, onClick }) => {
1359
1131
  )
1360
1132
  ]
1361
1133
  }
1362
- ),
1363
- /* @__PURE__ */ jsxs(
1364
- "button",
1365
- {
1366
- type: "button",
1367
- onClick: (e) => {
1368
- e.stopPropagation();
1369
- setIsExpanded(!isExpanded);
1370
- },
1371
- style: {
1372
- display: "inline-flex",
1373
- alignItems: "center",
1374
- gap: "4px",
1375
- padding: 0,
1376
- border: "none",
1377
- backgroundColor: "transparent",
1378
- color: theme2.colors.textSecondary,
1379
- fontFamily: theme2.fonts.body,
1380
- fontSize: theme2.fontSizes[0],
1381
- cursor: "pointer"
1382
- },
1383
- children: [
1384
- isExpanded ? /* @__PURE__ */ jsx(ChevronUp, { size: 14 }) : /* @__PURE__ */ jsx(ChevronDown, { size: 14 }),
1385
- isExpanded ? "Collapse" : "Expand"
1386
- ]
1387
- }
1388
- ),
1389
- isExpanded && /* @__PURE__ */ jsxs(
1390
- "div",
1391
- {
1392
- style: {
1393
- display: "flex",
1394
- flexDirection: "column",
1395
- gap: "10px"
1396
- },
1397
- children: [
1398
- /* @__PURE__ */ jsxs(
1399
- "span",
1400
- {
1401
- style: {
1402
- display: "inline-flex",
1403
- alignItems: "center",
1404
- gap: "6px",
1405
- color: theme2.colors.textSecondary,
1406
- fontFamily: theme2.fonts.monospace,
1407
- fontSize: theme2.fontSizes[0]
1408
- },
1409
- children: [
1410
- /* @__PURE__ */ jsx(GitBranch, { size: 14 }),
1411
- ((_b = pr.head) == null ? void 0 : _b.ref) ?? "unknown",
1412
- " → ",
1413
- ((_c = pr.base) == null ? void 0 : _c.ref) ?? "unknown"
1414
- ]
1415
- }
1416
- ),
1417
- pr.body && /* @__PURE__ */ jsx(
1418
- "div",
1419
- {
1420
- style: {
1421
- color: theme2.colors.textSecondary,
1422
- fontFamily: theme2.fonts.body,
1423
- fontSize: theme2.fontSizes[1],
1424
- lineHeight: 1.5,
1425
- wordBreak: "break-word"
1426
- },
1427
- children: pr.body
1428
- }
1429
- )
1430
- ]
1431
- }
1432
1134
  )
1433
1135
  ]
1434
1136
  }
@@ -45605,7 +45307,6 @@ const GitPullRequestDetailPanelContent = ({
45605
45307
  textTransform: "uppercase"
45606
45308
  },
45607
45309
  children: [
45608
- isMerged ? /* @__PURE__ */ jsx(GitMerge, { size: 12 }) : /* @__PURE__ */ jsx(GitPullRequest, { size: 12 }),
45609
45310
  statusLabel,
45610
45311
  selectedPR.draft && /* @__PURE__ */ jsx(
45611
45312
  "span",
@@ -45634,14 +45335,40 @@ const GitPullRequestDetailPanelContent = ({
45634
45335
  alignItems: "center",
45635
45336
  gap: "6px",
45636
45337
  color: theme2.colors.textSecondary,
45637
- fontFamily: theme2.fonts.monospace,
45638
45338
  fontSize: theme2.fontSizes[0]
45639
45339
  },
45640
45340
  children: [
45641
- /* @__PURE__ */ jsx(GitBranch, { size: 14 }),
45642
- ((_a = selectedPR.base) == null ? void 0 : _a.ref) ?? "?",
45643
- " ",
45644
- ((_b = selectedPR.head) == null ? void 0 : _b.ref) ?? "?"
45341
+ isOpen && /* @__PURE__ */ jsx("span", { style: { fontFamily: theme2.fonts.body }, children: "on" }),
45342
+ /* @__PURE__ */ jsx("span", { style: { fontFamily: theme2.fonts.monospace, color: theme2.colors.primary }, children: ((_a = selectedPR.head) == null ? void 0 : _a.ref) ?? "?" }),
45343
+ /* @__PURE__ */ jsx("span", { style: { fontFamily: theme2.fonts.body }, children: isOpen ? "merging into" : "into" }),
45344
+ /* @__PURE__ */ jsx("span", { style: { fontFamily: theme2.fonts.monospace, color: theme2.colors.primary }, children: ((_b = selectedPR.base) == null ? void 0 : _b.ref) ?? "?" })
45345
+ ]
45346
+ }
45347
+ ),
45348
+ !isOpen && /* @__PURE__ */ jsx(
45349
+ "span",
45350
+ {
45351
+ style: {
45352
+ color: theme2.colors.textSecondary,
45353
+ fontSize: theme2.fontSizes[0],
45354
+ fontFamily: theme2.fonts.body
45355
+ },
45356
+ children: formatDate(selectedPR.merged_at || selectedPR.closed_at || selectedPR.updated_at)
45357
+ }
45358
+ ),
45359
+ totalComments > 0 && /* @__PURE__ */ jsxs(
45360
+ "span",
45361
+ {
45362
+ style: {
45363
+ display: "inline-flex",
45364
+ alignItems: "center",
45365
+ gap: "4px",
45366
+ color: theme2.colors.textSecondary,
45367
+ fontSize: theme2.fontSizes[0]
45368
+ },
45369
+ children: [
45370
+ /* @__PURE__ */ jsx(MessageSquare, { size: 12 }),
45371
+ totalComments
45645
45372
  ]
45646
45373
  }
45647
45374
  ),
@@ -45718,40 +45445,6 @@ const GitPullRequestDetailPanelContent = ({
45718
45445
  children: selectedPR.title
45719
45446
  }
45720
45447
  ),
45721
- (totalComments > 0 || !isOpen) && /* @__PURE__ */ jsxs(
45722
- "div",
45723
- {
45724
- style: {
45725
- display: "flex",
45726
- gap: "16px",
45727
- marginBottom: "20px",
45728
- padding: "12px",
45729
- backgroundColor: theme2.colors.backgroundSecondary,
45730
- borderRadius: "8px",
45731
- border: `1px solid ${theme2.colors.border}`
45732
- },
45733
- children: [
45734
- totalComments > 0 && /* @__PURE__ */ jsx(
45735
- MetadataRow,
45736
- {
45737
- icon: /* @__PURE__ */ jsx(MessageSquare, { size: 14 }),
45738
- label: "Comments",
45739
- value: String(totalComments),
45740
- theme: theme2
45741
- }
45742
- ),
45743
- !isOpen && /* @__PURE__ */ jsx(
45744
- MetadataRow,
45745
- {
45746
- icon: isMerged ? /* @__PURE__ */ jsx(GitMerge, { size: 14 }) : /* @__PURE__ */ jsx(GitPullRequest, { size: 14 }),
45747
- label: isMerged ? "Merged" : "Closed",
45748
- value: formatDate(selectedPR.merged_at || selectedPR.closed_at || selectedPR.updated_at),
45749
- theme: theme2
45750
- }
45751
- )
45752
- ]
45753
- }
45754
- ),
45755
45448
  /* @__PURE__ */ jsx(
45756
45449
  "div",
45757
45450
  {
@@ -45788,39 +45481,7 @@ const GitPullRequestDetailPanelContent = ({
45788
45481
  )
45789
45482
  ] });
45790
45483
  };
45791
- const MetadataRow = ({ icon, label, value, mono, theme: theme2 }) => /* @__PURE__ */ jsxs(
45792
- "div",
45793
- {
45794
- style: {
45795
- display: "flex",
45796
- alignItems: "center",
45797
- gap: "8px",
45798
- fontFamily: theme2.fonts.body,
45799
- fontSize: theme2.fontSizes[0]
45800
- },
45801
- children: [
45802
- /* @__PURE__ */ jsx("span", { style: { color: theme2.colors.textMuted }, children: icon }),
45803
- /* @__PURE__ */ jsxs("span", { style: { color: theme2.colors.textSecondary }, children: [
45804
- label,
45805
- ":"
45806
- ] }),
45807
- /* @__PURE__ */ jsx(
45808
- "span",
45809
- {
45810
- style: {
45811
- color: theme2.colors.text,
45812
- fontFamily: mono ? theme2.fonts.monospace : theme2.fonts.body,
45813
- fontWeight: 500
45814
- },
45815
- children: value
45816
- }
45817
- )
45818
- ]
45819
- }
45820
- );
45821
- const GitPullRequestDetailPanel = (props) => {
45822
- return /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(GitPullRequestDetailPanelContent, { ...props }) });
45823
- };
45484
+ const GitPullRequestDetailPanel = GitPullRequestDetailPanelContent;
45824
45485
  const GitPullRequestDetailPanelPreview = () => {
45825
45486
  const { theme: theme2 } = useTheme();
45826
45487
  return /* @__PURE__ */ jsxs(