gh-manager-cli 1.40.1 → 1.41.0

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.
package/dist/index.js CHANGED
@@ -34,7 +34,7 @@ var require_package = __commonJS({
34
34
  "package.json"(exports, module) {
35
35
  module.exports = {
36
36
  name: "gh-manager-cli",
37
- version: "1.40.1",
37
+ version: "1.41.0",
38
38
  private: false,
39
39
  description: "TUI terminal app to manage GitHub repos. Clean up your account in 5 minutes. Archive, delete, rename repos with keyboard shortcuts. Alternative to clicking through github.com",
40
40
  license: "MIT",
@@ -157,7 +157,7 @@ import { render, Box as Box23, Text as Text24 } from "ink";
157
157
  import "dotenv/config";
158
158
 
159
159
  // src/ui/App.tsx
160
- import { useEffect as useEffect13, useMemo as useMemo2, useState as useState18 } from "react";
160
+ import { useEffect as useEffect13, useMemo as useMemo3, useState as useState18 } from "react";
161
161
  import { Box as Box22, Text as Text23, useApp as useApp2, useStdout as useStdout2, useInput as useInput18 } from "ink";
162
162
  import TextInput6 from "ink-text-input";
163
163
 
@@ -407,10 +407,126 @@ async function openGitHubAuthorizationPage() {
407
407
  }
408
408
 
409
409
  // src/ui/views/RepoList.tsx
410
- import React16, { useEffect as useEffect12, useMemo, useState as useState16, useRef, useCallback } from "react";
410
+ import React16, { useEffect as useEffect12, useMemo as useMemo2, useState as useState16, useRef, useCallback } from "react";
411
411
  import { Box as Box19, Text as Text20, useApp, useInput as useInput16, useStdout } from "ink";
412
412
  import TextInput5 from "ink-text-input";
413
- import chalk14 from "chalk";
413
+ import chalk15 from "chalk";
414
+
415
+ // src/config/themes.ts
416
+ var THEMES = {
417
+ default: {
418
+ name: "default",
419
+ label: "Default",
420
+ primary: "cyan",
421
+ secondary: "blue",
422
+ success: "green",
423
+ warning: "yellow",
424
+ error: "red",
425
+ muted: "gray",
426
+ text: "white",
427
+ selected: "cyan",
428
+ private: "yellow",
429
+ archived: "gray",
430
+ internal: "magenta",
431
+ fork: "blue",
432
+ dim: "gray"
433
+ },
434
+ ocean: {
435
+ name: "ocean",
436
+ label: "Ocean",
437
+ primary: "blueBright",
438
+ secondary: "cyan",
439
+ success: "greenBright",
440
+ warning: "yellowBright",
441
+ error: "redBright",
442
+ muted: "blue",
443
+ text: "whiteBright",
444
+ selected: "blueBright",
445
+ private: "cyan",
446
+ archived: "blue",
447
+ internal: "magenta",
448
+ fork: "cyanBright",
449
+ dim: "blue"
450
+ },
451
+ forest: {
452
+ name: "forest",
453
+ label: "Forest",
454
+ primary: "green",
455
+ secondary: "greenBright",
456
+ success: "greenBright",
457
+ warning: "yellow",
458
+ error: "red",
459
+ muted: "gray",
460
+ text: "white",
461
+ selected: "green",
462
+ private: "yellow",
463
+ archived: "gray",
464
+ internal: "magenta",
465
+ fork: "greenBright",
466
+ dim: "gray"
467
+ },
468
+ monochrome: {
469
+ name: "monochrome",
470
+ label: "Monochrome",
471
+ primary: "white",
472
+ secondary: "whiteBright",
473
+ success: "whiteBright",
474
+ warning: "white",
475
+ error: "white",
476
+ muted: "gray",
477
+ text: "white",
478
+ selected: "whiteBright",
479
+ private: "white",
480
+ archived: "gray",
481
+ internal: "white",
482
+ fork: "white",
483
+ dim: "gray"
484
+ }
485
+ };
486
+ var THEME_ORDER = ["default", "ocean", "forest", "monochrome"];
487
+ function getTheme(name) {
488
+ return THEMES[name] ?? THEMES.default;
489
+ }
490
+ function nextTheme(current) {
491
+ const idx = THEME_ORDER.indexOf(current);
492
+ return THEME_ORDER[(idx + 1) % THEME_ORDER.length];
493
+ }
494
+
495
+ // src/ui/hooks/useTheme.ts
496
+ import { useMemo } from "react";
497
+ import chalk from "chalk";
498
+ function chalkFor(color) {
499
+ return chalk[color] ?? chalk.white;
500
+ }
501
+ function bgChalkFor(color) {
502
+ const bgKey = "bg" + color.charAt(0).toUpperCase() + color.slice(1);
503
+ return chalk[bgKey] ?? chalk.bgWhite;
504
+ }
505
+ function useTheme(name) {
506
+ return useMemo(() => {
507
+ const theme = getTheme(name);
508
+ const c = {
509
+ primary: chalkFor(theme.primary),
510
+ secondary: chalkFor(theme.secondary),
511
+ success: chalkFor(theme.success),
512
+ warning: chalkFor(theme.warning),
513
+ error: chalkFor(theme.error),
514
+ muted: chalkFor(theme.muted),
515
+ text: chalkFor(theme.text),
516
+ selected: chalkFor(theme.selected),
517
+ private: chalkFor(theme.private),
518
+ archived: chalkFor(theme.archived),
519
+ internal: chalkFor(theme.internal),
520
+ fork: chalkFor(theme.fork),
521
+ dim: chalkFor(theme.dim),
522
+ arrow: bgChalkFor(theme.primary).black,
523
+ arrowMuted: bgChalkFor(theme.muted).whiteBright,
524
+ btnPrimary: bgChalkFor(theme.primary).black.bold,
525
+ btnMuted: chalk.bgGray.white.bold
526
+ };
527
+ return { theme, c };
528
+ }, [name]);
529
+ }
414
530
 
415
531
  // src/services/apolloMeta.ts
416
532
  import fs2 from "fs";
@@ -473,7 +589,7 @@ import { exec } from "child_process";
473
589
  // src/ui/OrgSwitcher.tsx
474
590
  import { useEffect, useState } from "react";
475
591
  import { Box, Text, useInput } from "ink";
476
- import chalk from "chalk";
592
+ import chalk2 from "chalk";
477
593
  import { jsx, jsxs } from "react/jsx-runtime";
478
594
  function OrgSwitcher({ token, currentContext, onSelect, onClose }) {
479
595
  const [organizations, setOrganizations] = useState([]);
@@ -560,12 +676,12 @@ function OrgSwitcher({ token, currentContext, onSelect, onClose }) {
560
676
  refreshing && /* @__PURE__ */ jsx(Text, { color: "yellow", children: "(Refreshing...)" })
561
677
  ] }),
562
678
  loading && !refreshing ? /* @__PURE__ */ jsx(Text, { color: "yellow", children: "Loading..." }) : error ? /* @__PURE__ */ jsx(Text, { color: "red", children: error }) : /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginTop: 1, children: [
563
- /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(Text, { children: cursor === 0 ? chalk.bgCyan.black(" \u2192 ") + " " + chalk.bold("Personal Account") + (isPersonalContext ? chalk.green(" \u2713") : "") : " " + chalk.gray("Personal Account") + (isPersonalContext ? chalk.green(" \u2713") : "") }) }),
679
+ /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(Text, { children: cursor === 0 ? chalk2.bgCyan.black(" \u2192 ") + " " + chalk2.bold("Personal Account") + (isPersonalContext ? chalk2.green(" \u2713") : "") : " " + chalk2.gray("Personal Account") + (isPersonalContext ? chalk2.green(" \u2713") : "") }) }),
564
680
  organizations.map((org, index) => {
565
681
  const isEnterprise = enterpriseOrgs.has(org.login);
566
682
  const isCurrent = cursor === index + 1;
567
683
  const isActiveContext = !isPersonalContext && currentContext.login === org.login;
568
- return /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(Text, { children: isCurrent ? chalk.bgCyan.black(" \u2192 ") + " " + chalk.bold(org.name || org.login) + (isEnterprise ? chalk.yellow(" (ENT)") : "") + chalk.gray(` (@${org.login})`) + (isActiveContext ? chalk.green(" \u2713") : "") : " " + chalk.gray(org.name || org.login) + (isEnterprise ? chalk.gray(" (ENT)") : "") + chalk.gray(` (@${org.login})`) + (isActiveContext ? chalk.green(" \u2713") : "") }) }, org.id);
684
+ return /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(Text, { children: isCurrent ? chalk2.bgCyan.black(" \u2192 ") + " " + chalk2.bold(org.name || org.login) + (isEnterprise ? chalk2.yellow(" (ENT)") : "") + chalk2.gray(` (@${org.login})`) + (isActiveContext ? chalk2.green(" \u2713") : "") : " " + chalk2.gray(org.name || org.login) + (isEnterprise ? chalk2.gray(" (ENT)") : "") + chalk2.gray(` (@${org.login})`) + (isActiveContext ? chalk2.green(" \u2713") : "") }) }, org.id);
569
685
  }),
570
686
  organizations.length === 0 && /* @__PURE__ */ jsx(Text, { color: "gray", dimColor: true, children: "No organisations found" })
571
687
  ] }),
