@industry-theme/git-panels 0.1.16 → 0.1.17

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 +1 @@
1
- {"version":3,"file":"GitCommitHistoryPanel.d.ts","sourceRoot":"","sources":["../../src/panels/GitCommitHistoryPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAG5D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAIpD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAwN/D,CAAC;AA0EF;;GAEG;AACH,eAAO,MAAM,4BAA4B,EAAE,KAAK,CAAC,EA+DhD,CAAC"}
1
+ {"version":3,"file":"GitCommitHistoryPanel.d.ts","sourceRoot":"","sources":["../../src/panels/GitCommitHistoryPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAG5D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAIpD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA0N/D,CAAC;AA0EF;;GAEG;AACH,eAAO,MAAM,4BAA4B,EAAE,KAAK,CAAC,EA+DhD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"GitPullRequestsPanel.d.ts","sourceRoot":"","sources":["../../src/panels/GitPullRequestsPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAU5D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAIpD;;;;;;;;;GASG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAuR9D,CAAC;AAqIF;;GAEG;AACH,eAAO,MAAM,2BAA2B,EAAE,KAAK,CAAC,EAkE/C,CAAC"}
1
+ {"version":3,"file":"GitPullRequestsPanel.d.ts","sourceRoot":"","sources":["../../src/panels/GitPullRequestsPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAS5D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAIpD;;;;;;;;;GASG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAoS9D,CAAC;AA6HF;;GAEG;AACH,eAAO,MAAM,2BAA2B,EAAE,KAAK,CAAC,EAkE/C,CAAC"}
@@ -101,19 +101,6 @@ const createLucideIcon = (iconName, iconNode) => {
101
101
  Component.displayName = toPascalCase(iconName);
102
102
  return Component;
103
103
  };
104
- /**
105
- * @license lucide-react v0.552.0 - ISC
106
- *
107
- * This source code is licensed under the ISC license.
108
- * See the LICENSE file in the root directory of this source tree.
109
- */
110
- const __iconNode$j = [
111
- ["path", { d: "M8 2v4", key: "1cmpym" }],
112
- ["path", { d: "M16 2v4", key: "4m81vk" }],
113
- ["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
114
- ["path", { d: "M3 10h18", key: "8toen8" }]
115
- ];
116
- const Calendar = createLucideIcon("calendar", __iconNode$j);
117
104
  /**
118
105
  * @license lucide-react v0.552.0 - ISC
119
106
  *
@@ -401,9 +388,12 @@ function formatDate(dateString) {
401
388
  if (diffDays === 0) return "Today";
402
389
  if (diffDays === 1) return "Yesterday";
403
390
  if (diffDays < 7) return `${diffDays} days ago`;
404
- if (diffDays < 30) return `${Math.floor(diffDays / 7)} weeks ago`;
405
- if (diffDays < 365) return `${Math.floor(diffDays / 30)} months ago`;
406
- return `${Math.floor(diffDays / 365)} years ago`;
391
+ const weeks = Math.floor(diffDays / 7);
392
+ if (diffDays < 30) return `${weeks} ${weeks === 1 ? "week" : "weeks"} ago`;
393
+ const months = Math.floor(diffDays / 30);
394
+ if (diffDays < 365) return `${months} ${months === 1 ? "month" : "months"} ago`;
395
+ const years = Math.floor(diffDays / 365);
396
+ return `${years} ${years === 1 ? "year" : "years"} ago`;
407
397
  }
408
398
  const GitCommitHistoryPanel = ({
409
399
  context,
@@ -481,65 +471,67 @@ const GitCommitHistoryPanel = ({
481
471
  }
482
472
  return /* @__PURE__ */ jsxs("div", { style: containerStyle, children: [
483
473
  /* @__PURE__ */ jsx("style", { children: `.hide-scrollbar::-webkit-scrollbar { display: none; }` }),
484
- /* @__PURE__ */ jsxs(
474
+ /* @__PURE__ */ jsx(
485
475
  "div",
486
476
  {
487
477
  style: {
478
+ position: "relative",
488
479
  height: "40px",
489
- minHeight: "40px",
490
- padding: "0 12px",
491
- borderBottom: `1px solid ${theme2.colors.border}`,
492
- backgroundColor: theme2.colors.background,
480
+ padding: "0 16px",
493
481
  display: "flex",
494
- alignItems: "center",
495
- justifyContent: "space-between",
482
+ flexDirection: "column",
483
+ justifyContent: "center",
484
+ borderBottom: `1px solid ${theme2.colors.border}`,
485
+ backgroundColor: theme2.colors.backgroundLight,
496
486
  boxSizing: "border-box"
497
487
  },
498
- children: [
499
- /* @__PURE__ */ jsx(
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: "Commit History"
513
- }
514
- ),
515
- /* @__PURE__ */ jsxs(
516
- "button",
517
- {
518
- type: "button",
519
- onClick: handleRefresh,
520
- disabled: isLoading,
521
- style: {
522
- display: "inline-flex",
523
- alignItems: "center",
524
- gap: "6px",
525
- padding: "4px 10px",
526
- borderRadius: "4px",
527
- border: `1px solid ${theme2.colors.border}`,
528
- backgroundColor: theme2.colors.background,
529
- color: theme2.colors.text,
530
- cursor: isLoading ? "default" : "pointer",
531
- fontFamily: theme2.fonts.body,
532
- fontSize: theme2.fontSizes[0],
533
- fontWeight: 500,
534
- opacity: isLoading ? 0.7 : 1
535
- },
536
- children: [
537
- /* @__PURE__ */ jsx(RefreshCcw, { size: 12 }),
538
- isLoading ? "Refreshing..." : "Refresh"
539
- ]
540
- }
541
- )
542
- ]
488
+ children: /* @__PURE__ */ jsxs(
489
+ "div",
490
+ {
491
+ style: {
492
+ display: "flex",
493
+ alignItems: "center",
494
+ justifyContent: "space-between"
495
+ },
496
+ children: [
497
+ /* @__PURE__ */ jsx(
498
+ "span",
499
+ {
500
+ style: {
501
+ fontFamily: theme2.fonts.body,
502
+ fontSize: theme2.fontSizes[1],
503
+ color: theme2.colors.textSecondary,
504
+ fontWeight: 500
505
+ },
506
+ children: "Commit History"
507
+ }
508
+ ),
509
+ /* @__PURE__ */ jsx(
510
+ "button",
511
+ {
512
+ type: "button",
513
+ onClick: handleRefresh,
514
+ disabled: isLoading,
515
+ style: {
516
+ background: "none",
517
+ border: "1px solid transparent",
518
+ borderRadius: "4px",
519
+ cursor: isLoading ? "default" : "pointer",
520
+ padding: "4px",
521
+ display: "flex",
522
+ alignItems: "center",
523
+ justifyContent: "center",
524
+ color: theme2.colors.textSecondary,
525
+ opacity: isLoading ? 0.7 : 1,
526
+ transition: "all 0.2s ease"
527
+ },
528
+ title: isLoading ? "Refreshing..." : "Refresh",
529
+ children: /* @__PURE__ */ jsx(RefreshCcw, { size: 16 })
530
+ }
531
+ )
532
+ ]
533
+ }
534
+ )
543
535
  }
544
536
  ),
545
537
  /* @__PURE__ */ jsxs(
@@ -670,7 +662,7 @@ const CommitCard = ({ commit, theme: theme2, isSelected, onClick }) => {
670
662
  /* @__PURE__ */ jsx("span", { title: new Date(commit.date).toLocaleString(), children: relative }),
671
663
  commit.author && /* @__PURE__ */ jsxs("span", { children: [
672
664
  "by ",
673
- commit.author
665
+ /* @__PURE__ */ jsx("span", { style: { color: theme2.colors.primary }, children: commit.author })
674
666
  ] })
675
667
  ]
676
668
  }
@@ -731,7 +723,7 @@ const GitCommitHistoryPanelPreview = () => {
731
723
  fontFamily: theme2.fonts.body
732
724
  },
733
725
  children: [
734
- /* @__PURE__ */ jsx("span", { children: commit.author }),
726
+ /* @__PURE__ */ jsx("span", { style: { color: theme2.colors.primary }, children: commit.author }),
735
727
  /* @__PURE__ */ jsx("span", { children: "•" }),
736
728
  /* @__PURE__ */ jsx("span", { style: { fontFamily: theme2.fonts.monospace }, children: commit.sha }),
737
729
  /* @__PURE__ */ jsx("span", { children: "•" }),
@@ -45282,93 +45274,100 @@ const GitPullRequestsPanel = ({
45282
45274
  }
45283
45275
  return /* @__PURE__ */ jsxs("div", { style: containerStyle, children: [
45284
45276
  /* @__PURE__ */ jsx("style", { children: `.hide-scrollbar::-webkit-scrollbar { display: none; }` }),
45285
- /* @__PURE__ */ jsxs(
45277
+ /* @__PURE__ */ jsx(
45286
45278
  "div",
45287
45279
  {
45288
45280
  style: {
45281
+ position: "relative",
45289
45282
  height: "40px",
45290
- minHeight: "40px",
45291
- padding: "0 12px",
45292
- borderBottom: `1px solid ${theme2.colors.border}`,
45293
- backgroundColor: theme2.colors.background,
45283
+ padding: "0 16px",
45294
45284
  display: "flex",
45295
- alignItems: "center",
45296
- justifyContent: "space-between",
45285
+ flexDirection: "column",
45286
+ justifyContent: "center",
45287
+ borderBottom: `1px solid ${theme2.colors.border}`,
45288
+ backgroundColor: theme2.colors.backgroundLight,
45297
45289
  boxSizing: "border-box"
45298
45290
  },
45299
- children: [
45300
- /* @__PURE__ */ jsx(
45301
- "div",
45302
- {
45303
- style: {
45304
- display: "flex",
45305
- alignItems: "center",
45306
- gap: "8px",
45307
- color: theme2.colors.textSecondary,
45308
- fontFamily: theme2.fonts.heading,
45309
- fontSize: theme2.fontSizes[0],
45310
- fontWeight: 600,
45311
- textTransform: "uppercase"
45312
- },
45313
- children: "Open Pull Requests"
45314
- }
45315
- ),
45316
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
45317
- draftCount > 0 && /* @__PURE__ */ jsxs(
45318
- "button",
45319
- {
45320
- type: "button",
45321
- onClick: () => setShowDrafts(!showDrafts),
45322
- style: {
45323
- display: "inline-flex",
45324
- alignItems: "center",
45325
- gap: "6px",
45326
- padding: "4px 10px",
45327
- borderRadius: "4px",
45328
- border: `1px solid ${showDrafts ? theme2.colors.primary : theme2.colors.border}`,
45329
- backgroundColor: showDrafts ? `${theme2.colors.primary}15` : theme2.colors.background,
45330
- color: showDrafts ? theme2.colors.primary : theme2.colors.textSecondary,
45331
- cursor: "pointer",
45332
- fontFamily: theme2.fonts.body,
45333
- fontSize: theme2.fontSizes[0],
45334
- fontWeight: 500
45335
- },
45336
- children: [
45337
- "Drafts (",
45338
- draftCount,
45339
- ")"
45340
- ]
45341
- }
45342
- ),
45343
- /* @__PURE__ */ jsxs(
45344
- "button",
45345
- {
45346
- type: "button",
45347
- onClick: handleRefresh,
45348
- disabled: isLoading,
45349
- style: {
45350
- display: "inline-flex",
45351
- alignItems: "center",
45352
- gap: "6px",
45353
- padding: "4px 10px",
45354
- borderRadius: "4px",
45355
- border: `1px solid ${theme2.colors.border}`,
45356
- backgroundColor: theme2.colors.background,
45357
- color: theme2.colors.text,
45358
- cursor: isLoading ? "default" : "pointer",
45359
- fontFamily: theme2.fonts.body,
45360
- fontSize: theme2.fontSizes[0],
45361
- fontWeight: 500,
45362
- opacity: isLoading ? 0.7 : 1
45363
- },
45364
- children: [
45365
- isLoading ? /* @__PURE__ */ jsx(LoaderCircle, { size: 12, className: "spin" }) : /* @__PURE__ */ jsx(RefreshCcw, { size: 12 }),
45366
- isLoading ? "Refreshing..." : "Refresh"
45367
- ]
45368
- }
45369
- )
45370
- ] })
45371
- ]
45291
+ children: /* @__PURE__ */ jsxs(
45292
+ "div",
45293
+ {
45294
+ style: {
45295
+ display: "flex",
45296
+ alignItems: "center",
45297
+ justifyContent: "space-between"
45298
+ },
45299
+ children: [
45300
+ /* @__PURE__ */ jsx(
45301
+ "div",
45302
+ {
45303
+ style: {
45304
+ display: "flex",
45305
+ alignItems: "center",
45306
+ gap: "8px"
45307
+ },
45308
+ children: /* @__PURE__ */ jsx(
45309
+ "span",
45310
+ {
45311
+ style: {
45312
+ fontFamily: theme2.fonts.body,
45313
+ fontSize: theme2.fontSizes[1],
45314
+ color: theme2.colors.textSecondary,
45315
+ fontWeight: 500
45316
+ },
45317
+ children: "Open Pull Requests"
45318
+ }
45319
+ )
45320
+ }
45321
+ ),
45322
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
45323
+ draftCount > 0 && /* @__PURE__ */ jsx(
45324
+ "button",
45325
+ {
45326
+ type: "button",
45327
+ onClick: () => setShowDrafts(!showDrafts),
45328
+ style: {
45329
+ background: showDrafts ? theme2.colors.backgroundSecondary : "none",
45330
+ border: `1px solid ${showDrafts ? theme2.colors.border : "transparent"}`,
45331
+ borderRadius: "4px",
45332
+ cursor: "pointer",
45333
+ padding: "4px 8px",
45334
+ color: showDrafts ? theme2.colors.primary : theme2.colors.textSecondary,
45335
+ fontSize: theme2.fontSizes[0],
45336
+ fontFamily: theme2.fonts.body,
45337
+ fontWeight: 500,
45338
+ transition: "all 0.2s ease"
45339
+ },
45340
+ title: showDrafts ? "Hide draft PRs" : "Show draft PRs",
45341
+ children: "Drafts"
45342
+ }
45343
+ ),
45344
+ /* @__PURE__ */ jsx(
45345
+ "button",
45346
+ {
45347
+ type: "button",
45348
+ onClick: handleRefresh,
45349
+ disabled: isLoading,
45350
+ style: {
45351
+ background: "none",
45352
+ border: "1px solid transparent",
45353
+ borderRadius: "4px",
45354
+ cursor: isLoading ? "default" : "pointer",
45355
+ padding: "4px",
45356
+ display: "flex",
45357
+ alignItems: "center",
45358
+ justifyContent: "center",
45359
+ color: theme2.colors.textSecondary,
45360
+ opacity: isLoading ? 0.7 : 1,
45361
+ transition: "all 0.2s ease"
45362
+ },
45363
+ title: isLoading ? "Refreshing..." : "Refresh",
45364
+ children: isLoading ? /* @__PURE__ */ jsx(LoaderCircle, { size: 16, className: "spin" }) : /* @__PURE__ */ jsx(RefreshCcw, { size: 16 })
45365
+ }
45366
+ )
45367
+ ] })
45368
+ ]
45369
+ }
45370
+ )
45372
45371
  }
45373
45372
  ),
45374
45373
  /* @__PURE__ */ jsx(
@@ -45497,23 +45496,9 @@ const PullRequestCard = ({ pr, theme: theme2, isSelected, onClick }) => {
45497
45496
  ),
45498
45497
  /* @__PURE__ */ jsxs("span", { children: [
45499
45498
  "by ",
45500
- ((_a = pr.user) == null ? void 0 : _a.login) ?? "unknown"
45499
+ /* @__PURE__ */ jsx("span", { style: { color: theme2.colors.primary }, children: ((_a = pr.user) == null ? void 0 : _a.login) ?? "unknown" })
45501
45500
  ] }),
45502
- /* @__PURE__ */ jsxs(
45503
- "span",
45504
- {
45505
- style: {
45506
- display: "inline-flex",
45507
- alignItems: "center",
45508
- gap: "4px"
45509
- },
45510
- children: [
45511
- /* @__PURE__ */ jsx(Calendar, { size: 12 }),
45512
- " ",
45513
- formatDate(pr.created_at)
45514
- ]
45515
- }
45516
- ),
45501
+ /* @__PURE__ */ jsx("span", { children: formatDate(pr.created_at) }),
45517
45502
  !isOpen && /* @__PURE__ */ jsxs(
45518
45503
  "span",
45519
45504
  {