@@ -584,13 +700,15 @@ function OrgSwitcher({ token, currentContext, onSelect, onClose }) {
584
700
  // src/ui/components/modals/ArchiveFilterModal.tsx
585
701
  import { useState as useState2, useEffect as useEffect2 } from "react";
586
702
  import { Box as Box2, Text as Text2, useInput as useInput2 } from "ink";
587
- import chalk2 from "chalk";
703
+ import chalk3 from "chalk";
588
704
  import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
589
705
  function ArchiveFilterModal({
590
706
  currentFilter,
591
707
  onSelect,
592
- onCancel
708
+ onCancel,
709
+ theme: themeProp
593
710
  }) {
711
+ const { theme, c } = useTheme(themeProp?.name ?? "default");
594
712
  const options = ["all", "unarchived", "archived"];
595
713
  const [focusedOption, setFocusedOption] = useState2(currentFilter);
596
714
  useEffect2(() => {
@@ -603,8 +721,7 @@ function ArchiveFilterModal({
603
721
  }
604
722
  if (key.leftArrow || key.upArrow) {
605
723
  if (focusedOption === "cancel") {
606
- const lastIndex = options.length - 1;
607
- setFocusedOption(options[lastIndex]);
724
+ setFocusedOption(options[options.length - 1]);
608
725
  } else {
609
726
  const idx = options.indexOf(focusedOption);
610
727
  if (idx > 0) setFocusedOption(options[idx - 1]);
@@ -613,11 +730,8 @@ function ArchiveFilterModal({
613
730
  if (key.rightArrow || key.downArrow) {
614
731
  if (focusedOption !== "cancel") {
615
732
  const idx = options.indexOf(focusedOption);
616
- if (idx < options.length - 1) {
617
- setFocusedOption(options[idx + 1]);
618
- } else {
619
- setFocusedOption("cancel");
620
- }
733
+ if (idx < options.length - 1) setFocusedOption(options[idx + 1]);
734
+ else setFocusedOption("cancel");
621
735
  }
622
736
  }
623
737
  if (key.tab) {
@@ -625,19 +739,13 @@ function ArchiveFilterModal({
625
739
  setFocusedOption(options[0]);
626
740
  } else {
627
741
  const idx = options.indexOf(focusedOption);
628
- if (idx < options.length - 1) {
629
- setFocusedOption(options[idx + 1]);
630
- } else {
631
- setFocusedOption("cancel");
632
- }
742
+ if (idx < options.length - 1) setFocusedOption(options[idx + 1]);
743
+ else setFocusedOption("cancel");
633
744
  }
634
745
  }
635
746
  if (key.return) {
636
- if (focusedOption === "cancel") {
637
- onCancel();
638
- } else {
639
- onSelect(focusedOption);
640
- }
747
+ if (focusedOption === "cancel") onCancel();
748
+ else onSelect(focusedOption);
641
749
  }
642
750
  if (input) {
643
751
  const u = input.toUpperCase();
@@ -656,24 +764,24 @@ function ArchiveFilterModal({
656
764
  return "Archived Only";
657
765
  }
658
766
  };
659
- const getColor = (filter) => {
660
- if (filter === currentFilter) return "green";
661
- return focusedOption === filter ? "cyan" : "gray";
767
+ const getOptionChalk = (filter) => {
768
+ if (filter === currentFilter) return c.success;
769
+ return focusedOption === filter ? c.primary : c.muted;
662
770
  };
663
- return /* @__PURE__ */ jsxs2(Box2, { flexDirection: "column", borderStyle: "round", borderColor: "cyan", paddingX: 2, paddingY: 1, width: 45, children: [
771
+ return /* @__PURE__ */ jsxs2(Box2, { flexDirection: "column", borderStyle: "round", borderColor: theme.primary, paddingX: 2, paddingY: 1, width: 45, children: [
664
772
  /* @__PURE__ */ jsx2(Text2, { bold: true, children: "Archive Filter" }),
665
773
  /* @__PURE__ */ jsxs2(Box2, { flexDirection: "column", marginTop: 1, children: [
666
774
  options.map((option) => /* @__PURE__ */ jsx2(Box2, { paddingX: 1, children: /* @__PURE__ */ jsxs2(Text2, { children: [
667
- focusedOption === option ? chalk2.bgCyan.black(" \u2192 ") : " ",
668
- focusedOption === option ? chalk2[getColor(option)].bold(getLabel(option)) : chalk2[getColor(option)](getLabel(option)),
669
- option === currentFilter && chalk2.green(" \u2713")
775
+ focusedOption === option ? c.arrow(" \u2192 ") : " ",
776
+ focusedOption === option ? getOptionChalk(option).bold(getLabel(option)) : getOptionChalk(option)(getLabel(option)),
777
+ option === currentFilter && c.success(" \u2713")
670
778
  ] }) }, option)),
671
779
  /* @__PURE__ */ jsx2(Box2, { paddingX: 1, children: /* @__PURE__ */ jsxs2(Text2, { children: [
672
- focusedOption === "cancel" ? chalk2.bgWhite.black(" \u2192 ") : " ",
673
- focusedOption === "cancel" ? chalk2.white.bold("Cancel") : chalk2.gray("Cancel")
780
+ focusedOption === "cancel" ? c.arrowMuted(" \u2192 ") : " ",
781
+ focusedOption === "cancel" ? chalk3.white.bold("Cancel") : c.muted("Cancel")
674
782
  ] }) })
675
783
  ] }),
676
- /* @__PURE__ */ jsx2(Box2, { marginTop: 1, children: /* @__PURE__ */ jsx2(Text2, { color: "gray", dimColor: true, children: "\u2191\u2193/Enter \u2022 L All \u2022 U Unarchived \u2022 R Archived \u2022 Esc" }) })
784
+ /* @__PURE__ */ jsx2(Box2, { marginTop: 1, children: /* @__PURE__ */ jsx2(Text2, { color: theme.muted, dimColor: true, children: "\u2191\u2193/Enter \u2022 L All \u2022 U Unarchived \u2022 R Archived \u2022 Esc" }) })
677
785
  ] });
678
786
  }
679
787
 
@@ -681,7 +789,7 @@ function ArchiveFilterModal({
681
789
  import { useState as useState4, useEffect as useEffect4 } from "react";
682
790
  import { Box as Box3, Text as Text4, useInput as useInput3 } from "ink";
683
791
  import TextInput from "ink-text-input";
684
- import chalk3 from "chalk";
792
+ import chalk4 from "chalk";
685
793
 
686
794
  // src/ui/components/common/SlowSpinner.tsx
687
795
  import { useEffect as useEffect3, useState as useState3 } from "react";
@@ -705,18 +813,18 @@ import { Fragment, jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
705
813
  // src/ui/components/modals/ArchiveModal.tsx
706
814
  import { useState as useState5 } from "react";
707
815
  import { Box as Box4, Text as Text5, useInput as useInput4 } from "ink";
708
- import chalk4 from "chalk";
816
+ import chalk5 from "chalk";
709
817
  import { Fragment as Fragment2, jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
710
818
 
711
819
  // src/ui/components/modals/SyncModal.tsx
712
820
  import { useState as useState6 } from "react";
713
821
  import { Box as Box5, Text as Text6, useInput as useInput5 } from "ink";
714
- import chalk5 from "chalk";
822
+ import chalk6 from "chalk";
715
823
  import { Fragment as Fragment3, jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
716
824
 
717
825
  // src/ui/components/modals/InfoModal.tsx
718
826
  import { Box as Box6, Text as Text7, useInput as useInput6 } from "ink";
719
- import chalk6 from "chalk";
827
+ import chalk7 from "chalk";
720
828
 
721
829
  // src/lib/utils.ts
722
830
  function truncate(str, max = 80) {
@@ -836,20 +944,22 @@ import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
836
944
  // src/ui/components/modals/LogoutModal.tsx
837
945
  import { useState as useState7 } from "react";
838
946
  import { Box as Box7, Text as Text8, useInput as useInput7 } from "ink";
839
- import chalk7 from "chalk";
947
+ import chalk8 from "chalk";
840
948
  import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
841
949
 
842
950
  // src/ui/components/modals/VisibilityModal.tsx
843
951
  import { useState as useState8, useEffect as useEffect5 } from "react";
844
952
  import { Box as Box8, Text as Text9, useInput as useInput8 } from "ink";
845
- import chalk8 from "chalk";
953
+ import chalk9 from "chalk";
846
954
  import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
847
955
  function VisibilityModal({
848
956
  currentFilter,
849
957
  isEnterprise,
850
958
  onSelect,
851
- onCancel
959
+ onCancel,
960
+ theme: themeProp
852
961
  }) {
962
+ const { theme, c } = useTheme(themeProp?.name ?? "default");
853
963
  const options = ["all", "public", "private"];
854
964
  const [selectedIndex, setSelectedIndex] = useState8(0);
855
965
  const [focusedOption, setFocusedOption] = useState8("all");
@@ -912,13 +1022,9 @@ function VisibilityModal({
912
1022
  }
913
1023
  if (input) {
914
1024
  const upperInput = input.toUpperCase();
915
- if (upperInput === "A") {
916
- onSelect("all");
917
- } else if (upperInput === "P") {
918
- onSelect("public");
919
- } else if (upperInput === "R") {
920
- onSelect("private");
921
- }
1025
+ if (upperInput === "A") onSelect("all");
1026
+ else if (upperInput === "P") onSelect("public");
1027
+ else if (upperInput === "R") onSelect("private");
922
1028
  }
923
1029
  });
924
1030
  const getButtonLabel = (filter) => {
@@ -931,39 +1037,39 @@ function VisibilityModal({
931
1037
  return isEnterprise ? "Private/Internal" : "Private Only";
932
1038
  }
933
1039
  };
934
- const getButtonColor = (filter) => {
935
- if (filter === currentFilter) {
936
- return "green";
937
- }
938
- return focusedOption === filter ? "cyan" : "gray";
1040
+ const getOptionChalk = (filter) => {
1041
+ if (filter === currentFilter) return c.success;
1042
+ return focusedOption === filter ? c.primary : c.muted;
939
1043
  };
940
- return /* @__PURE__ */ jsxs8(Box8, { flexDirection: "column", borderStyle: "round", borderColor: "cyan", paddingX: 2, paddingY: 1, width: 45, children: [
1044
+ return /* @__PURE__ */ jsxs8(Box8, { flexDirection: "column", borderStyle: "round", borderColor: theme.primary, paddingX: 2, paddingY: 1, width: 45, children: [
941
1045
  /* @__PURE__ */ jsx9(Text9, { bold: true, children: "Visibility Filter" }),
942
1046
  /* @__PURE__ */ jsxs8(Box8, { flexDirection: "column", marginTop: 1, children: [
943
1047
  options.map((option) => /* @__PURE__ */ jsx9(Box8, { paddingX: 1, children: /* @__PURE__ */ jsxs8(Text9, { children: [
944
- focusedOption === option ? chalk8.bgCyan.black(" \u2192 ") : " ",
945
- focusedOption === option ? chalk8[getButtonColor(option)].bold(getButtonLabel(option)) : chalk8[getButtonColor(option)](getButtonLabel(option)),
946
- option === currentFilter && chalk8.green(" \u2713")
1048
+ focusedOption === option ? c.arrow(" \u2192 ") : " ",
1049
+ focusedOption === option ? getOptionChalk(option).bold(getButtonLabel(option)) : getOptionChalk(option)(getButtonLabel(option)),
1050
+ option === currentFilter && c.success(" \u2713")
947
1051
  ] }) }, option)),
948
1052
  /* @__PURE__ */ jsx9(Box8, { paddingX: 1, children: /* @__PURE__ */ jsxs8(Text9, { children: [
949
- focusedOption === "cancel" ? chalk8.bgWhite.black(" \u2192 ") : " ",
950
- focusedOption === "cancel" ? chalk8.white.bold("Cancel") : chalk8.gray("Cancel")
1053
+ focusedOption === "cancel" ? c.arrowMuted(" \u2192 ") : " ",
1054
+ focusedOption === "cancel" ? chalk9.white.bold("Cancel") : c.muted("Cancel")
951
1055
  ] }) })
952
1056
  ] }),
953
- /* @__PURE__ */ jsx9(Box8, { marginTop: 1, children: /* @__PURE__ */ jsx9(Text9, { color: "gray", dimColor: true, children: "\u2191\u2193/Enter \u2022 A/P/R \u2022 Esc" }) })
1057
+ /* @__PURE__ */ jsx9(Box8, { marginTop: 1, children: /* @__PURE__ */ jsx9(Text9, { color: theme.muted, dimColor: true, children: "\u2191\u2193/Enter \u2022 A/P/R \u2022 Esc" }) })
954
1058
  ] });
955
1059
  }
956
1060
 
957
1061
  // src/ui/components/modals/SortModal.tsx
958
1062
  import { useState as useState9, useEffect as useEffect6 } from "react";
959
1063
  import { Box as Box9, Text as Text10, useInput as useInput9 } from "ink";
960
- import chalk9 from "chalk";
1064
+ import chalk10 from "chalk";
961
1065
  import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
962
1066
  function SortModal({
963
1067
  currentSort,
964
1068
  onSelect,
965
- onCancel
1069
+ onCancel,
1070
+ theme: themeProp
966
1071
  }) {
1072
+ const { theme, c } = useTheme(themeProp?.name ?? "default");
967
1073
  const options = ["updated", "pushed", "name", "stars"];
968
1074
  const [selectedIndex, setSelectedIndex] = useState9(0);
969
1075
  const [focusedOption, setFocusedOption] = useState9("updated");
@@ -1026,15 +1132,10 @@ function SortModal({
1026
1132
  }
1027
1133
  if (input) {
1028
1134
  const upperInput = input.toUpperCase();
1029
- if (upperInput === "U") {
1030
- onSelect("updated");
1031
- } else if (upperInput === "P") {
1032
- onSelect("pushed");
1033
- } else if (upperInput === "N") {
1034
- onSelect("name");
1035
- } else if (upperInput === "S") {
1036
- onSelect("stars");
1037
- }
1135
+ if (upperInput === "U") onSelect("updated");
1136
+ else if (upperInput === "P") onSelect("pushed");
1137
+ else if (upperInput === "N") onSelect("name");
1138
+ else if (upperInput === "S") onSelect("stars");
1038
1139
  }
1039
1140
  });
1040
1141
  const getButtonLabel = (sort) => {
@@ -1049,52 +1150,40 @@ function SortModal({
1049
1150
  return "Stars";
1050
1151
  }
1051
1152
  };
1052
- const getButtonDescription = (sort) => {
1053
- switch (sort) {
1054
- case "updated":
1055
- return "When the repository was last modified";
1056
- case "pushed":
1057
- return "When code was last pushed";
1058
- case "name":
1059
- return "Alphabetical by repository name";
1060
- case "stars":
1061
- return "Number of stars";
1062
- }
1153
+ const getOptionChalk = (option) => {
1154
+ if (option === currentSort) return c.success;
1155
+ return focusedOption === option ? c.primary : c.muted;
1063
1156
  };
1064
- const getButtonColor = (sort) => {
1065
- if (sort === currentSort) {
1066
- return "green";
1067
- }
1068
- return focusedOption === sort ? "cyan" : "gray";
1069
- };
1070
- return /* @__PURE__ */ jsxs9(Box9, { flexDirection: "column", borderStyle: "round", borderColor: "cyan", paddingX: 2, paddingY: 1, width: 40, children: [
1157
+ return /* @__PURE__ */ jsxs9(Box9, { flexDirection: "column", borderStyle: "round", borderColor: theme.primary, paddingX: 2, paddingY: 1, width: 40, children: [
1071
1158
  /* @__PURE__ */ jsx10(Text10, { bold: true, children: "Sort By" }),
1072
1159
  /* @__PURE__ */ jsxs9(Box9, { flexDirection: "column", marginTop: 1, children: [
1073
1160
  options.map((option) => /* @__PURE__ */ jsx10(Box9, { paddingX: 1, children: /* @__PURE__ */ jsxs9(Text10, { children: [
1074
- focusedOption === option ? chalk9.bgCyan.black(" \u2192 ") : " ",
1075
- focusedOption === option ? chalk9[getButtonColor(option)].bold(getButtonLabel(option)) : chalk9[getButtonColor(option)](getButtonLabel(option)),
1076
- option === currentSort && chalk9.green(" \u2713")
1161
+ focusedOption === option ? c.arrow(" \u2192 ") : " ",
1162
+ focusedOption === option ? getOptionChalk(option).bold(getButtonLabel(option)) : getOptionChalk(option)(getButtonLabel(option)),
1163
+ option === currentSort && c.success(" \u2713")
1077
1164
  ] }) }, option)),
1078
1165
  /* @__PURE__ */ jsx10(Box9, { paddingX: 1, children: /* @__PURE__ */ jsxs9(Text10, { children: [
1079
- focusedOption === "cancel" ? chalk9.bgWhite.black(" \u2192 ") : " ",
1080
- focusedOption === "cancel" ? chalk9.white.bold("Cancel") : chalk9.gray("Cancel")
1166
+ focusedOption === "cancel" ? c.arrowMuted(" \u2192 ") : " ",
1167
+ focusedOption === "cancel" ? chalk10.white.bold("Cancel") : c.muted("Cancel")
1081
1168
  ] }) })
1082
1169
  ] }),
1083
- /* @__PURE__ */ jsx10(Box9, { marginTop: 1, children: /* @__PURE__ */ jsx10(Text10, { color: "gray", dimColor: true, children: "\u2191\u2193/Enter \u2022 U/P/N/S \u2022 Esc" }) })
1170
+ /* @__PURE__ */ jsx10(Box9, { marginTop: 1, children: /* @__PURE__ */ jsx10(Text10, { color: theme.muted, dimColor: true, children: "\u2191\u2193/Enter \u2022 U/P/N/S \u2022 Esc" }) })
1084
1171
  ] });
1085
1172
  }
1086
1173
 
1087
1174
  // src/ui/components/modals/SortDirectionModal.tsx
1088
1175
  import { useState as useState10, useEffect as useEffect7 } from "react";
1089
1176
  import { Box as Box10, Text as Text11, useInput as useInput10 } from "ink";
1090
- import chalk10 from "chalk";
1177
+ import chalk11 from "chalk";
1091
1178
  import { jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
1092
1179
  function SortDirectionModal({
1093
1180
  currentDirection,
1094
1181
  currentSortKey,
1095
1182
  onSelect,
1096
- onCancel
1183
+ onCancel,
1184
+ theme: themeProp
1097
1185
  }) {
1186
+ const { theme, c } = useTheme(themeProp?.name ?? "default");
1098
1187
  const options = ["desc", "asc"];
1099
1188
  const [focusedOption, setFocusedOption] = useState10(currentDirection);
1100
1189
  useEffect7(() => {
@@ -1110,40 +1199,25 @@ function SortDirectionModal({
1110
1199
  setFocusedOption(options[options.length - 1]);
1111
1200
  } else if (focusedOption === "asc") {
1112
1201
  setFocusedOption("desc");
1113
- } else if (focusedOption === "desc") {
1114
1202
  }
1115
1203
  }
1116
1204
  if (key.rightArrow || key.downArrow) {
1117
- if (focusedOption === "desc") {
1118
- setFocusedOption("asc");
1119
- } else if (focusedOption === "asc") {
1120
- setFocusedOption("cancel");
1121
- } else if (focusedOption === "cancel") {
1122
- }
1205
+ if (focusedOption === "desc") setFocusedOption("asc");
1206
+ else if (focusedOption === "asc") setFocusedOption("cancel");
1123
1207
  }
1124
1208
  if (key.tab) {
1125
- if (focusedOption === "desc") {
1126
- setFocusedOption("asc");
1127
- } else if (focusedOption === "asc") {
1128
- setFocusedOption("cancel");
1129
- } else if (focusedOption === "cancel") {
1130
- setFocusedOption("desc");
1131
- }
1209
+ if (focusedOption === "desc") setFocusedOption("asc");
1210
+ else if (focusedOption === "asc") setFocusedOption("cancel");
1211
+ else if (focusedOption === "cancel") setFocusedOption("desc");
1132
1212
  }
1133
1213
  if (key.return) {
1134
- if (focusedOption === "cancel") {
1135
- onCancel();
1136
- } else {
1137
- onSelect(focusedOption);
1138
- }
1214
+ if (focusedOption === "cancel") onCancel();
1215
+ else onSelect(focusedOption);
1139
1216
  }
1140
1217
  if (input) {
1141
1218
  const upperInput = input.toUpperCase();
1142
- if (upperInput === "A") {
1143
- onSelect("asc");
1144
- } else if (upperInput === "D") {
1145
- onSelect("desc");
1146
- }
1219
+ if (upperInput === "A") onSelect("asc");
1220
+ else if (upperInput === "D") onSelect("desc");
1147
1221
  }
1148
1222
  });
1149
1223
  const getButtonLabel = (direction) => {
@@ -1184,11 +1258,9 @@ function SortDirectionModal({
1184
1258
  }
1185
1259
  }
1186
1260
  };
1187
- const getButtonColor = (direction) => {
1188
- if (direction === currentDirection) {
1189
- return "green";
1190
- }
1191
- return focusedOption === direction ? "cyan" : "gray";
1261
+ const getOptionChalk = (direction) => {
1262
+ if (direction === currentDirection) return c.success;
1263
+ return focusedOption === direction ? c.primary : c.muted;
1192
1264
  };
1193
1265
  const formatSortKey = () => {
1194
1266
  switch (currentSortKey) {
@@ -1202,30 +1274,30 @@ function SortDirectionModal({
1202
1274
  return "Stars";
1203
1275
  }
1204
1276
  };
1205
- return /* @__PURE__ */ jsxs10(Box10, { flexDirection: "column", borderStyle: "round", borderColor: "cyan", paddingX: 2, paddingY: 1, width: 45, children: [
1277
+ return /* @__PURE__ */ jsxs10(Box10, { flexDirection: "column", borderStyle: "round", borderColor: theme.primary, paddingX: 2, paddingY: 1, width: 45, children: [
1206
1278
  /* @__PURE__ */ jsx11(Text11, { bold: true, children: "Sort Direction" }),
1207
- /* @__PURE__ */ jsxs10(Text11, { color: "gray", dimColor: true, children: [
1279
+ /* @__PURE__ */ jsxs10(Text11, { color: theme.muted, dimColor: true, children: [
1208
1280
  "Sorting by: ",
1209
1281
  formatSortKey()
1210
1282
  ] }),
1211
1283
  /* @__PURE__ */ jsxs10(Box10, { flexDirection: "column", marginTop: 1, children: [
1212
1284
  options.map((option) => /* @__PURE__ */ jsx11(Box10, { paddingX: 1, marginBottom: 0, children: /* @__PURE__ */ jsxs10(Box10, { flexDirection: "column", children: [
1213
1285
  /* @__PURE__ */ jsxs10(Text11, { children: [
1214
- focusedOption === option ? chalk10.bgCyan.black(" \u2192 ") : " ",
1215
- focusedOption === option ? chalk10[getButtonColor(option)].bold(getButtonLabel(option)) : chalk10[getButtonColor(option)](getButtonLabel(option)),
1216
- option === currentDirection && chalk10.green(" \u2713")
1286
+ focusedOption === option ? c.arrow(" \u2192 ") : " ",
1287
+ focusedOption === option ? getOptionChalk(option).bold(getButtonLabel(option)) : getOptionChalk(option)(getButtonLabel(option)),
1288
+ option === currentDirection && c.success(" \u2713")
1217
1289
  ] }),
1218
- /* @__PURE__ */ jsxs10(Text11, { color: "gray", dimColor: true, children: [
1290
+ /* @__PURE__ */ jsxs10(Text11, { color: theme.muted, dimColor: true, children: [
1219
1291
  " ",
1220
1292
  getButtonDescription(option)
1221
1293
  ] })
1222
1294
  ] }) }, option)),
1223
1295
  /* @__PURE__ */ jsx11(Box10, { paddingX: 1, marginTop: 1, children: /* @__PURE__ */ jsxs10(Text11, { children: [
1224
- focusedOption === "cancel" ? chalk10.bgWhite.black(" \u2192 ") : " ",
1225
- focusedOption === "cancel" ? chalk10.white.bold("Cancel") : chalk10.gray("Cancel")
1296
+ focusedOption === "cancel" ? c.arrowMuted(" \u2192 ") : " ",
1297
+ focusedOption === "cancel" ? chalk11.white.bold("Cancel") : c.muted("Cancel")
1226
1298
  ] }) })
1227
1299
  ] }),
1228
- /* @__PURE__ */ jsx11(Box10, { marginTop: 1, children: /* @__PURE__ */ jsx11(Text11, { color: "gray", dimColor: true, children: "\u2191\u2193/Enter \u2022 A/D \u2022 Esc" }) })
1300
+ /* @__PURE__ */ jsx11(Box10, { marginTop: 1, children: /* @__PURE__ */ jsx11(Text11, { color: theme.muted, dimColor: true, children: "\u2191\u2193/Enter \u2022 A/D \u2022 Esc" }) })
1229
1301
  ] });
1230
1302
  }
1231
1303
 
@@ -1233,7 +1305,7 @@ function SortDirectionModal({
1233
1305
  import { useState as useState11, useEffect as useEffect8 } from "react";
1234
1306
  import { Box as Box11, Text as Text12, useInput as useInput11 } from "ink";
1235
1307
  import TextInput2 from "ink-text-input";
1236
- import chalk11 from "chalk";
1308
+ import chalk12 from "chalk";
1237
1309
  import { Fragment as Fragment4, jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
1238
1310
  var ChangeVisibilityModal = ({
1239
1311
  isOpen,
@@ -1244,8 +1316,10 @@ var ChangeVisibilityModal = ({
1244
1316
  onVisibilityChange,
1245
1317
  onClose,
1246
1318
  changing: externalChanging,
1247
- error: externalError
1319
+ error: externalError,
1320
+ theme: themeProp
1248
1321
  }) => {
1322
+ const { c } = useTheme(themeProp?.name ?? "default");
1249
1323
  const getAvailableOptions = () => {
1250
1324
  if (currentVisibility === "PUBLIC") {
1251
1325
  return isEnterprise ? ["PRIVATE", "INTERNAL"] : ["PRIVATE"];
@@ -1365,7 +1439,7 @@ var ChangeVisibilityModal = ({
1365
1439
  alignItems: "center",
1366
1440
  justifyContent: "center",
1367
1441
  flexDirection: "column",
1368
- children: /* @__PURE__ */ jsx12(Text12, { children: chalk11.bgGray.white.bold(" Cancel ") })
1442
+ children: /* @__PURE__ */ jsx12(Text12, { children: c.btnMuted(" Cancel ") })
1369
1443
  }
1370
1444
  ) }),
1371
1445
  /* @__PURE__ */ jsx12(Box11, { marginTop: 1, flexDirection: "row", justifyContent: "center", children: /* @__PURE__ */ jsx12(Text12, { color: "gray", children: "Press Enter to Cancel \u2022 C to cancel" }) })
@@ -1390,7 +1464,7 @@ var ChangeVisibilityModal = ({
1390
1464
  alignItems: "center",
1391
1465
  justifyContent: "center",
1392
1466
  flexDirection: "column",
1393
- children: /* @__PURE__ */ jsx12(Text12, { children: focusedButton === "option" && selectedOptionIndex === index ? chalk11[`bg${getVisibilityLabel(option) === "Public" ? "Green" : getVisibilityLabel(option) === "Private" ? "Yellow" : "Cyan"}`].black.bold(` ${getVisibilityLabel(option)} `) : chalk11[getVisibilityColor(option)](getVisibilityLabel(option)) })
1467
+ children: /* @__PURE__ */ jsx12(Text12, { children: focusedButton === "option" && selectedOptionIndex === index ? chalk12[`bg${getVisibilityLabel(option) === "Public" ? "Green" : getVisibilityLabel(option) === "Private" ? "Yellow" : "Cyan"}`].black.bold(` ${getVisibilityLabel(option)} `) : chalk12[getVisibilityColor(option)](getVisibilityLabel(option)) })
1394
1468
  },
1395
1469
  option
1396
1470
  )),
@@ -1404,7 +1478,7 @@ var ChangeVisibilityModal = ({
1404
1478
  alignItems: "center",
1405
1479
  justifyContent: "center",
1406
1480
  flexDirection: "column",
1407
- children: /* @__PURE__ */ jsx12(Text12, { children: focusedButton === "cancel" ? chalk11.bgGray.white.bold(" Cancel ") : chalk11.gray.bold("Cancel") })
1481
+ children: /* @__PURE__ */ jsx12(Text12, { children: focusedButton === "cancel" ? c.btnMuted(" Cancel ") : c.muted.bold("Cancel") })
1408
1482
  }
1409
1483
  )
1410
1484
  ] }),
@@ -1440,9 +1514,10 @@ var ChangeVisibilityModal = ({
1440
1514
  // src/ui/components/modals/CopyUrlModal.tsx
1441
1515
  import { useState as useState12 } from "react";
1442
1516
  import { Box as Box12, Text as Text13, useInput as useInput12 } from "ink";
1443
- import chalk12 from "chalk";
1517
+ import chalk13 from "chalk";
1444
1518
  import { Fragment as Fragment5, jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
1445
- function CopyUrlModal({ repo, terminalWidth, onClose, onCopy }) {
1519
+ function CopyUrlModal({ repo, terminalWidth, onClose, onCopy, theme: themeProp }) {
1520
+ const { theme, c } = useTheme(themeProp?.name ?? "default");
1446
1521
  const [copyError, setCopyError] = useState12(null);
1447
1522
  const [selectedType, setSelectedType] = useState12("SSH");
1448
1523
  const urlTypes = ["SSH", "HTTPS"];
@@ -1510,53 +1585,53 @@ function CopyUrlModal({ repo, terminalWidth, onClose, onCopy }) {
1510
1585
  {
1511
1586
  flexDirection: "column",
1512
1587
  borderStyle: "round",
1513
- borderColor: "blue",
1588
+ borderColor: theme.secondary,
1514
1589
  paddingX: 3,
1515
1590
  paddingY: 2,
1516
1591
  width: Math.min(terminalWidth - 8, 80),
1517
1592
  children: [
1518
- /* @__PURE__ */ jsx13(Text13, { bold: true, color: "blue", children: "Copy Repository URL" }),
1593
+ /* @__PURE__ */ jsx13(Text13, { bold: true, color: theme.secondary, children: "Copy Repository URL" }),
1519
1594
  /* @__PURE__ */ jsx13(Box12, { height: 1, children: /* @__PURE__ */ jsx13(Text13, { children: " " }) }),
1520
- /* @__PURE__ */ jsx13(Text13, { children: chalk12.bold(repo.nameWithOwner) }),
1595
+ /* @__PURE__ */ jsx13(Text13, { children: chalk13.bold(repo.nameWithOwner) }),
1521
1596
  /* @__PURE__ */ jsx13(Box12, { height: 1, children: /* @__PURE__ */ jsx13(Text13, { children: " " }) }),
1522
- /* @__PURE__ */ jsx13(Text13, { color: "gray", children: "SSH URL:" }),
1597
+ /* @__PURE__ */ jsx13(Text13, { color: theme.muted, children: "SSH URL:" }),
1523
1598
  /* @__PURE__ */ jsx13(
1524
1599
  Box12,
1525
1600
  {
1526
1601
  paddingX: 2,
1527
1602
  paddingY: 1,
1528
1603
  borderStyle: "single",
1529
- borderColor: selectedType === "SSH" ? "blue" : "gray",
1530
- children: /* @__PURE__ */ jsxs12(Text13, { color: selectedType === "SSH" ? "blue" : void 0, children: [
1604
+ borderColor: selectedType === "SSH" ? theme.secondary : theme.muted,
1605
+ children: /* @__PURE__ */ jsxs12(Text13, { color: selectedType === "SSH" ? theme.secondary : void 0, children: [
1531
1606
  selectedType === "SSH" ? "\u25B6 " : " ",
1532
1607
  sshUrl
1533
1608
  ] })
1534
1609
  }
1535
1610
  ),
1536
1611
  /* @__PURE__ */ jsx13(Box12, { height: 1, children: /* @__PURE__ */ jsx13(Text13, { children: " " }) }),
1537
- /* @__PURE__ */ jsx13(Text13, { color: "gray", children: "HTTPS URL:" }),
1612
+ /* @__PURE__ */ jsx13(Text13, { color: theme.muted, children: "HTTPS URL:" }),
1538
1613
  /* @__PURE__ */ jsx13(
1539
1614
  Box12,
1540
1615
  {
1541
1616
  paddingX: 2,
1542
1617
  paddingY: 1,
1543
1618
  borderStyle: "single",
1544
- borderColor: selectedType === "HTTPS" ? "blue" : "gray",
1545
- children: /* @__PURE__ */ jsxs12(Text13, { color: selectedType === "HTTPS" ? "blue" : void 0, children: [
1619
+ borderColor: selectedType === "HTTPS" ? theme.secondary : theme.muted,
1620
+ children: /* @__PURE__ */ jsxs12(Text13, { color: selectedType === "HTTPS" ? theme.secondary : void 0, children: [
1546
1621
  selectedType === "HTTPS" ? "\u25B6 " : " ",
1547
1622
  httpsUrl
1548
1623
  ] })
1549
1624
  }
1550
1625
  ),
1551
1626
  /* @__PURE__ */ jsx13(Box12, { height: 1, children: /* @__PURE__ */ jsx13(Text13, { children: " " }) }),
1552
- /* @__PURE__ */ jsxs12(Text13, { color: "gray", children: [
1627
+ /* @__PURE__ */ jsxs12(Text13, { color: theme.muted, children: [
1553
1628
  "\u2191\u2193 Select \u2022 Enter/Y to copy ",
1554
1629
  selectedType,
1555
1630
  " \u2022 S copy SSH \u2022 H copy HTTPS \u2022 Esc/Q/C to close"
1556
1631
  ] }),
1557
1632
  copyError && /* @__PURE__ */ jsxs12(Fragment5, { children: [
1558
1633
  /* @__PURE__ */ jsx13(Box12, { height: 1, children: /* @__PURE__ */ jsx13(Text13, { children: " " }) }),
1559
- /* @__PURE__ */ jsx13(Text13, { color: "red", children: copyError })
1634
+ /* @__PURE__ */ jsx13(Text13, { color: theme.error, children: copyError })
1560
1635
  ] })
1561
1636
  ]
1562
1637
  }
@@ -1568,7 +1643,8 @@ import { useState as useState13, useEffect as useEffect9 } from "react";
1568
1643
  import { Box as Box13, Text as Text14, useInput as useInput13 } from "ink";
1569
1644
  import TextInput3 from "ink-text-input";
1570
1645
  import { Fragment as Fragment6, jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
1571
- function RenameModal({ repo, onRename, onCancel }) {
1646
+ function RenameModal({ repo, onRename, onCancel, theme: themeProp }) {
1647
+ const { theme } = useTheme(themeProp?.name ?? "default");
1572
1648
  const [newName, setNewName] = useState13("");
1573
1649
  const [renaming, setRenaming] = useState13(false);
1574
1650
  const [renameError, setRenameError] = useState13(null);
@@ -1614,14 +1690,14 @@ function RenameModal({ repo, onRename, onCancel }) {
1614
1690
  {
1615
1691
  flexDirection: "column",
1616
1692
  borderStyle: "round",
1617
- borderColor: "cyan",
1693
+ borderColor: theme.primary,
1618
1694
  paddingX: 3,
1619
1695
  paddingY: 2,
1620
1696
  width: 80,
1621
1697
  children: [
1622
- /* @__PURE__ */ jsx14(Text14, { bold: true, color: "cyan", children: "Rename Repository" }),
1698
+ /* @__PURE__ */ jsx14(Text14, { bold: true, color: theme.primary, children: "Rename Repository" }),
1623
1699
  /* @__PURE__ */ jsx14(Box13, { height: 1, children: /* @__PURE__ */ jsx14(Text14, { children: " " }) }),
1624
- /* @__PURE__ */ jsxs13(Text14, { color: "gray", children: [
1700
+ /* @__PURE__ */ jsxs13(Text14, { color: theme.muted, children: [
1625
1701
  "Current: ",
1626
1702
  repo.nameWithOwner
1627
1703
  ] }),
@@ -1644,12 +1720,12 @@ function RenameModal({ repo, onRename, onCancel }) {
1644
1720
  ] }),
1645
1721
  renaming ? /* @__PURE__ */ jsx14(Box13, { marginTop: 2, justifyContent: "center", children: /* @__PURE__ */ jsxs13(Box13, { flexDirection: "row", children: [
1646
1722
  /* @__PURE__ */ jsx14(Box13, { marginRight: 1, children: /* @__PURE__ */ jsx14(SlowSpinner, {}) }),
1647
- /* @__PURE__ */ jsx14(Text14, { color: "cyan", children: "Renaming repository..." })
1723
+ /* @__PURE__ */ jsx14(Text14, { color: theme.primary, children: "Renaming repository..." })
1648
1724
  ] }) }) : /* @__PURE__ */ jsxs13(Fragment6, { children: [
1649
- /* @__PURE__ */ jsx14(Box13, { marginTop: 2, children: /* @__PURE__ */ jsx14(Text14, { color: "gray", children: isDisabled ? "Enter a different name to rename" : `Press Enter to rename to "${newName}"` }) }),
1650
- /* @__PURE__ */ jsx14(Box13, { marginTop: 1, children: /* @__PURE__ */ jsx14(Text14, { color: "gray", children: "Press Esc to cancel" }) })
1725
+ /* @__PURE__ */ jsx14(Box13, { marginTop: 2, children: /* @__PURE__ */ jsx14(Text14, { color: theme.muted, children: isDisabled ? "Enter a different name to rename" : `Press Enter to rename to "${newName}"` }) }),
1726
+ /* @__PURE__ */ jsx14(Box13, { marginTop: 1, children: /* @__PURE__ */ jsx14(Text14, { color: theme.muted, children: "Press Esc to cancel" }) })
1651
1727
  ] }),
1652
- renameError && /* @__PURE__ */ jsx14(Box13, { marginTop: 1, children: /* @__PURE__ */ jsx14(Text14, { color: "red", children: renameError }) })
1728
+ renameError && /* @__PURE__ */ jsx14(Box13, { marginTop: 1, children: /* @__PURE__ */ jsx14(Text14, { color: theme.error, children: renameError }) })
1653
1729
  ]
1654
1730
  }
1655
1731
  );
@@ -1667,8 +1743,10 @@ function StarModal({
1667
1743
  onConfirm,
1668
1744
  onCancel,
1669
1745
  isStarring = false,
1670
- error = null
1746
+ error = null,
1747
+ theme: themeProp
1671
1748
  }) {
1749
+ const { theme } = useTheme(themeProp?.name ?? "default");
1672
1750
  const [focusedButton, setFocusedButton] = useState14("cancel");
1673
1751
  useInput14((input, key) => {
1674
1752
  if (!visible) return;
@@ -1709,12 +1787,12 @@ function StarModal({
1709
1787
  {
1710
1788
  flexDirection: "column",
1711
1789
  borderStyle: "round",
1712
- borderColor: "yellow",
1790
+ borderColor: theme.warning,
1713
1791
  paddingX: 2,
1714
1792
  paddingY: 1,
1715
1793
  marginTop: 1,
1716
1794
  children: [
1717
- /* @__PURE__ */ jsx15(Box14, { marginBottom: 1, children: /* @__PURE__ */ jsxs14(Text15, { bold: true, color: "yellow", children: [
1795
+ /* @__PURE__ */ jsx15(Box14, { marginBottom: 1, children: /* @__PURE__ */ jsxs14(Text15, { bold: true, color: theme.warning, children: [
1718
1796
  "\u2B50 ",
1719
1797
  action,
1720
1798
  " Repository"
@@ -1723,7 +1801,7 @@ function StarModal({
1723
1801
  "Are you sure you want to ",
1724
1802
  actionLower,
1725
1803
  " ",
1726
- /* @__PURE__ */ jsx15(Text15, { bold: true, color: "cyan", children: repo.nameWithOwner }),
1804
+ /* @__PURE__ */ jsx15(Text15, { bold: true, color: theme.primary, children: repo.nameWithOwner }),
1727
1805
  "?"
1728
1806
  ] }) }),
1729
1807
  repo.description && /* @__PURE__ */ jsx15(Box14, { marginBottom: 1, children: /* @__PURE__ */ jsx15(Text15, { dimColor: true, wrap: "wrap", children: repo.description }) }),
@@ -1733,11 +1811,11 @@ function StarModal({
1733
1811
  " \u2022 Forks: ",
1734
1812
  repo.forkCount
1735
1813
  ] }) }),
1736
- error && /* @__PURE__ */ jsx15(Box14, { marginBottom: 1, flexDirection: "column", children: /* @__PURE__ */ jsxs14(Text15, { color: "red", wrap: "wrap", children: [
1814
+ error && /* @__PURE__ */ jsx15(Box14, { marginBottom: 1, flexDirection: "column", children: /* @__PURE__ */ jsxs14(Text15, { color: theme.error, wrap: "wrap", children: [
1737
1815
  error.includes("OAuth access restrictions") ? "\u26A0\uFE0F " : "Error: ",
1738
1816
  error
1739
1817
  ] }) }),
1740
- isStarring ? /* @__PURE__ */ jsx15(Box14, { children: /* @__PURE__ */ jsxs14(Text15, { color: "yellow", children: [
1818
+ isStarring ? /* @__PURE__ */ jsx15(Box14, { children: /* @__PURE__ */ jsxs14(Text15, { color: theme.warning, children: [
1741
1819
  actionGerund,
1742
1820
  "..."
1743
1821
  ] }) }) : /* @__PURE__ */ jsxs14(Fragment7, { children: [
@@ -1788,8 +1866,10 @@ function UnstarModal({
1788
1866
  onConfirm,
1789
1867
  onCancel,
1790
1868
  isUnstarring = false,
1791
- error = null
1869
+ error = null,
1870
+ theme: themeProp
1792
1871
  }) {
1872
+ const { theme } = useTheme(themeProp?.name ?? "default");
1793
1873
  const [focusedButton, setFocusedButton] = useState15("cancel");
1794
1874
  useInput15((input, key) => {
1795
1875
  if (!visible) return;
@@ -1803,23 +1883,14 @@ function UnstarModal({
1803
1883
  setFocusedButton("unstar");
1804
1884
  }
1805
1885
  if (key.return || input === "y" || input === "Y") {
1806
- if (focusedButton === "unstar") {
1807
- onConfirm();
1808
- } else {
1809
- onCancel();
1810
- }
1811
- }
1812
- if (input === "n" || input === "N") {
1813
- onCancel();
1814
- }
1815
- if (input === "u" || input === "U") {
1816
- onConfirm();
1886
+ if (focusedButton === "unstar") onConfirm();
1887
+ else onCancel();
1817
1888
  }
1889
+ if (input === "n" || input === "N") onCancel();
1890
+ if (input === "u" || input === "U") onConfirm();
1818
1891
  });
1819
1892
  useEffect11(() => {
1820
- if (visible) {
1821
- setFocusedButton("cancel");
1822
- }
1893
+ if (visible) setFocusedButton("cancel");
1823
1894
  }, [visible]);
1824
1895
  if (!visible || !repo) return null;
1825
1896
  return /* @__PURE__ */ jsxs15(
@@ -1827,16 +1898,16 @@ function UnstarModal({
1827
1898
  {
1828
1899
  flexDirection: "column",
1829
1900
  borderStyle: "round",
1830
- borderColor: "yellow",
1901
+ borderColor: theme.warning,
1831
1902
  paddingX: 2,
1832
1903
  paddingY: 1,
1833
1904
  marginTop: 1,
1834
1905
  children: [
1835
- /* @__PURE__ */ jsx16(Box15, { marginBottom: 1, children: /* @__PURE__ */ jsx16(Text16, { bold: true, color: "yellow", children: "\u2B50 Unstar Repository" }) }),
1906
+ /* @__PURE__ */ jsx16(Box15, { marginBottom: 1, children: /* @__PURE__ */ jsx16(Text16, { bold: true, color: theme.warning, children: "\u2B50 Unstar Repository" }) }),
1836
1907
  /* @__PURE__ */ jsx16(Box15, { marginBottom: 1, children: /* @__PURE__ */ jsxs15(Text16, { children: [
1837
1908
  "Are you sure you want to unstar",
1838
1909
  " ",
1839
- /* @__PURE__ */ jsx16(Text16, { bold: true, color: "cyan", children: repo.nameWithOwner }),
1910
+ /* @__PURE__ */ jsx16(Text16, { bold: true, color: theme.primary, children: repo.nameWithOwner }),
1840
1911
  "?"
1841
1912
  ] }) }),
1842
1913
  repo.description && /* @__PURE__ */ jsx16(Box15, { marginBottom: 1, children: /* @__PURE__ */ jsx16(Text16, { dimColor: true, wrap: "wrap", children: repo.description }) }),
@@ -1846,11 +1917,11 @@ function UnstarModal({
1846
1917
  " \u2022 Forks: ",
1847
1918
  repo.forkCount
1848
1919
  ] }) }),
1849
- error && /* @__PURE__ */ jsx16(Box15, { marginBottom: 1, flexDirection: "column", children: /* @__PURE__ */ jsxs15(Text16, { color: "red", wrap: "wrap", children: [
1920
+ error && /* @__PURE__ */ jsx16(Box15, { marginBottom: 1, flexDirection: "column", children: /* @__PURE__ */ jsxs15(Text16, { color: theme.error, wrap: "wrap", children: [
1850
1921
  error.includes("OAuth access restrictions") ? "\u26A0\uFE0F " : "Error: ",
1851
1922
  error
1852
1923
  ] }) }),
1853
- isUnstarring ? /* @__PURE__ */ jsx16(Box15, { children: /* @__PURE__ */ jsx16(Text16, { color: "yellow", children: "Unstarring..." }) }) : /* @__PURE__ */ jsxs15(Fragment8, { children: [
1924
+ isUnstarring ? /* @__PURE__ */ jsx16(Box15, { children: /* @__PURE__ */ jsx16(Text16, { color: theme.warning, children: "Unstarring..." }) }) : /* @__PURE__ */ jsxs15(Fragment8, { children: [
1854
1925
  /* @__PURE__ */ jsxs15(Box15, { gap: 2, children: [
1855
1926
  /* @__PURE__ */ jsx16(Box15, { children: /* @__PURE__ */ jsxs15(
1856
1927
  Text16,
@@ -1869,7 +1940,7 @@ function UnstarModal({
1869
1940
  Text16,
1870
1941
  {
1871
1942
  backgroundColor: focusedButton === "unstar" ? "yellow" : void 0,
1872
- color: focusedButton === "unstar" ? "black" : "yellow",
1943
+ color: focusedButton === "unstar" ? "black" : theme.warning,
1873
1944
  bold: focusedButton === "unstar",
1874
1945
  children: [
1875
1946
  " ",
@@ -1888,7 +1959,7 @@ function UnstarModal({
1888
1959
 
1889
1960
  // src/ui/components/repo/RepoRow.tsx
1890
1961
  import { Box as Box16, Text as Text17 } from "ink";
1891
- import chalk13 from "chalk";
1962
+ import chalk14 from "chalk";
1892
1963
  import { jsx as jsx17, jsxs as jsxs16 } from "react/jsx-runtime";
1893
1964
  function RepoRow({
1894
1965
  repo,
@@ -1898,43 +1969,45 @@ function RepoRow({
1898
1969
  spacingLines,
1899
1970
  dim,
1900
1971
  forkTracking,
1901
- starsMode = false
1972
+ starsMode = false,
1973
+ theme: themeProp
1902
1974
  }) {
1975
+ const { theme, c } = useTheme(themeProp?.name ?? "default");
1903
1976
  const langName = repo.primaryLanguage?.name || "";
1904
1977
  const langColor = repo.primaryLanguage?.color || "#666666";
1905
1978
  const hasCommitData = repo.isFork && repo.parent && repo.defaultBranchRef && repo.parent.defaultBranchRef && repo.parent.defaultBranchRef.target?.history && repo.defaultBranchRef.target?.history;
1906
1979
  const commitsBehind = hasCommitData ? repo.parent.defaultBranchRef.target.history.totalCount - repo.defaultBranchRef.target.history.totalCount : 0;
1907
1980
  const showCommitsBehind = forkTracking && hasCommitData;
1908
1981
  let line1 = "";
1909
- const numColor = selected ? chalk13.cyan : chalk13.gray;
1910
- const nameColor = selected ? chalk13.cyan.bold : chalk13.white;
1982
+ const numColor = selected ? c.selected : c.muted;
1983
+ const nameColor = selected ? c.selected.bold : c.text;
1911
1984
  line1 += numColor(`${String(index).padStart(3, " ")}.`);
1912
1985
  if (repo.viewerHasStarred) {
1913
- line1 += chalk13.yellow(" \u2B50");
1986
+ line1 += c.warning(" \u2B50");
1914
1987
  }
1915
1988
  line1 += nameColor(` ${repo.nameWithOwner}`);
1916
1989
  if (repo.visibility === "INTERNAL") {
1917
- line1 += chalk13.magenta(" Internal");
1990
+ line1 += c.internal(" Internal");
1918
1991
  } else if (repo.visibility === "PRIVATE" || repo.isPrivate && !repo.visibility) {
1919
- line1 += chalk13.yellow(" Private");
1992
+ line1 += c.private(" Private");
1920
1993
  }
1921
1994
  if (starsMode && repo.owner && repo.owner.__typename === "Organization") {
1922
- line1 += chalk13.gray(" [org]");
1995
+ line1 += c.muted(" [org]");
1923
1996
  }
1924
- if (repo.isArchived) line1 += " " + chalk13.bgGray.whiteBright(" Archived ") + " ";
1997
+ if (repo.isArchived) line1 += " " + chalk14.bgGray.whiteBright(" Archived ") + " ";
1925
1998
  if (repo.isFork && repo.parent) {
1926
- line1 += chalk13.blue(` Fork of ${repo.parent.nameWithOwner}`);
1999
+ line1 += c.fork(` Fork of ${repo.parent.nameWithOwner}`);
1927
2000
  if (showCommitsBehind) {
1928
2001
  if (commitsBehind > 0) {
1929
- line1 += chalk13.yellow(` (${commitsBehind} behind)`);
2002
+ line1 += c.warning(` (${commitsBehind} behind)`);
1930
2003
  } else {
1931
- line1 += chalk13.green(` (0 behind)`);
2004
+ line1 += c.success(` (0 behind)`);
1932
2005
  }
1933
2006
  }
1934
2007
  }
1935
2008
  let line2 = " ";
1936
- const metaColor = selected ? chalk13.white : chalk13.gray;
1937
- if (langName) line2 += chalk13.hex(langColor)("\u25CF ") + metaColor(`${langName} `);
2009
+ const metaColor = selected ? c.text : c.muted;
2010
+ if (langName) line2 += chalk14.hex(langColor)("\u25CF ") + metaColor(`${langName} `);
1938
2011
  line2 += metaColor(`\u2605 ${repo.stargazerCount} \u2442 ${repo.forkCount} Updated ${formatDate(repo.updatedAt)}`);
1939
2012
  const line3 = repo.description ? ` ${truncate(repo.description, Math.max(30, maxWidth - 10))}` : null;
1940
2013
  let fullText = line1 + "\n" + line2;
@@ -1943,7 +2016,7 @@ function RepoRow({
1943
2016
  const spacingBelow = spacingLines - spacingAbove;
1944
2017
  return /* @__PURE__ */ jsxs16(Box16, { flexDirection: "column", backgroundColor: selected ? "gray" : void 0, children: [
1945
2018
  spacingAbove > 0 && /* @__PURE__ */ jsx17(Box16, { height: spacingAbove, children: /* @__PURE__ */ jsx17(Text17, { children: " " }) }),
1946
- /* @__PURE__ */ jsx17(Text17, { children: dim ? chalk13.dim(fullText) : fullText }),
2019
+ /* @__PURE__ */ jsx17(Text17, { children: dim ? chalk14.dim(fullText) : fullText }),
1947
2020
  spacingBelow > 0 && /* @__PURE__ */ jsx17(Box16, { height: spacingBelow, children: /* @__PURE__ */ jsx17(Text17, { children: " " }) })
1948
2021
  ] });
1949
2022
  }
@@ -1967,43 +2040,45 @@ function RepoListHeader({
1967
2040
  visibilityFilter = "all",
1968
2041
  archiveFilter = "all",
1969
2042
  isEnterprise = false,
1970
- starsMode = false
2043
+ starsMode = false,
2044
+ theme: themeProp
1971
2045
  }) {
1972
- const contextLabel = ownerContext === "personal" ? "Personal Account" : ownerContext?.type === "organization" ? `Organization: ${ownerContext.name ?? ownerContext.login}` : "";
2046
+ const { theme } = useTheme(themeProp?.name ?? "default");
2047
+ const contextLabel = ownerContext === "personal" ? "Personal Account" : ownerContext?.type === "organization" ? `Organisation: ${ownerContext.name ?? ownerContext.login}` : "";
1973
2048
  const visibilityLabel = visibilityFilter === "public" ? "Public" : visibilityFilter === "private" ? isEnterprise ? "Private/Internal" : "Private" : visibilityFilter === "internal" ? "Internal" : "";
1974
2049
  return /* @__PURE__ */ jsxs18(Box18, { flexDirection: "row", gap: 2, marginBottom: 1, children: [
1975
2050
  contextLabel && /* @__PURE__ */ jsx19(Text19, { children: contextLabel }),
1976
- starsMode && /* @__PURE__ */ jsx19(Text19, { color: "yellow", bold: true, children: "\u2B50 Stars Mode" }),
1977
- /* @__PURE__ */ jsxs18(Text19, { color: "gray", dimColor: true, children: [
2051
+ starsMode && /* @__PURE__ */ jsx19(Text19, { color: theme.warning, bold: true, children: "\u2B50 Stars Mode" }),
2052
+ /* @__PURE__ */ jsxs18(Text19, { color: theme.muted, dimColor: true, children: [
1978
2053
  "Sort: ",
1979
2054
  sortKey,
1980
2055
  " ",
1981
2056
  sortDir === "asc" ? "\u2191" : "\u2193"
1982
2057
  ] }),
1983
- /* @__PURE__ */ jsxs18(Text19, { color: "gray", dimColor: true, children: [
2058
+ /* @__PURE__ */ jsxs18(Text19, { color: theme.muted, dimColor: true, children: [
1984
2059
  "Fork Status - Commits Behind: ",
1985
2060
  forkTracking ? "ON" : "OFF"
1986
2061
  ] }),
1987
- !!visibilityLabel && !starsMode && /* @__PURE__ */ jsxs18(Text19, { color: "yellow", children: [
2062
+ !!visibilityLabel && !starsMode && /* @__PURE__ */ jsxs18(Text19, { color: theme.warning, children: [
1988
2063
  "Visibility: ",
1989
2064
  visibilityLabel
1990
2065
  ] }),
1991
- archiveFilter !== "all" && /* @__PURE__ */ jsxs18(Text19, { color: "cyan", children: [
2066
+ archiveFilter !== "all" && /* @__PURE__ */ jsxs18(Text19, { color: theme.primary, children: [
1992
2067
  "Archive: ",
1993
2068
  archiveFilter === "archived" ? "Archived" : "Unarchived"
1994
2069
  ] }),
1995
- filter && !searchActive && /* @__PURE__ */ jsxs18(Text19, { color: "cyan", children: [
2070
+ filter && !searchActive && /* @__PURE__ */ jsxs18(Text19, { color: theme.primary, children: [
1996
2071
  'Filter: "',
1997
2072
  filter,
1998
2073
  '"'
1999
2074
  ] }),
2000
2075
  searchActive && /* @__PURE__ */ jsxs18(Fragment9, { children: [
2001
- /* @__PURE__ */ jsxs18(Text19, { color: "cyan", children: [
2076
+ /* @__PURE__ */ jsxs18(Text19, { color: theme.primary, children: [
2002
2077
  'Search: "',
2003
2078
  filter.trim(),
2004
2079
  '"'
2005
2080
  ] }),
2006
- searchLoading && /* @__PURE__ */ jsx19(Box18, { marginLeft: 1, children: /* @__PURE__ */ jsxs18(Text19, { color: "cyan", children: [
2081
+ searchLoading && /* @__PURE__ */ jsx19(Box18, { marginLeft: 1, children: /* @__PURE__ */ jsxs18(Text19, { color: theme.primary, children: [
2007
2082
  /* @__PURE__ */ jsx19(SlowSpinner, {}),
2008
2083
  " Searching\u2026"
2009
2084
  ] }) })
@@ -2027,7 +2102,7 @@ var PAGE_SIZE = getPageSize();
2027
2102
  function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextChange, initialOrgSlug: initialOrgSlug2 }) {
2028
2103
  const { exit } = useApp();
2029
2104
  const { stdout } = useStdout();
2030
- const client = useMemo(() => makeClient(token), [token]);
2105
+ const client = useMemo2(() => makeClient(token), [token]);
2031
2106
  const [debugMessages, setDebugMessages] = useState16([]);
2032
2107
  const addDebugMessage = useCallback((msg) => {
2033
2108
  if (process.env.GH_MANAGER_DEBUG === "1") {
@@ -2066,6 +2141,10 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
2066
2141
  const [prevRestRateLimit, setPrevRestRateLimit] = useState16(void 0);
2067
2142
  const [density, setDensity] = useState16(2);
2068
2143
  const [prefsLoaded, setPrefsLoaded] = useState16(false);
2144
+ const [themeName, setThemeName] = useState16("default");
2145
+ const [themeToast, setThemeToast] = useState16(null);
2146
+ const themeToastTimerRef = useRef(null);
2147
+ const { theme, c: tc } = useTheme(themeName);
2069
2148
  const [ownerContext, setOwnerContext] = useState16("personal");
2070
2149
  const [ownerAffiliations, setOwnerAffiliations] = useState16(["OWNER"]);
2071
2150
  const [orgSwitcherOpen, setOrgSwitcherOpen] = useState16(false);
@@ -2401,9 +2480,8 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
2401
2480
  }
2402
2481
  useEffect12(() => {
2403
2482
  return () => {
2404
- if (copyToastTimerRef.current) {
2405
- clearTimeout(copyToastTimerRef.current);
2406
- }
2483
+ if (copyToastTimerRef.current) clearTimeout(copyToastTimerRef.current);
2484
+ if (themeToastTimerRef.current) clearTimeout(themeToastTimerRef.current);
2407
2485
  };
2408
2486
  }, []);
2409
2487
  async function handleVisibilityChange(newVisibility) {
@@ -2690,6 +2768,9 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
2690
2768
  if (ui.archiveFilter && ["all", "unarchived", "archived"].includes(ui.archiveFilter)) {
2691
2769
  setArchiveFilter(ui.archiveFilter);
2692
2770
  }
2771
+ if (ui.theme && ["default", "ocean", "forest", "monochrome"].includes(ui.theme)) {
2772
+ setThemeName(ui.theme);
2773
+ }
2693
2774
  if (ui.ownerContext) {
2694
2775
  setOwnerContext(ui.ownerContext);
2695
2776
  if (onOrgContextChange) {
@@ -3196,7 +3277,16 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3196
3277
  if (repo) openInBrowser(`https://github.com/${repo.nameWithOwner}`);
3197
3278
  return;
3198
3279
  }
3199
- if (input && input.toUpperCase() === "T") {
3280
+ if (key.shift && input === "T") {
3281
+ const next = nextTheme(themeName);
3282
+ setThemeName(next);
3283
+ storeUIPrefs({ theme: next });
3284
+ if (themeToastTimerRef.current) clearTimeout(themeToastTimerRef.current);
3285
+ setThemeToast(`Theme: ${getTheme(next).label}`);
3286
+ themeToastTimerRef.current = setTimeout(() => setThemeToast(null), 2500);
3287
+ return;
3288
+ }
3289
+ if (input && input.toUpperCase() === "T" && !key.shift) {
3200
3290
  setDensity((d) => {
3201
3291
  const next = (d + 1) % 3;
3202
3292
  storeUIPrefs({ density: next });
@@ -3215,7 +3305,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3215
3305
  return;
3216
3306
  }
3217
3307
  });
3218
- const filtered = useMemo(() => {
3308
+ const filtered = useMemo2(() => {
3219
3309
  let result = items;
3220
3310
  if (visibilityFilter === "private") {
3221
3311
  result = result.filter((r) => r.visibility === "PRIVATE" || r.visibility === "INTERNAL");
@@ -3233,7 +3323,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3233
3323
  }
3234
3324
  return result;
3235
3325
  }, [items, filter, visibilityFilter, archiveFilter]);
3236
- const filteredAndSorted = useMemo(() => {
3326
+ const filteredAndSorted = useMemo2(() => {
3237
3327
  const arr = [...filtered];
3238
3328
  const dir = sortDir === "asc" ? 1 : -1;
3239
3329
  arr.sort((a, b) => {
@@ -3254,7 +3344,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3254
3344
  return arr;
3255
3345
  }, [filtered, sortKey, sortDir]);
3256
3346
  const searchActive = !starsMode && filter.trim().length >= 3;
3257
- const filteredSearchItems = useMemo(() => {
3347
+ const filteredSearchItems = useMemo2(() => {
3258
3348
  let result = searchItems;
3259
3349
  if (visibilityFilter === "private") {
3260
3350
  result = result.filter((r) => r.visibility === "PRIVATE" || r.visibility === "INTERNAL");
@@ -3268,7 +3358,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3268
3358
  }
3269
3359
  return result;
3270
3360
  }, [searchItems, visibilityFilter, archiveFilter]);
3271
- const filteredStarredItems = useMemo(() => {
3361
+ const filteredStarredItems = useMemo2(() => {
3272
3362
  let result = starredItems;
3273
3363
  if (filter && filter.trim().length > 0) {
3274
3364
  const lowerFilter = filter.toLowerCase();
@@ -3298,7 +3388,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3298
3388
  const contentHeight = Math.max(1, availableHeight - headerHeight - footerHeight - containerPadding);
3299
3389
  const listHeight = Math.max(1, contentHeight - (filterMode ? 2 : 0) - 2);
3300
3390
  const spacingLines = density;
3301
- const windowed = useMemo(
3391
+ const windowed = useMemo2(
3302
3392
  () => computeWindow(visibleItems, cursor, listHeight, spacingLines),
3303
3393
  [visibleItems, cursor, listHeight, spacingLines]
3304
3394
  );
@@ -3328,35 +3418,35 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3328
3418
  }
3329
3419
  const lowRate = rateLimit && rateLimit.remaining <= Math.ceil(rateLimit.limit * 0.1) || restRateLimit && restRateLimit.core.remaining <= Math.ceil(restRateLimit.core.limit * 0.1);
3330
3420
  const modalOpen = deleteMode || archiveMode || syncMode || logoutMode || infoMode || visibilityMode || archiveFilterMode || sortMode || sortDirectionMode || changeVisibilityMode || copyUrlMode || renameMode;
3331
- const headerBar = useMemo(() => /* @__PURE__ */ jsxs19(Box19, { flexDirection: "row", justifyContent: "space-between", height: 1, marginBottom: 1, children: [
3421
+ const headerBar = useMemo2(() => /* @__PURE__ */ jsxs19(Box19, { flexDirection: "row", justifyContent: "space-between", height: 1, marginBottom: 1, children: [
3332
3422
  /* @__PURE__ */ jsxs19(Box19, { flexDirection: "row", gap: 1, children: [
3333
- /* @__PURE__ */ jsxs19(Text20, { color: "cyan", bold: !modalOpen, dimColor: modalOpen, children: [
3423
+ /* @__PURE__ */ jsxs19(Text20, { color: theme.primary, bold: !modalOpen, dimColor: modalOpen, children: [
3334
3424
  " ",
3335
3425
  ownerContext === "personal" ? "Personal" : ownerContext.name || ownerContext.login,
3336
3426
  ownerContext !== "personal" && isEnterpriseOrg && " (ENT)"
3337
3427
  ] }),
3338
- /* @__PURE__ */ jsx20(Text20, { bold: true, color: modalOpen ? "gray" : void 0, dimColor: modalOpen ? true : void 0, children: "Repositories" }),
3339
- /* @__PURE__ */ jsxs19(Text20, { color: "gray", children: [
3428
+ /* @__PURE__ */ jsx20(Text20, { bold: true, color: modalOpen ? theme.muted : void 0, dimColor: modalOpen ? true : void 0, children: "Repositories" }),
3429
+ /* @__PURE__ */ jsxs19(Text20, { color: theme.muted, children: [
3340
3430
  "(",
3341
3431
  visibleItems.length,
3342
3432
  "/",
3343
3433
  searchActive ? searchTotalCount : totalCount,
3344
3434
  ")"
3345
3435
  ] }),
3346
- loadingMore && hasNextPage && !starsMode && !searchActive && totalCount > 0 && /* @__PURE__ */ jsx20(Text20, { color: "cyan", children: ` \xB7 loading ${items.length}/${totalCount}` }),
3347
- (loading || searchLoading || loadingMore) && /* @__PURE__ */ jsx20(Box19, { width: 2, flexShrink: 0, flexGrow: 0, marginLeft: 1, children: /* @__PURE__ */ jsx20(Text20, { color: "yellow", children: /* @__PURE__ */ jsx20(SlowSpinner, {}) }) })
3436
+ loadingMore && hasNextPage && !starsMode && !searchActive && totalCount > 0 && /* @__PURE__ */ jsx20(Text20, { color: theme.primary, children: ` \xB7 loading ${items.length}/${totalCount}` }),
3437
+ (loading || searchLoading || loadingMore) && /* @__PURE__ */ jsx20(Box19, { width: 2, flexShrink: 0, flexGrow: 0, marginLeft: 1, children: /* @__PURE__ */ jsx20(Text20, { color: theme.warning, children: /* @__PURE__ */ jsx20(SlowSpinner, {}) }) })
3348
3438
  ] }),
3349
- (rateLimit || restRateLimit) && /* @__PURE__ */ jsxs19(Text20, { color: lowRate ? "yellow" : "gray", children: [
3439
+ (rateLimit || restRateLimit) && /* @__PURE__ */ jsxs19(Text20, { color: lowRate ? theme.warning : theme.muted, children: [
3350
3440
  "GraphQL: ",
3351
3441
  rateLimit ? `${rateLimit.remaining}/${rateLimit.limit}` : "---/---",
3352
- prevRateLimit !== void 0 && rateLimit && prevRateLimit !== rateLimit.remaining && /* @__PURE__ */ jsx20(Text20, { color: rateLimit.remaining < prevRateLimit ? "red" : "green", children: ` (${rateLimit.remaining - prevRateLimit > 0 ? "+" : ""}${rateLimit.remaining - prevRateLimit})` }),
3442
+ prevRateLimit !== void 0 && rateLimit && prevRateLimit !== rateLimit.remaining && /* @__PURE__ */ jsx20(Text20, { color: rateLimit.remaining < prevRateLimit ? theme.error : theme.success, children: ` (${rateLimit.remaining - prevRateLimit > 0 ? "+" : ""}${rateLimit.remaining - prevRateLimit})` }),
3353
3443
  " | ",
3354
3444
  "REST: ",
3355
3445
  restRateLimit ? `${restRateLimit.core.remaining}/${restRateLimit.core.limit}` : "---/---",
3356
- prevRestRateLimit !== void 0 && restRateLimit && prevRestRateLimit !== restRateLimit.core.remaining && /* @__PURE__ */ jsx20(Text20, { color: restRateLimit.core.remaining < prevRestRateLimit ? "red" : "green", children: ` (${restRateLimit.core.remaining - prevRestRateLimit > 0 ? "+" : ""}${restRateLimit.core.remaining - prevRestRateLimit})` }),
3446
+ prevRestRateLimit !== void 0 && restRateLimit && prevRestRateLimit !== restRateLimit.core.remaining && /* @__PURE__ */ jsx20(Text20, { color: restRateLimit.core.remaining < prevRestRateLimit ? theme.error : theme.success, children: ` (${restRateLimit.core.remaining - prevRestRateLimit > 0 ? "+" : ""}${restRateLimit.core.remaining - prevRestRateLimit})` }),
3357
3447
  " "
3358
3448
  ] })
3359
- ] }), [visibleItems.length, searchActive, searchTotalCount, totalCount, loading, searchLoading, rateLimit, lowRate, modalOpen, prevRateLimit, ownerContext, isEnterpriseOrg, restRateLimit, prevRestRateLimit]);
3449
+ ] }), [visibleItems.length, searchActive, searchTotalCount, totalCount, loading, searchLoading, rateLimit, lowRate, modalOpen, prevRateLimit, ownerContext, isEnterpriseOrg, restRateLimit, prevRestRateLimit, theme]);
3360
3450
  if (error) {
3361
3451
  return /* @__PURE__ */ jsxs19(Box19, { flexDirection: "column", height: availableHeight, children: [
3362
3452
  /* @__PURE__ */ jsx20(Box19, { flexDirection: "row", justifyContent: "space-between", height: 1, marginBottom: 1, children: /* @__PURE__ */ jsxs19(Box19, { flexDirection: "row", gap: 1, children: [
@@ -3393,7 +3483,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3393
3483
  /* @__PURE__ */ jsx20(Text20, { color: "gray", children: "Your support helps craft more open-source tools" }),
3394
3484
  /* @__PURE__ */ jsx20(Text20, { color: "cyan", children: "\u{1F496} github.com/sponsors/wiiiimm" })
3395
3485
  ] }) }) }),
3396
- /* @__PURE__ */ jsx20(Box19, { borderStyle: "single", borderColor: modalOpen ? "gray" : "yellow", paddingX: 1, paddingY: 1, marginX: 1, height: contentHeight + containerPadding + 2, flexDirection: "column", children: deleteMode && deleteTarget ? (
3486
+ /* @__PURE__ */ jsx20(Box19, { borderStyle: "single", borderColor: modalOpen ? theme.muted : theme.warning, paddingX: 1, paddingY: 1, marginX: 1, height: contentHeight + containerPadding + 2, flexDirection: "column", children: deleteMode && deleteTarget ? (
3397
3487
  // Centered modal; hide list content while modal is open
3398
3488
  /* @__PURE__ */ jsx20(Box19, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsxs19(Box19, { flexDirection: "column", borderStyle: "round", borderColor: "red", paddingX: 3, paddingY: 2, width: Math.min(terminalWidth - 8, 80), children: [
3399
3489
  /* @__PURE__ */ jsx20(Text20, { bold: true, children: "Delete Confirmation" }),
@@ -3403,13 +3493,13 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3403
3493
  const langName = deleteTarget.primaryLanguage?.name || "";
3404
3494
  const langColor = deleteTarget.primaryLanguage?.color || "#666666";
3405
3495
  let line1 = "";
3406
- line1 += chalk14.white(deleteTarget.nameWithOwner);
3407
- if (deleteTarget.isPrivate) line1 += chalk14.yellow(" Private");
3408
- if (deleteTarget.isArchived) line1 += chalk14.gray.dim(" Archived");
3409
- if (deleteTarget.isFork && deleteTarget.parent) line1 += chalk14.blue(` Fork of ${deleteTarget.parent.nameWithOwner}`);
3496
+ line1 += tc.text(deleteTarget.nameWithOwner);
3497
+ if (deleteTarget.isPrivate) line1 += tc.private(" Private");
3498
+ if (deleteTarget.isArchived) line1 += tc.archived.dim(" Archived");
3499
+ if (deleteTarget.isFork && deleteTarget.parent) line1 += tc.fork(` Fork of ${deleteTarget.parent.nameWithOwner}`);
3410
3500
  let line2 = "";
3411
- if (langName) line2 += chalk14.hex(langColor)("\u25CF ") + chalk14.gray(`${langName} `);
3412
- line2 += chalk14.gray(`\u2605 ${deleteTarget.stargazerCount} \u2442 ${deleteTarget.forkCount} Updated ${formatDate(deleteTarget.updatedAt)}`);
3501
+ if (langName) line2 += chalk15.hex(langColor)("\u25CF ") + tc.muted(`${langName} `);
3502
+ line2 += tc.muted(`\u2605 ${deleteTarget.stargazerCount} \u2442 ${deleteTarget.forkCount} Updated ${formatDate(deleteTarget.updatedAt)}`);
3413
3503
  return /* @__PURE__ */ jsxs19(Fragment10, { children: [
3414
3504
  /* @__PURE__ */ jsx20(Text20, { children: line1 }),
3415
3505
  /* @__PURE__ */ jsx20(Text20, { children: line2 })
@@ -3462,7 +3552,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3462
3552
  alignItems: "center",
3463
3553
  justifyContent: "center",
3464
3554
  flexDirection: "column",
3465
- children: /* @__PURE__ */ jsx20(Text20, { children: confirmFocus === "delete" ? chalk14.bgRed.white.bold(" Delete ") : chalk14.red.bold("Delete") })
3555
+ children: /* @__PURE__ */ jsx20(Text20, { children: confirmFocus === "delete" ? chalk15.bgRed.white.bold(" Delete ") : tc.error.bold("Delete") })
3466
3556
  }
3467
3557
  ),
3468
3558
  /* @__PURE__ */ jsx20(
@@ -3475,7 +3565,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3475
3565
  alignItems: "center",
3476
3566
  justifyContent: "center",
3477
3567
  flexDirection: "column",
3478
- children: /* @__PURE__ */ jsx20(Text20, { children: confirmFocus === "cancel" ? chalk14.bgGray.white.bold(" Cancel ") : chalk14.gray.bold("Cancel") })
3568
+ children: /* @__PURE__ */ jsx20(Text20, { children: confirmFocus === "cancel" ? tc.btnMuted(" Cancel ") : tc.muted.bold("Cancel") })
3479
3569
  }
3480
3570
  )
3481
3571
  ] }),
@@ -3518,7 +3608,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3518
3608
  alignItems: "center",
3519
3609
  justifyContent: "center",
3520
3610
  flexDirection: "column",
3521
- children: /* @__PURE__ */ jsx20(Text20, { children: archiveFocus === "confirm" ? chalk14.bgGreen.white.bold(` ${archiveTarget.isArchived ? "Unarchive" : "Archive"} `) : chalk14.bold[archiveTarget.isArchived ? "green" : "yellow"](archiveTarget.isArchived ? "Unarchive" : "Archive") })
3611
+ children: /* @__PURE__ */ jsx20(Text20, { children: archiveFocus === "confirm" ? chalk15.bgGreen.white.bold(` ${archiveTarget.isArchived ? "Unarchive" : "Archive"} `) : (archiveTarget.isArchived ? tc.success : tc.warning).bold(archiveTarget.isArchived ? "Unarchive" : "Archive") })
3522
3612
  }
3523
3613
  ),
3524
3614
  /* @__PURE__ */ jsx20(
@@ -3531,11 +3621,11 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3531
3621
  alignItems: "center",
3532
3622
  justifyContent: "center",
3533
3623
  flexDirection: "column",
3534
- children: /* @__PURE__ */ jsx20(Text20, { children: archiveFocus === "cancel" ? chalk14.bgGray.white.bold(" Cancel ") : chalk14.gray.bold("Cancel") })
3624
+ children: /* @__PURE__ */ jsx20(Text20, { children: archiveFocus === "cancel" ? tc.btnMuted(" Cancel ") : tc.muted.bold("Cancel") })
3535
3625
  }
3536
3626
  )
3537
3627
  ] }),
3538
- /* @__PURE__ */ jsx20(Box19, { marginTop: 1, flexDirection: "row", justifyContent: "center", children: /* @__PURE__ */ jsxs19(Text20, { color: "gray", children: [
3628
+ /* @__PURE__ */ jsx20(Box19, { marginTop: 1, flexDirection: "row", justifyContent: "center", children: /* @__PURE__ */ jsxs19(Text20, { color: theme.muted, children: [
3539
3629
  "Press Enter to ",
3540
3630
  archiveFocus === "confirm" ? archiveTarget.isArchived ? "Unarchive" : "Archive" : "Cancel",
3541
3631
  " | Y to ",
@@ -3580,7 +3670,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3580
3670
  alignItems: "center",
3581
3671
  justifyContent: "center",
3582
3672
  flexDirection: "column",
3583
- children: /* @__PURE__ */ jsx20(Text20, { children: syncFocus === "confirm" ? chalk14.bgBlue.white.bold(" Sync ") : chalk14.blue.bold("Sync") })
3673
+ children: /* @__PURE__ */ jsx20(Text20, { children: syncFocus === "confirm" ? tc.btnPrimary(" Sync ") : tc.primary.bold("Sync") })
3584
3674
  }
3585
3675
  ),
3586
3676
  /* @__PURE__ */ jsx20(
@@ -3593,11 +3683,11 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3593
3683
  alignItems: "center",
3594
3684
  justifyContent: "center",
3595
3685
  flexDirection: "column",
3596
- children: /* @__PURE__ */ jsx20(Text20, { children: syncFocus === "cancel" ? chalk14.bgGray.white.bold(" Cancel ") : chalk14.gray.bold("Cancel") })
3686
+ children: /* @__PURE__ */ jsx20(Text20, { children: syncFocus === "cancel" ? tc.btnMuted(" Cancel ") : tc.muted.bold("Cancel") })
3597
3687
  }
3598
3688
  )
3599
3689
  ] }),
3600
- /* @__PURE__ */ jsx20(Box19, { marginTop: 1, flexDirection: "row", justifyContent: "center", children: /* @__PURE__ */ jsxs19(Text20, { color: "gray", children: [
3690
+ /* @__PURE__ */ jsx20(Box19, { marginTop: 1, flexDirection: "row", justifyContent: "center", children: /* @__PURE__ */ jsxs19(Text20, { color: theme.muted, children: [
3601
3691
  "Press Enter to ",
3602
3692
  syncFocus === "confirm" ? "Sync" : "Cancel",
3603
3693
  " | Y to Sync | C to Cancel"
@@ -3617,40 +3707,40 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3617
3707
  }
3618
3708
  }
3619
3709
  ) }),
3620
- syncError && /* @__PURE__ */ jsx20(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx20(Text20, { color: "magenta", children: syncError }) }),
3621
- syncing && /* @__PURE__ */ jsx20(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx20(Text20, { color: "yellow", children: "Syncing..." }) })
3622
- ] }) }) : logoutMode ? /* @__PURE__ */ jsx20(Box19, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsxs19(Box19, { flexDirection: "column", borderStyle: "round", borderColor: "cyan", paddingX: 3, paddingY: 2, width: Math.min(terminalWidth - 8, 80), children: [
3710
+ syncError && /* @__PURE__ */ jsx20(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx20(Text20, { color: theme.error, children: syncError }) }),
3711
+ syncing && /* @__PURE__ */ jsx20(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx20(Text20, { color: theme.warning, children: "Syncing..." }) })
3712
+ ] }) }) : logoutMode ? /* @__PURE__ */ jsx20(Box19, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsxs19(Box19, { flexDirection: "column", borderStyle: "round", borderColor: theme.primary, paddingX: 3, paddingY: 2, width: Math.min(terminalWidth - 8, 80), children: [
3623
3713
  /* @__PURE__ */ jsx20(Text20, { bold: true, children: "Logout Confirmation" }),
3624
- /* @__PURE__ */ jsx20(Text20, { color: "cyan", children: "Are you sure you want to log out?" }),
3714
+ /* @__PURE__ */ jsx20(Text20, { color: theme.primary, children: "Are you sure you want to log out?" }),
3625
3715
  /* @__PURE__ */ jsxs19(Box19, { marginTop: 1, flexDirection: "row", justifyContent: "center", gap: 6, children: [
3626
3716
  /* @__PURE__ */ jsx20(
3627
3717
  Box19,
3628
3718
  {
3629
3719
  borderStyle: "round",
3630
- borderColor: "cyan",
3720
+ borderColor: theme.primary,
3631
3721
  height: 3,
3632
3722
  width: 20,
3633
3723
  alignItems: "center",
3634
3724
  justifyContent: "center",
3635
3725
  flexDirection: "column",
3636
- children: /* @__PURE__ */ jsx20(Text20, { children: logoutFocus === "confirm" ? chalk14.bgCyan.white.bold(" Logout ") : chalk14.cyan.bold("Logout") })
3726
+ children: /* @__PURE__ */ jsx20(Text20, { children: logoutFocus === "confirm" ? tc.btnPrimary(" Logout ") : tc.primary.bold("Logout") })
3637
3727
  }
3638
3728
  ),
3639
3729
  /* @__PURE__ */ jsx20(
3640
3730
  Box19,
3641
3731
  {
3642
3732
  borderStyle: "round",
3643
- borderColor: logoutFocus === "cancel" ? "white" : "gray",
3733
+ borderColor: logoutFocus === "cancel" ? "white" : theme.muted,
3644
3734
  height: 3,
3645
3735
  width: 20,
3646
3736
  alignItems: "center",
3647
3737
  justifyContent: "center",
3648
3738
  flexDirection: "column",
3649
- children: /* @__PURE__ */ jsx20(Text20, { children: logoutFocus === "cancel" ? chalk14.bgGray.white.bold(" Cancel ") : chalk14.gray.bold("Cancel") })
3739
+ children: /* @__PURE__ */ jsx20(Text20, { children: logoutFocus === "cancel" ? tc.btnMuted(" Cancel ") : tc.muted.bold("Cancel") })
3650
3740
  }
3651
3741
  )
3652
3742
  ] }),
3653
- /* @__PURE__ */ jsx20(Box19, { marginTop: 1, flexDirection: "row", justifyContent: "center", children: /* @__PURE__ */ jsxs19(Text20, { color: "gray", children: [
3743
+ /* @__PURE__ */ jsx20(Box19, { marginTop: 1, flexDirection: "row", justifyContent: "center", children: /* @__PURE__ */ jsxs19(Text20, { color: theme.muted, children: [
3654
3744
  "Press Enter to ",
3655
3745
  logoutFocus === "confirm" ? "Logout" : "Cancel",
3656
3746
  " | Y to Logout | C to Cancel"
@@ -3665,41 +3755,41 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3665
3755
  }
3666
3756
  ) }) : infoMode ? /* @__PURE__ */ jsx20(Box19, { height: contentHeight, alignItems: "center", justifyContent: "center", children: (() => {
3667
3757
  const repo = infoRepo || visibleItems[cursor];
3668
- if (!repo) return /* @__PURE__ */ jsx20(Text20, { color: "red", children: "No repository selected." });
3758
+ if (!repo) return /* @__PURE__ */ jsx20(Text20, { color: theme.error, children: "No repository selected." });
3669
3759
  const langName = repo.primaryLanguage?.name || "N/A";
3670
3760
  const langColor = repo.primaryLanguage?.color || "#666666";
3671
- return /* @__PURE__ */ jsxs19(Box19, { flexDirection: "column", borderStyle: "round", borderColor: "magenta", paddingX: 3, paddingY: 2, width: Math.min(terminalWidth - 8, 90), children: [
3761
+ return /* @__PURE__ */ jsxs19(Box19, { flexDirection: "column", borderStyle: "round", borderColor: theme.internal, paddingX: 3, paddingY: 2, width: Math.min(terminalWidth - 8, 90), children: [
3672
3762
  /* @__PURE__ */ jsxs19(Text20, { bold: true, children: [
3673
3763
  "Repository Info ",
3674
- infoRepo ? chalk14.dim("(cached)") : ""
3764
+ infoRepo ? tc.muted("(cached)") : ""
3675
3765
  ] }),
3676
3766
  /* @__PURE__ */ jsx20(Box19, { height: 1, children: /* @__PURE__ */ jsx20(Text20, { children: " " }) }),
3677
- /* @__PURE__ */ jsx20(Text20, { children: chalk14.bold(repo.nameWithOwner) }),
3678
- repo.description && /* @__PURE__ */ jsx20(Text20, { color: "gray", children: repo.description }),
3767
+ /* @__PURE__ */ jsx20(Text20, { children: tc.text.bold(repo.nameWithOwner) }),
3768
+ repo.description && /* @__PURE__ */ jsx20(Text20, { color: theme.muted, children: repo.description }),
3679
3769
  /* @__PURE__ */ jsx20(Box19, { height: 1, children: /* @__PURE__ */ jsx20(Text20, { children: " " }) }),
3680
3770
  /* @__PURE__ */ jsxs19(Text20, { children: [
3681
- repo.visibility === "PRIVATE" ? chalk14.yellow("Private") : repo.visibility === "INTERNAL" ? chalk14.magenta("Internal") : chalk14.green("Public"),
3682
- repo.isArchived ? chalk14.gray(" Archived") : "",
3683
- repo.isFork ? chalk14.blue(" Fork") : ""
3771
+ repo.visibility === "PRIVATE" ? tc.private("Private") : repo.visibility === "INTERNAL" ? tc.internal("Internal") : tc.success("Public"),
3772
+ repo.isArchived ? tc.archived(" Archived") : "",
3773
+ repo.isFork ? tc.fork(" Fork") : ""
3684
3774
  ] }),
3685
- /* @__PURE__ */ jsx20(Text20, { children: chalk14.gray(`\u2605 ${repo.stargazerCount} \u2442 ${repo.forkCount}`) }),
3775
+ /* @__PURE__ */ jsx20(Text20, { children: tc.muted(`\u2605 ${repo.stargazerCount} \u2442 ${repo.forkCount}`) }),
3686
3776
  /* @__PURE__ */ jsxs19(Text20, { children: [
3687
- chalk14.hex(langColor)(`\u25CF `),
3688
- chalk14.gray(`${langName}`)
3777
+ chalk15.hex(langColor)(`\u25CF `),
3778
+ tc.muted(`${langName}`)
3689
3779
  ] }),
3690
- /* @__PURE__ */ jsxs19(Text20, { color: "gray", children: [
3780
+ /* @__PURE__ */ jsxs19(Text20, { color: theme.muted, children: [
3691
3781
  "Updated: ",
3692
3782
  formatDate(repo.updatedAt),
3693
3783
  " \u2022 Pushed: ",
3694
3784
  formatDate(repo.pushedAt)
3695
3785
  ] }),
3696
- /* @__PURE__ */ jsxs19(Text20, { color: "gray", children: [
3786
+ /* @__PURE__ */ jsxs19(Text20, { color: theme.muted, children: [
3697
3787
  "Size: ",
3698
3788
  repo.diskUsage,
3699
3789
  " KB"
3700
3790
  ] }),
3701
3791
  /* @__PURE__ */ jsx20(Box19, { height: 1, children: /* @__PURE__ */ jsx20(Text20, { children: " " }) }),
3702
- /* @__PURE__ */ jsx20(Text20, { color: "gray", children: "Press Esc or I to close" })
3792
+ /* @__PURE__ */ jsx20(Text20, { color: theme.muted, children: "Press Esc or I to close" })
3703
3793
  ] });
3704
3794
  })() }) : archiveFilterMode ? /* @__PURE__ */ jsx20(Box19, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx20(
3705
3795
  ArchiveFilterModal,
@@ -3711,7 +3801,8 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3711
3801
  setCursor(0);
3712
3802
  storeUIPrefs({ archiveFilter: filter2 });
3713
3803
  },
3714
- onCancel: () => setArchiveFilterMode(false)
3804
+ onCancel: () => setArchiveFilterMode(false),
3805
+ theme
3715
3806
  }
3716
3807
  ) }) : visibilityMode ? /* @__PURE__ */ jsx20(Box19, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx20(
3717
3808
  VisibilityModal,
@@ -3724,7 +3815,8 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3724
3815
  setCursor(0);
3725
3816
  storeUIPrefs({ visibilityFilter: filter2 });
3726
3817
  },
3727
- onCancel: () => setVisibilityMode(false)
3818
+ onCancel: () => setVisibilityMode(false),
3819
+ theme
3728
3820
  }
3729
3821
  ) }) : sortMode ? /* @__PURE__ */ jsx20(Box19, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx20(
3730
3822
  SortModal,
@@ -3736,7 +3828,8 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3736
3828
  setCursor(0);
3737
3829
  storeUIPrefs({ sortKey: sort });
3738
3830
  },
3739
- onCancel: () => setSortMode(false)
3831
+ onCancel: () => setSortMode(false),
3832
+ theme
3740
3833
  }
3741
3834
  ) }) : sortDirectionMode ? /* @__PURE__ */ jsx20(Box19, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx20(
3742
3835
  SortDirectionModal,
@@ -3749,7 +3842,8 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3749
3842
  setCursor(0);
3750
3843
  storeUIPrefs({ sortDir: direction });
3751
3844
  },
3752
- onCancel: () => setSortDirectionMode(false)
3845
+ onCancel: () => setSortDirectionMode(false),
3846
+ theme
3753
3847
  }
3754
3848
  ) }) : changeVisibilityMode && changeVisibilityTarget ? /* @__PURE__ */ jsx20(Box19, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx20(
3755
3849
  ChangeVisibilityModal,
@@ -3762,14 +3856,16 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3762
3856
  onVisibilityChange: handleVisibilityChange,
3763
3857
  onClose: closeChangeVisibilityModal,
3764
3858
  changing: changingVisibility,
3765
- error: changeVisibilityError
3859
+ error: changeVisibilityError,
3860
+ theme
3766
3861
  }
3767
3862
  ) }) : renameMode && renameTarget ? /* @__PURE__ */ jsx20(Box19, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx20(
3768
3863
  RenameModal,
3769
3864
  {
3770
3865
  repo: renameTarget,
3771
3866
  onRename: executeRename,
3772
- onCancel: closeRenameModal
3867
+ onCancel: closeRenameModal,
3868
+ theme
3773
3869
  }
3774
3870
  ) }) : copyUrlMode ? /* @__PURE__ */ jsx20(Box19, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx20(
3775
3871
  CopyUrlModal,
@@ -3777,7 +3873,8 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3777
3873
  repo: copyUrlTarget,
3778
3874
  terminalWidth,
3779
3875
  onClose: closeCopyUrlModal,
3780
- onCopy: handleCopyUrl
3876
+ onCopy: handleCopyUrl,
3877
+ theme
3781
3878
  }
3782
3879
  ) }) : unstarMode && unstarTarget ? /* @__PURE__ */ jsx20(Box19, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx20(
3783
3880
  UnstarModal,
@@ -3787,7 +3884,8 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3787
3884
  onConfirm: handleUnstar,
3788
3885
  onCancel: closeUnstarModal,
3789
3886
  isUnstarring: unstarring,
3790
- error: unstarError
3887
+ error: unstarError,
3888
+ theme
3791
3889
  }
3792
3890
  ) }) : starMode && starTarget ? /* @__PURE__ */ jsx20(Box19, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx20(
3793
3891
  StarModal,
@@ -3798,7 +3896,8 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3798
3896
  onConfirm: handleStar,
3799
3897
  onCancel: closeStarModal,
3800
3898
  isStarring: starring,
3801
- error: starError
3899
+ error: starError,
3900
+ theme
3802
3901
  }
3803
3902
  ) }) : /* @__PURE__ */ jsxs19(Fragment10, { children: [
3804
3903
  /* @__PURE__ */ jsx20(
@@ -3814,7 +3913,8 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3814
3913
  visibilityFilter,
3815
3914
  archiveFilter,
3816
3915
  isEnterprise: isEnterpriseOrg,
3817
- starsMode
3916
+ starsMode,
3917
+ theme
3818
3918
  }
3819
3919
  ),
3820
3920
  filterMode && /* @__PURE__ */ jsxs19(Box19, { marginBottom: 1, children: [
@@ -3871,7 +3971,8 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3871
3971
  maxWidth: terminalWidth - 6,
3872
3972
  spacingLines,
3873
3973
  forkTracking,
3874
- starsMode
3974
+ starsMode,
3975
+ theme
3875
3976
  },
3876
3977
  repo.nameWithOwner
3877
3978
  );
@@ -3891,20 +3992,20 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3891
3992
  ] })
3892
3993
  ] }) }),
3893
3994
  /* @__PURE__ */ jsxs19(Box19, { marginTop: 1, paddingX: 1, flexDirection: "column", children: [
3894
- /* @__PURE__ */ jsx20(Box19, { width: terminalWidth, justifyContent: "center", children: /* @__PURE__ */ jsx20(Text20, { color: "gray", dimColor: modalOpen ? true : void 0, children: "\u2191\u2193 Navigate \u2022 Ctrl+G Top \u2022 G Bottom \u2022 \u23CE/O Open \u2022 R Refresh" }) }),
3895
- /* @__PURE__ */ jsx20(Box19, { width: terminalWidth, justifyContent: "center", children: /* @__PURE__ */ jsxs19(Text20, { color: "gray", dimColor: modalOpen ? true : void 0, children: [
3896
- "/ Search \u2022 S Sort \u2022 D Direction \u2022 T Density \u2022 A Archive Filter",
3897
- !starsMode && " \u2022 V Visibility Filter",
3898
- ownerContext === "personal" && " \u2022 Shift+S Stars"
3995
+ /* @__PURE__ */ jsx20(Box19, { width: terminalWidth, justifyContent: "center", children: /* @__PURE__ */ jsx20(Text20, { color: theme.muted, dimColor: modalOpen ? true : void 0, children: "\u2191\u2193 Navigate \u2022 Ctrl+G Top \u2022 G Bottom \u2022 \u23CE/O Open \u2022 R Refresh" }) }),
3996
+ /* @__PURE__ */ jsx20(Box19, { width: terminalWidth, justifyContent: "center", children: /* @__PURE__ */ jsxs19(Text20, { color: theme.muted, dimColor: modalOpen ? true : void 0, children: [
3997
+ "/ Search \u2022 S Sort \u2022 D Direction \u2022 T Density \u2022 Shift+T Theme \u2022 A Archive Filter",
3998
+ !starsMode && " \u2022 V Visibility Filter"
3899
3999
  ] }) }),
3900
- /* @__PURE__ */ jsx20(Box19, { width: terminalWidth, justifyContent: "center", children: /* @__PURE__ */ jsx20(Text20, { color: "gray", dimColor: modalOpen ? true : void 0, children: starsMode ? "I Info \u2022 C Copy URL \u2022 U Unstar Repository" : "I Info \u2022 C Copy URL \u2022 Ctrl+S Un/Star \u2022 Ctrl+R Rename \u2022 Ctrl+A Un/Archive \u2022 Ctrl+V Change Visibility \u2022 Ctrl+F Sync Fork" }) }),
3901
- /* @__PURE__ */ jsx20(Box19, { width: terminalWidth, justifyContent: "center", children: /* @__PURE__ */ jsx20(Text20, { color: "gray", dimColor: modalOpen ? true : void 0, children: "K Cache Info \u2022 W Org Switch \u2022 Del/Backspace Delete \u2022 Ctrl+L Logout \u2022 Q Quit" }) }),
3902
- /* @__PURE__ */ jsx20(Box19, { width: terminalWidth, justifyContent: "center", marginTop: 1, children: /* @__PURE__ */ jsx20(Text20, { color: "yellow", dimColor: modalOpen ? true : void 0, children: "\u{1F496} Sponsor on GitHub: github.com/sponsors/wiiiimm" }) })
4000
+ /* @__PURE__ */ jsx20(Box19, { width: terminalWidth, justifyContent: "center", children: /* @__PURE__ */ jsx20(Text20, { color: theme.muted, dimColor: modalOpen ? true : void 0, children: starsMode ? "Shift+S My Repos \u2022 I Info \u2022 C Copy URL \u2022 U Unstar Repository" : `${ownerContext === "personal" ? "Shift+S Starred \u2022 " : ""}I Info \u2022 C Copy URL \u2022 Ctrl+S Un/Star \u2022 Ctrl+R Rename \u2022 Ctrl+A Un/Archive \u2022 Ctrl+V Change Visibility \u2022 Ctrl+F Sync Fork` }) }),
4001
+ /* @__PURE__ */ jsx20(Box19, { width: terminalWidth, justifyContent: "center", children: /* @__PURE__ */ jsx20(Text20, { color: theme.muted, dimColor: modalOpen ? true : void 0, children: "K Cache Info \u2022 W Org Switch \u2022 Del/Backspace Delete \u2022 Ctrl+L Logout \u2022 Q Quit" }) }),
4002
+ /* @__PURE__ */ jsx20(Box19, { width: terminalWidth, justifyContent: "center", marginTop: 1, children: /* @__PURE__ */ jsx20(Text20, { color: theme.warning, dimColor: modalOpen ? true : void 0, children: "\u{1F496} Sponsor on GitHub: github.com/sponsors/wiiiimm" }) })
3903
4003
  ] }),
3904
4004
  process.env.GH_MANAGER_DEBUG === "1" && /* @__PURE__ */ jsxs19(Box19, { marginTop: 1, borderStyle: "single", borderColor: "yellow", paddingX: 1, flexDirection: "column", children: [
3905
4005
  /* @__PURE__ */ jsx20(Text20, { bold: true, color: "yellow", children: "Debug Messages:" }),
3906
4006
  debugMessages.length === 0 ? /* @__PURE__ */ jsx20(Text20, { color: "gray", children: "No debug messages yet..." }) : debugMessages.map((msg, i) => /* @__PURE__ */ jsx20(Text20, { color: "gray", children: msg }, i))
3907
4007
  ] }),
4008
+ themeToast && /* @__PURE__ */ jsx20(Box19, { marginTop: 1, justifyContent: "center", children: /* @__PURE__ */ jsx20(Box19, { borderStyle: "round", borderColor: theme.primary, paddingX: 2, paddingY: 0, children: /* @__PURE__ */ jsx20(Text20, { color: theme.primary, children: themeToast }) }) }),
3908
4009
  copyToast && /* @__PURE__ */ jsx20(Box19, { marginTop: 1, justifyContent: "center", children: /* @__PURE__ */ jsx20(Box19, { borderStyle: "round", borderColor: copyToast.includes("Failed") ? "red" : "green", paddingX: 2, paddingY: 0, children: /* @__PURE__ */ jsx20(Text20, { color: copyToast.includes("Failed") ? "red" : "green", children: copyToast }) }) })
3909
4010
  ] });
3910
4011
  }
@@ -3912,7 +4013,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3912
4013
  // src/ui/components/auth/AuthMethodSelector.tsx
3913
4014
  import { useState as useState17 } from "react";
3914
4015
  import { Box as Box20, Text as Text21, useInput as useInput17 } from "ink";
3915
- import chalk15 from "chalk";
4016
+ import chalk16 from "chalk";
3916
4017
  import { jsx as jsx21, jsxs as jsxs20 } from "react/jsx-runtime";
3917
4018
  function AuthMethodSelector({ onSelect, onQuit }) {
3918
4019
  const [selectedIndex, setSelectedIndex] = useState17(0);
@@ -3951,7 +4052,7 @@ function AuthMethodSelector({ onSelect, onQuit }) {
3951
4052
  /* @__PURE__ */ jsx21(Text21, { bold: true, marginBottom: 1, children: "Choose Authentication Method" }),
3952
4053
  /* @__PURE__ */ jsx21(Box20, { flexDirection: "column", marginY: 1, children: methods.map((method, index) => {
3953
4054
  const isSelected = index === selectedIndex;
3954
- const prefix = isSelected ? chalk15.cyan("\u203A") : " ";
4055
+ const prefix = isSelected ? chalk16.cyan("\u203A") : " ";
3955
4056
  const numberPrefix = `${index + 1}.`;
3956
4057
  return /* @__PURE__ */ jsxs20(Box20, { flexDirection: "column", marginBottom: 1, children: [
3957
4058
  /* @__PURE__ */ jsx21(Text21, { children: /* @__PURE__ */ jsxs20(Text21, { color: isSelected ? "cyan" : void 0, bold: isSelected, children: [
@@ -4304,7 +4405,7 @@ function App({ initialOrgSlug: initialOrgSlug2, inlineToken: inlineToken2, inlin
4304
4405
  }
4305
4406
  });
4306
4407
  const verticalPadding = Math.floor(dims.rows * 0.05);
4307
- const header = useMemo2(() => /* @__PURE__ */ jsxs22(Box22, { flexDirection: "row", justifyContent: "space-between", marginBottom: 1, children: [
4408
+ const header = useMemo3(() => /* @__PURE__ */ jsxs22(Box22, { flexDirection: "row", justifyContent: "space-between", marginBottom: 1, children: [
4308
4409
  /* @__PURE__ */ jsxs22(Box22, { flexDirection: "row", gap: 1, children: [
4309
4410
  /* @__PURE__ */ jsxs22(Text23, { bold: true, color: "cyan", children: [
4310
4411
  " ",