gh-manager-cli 1.45.1 → 1.46.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
@@ -37,7 +37,7 @@ var require_package = __commonJS({
37
37
  "package.json"(exports, module) {
38
38
  module.exports = {
39
39
  name: "gh-manager-cli",
40
- version: "1.45.1",
40
+ version: "1.46.0",
41
41
  private: false,
42
42
  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",
43
43
  license: "MIT",
@@ -157,13 +157,13 @@ var require_package = __commonJS({
157
157
 
158
158
  // src/index.tsx
159
159
  var import_package = __toESM(require_package(), 1);
160
- import { render, Box as Box26, Text as Text27 } from "ink";
160
+ import { render, Box as Box32, Text as Text33 } from "ink";
161
161
  import "dotenv/config";
162
162
 
163
163
  // src/ui/App.tsx
164
- import { useEffect as useEffect14, useMemo as useMemo3, useState as useState21 } from "react";
165
- import { Box as Box25, Text as Text26, useApp as useApp2, useStdout as useStdout2, useInput as useInput21 } from "ink";
166
- import TextInput8 from "ink-text-input";
164
+ import { useEffect as useEffect14, useMemo as useMemo3, useState as useState26 } from "react";
165
+ import { Box as Box31, Text as Text32, useApp as useApp2, useStdout as useStdout2, useInput as useInput26 } from "ink";
166
+ import TextInput9 from "ink-text-input";
167
167
 
168
168
  // src/config/config.ts
169
169
  import fs from "fs";
@@ -411,10 +411,10 @@ async function openGitHubAuthorizationPage() {
411
411
  }
412
412
 
413
413
  // src/ui/views/RepoList.tsx
414
- import React19, { useEffect as useEffect13, useMemo as useMemo2, useState as useState19, useRef as useRef7, useCallback } from "react";
415
- import { Box as Box22, Text as Text23, useApp, useInput as useInput19, useStdout } from "ink";
416
- import TextInput7 from "ink-text-input";
417
- import chalk15 from "chalk";
414
+ import React24, { useEffect as useEffect13, useMemo as useMemo2, useState as useState24, useRef as useRef8, useCallback } from "react";
415
+ import { Box as Box28, Text as Text29, useApp, useInput as useInput24, useStdout } from "ink";
416
+ import TextInput8 from "ink-text-input";
417
+ import chalk20 from "chalk";
418
418
 
419
419
  // src/config/themes.ts
420
420
  var THEMES = {
@@ -1888,16 +1888,699 @@ function StarModal({
1888
1888
  );
1889
1889
  }
1890
1890
 
1891
- // src/ui/components/modals/OpenInBrowserModal.tsx
1891
+ // src/ui/components/modals/BulkReviewModal.tsx
1892
1892
  import { useState as useState15 } from "react";
1893
1893
  import { Box as Box15, Text as Text16, useInput as useInput15 } from "ink";
1894
- import { jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
1894
+ import chalk14 from "chalk";
1895
+ import { Fragment as Fragment8, jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
1896
+ function BulkReviewModal({
1897
+ selectedRepos,
1898
+ actionLabel,
1899
+ actionColor,
1900
+ onConfirm,
1901
+ onCancel,
1902
+ terminalWidth = 80,
1903
+ maxHeight = 20
1904
+ }) {
1905
+ const repos = Array.from(selectedRepos.values());
1906
+ const [localSelection, setLocalSelection] = useState15(
1907
+ new Map(selectedRepos)
1908
+ );
1909
+ const [listCursor, setListCursor] = useState15(0);
1910
+ const [focusArea, setFocusArea] = useState15("list");
1911
+ const [buttonFocus, setButtonFocus] = useState15("confirm");
1912
+ const localRepos = Array.from(localSelection.values());
1913
+ const maxListHeight = Math.max(3, maxHeight - 10);
1914
+ const listStart = Math.max(0, listCursor - Math.floor(maxListHeight / 2));
1915
+ const listEnd = Math.min(localRepos.length, listStart + maxListHeight);
1916
+ const bgColor = `bg${actionColor.charAt(0).toUpperCase()}${actionColor.slice(1)}`;
1917
+ useInput15((input, key) => {
1918
+ if (key.escape || input.toLowerCase() === "c") {
1919
+ onCancel();
1920
+ return;
1921
+ }
1922
+ if (focusArea === "list") {
1923
+ if (key.upArrow) {
1924
+ setListCursor((c) => Math.max(0, c - 1));
1925
+ return;
1926
+ }
1927
+ if (key.downArrow) {
1928
+ setListCursor((c) => Math.min(localRepos.length - 1, c + 1));
1929
+ return;
1930
+ }
1931
+ if (input === " ") {
1932
+ const repo = localRepos[listCursor];
1933
+ if (repo) {
1934
+ const next = new Map(localSelection);
1935
+ next.delete(repo.id);
1936
+ if (next.size === 0) {
1937
+ onCancel();
1938
+ return;
1939
+ }
1940
+ setLocalSelection(next);
1941
+ setListCursor((c) => Math.min(c, Math.max(0, next.size - 1)));
1942
+ }
1943
+ return;
1944
+ }
1945
+ if (key.tab || key.return) {
1946
+ if (localSelection.size === 0) {
1947
+ onCancel();
1948
+ return;
1949
+ }
1950
+ setFocusArea("buttons");
1951
+ return;
1952
+ }
1953
+ return;
1954
+ }
1955
+ if (key.leftArrow) {
1956
+ setButtonFocus("confirm");
1957
+ return;
1958
+ }
1959
+ if (key.rightArrow) {
1960
+ setButtonFocus("cancel");
1961
+ return;
1962
+ }
1963
+ if (key.tab) {
1964
+ setButtonFocus((f) => f === "confirm" ? "cancel" : "confirm");
1965
+ return;
1966
+ }
1967
+ if (input.toLowerCase() === "y" || key.return && buttonFocus === "confirm") {
1968
+ if (localSelection.size > 0) onConfirm(localSelection);
1969
+ return;
1970
+ }
1971
+ if (key.return && buttonFocus === "cancel") {
1972
+ onCancel();
1973
+ return;
1974
+ }
1975
+ if (key.upArrow) {
1976
+ setFocusArea("list");
1977
+ return;
1978
+ }
1979
+ });
1980
+ const modalWidth = Math.min(terminalWidth - 4, 72);
1981
+ return /* @__PURE__ */ jsxs15(
1982
+ Box15,
1983
+ {
1984
+ flexDirection: "column",
1985
+ borderStyle: "round",
1986
+ borderColor: actionColor,
1987
+ paddingX: 2,
1988
+ paddingY: 1,
1989
+ width: modalWidth,
1990
+ children: [
1991
+ /* @__PURE__ */ jsxs15(Text16, { bold: true, color: actionColor, children: [
1992
+ "Bulk ",
1993
+ actionLabel,
1994
+ " \u2014 Review Selection"
1995
+ ] }),
1996
+ /* @__PURE__ */ jsx16(Box15, { height: 1, children: /* @__PURE__ */ jsx16(Text16, { children: " " }) }),
1997
+ /* @__PURE__ */ jsx16(Text16, { children: localRepos.length === 0 ? chalk14.gray("No repositories selected.") : `${localRepos.length} repositor${localRepos.length === 1 ? "y" : "ies"} selected:` }),
1998
+ /* @__PURE__ */ jsx16(Box15, { height: 1, children: /* @__PURE__ */ jsx16(Text16, { children: " " }) }),
1999
+ localRepos.length > 0 && /* @__PURE__ */ jsxs15(Box15, { flexDirection: "column", children: [
2000
+ localRepos.slice(listStart, listEnd).map((repo, relIdx) => {
2001
+ const absIdx = listStart + relIdx;
2002
+ const isCursorRow = focusArea === "list" && absIdx === listCursor;
2003
+ let line = "";
2004
+ if (isCursorRow) {
2005
+ line += chalk14.bgCyan.black(` \u2713 ${repo.nameWithOwner.padEnd(Math.max(0, modalWidth - 10))} `);
2006
+ } else {
2007
+ line += chalk14.cyan(" \u2713 ") + chalk14.white(repo.nameWithOwner);
2008
+ }
2009
+ if (repo.isPrivate) line += chalk14.yellow(" Private");
2010
+ else if (repo.visibility === "INTERNAL") line += chalk14.magenta(" Internal");
2011
+ if (repo.isArchived) line += chalk14.gray(" Archived");
2012
+ return /* @__PURE__ */ jsx16(Box15, { children: /* @__PURE__ */ jsx16(Text16, { children: line }) }, repo.id);
2013
+ }),
2014
+ localRepos.length > maxListHeight && /* @__PURE__ */ jsx16(Text16, { color: "gray", children: ` \u2026 ${listStart > 0 ? `${listStart} above \xB7 ` : ""}${localRepos.length - listEnd > 0 ? `${localRepos.length - listEnd} below` : ""}` })
2015
+ ] }),
2016
+ /* @__PURE__ */ jsx16(Box15, { height: 1, children: /* @__PURE__ */ jsx16(Text16, { children: " " }) }),
2017
+ /* @__PURE__ */ jsx16(Text16, { color: "gray", children: "\u2191\u2193 navigate \xB7 Space unselect \xB7 Tab to buttons" }),
2018
+ /* @__PURE__ */ jsx16(Box15, { height: 1, children: /* @__PURE__ */ jsx16(Text16, { children: " " }) }),
2019
+ localRepos.length === 0 ? /* @__PURE__ */ jsx16(Box15, { flexDirection: "row", justifyContent: "center", children: /* @__PURE__ */ jsx16(Text16, { color: "gray", children: "All repos removed from selection \u2014 press Esc to cancel" }) }) : /* @__PURE__ */ jsxs15(Fragment8, { children: [
2020
+ /* @__PURE__ */ jsxs15(Box15, { flexDirection: "row", justifyContent: "center", gap: 4, children: [
2021
+ /* @__PURE__ */ jsx16(
2022
+ Box15,
2023
+ {
2024
+ borderStyle: "round",
2025
+ borderColor: focusArea === "buttons" && buttonFocus === "confirm" ? actionColor : "gray",
2026
+ height: 3,
2027
+ width: 22,
2028
+ alignItems: "center",
2029
+ justifyContent: "center",
2030
+ children: /* @__PURE__ */ jsx16(Text16, { children: focusArea === "buttons" && buttonFocus === "confirm" ? chalk14[bgColor].black.bold(` ${actionLabel} all `) : chalk14[actionColor].bold(`${actionLabel} all`) })
2031
+ }
2032
+ ),
2033
+ /* @__PURE__ */ jsx16(
2034
+ Box15,
2035
+ {
2036
+ borderStyle: "round",
2037
+ borderColor: focusArea === "buttons" && buttonFocus === "cancel" ? "white" : "gray",
2038
+ height: 3,
2039
+ width: 22,
2040
+ alignItems: "center",
2041
+ justifyContent: "center",
2042
+ children: /* @__PURE__ */ jsx16(Text16, { children: focusArea === "buttons" && buttonFocus === "cancel" ? chalk14.bgGray.white.bold(" Cancel ") : chalk14.gray.bold("Cancel") })
2043
+ }
2044
+ )
2045
+ ] }),
2046
+ /* @__PURE__ */ jsx16(Box15, { marginTop: 1, flexDirection: "row", justifyContent: "center", children: /* @__PURE__ */ jsxs15(Text16, { color: "gray", children: [
2047
+ "Tab/\u2191\u2193 navigate \xB7 Enter confirm \xB7 Y to ",
2048
+ actionLabel,
2049
+ " \xB7 C to Cancel"
2050
+ ] }) })
2051
+ ] })
2052
+ ]
2053
+ }
2054
+ );
2055
+ }
2056
+
2057
+ // src/ui/components/modals/BulkConfirmModal.tsx
2058
+ import { useRef as useRef5, useState as useState16 } from "react";
2059
+ import { Box as Box16, Text as Text17, useInput as useInput16 } from "ink";
2060
+ import chalk15 from "chalk";
2061
+ import { jsx as jsx17, jsxs as jsxs16 } from "react/jsx-runtime";
2062
+ function BulkConfirmModal({
2063
+ count,
2064
+ actionLabel,
2065
+ actionColor,
2066
+ actionVerb,
2067
+ onConfirm,
2068
+ onCancel,
2069
+ terminalWidth = 80
2070
+ }) {
2071
+ const [buttonFocus, setButtonFocus] = useState16("confirm");
2072
+ const settledRef = useRef5(false);
2073
+ const confirmOnce = () => {
2074
+ if (settledRef.current) return;
2075
+ settledRef.current = true;
2076
+ onConfirm();
2077
+ };
2078
+ const cancelOnce = () => {
2079
+ if (settledRef.current) return;
2080
+ settledRef.current = true;
2081
+ onCancel();
2082
+ };
2083
+ const bgColor = `bg${actionColor.charAt(0).toUpperCase()}${actionColor.slice(1)}`;
2084
+ useInput16((input, key) => {
2085
+ if (key.escape || input.toLowerCase() === "c") {
2086
+ cancelOnce();
2087
+ return;
2088
+ }
2089
+ if (key.leftArrow) {
2090
+ setButtonFocus("confirm");
2091
+ return;
2092
+ }
2093
+ if (key.rightArrow) {
2094
+ setButtonFocus("cancel");
2095
+ return;
2096
+ }
2097
+ if (input.toLowerCase() === "y" || key.return && buttonFocus === "confirm") {
2098
+ confirmOnce();
2099
+ return;
2100
+ }
2101
+ if (key.return && buttonFocus === "cancel") {
2102
+ cancelOnce();
2103
+ return;
2104
+ }
2105
+ });
2106
+ const modalWidth = Math.min(terminalWidth - 4, 68);
2107
+ return /* @__PURE__ */ jsxs16(
2108
+ Box16,
2109
+ {
2110
+ flexDirection: "column",
2111
+ borderStyle: "round",
2112
+ borderColor: actionColor,
2113
+ paddingX: 2,
2114
+ paddingY: 1,
2115
+ width: modalWidth,
2116
+ children: [
2117
+ /* @__PURE__ */ jsxs16(Text17, { bold: true, color: actionColor, children: [
2118
+ "Bulk ",
2119
+ actionLabel,
2120
+ " Confirmation"
2121
+ ] }),
2122
+ /* @__PURE__ */ jsx17(Box16, { height: 1, children: /* @__PURE__ */ jsx17(Text17, { children: " " }) }),
2123
+ /* @__PURE__ */ jsxs16(Text17, { children: [
2124
+ "About to",
2125
+ " ",
2126
+ /* @__PURE__ */ jsx17(Text17, { bold: true, color: actionColor, children: actionVerb }),
2127
+ " ",
2128
+ /* @__PURE__ */ jsx17(Text17, { bold: true, children: count }),
2129
+ " ",
2130
+ "repositor",
2131
+ count === 1 ? "y" : "ies",
2132
+ "."
2133
+ ] }),
2134
+ /* @__PURE__ */ jsx17(Box16, { height: 1, children: /* @__PURE__ */ jsx17(Text17, { children: " " }) }),
2135
+ /* @__PURE__ */ jsxs16(Box16, { flexDirection: "row", justifyContent: "center", gap: 4, children: [
2136
+ /* @__PURE__ */ jsx17(
2137
+ Box16,
2138
+ {
2139
+ borderStyle: "round",
2140
+ borderColor: buttonFocus === "confirm" ? actionColor : "gray",
2141
+ height: 3,
2142
+ width: 22,
2143
+ alignItems: "center",
2144
+ justifyContent: "center",
2145
+ children: /* @__PURE__ */ jsx17(Text17, { children: buttonFocus === "confirm" ? chalk15[bgColor].black.bold(` ${actionLabel} `) : chalk15[actionColor].bold(actionLabel) })
2146
+ }
2147
+ ),
2148
+ /* @__PURE__ */ jsx17(
2149
+ Box16,
2150
+ {
2151
+ borderStyle: "round",
2152
+ borderColor: buttonFocus === "cancel" ? "white" : "gray",
2153
+ height: 3,
2154
+ width: 22,
2155
+ alignItems: "center",
2156
+ justifyContent: "center",
2157
+ children: /* @__PURE__ */ jsx17(Text17, { children: buttonFocus === "cancel" ? chalk15.bgGray.white.bold(" Cancel ") : chalk15.gray.bold("Cancel") })
2158
+ }
2159
+ )
2160
+ ] }),
2161
+ /* @__PURE__ */ jsx17(Box16, { marginTop: 1, flexDirection: "row", justifyContent: "center", children: /* @__PURE__ */ jsx17(Text17, { color: "gray", children: "\u2190\u2192 navigate \xB7 Enter confirm \xB7 Y to proceed \xB7 C to Cancel" }) })
2162
+ ]
2163
+ }
2164
+ );
2165
+ }
2166
+
2167
+ // src/ui/components/modals/BulkDeleteCodeModal.tsx
2168
+ import { useState as useState17 } from "react";
2169
+ import { Box as Box17, Text as Text18, useInput as useInput17 } from "ink";
2170
+ import TextInput4 from "ink-text-input";
2171
+ import { jsx as jsx18, jsxs as jsxs17 } from "react/jsx-runtime";
2172
+ function BulkDeleteCodeModal({
2173
+ count,
2174
+ onConfirm,
2175
+ onCancel,
2176
+ terminalWidth = 80
2177
+ }) {
2178
+ const [code] = useState17(() => {
2179
+ const chars = "ABCDEFGHJKLMNPQRSTUVWXYZ23456789";
2180
+ return Array.from({ length: 4 }, () => chars[Math.floor(Math.random() * chars.length)]).join("");
2181
+ });
2182
+ const [typedCode, setTypedCode] = useState17("");
2183
+ const [error, setError] = useState17(null);
2184
+ useInput17((_input, key) => {
2185
+ if (key.escape) {
2186
+ onCancel();
2187
+ return;
2188
+ }
2189
+ });
2190
+ const modalWidth = Math.min(terminalWidth - 4, 68);
2191
+ return /* @__PURE__ */ jsxs17(
2192
+ Box17,
2193
+ {
2194
+ flexDirection: "column",
2195
+ borderStyle: "round",
2196
+ borderColor: "red",
2197
+ paddingX: 2,
2198
+ paddingY: 1,
2199
+ width: modalWidth,
2200
+ children: [
2201
+ /* @__PURE__ */ jsx18(Text18, { bold: true, color: "red", children: "\u26A0\uFE0F Confirm Bulk Delete" }),
2202
+ /* @__PURE__ */ jsx18(Box17, { height: 1, children: /* @__PURE__ */ jsx18(Text18, { children: " " }) }),
2203
+ /* @__PURE__ */ jsxs17(Text18, { children: [
2204
+ "You are about to ",
2205
+ /* @__PURE__ */ jsx18(Text18, { bold: true, color: "red", children: "permanently delete" }),
2206
+ " ",
2207
+ /* @__PURE__ */ jsx18(Text18, { bold: true, children: count }),
2208
+ " repositor",
2209
+ count === 1 ? "y" : "ies",
2210
+ "."
2211
+ ] }),
2212
+ /* @__PURE__ */ jsxs17(Text18, { color: "red", children: [
2213
+ "This action ",
2214
+ /* @__PURE__ */ jsx18(Text18, { bold: true, children: "CANNOT" }),
2215
+ " be undone."
2216
+ ] }),
2217
+ /* @__PURE__ */ jsx18(Box17, { height: 1, children: /* @__PURE__ */ jsx18(Text18, { children: " " }) }),
2218
+ /* @__PURE__ */ jsxs17(Text18, { children: [
2219
+ "To confirm, type ",
2220
+ /* @__PURE__ */ jsx18(Text18, { bold: true, color: "yellow", children: code }),
2221
+ ":"
2222
+ ] }),
2223
+ /* @__PURE__ */ jsxs17(Box17, { marginTop: 1, children: [
2224
+ /* @__PURE__ */ jsx18(Text18, { children: "Verification code: " }),
2225
+ /* @__PURE__ */ jsx18(
2226
+ TextInput4,
2227
+ {
2228
+ value: typedCode,
2229
+ onChange: (v) => {
2230
+ const up = v.toUpperCase().slice(0, 4);
2231
+ setTypedCode(up);
2232
+ setError(null);
2233
+ if (up.length === 4) {
2234
+ if (up === code) {
2235
+ onConfirm();
2236
+ } else {
2237
+ setError("Code does not match. Try again.");
2238
+ setTypedCode("");
2239
+ }
2240
+ }
2241
+ },
2242
+ onSubmit: () => {
2243
+ },
2244
+ placeholder: code
2245
+ }
2246
+ )
2247
+ ] }),
2248
+ error && /* @__PURE__ */ jsx18(Box17, { marginTop: 1, children: /* @__PURE__ */ jsx18(Text18, { color: "red", children: error }) }),
2249
+ /* @__PURE__ */ jsx18(Box17, { marginTop: 1, children: /* @__PURE__ */ jsx18(Text18, { color: "gray", children: "Press Esc to cancel" }) })
2250
+ ]
2251
+ }
2252
+ );
2253
+ }
2254
+
2255
+ // src/ui/components/modals/BulkIntentModal.tsx
2256
+ import { useState as useState18 } from "react";
2257
+ import { Box as Box18, Text as Text19, useInput as useInput18 } from "ink";
2258
+ import chalk16 from "chalk";
2259
+ import { jsx as jsx19, jsxs as jsxs18 } from "react/jsx-runtime";
2260
+ function BulkIntentModal({
2261
+ kind,
2262
+ count,
2263
+ onChoose,
2264
+ onCancel,
2265
+ terminalWidth = 80
2266
+ }) {
2267
+ const options = kind === "archive" ? [
2268
+ { action: "archive", label: "Archive all", color: "yellow" },
2269
+ { action: "unarchive", label: "Unarchive all", color: "green" }
2270
+ ] : [
2271
+ { action: "star", label: "Star all", color: "cyan" },
2272
+ { action: "unstar", label: "Unstar all", color: "magenta" }
2273
+ ];
2274
+ const cancelIndex = options.length;
2275
+ const [focus, setFocus] = useState18(0);
2276
+ useInput18((input, key) => {
2277
+ if (key.escape || input.toLowerCase() === "c") {
2278
+ onCancel();
2279
+ return;
2280
+ }
2281
+ if (key.leftArrow) {
2282
+ setFocus((f) => Math.max(0, f - 1));
2283
+ return;
2284
+ }
2285
+ if (key.rightArrow) {
2286
+ setFocus((f) => Math.min(cancelIndex, f + 1));
2287
+ return;
2288
+ }
2289
+ if (key.return) {
2290
+ if (focus === cancelIndex) onCancel();
2291
+ else onChoose(options[focus].action);
2292
+ return;
2293
+ }
2294
+ });
2295
+ const modalWidth = Math.min(terminalWidth - 4, 72);
2296
+ const noun = kind === "archive" ? "archived" : "starred";
2297
+ return /* @__PURE__ */ jsxs18(
2298
+ Box18,
2299
+ {
2300
+ flexDirection: "column",
2301
+ borderStyle: "round",
2302
+ borderColor: "cyan",
2303
+ paddingX: 2,
2304
+ paddingY: 1,
2305
+ width: modalWidth,
2306
+ children: [
2307
+ /* @__PURE__ */ jsxs18(Text19, { bold: true, color: "cyan", children: [
2308
+ "Mixed ",
2309
+ kind === "archive" ? "Archive" : "Star",
2310
+ " State"
2311
+ ] }),
2312
+ /* @__PURE__ */ jsx19(Box18, { height: 1, children: /* @__PURE__ */ jsx19(Text19, { children: " " }) }),
2313
+ /* @__PURE__ */ jsxs18(Text19, { children: [
2314
+ "The ",
2315
+ count,
2316
+ " selected repositor",
2317
+ count === 1 ? "y has" : "ies have",
2318
+ " a mix of ",
2319
+ noun,
2320
+ " and",
2321
+ " ",
2322
+ "not-",
2323
+ noun,
2324
+ " states. Choose the state to apply to all of them:"
2325
+ ] }),
2326
+ /* @__PURE__ */ jsx19(Box18, { height: 1, children: /* @__PURE__ */ jsx19(Text19, { children: " " }) }),
2327
+ /* @__PURE__ */ jsxs18(Box18, { flexDirection: "row", justifyContent: "center", gap: 3, children: [
2328
+ options.map((opt, idx) => {
2329
+ const bg = `bg${opt.color.charAt(0).toUpperCase()}${opt.color.slice(1)}`;
2330
+ return /* @__PURE__ */ jsx19(
2331
+ Box18,
2332
+ {
2333
+ borderStyle: "round",
2334
+ borderColor: focus === idx ? opt.color : "gray",
2335
+ height: 3,
2336
+ width: 18,
2337
+ alignItems: "center",
2338
+ justifyContent: "center",
2339
+ children: /* @__PURE__ */ jsx19(Text19, { children: focus === idx ? chalk16[bg].black.bold(` ${opt.label} `) : chalk16[opt.color].bold(opt.label) })
2340
+ },
2341
+ opt.action
2342
+ );
2343
+ }),
2344
+ /* @__PURE__ */ jsx19(
2345
+ Box18,
2346
+ {
2347
+ borderStyle: "round",
2348
+ borderColor: focus === cancelIndex ? "white" : "gray",
2349
+ height: 3,
2350
+ width: 14,
2351
+ alignItems: "center",
2352
+ justifyContent: "center",
2353
+ children: /* @__PURE__ */ jsx19(Text19, { children: focus === cancelIndex ? chalk16.bgGray.white.bold(" Cancel ") : chalk16.gray.bold("Cancel") })
2354
+ }
2355
+ )
2356
+ ] }),
2357
+ /* @__PURE__ */ jsx19(Box18, { marginTop: 1, flexDirection: "row", justifyContent: "center", children: /* @__PURE__ */ jsx19(Text19, { color: "gray", children: "\u2190\u2192 navigate \xB7 Enter select \xB7 C/Esc cancel" }) })
2358
+ ]
2359
+ }
2360
+ );
2361
+ }
2362
+
2363
+ // src/ui/components/modals/BulkVisibilityModal.tsx
2364
+ import { useState as useState19 } from "react";
2365
+ import { Box as Box19, Text as Text20, useInput as useInput19 } from "ink";
2366
+ import chalk17 from "chalk";
2367
+ import { jsx as jsx20, jsxs as jsxs19 } from "react/jsx-runtime";
2368
+ function BulkVisibilityModal({
2369
+ count,
2370
+ isEnterprise = false,
2371
+ onChoose,
2372
+ onCancel,
2373
+ terminalWidth = 80
2374
+ }) {
2375
+ const options = [
2376
+ { target: "PUBLIC", label: "Public", color: "green" },
2377
+ { target: "PRIVATE", label: "Private", color: "yellow" },
2378
+ ...isEnterprise ? [{ target: "INTERNAL", label: "Internal", color: "cyan" }] : []
2379
+ ];
2380
+ const cancelIndex = options.length;
2381
+ const [focus, setFocus] = useState19(0);
2382
+ useInput19((input, key) => {
2383
+ if (key.escape || input.toLowerCase() === "c") {
2384
+ onCancel();
2385
+ return;
2386
+ }
2387
+ if (key.leftArrow) {
2388
+ setFocus((f) => Math.max(0, f - 1));
2389
+ return;
2390
+ }
2391
+ if (key.rightArrow) {
2392
+ setFocus((f) => Math.min(cancelIndex, f + 1));
2393
+ return;
2394
+ }
2395
+ if (key.return) {
2396
+ if (focus === cancelIndex) onCancel();
2397
+ else onChoose(options[focus].target);
2398
+ return;
2399
+ }
2400
+ });
2401
+ const modalWidth = Math.min(terminalWidth - 4, 72);
2402
+ return /* @__PURE__ */ jsxs19(
2403
+ Box19,
2404
+ {
2405
+ flexDirection: "column",
2406
+ borderStyle: "round",
2407
+ borderColor: "cyan",
2408
+ paddingX: 2,
2409
+ paddingY: 1,
2410
+ width: modalWidth,
2411
+ children: [
2412
+ /* @__PURE__ */ jsx20(Text20, { bold: true, color: "cyan", children: "Bulk Change Visibility" }),
2413
+ /* @__PURE__ */ jsx20(Box19, { height: 1, children: /* @__PURE__ */ jsx20(Text20, { children: " " }) }),
2414
+ /* @__PURE__ */ jsxs19(Text20, { children: [
2415
+ "Set the visibility of the ",
2416
+ count,
2417
+ " selected repositor",
2418
+ count === 1 ? "y" : "ies",
2419
+ " to:"
2420
+ ] }),
2421
+ /* @__PURE__ */ jsx20(Box19, { height: 1, children: /* @__PURE__ */ jsx20(Text20, { children: " " }) }),
2422
+ /* @__PURE__ */ jsxs19(Box19, { flexDirection: "row", justifyContent: "center", gap: 3, children: [
2423
+ options.map((opt, idx) => {
2424
+ const bg = `bg${opt.color.charAt(0).toUpperCase()}${opt.color.slice(1)}`;
2425
+ return /* @__PURE__ */ jsx20(
2426
+ Box19,
2427
+ {
2428
+ borderStyle: "round",
2429
+ borderColor: focus === idx ? opt.color : "gray",
2430
+ height: 3,
2431
+ width: 16,
2432
+ alignItems: "center",
2433
+ justifyContent: "center",
2434
+ children: /* @__PURE__ */ jsx20(Text20, { children: focus === idx ? chalk17[bg].black.bold(` ${opt.label} `) : chalk17[opt.color].bold(opt.label) })
2435
+ },
2436
+ opt.target
2437
+ );
2438
+ }),
2439
+ /* @__PURE__ */ jsx20(
2440
+ Box19,
2441
+ {
2442
+ borderStyle: "round",
2443
+ borderColor: focus === cancelIndex ? "white" : "gray",
2444
+ height: 3,
2445
+ width: 14,
2446
+ alignItems: "center",
2447
+ justifyContent: "center",
2448
+ children: /* @__PURE__ */ jsx20(Text20, { children: focus === cancelIndex ? chalk17.bgGray.white.bold(" Cancel ") : chalk17.gray.bold("Cancel") })
2449
+ }
2450
+ )
2451
+ ] }),
2452
+ /* @__PURE__ */ jsx20(Box19, { marginTop: 1, flexDirection: "row", justifyContent: "center", children: /* @__PURE__ */ jsx20(Text20, { color: "gray", children: "\u2190\u2192 navigate \xB7 Enter select \xB7 C/Esc cancel" }) })
2453
+ ]
2454
+ }
2455
+ );
2456
+ }
2457
+
2458
+ // src/ui/components/modals/BulkProgressModal.tsx
2459
+ import { Box as Box20, Text as Text21 } from "ink";
2460
+ import chalk18 from "chalk";
2461
+ import { Fragment as Fragment9, jsx as jsx21, jsxs as jsxs20 } from "react/jsx-runtime";
2462
+ function BulkProgressModal({
2463
+ state,
2464
+ actionLabel,
2465
+ gerund,
2466
+ pastVerb,
2467
+ actionColor,
2468
+ terminalWidth = 80
2469
+ }) {
2470
+ const succeeded = state.completed - state.failed.length;
2471
+ const modalWidth = Math.min(terminalWidth - 4, 68);
2472
+ return /* @__PURE__ */ jsxs20(
2473
+ Box20,
2474
+ {
2475
+ flexDirection: "column",
2476
+ borderStyle: "round",
2477
+ borderColor: state.done ? state.failed.length === 0 ? "green" : "yellow" : actionColor,
2478
+ paddingX: 2,
2479
+ paddingY: 1,
2480
+ width: modalWidth,
2481
+ children: [
2482
+ /* @__PURE__ */ jsxs20(Text21, { bold: true, color: state.done ? state.failed.length === 0 ? "green" : "yellow" : actionColor, children: [
2483
+ "Bulk ",
2484
+ actionLabel,
2485
+ " Progress"
2486
+ ] }),
2487
+ /* @__PURE__ */ jsx21(Box20, { height: 1, children: /* @__PURE__ */ jsx21(Text21, { children: " " }) }),
2488
+ !state.done ? /* @__PURE__ */ jsxs20(Fragment9, { children: [
2489
+ /* @__PURE__ */ jsxs20(Box20, { flexDirection: "row", children: [
2490
+ /* @__PURE__ */ jsx21(Box20, { width: 2, flexShrink: 0, flexGrow: 0, marginRight: 1, children: /* @__PURE__ */ jsx21(Text21, { color: "cyan", children: /* @__PURE__ */ jsx21(SlowSpinner, {}) }) }),
2491
+ /* @__PURE__ */ jsxs20(Text21, { children: [
2492
+ gerund,
2493
+ " ",
2494
+ Math.min(state.completed + 1, state.total),
2495
+ " of ",
2496
+ state.total,
2497
+ state.currentRepo ? `: ${chalk18.cyan(state.currentRepo.nameWithOwner)}` : "\u2026"
2498
+ ] })
2499
+ ] }),
2500
+ state.failed.length > 0 && /* @__PURE__ */ jsxs20(Box20, { marginTop: 1, flexDirection: "column", children: [
2501
+ /* @__PURE__ */ jsx21(Text21, { color: "yellow", children: "Failures so far:" }),
2502
+ state.failed.map(({ repo, error }) => /* @__PURE__ */ jsxs20(Text21, { color: "red", children: [
2503
+ " \u2717 ",
2504
+ repo.nameWithOwner,
2505
+ ": ",
2506
+ error
2507
+ ] }, repo.id))
2508
+ ] })
2509
+ ] }) : /* @__PURE__ */ jsxs20(Fragment9, { children: [
2510
+ state.failed.length === 0 ? /* @__PURE__ */ jsxs20(Text21, { color: "green", children: [
2511
+ "\u2713 All ",
2512
+ state.total,
2513
+ " repositor",
2514
+ state.total === 1 ? "y" : "ies",
2515
+ " ",
2516
+ pastVerb,
2517
+ " successfully."
2518
+ ] }) : /* @__PURE__ */ jsxs20(Fragment9, { children: [
2519
+ /* @__PURE__ */ jsxs20(Text21, { color: "yellow", children: [
2520
+ succeeded,
2521
+ "/",
2522
+ state.total,
2523
+ " repositor",
2524
+ state.total === 1 ? "y" : "ies",
2525
+ " ",
2526
+ pastVerb,
2527
+ " successfully."
2528
+ ] }),
2529
+ /* @__PURE__ */ jsxs20(Box20, { marginTop: 1, flexDirection: "column", children: [
2530
+ /* @__PURE__ */ jsxs20(Text21, { color: "red", children: [
2531
+ state.failed.length,
2532
+ " failed:"
2533
+ ] }),
2534
+ state.failed.map(({ repo, error }) => /* @__PURE__ */ jsxs20(Text21, { color: "red", children: [
2535
+ " \u2717 ",
2536
+ repo.nameWithOwner,
2537
+ ": ",
2538
+ error
2539
+ ] }, repo.id))
2540
+ ] })
2541
+ ] }),
2542
+ /* @__PURE__ */ jsx21(Box20, { marginTop: 1, children: /* @__PURE__ */ jsx21(Text21, { color: "gray", children: "Press any key to continue" }) })
2543
+ ] })
2544
+ ]
2545
+ }
2546
+ );
2547
+ }
2548
+
2549
+ // src/ui/components/modals/bulkActions.ts
2550
+ function visibilityLabel(target) {
2551
+ return target === "PUBLIC" ? "Public" : target === "PRIVATE" ? "Private" : "Internal";
2552
+ }
2553
+ function bulkActionMeta(action, visibilityTarget) {
2554
+ switch (action) {
2555
+ case "delete":
2556
+ return { label: "Delete", gerund: "Deleting", color: "red", pastVerb: "deleted" };
2557
+ case "archive":
2558
+ return { label: "Archive", gerund: "Archiving", color: "yellow", pastVerb: "archived" };
2559
+ case "unarchive":
2560
+ return { label: "Unarchive", gerund: "Unarchiving", color: "green", pastVerb: "unarchived" };
2561
+ case "star":
2562
+ return { label: "Star", gerund: "Starring", color: "cyan", pastVerb: "starred" };
2563
+ case "unstar":
2564
+ return { label: "Unstar", gerund: "Unstarring", color: "magenta", pastVerb: "unstarred" };
2565
+ case "visibility": {
2566
+ const target = visibilityTarget ?? "PRIVATE";
2567
+ const name = visibilityLabel(target);
2568
+ const color = target === "PUBLIC" ? "green" : target === "PRIVATE" ? "yellow" : "cyan";
2569
+ return { label: `Make ${name}`, gerund: `Making ${name}`, color, pastVerb: `made ${name.toLowerCase()}` };
2570
+ }
2571
+ }
2572
+ }
2573
+
2574
+ // src/ui/components/modals/OpenInBrowserModal.tsx
2575
+ import { useState as useState20 } from "react";
2576
+ import { Box as Box21, Text as Text22, useInput as useInput20 } from "ink";
2577
+ import { jsx as jsx22, jsxs as jsxs21 } from "react/jsx-runtime";
1895
2578
  function OpenInBrowserModal({ repo, onOpen, onCancel, theme: themeProp }) {
1896
2579
  const { theme, c } = useTheme(themeProp?.name ?? "default");
1897
- const [focus, setFocus] = useState15("this");
2580
+ const [focus, setFocus] = useState20("this");
1898
2581
  const forkUrl = `https://github.com/${repo.nameWithOwner}`;
1899
2582
  const upstreamUrl = repo.parent ? `https://github.com/${repo.parent.nameWithOwner}` : null;
1900
- useInput15((input, key) => {
2583
+ useInput20((input, key) => {
1901
2584
  if (key.escape || input.toLowerCase() === "c") {
1902
2585
  onCancel();
1903
2586
  return;
@@ -1923,8 +2606,8 @@ function OpenInBrowserModal({ repo, onOpen, onCancel, theme: themeProp }) {
1923
2606
  return;
1924
2607
  }
1925
2608
  });
1926
- return /* @__PURE__ */ jsxs15(
1927
- Box15,
2609
+ return /* @__PURE__ */ jsxs21(
2610
+ Box21,
1928
2611
  {
1929
2612
  flexDirection: "column",
1930
2613
  borderStyle: "round",
@@ -1933,40 +2616,40 @@ function OpenInBrowserModal({ repo, onOpen, onCancel, theme: themeProp }) {
1933
2616
  paddingY: 2,
1934
2617
  width: 62,
1935
2618
  children: [
1936
- /* @__PURE__ */ jsx16(Text16, { bold: true, color: theme.primary, children: "Open in Browser" }),
1937
- /* @__PURE__ */ jsx16(Box15, { height: 1, children: /* @__PURE__ */ jsx16(Text16, { children: " " }) }),
1938
- /* @__PURE__ */ jsx16(Text16, { bold: true, children: repo.nameWithOwner }),
1939
- repo.parent && /* @__PURE__ */ jsxs15(Text16, { color: theme.muted, children: [
2619
+ /* @__PURE__ */ jsx22(Text22, { bold: true, color: theme.primary, children: "Open in Browser" }),
2620
+ /* @__PURE__ */ jsx22(Box21, { height: 1, children: /* @__PURE__ */ jsx22(Text22, { children: " " }) }),
2621
+ /* @__PURE__ */ jsx22(Text22, { bold: true, children: repo.nameWithOwner }),
2622
+ repo.parent && /* @__PURE__ */ jsxs21(Text22, { color: theme.muted, children: [
1940
2623
  "Fork of ",
1941
2624
  repo.parent.nameWithOwner
1942
2625
  ] }),
1943
- /* @__PURE__ */ jsx16(Box15, { height: 1, children: /* @__PURE__ */ jsx16(Text16, { children: " " }) }),
1944
- /* @__PURE__ */ jsx16(Text16, { children: "Which repository would you like to open?" }),
1945
- /* @__PURE__ */ jsx16(Box15, { height: 1, children: /* @__PURE__ */ jsx16(Text16, { children: " " }) }),
1946
- /* @__PURE__ */ jsxs15(Box15, { marginTop: 1, flexDirection: "row", justifyContent: "center", gap: 4, children: [
1947
- /* @__PURE__ */ jsx16(Box15, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx16(Text16, { children: focus === "this" ? c.primary.inverse.bold(" This Repository ") : c.primary.bold("This Repository") }) }),
1948
- /* @__PURE__ */ jsx16(Box15, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx16(Text16, { children: focus === "upstream" ? c.success.inverse.bold(" Parent/Upstream ") : c.success.bold("Parent/Upstream") }) })
2626
+ /* @__PURE__ */ jsx22(Box21, { height: 1, children: /* @__PURE__ */ jsx22(Text22, { children: " " }) }),
2627
+ /* @__PURE__ */ jsx22(Text22, { children: "Which repository would you like to open?" }),
2628
+ /* @__PURE__ */ jsx22(Box21, { height: 1, children: /* @__PURE__ */ jsx22(Text22, { children: " " }) }),
2629
+ /* @__PURE__ */ jsxs21(Box21, { marginTop: 1, flexDirection: "row", justifyContent: "center", gap: 4, children: [
2630
+ /* @__PURE__ */ jsx22(Box21, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx22(Text22, { children: focus === "this" ? c.primary.inverse.bold(" This Repository ") : c.primary.bold("This Repository") }) }),
2631
+ /* @__PURE__ */ jsx22(Box21, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx22(Text22, { children: focus === "upstream" ? c.success.inverse.bold(" Parent/Upstream ") : c.success.bold("Parent/Upstream") }) })
1949
2632
  ] }),
1950
- /* @__PURE__ */ jsx16(Box15, { marginTop: 1, flexDirection: "row", justifyContent: "center", children: /* @__PURE__ */ jsx16(Text16, { color: theme.muted, children: "\u2190/\u2192 Choose \u2022 Enter to Open \u2022 T This \u2022 U Upstream \u2022 C/Esc Cancel" }) })
2633
+ /* @__PURE__ */ jsx22(Box21, { marginTop: 1, flexDirection: "row", justifyContent: "center", children: /* @__PURE__ */ jsx22(Text22, { color: theme.muted, children: "\u2190/\u2192 Choose \u2022 Enter to Open \u2022 T This \u2022 U Upstream \u2022 C/Esc Cancel" }) })
1951
2634
  ]
1952
2635
  }
1953
2636
  );
1954
2637
  }
1955
2638
 
1956
2639
  // src/ui/components/modals/CreateRepoModal.tsx
1957
- import { useState as useState16, useRef as useRef5 } from "react";
1958
- import { Box as Box16, Text as Text17, useInput as useInput16 } from "ink";
1959
- import TextInput4 from "ink-text-input";
1960
- import { Fragment as Fragment8, jsx as jsx17, jsxs as jsxs16 } from "react/jsx-runtime";
2640
+ import { useState as useState21, useRef as useRef6 } from "react";
2641
+ import { Box as Box22, Text as Text23, useInput as useInput21 } from "ink";
2642
+ import TextInput5 from "ink-text-input";
2643
+ import { Fragment as Fragment10, jsx as jsx23, jsxs as jsxs22 } from "react/jsx-runtime";
1961
2644
  function CreateRepoModal({ ownerSlug, isOrg, isEnterprise, onCreate, onCancel, theme: themeProp }) {
1962
2645
  const { theme, c } = useTheme(themeProp?.name ?? "default");
1963
- const [name, setName] = useState16("");
1964
- const [visibility, setVisibility] = useState16("PRIVATE");
1965
- const [creating, setCreating] = useState16(false);
1966
- const [error, setError] = useState16(null);
1967
- const submittingRef = useRef5(false);
2646
+ const [name, setName] = useState21("");
2647
+ const [visibility, setVisibility] = useState21("PRIVATE");
2648
+ const [creating, setCreating] = useState21(false);
2649
+ const [error, setError] = useState21(null);
2650
+ const submittingRef = useRef6(false);
1968
2651
  const visibilities = isOrg && isEnterprise ? ["PRIVATE", "PUBLIC", "INTERNAL"] : ["PRIVATE", "PUBLIC"];
1969
- useInput16((input, key) => {
2652
+ useInput21((input, key) => {
1970
2653
  if (submittingRef.current) return;
1971
2654
  if (key.escape) {
1972
2655
  onCancel();
@@ -2003,8 +2686,8 @@ function CreateRepoModal({ ownerSlug, isOrg, isEnterprise, onCreate, onCancel, t
2003
2686
  };
2004
2687
  const visLabel = (v) => v === "PUBLIC" ? "Public" : v === "PRIVATE" ? "Private" : "Internal";
2005
2688
  const isDisabled = !name.trim();
2006
- return /* @__PURE__ */ jsxs16(
2007
- Box16,
2689
+ return /* @__PURE__ */ jsxs22(
2690
+ Box22,
2008
2691
  {
2009
2692
  flexDirection: "column",
2010
2693
  borderStyle: "round",
@@ -2013,23 +2696,23 @@ function CreateRepoModal({ ownerSlug, isOrg, isEnterprise, onCreate, onCancel, t
2013
2696
  paddingY: 2,
2014
2697
  width: 80,
2015
2698
  children: [
2016
- /* @__PURE__ */ jsx17(Text17, { bold: true, color: theme.primary, children: "Create New Repository" }),
2017
- /* @__PURE__ */ jsx17(Box16, { height: 1, children: /* @__PURE__ */ jsx17(Text17, { children: " " }) }),
2018
- /* @__PURE__ */ jsxs16(Text17, { color: theme.muted, children: [
2699
+ /* @__PURE__ */ jsx23(Text23, { bold: true, color: theme.primary, children: "Create New Repository" }),
2700
+ /* @__PURE__ */ jsx23(Box22, { height: 1, children: /* @__PURE__ */ jsx23(Text23, { children: " " }) }),
2701
+ /* @__PURE__ */ jsxs22(Text23, { color: theme.muted, children: [
2019
2702
  "Owner: ",
2020
2703
  ownerSlug,
2021
2704
  " ",
2022
2705
  isOrg ? "(organisation)" : "(personal)"
2023
2706
  ] }),
2024
- /* @__PURE__ */ jsx17(Box16, { height: 1, children: /* @__PURE__ */ jsx17(Text17, { children: " " }) }),
2025
- /* @__PURE__ */ jsx17(Text17, { children: "Repository name:" }),
2026
- /* @__PURE__ */ jsxs16(Box16, { flexDirection: "row", alignItems: "center", children: [
2027
- /* @__PURE__ */ jsxs16(Text17, { children: [
2707
+ /* @__PURE__ */ jsx23(Box22, { height: 1, children: /* @__PURE__ */ jsx23(Text23, { children: " " }) }),
2708
+ /* @__PURE__ */ jsx23(Text23, { children: "Repository name:" }),
2709
+ /* @__PURE__ */ jsxs22(Box22, { flexDirection: "row", alignItems: "center", children: [
2710
+ /* @__PURE__ */ jsxs22(Text23, { children: [
2028
2711
  ownerSlug,
2029
2712
  "/"
2030
2713
  ] }),
2031
- /* @__PURE__ */ jsx17(
2032
- TextInput4,
2714
+ /* @__PURE__ */ jsx23(
2715
+ TextInput5,
2033
2716
  {
2034
2717
  value: name,
2035
2718
  onChange: handleNameChange,
@@ -2038,42 +2721,42 @@ function CreateRepoModal({ ownerSlug, isOrg, isEnterprise, onCreate, onCancel, t
2038
2721
  }
2039
2722
  )
2040
2723
  ] }),
2041
- /* @__PURE__ */ jsx17(Box16, { height: 1, children: /* @__PURE__ */ jsx17(Text17, { children: " " }) }),
2042
- /* @__PURE__ */ jsxs16(Box16, { flexDirection: "row", children: [
2043
- /* @__PURE__ */ jsx17(Text17, { children: "Visibility: " }),
2044
- visibilities.map((v, i) => /* @__PURE__ */ jsxs16(Text17, { children: [
2724
+ /* @__PURE__ */ jsx23(Box22, { height: 1, children: /* @__PURE__ */ jsx23(Text23, { children: " " }) }),
2725
+ /* @__PURE__ */ jsxs22(Box22, { flexDirection: "row", children: [
2726
+ /* @__PURE__ */ jsx23(Text23, { children: "Visibility: " }),
2727
+ visibilities.map((v, i) => /* @__PURE__ */ jsxs22(Text23, { children: [
2045
2728
  v === visibility ? c.btnPrimary(` ${visLabel(v)} `) : c.muted(visLabel(v)),
2046
2729
  i < visibilities.length - 1 ? " " : ""
2047
2730
  ] }, v))
2048
2731
  ] }),
2049
- creating ? /* @__PURE__ */ jsx17(Box16, { marginTop: 2, justifyContent: "center", children: /* @__PURE__ */ jsxs16(Box16, { flexDirection: "row", children: [
2050
- /* @__PURE__ */ jsx17(Box16, { marginRight: 1, children: /* @__PURE__ */ jsx17(SlowSpinner, {}) }),
2051
- /* @__PURE__ */ jsx17(Text17, { color: theme.primary, children: "Creating repository..." })
2052
- ] }) }) : /* @__PURE__ */ jsxs16(Fragment8, { children: [
2053
- /* @__PURE__ */ jsx17(Box16, { marginTop: 2, children: /* @__PURE__ */ jsx17(Text17, { color: theme.muted, children: isDisabled ? "Enter a name to create the repository" : `Press Enter to create "${ownerSlug}/${name}"` }) }),
2054
- /* @__PURE__ */ jsx17(Box16, { marginTop: 1, children: /* @__PURE__ */ jsx17(Text17, { color: theme.muted, children: "Tab to change visibility \u2022 Esc to cancel" }) })
2732
+ creating ? /* @__PURE__ */ jsx23(Box22, { marginTop: 2, justifyContent: "center", children: /* @__PURE__ */ jsxs22(Box22, { flexDirection: "row", children: [
2733
+ /* @__PURE__ */ jsx23(Box22, { marginRight: 1, children: /* @__PURE__ */ jsx23(SlowSpinner, {}) }),
2734
+ /* @__PURE__ */ jsx23(Text23, { color: theme.primary, children: "Creating repository..." })
2735
+ ] }) }) : /* @__PURE__ */ jsxs22(Fragment10, { children: [
2736
+ /* @__PURE__ */ jsx23(Box22, { marginTop: 2, children: /* @__PURE__ */ jsx23(Text23, { color: theme.muted, children: isDisabled ? "Enter a name to create the repository" : `Press Enter to create "${ownerSlug}/${name}"` }) }),
2737
+ /* @__PURE__ */ jsx23(Box22, { marginTop: 1, children: /* @__PURE__ */ jsx23(Text23, { color: theme.muted, children: "Tab to change visibility \u2022 Esc to cancel" }) })
2055
2738
  ] }),
2056
- error && /* @__PURE__ */ jsx17(Box16, { marginTop: 1, children: /* @__PURE__ */ jsx17(Text17, { color: theme.error, children: error }) })
2739
+ error && /* @__PURE__ */ jsx23(Box22, { marginTop: 1, children: /* @__PURE__ */ jsx23(Text23, { color: theme.error, children: error }) })
2057
2740
  ]
2058
2741
  }
2059
2742
  );
2060
2743
  }
2061
2744
 
2062
2745
  // src/ui/components/modals/TransferModal.tsx
2063
- import { useState as useState17, useRef as useRef6, useEffect as useEffect11 } from "react";
2064
- import { Box as Box17, Text as Text18, useInput as useInput17 } from "ink";
2065
- import TextInput5 from "ink-text-input";
2066
- import { Fragment as Fragment9, jsx as jsx18, jsxs as jsxs17 } from "react/jsx-runtime";
2746
+ import { useState as useState22, useRef as useRef7, useEffect as useEffect11 } from "react";
2747
+ import { Box as Box23, Text as Text24, useInput as useInput22 } from "ink";
2748
+ import TextInput6 from "ink-text-input";
2749
+ import { Fragment as Fragment11, jsx as jsx24, jsxs as jsxs23 } from "react/jsx-runtime";
2067
2750
  function TransferModal({ repo, onTransfer, onCancel, theme: themeProp }) {
2068
2751
  const { theme, c } = useTheme(themeProp?.name ?? "default");
2069
- const [newOwner, setNewOwner] = useState17("");
2070
- const [stage, setStage] = useState17("input");
2071
- const [focus, setFocus] = useState17("cancel");
2072
- const [transferring, setTransferring] = useState17(false);
2073
- const [error, setError] = useState17(null);
2074
- const [transferCode, setTransferCode] = useState17("");
2075
- const [typedCode, setTypedCode] = useState17("");
2076
- const submittingRef = useRef6(false);
2752
+ const [newOwner, setNewOwner] = useState22("");
2753
+ const [stage, setStage] = useState22("input");
2754
+ const [focus, setFocus] = useState22("cancel");
2755
+ const [transferring, setTransferring] = useState22(false);
2756
+ const [error, setError] = useState22(null);
2757
+ const [transferCode, setTransferCode] = useState22("");
2758
+ const [typedCode, setTypedCode] = useState22("");
2759
+ const submittingRef = useRef7(false);
2077
2760
  const owner = repo ? repo.nameWithOwner.split("/")[0] : "";
2078
2761
  useEffect11(() => {
2079
2762
  if (repo) {
@@ -2089,7 +2772,7 @@ function TransferModal({ repo, onTransfer, onCancel, theme: themeProp }) {
2089
2772
  setError(null);
2090
2773
  }
2091
2774
  }, [repo]);
2092
- useInput17((input, key) => {
2775
+ useInput22((input, key) => {
2093
2776
  if (submittingRef.current || !repo) return;
2094
2777
  if (key.escape) {
2095
2778
  onCancel();
@@ -2164,8 +2847,8 @@ function TransferModal({ repo, onTransfer, onCancel, theme: themeProp }) {
2164
2847
  };
2165
2848
  const isInputDisabled = !newOwner.trim() || newOwner.trim().toLowerCase() === owner.toLowerCase();
2166
2849
  if (!repo) return null;
2167
- return /* @__PURE__ */ jsxs17(
2168
- Box17,
2850
+ return /* @__PURE__ */ jsxs23(
2851
+ Box23,
2169
2852
  {
2170
2853
  flexDirection: "column",
2171
2854
  borderStyle: "round",
@@ -2174,18 +2857,18 @@ function TransferModal({ repo, onTransfer, onCancel, theme: themeProp }) {
2174
2857
  paddingY: 2,
2175
2858
  width: 80,
2176
2859
  children: [
2177
- /* @__PURE__ */ jsx18(Text18, { bold: true, color: theme.warning, children: "Transfer Repository" }),
2178
- /* @__PURE__ */ jsx18(Box17, { height: 1, children: /* @__PURE__ */ jsx18(Text18, { children: " " }) }),
2179
- /* @__PURE__ */ jsxs17(Text18, { color: theme.muted, children: [
2860
+ /* @__PURE__ */ jsx24(Text24, { bold: true, color: theme.warning, children: "Transfer Repository" }),
2861
+ /* @__PURE__ */ jsx24(Box23, { height: 1, children: /* @__PURE__ */ jsx24(Text24, { children: " " }) }),
2862
+ /* @__PURE__ */ jsxs23(Text24, { color: theme.muted, children: [
2180
2863
  "Repository: ",
2181
2864
  repo.nameWithOwner
2182
2865
  ] }),
2183
- stage === "input" && /* @__PURE__ */ jsxs17(Fragment9, { children: [
2184
- /* @__PURE__ */ jsx18(Box17, { height: 1, children: /* @__PURE__ */ jsx18(Text18, { children: " " }) }),
2185
- /* @__PURE__ */ jsx18(Text18, { children: "New owner (username or organisation):" }),
2186
- /* @__PURE__ */ jsxs17(Box17, { flexDirection: "row", alignItems: "center", children: [
2187
- /* @__PURE__ */ jsx18(
2188
- TextInput5,
2866
+ stage === "input" && /* @__PURE__ */ jsxs23(Fragment11, { children: [
2867
+ /* @__PURE__ */ jsx24(Box23, { height: 1, children: /* @__PURE__ */ jsx24(Text24, { children: " " }) }),
2868
+ /* @__PURE__ */ jsx24(Text24, { children: "New owner (username or organisation):" }),
2869
+ /* @__PURE__ */ jsxs23(Box23, { flexDirection: "row", alignItems: "center", children: [
2870
+ /* @__PURE__ */ jsx24(
2871
+ TextInput6,
2189
2872
  {
2190
2873
  value: newOwner,
2191
2874
  onChange: handleOwnerChange,
@@ -2193,17 +2876,17 @@ function TransferModal({ repo, onTransfer, onCancel, theme: themeProp }) {
2193
2876
  focus: !transferring
2194
2877
  }
2195
2878
  ),
2196
- /* @__PURE__ */ jsxs17(Text18, { children: [
2879
+ /* @__PURE__ */ jsxs23(Text24, { children: [
2197
2880
  "/",
2198
2881
  repo.name
2199
2882
  ] })
2200
2883
  ] }),
2201
- /* @__PURE__ */ jsx18(Box17, { marginTop: 2, children: /* @__PURE__ */ jsx18(Text18, { color: theme.muted, children: isInputDisabled ? "Enter a different owner to continue" : `Press Enter to review the transfer to "${newOwner}/${repo.name}"` }) }),
2202
- /* @__PURE__ */ jsx18(Box17, { marginTop: 1, children: /* @__PURE__ */ jsx18(Text18, { color: theme.muted, children: "Press Esc to cancel" }) })
2884
+ /* @__PURE__ */ jsx24(Box23, { marginTop: 2, children: /* @__PURE__ */ jsx24(Text24, { color: theme.muted, children: isInputDisabled ? "Enter a different owner to continue" : `Press Enter to review the transfer to "${newOwner}/${repo.name}"` }) }),
2885
+ /* @__PURE__ */ jsx24(Box23, { marginTop: 1, children: /* @__PURE__ */ jsx24(Text24, { color: theme.muted, children: "Press Esc to cancel" }) })
2203
2886
  ] }),
2204
- stage === "code" && /* @__PURE__ */ jsxs17(Fragment9, { children: [
2205
- /* @__PURE__ */ jsx18(Box17, { height: 1, children: /* @__PURE__ */ jsx18(Text18, { children: " " }) }),
2206
- /* @__PURE__ */ jsxs17(Text18, { children: [
2887
+ stage === "code" && /* @__PURE__ */ jsxs23(Fragment11, { children: [
2888
+ /* @__PURE__ */ jsx24(Box23, { height: 1, children: /* @__PURE__ */ jsx24(Text24, { children: " " }) }),
2889
+ /* @__PURE__ */ jsxs23(Text24, { children: [
2207
2890
  "Transfer ",
2208
2891
  c.text.bold(repo.nameWithOwner),
2209
2892
  " ",
@@ -2211,12 +2894,12 @@ function TransferModal({ repo, onTransfer, onCancel, theme: themeProp }) {
2211
2894
  " ",
2212
2895
  c.warning.bold(`${newOwner}/${repo.name}`)
2213
2896
  ] }),
2214
- /* @__PURE__ */ jsx18(Box17, { height: 1, children: /* @__PURE__ */ jsx18(Text18, { children: " " }) }),
2215
- /* @__PURE__ */ jsx18(Text18, { children: `To confirm, please type ${c.warning.bold(transferCode)} below:` }),
2216
- /* @__PURE__ */ jsxs17(Box17, { marginTop: 1, flexDirection: "row", alignItems: "center", children: [
2217
- /* @__PURE__ */ jsx18(Text18, { children: "Verification code: " }),
2218
- /* @__PURE__ */ jsx18(
2219
- TextInput5,
2897
+ /* @__PURE__ */ jsx24(Box23, { height: 1, children: /* @__PURE__ */ jsx24(Text24, { children: " " }) }),
2898
+ /* @__PURE__ */ jsx24(Text24, { children: `To confirm, please type ${c.warning.bold(transferCode)} below:` }),
2899
+ /* @__PURE__ */ jsxs23(Box23, { marginTop: 1, flexDirection: "row", alignItems: "center", children: [
2900
+ /* @__PURE__ */ jsx24(Text24, { children: "Verification code: " }),
2901
+ /* @__PURE__ */ jsx24(
2902
+ TextInput6,
2220
2903
  {
2221
2904
  value: typedCode,
2222
2905
  onChange: handleCodeChange,
@@ -2225,11 +2908,11 @@ function TransferModal({ repo, onTransfer, onCancel, theme: themeProp }) {
2225
2908
  }
2226
2909
  )
2227
2910
  ] }),
2228
- /* @__PURE__ */ jsx18(Box17, { marginTop: 1, children: /* @__PURE__ */ jsx18(Text18, { color: theme.muted, children: "Type the code to continue \u2022 Esc to cancel" }) })
2911
+ /* @__PURE__ */ jsx24(Box23, { marginTop: 1, children: /* @__PURE__ */ jsx24(Text24, { color: theme.muted, children: "Type the code to continue \u2022 Esc to cancel" }) })
2229
2912
  ] }),
2230
- stage === "confirm" && /* @__PURE__ */ jsxs17(Fragment9, { children: [
2231
- /* @__PURE__ */ jsx18(Box17, { height: 1, children: /* @__PURE__ */ jsx18(Text18, { children: " " }) }),
2232
- /* @__PURE__ */ jsxs17(Text18, { children: [
2913
+ stage === "confirm" && /* @__PURE__ */ jsxs23(Fragment11, { children: [
2914
+ /* @__PURE__ */ jsx24(Box23, { height: 1, children: /* @__PURE__ */ jsx24(Text24, { children: " " }) }),
2915
+ /* @__PURE__ */ jsxs23(Text24, { children: [
2233
2916
  "Transfer ",
2234
2917
  c.text.bold(repo.nameWithOwner),
2235
2918
  " ",
@@ -2237,18 +2920,18 @@ function TransferModal({ repo, onTransfer, onCancel, theme: themeProp }) {
2237
2920
  " ",
2238
2921
  c.warning.bold(`${newOwner}/${repo.name}`)
2239
2922
  ] }),
2240
- /* @__PURE__ */ jsx18(Box17, { marginTop: 1, children: /* @__PURE__ */ jsxs17(Text18, { color: theme.warning, children: [
2923
+ /* @__PURE__ */ jsx24(Box23, { marginTop: 1, children: /* @__PURE__ */ jsxs23(Text24, { color: theme.warning, children: [
2241
2924
  "\u26A0\uFE0F This hands ownership to ",
2242
2925
  newOwner,
2243
2926
  ". You may lose admin access, and only the new owner can transfer it back."
2244
2927
  ] }) }),
2245
- transferring ? /* @__PURE__ */ jsx18(Box17, { marginTop: 2, justifyContent: "center", children: /* @__PURE__ */ jsxs17(Box17, { flexDirection: "row", children: [
2246
- /* @__PURE__ */ jsx18(Box17, { marginRight: 1, children: /* @__PURE__ */ jsx18(SlowSpinner, {}) }),
2247
- /* @__PURE__ */ jsx18(Text18, { color: theme.warning, children: "Transferring repository..." })
2248
- ] }) }) : /* @__PURE__ */ jsxs17(Fragment9, { children: [
2249
- /* @__PURE__ */ jsxs17(Box17, { marginTop: 1, flexDirection: "row", justifyContent: "center", gap: 6, children: [
2250
- /* @__PURE__ */ jsx18(
2251
- Box17,
2928
+ transferring ? /* @__PURE__ */ jsx24(Box23, { marginTop: 2, justifyContent: "center", children: /* @__PURE__ */ jsxs23(Box23, { flexDirection: "row", children: [
2929
+ /* @__PURE__ */ jsx24(Box23, { marginRight: 1, children: /* @__PURE__ */ jsx24(SlowSpinner, {}) }),
2930
+ /* @__PURE__ */ jsx24(Text24, { color: theme.warning, children: "Transferring repository..." })
2931
+ ] }) }) : /* @__PURE__ */ jsxs23(Fragment11, { children: [
2932
+ /* @__PURE__ */ jsxs23(Box23, { marginTop: 1, flexDirection: "row", justifyContent: "center", gap: 6, children: [
2933
+ /* @__PURE__ */ jsx24(
2934
+ Box23,
2252
2935
  {
2253
2936
  borderStyle: "round",
2254
2937
  borderColor: focus === "transfer" ? theme.warning : theme.muted,
@@ -2257,11 +2940,11 @@ function TransferModal({ repo, onTransfer, onCancel, theme: themeProp }) {
2257
2940
  alignItems: "center",
2258
2941
  justifyContent: "center",
2259
2942
  flexDirection: "column",
2260
- children: /* @__PURE__ */ jsx18(Text18, { children: focus === "transfer" ? c.btnPrimary(" Transfer ") : c.warning.bold("Transfer") })
2943
+ children: /* @__PURE__ */ jsx24(Text24, { children: focus === "transfer" ? c.btnPrimary(" Transfer ") : c.warning.bold("Transfer") })
2261
2944
  }
2262
2945
  ),
2263
- /* @__PURE__ */ jsx18(
2264
- Box17,
2946
+ /* @__PURE__ */ jsx24(
2947
+ Box23,
2265
2948
  {
2266
2949
  borderStyle: "round",
2267
2950
  borderColor: focus === "cancel" ? "white" : theme.muted,
@@ -2270,28 +2953,28 @@ function TransferModal({ repo, onTransfer, onCancel, theme: themeProp }) {
2270
2953
  alignItems: "center",
2271
2954
  justifyContent: "center",
2272
2955
  flexDirection: "column",
2273
- children: /* @__PURE__ */ jsx18(Text18, { children: focus === "cancel" ? c.btnMuted(" Cancel ") : c.muted.bold("Cancel") })
2956
+ children: /* @__PURE__ */ jsx24(Text24, { children: focus === "cancel" ? c.btnMuted(" Cancel ") : c.muted.bold("Cancel") })
2274
2957
  }
2275
2958
  )
2276
2959
  ] }),
2277
- /* @__PURE__ */ jsx18(Box17, { marginTop: 1, flexDirection: "row", justifyContent: "center", children: /* @__PURE__ */ jsxs17(Text18, { color: theme.muted, children: [
2960
+ /* @__PURE__ */ jsx24(Box23, { marginTop: 1, flexDirection: "row", justifyContent: "center", children: /* @__PURE__ */ jsxs23(Text24, { color: theme.muted, children: [
2278
2961
  "\u2190/\u2192 Focus \u2022 Enter to ",
2279
2962
  focus === "transfer" ? "Transfer" : "Cancel",
2280
2963
  " \u2022 Y Transfer \u2022 C/Esc Cancel"
2281
2964
  ] }) })
2282
2965
  ] })
2283
2966
  ] }),
2284
- error && /* @__PURE__ */ jsx18(Box17, { marginTop: 1, children: /* @__PURE__ */ jsx18(Text18, { color: theme.error, children: error }) })
2967
+ error && /* @__PURE__ */ jsx24(Box23, { marginTop: 1, children: /* @__PURE__ */ jsx24(Text24, { color: theme.error, children: error }) })
2285
2968
  ]
2286
2969
  }
2287
2970
  );
2288
2971
  }
2289
2972
 
2290
2973
  // src/ui/components/modals/UnstarModal.tsx
2291
- import { useEffect as useEffect12, useState as useState18 } from "react";
2292
- import { Box as Box18, Text as Text19 } from "ink";
2293
- import { useInput as useInput18 } from "ink";
2294
- import { Fragment as Fragment10, jsx as jsx19, jsxs as jsxs18 } from "react/jsx-runtime";
2974
+ import { useEffect as useEffect12, useState as useState23 } from "react";
2975
+ import { Box as Box24, Text as Text25 } from "ink";
2976
+ import { useInput as useInput23 } from "ink";
2977
+ import { Fragment as Fragment12, jsx as jsx25, jsxs as jsxs24 } from "react/jsx-runtime";
2295
2978
  function UnstarModal({
2296
2979
  visible,
2297
2980
  repo,
@@ -2302,8 +2985,8 @@ function UnstarModal({
2302
2985
  theme: themeProp
2303
2986
  }) {
2304
2987
  const { theme } = useTheme(themeProp?.name ?? "default");
2305
- const [focusedButton, setFocusedButton] = useState18("cancel");
2306
- useInput18((input, key) => {
2988
+ const [focusedButton, setFocusedButton] = useState23("cancel");
2989
+ useInput23((input, key) => {
2307
2990
  if (!visible) return;
2308
2991
  if (isUnstarring) return;
2309
2992
  if (key.escape || input === "c" || input === "C") {
@@ -2326,8 +3009,8 @@ function UnstarModal({
2326
3009
  if (visible) setFocusedButton("cancel");
2327
3010
  }, [visible]);
2328
3011
  if (!visible || !repo) return null;
2329
- return /* @__PURE__ */ jsxs18(
2330
- Box18,
3012
+ return /* @__PURE__ */ jsxs24(
3013
+ Box24,
2331
3014
  {
2332
3015
  flexDirection: "column",
2333
3016
  borderStyle: "round",
@@ -2336,28 +3019,28 @@ function UnstarModal({
2336
3019
  paddingY: 1,
2337
3020
  marginTop: 1,
2338
3021
  children: [
2339
- /* @__PURE__ */ jsx19(Box18, { marginBottom: 1, children: /* @__PURE__ */ jsx19(Text19, { bold: true, color: theme.warning, children: "\u2B50 Unstar Repository" }) }),
2340
- /* @__PURE__ */ jsx19(Box18, { marginBottom: 1, children: /* @__PURE__ */ jsxs18(Text19, { children: [
3022
+ /* @__PURE__ */ jsx25(Box24, { marginBottom: 1, children: /* @__PURE__ */ jsx25(Text25, { bold: true, color: theme.warning, children: "\u2B50 Unstar Repository" }) }),
3023
+ /* @__PURE__ */ jsx25(Box24, { marginBottom: 1, children: /* @__PURE__ */ jsxs24(Text25, { children: [
2341
3024
  "Are you sure you want to unstar",
2342
3025
  " ",
2343
- /* @__PURE__ */ jsx19(Text19, { bold: true, color: theme.primary, children: repo.nameWithOwner }),
3026
+ /* @__PURE__ */ jsx25(Text25, { bold: true, color: theme.primary, children: repo.nameWithOwner }),
2344
3027
  "?"
2345
3028
  ] }) }),
2346
- repo.description && /* @__PURE__ */ jsx19(Box18, { marginBottom: 1, children: /* @__PURE__ */ jsx19(Text19, { dimColor: true, wrap: "wrap", children: repo.description }) }),
2347
- /* @__PURE__ */ jsx19(Box18, { marginBottom: 1, children: /* @__PURE__ */ jsxs18(Text19, { dimColor: true, children: [
3029
+ repo.description && /* @__PURE__ */ jsx25(Box24, { marginBottom: 1, children: /* @__PURE__ */ jsx25(Text25, { dimColor: true, wrap: "wrap", children: repo.description }) }),
3030
+ /* @__PURE__ */ jsx25(Box24, { marginBottom: 1, children: /* @__PURE__ */ jsxs24(Text25, { dimColor: true, children: [
2348
3031
  "Stars: ",
2349
3032
  repo.stargazerCount,
2350
3033
  " \u2022 Forks: ",
2351
3034
  repo.forkCount
2352
3035
  ] }) }),
2353
- error && /* @__PURE__ */ jsx19(Box18, { marginBottom: 1, flexDirection: "column", children: /* @__PURE__ */ jsxs18(Text19, { color: theme.error, wrap: "wrap", children: [
3036
+ error && /* @__PURE__ */ jsx25(Box24, { marginBottom: 1, flexDirection: "column", children: /* @__PURE__ */ jsxs24(Text25, { color: theme.error, wrap: "wrap", children: [
2354
3037
  error.includes("OAuth access restrictions") ? "\u26A0\uFE0F " : "Error: ",
2355
3038
  error
2356
3039
  ] }) }),
2357
- isUnstarring ? /* @__PURE__ */ jsx19(Box18, { children: /* @__PURE__ */ jsx19(Text19, { color: theme.warning, children: "Unstarring..." }) }) : /* @__PURE__ */ jsxs18(Fragment10, { children: [
2358
- /* @__PURE__ */ jsxs18(Box18, { gap: 2, children: [
2359
- /* @__PURE__ */ jsx19(Box18, { children: /* @__PURE__ */ jsxs18(
2360
- Text19,
3040
+ isUnstarring ? /* @__PURE__ */ jsx25(Box24, { children: /* @__PURE__ */ jsx25(Text25, { color: theme.warning, children: "Unstarring..." }) }) : /* @__PURE__ */ jsxs24(Fragment12, { children: [
3041
+ /* @__PURE__ */ jsxs24(Box24, { gap: 2, children: [
3042
+ /* @__PURE__ */ jsx25(Box24, { children: /* @__PURE__ */ jsxs24(
3043
+ Text25,
2361
3044
  {
2362
3045
  backgroundColor: focusedButton === "cancel" ? "white" : void 0,
2363
3046
  color: focusedButton === "cancel" ? "black" : "white",
@@ -2369,8 +3052,8 @@ function UnstarModal({
2369
3052
  ]
2370
3053
  }
2371
3054
  ) }),
2372
- /* @__PURE__ */ jsx19(Box18, { children: /* @__PURE__ */ jsxs18(
2373
- Text19,
3055
+ /* @__PURE__ */ jsx25(Box24, { children: /* @__PURE__ */ jsxs24(
3056
+ Text25,
2374
3057
  {
2375
3058
  backgroundColor: focusedButton === "unstar" ? "yellow" : void 0,
2376
3059
  color: focusedButton === "unstar" ? "black" : theme.warning,
@@ -2383,7 +3066,7 @@ function UnstarModal({
2383
3066
  }
2384
3067
  ) })
2385
3068
  ] }),
2386
- /* @__PURE__ */ jsx19(Box18, { marginTop: 1, children: /* @__PURE__ */ jsx19(Text19, { dimColor: true, children: "Use \u2190 \u2192 to navigate, Enter to select" }) })
3069
+ /* @__PURE__ */ jsx25(Box24, { marginTop: 1, children: /* @__PURE__ */ jsx25(Text25, { dimColor: true, children: "Use \u2190 \u2192 to navigate, Enter to select" }) })
2387
3070
  ] })
2388
3071
  ]
2389
3072
  }
@@ -2391,9 +3074,9 @@ function UnstarModal({
2391
3074
  }
2392
3075
 
2393
3076
  // src/ui/components/repo/RepoRow.tsx
2394
- import { Box as Box19, Text as Text20 } from "ink";
2395
- import chalk14 from "chalk";
2396
- import { jsx as jsx20, jsxs as jsxs19 } from "react/jsx-runtime";
3077
+ import { Box as Box25, Text as Text26 } from "ink";
3078
+ import chalk19 from "chalk";
3079
+ import { jsx as jsx26, jsxs as jsxs25 } from "react/jsx-runtime";
2397
3080
  function RepoRow({
2398
3081
  repo,
2399
3082
  selected,
@@ -2403,6 +3086,8 @@ function RepoRow({
2403
3086
  dim,
2404
3087
  forkTracking,
2405
3088
  starsMode = false,
3089
+ multiSelectMode = false,
3090
+ isChecked = false,
2406
3091
  theme: themeProp
2407
3092
  }) {
2408
3093
  const { theme, c } = useTheme(themeProp?.name ?? "default");
@@ -2417,6 +3102,13 @@ function RepoRow({
2417
3102
  let line1 = "";
2418
3103
  const numColor = selected ? c.selected : c.muted;
2419
3104
  const nameColor = selected ? c.selected.bold : c.text;
3105
+ if (multiSelectMode) {
3106
+ if (isChecked) {
3107
+ line1 += c.success("[\u2713] ");
3108
+ } else {
3109
+ line1 += c.muted("[ ] ");
3110
+ }
3111
+ }
2420
3112
  line1 += numColor(`${String(index).padStart(3, " ")}.`);
2421
3113
  if (repo.viewerHasStarred) {
2422
3114
  line1 += c.warning(" \u2B50");
@@ -2430,7 +3122,7 @@ function RepoRow({
2430
3122
  if (starsMode && repo.owner && repo.owner.__typename === "Organization") {
2431
3123
  line1 += c.muted(" [org]");
2432
3124
  }
2433
- if (repo.isArchived) line1 += " " + chalk14.bgGray.whiteBright(" Archived ") + " ";
3125
+ if (repo.isArchived) line1 += " " + chalk19.bgGray.whiteBright(" Archived ") + " ";
2434
3126
  if (repo.isFork && repo.parent) {
2435
3127
  line1 += c.fork(` Fork of ${repo.parent.nameWithOwner}`);
2436
3128
  if (showCommitData) {
@@ -2446,28 +3138,28 @@ function RepoRow({
2446
3138
  }
2447
3139
  let line2 = " ";
2448
3140
  const metaColor = selected ? c.text : c.muted;
2449
- if (langName) line2 += chalk14.hex(langColor)("\u25CF ") + metaColor(`${langName} `);
3141
+ if (langName) line2 += chalk19.hex(langColor)("\u25CF ") + metaColor(`${langName} `);
2450
3142
  line2 += metaColor(`\u2605 ${repo.stargazerCount} \u2442 ${repo.forkCount} Updated ${formatDate(repo.updatedAt)}`);
2451
3143
  const line3 = repo.description ? ` ${truncate(repo.description, Math.max(30, maxWidth - 10))}` : null;
2452
3144
  let fullText = line1 + "\n" + line2;
2453
3145
  if (line3) fullText += "\n" + metaColor(line3);
2454
3146
  const spacingAbove = Math.floor(spacingLines / 2);
2455
3147
  const spacingBelow = spacingLines - spacingAbove;
2456
- return /* @__PURE__ */ jsxs19(Box19, { flexDirection: "column", backgroundColor: selected ? theme.selectedBg : void 0, children: [
2457
- spacingAbove > 0 && /* @__PURE__ */ jsx20(Box19, { height: spacingAbove, children: /* @__PURE__ */ jsx20(Text20, { children: " " }) }),
2458
- /* @__PURE__ */ jsx20(Text20, { children: dim ? chalk14.dim(fullText) : fullText }),
2459
- spacingBelow > 0 && /* @__PURE__ */ jsx20(Box19, { height: spacingBelow, children: /* @__PURE__ */ jsx20(Text20, { children: " " }) })
3148
+ return /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", backgroundColor: selected ? theme.selectedBg : void 0, children: [
3149
+ spacingAbove > 0 && /* @__PURE__ */ jsx26(Box25, { height: spacingAbove, children: /* @__PURE__ */ jsx26(Text26, { children: " " }) }),
3150
+ /* @__PURE__ */ jsx26(Text26, { children: dim ? chalk19.dim(fullText) : fullText }),
3151
+ spacingBelow > 0 && /* @__PURE__ */ jsx26(Box25, { height: spacingBelow, children: /* @__PURE__ */ jsx26(Text26, { children: " " }) })
2460
3152
  ] });
2461
3153
  }
2462
3154
 
2463
3155
  // src/ui/components/repo/FilterInput.tsx
2464
- import { Box as Box20, Text as Text21 } from "ink";
2465
- import TextInput6 from "ink-text-input";
2466
- import { jsx as jsx21, jsxs as jsxs20 } from "react/jsx-runtime";
3156
+ import { Box as Box26, Text as Text27 } from "ink";
3157
+ import TextInput7 from "ink-text-input";
3158
+ import { jsx as jsx27, jsxs as jsxs26 } from "react/jsx-runtime";
2467
3159
 
2468
3160
  // src/ui/components/repo/RepoListHeader.tsx
2469
- import { Box as Box21, Text as Text22 } from "ink";
2470
- import { jsx as jsx22, jsxs as jsxs21 } from "react/jsx-runtime";
3161
+ import { Box as Box27, Text as Text28 } from "ink";
3162
+ import { jsx as jsx28, jsxs as jsxs27 } from "react/jsx-runtime";
2471
3163
  function RepoListHeader({
2472
3164
  ownerContext,
2473
3165
  sortKey,
@@ -2483,27 +3175,27 @@ function RepoListHeader({
2483
3175
  }) {
2484
3176
  const { theme } = useTheme(themeProp?.name ?? "default");
2485
3177
  const contextLabel = ownerContext === "personal" ? "Personal Account" : ownerContext?.type === "organization" ? `Organisation: ${ownerContext.name ?? ownerContext.login}` : "";
2486
- const visibilityLabel = visibilityFilter === "public" ? "Public" : visibilityFilter === "private" ? isEnterprise ? "Private/Internal" : "Private" : visibilityFilter === "internal" ? "Internal" : "";
2487
- return /* @__PURE__ */ jsxs21(Box21, { flexDirection: "row", gap: 2, marginBottom: 1, children: [
2488
- contextLabel && /* @__PURE__ */ jsx22(Text22, { children: contextLabel }),
2489
- starsMode && /* @__PURE__ */ jsx22(Text22, { color: theme.warning, bold: true, children: "\u2B50 Stars Mode" }),
2490
- /* @__PURE__ */ jsxs21(Text22, { color: theme.muted, dimColor: true, children: [
3178
+ const visibilityLabel2 = visibilityFilter === "public" ? "Public" : visibilityFilter === "private" ? isEnterprise ? "Private/Internal" : "Private" : visibilityFilter === "internal" ? "Internal" : "";
3179
+ return /* @__PURE__ */ jsxs27(Box27, { flexDirection: "row", gap: 2, marginBottom: 1, children: [
3180
+ contextLabel && /* @__PURE__ */ jsx28(Text28, { children: contextLabel }),
3181
+ starsMode && /* @__PURE__ */ jsx28(Text28, { color: theme.warning, bold: true, children: "\u2B50 Stars Mode" }),
3182
+ /* @__PURE__ */ jsxs27(Text28, { color: theme.muted, dimColor: true, children: [
2491
3183
  "Sort: ",
2492
3184
  filterActive ? "relevance" : `${sortKey} ${sortDir === "asc" ? "\u2191" : "\u2193"}`
2493
3185
  ] }),
2494
- /* @__PURE__ */ jsxs21(Text22, { color: theme.muted, dimColor: true, children: [
3186
+ /* @__PURE__ */ jsxs27(Text28, { color: theme.muted, dimColor: true, children: [
2495
3187
  "Fork Status - Commits Behind: ",
2496
3188
  forkTracking ? "ON" : "OFF"
2497
3189
  ] }),
2498
- !!visibilityLabel && !starsMode && /* @__PURE__ */ jsxs21(Text22, { color: theme.warning, children: [
3190
+ !!visibilityLabel2 && !starsMode && /* @__PURE__ */ jsxs27(Text28, { color: theme.warning, children: [
2499
3191
  "Visibility: ",
2500
- visibilityLabel
3192
+ visibilityLabel2
2501
3193
  ] }),
2502
- archiveFilter !== "all" && /* @__PURE__ */ jsxs21(Text22, { color: theme.primary, children: [
3194
+ archiveFilter !== "all" && /* @__PURE__ */ jsxs27(Text28, { color: theme.primary, children: [
2503
3195
  "Archive: ",
2504
3196
  archiveFilter === "archived" ? "Archived" : "Unarchived"
2505
3197
  ] }),
2506
- (filterActive || starsMode && filter.trim().length > 0) && /* @__PURE__ */ jsxs21(Text22, { color: theme.primary, children: [
3198
+ (filterActive || starsMode && filter.trim().length > 0) && /* @__PURE__ */ jsxs27(Text28, { color: theme.primary, children: [
2507
3199
  starsMode ? "Filter" : "Search",
2508
3200
  ': "',
2509
3201
  filter.trim(),
@@ -2513,7 +3205,7 @@ function RepoListHeader({
2513
3205
  }
2514
3206
 
2515
3207
  // src/ui/views/RepoList.tsx
2516
- import { Fragment as Fragment11, jsx as jsx23, jsxs as jsxs22 } from "react/jsx-runtime";
3208
+ import { Fragment as Fragment13, jsx as jsx29, jsxs as jsxs28 } from "react/jsx-runtime";
2517
3209
  var getPageSize = () => {
2518
3210
  const envValue = process.env.REPOS_PER_FETCH;
2519
3211
  if (envValue) {
@@ -2529,17 +3221,17 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
2529
3221
  const { exit } = useApp();
2530
3222
  const { stdout } = useStdout();
2531
3223
  const client = useMemo2(() => makeClient(token), [token]);
2532
- const [debugMessages, setDebugMessages] = useState19([]);
3224
+ const [debugMessages, setDebugMessages] = useState24([]);
2533
3225
  const addDebugMessage = useCallback((msg) => {
2534
3226
  if (process.env.GH_MANAGER_DEBUG === "1") {
2535
3227
  setDebugMessages((prev) => [...prev.slice(-9), msg]);
2536
3228
  }
2537
3229
  }, []);
2538
- const handleOrgContextChangeRef = useRef7(onOrgContextChange);
3230
+ const handleOrgContextChangeRef = useRef8(onOrgContextChange);
2539
3231
  useEffect13(() => {
2540
3232
  handleOrgContextChangeRef.current = onOrgContextChange;
2541
3233
  }, [onOrgContextChange]);
2542
- React19.useEffect(() => {
3234
+ React24.useEffect(() => {
2543
3235
  addDebugMessage(`[RepoList] Component mounted`);
2544
3236
  logger.info("RepoList component mounted", {
2545
3237
  token: token ? "present" : "missing",
@@ -2551,92 +3243,110 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
2551
3243
  }, []);
2552
3244
  const terminalWidth = stdout?.columns ?? 80;
2553
3245
  const availableHeight = maxVisibleRows ?? 20;
2554
- const [items, setItems] = useState19([]);
2555
- const [cursor, setCursor] = useState19(0);
2556
- const [endCursor, setEndCursor] = useState19(null);
2557
- const [hasNextPage, setHasNextPage] = useState19(false);
2558
- const [totalCount, setTotalCount] = useState19(0);
2559
- const [loading, setLoading] = useState19(true);
2560
- const [sortingLoading, setSortingLoading] = useState19(false);
2561
- const [refreshing, setRefreshing] = useState19(false);
2562
- const [loadingMore, setLoadingMore] = useState19(false);
2563
- const [error, setError] = useState19(null);
2564
- const [rateLimit, setRateLimit] = useState19(void 0);
2565
- const [prevRateLimit, setPrevRateLimit] = useState19(void 0);
2566
- const [restRateLimit, setRestRateLimit] = useState19(void 0);
2567
- const [prevRestRateLimit, setPrevRestRateLimit] = useState19(void 0);
2568
- const [density, setDensity] = useState19(2);
2569
- const [prefsLoaded, setPrefsLoaded] = useState19(false);
2570
- const [themeName, setThemeName] = useState19("default");
2571
- const [themeToast, setThemeToast] = useState19(null);
2572
- const themeToastTimerRef = useRef7(null);
3246
+ const [items, setItems] = useState24([]);
3247
+ const [cursor, setCursor] = useState24(0);
3248
+ const [endCursor, setEndCursor] = useState24(null);
3249
+ const [hasNextPage, setHasNextPage] = useState24(false);
3250
+ const [totalCount, setTotalCount] = useState24(0);
3251
+ const [loading, setLoading] = useState24(true);
3252
+ const [sortingLoading, setSortingLoading] = useState24(false);
3253
+ const [refreshing, setRefreshing] = useState24(false);
3254
+ const [loadingMore, setLoadingMore] = useState24(false);
3255
+ const [error, setError] = useState24(null);
3256
+ const [rateLimit, setRateLimit] = useState24(void 0);
3257
+ const [prevRateLimit, setPrevRateLimit] = useState24(void 0);
3258
+ const [restRateLimit, setRestRateLimit] = useState24(void 0);
3259
+ const [prevRestRateLimit, setPrevRestRateLimit] = useState24(void 0);
3260
+ const [density, setDensity] = useState24(2);
3261
+ const [prefsLoaded, setPrefsLoaded] = useState24(false);
3262
+ const [themeName, setThemeName] = useState24("default");
3263
+ const [themeToast, setThemeToast] = useState24(null);
3264
+ const themeToastTimerRef = useRef8(null);
2573
3265
  const { theme, c: tc } = useTheme(themeName);
2574
- const [ownerContext, setOwnerContext] = useState19("personal");
2575
- const [ownerAffiliations, setOwnerAffiliations] = useState19(["OWNER"]);
2576
- const [orgSwitcherOpen, setOrgSwitcherOpen] = useState19(false);
2577
- const [operationCount, setOperationCount] = useState19(0);
2578
- const [showSponsorReminder, setShowSponsorReminder] = useState19(false);
2579
- const [deleteMode, setDeleteMode] = useState19(false);
2580
- const [deleteTarget, setDeleteTarget] = useState19(null);
2581
- const [deleteCode, setDeleteCode] = useState19("");
2582
- const [typedCode, setTypedCode] = useState19("");
2583
- const [deleting, setDeleting] = useState19(false);
2584
- const [deleteError, setDeleteError] = useState19(null);
2585
- const [deleteConfirmStage, setDeleteConfirmStage] = useState19(false);
2586
- const [confirmFocus, setConfirmFocus] = useState19("delete");
2587
- const [archiveMode, setArchiveMode] = useState19(false);
2588
- const [archiveTarget, setArchiveTarget] = useState19(null);
2589
- const [archiving, setArchiving] = useState19(false);
2590
- const [archiveError, setArchiveError] = useState19(null);
2591
- const [archiveFocus, setArchiveFocus] = useState19("confirm");
2592
- const [syncMode, setSyncMode] = useState19(false);
2593
- const [syncTarget, setSyncTarget] = useState19(null);
2594
- const [syncing, setSyncing] = useState19(false);
2595
- const [syncError, setSyncError] = useState19(null);
2596
- const [syncFocus, setSyncFocus] = useState19("confirm");
2597
- const [renameMode, setRenameMode] = useState19(false);
2598
- const [renameTarget, setRenameTarget] = useState19(null);
2599
- const [createMode, setCreateMode] = useState19(false);
2600
- const [transferMode, setTransferMode] = useState19(false);
2601
- const [transferTarget, setTransferTarget] = useState19(null);
2602
- const [copyUrlMode, setCopyUrlMode] = useState19(false);
2603
- const [copyUrlTarget, setCopyUrlTarget] = useState19(null);
2604
- const [copyToast, setCopyToast] = useState19(null);
2605
- const [syncTrigger, setSyncTrigger] = useState19(false);
2606
- const [infoMode, setInfoMode] = useState19(false);
2607
- const [infoRepo, setInfoRepo] = useState19(null);
2608
- const [logoutMode, setLogoutMode] = useState19(false);
2609
- const [logoutFocus, setLogoutFocus] = useState19("confirm");
2610
- const [logoutError, setLogoutError] = useState19(null);
2611
- const [archiveFilterMode, setArchiveFilterMode] = useState19(false);
2612
- const [visibilityMode, setVisibilityMode] = useState19(false);
2613
- const [isEnterpriseOrg, setIsEnterpriseOrg] = useState19(false);
2614
- const [hasInternalRepos, setHasInternalRepos] = useState19(false);
2615
- const [changeVisibilityMode, setChangeVisibilityMode] = useState19(false);
2616
- const [changeVisibilityTarget, setChangeVisibilityTarget] = useState19(null);
2617
- const [changingVisibility, setChangingVisibility] = useState19(false);
2618
- const [changeVisibilityError, setChangeVisibilityError] = useState19(null);
2619
- const [sortMode, setSortMode] = useState19(false);
2620
- const [sortDirectionMode, setSortDirectionMode] = useState19(false);
2621
- const [starsMode, setStarsMode] = useState19(false);
2622
- const [starredItems, setStarredItems] = useState19([]);
2623
- const [starredEndCursor, setStarredEndCursor] = useState19(null);
2624
- const [starredHasNextPage, setStarredHasNextPage] = useState19(false);
2625
- const [starredTotalCount, setStarredTotalCount] = useState19(0);
2626
- const [starredLoading, setStarredLoading] = useState19(false);
2627
- const [unstarMode, setUnstarMode] = useState19(false);
2628
- const [unstarTarget, setUnstarTarget] = useState19(null);
2629
- const [unstarring, setUnstarring] = useState19(false);
2630
- const [unstarError, setUnstarError] = useState19(null);
2631
- const [starMode, setStarMode] = useState19(false);
2632
- const [starTarget, setStarTarget] = useState19(null);
2633
- const [starring, setStarring] = useState19(false);
2634
- const [starError, setStarError] = useState19(null);
2635
- const [openInBrowserMode, setOpenInBrowserMode] = useState19(false);
2636
- const [openInBrowserTarget, setOpenInBrowserTarget] = useState19(null);
2637
- const [enrichingForks, setEnrichingForks] = useState19(false);
2638
- const enrichmentDoneRef = useRef7(/* @__PURE__ */ new Set());
2639
- const appliedInitialOrg = useRef7(false);
3266
+ const [ownerContext, setOwnerContext] = useState24("personal");
3267
+ const [ownerAffiliations, setOwnerAffiliations] = useState24(["OWNER"]);
3268
+ const [orgSwitcherOpen, setOrgSwitcherOpen] = useState24(false);
3269
+ const [operationCount, setOperationCount] = useState24(0);
3270
+ const [showSponsorReminder, setShowSponsorReminder] = useState24(false);
3271
+ const [deleteMode, setDeleteMode] = useState24(false);
3272
+ const [deleteTarget, setDeleteTarget] = useState24(null);
3273
+ const [deleteCode, setDeleteCode] = useState24("");
3274
+ const [typedCode, setTypedCode] = useState24("");
3275
+ const [deleting, setDeleting] = useState24(false);
3276
+ const [deleteError, setDeleteError] = useState24(null);
3277
+ const [deleteConfirmStage, setDeleteConfirmStage] = useState24(false);
3278
+ const [confirmFocus, setConfirmFocus] = useState24("delete");
3279
+ const [archiveMode, setArchiveMode] = useState24(false);
3280
+ const [archiveTarget, setArchiveTarget] = useState24(null);
3281
+ const [archiving, setArchiving] = useState24(false);
3282
+ const [archiveError, setArchiveError] = useState24(null);
3283
+ const [archiveFocus, setArchiveFocus] = useState24("confirm");
3284
+ const [syncMode, setSyncMode] = useState24(false);
3285
+ const [syncTarget, setSyncTarget] = useState24(null);
3286
+ const [syncing, setSyncing] = useState24(false);
3287
+ const [syncError, setSyncError] = useState24(null);
3288
+ const [syncFocus, setSyncFocus] = useState24("confirm");
3289
+ const [renameMode, setRenameMode] = useState24(false);
3290
+ const [renameTarget, setRenameTarget] = useState24(null);
3291
+ const [createMode, setCreateMode] = useState24(false);
3292
+ const [transferMode, setTransferMode] = useState24(false);
3293
+ const [transferTarget, setTransferTarget] = useState24(null);
3294
+ const [copyUrlMode, setCopyUrlMode] = useState24(false);
3295
+ const [copyUrlTarget, setCopyUrlTarget] = useState24(null);
3296
+ const [copyToast, setCopyToast] = useState24(null);
3297
+ const [syncTrigger, setSyncTrigger] = useState24(false);
3298
+ const [infoMode, setInfoMode] = useState24(false);
3299
+ const [infoRepo, setInfoRepo] = useState24(null);
3300
+ const [logoutMode, setLogoutMode] = useState24(false);
3301
+ const [logoutFocus, setLogoutFocus] = useState24("confirm");
3302
+ const [logoutError, setLogoutError] = useState24(null);
3303
+ const [archiveFilterMode, setArchiveFilterMode] = useState24(false);
3304
+ const [visibilityMode, setVisibilityMode] = useState24(false);
3305
+ const [isEnterpriseOrg, setIsEnterpriseOrg] = useState24(false);
3306
+ const [hasInternalRepos, setHasInternalRepos] = useState24(false);
3307
+ const [changeVisibilityMode, setChangeVisibilityMode] = useState24(false);
3308
+ const [changeVisibilityTarget, setChangeVisibilityTarget] = useState24(null);
3309
+ const [changingVisibility, setChangingVisibility] = useState24(false);
3310
+ const [changeVisibilityError, setChangeVisibilityError] = useState24(null);
3311
+ const [sortMode, setSortMode] = useState24(false);
3312
+ const [sortDirectionMode, setSortDirectionMode] = useState24(false);
3313
+ const [starsMode, setStarsMode] = useState24(false);
3314
+ const [starredItems, setStarredItems] = useState24([]);
3315
+ const [starredEndCursor, setStarredEndCursor] = useState24(null);
3316
+ const [starredHasNextPage, setStarredHasNextPage] = useState24(false);
3317
+ const [starredTotalCount, setStarredTotalCount] = useState24(0);
3318
+ const [starredLoading, setStarredLoading] = useState24(false);
3319
+ const [unstarMode, setUnstarMode] = useState24(false);
3320
+ const [unstarTarget, setUnstarTarget] = useState24(null);
3321
+ const [unstarring, setUnstarring] = useState24(false);
3322
+ const [unstarError, setUnstarError] = useState24(null);
3323
+ const [starMode, setStarMode] = useState24(false);
3324
+ const [starTarget, setStarTarget] = useState24(null);
3325
+ const [starring, setStarring] = useState24(false);
3326
+ const [starError, setStarError] = useState24(null);
3327
+ const [multiSelectMode, setMultiSelectMode] = useState24(false);
3328
+ const [selectedRepos, setSelectedRepos] = useState24(/* @__PURE__ */ new Map());
3329
+ const [bulkAction, setBulkAction] = useState24(null);
3330
+ const [bulkVisibilityTarget, setBulkVisibilityTarget] = useState24(null);
3331
+ const [bulkIntentKind, setBulkIntentKind] = useState24(null);
3332
+ const [bulkVisibilityOpen, setBulkVisibilityOpen] = useState24(false);
3333
+ const [bulkReviewOpen, setBulkReviewOpen] = useState24(false);
3334
+ const [bulkConfirmOpen, setBulkConfirmOpen] = useState24(false);
3335
+ const [bulkDeleteCodeOpen, setBulkDeleteCodeOpen] = useState24(false);
3336
+ const [bulkProgressOpen, setBulkProgressOpen] = useState24(false);
3337
+ const [bulkFinalSelection, setBulkFinalSelection] = useState24(/* @__PURE__ */ new Map());
3338
+ const [bulkProgress, setBulkProgress] = useState24({
3339
+ total: 0,
3340
+ completed: 0,
3341
+ failed: [],
3342
+ currentRepo: null,
3343
+ done: false
3344
+ });
3345
+ const [openInBrowserMode, setOpenInBrowserMode] = useState24(false);
3346
+ const [openInBrowserTarget, setOpenInBrowserTarget] = useState24(null);
3347
+ const [enrichingForks, setEnrichingForks] = useState24(false);
3348
+ const enrichmentDoneRef = useRef8(/* @__PURE__ */ new Set());
3349
+ const appliedInitialOrg = useRef8(false);
2640
3350
  useEffect13(() => {
2641
3351
  (async () => {
2642
3352
  if (appliedInitialOrg.current) return;
@@ -2860,6 +3570,120 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
2860
3570
  setArchiveError("Failed to update archive state. Check permissions.");
2861
3571
  }
2862
3572
  }
3573
+ function enterMultiSelectMode() {
3574
+ setMultiSelectMode(true);
3575
+ }
3576
+ function exitMultiSelectMode(clearSelection = true) {
3577
+ setMultiSelectMode(false);
3578
+ if (clearSelection) {
3579
+ setSelectedRepos(/* @__PURE__ */ new Map());
3580
+ }
3581
+ }
3582
+ function toggleRepoSelection(repo) {
3583
+ setSelectedRepos((prev) => {
3584
+ const next = new Map(prev);
3585
+ if (next.has(repo.id)) {
3586
+ next.delete(repo.id);
3587
+ } else {
3588
+ next.set(repo.id, repo);
3589
+ }
3590
+ return next;
3591
+ });
3592
+ }
3593
+ async function executeBulkOperation(repos, action, visTarget) {
3594
+ const total = repos.length;
3595
+ setBulkProgress({ total, completed: 0, failed: [], currentRepo: null, done: false });
3596
+ setBulkProgressOpen(true);
3597
+ const failed = [];
3598
+ for (let i = 0; i < repos.length; i++) {
3599
+ const repo = repos[i];
3600
+ setBulkProgress((prev) => ({ ...prev, currentRepo: repo, completed: i }));
3601
+ try {
3602
+ if (action === "delete") {
3603
+ const [owner, repoName] = repo.nameWithOwner.split("/");
3604
+ await deleteRepositoryRest(token, owner, repoName);
3605
+ await updateCacheAfterDelete(token, repo.id);
3606
+ setItems((prev) => prev.filter((r) => r.id !== repo.id));
3607
+ setTotalCount((c) => Math.max(0, c - 1));
3608
+ } else if (action === "archive") {
3609
+ await archiveRepositoryById(client, repo.id);
3610
+ await updateCacheAfterArchive(token, repo.id, true);
3611
+ const updateRepo = (r) => r.id === repo.id ? { ...r, isArchived: true } : r;
3612
+ setItems((prev) => prev.map(updateRepo));
3613
+ } else if (action === "unarchive") {
3614
+ await unarchiveRepositoryById(client, repo.id);
3615
+ await updateCacheAfterArchive(token, repo.id, false);
3616
+ const updateRepo = (r) => r.id === repo.id ? { ...r, isArchived: false } : r;
3617
+ setItems((prev) => prev.map(updateRepo));
3618
+ } else if (action === "star" || action === "unstar") {
3619
+ const wantStarred = action === "star";
3620
+ if (wantStarred) await starRepository(client, repo.id);
3621
+ else await unstarRepository(client, repo.id);
3622
+ const updateRepo = (r) => r.id === repo.id ? { ...r, viewerHasStarred: wantStarred, stargazerCount: r.stargazerCount + (wantStarred ? r.viewerHasStarred ? 0 : 1 : r.viewerHasStarred ? -1 : 0) } : r;
3623
+ setItems((prev) => prev.map(updateRepo));
3624
+ } else if (action === "visibility" && visTarget) {
3625
+ await changeRepositoryVisibility(client, repo.id, visTarget, token);
3626
+ await updateCacheAfterVisibilityChange(token, repo.id, visTarget);
3627
+ const shouldRemove = visibilityFilter === "public" && visTarget !== "PUBLIC" || visibilityFilter === "private" && visTarget !== "PRIVATE" && visTarget !== "INTERNAL";
3628
+ if (shouldRemove) {
3629
+ setItems((prev) => prev.filter((r) => r.id !== repo.id));
3630
+ setTotalCount((c) => Math.max(0, c - 1));
3631
+ } else {
3632
+ const updateRepo = (r) => r.id === repo.id ? { ...r, visibility: visTarget, isPrivate: visTarget !== "PUBLIC" } : r;
3633
+ setItems((prev) => prev.map(updateRepo));
3634
+ }
3635
+ }
3636
+ trackSuccessfulOperation();
3637
+ } catch (e) {
3638
+ failed.push({ repo, error: e.message || "Unknown error" });
3639
+ }
3640
+ setBulkProgress((prev) => ({ ...prev, completed: i + 1, failed: [...failed] }));
3641
+ }
3642
+ setBulkProgress((prev) => ({ ...prev, currentRepo: null, done: true, failed: [...failed] }));
3643
+ setSelectedRepos(/* @__PURE__ */ new Map());
3644
+ setMultiSelectMode(false);
3645
+ setCursor((c) => Math.max(0, Math.min(c, visibleItems.length - 1)));
3646
+ }
3647
+ function resetBulkFlow() {
3648
+ setBulkIntentKind(null);
3649
+ setBulkVisibilityOpen(false);
3650
+ setBulkReviewOpen(false);
3651
+ setBulkConfirmOpen(false);
3652
+ setBulkDeleteCodeOpen(false);
3653
+ setBulkAction(null);
3654
+ setBulkVisibilityTarget(null);
3655
+ setBulkFinalSelection(/* @__PURE__ */ new Map());
3656
+ }
3657
+ function beginBulkReview(action) {
3658
+ if (selectedRepos.size === 0) return;
3659
+ setBulkAction(action);
3660
+ setBulkReviewOpen(true);
3661
+ }
3662
+ function startBulkDelete() {
3663
+ beginBulkReview("delete");
3664
+ }
3665
+ function startBulkArchive() {
3666
+ const repos = Array.from(selectedRepos.values());
3667
+ if (repos.length === 0) return;
3668
+ const allArchived = repos.every((r) => r.isArchived);
3669
+ const noneArchived = repos.every((r) => !r.isArchived);
3670
+ if (allArchived) beginBulkReview("unarchive");
3671
+ else if (noneArchived) beginBulkReview("archive");
3672
+ else setBulkIntentKind("archive");
3673
+ }
3674
+ function startBulkStar() {
3675
+ const repos = Array.from(selectedRepos.values());
3676
+ if (repos.length === 0) return;
3677
+ const allStarred = repos.every((r) => r.viewerHasStarred);
3678
+ const noneStarred = repos.every((r) => !r.viewerHasStarred);
3679
+ if (allStarred) beginBulkReview("unstar");
3680
+ else if (noneStarred) beginBulkReview("star");
3681
+ else setBulkIntentKind("star");
3682
+ }
3683
+ function startBulkVisibility() {
3684
+ if (selectedRepos.size === 0) return;
3685
+ setBulkVisibilityOpen(true);
3686
+ }
2863
3687
  async function executeRename(repo, newName) {
2864
3688
  if (!repo || !newName.trim()) return;
2865
3689
  try {
@@ -2930,7 +3754,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
2930
3754
  trackSuccessfulOperation();
2931
3755
  closeTransferModal();
2932
3756
  }
2933
- const copyToastTimerRef = useRef7(null);
3757
+ const copyToastTimerRef = useRef8(null);
2934
3758
  async function handleCopyUrl(url, type) {
2935
3759
  try {
2936
3760
  if (copyToastTimerRef.current) {
@@ -2992,6 +3816,8 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
2992
3816
  setOrgSwitcherOpen(false);
2993
3817
  setItems([]);
2994
3818
  setTotalCount(0);
3819
+ setSelectedRepos(/* @__PURE__ */ new Map());
3820
+ setMultiSelectMode(false);
2995
3821
  setFilter("");
2996
3822
  setFilterMode(false);
2997
3823
  setVisibilityFilter("all");
@@ -3052,11 +3878,11 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3052
3878
  setDeleteError("Failed to delete repository. Ensure delete_repo scope and admin permissions.");
3053
3879
  }
3054
3880
  }
3055
- const [filter, setFilter] = useState19("");
3056
- const [filterMode, setFilterMode] = useState19(false);
3057
- const [sortKey, setSortKey] = useState19("updated");
3058
- const [sortDir, setSortDir] = useState19("desc");
3059
- const [forkTracking, setForkTracking] = useState19(true);
3881
+ const [filter, setFilter] = useState24("");
3882
+ const [filterMode, setFilterMode] = useState24(false);
3883
+ const [sortKey, setSortKey] = useState24("updated");
3884
+ const [sortDir, setSortDir] = useState24("desc");
3885
+ const [forkTracking, setForkTracking] = useState24(true);
3060
3886
  useEffect13(() => {
3061
3887
  if (loading || loadingMore || hasNextPage || items.length === 0) return;
3062
3888
  if (!forkTracking) return;
@@ -3133,10 +3959,10 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3133
3959
  logger.error("Failed to fetch upstream repository", { error: err?.message, parentNameWithOwner });
3134
3960
  }
3135
3961
  }
3136
- const [visibilityFilter, setVisibilityFilter] = useState19("all");
3137
- const previousVisibilityFilter = useRef7("all");
3138
- const pendingFocusRef = useRef7(null);
3139
- const [archiveFilter, setArchiveFilter] = useState19("all");
3962
+ const [visibilityFilter, setVisibilityFilter] = useState24("all");
3963
+ const previousVisibilityFilter = useRef8("all");
3964
+ const pendingFocusRef = useRef8(null);
3965
+ const [archiveFilter, setArchiveFilter] = useState24("all");
3140
3966
  const sortFieldMap = {
3141
3967
  "updated": "UPDATED_AT",
3142
3968
  "pushed": "PUSHED_AT",
@@ -3307,7 +4133,31 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3307
4133
  }
3308
4134
  previousVisibilityFilter.current = visibilityFilter;
3309
4135
  }, [visibilityFilter]);
3310
- useInput19((input, key) => {
4136
+ useInput24((input, key) => {
4137
+ if (bulkProgressOpen && bulkProgress.done) {
4138
+ setBulkProgressOpen(false);
4139
+ setBulkProgress({ total: 0, completed: 0, failed: [], currentRepo: null, done: false });
4140
+ setBulkAction(null);
4141
+ setBulkVisibilityTarget(null);
4142
+ setBulkFinalSelection(/* @__PURE__ */ new Map());
4143
+ return;
4144
+ }
4145
+ if (bulkProgressOpen) return;
4146
+ if (bulkIntentKind) {
4147
+ return;
4148
+ }
4149
+ if (bulkVisibilityOpen) {
4150
+ return;
4151
+ }
4152
+ if (bulkReviewOpen) {
4153
+ return;
4154
+ }
4155
+ if (bulkConfirmOpen) {
4156
+ return;
4157
+ }
4158
+ if (bulkDeleteCodeOpen) {
4159
+ return;
4160
+ }
3311
4161
  if (error) {
3312
4162
  if (input && input.toUpperCase() === "Q") {
3313
4163
  try {
@@ -3518,6 +4368,72 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3518
4368
  addDebugMessage("[ESC] Cleared filter and returned to normal listing");
3519
4369
  return;
3520
4370
  }
4371
+ if (input && input.toUpperCase() === "B" && !key.ctrl && !key.shift) {
4372
+ if (multiSelectMode) {
4373
+ exitMultiSelectMode(true);
4374
+ } else {
4375
+ enterMultiSelectMode();
4376
+ }
4377
+ return;
4378
+ }
4379
+ if (key.escape && multiSelectMode) {
4380
+ exitMultiSelectMode(true);
4381
+ return;
4382
+ }
4383
+ if (multiSelectMode) {
4384
+ if (key.downArrow) {
4385
+ setCursor((c) => Math.min(c + 1, visibleItems.length - 1));
4386
+ return;
4387
+ }
4388
+ if (key.upArrow) {
4389
+ setCursor((c) => Math.max(c - 1, 0));
4390
+ return;
4391
+ }
4392
+ if (key.pageDown) {
4393
+ setCursor((c) => Math.min(c + 10, visibleItems.length - 1));
4394
+ return;
4395
+ }
4396
+ if (key.pageUp) {
4397
+ setCursor((c) => Math.max(c - 10, 0));
4398
+ return;
4399
+ }
4400
+ if (key.ctrl && (input === "g" || input === "G")) {
4401
+ setCursor(0);
4402
+ return;
4403
+ }
4404
+ if (!key.ctrl && input && input.toUpperCase() === "G") {
4405
+ setCursor(visibleItems.length - 1);
4406
+ return;
4407
+ }
4408
+ if (input === " ") {
4409
+ const repo = visibleItems[cursor];
4410
+ if (repo) toggleRepoSelection(repo);
4411
+ return;
4412
+ }
4413
+ if (!key.ctrl && input && input.toUpperCase() === "X") {
4414
+ setSelectedRepos(/* @__PURE__ */ new Map());
4415
+ return;
4416
+ }
4417
+ if (selectedRepos.size > 0) {
4418
+ if (key.ctrl && (input === "s" || input === "S")) {
4419
+ startBulkStar();
4420
+ return;
4421
+ }
4422
+ if (key.ctrl && (input === "a" || input === "A")) {
4423
+ startBulkArchive();
4424
+ return;
4425
+ }
4426
+ if (key.ctrl && (input === "v" || input === "V")) {
4427
+ startBulkVisibility();
4428
+ return;
4429
+ }
4430
+ if (key.delete || key.backspace) {
4431
+ startBulkDelete();
4432
+ return;
4433
+ }
4434
+ }
4435
+ return;
4436
+ }
3521
4437
  if (input && input.toUpperCase() === "Q") {
3522
4438
  try {
3523
4439
  const seq = "\x1B[2J\x1B[3J\x1B[H";
@@ -3532,7 +4448,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3532
4448
  if (key.upArrow) setCursor((c) => Math.max(c - 1, 0));
3533
4449
  if (key.pageDown) setCursor((c) => Math.min(c + 10, visibleItems.length - 1));
3534
4450
  if (key.pageUp) setCursor((c) => Math.max(c - 10, 0));
3535
- if (key.return) {
4451
+ if (key.return && !multiSelectMode) {
3536
4452
  const repo = visibleItems[cursor];
3537
4453
  if (repo) {
3538
4454
  if (repo.isFork && repo.parent) {
@@ -3543,7 +4459,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3543
4459
  }
3544
4460
  }
3545
4461
  }
3546
- if (key.delete || key.backspace) {
4462
+ if ((key.delete || key.backspace) && !multiSelectMode) {
3547
4463
  const repo = visibleItems[cursor];
3548
4464
  if (repo) {
3549
4465
  setDeleteTarget(repo);
@@ -3583,7 +4499,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3583
4499
  setOrgSwitcherOpen(true);
3584
4500
  return;
3585
4501
  }
3586
- if (key.ctrl && (input === "a" || input === "A")) {
4502
+ if (key.ctrl && (input === "a" || input === "A") && !multiSelectMode) {
3587
4503
  const repo = visibleItems[cursor];
3588
4504
  if (repo) {
3589
4505
  setArchiveTarget(repo);
@@ -3694,6 +4610,8 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3694
4610
  const newStarsMode = !starsMode;
3695
4611
  setStarsMode(newStarsMode);
3696
4612
  setCursor(0);
4613
+ setSelectedRepos(/* @__PURE__ */ new Map());
4614
+ setMultiSelectMode(false);
3697
4615
  setFilter("");
3698
4616
  setFilterMode(false);
3699
4617
  if (newStarsMode) {
@@ -3883,79 +4801,80 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3883
4801
  exec(cmd);
3884
4802
  }
3885
4803
  const lowRate = rateLimit && rateLimit.remaining <= Math.ceil(rateLimit.limit * 0.1) || restRateLimit && restRateLimit.core.remaining <= Math.ceil(restRateLimit.core.limit * 0.1);
3886
- const modalOpen = deleteMode || archiveMode || syncMode || logoutMode || infoMode || visibilityMode || archiveFilterMode || sortMode || sortDirectionMode || changeVisibilityMode || copyUrlMode || renameMode || openInBrowserMode || createMode || transferMode;
3887
- const headerBar = useMemo2(() => /* @__PURE__ */ jsxs22(Box22, { flexDirection: "row", justifyContent: "space-between", height: 1, marginBottom: 1, children: [
3888
- /* @__PURE__ */ jsxs22(Box22, { flexDirection: "row", gap: 1, children: [
3889
- /* @__PURE__ */ jsxs22(Text23, { color: theme.primary, bold: !modalOpen, dimColor: modalOpen, children: [
4804
+ const modalOpen = deleteMode || archiveMode || syncMode || logoutMode || infoMode || visibilityMode || archiveFilterMode || sortMode || sortDirectionMode || changeVisibilityMode || copyUrlMode || renameMode || bulkIntentKind !== null || bulkVisibilityOpen || bulkReviewOpen || bulkConfirmOpen || bulkDeleteCodeOpen || bulkProgressOpen || openInBrowserMode || createMode || transferMode;
4805
+ const bulkMeta = bulkAction ? bulkActionMeta(bulkAction, bulkVisibilityTarget ?? void 0) : null;
4806
+ const headerBar = useMemo2(() => /* @__PURE__ */ jsxs28(Box28, { flexDirection: "row", justifyContent: "space-between", height: 1, marginBottom: 1, children: [
4807
+ /* @__PURE__ */ jsxs28(Box28, { flexDirection: "row", gap: 1, children: [
4808
+ /* @__PURE__ */ jsxs28(Text29, { color: theme.primary, bold: !modalOpen, dimColor: modalOpen, children: [
3890
4809
  " ",
3891
4810
  ownerContext === "personal" ? "Personal" : ownerContext.name || ownerContext.login,
3892
4811
  ownerContext !== "personal" && isEnterpriseOrg && " (ENT)"
3893
4812
  ] }),
3894
- /* @__PURE__ */ jsx23(Text23, { bold: true, color: modalOpen ? theme.muted : void 0, dimColor: modalOpen ? true : void 0, children: "Repositories" }),
3895
- /* @__PURE__ */ jsxs22(Text23, { color: theme.muted, children: [
4813
+ /* @__PURE__ */ jsx29(Text29, { bold: true, color: modalOpen ? theme.muted : void 0, dimColor: modalOpen ? true : void 0, children: "Repositories" }),
4814
+ /* @__PURE__ */ jsxs28(Text29, { color: theme.muted, children: [
3896
4815
  "(",
3897
4816
  visibleItems.length,
3898
4817
  "/",
3899
4818
  totalCount,
3900
4819
  ")"
3901
4820
  ] }),
3902
- loadingMore && hasNextPage && !starsMode && totalCount > 0 && /* @__PURE__ */ jsx23(Text23, { color: theme.primary, children: ` \xB7 loading ${items.length}/${totalCount}` }),
3903
- enrichingForks && /* @__PURE__ */ jsx23(Text23, { color: theme.muted, children: ` \xB7 enriching forks\u2026` }),
3904
- (loading || loadingMore) && /* @__PURE__ */ jsx23(Box22, { width: 2, flexShrink: 0, flexGrow: 0, marginLeft: 1, children: /* @__PURE__ */ jsx23(Text23, { color: theme.warning, children: /* @__PURE__ */ jsx23(SlowSpinner, {}) }) })
4821
+ loadingMore && hasNextPage && !starsMode && totalCount > 0 && /* @__PURE__ */ jsx29(Text29, { color: theme.primary, children: ` \xB7 loading ${items.length}/${totalCount}` }),
4822
+ enrichingForks && /* @__PURE__ */ jsx29(Text29, { color: theme.muted, children: ` \xB7 enriching forks\u2026` }),
4823
+ (loading || loadingMore) && /* @__PURE__ */ jsx29(Box28, { width: 2, flexShrink: 0, flexGrow: 0, marginLeft: 1, children: /* @__PURE__ */ jsx29(Text29, { color: theme.warning, children: /* @__PURE__ */ jsx29(SlowSpinner, {}) }) })
3905
4824
  ] }),
3906
- (rateLimit || restRateLimit) && /* @__PURE__ */ jsxs22(Text23, { color: lowRate ? theme.warning : theme.muted, children: [
4825
+ (rateLimit || restRateLimit) && /* @__PURE__ */ jsxs28(Text29, { color: lowRate ? theme.warning : theme.muted, children: [
3907
4826
  "GraphQL: ",
3908
4827
  rateLimit ? `${rateLimit.remaining}/${rateLimit.limit}` : "---/---",
3909
- prevRateLimit !== void 0 && rateLimit && prevRateLimit !== rateLimit.remaining && /* @__PURE__ */ jsx23(Text23, { color: rateLimit.remaining < prevRateLimit ? theme.error : theme.success, children: ` (${rateLimit.remaining - prevRateLimit > 0 ? "+" : ""}${rateLimit.remaining - prevRateLimit})` }),
4828
+ prevRateLimit !== void 0 && rateLimit && prevRateLimit !== rateLimit.remaining && /* @__PURE__ */ jsx29(Text29, { color: rateLimit.remaining < prevRateLimit ? theme.error : theme.success, children: ` (${rateLimit.remaining - prevRateLimit > 0 ? "+" : ""}${rateLimit.remaining - prevRateLimit})` }),
3910
4829
  " | ",
3911
4830
  "REST: ",
3912
4831
  restRateLimit ? `${restRateLimit.core.remaining}/${restRateLimit.core.limit}` : "---/---",
3913
- prevRestRateLimit !== void 0 && restRateLimit && prevRestRateLimit !== restRateLimit.core.remaining && /* @__PURE__ */ jsx23(Text23, { color: restRateLimit.core.remaining < prevRestRateLimit ? theme.error : theme.success, children: ` (${restRateLimit.core.remaining - prevRestRateLimit > 0 ? "+" : ""}${restRateLimit.core.remaining - prevRestRateLimit})` }),
4832
+ prevRestRateLimit !== void 0 && restRateLimit && prevRestRateLimit !== restRateLimit.core.remaining && /* @__PURE__ */ jsx29(Text29, { color: restRateLimit.core.remaining < prevRestRateLimit ? theme.error : theme.success, children: ` (${restRateLimit.core.remaining - prevRestRateLimit > 0 ? "+" : ""}${restRateLimit.core.remaining - prevRestRateLimit})` }),
3914
4833
  " "
3915
4834
  ] })
3916
4835
  ] }), [visibleItems.length, totalCount, loading, loadingMore, rateLimit, lowRate, modalOpen, prevRateLimit, ownerContext, isEnterpriseOrg, restRateLimit, prevRestRateLimit, enrichingForks, starsMode, hasNextPage, items.length, theme]);
3917
4836
  if (error) {
3918
- return /* @__PURE__ */ jsxs22(Box22, { flexDirection: "column", height: availableHeight, children: [
3919
- /* @__PURE__ */ jsx23(Box22, { flexDirection: "row", justifyContent: "space-between", height: 1, marginBottom: 1, children: /* @__PURE__ */ jsxs22(Box22, { flexDirection: "row", gap: 1, children: [
3920
- /* @__PURE__ */ jsx23(Text23, { bold: true, children: " Repositories" }),
3921
- /* @__PURE__ */ jsx23(Text23, { color: "red", children: "(Error)" })
4837
+ return /* @__PURE__ */ jsxs28(Box28, { flexDirection: "column", height: availableHeight, children: [
4838
+ /* @__PURE__ */ jsx29(Box28, { flexDirection: "row", justifyContent: "space-between", height: 1, marginBottom: 1, children: /* @__PURE__ */ jsxs28(Box28, { flexDirection: "row", gap: 1, children: [
4839
+ /* @__PURE__ */ jsx29(Text29, { bold: true, children: " Repositories" }),
4840
+ /* @__PURE__ */ jsx29(Text29, { color: "red", children: "(Error)" })
3922
4841
  ] }) }),
3923
- /* @__PURE__ */ jsx23(Box22, { borderStyle: "single", borderColor: "red", paddingX: 1, paddingY: 1, marginX: 1, height: contentHeight + containerPadding + 2, flexDirection: "column", children: /* @__PURE__ */ jsx23(Box22, { height: contentHeight, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsxs22(Box22, { flexDirection: "column", alignItems: "center", children: [
3924
- /* @__PURE__ */ jsx23(Text23, { color: "red", children: error }),
3925
- /* @__PURE__ */ jsx23(Box22, { marginTop: 1, children: /* @__PURE__ */ jsx23(Text23, { color: "gray", dimColor: true, children: "Press R to retry \u2022 Ctrl+L to logout \u2022 Q to quit" }) })
4842
+ /* @__PURE__ */ jsx29(Box28, { borderStyle: "single", borderColor: "red", paddingX: 1, paddingY: 1, marginX: 1, height: contentHeight + containerPadding + 2, flexDirection: "column", children: /* @__PURE__ */ jsx29(Box28, { height: contentHeight, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsxs28(Box28, { flexDirection: "column", alignItems: "center", children: [
4843
+ /* @__PURE__ */ jsx29(Text29, { color: "red", children: error }),
4844
+ /* @__PURE__ */ jsx29(Box28, { marginTop: 1, children: /* @__PURE__ */ jsx29(Text29, { color: "gray", dimColor: true, children: "Press R to retry \u2022 Ctrl+L to logout \u2022 Q to quit" }) })
3926
4845
  ] }) }) }),
3927
- /* @__PURE__ */ jsx23(Box22, { marginTop: 1, paddingX: 1, children: /* @__PURE__ */ jsx23(Text23, { color: "gray", children: "Press R to retry \u2022 Ctrl+L to logout \u2022 Q to quit" }) })
4846
+ /* @__PURE__ */ jsx29(Box28, { marginTop: 1, paddingX: 1, children: /* @__PURE__ */ jsx29(Text29, { color: "gray", children: "Press R to retry \u2022 Ctrl+L to logout \u2022 Q to quit" }) })
3928
4847
  ] });
3929
4848
  }
3930
4849
  if (loading && items.length === 0 || sortingLoading) {
3931
- return /* @__PURE__ */ jsxs22(Box22, { flexDirection: "column", height: availableHeight, children: [
3932
- /* @__PURE__ */ jsx23(Box22, { flexDirection: "row", justifyContent: "space-between", height: 1, marginBottom: 1, children: /* @__PURE__ */ jsxs22(Box22, { flexDirection: "row", gap: 1, children: [
3933
- /* @__PURE__ */ jsx23(Text23, { bold: true, children: " Repositories" }),
3934
- /* @__PURE__ */ jsx23(Text23, { color: "gray", children: "(Loading...)" })
4850
+ return /* @__PURE__ */ jsxs28(Box28, { flexDirection: "column", height: availableHeight, children: [
4851
+ /* @__PURE__ */ jsx29(Box28, { flexDirection: "row", justifyContent: "space-between", height: 1, marginBottom: 1, children: /* @__PURE__ */ jsxs28(Box28, { flexDirection: "row", gap: 1, children: [
4852
+ /* @__PURE__ */ jsx29(Text29, { bold: true, children: " Repositories" }),
4853
+ /* @__PURE__ */ jsx29(Text29, { color: "gray", children: "(Loading...)" })
3935
4854
  ] }) }),
3936
- /* @__PURE__ */ jsx23(Box22, { borderStyle: "single", borderColor: "yellow", paddingX: 1, paddingY: 1, marginX: 1, height: contentHeight + containerPadding + 2, flexDirection: "column", children: /* @__PURE__ */ jsx23(Box22, { height: contentHeight, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsx23(Box22, { flexDirection: "column", alignItems: "center", children: /* @__PURE__ */ jsxs22(Box22, { flexDirection: "column", alignItems: "center", children: [
3937
- /* @__PURE__ */ jsxs22(Box22, { height: 1, flexDirection: "row", children: [
3938
- /* @__PURE__ */ jsx23(Box22, { width: 2, flexShrink: 0, flexGrow: 0, children: /* @__PURE__ */ jsx23(Text23, { color: "cyan", children: /* @__PURE__ */ jsx23(SlowSpinner, {}) }) }),
3939
- /* @__PURE__ */ jsx23(Text23, { color: "cyan", children: refreshing ? "Refreshing..." : sortingLoading ? "Applying sort..." : "Loading repositories..." })
4855
+ /* @__PURE__ */ jsx29(Box28, { borderStyle: "single", borderColor: "yellow", paddingX: 1, paddingY: 1, marginX: 1, height: contentHeight + containerPadding + 2, flexDirection: "column", children: /* @__PURE__ */ jsx29(Box28, { height: contentHeight, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsx29(Box28, { flexDirection: "column", alignItems: "center", children: /* @__PURE__ */ jsxs28(Box28, { flexDirection: "column", alignItems: "center", children: [
4856
+ /* @__PURE__ */ jsxs28(Box28, { height: 1, flexDirection: "row", children: [
4857
+ /* @__PURE__ */ jsx29(Box28, { width: 2, flexShrink: 0, flexGrow: 0, children: /* @__PURE__ */ jsx29(Text29, { color: "cyan", children: /* @__PURE__ */ jsx29(SlowSpinner, {}) }) }),
4858
+ /* @__PURE__ */ jsx29(Text29, { color: "cyan", children: refreshing ? "Refreshing..." : sortingLoading ? "Applying sort..." : "Loading repositories..." })
3940
4859
  ] }),
3941
- /* @__PURE__ */ jsx23(Box22, { height: 1, marginTop: 1, children: /* @__PURE__ */ jsx23(Text23, { color: "gray", children: refreshing ? "Fetching latest repository data" : sortingLoading ? `Sorting by ${sortKey} (${sortDir === "asc" ? "ascending" : "descending"})` : "Fetching your GitHub repositories" }) })
4860
+ /* @__PURE__ */ jsx29(Box28, { height: 1, marginTop: 1, children: /* @__PURE__ */ jsx29(Text29, { color: "gray", children: refreshing ? "Fetching latest repository data" : sortingLoading ? `Sorting by ${sortKey} (${sortDir === "asc" ? "ascending" : "descending"})` : "Fetching your GitHub repositories" }) })
3942
4861
  ] }) }) }) }),
3943
- /* @__PURE__ */ jsx23(Box22, { marginTop: 1, paddingX: 1, children: /* @__PURE__ */ jsx23(Text23, { color: "gray", children: "Please wait..." }) })
4862
+ /* @__PURE__ */ jsx29(Box28, { marginTop: 1, paddingX: 1, children: /* @__PURE__ */ jsx29(Text29, { color: "gray", children: "Please wait..." }) })
3944
4863
  ] });
3945
4864
  }
3946
- return /* @__PURE__ */ jsxs22(Box22, { flexDirection: "column", height: availableHeight, children: [
4865
+ return /* @__PURE__ */ jsxs28(Box28, { flexDirection: "column", height: availableHeight, children: [
3947
4866
  headerBar,
3948
- showSponsorReminder && /* @__PURE__ */ jsx23(Box22, { marginX: 1, marginBottom: 1, children: /* @__PURE__ */ jsx23(Box22, { borderStyle: "single", borderColor: "yellow", paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsxs22(Box22, { flexDirection: "column", alignItems: "center", children: [
3949
- /* @__PURE__ */ jsx23(Text23, { color: "yellow", children: "\u{1F49A} Thanks for using gh-manager-cli!" }),
3950
- /* @__PURE__ */ jsx23(Text23, { color: "gray", children: "Your support helps craft more open-source tools" }),
3951
- /* @__PURE__ */ jsx23(Text23, { color: "cyan", children: "\u{1F496} github.com/sponsors/wiiiimm" })
4867
+ showSponsorReminder && /* @__PURE__ */ jsx29(Box28, { marginX: 1, marginBottom: 1, children: /* @__PURE__ */ jsx29(Box28, { borderStyle: "single", borderColor: "yellow", paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsxs28(Box28, { flexDirection: "column", alignItems: "center", children: [
4868
+ /* @__PURE__ */ jsx29(Text29, { color: "yellow", children: "\u{1F49A} Thanks for using gh-manager-cli!" }),
4869
+ /* @__PURE__ */ jsx29(Text29, { color: "gray", children: "Your support helps craft more open-source tools" }),
4870
+ /* @__PURE__ */ jsx29(Text29, { color: "cyan", children: "\u{1F496} github.com/sponsors/wiiiimm" })
3952
4871
  ] }) }) }),
3953
- /* @__PURE__ */ jsx23(Box22, { borderStyle: "single", borderColor: modalOpen ? theme.muted : theme.warning, paddingX: 1, paddingY: 1, marginX: 1, height: contentHeight + containerPadding + 2, flexDirection: "column", children: deleteMode && deleteTarget ? (
4872
+ /* @__PURE__ */ jsx29(Box28, { borderStyle: "single", borderColor: modalOpen ? theme.muted : theme.warning, paddingX: 1, paddingY: 1, marginX: 1, height: contentHeight + containerPadding + 2, flexDirection: "column", children: deleteMode && deleteTarget ? (
3954
4873
  // Centered modal; hide list content while modal is open
3955
- /* @__PURE__ */ jsx23(Box22, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsxs22(Box22, { flexDirection: "column", borderStyle: "round", borderColor: "red", paddingX: 3, paddingY: 2, width: Math.min(terminalWidth - 8, 80), children: [
3956
- /* @__PURE__ */ jsx23(Text23, { bold: true, children: "Delete Confirmation" }),
3957
- /* @__PURE__ */ jsx23(Text23, { color: "red", children: "\u26A0\uFE0F Delete repository?" }),
3958
- /* @__PURE__ */ jsx23(Box22, { height: 2, children: /* @__PURE__ */ jsx23(Text23, { children: " " }) }),
4874
+ /* @__PURE__ */ jsx29(Box28, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsxs28(Box28, { flexDirection: "column", borderStyle: "round", borderColor: "red", paddingX: 3, paddingY: 2, width: Math.min(terminalWidth - 8, 80), children: [
4875
+ /* @__PURE__ */ jsx29(Text29, { bold: true, children: "Delete Confirmation" }),
4876
+ /* @__PURE__ */ jsx29(Text29, { color: "red", children: "\u26A0\uFE0F Delete repository?" }),
4877
+ /* @__PURE__ */ jsx29(Box28, { height: 2, children: /* @__PURE__ */ jsx29(Text29, { children: " " }) }),
3959
4878
  (() => {
3960
4879
  const langName = deleteTarget.primaryLanguage?.name || "";
3961
4880
  const langColor = deleteTarget.primaryLanguage?.color || "#666666";
@@ -3965,22 +4884,22 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3965
4884
  if (deleteTarget.isArchived) line1 += tc.archived.dim(" Archived");
3966
4885
  if (deleteTarget.isFork && deleteTarget.parent) line1 += tc.fork(` Fork of ${deleteTarget.parent.nameWithOwner}`);
3967
4886
  let line2 = "";
3968
- if (langName) line2 += chalk15.hex(langColor)("\u25CF ") + tc.muted(`${langName} `);
4887
+ if (langName) line2 += chalk20.hex(langColor)("\u25CF ") + tc.muted(`${langName} `);
3969
4888
  line2 += tc.muted(`\u2605 ${deleteTarget.stargazerCount} \u2442 ${deleteTarget.forkCount} Updated ${formatDate(deleteTarget.updatedAt)}`);
3970
- return /* @__PURE__ */ jsxs22(Fragment11, { children: [
3971
- /* @__PURE__ */ jsx23(Text23, { children: line1 }),
3972
- /* @__PURE__ */ jsx23(Text23, { children: line2 })
4889
+ return /* @__PURE__ */ jsxs28(Fragment13, { children: [
4890
+ /* @__PURE__ */ jsx29(Text29, { children: line1 }),
4891
+ /* @__PURE__ */ jsx29(Text29, { children: line2 })
3973
4892
  ] });
3974
4893
  })(),
3975
- /* @__PURE__ */ jsx23(Box22, { marginTop: 1, children: /* @__PURE__ */ jsxs22(Text23, { children: [
4894
+ /* @__PURE__ */ jsx29(Box28, { marginTop: 1, children: /* @__PURE__ */ jsxs28(Text29, { children: [
3976
4895
  "Type ",
3977
- /* @__PURE__ */ jsx23(Text23, { color: "yellow", bold: true, children: deleteCode }),
4896
+ /* @__PURE__ */ jsx29(Text29, { color: "yellow", bold: true, children: deleteCode }),
3978
4897
  " to confirm."
3979
4898
  ] }) }),
3980
- !deleteConfirmStage && /* @__PURE__ */ jsxs22(Box22, { marginTop: 1, children: [
3981
- /* @__PURE__ */ jsx23(Text23, { children: "Confirm code: " }),
3982
- /* @__PURE__ */ jsx23(
3983
- TextInput7,
4899
+ !deleteConfirmStage && /* @__PURE__ */ jsxs28(Box28, { marginTop: 1, children: [
4900
+ /* @__PURE__ */ jsx29(Text29, { children: "Confirm code: " }),
4901
+ /* @__PURE__ */ jsx29(
4902
+ TextInput8,
3984
4903
  {
3985
4904
  value: typedCode,
3986
4905
  onChange: (v) => {
@@ -4006,11 +4925,11 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
4006
4925
  }
4007
4926
  )
4008
4927
  ] }),
4009
- deleteConfirmStage && /* @__PURE__ */ jsxs22(Box22, { marginTop: 1, flexDirection: "column", children: [
4010
- /* @__PURE__ */ jsx23(Text23, { color: "red", children: "This action will permanently delete the repository. This cannot be undone." }),
4011
- /* @__PURE__ */ jsxs22(Box22, { marginTop: 1, flexDirection: "row", justifyContent: "center", gap: 6, children: [
4012
- /* @__PURE__ */ jsx23(
4013
- Box22,
4928
+ deleteConfirmStage && /* @__PURE__ */ jsxs28(Box28, { marginTop: 1, flexDirection: "column", children: [
4929
+ /* @__PURE__ */ jsx29(Text29, { color: "red", children: "This action will permanently delete the repository. This cannot be undone." }),
4930
+ /* @__PURE__ */ jsxs28(Box28, { marginTop: 1, flexDirection: "row", justifyContent: "center", gap: 6, children: [
4931
+ /* @__PURE__ */ jsx29(
4932
+ Box28,
4014
4933
  {
4015
4934
  borderStyle: "round",
4016
4935
  borderColor: "red",
@@ -4019,11 +4938,11 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
4019
4938
  alignItems: "center",
4020
4939
  justifyContent: "center",
4021
4940
  flexDirection: "column",
4022
- children: /* @__PURE__ */ jsx23(Text23, { children: confirmFocus === "delete" ? chalk15.bgRed.white.bold(" Delete ") : tc.error.bold("Delete") })
4941
+ children: /* @__PURE__ */ jsx29(Text29, { children: confirmFocus === "delete" ? chalk20.bgRed.white.bold(" Delete ") : tc.error.bold("Delete") })
4023
4942
  }
4024
4943
  ),
4025
- /* @__PURE__ */ jsx23(
4026
- Box22,
4944
+ /* @__PURE__ */ jsx29(
4945
+ Box28,
4027
4946
  {
4028
4947
  borderStyle: "round",
4029
4948
  borderColor: confirmFocus === "cancel" ? "white" : "gray",
@@ -4032,17 +4951,17 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
4032
4951
  alignItems: "center",
4033
4952
  justifyContent: "center",
4034
4953
  flexDirection: "column",
4035
- children: /* @__PURE__ */ jsx23(Text23, { children: confirmFocus === "cancel" ? tc.btnMuted(" Cancel ") : tc.muted.bold("Cancel") })
4954
+ children: /* @__PURE__ */ jsx29(Text29, { children: confirmFocus === "cancel" ? tc.btnMuted(" Cancel ") : tc.muted.bold("Cancel") })
4036
4955
  }
4037
4956
  )
4038
4957
  ] }),
4039
- /* @__PURE__ */ jsx23(Box22, { marginTop: 1, flexDirection: "row", justifyContent: "center", children: /* @__PURE__ */ jsxs22(Text23, { color: "gray", children: [
4958
+ /* @__PURE__ */ jsx29(Box28, { marginTop: 1, flexDirection: "row", justifyContent: "center", children: /* @__PURE__ */ jsxs28(Text29, { color: "gray", children: [
4040
4959
  "Press Enter to ",
4041
4960
  confirmFocus === "delete" ? "Delete" : "Cancel",
4042
4961
  " | Y to Delete | C to Cancel"
4043
4962
  ] }) }),
4044
- /* @__PURE__ */ jsx23(Box22, { marginTop: 1, children: /* @__PURE__ */ jsx23(
4045
- TextInput7,
4963
+ /* @__PURE__ */ jsx29(Box28, { marginTop: 1, children: /* @__PURE__ */ jsx29(
4964
+ TextInput8,
4046
4965
  {
4047
4966
  value: "",
4048
4967
  onChange: () => {
@@ -4055,18 +4974,18 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
4055
4974
  }
4056
4975
  ) })
4057
4976
  ] }),
4058
- deleteError && /* @__PURE__ */ jsx23(Box22, { marginTop: 1, children: /* @__PURE__ */ jsx23(Text23, { color: "magenta", children: deleteError }) }),
4059
- deleting && /* @__PURE__ */ jsx23(Box22, { marginTop: 1, children: /* @__PURE__ */ jsx23(Text23, { color: "yellow", children: "Deleting..." }) })
4977
+ deleteError && /* @__PURE__ */ jsx29(Box28, { marginTop: 1, children: /* @__PURE__ */ jsx29(Text29, { color: "magenta", children: deleteError }) }),
4978
+ deleting && /* @__PURE__ */ jsx29(Box28, { marginTop: 1, children: /* @__PURE__ */ jsx29(Text29, { color: "yellow", children: "Deleting..." }) })
4060
4979
  ] }) })
4061
- ) : archiveMode && archiveTarget ? /* @__PURE__ */ jsx23(Box22, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsxs22(Box22, { flexDirection: "column", borderStyle: "round", borderColor: archiveTarget.isArchived ? "green" : "yellow", paddingX: 3, paddingY: 2, width: Math.min(terminalWidth - 8, 80), children: [
4062
- /* @__PURE__ */ jsx23(Text23, { bold: true, children: archiveTarget.isArchived ? "Unarchive Confirmation" : "Archive Confirmation" }),
4063
- /* @__PURE__ */ jsx23(Text23, { color: archiveTarget.isArchived ? "green" : "yellow", children: archiveTarget.isArchived ? "\u21BA Unarchive repository?" : "\u26A0\uFE0F Archive repository?" }),
4064
- /* @__PURE__ */ jsx23(Box22, { height: 1, children: /* @__PURE__ */ jsx23(Text23, { children: " " }) }),
4065
- /* @__PURE__ */ jsx23(Text23, { children: archiveTarget.nameWithOwner }),
4066
- /* @__PURE__ */ jsx23(Box22, { marginTop: 1, children: /* @__PURE__ */ jsx23(Text23, { children: archiveTarget.isArchived ? "This will make the repository active again." : "This will make the repository read-only." }) }),
4067
- /* @__PURE__ */ jsxs22(Box22, { marginTop: 1, flexDirection: "row", justifyContent: "center", gap: 6, children: [
4068
- /* @__PURE__ */ jsx23(
4069
- Box22,
4980
+ ) : archiveMode && archiveTarget ? /* @__PURE__ */ jsx29(Box28, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsxs28(Box28, { flexDirection: "column", borderStyle: "round", borderColor: archiveTarget.isArchived ? "green" : "yellow", paddingX: 3, paddingY: 2, width: Math.min(terminalWidth - 8, 80), children: [
4981
+ /* @__PURE__ */ jsx29(Text29, { bold: true, children: archiveTarget.isArchived ? "Unarchive Confirmation" : "Archive Confirmation" }),
4982
+ /* @__PURE__ */ jsx29(Text29, { color: archiveTarget.isArchived ? "green" : "yellow", children: archiveTarget.isArchived ? "\u21BA Unarchive repository?" : "\u26A0\uFE0F Archive repository?" }),
4983
+ /* @__PURE__ */ jsx29(Box28, { height: 1, children: /* @__PURE__ */ jsx29(Text29, { children: " " }) }),
4984
+ /* @__PURE__ */ jsx29(Text29, { children: archiveTarget.nameWithOwner }),
4985
+ /* @__PURE__ */ jsx29(Box28, { marginTop: 1, children: /* @__PURE__ */ jsx29(Text29, { children: archiveTarget.isArchived ? "This will make the repository active again." : "This will make the repository read-only." }) }),
4986
+ /* @__PURE__ */ jsxs28(Box28, { marginTop: 1, flexDirection: "row", justifyContent: "center", gap: 6, children: [
4987
+ /* @__PURE__ */ jsx29(
4988
+ Box28,
4070
4989
  {
4071
4990
  borderStyle: "round",
4072
4991
  borderColor: archiveTarget.isArchived ? "green" : "yellow",
@@ -4075,11 +4994,11 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
4075
4994
  alignItems: "center",
4076
4995
  justifyContent: "center",
4077
4996
  flexDirection: "column",
4078
- children: /* @__PURE__ */ jsx23(Text23, { children: archiveFocus === "confirm" ? chalk15.bgGreen.white.bold(` ${archiveTarget.isArchived ? "Unarchive" : "Archive"} `) : (archiveTarget.isArchived ? tc.success : tc.warning).bold(archiveTarget.isArchived ? "Unarchive" : "Archive") })
4997
+ children: /* @__PURE__ */ jsx29(Text29, { children: archiveFocus === "confirm" ? chalk20.bgGreen.white.bold(` ${archiveTarget.isArchived ? "Unarchive" : "Archive"} `) : (archiveTarget.isArchived ? tc.success : tc.warning).bold(archiveTarget.isArchived ? "Unarchive" : "Archive") })
4079
4998
  }
4080
4999
  ),
4081
- /* @__PURE__ */ jsx23(
4082
- Box22,
5000
+ /* @__PURE__ */ jsx29(
5001
+ Box28,
4083
5002
  {
4084
5003
  borderStyle: "round",
4085
5004
  borderColor: archiveFocus === "cancel" ? "white" : "gray",
@@ -4088,19 +5007,19 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
4088
5007
  alignItems: "center",
4089
5008
  justifyContent: "center",
4090
5009
  flexDirection: "column",
4091
- children: /* @__PURE__ */ jsx23(Text23, { children: archiveFocus === "cancel" ? tc.btnMuted(" Cancel ") : tc.muted.bold("Cancel") })
5010
+ children: /* @__PURE__ */ jsx29(Text29, { children: archiveFocus === "cancel" ? tc.btnMuted(" Cancel ") : tc.muted.bold("Cancel") })
4092
5011
  }
4093
5012
  )
4094
5013
  ] }),
4095
- /* @__PURE__ */ jsx23(Box22, { marginTop: 1, flexDirection: "row", justifyContent: "center", children: /* @__PURE__ */ jsxs22(Text23, { color: theme.muted, children: [
5014
+ /* @__PURE__ */ jsx29(Box28, { marginTop: 1, flexDirection: "row", justifyContent: "center", children: /* @__PURE__ */ jsxs28(Text29, { color: theme.muted, children: [
4096
5015
  "Press Enter to ",
4097
5016
  archiveFocus === "confirm" ? archiveTarget.isArchived ? "Unarchive" : "Archive" : "Cancel",
4098
5017
  " | Y to ",
4099
5018
  archiveTarget.isArchived ? "Unarchive" : "Archive",
4100
5019
  " | C to Cancel"
4101
5020
  ] }) }),
4102
- /* @__PURE__ */ jsx23(Box22, { marginTop: 1, children: /* @__PURE__ */ jsx23(
4103
- TextInput7,
5021
+ /* @__PURE__ */ jsx29(Box28, { marginTop: 1, children: /* @__PURE__ */ jsx29(
5022
+ TextInput8,
4104
5023
  {
4105
5024
  value: "",
4106
5025
  onChange: () => {
@@ -4114,14 +5033,14 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
4114
5033
  }
4115
5034
  }
4116
5035
  ) }),
4117
- archiveError && /* @__PURE__ */ jsx23(Box22, { marginTop: 1, children: /* @__PURE__ */ jsx23(Text23, { color: "magenta", children: archiveError }) }),
4118
- archiving && /* @__PURE__ */ jsx23(Box22, { marginTop: 1, children: /* @__PURE__ */ jsx23(Text23, { color: "yellow", children: archiveTarget.isArchived ? "Unarchiving..." : "Archiving..." }) })
4119
- ] }) }) : syncMode && syncTarget ? /* @__PURE__ */ jsx23(Box22, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsxs22(Box22, { flexDirection: "column", borderStyle: "round", borderColor: "blue", paddingX: 3, paddingY: 2, width: Math.min(terminalWidth - 8, 80), children: [
4120
- /* @__PURE__ */ jsx23(Text23, { bold: true, children: "Sync Fork Confirmation" }),
4121
- /* @__PURE__ */ jsx23(Text23, { color: "blue", children: "\u27F2 Sync fork with upstream?" }),
4122
- /* @__PURE__ */ jsx23(Box22, { height: 1, children: /* @__PURE__ */ jsx23(Text23, { children: " " }) }),
4123
- /* @__PURE__ */ jsx23(Text23, { children: syncTarget.nameWithOwner }),
4124
- syncTarget.parent && /* @__PURE__ */ jsxs22(Text23, { color: "gray", children: [
5036
+ archiveError && /* @__PURE__ */ jsx29(Box28, { marginTop: 1, children: /* @__PURE__ */ jsx29(Text29, { color: "magenta", children: archiveError }) }),
5037
+ archiving && /* @__PURE__ */ jsx29(Box28, { marginTop: 1, children: /* @__PURE__ */ jsx29(Text29, { color: "yellow", children: archiveTarget.isArchived ? "Unarchiving..." : "Archiving..." }) })
5038
+ ] }) }) : syncMode && syncTarget ? /* @__PURE__ */ jsx29(Box28, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsxs28(Box28, { flexDirection: "column", borderStyle: "round", borderColor: "blue", paddingX: 3, paddingY: 2, width: Math.min(terminalWidth - 8, 80), children: [
5039
+ /* @__PURE__ */ jsx29(Text29, { bold: true, children: "Sync Fork Confirmation" }),
5040
+ /* @__PURE__ */ jsx29(Text29, { color: "blue", children: "\u27F2 Sync fork with upstream?" }),
5041
+ /* @__PURE__ */ jsx29(Box28, { height: 1, children: /* @__PURE__ */ jsx29(Text29, { children: " " }) }),
5042
+ /* @__PURE__ */ jsx29(Text29, { children: syncTarget.nameWithOwner }),
5043
+ syncTarget.parent && /* @__PURE__ */ jsxs28(Text29, { color: "gray", children: [
4125
5044
  "Upstream: ",
4126
5045
  syncTarget.parent.nameWithOwner
4127
5046
  ] }),
@@ -4133,15 +5052,15 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
4133
5052
  const behind = Math.max(0, parentC - forkC);
4134
5053
  const ahead = Math.max(0, forkC - parentC);
4135
5054
  const parts = [];
4136
- if (ahead > 0) parts.push(chalk15.green(`${ahead} ahead`));
4137
- if (behind > 0) parts.push(chalk15.yellow(`${behind} behind`));
4138
- const statusText = parts.length === 0 ? chalk15.green("Your fork is up to date with upstream.") : `This fork is ${parts.join(", ")} of upstream.`;
4139
- return /* @__PURE__ */ jsx23(Text23, { children: statusText });
5055
+ if (ahead > 0) parts.push(chalk20.green(`${ahead} ahead`));
5056
+ if (behind > 0) parts.push(chalk20.yellow(`${behind} behind`));
5057
+ const statusText = parts.length === 0 ? chalk20.green("Your fork is up to date with upstream.") : `This fork is ${parts.join(", ")} of upstream.`;
5058
+ return /* @__PURE__ */ jsx29(Text29, { children: statusText });
4140
5059
  })(),
4141
- /* @__PURE__ */ jsx23(Box22, { marginTop: 1, children: /* @__PURE__ */ jsx23(Text23, { children: "This will merge upstream changes into your fork." }) }),
4142
- /* @__PURE__ */ jsxs22(Box22, { marginTop: 1, flexDirection: "row", justifyContent: "center", gap: 6, children: [
4143
- /* @__PURE__ */ jsx23(
4144
- Box22,
5060
+ /* @__PURE__ */ jsx29(Box28, { marginTop: 1, children: /* @__PURE__ */ jsx29(Text29, { children: "This will merge upstream changes into your fork." }) }),
5061
+ /* @__PURE__ */ jsxs28(Box28, { marginTop: 1, flexDirection: "row", justifyContent: "center", gap: 6, children: [
5062
+ /* @__PURE__ */ jsx29(
5063
+ Box28,
4145
5064
  {
4146
5065
  borderStyle: "round",
4147
5066
  borderColor: "blue",
@@ -4150,11 +5069,11 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
4150
5069
  alignItems: "center",
4151
5070
  justifyContent: "center",
4152
5071
  flexDirection: "column",
4153
- children: /* @__PURE__ */ jsx23(Text23, { children: syncFocus === "confirm" ? tc.btnPrimary(" Sync ") : tc.primary.bold("Sync") })
5072
+ children: /* @__PURE__ */ jsx29(Text29, { children: syncFocus === "confirm" ? tc.btnPrimary(" Sync ") : tc.primary.bold("Sync") })
4154
5073
  }
4155
5074
  ),
4156
- /* @__PURE__ */ jsx23(
4157
- Box22,
5075
+ /* @__PURE__ */ jsx29(
5076
+ Box28,
4158
5077
  {
4159
5078
  borderStyle: "round",
4160
5079
  borderColor: syncFocus === "cancel" ? "white" : "gray",
@@ -4163,17 +5082,17 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
4163
5082
  alignItems: "center",
4164
5083
  justifyContent: "center",
4165
5084
  flexDirection: "column",
4166
- children: /* @__PURE__ */ jsx23(Text23, { children: syncFocus === "cancel" ? tc.btnMuted(" Cancel ") : tc.muted.bold("Cancel") })
5085
+ children: /* @__PURE__ */ jsx29(Text29, { children: syncFocus === "cancel" ? tc.btnMuted(" Cancel ") : tc.muted.bold("Cancel") })
4167
5086
  }
4168
5087
  )
4169
5088
  ] }),
4170
- /* @__PURE__ */ jsx23(Box22, { marginTop: 1, flexDirection: "row", justifyContent: "center", children: /* @__PURE__ */ jsxs22(Text23, { color: theme.muted, children: [
5089
+ /* @__PURE__ */ jsx29(Box28, { marginTop: 1, flexDirection: "row", justifyContent: "center", children: /* @__PURE__ */ jsxs28(Text29, { color: theme.muted, children: [
4171
5090
  "Press Enter to ",
4172
5091
  syncFocus === "confirm" ? "Sync" : "Cancel",
4173
5092
  " | Y to Sync | C to Cancel"
4174
5093
  ] }) }),
4175
- /* @__PURE__ */ jsx23(Box22, { marginTop: 1, children: /* @__PURE__ */ jsx23(
4176
- TextInput7,
5094
+ /* @__PURE__ */ jsx29(Box28, { marginTop: 1, children: /* @__PURE__ */ jsx29(
5095
+ TextInput8,
4177
5096
  {
4178
5097
  value: "",
4179
5098
  onChange: () => {
@@ -4187,14 +5106,14 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
4187
5106
  }
4188
5107
  }
4189
5108
  ) }),
4190
- syncError && /* @__PURE__ */ jsx23(Box22, { marginTop: 1, children: /* @__PURE__ */ jsx23(Text23, { color: theme.error, children: syncError }) }),
4191
- syncing && /* @__PURE__ */ jsx23(Box22, { marginTop: 1, children: /* @__PURE__ */ jsx23(Text23, { color: theme.warning, children: "Syncing..." }) })
4192
- ] }) }) : logoutMode ? /* @__PURE__ */ jsx23(Box22, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsxs22(Box22, { flexDirection: "column", borderStyle: "round", borderColor: theme.primary, paddingX: 3, paddingY: 2, width: Math.min(terminalWidth - 8, 80), children: [
4193
- /* @__PURE__ */ jsx23(Text23, { bold: true, children: "Logout Confirmation" }),
4194
- /* @__PURE__ */ jsx23(Text23, { color: theme.primary, children: "Are you sure you want to log out?" }),
4195
- /* @__PURE__ */ jsxs22(Box22, { marginTop: 1, flexDirection: "row", justifyContent: "center", gap: 6, children: [
4196
- /* @__PURE__ */ jsx23(
4197
- Box22,
5109
+ syncError && /* @__PURE__ */ jsx29(Box28, { marginTop: 1, children: /* @__PURE__ */ jsx29(Text29, { color: theme.error, children: syncError }) }),
5110
+ syncing && /* @__PURE__ */ jsx29(Box28, { marginTop: 1, children: /* @__PURE__ */ jsx29(Text29, { color: theme.warning, children: "Syncing..." }) })
5111
+ ] }) }) : logoutMode ? /* @__PURE__ */ jsx29(Box28, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsxs28(Box28, { flexDirection: "column", borderStyle: "round", borderColor: theme.primary, paddingX: 3, paddingY: 2, width: Math.min(terminalWidth - 8, 80), children: [
5112
+ /* @__PURE__ */ jsx29(Text29, { bold: true, children: "Logout Confirmation" }),
5113
+ /* @__PURE__ */ jsx29(Text29, { color: theme.primary, children: "Are you sure you want to log out?" }),
5114
+ /* @__PURE__ */ jsxs28(Box28, { marginTop: 1, flexDirection: "row", justifyContent: "center", gap: 6, children: [
5115
+ /* @__PURE__ */ jsx29(
5116
+ Box28,
4198
5117
  {
4199
5118
  borderStyle: "round",
4200
5119
  borderColor: theme.primary,
@@ -4203,11 +5122,11 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
4203
5122
  alignItems: "center",
4204
5123
  justifyContent: "center",
4205
5124
  flexDirection: "column",
4206
- children: /* @__PURE__ */ jsx23(Text23, { children: logoutFocus === "confirm" ? tc.btnPrimary(" Logout ") : tc.primary.bold("Logout") })
5125
+ children: /* @__PURE__ */ jsx29(Text29, { children: logoutFocus === "confirm" ? tc.btnPrimary(" Logout ") : tc.primary.bold("Logout") })
4207
5126
  }
4208
5127
  ),
4209
- /* @__PURE__ */ jsx23(
4210
- Box22,
5128
+ /* @__PURE__ */ jsx29(
5129
+ Box28,
4211
5130
  {
4212
5131
  borderStyle: "round",
4213
5132
  borderColor: logoutFocus === "cancel" ? "white" : theme.muted,
@@ -4216,16 +5135,16 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
4216
5135
  alignItems: "center",
4217
5136
  justifyContent: "center",
4218
5137
  flexDirection: "column",
4219
- children: /* @__PURE__ */ jsx23(Text23, { children: logoutFocus === "cancel" ? tc.btnMuted(" Cancel ") : tc.muted.bold("Cancel") })
5138
+ children: /* @__PURE__ */ jsx29(Text29, { children: logoutFocus === "cancel" ? tc.btnMuted(" Cancel ") : tc.muted.bold("Cancel") })
4220
5139
  }
4221
5140
  )
4222
5141
  ] }),
4223
- /* @__PURE__ */ jsx23(Box22, { marginTop: 1, flexDirection: "row", justifyContent: "center", children: /* @__PURE__ */ jsxs22(Text23, { color: theme.muted, children: [
5142
+ /* @__PURE__ */ jsx29(Box28, { marginTop: 1, flexDirection: "row", justifyContent: "center", children: /* @__PURE__ */ jsxs28(Text29, { color: theme.muted, children: [
4224
5143
  "Press Enter to ",
4225
5144
  logoutFocus === "confirm" ? "Logout" : "Cancel",
4226
5145
  " | Y to Logout | C to Cancel"
4227
5146
  ] }) })
4228
- ] }) }) : orgSwitcherOpen ? /* @__PURE__ */ jsx23(Box22, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx23(
5147
+ ] }) }) : orgSwitcherOpen ? /* @__PURE__ */ jsx29(Box28, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx29(
4229
5148
  OrgSwitcher,
4230
5149
  {
4231
5150
  token,
@@ -4233,45 +5152,45 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
4233
5152
  onSelect: handleOrgContextChange,
4234
5153
  onClose: () => setOrgSwitcherOpen(false)
4235
5154
  }
4236
- ) }) : infoMode ? /* @__PURE__ */ jsx23(Box22, { height: contentHeight, alignItems: "center", justifyContent: "center", children: (() => {
5155
+ ) }) : infoMode ? /* @__PURE__ */ jsx29(Box28, { height: contentHeight, alignItems: "center", justifyContent: "center", children: (() => {
4237
5156
  const repo = infoRepo || visibleItems[cursor];
4238
- if (!repo) return /* @__PURE__ */ jsx23(Text23, { color: theme.error, children: "No repository selected." });
5157
+ if (!repo) return /* @__PURE__ */ jsx29(Text29, { color: theme.error, children: "No repository selected." });
4239
5158
  const langName = repo.primaryLanguage?.name || "N/A";
4240
5159
  const langColor = repo.primaryLanguage?.color || "#666666";
4241
- return /* @__PURE__ */ jsxs22(Box22, { flexDirection: "column", borderStyle: "round", borderColor: theme.internal, paddingX: 3, paddingY: 2, width: Math.min(terminalWidth - 8, 90), children: [
4242
- /* @__PURE__ */ jsxs22(Text23, { bold: true, children: [
5160
+ return /* @__PURE__ */ jsxs28(Box28, { flexDirection: "column", borderStyle: "round", borderColor: theme.internal, paddingX: 3, paddingY: 2, width: Math.min(terminalWidth - 8, 90), children: [
5161
+ /* @__PURE__ */ jsxs28(Text29, { bold: true, children: [
4243
5162
  "Repository Info ",
4244
5163
  infoRepo ? tc.muted("(cached)") : ""
4245
5164
  ] }),
4246
- /* @__PURE__ */ jsx23(Box22, { height: 1, children: /* @__PURE__ */ jsx23(Text23, { children: " " }) }),
4247
- /* @__PURE__ */ jsx23(Text23, { children: tc.text.bold(repo.nameWithOwner) }),
4248
- repo.description && /* @__PURE__ */ jsx23(Text23, { color: theme.muted, children: repo.description }),
4249
- /* @__PURE__ */ jsx23(Box22, { height: 1, children: /* @__PURE__ */ jsx23(Text23, { children: " " }) }),
4250
- /* @__PURE__ */ jsxs22(Text23, { children: [
5165
+ /* @__PURE__ */ jsx29(Box28, { height: 1, children: /* @__PURE__ */ jsx29(Text29, { children: " " }) }),
5166
+ /* @__PURE__ */ jsx29(Text29, { children: tc.text.bold(repo.nameWithOwner) }),
5167
+ repo.description && /* @__PURE__ */ jsx29(Text29, { color: theme.muted, children: repo.description }),
5168
+ /* @__PURE__ */ jsx29(Box28, { height: 1, children: /* @__PURE__ */ jsx29(Text29, { children: " " }) }),
5169
+ /* @__PURE__ */ jsxs28(Text29, { children: [
4251
5170
  repo.visibility === "PRIVATE" ? tc.private("Private") : repo.visibility === "INTERNAL" ? tc.internal("Internal") : tc.success("Public"),
4252
5171
  repo.isArchived ? tc.archived(" Archived") : "",
4253
5172
  repo.isFork ? tc.fork(" Fork") : ""
4254
5173
  ] }),
4255
- /* @__PURE__ */ jsx23(Text23, { children: tc.muted(`\u2605 ${repo.stargazerCount} \u2442 ${repo.forkCount}`) }),
4256
- /* @__PURE__ */ jsxs22(Text23, { children: [
4257
- chalk15.hex(langColor)(`\u25CF `),
5174
+ /* @__PURE__ */ jsx29(Text29, { children: tc.muted(`\u2605 ${repo.stargazerCount} \u2442 ${repo.forkCount}`) }),
5175
+ /* @__PURE__ */ jsxs28(Text29, { children: [
5176
+ chalk20.hex(langColor)(`\u25CF `),
4258
5177
  tc.muted(`${langName}`)
4259
5178
  ] }),
4260
- /* @__PURE__ */ jsxs22(Text23, { color: theme.muted, children: [
5179
+ /* @__PURE__ */ jsxs28(Text29, { color: theme.muted, children: [
4261
5180
  "Updated: ",
4262
5181
  formatDate(repo.updatedAt),
4263
5182
  " \u2022 Pushed: ",
4264
5183
  formatDate(repo.pushedAt)
4265
5184
  ] }),
4266
- /* @__PURE__ */ jsxs22(Text23, { color: theme.muted, children: [
5185
+ /* @__PURE__ */ jsxs28(Text29, { color: theme.muted, children: [
4267
5186
  "Size: ",
4268
5187
  repo.diskUsage,
4269
5188
  " KB"
4270
5189
  ] }),
4271
- /* @__PURE__ */ jsx23(Box22, { height: 1, children: /* @__PURE__ */ jsx23(Text23, { children: " " }) }),
4272
- /* @__PURE__ */ jsx23(Text23, { color: theme.muted, children: "Press Esc or I to close" })
5190
+ /* @__PURE__ */ jsx29(Box28, { height: 1, children: /* @__PURE__ */ jsx29(Text29, { children: " " }) }),
5191
+ /* @__PURE__ */ jsx29(Text29, { color: theme.muted, children: "Press Esc or I to close" })
4273
5192
  ] });
4274
- })() }) : archiveFilterMode ? /* @__PURE__ */ jsx23(Box22, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx23(
5193
+ })() }) : archiveFilterMode ? /* @__PURE__ */ jsx29(Box28, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx29(
4275
5194
  ArchiveFilterModal,
4276
5195
  {
4277
5196
  currentFilter: archiveFilter,
@@ -4284,7 +5203,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
4284
5203
  onCancel: () => setArchiveFilterMode(false),
4285
5204
  theme
4286
5205
  }
4287
- ) }) : visibilityMode ? /* @__PURE__ */ jsx23(Box22, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx23(
5206
+ ) }) : visibilityMode ? /* @__PURE__ */ jsx29(Box28, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx29(
4288
5207
  VisibilityModal,
4289
5208
  {
4290
5209
  currentFilter: visibilityFilter,
@@ -4298,7 +5217,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
4298
5217
  onCancel: () => setVisibilityMode(false),
4299
5218
  theme
4300
5219
  }
4301
- ) }) : sortMode ? /* @__PURE__ */ jsx23(Box22, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx23(
5220
+ ) }) : sortMode ? /* @__PURE__ */ jsx29(Box28, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx29(
4302
5221
  SortModal,
4303
5222
  {
4304
5223
  currentSort: sortKey,
@@ -4311,7 +5230,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
4311
5230
  onCancel: () => setSortMode(false),
4312
5231
  theme
4313
5232
  }
4314
- ) }) : sortDirectionMode ? /* @__PURE__ */ jsx23(Box22, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx23(
5233
+ ) }) : sortDirectionMode ? /* @__PURE__ */ jsx29(Box28, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx29(
4315
5234
  SortDirectionModal,
4316
5235
  {
4317
5236
  currentDirection: sortDir,
@@ -4325,7 +5244,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
4325
5244
  onCancel: () => setSortDirectionMode(false),
4326
5245
  theme
4327
5246
  }
4328
- ) }) : changeVisibilityMode && changeVisibilityTarget ? /* @__PURE__ */ jsx23(Box22, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx23(
5247
+ ) }) : changeVisibilityMode && changeVisibilityTarget ? /* @__PURE__ */ jsx29(Box28, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx29(
4329
5248
  ChangeVisibilityModal,
4330
5249
  {
4331
5250
  isOpen: changeVisibilityMode,
@@ -4339,7 +5258,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
4339
5258
  error: changeVisibilityError,
4340
5259
  theme
4341
5260
  }
4342
- ) }) : renameMode && renameTarget ? /* @__PURE__ */ jsx23(Box22, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx23(
5261
+ ) }) : renameMode && renameTarget ? /* @__PURE__ */ jsx29(Box28, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx29(
4343
5262
  RenameModal,
4344
5263
  {
4345
5264
  repo: renameTarget,
@@ -4347,7 +5266,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
4347
5266
  onCancel: closeRenameModal,
4348
5267
  theme
4349
5268
  }
4350
- ) }) : createMode ? /* @__PURE__ */ jsx23(Box22, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx23(
5269
+ ) }) : createMode ? /* @__PURE__ */ jsx29(Box28, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx29(
4351
5270
  CreateRepoModal,
4352
5271
  {
4353
5272
  ownerSlug: ownerContext === "personal" ? viewerLogin || "me" : ownerContext.login,
@@ -4357,7 +5276,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
4357
5276
  onCancel: () => setCreateMode(false),
4358
5277
  theme
4359
5278
  }
4360
- ) }) : transferMode && transferTarget ? /* @__PURE__ */ jsx23(Box22, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx23(
5279
+ ) }) : transferMode && transferTarget ? /* @__PURE__ */ jsx29(Box28, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx29(
4361
5280
  TransferModal,
4362
5281
  {
4363
5282
  repo: transferTarget,
@@ -4365,7 +5284,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
4365
5284
  onCancel: closeTransferModal,
4366
5285
  theme
4367
5286
  }
4368
- ) }) : copyUrlMode ? /* @__PURE__ */ jsx23(Box22, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx23(
5287
+ ) }) : copyUrlMode ? /* @__PURE__ */ jsx29(Box28, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx29(
4369
5288
  CopyUrlModal,
4370
5289
  {
4371
5290
  repo: copyUrlTarget,
@@ -4374,7 +5293,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
4374
5293
  onCopy: handleCopyUrl,
4375
5294
  theme
4376
5295
  }
4377
- ) }) : unstarMode && unstarTarget ? /* @__PURE__ */ jsx23(Box22, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx23(
5296
+ ) }) : unstarMode && unstarTarget ? /* @__PURE__ */ jsx29(Box28, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx29(
4378
5297
  UnstarModal,
4379
5298
  {
4380
5299
  visible: unstarMode,
@@ -4385,7 +5304,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
4385
5304
  error: unstarError,
4386
5305
  theme
4387
5306
  }
4388
- ) }) : starMode && starTarget ? /* @__PURE__ */ jsx23(Box22, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx23(
5307
+ ) }) : starMode && starTarget ? /* @__PURE__ */ jsx29(Box28, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx29(
4389
5308
  StarModal,
4390
5309
  {
4391
5310
  visible: starMode,
@@ -4397,7 +5316,87 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
4397
5316
  error: starError,
4398
5317
  theme
4399
5318
  }
4400
- ) }) : openInBrowserMode && openInBrowserTarget ? /* @__PURE__ */ jsx23(Box22, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx23(
5319
+ ) }) : bulkProgressOpen && bulkMeta ? /* @__PURE__ */ jsx29(Box28, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx29(
5320
+ BulkProgressModal,
5321
+ {
5322
+ state: bulkProgress,
5323
+ actionLabel: bulkMeta.label,
5324
+ gerund: bulkMeta.gerund,
5325
+ pastVerb: bulkMeta.pastVerb,
5326
+ actionColor: bulkMeta.color,
5327
+ terminalWidth
5328
+ }
5329
+ ) }) : bulkDeleteCodeOpen ? /* @__PURE__ */ jsx29(Box28, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx29(
5330
+ BulkDeleteCodeModal,
5331
+ {
5332
+ count: bulkFinalSelection.size,
5333
+ terminalWidth,
5334
+ onConfirm: () => {
5335
+ setBulkDeleteCodeOpen(false);
5336
+ executeBulkOperation(Array.from(bulkFinalSelection.values()), "delete");
5337
+ },
5338
+ onCancel: resetBulkFlow
5339
+ }
5340
+ ) }) : bulkConfirmOpen && bulkAction && bulkMeta ? /* @__PURE__ */ jsx29(Box28, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx29(
5341
+ BulkConfirmModal,
5342
+ {
5343
+ count: bulkFinalSelection.size,
5344
+ actionLabel: bulkMeta.label,
5345
+ actionColor: bulkMeta.color,
5346
+ actionVerb: bulkMeta.label.toLowerCase(),
5347
+ terminalWidth,
5348
+ onConfirm: () => {
5349
+ setBulkConfirmOpen(false);
5350
+ if (bulkAction === "delete") {
5351
+ setBulkDeleteCodeOpen(true);
5352
+ } else {
5353
+ executeBulkOperation(Array.from(bulkFinalSelection.values()), bulkAction, bulkVisibilityTarget);
5354
+ }
5355
+ },
5356
+ onCancel: resetBulkFlow
5357
+ }
5358
+ ) }) : bulkReviewOpen && bulkAction && bulkMeta ? /* @__PURE__ */ jsx29(Box28, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx29(
5359
+ BulkReviewModal,
5360
+ {
5361
+ selectedRepos,
5362
+ actionLabel: bulkMeta.label,
5363
+ actionColor: bulkMeta.color,
5364
+ terminalWidth,
5365
+ maxHeight: contentHeight,
5366
+ onConfirm: (finalSelection) => {
5367
+ setSelectedRepos(finalSelection);
5368
+ setBulkFinalSelection(finalSelection);
5369
+ setBulkReviewOpen(false);
5370
+ setBulkConfirmOpen(true);
5371
+ },
5372
+ onCancel: resetBulkFlow
5373
+ }
5374
+ ) }) : bulkVisibilityOpen ? /* @__PURE__ */ jsx29(Box28, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx29(
5375
+ BulkVisibilityModal,
5376
+ {
5377
+ count: selectedRepos.size,
5378
+ isEnterprise: isEnterpriseOrg,
5379
+ terminalWidth,
5380
+ onChoose: (target) => {
5381
+ setBulkVisibilityTarget(target);
5382
+ setBulkVisibilityOpen(false);
5383
+ beginBulkReview("visibility");
5384
+ },
5385
+ onCancel: resetBulkFlow
5386
+ }
5387
+ ) }) : bulkIntentKind ? /* @__PURE__ */ jsx29(Box28, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx29(
5388
+ BulkIntentModal,
5389
+ {
5390
+ kind: bulkIntentKind,
5391
+ count: selectedRepos.size,
5392
+ terminalWidth,
5393
+ onChoose: (action) => {
5394
+ setBulkIntentKind(null);
5395
+ beginBulkReview(action);
5396
+ },
5397
+ onCancel: resetBulkFlow
5398
+ }
5399
+ ) }) : openInBrowserMode && openInBrowserTarget ? /* @__PURE__ */ jsx29(Box28, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx29(
4401
5400
  OpenInBrowserModal,
4402
5401
  {
4403
5402
  repo: openInBrowserTarget,
@@ -4412,8 +5411,8 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
4412
5411
  },
4413
5412
  theme
4414
5413
  }
4415
- ) }) : /* @__PURE__ */ jsxs22(Fragment11, { children: [
4416
- /* @__PURE__ */ jsx23(
5414
+ ) }) : /* @__PURE__ */ jsxs28(Fragment13, { children: [
5415
+ /* @__PURE__ */ jsx29(
4417
5416
  RepoListHeader,
4418
5417
  {
4419
5418
  ownerContext,
@@ -4429,10 +5428,14 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
4429
5428
  theme
4430
5429
  }
4431
5430
  ),
4432
- filterMode && /* @__PURE__ */ jsxs22(Box22, { marginBottom: 1, children: [
4433
- /* @__PURE__ */ jsx23(Text23, { children: "Search: " }),
4434
- /* @__PURE__ */ jsx23(
4435
- TextInput7,
5431
+ multiSelectMode && /* @__PURE__ */ jsxs28(Box28, { marginBottom: 1, flexDirection: "row", justifyContent: "space-between", children: [
5432
+ /* @__PURE__ */ jsx29(Text29, { color: "cyan", bold: true, children: `[BULK SELECT] ${selectedRepos.size > 0 ? `${selectedRepos.size} selected` : "No selection"}` }),
5433
+ /* @__PURE__ */ jsx29(Text29, { color: "gray", children: selectedRepos.size > 0 ? "Space select \xB7 X unselect all \xB7 Ctrl+S star \xB7 Ctrl+A archive \xB7 Ctrl+V visibility \xB7 Del delete \xB7 B/Esc exit" : "Space select \xB7 B/Esc exit" })
5434
+ ] }),
5435
+ filterMode && /* @__PURE__ */ jsxs28(Box28, { marginBottom: 1, children: [
5436
+ /* @__PURE__ */ jsx29(Text29, { children: "Search: " }),
5437
+ /* @__PURE__ */ jsx29(
5438
+ TextInput8,
4436
5439
  {
4437
5440
  value: filter,
4438
5441
  onChange: (val) => {
@@ -4445,10 +5448,10 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
4445
5448
  }
4446
5449
  )
4447
5450
  ] }),
4448
- /* @__PURE__ */ jsxs22(Box22, { flexDirection: "column", height: listHeight, children: [
4449
- visibleItems.slice(windowed.start, windowed.end).map((repo, i) => {
5451
+ /* @__PURE__ */ jsxs28(Box28, { flexDirection: "column", height: listHeight, children: [
5452
+ filterMode && filter.trim().length > 0 && filter.trim().length < 3 ? /* @__PURE__ */ jsx29(Box28, { justifyContent: "center", alignItems: "center", flexGrow: 1, children: /* @__PURE__ */ jsx29(Text29, { color: "gray", dimColor: true, children: "Type at least 3 characters to search" }) }) : visibleItems.slice(windowed.start, windowed.end).map((repo, i) => {
4450
5453
  const idx = windowed.start + i;
4451
- return /* @__PURE__ */ jsx23(
5454
+ return /* @__PURE__ */ jsx29(
4452
5455
  RepoRow,
4453
5456
  {
4454
5457
  repo,
@@ -4458,64 +5461,67 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
4458
5461
  spacingLines,
4459
5462
  forkTracking,
4460
5463
  starsMode,
5464
+ multiSelectMode,
5465
+ isChecked: selectedRepos.has(repo.id),
4461
5466
  theme
4462
5467
  },
4463
5468
  repo.nameWithOwner
4464
5469
  );
4465
5470
  }),
4466
- loadingMore && hasNextPage && !starsMode && /* @__PURE__ */ jsx23(Box22, { justifyContent: "center", alignItems: "center", marginTop: 1, children: /* @__PURE__ */ jsxs22(Box22, { flexDirection: "row", children: [
4467
- /* @__PURE__ */ jsx23(Box22, { width: 2, flexShrink: 0, flexGrow: 0, marginRight: 1, children: /* @__PURE__ */ jsx23(Text23, { color: "cyan", children: /* @__PURE__ */ jsx23(SlowSpinner, {}) }) }),
4468
- /* @__PURE__ */ jsxs22(Text23, { color: "cyan", children: [
5471
+ loadingMore && hasNextPage && !starsMode && /* @__PURE__ */ jsx29(Box28, { justifyContent: "center", alignItems: "center", marginTop: 1, children: /* @__PURE__ */ jsxs28(Box28, { flexDirection: "row", children: [
5472
+ /* @__PURE__ */ jsx29(Box28, { width: 2, flexShrink: 0, flexGrow: 0, marginRight: 1, children: /* @__PURE__ */ jsx29(Text29, { color: "cyan", children: /* @__PURE__ */ jsx29(SlowSpinner, {}) }) }),
5473
+ /* @__PURE__ */ jsxs28(Text29, { color: "cyan", children: [
4469
5474
  "Loading repositories\u2026 ",
4470
5475
  totalCount > 0 ? `(${items.length}/${totalCount})` : `(${items.length})`
4471
5476
  ] })
4472
5477
  ] }) }),
4473
- loadingMore && hasNextPage && starsMode && /* @__PURE__ */ jsx23(Box22, { justifyContent: "center", alignItems: "center", marginTop: 1, children: /* @__PURE__ */ jsxs22(Box22, { flexDirection: "row", children: [
4474
- /* @__PURE__ */ jsx23(Box22, { width: 2, flexShrink: 0, flexGrow: 0, marginRight: 1, children: /* @__PURE__ */ jsx23(Text23, { color: "cyan", children: /* @__PURE__ */ jsx23(SlowSpinner, {}) }) }),
4475
- /* @__PURE__ */ jsx23(Text23, { color: "cyan", children: "Loading more repositories..." })
5478
+ loadingMore && hasNextPage && starsMode && /* @__PURE__ */ jsx29(Box28, { justifyContent: "center", alignItems: "center", marginTop: 1, children: /* @__PURE__ */ jsxs28(Box28, { flexDirection: "row", children: [
5479
+ /* @__PURE__ */ jsx29(Box28, { width: 2, flexShrink: 0, flexGrow: 0, marginRight: 1, children: /* @__PURE__ */ jsx29(Text29, { color: "cyan", children: /* @__PURE__ */ jsx29(SlowSpinner, {}) }) }),
5480
+ /* @__PURE__ */ jsx29(Text29, { color: "cyan", children: "Loading more repositories..." })
4476
5481
  ] }) }),
4477
- filterActive && hasNextPage && !starsMode && /* @__PURE__ */ jsx23(Box22, { justifyContent: "center", alignItems: "center", marginTop: 1, children: /* @__PURE__ */ jsxs22(Text23, { color: "yellow", dimColor: true, children: [
5482
+ filterActive && hasNextPage && !starsMode && /* @__PURE__ */ jsx29(Box28, { justifyContent: "center", alignItems: "center", marginTop: 1, children: /* @__PURE__ */ jsxs28(Text29, { color: "yellow", dimColor: true, children: [
4478
5483
  "Still loading repos (",
4479
5484
  items.length,
4480
5485
  "/",
4481
5486
  totalCount > 0 ? totalCount : "?",
4482
5487
  ") \u2014 fuzzy results may be incomplete"
4483
5488
  ] }) }),
4484
- !loading && visibleItems.length === 0 && !(filterActive && hasNextPage && !starsMode) && /* @__PURE__ */ jsx23(Box22, { justifyContent: "center", alignItems: "center", flexGrow: 1, children: /* @__PURE__ */ jsx23(Text23, { color: "gray", dimColor: true, children: filter ? "No repositories match your search" : "No repositories found" }) })
5489
+ !loading && visibleItems.length === 0 && !(filterActive && hasNextPage && !starsMode) && /* @__PURE__ */ jsx29(Box28, { justifyContent: "center", alignItems: "center", flexGrow: 1, children: /* @__PURE__ */ jsx29(Text29, { color: "gray", dimColor: true, children: filter ? "No repositories match your search" : "No repositories found" }) })
4485
5490
  ] })
4486
5491
  ] }) }),
4487
- /* @__PURE__ */ jsxs22(Box22, { marginTop: 1, paddingX: 1, flexDirection: "column", children: [
4488
- /* @__PURE__ */ jsx23(Box22, { width: terminalWidth, justifyContent: "center", children: /* @__PURE__ */ jsx23(Text23, { 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" }) }),
4489
- /* @__PURE__ */ jsx23(Box22, { width: terminalWidth, justifyContent: "center", children: /* @__PURE__ */ jsxs22(Text23, { color: theme.muted, dimColor: modalOpen ? true : void 0, children: [
5492
+ /* @__PURE__ */ jsxs28(Box28, { marginTop: 1, paddingX: 1, flexDirection: "column", children: [
5493
+ /* @__PURE__ */ jsx29(Box28, { width: terminalWidth, justifyContent: "center", children: /* @__PURE__ */ jsx29(Text29, { 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" }) }),
5494
+ /* @__PURE__ */ jsx29(Box28, { width: terminalWidth, justifyContent: "center", children: /* @__PURE__ */ jsxs28(Text29, { color: theme.muted, dimColor: modalOpen ? true : void 0, children: [
4490
5495
  "/ Search",
4491
5496
  !filterActive && " \u2022 S Sort \u2022 D Direction",
4492
5497
  " \u2022 T Density \u2022 Shift+T Theme \u2022 A Archive Filter",
4493
5498
  !starsMode && " \u2022 V Visibility Filter"
4494
5499
  ] }) }),
4495
- /* @__PURE__ */ jsx23(Box22, { width: terminalWidth, justifyContent: "center", children: /* @__PURE__ */ jsx23(Text23, { 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 Shift+M Transfer \u2022 Ctrl+A Un/Archive \u2022 Ctrl+V Change Visibility \u2022 Ctrl+F Sync Fork \u2022 P Jump to upstream` }) }),
4496
- /* @__PURE__ */ jsx23(Box22, { width: terminalWidth, justifyContent: "center", children: /* @__PURE__ */ jsxs22(Text23, { color: theme.muted, dimColor: modalOpen ? true : void 0, children: [
5500
+ /* @__PURE__ */ jsx29(Box28, { width: terminalWidth, justifyContent: "center", children: /* @__PURE__ */ jsx29(Text29, { 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 Shift+M Transfer \u2022 Ctrl+A Un/Archive \u2022 Ctrl+V Change Visibility \u2022 Ctrl+F Sync Fork \u2022 P Jump to upstream` }) }),
5501
+ /* @__PURE__ */ jsx29(Box28, { width: terminalWidth, justifyContent: "center", children: /* @__PURE__ */ jsxs28(Text29, { color: theme.muted, dimColor: modalOpen ? true : void 0, children: [
4497
5502
  "K Cache Info \u2022 W Org Switch",
4498
5503
  !starsMode ? " \u2022 Ctrl+N New Repo" : "",
4499
5504
  " \u2022 Del/Backspace Delete \u2022 Ctrl+L Logout \u2022 Q Quit"
4500
5505
  ] }) }),
4501
- /* @__PURE__ */ jsx23(Box22, { width: terminalWidth, justifyContent: "center", marginTop: 1, children: /* @__PURE__ */ jsx23(Text23, { color: theme.warning, dimColor: modalOpen ? true : void 0, children: "\u{1F496} Sponsor on GitHub: github.com/sponsors/wiiiimm" }) })
5506
+ !modalOpen && /* @__PURE__ */ jsx29(Box28, { width: terminalWidth, justifyContent: "center", children: /* @__PURE__ */ jsx29(Text29, { color: multiSelectMode ? "cyan" : "gray", dimColor: !multiSelectMode, children: multiSelectMode ? selectedRepos.size > 0 ? `Space select \u2022 X unselect all \u2022 Ctrl+S star \u2022 Ctrl+A archive \u2022 Ctrl+V visibility \u2022 Del delete \u2022 B/Esc exit (${selectedRepos.size} selected)` : "B/Esc exit bulk select \u2022 Space select (no selection)" : "B Bulk Select mode (star/archive/visibility/delete)" }) }),
5507
+ /* @__PURE__ */ jsx29(Box28, { width: terminalWidth, justifyContent: "center", marginTop: 1, children: /* @__PURE__ */ jsx29(Text29, { color: theme.warning, dimColor: modalOpen ? true : void 0, children: "\u{1F496} Sponsor on GitHub: github.com/sponsors/wiiiimm" }) })
4502
5508
  ] }),
4503
- process.env.GH_MANAGER_DEBUG === "1" && /* @__PURE__ */ jsxs22(Box22, { marginTop: 1, borderStyle: "single", borderColor: "yellow", paddingX: 1, flexDirection: "column", children: [
4504
- /* @__PURE__ */ jsx23(Text23, { bold: true, color: "yellow", children: "Debug Messages:" }),
4505
- debugMessages.length === 0 ? /* @__PURE__ */ jsx23(Text23, { color: "gray", children: "No debug messages yet..." }) : debugMessages.map((msg, i) => /* @__PURE__ */ jsx23(Text23, { color: "gray", children: msg }, i))
5509
+ process.env.GH_MANAGER_DEBUG === "1" && /* @__PURE__ */ jsxs28(Box28, { marginTop: 1, borderStyle: "single", borderColor: "yellow", paddingX: 1, flexDirection: "column", children: [
5510
+ /* @__PURE__ */ jsx29(Text29, { bold: true, color: "yellow", children: "Debug Messages:" }),
5511
+ debugMessages.length === 0 ? /* @__PURE__ */ jsx29(Text29, { color: "gray", children: "No debug messages yet..." }) : debugMessages.map((msg, i) => /* @__PURE__ */ jsx29(Text29, { color: "gray", children: msg }, i))
4506
5512
  ] }),
4507
- themeToast && /* @__PURE__ */ jsx23(Box22, { marginTop: 1, justifyContent: "center", children: /* @__PURE__ */ jsx23(Box22, { borderStyle: "round", borderColor: theme.primary, paddingX: 2, paddingY: 0, children: /* @__PURE__ */ jsx23(Text23, { color: theme.primary, children: themeToast }) }) }),
4508
- copyToast && /* @__PURE__ */ jsx23(Box22, { marginTop: 1, justifyContent: "center", children: /* @__PURE__ */ jsx23(Box22, { borderStyle: "round", borderColor: copyToast.includes("Failed") ? "red" : "green", paddingX: 2, paddingY: 0, children: /* @__PURE__ */ jsx23(Text23, { color: copyToast.includes("Failed") ? "red" : "green", children: copyToast }) }) })
5513
+ themeToast && /* @__PURE__ */ jsx29(Box28, { marginTop: 1, justifyContent: "center", children: /* @__PURE__ */ jsx29(Box28, { borderStyle: "round", borderColor: theme.primary, paddingX: 2, paddingY: 0, children: /* @__PURE__ */ jsx29(Text29, { color: theme.primary, children: themeToast }) }) }),
5514
+ copyToast && /* @__PURE__ */ jsx29(Box28, { marginTop: 1, justifyContent: "center", children: /* @__PURE__ */ jsx29(Box28, { borderStyle: "round", borderColor: copyToast.includes("Failed") ? "red" : "green", paddingX: 2, paddingY: 0, children: /* @__PURE__ */ jsx29(Text29, { color: copyToast.includes("Failed") ? "red" : "green", children: copyToast }) }) })
4509
5515
  ] });
4510
5516
  }
4511
5517
 
4512
5518
  // src/ui/components/auth/AuthMethodSelector.tsx
4513
- import { useState as useState20 } from "react";
4514
- import { Box as Box23, Text as Text24, useInput as useInput20 } from "ink";
4515
- import chalk16 from "chalk";
4516
- import { jsx as jsx24, jsxs as jsxs23 } from "react/jsx-runtime";
5519
+ import { useState as useState25 } from "react";
5520
+ import { Box as Box29, Text as Text30, useInput as useInput25 } from "ink";
5521
+ import chalk21 from "chalk";
5522
+ import { jsx as jsx30, jsxs as jsxs29 } from "react/jsx-runtime";
4517
5523
  function AuthMethodSelector({ onSelect, onQuit }) {
4518
- const [selectedIndex, setSelectedIndex] = useState20(0);
5524
+ const [selectedIndex, setSelectedIndex] = useState25(0);
4519
5525
  const methods = [
4520
5526
  {
4521
5527
  key: "oauth",
@@ -4528,7 +5534,7 @@ function AuthMethodSelector({ onSelect, onQuit }) {
4528
5534
  description: "Manually enter a GitHub Personal Access Token"
4529
5535
  }
4530
5536
  ];
4531
- useInput20((input, key) => {
5537
+ useInput25((input, key) => {
4532
5538
  if (key.escape || input?.toLowerCase() === "q") {
4533
5539
  if (onQuit) {
4534
5540
  onQuit();
@@ -4547,33 +5553,33 @@ function AuthMethodSelector({ onSelect, onQuit }) {
4547
5553
  onSelect("pat");
4548
5554
  }
4549
5555
  });
4550
- return /* @__PURE__ */ jsxs23(Box23, { flexDirection: "column", borderStyle: "single", borderColor: "cyan", paddingX: 2, paddingY: 1, children: [
4551
- /* @__PURE__ */ jsx24(Text24, { bold: true, marginBottom: 1, children: "Choose Authentication Method" }),
4552
- /* @__PURE__ */ jsx24(Box23, { flexDirection: "column", marginY: 1, children: methods.map((method, index) => {
5556
+ return /* @__PURE__ */ jsxs29(Box29, { flexDirection: "column", borderStyle: "single", borderColor: "cyan", paddingX: 2, paddingY: 1, children: [
5557
+ /* @__PURE__ */ jsx30(Text30, { bold: true, marginBottom: 1, children: "Choose Authentication Method" }),
5558
+ /* @__PURE__ */ jsx30(Box29, { flexDirection: "column", marginY: 1, children: methods.map((method, index) => {
4553
5559
  const isSelected = index === selectedIndex;
4554
- const prefix = isSelected ? chalk16.cyan("\u203A") : " ";
5560
+ const prefix = isSelected ? chalk21.cyan("\u203A") : " ";
4555
5561
  const numberPrefix = `${index + 1}.`;
4556
- return /* @__PURE__ */ jsxs23(Box23, { flexDirection: "column", marginBottom: 1, children: [
4557
- /* @__PURE__ */ jsx24(Text24, { children: /* @__PURE__ */ jsxs23(Text24, { color: isSelected ? "cyan" : void 0, bold: isSelected, children: [
5562
+ return /* @__PURE__ */ jsxs29(Box29, { flexDirection: "column", marginBottom: 1, children: [
5563
+ /* @__PURE__ */ jsx30(Text30, { children: /* @__PURE__ */ jsxs29(Text30, { color: isSelected ? "cyan" : void 0, bold: isSelected, children: [
4558
5564
  prefix,
4559
5565
  " ",
4560
5566
  numberPrefix,
4561
5567
  " ",
4562
5568
  method.label
4563
5569
  ] }) }),
4564
- /* @__PURE__ */ jsxs23(Text24, { color: "gray", dimColor: true, children: [
5570
+ /* @__PURE__ */ jsxs29(Text30, { color: "gray", dimColor: true, children: [
4565
5571
  " ",
4566
5572
  method.description
4567
5573
  ] })
4568
5574
  ] }, method.key);
4569
5575
  }) }),
4570
- /* @__PURE__ */ jsx24(Text24, { color: "gray", dimColor: true, marginTop: 1, children: "Use arrow keys to navigate, Enter to select, or press 1/2 \u2022 Q/Esc to quit" })
5576
+ /* @__PURE__ */ jsx30(Text30, { color: "gray", dimColor: true, marginTop: 1, children: "Use arrow keys to navigate, Enter to select, or press 1/2 \u2022 Q/Esc to quit" })
4571
5577
  ] });
4572
5578
  }
4573
5579
 
4574
5580
  // src/ui/components/auth/OAuthProgress.tsx
4575
- import { Box as Box24, Text as Text25 } from "ink";
4576
- import { jsx as jsx25, jsxs as jsxs24 } from "react/jsx-runtime";
5581
+ import { Box as Box30, Text as Text31 } from "ink";
5582
+ import { jsx as jsx31, jsxs as jsxs30 } from "react/jsx-runtime";
4577
5583
  function OAuthProgress({ status, error, deviceCode }) {
4578
5584
  const statusMessages = {
4579
5585
  initializing: {
@@ -4610,64 +5616,64 @@ function OAuthProgress({ status, error, deviceCode }) {
4610
5616
  }
4611
5617
  };
4612
5618
  const { message, showSpinner } = statusMessages[status];
4613
- return /* @__PURE__ */ jsxs24(Box24, { flexDirection: "column", borderStyle: "single", borderColor: status === "error" ? "red" : "cyan", paddingX: 2, paddingY: 1, children: [
4614
- /* @__PURE__ */ jsx25(Text25, { bold: true, marginBottom: 1, children: "GitHub OAuth Authentication" }),
4615
- /* @__PURE__ */ jsx25(Box24, { marginY: 1, children: showSpinner ? /* @__PURE__ */ jsxs24(Box24, { children: [
4616
- /* @__PURE__ */ jsx25(Text25, { color: "green", children: /* @__PURE__ */ jsx25(SlowSpinner, { interval: 2e3 }) }),
4617
- /* @__PURE__ */ jsxs24(Text25, { children: [
5619
+ return /* @__PURE__ */ jsxs30(Box30, { flexDirection: "column", borderStyle: "single", borderColor: status === "error" ? "red" : "cyan", paddingX: 2, paddingY: 1, children: [
5620
+ /* @__PURE__ */ jsx31(Text31, { bold: true, marginBottom: 1, children: "GitHub OAuth Authentication" }),
5621
+ /* @__PURE__ */ jsx31(Box30, { marginY: 1, children: showSpinner ? /* @__PURE__ */ jsxs30(Box30, { children: [
5622
+ /* @__PURE__ */ jsx31(Text31, { color: "green", children: /* @__PURE__ */ jsx31(SlowSpinner, { interval: 2e3 }) }),
5623
+ /* @__PURE__ */ jsxs30(Text31, { children: [
4618
5624
  " ",
4619
5625
  message
4620
5626
  ] })
4621
- ] }) : /* @__PURE__ */ jsxs24(Text25, { color: status === "error" ? "red" : "green", children: [
5627
+ ] }) : /* @__PURE__ */ jsxs30(Text31, { color: status === "error" ? "red" : "green", children: [
4622
5628
  status === "error" ? "\u2717" : "\u2713",
4623
5629
  " ",
4624
5630
  message
4625
5631
  ] }) }),
4626
- (status === "waiting_for_authorization" || status === "polling_for_token") && deviceCode && /* @__PURE__ */ jsxs24(Box24, { marginY: 1, flexDirection: "column", children: [
4627
- /* @__PURE__ */ jsx25(Text25, { bold: true, color: "cyan", marginBottom: 1, children: "\u{1F4CB} Please complete these steps:" }),
4628
- /* @__PURE__ */ jsxs24(Box24, { marginBottom: 1, children: [
4629
- /* @__PURE__ */ jsx25(Text25, { children: "1. Visit: " }),
4630
- /* @__PURE__ */ jsx25(Text25, { bold: true, color: "blue", children: deviceCode.verification_uri })
5632
+ (status === "waiting_for_authorization" || status === "polling_for_token") && deviceCode && /* @__PURE__ */ jsxs30(Box30, { marginY: 1, flexDirection: "column", children: [
5633
+ /* @__PURE__ */ jsx31(Text31, { bold: true, color: "cyan", marginBottom: 1, children: "\u{1F4CB} Please complete these steps:" }),
5634
+ /* @__PURE__ */ jsxs30(Box30, { marginBottom: 1, children: [
5635
+ /* @__PURE__ */ jsx31(Text31, { children: "1. Visit: " }),
5636
+ /* @__PURE__ */ jsx31(Text31, { bold: true, color: "blue", children: deviceCode.verification_uri })
4631
5637
  ] }),
4632
- /* @__PURE__ */ jsxs24(Box24, { marginBottom: 1, flexDirection: "column", children: [
4633
- /* @__PURE__ */ jsx25(Text25, { children: "2. Enter this code:" }),
4634
- /* @__PURE__ */ jsx25(Box24, { borderStyle: "single", borderColor: "yellow", paddingX: 2, paddingY: 1, marginTop: 1, children: /* @__PURE__ */ jsx25(Text25, { bold: true, color: "yellow", children: deviceCode.user_code }) })
5638
+ /* @__PURE__ */ jsxs30(Box30, { marginBottom: 1, flexDirection: "column", children: [
5639
+ /* @__PURE__ */ jsx31(Text31, { children: "2. Enter this code:" }),
5640
+ /* @__PURE__ */ jsx31(Box30, { borderStyle: "single", borderColor: "yellow", paddingX: 2, paddingY: 1, marginTop: 1, children: /* @__PURE__ */ jsx31(Text31, { bold: true, color: "yellow", children: deviceCode.user_code }) })
4635
5641
  ] }),
4636
- status === "waiting_for_authorization" && /* @__PURE__ */ jsx25(Text25, { color: "gray", marginTop: 1, children: "Your browser should open automatically." }),
4637
- status === "polling_for_token" && /* @__PURE__ */ jsxs24(Box24, { flexDirection: "column", marginTop: 1, children: [
4638
- /* @__PURE__ */ jsx25(Text25, { color: "gray", children: "Waiting for you to complete authorization in your browser..." }),
4639
- /* @__PURE__ */ jsx25(Text25, { color: "gray", dimColor: true, marginTop: 1, children: "This will timeout in 15 minutes. Press Esc to cancel." })
5642
+ status === "waiting_for_authorization" && /* @__PURE__ */ jsx31(Text31, { color: "gray", marginTop: 1, children: "Your browser should open automatically." }),
5643
+ status === "polling_for_token" && /* @__PURE__ */ jsxs30(Box30, { flexDirection: "column", marginTop: 1, children: [
5644
+ /* @__PURE__ */ jsx31(Text31, { color: "gray", children: "Waiting for you to complete authorization in your browser..." }),
5645
+ /* @__PURE__ */ jsx31(Text31, { color: "gray", dimColor: true, marginTop: 1, children: "This will timeout in 15 minutes. Press Esc to cancel." })
4640
5646
  ] })
4641
5647
  ] }),
4642
- status === "error" && error && /* @__PURE__ */ jsxs24(Box24, { marginY: 1, flexDirection: "column", children: [
4643
- /* @__PURE__ */ jsx25(Text25, { color: "red", children: error }),
4644
- /* @__PURE__ */ jsx25(Text25, { color: "gray", marginTop: 1, children: "Press Esc to go back and try again." })
5648
+ status === "error" && error && /* @__PURE__ */ jsxs30(Box30, { marginY: 1, flexDirection: "column", children: [
5649
+ /* @__PURE__ */ jsx31(Text31, { color: "red", children: error }),
5650
+ /* @__PURE__ */ jsx31(Text31, { color: "gray", marginTop: 1, children: "Press Esc to go back and try again." })
4645
5651
  ] }),
4646
- status === "success" && /* @__PURE__ */ jsx25(Text25, { color: "gray", marginTop: 1, children: "Returning to application..." })
5652
+ status === "success" && /* @__PURE__ */ jsx31(Text31, { color: "gray", marginTop: 1, children: "Returning to application..." })
4647
5653
  ] });
4648
5654
  }
4649
5655
 
4650
5656
  // src/ui/App.tsx
4651
- import { jsx as jsx26, jsxs as jsxs25 } from "react/jsx-runtime";
5657
+ import { jsx as jsx32, jsxs as jsxs31 } from "react/jsx-runtime";
4652
5658
  var packageJson = require_package();
4653
5659
  function App({ initialOrgSlug: initialOrgSlug2, inlineToken: inlineToken2, inlineTokenEphemeral }) {
4654
5660
  const { exit } = useApp2();
4655
5661
  const { stdout } = useStdout2();
4656
- const [mode, setMode] = useState21("checking");
4657
- const [token, setToken] = useState21(null);
4658
- const [input, setInput] = useState21("");
4659
- const [error, setError] = useState21(null);
4660
- const [viewer, setViewer] = useState21(null);
4661
- const [rateLimitReset, setRateLimitReset] = useState21(null);
4662
- const [wasRateLimited, setWasRateLimited] = useState21(false);
4663
- const [orgContext, setOrgContext] = useState21("personal");
4664
- const [authMethod, setAuthMethod] = useState21("pat");
4665
- const [oauthStatus, setOAuthStatus] = useState21("initializing");
4666
- const [tokenSource, setTokenSource] = useState21("pat");
4667
- const [sessionTokenOrigin, setSessionTokenOrigin] = useState21("stored");
4668
- const [deviceCodeResponse, setDeviceCodeResponse] = useState21(null);
4669
- const [oauthDeviceCode, setOauthDeviceCode] = useState21(null);
4670
- const [dims, setDims] = useState21(() => {
5662
+ const [mode, setMode] = useState26("checking");
5663
+ const [token, setToken] = useState26(null);
5664
+ const [input, setInput] = useState26("");
5665
+ const [error, setError] = useState26(null);
5666
+ const [viewer, setViewer] = useState26(null);
5667
+ const [rateLimitReset, setRateLimitReset] = useState26(null);
5668
+ const [wasRateLimited, setWasRateLimited] = useState26(false);
5669
+ const [orgContext, setOrgContext] = useState26("personal");
5670
+ const [authMethod, setAuthMethod] = useState26("pat");
5671
+ const [oauthStatus, setOAuthStatus] = useState26("initializing");
5672
+ const [tokenSource, setTokenSource] = useState26("pat");
5673
+ const [sessionTokenOrigin, setSessionTokenOrigin] = useState26("stored");
5674
+ const [deviceCodeResponse, setDeviceCodeResponse] = useState26(null);
5675
+ const [oauthDeviceCode, setOauthDeviceCode] = useState26(null);
5676
+ const [dims, setDims] = useState26(() => {
4671
5677
  const cols = stdout?.columns ?? 100;
4672
5678
  const rows = stdout?.rows ?? 30;
4673
5679
  return { cols, rows };
@@ -4872,7 +5878,7 @@ function App({ initialOrgSlug: initialOrgSlug2, inlineToken: inlineToken2, inlin
4872
5878
  setTokenSource("pat");
4873
5879
  setMode("auth_method_selection");
4874
5880
  };
4875
- useInput21((input2, key) => {
5881
+ useInput26((input2, key) => {
4876
5882
  if ((mode === "prompt" || mode === "auth_method_selection") && key.escape) {
4877
5883
  exit();
4878
5884
  }
@@ -4904,19 +5910,19 @@ function App({ initialOrgSlug: initialOrgSlug2, inlineToken: inlineToken2, inlin
4904
5910
  }
4905
5911
  });
4906
5912
  const verticalPadding = Math.floor(dims.rows * 0.05);
4907
- const header = useMemo3(() => /* @__PURE__ */ jsxs25(Box25, { flexDirection: "row", justifyContent: "space-between", marginBottom: 1, children: [
4908
- /* @__PURE__ */ jsxs25(Box25, { flexDirection: "row", gap: 1, children: [
4909
- /* @__PURE__ */ jsxs25(Text26, { bold: true, color: "cyan", children: [
5913
+ const header = useMemo3(() => /* @__PURE__ */ jsxs31(Box31, { flexDirection: "row", justifyContent: "space-between", marginBottom: 1, children: [
5914
+ /* @__PURE__ */ jsxs31(Box31, { flexDirection: "row", gap: 1, children: [
5915
+ /* @__PURE__ */ jsxs31(Text32, { bold: true, color: "cyan", children: [
4910
5916
  " ",
4911
5917
  "GitHub Repository Manager"
4912
5918
  ] }),
4913
- /* @__PURE__ */ jsxs25(Text26, { color: "gray", dimColor: true, children: [
5919
+ /* @__PURE__ */ jsxs31(Text32, { color: "gray", dimColor: true, children: [
4914
5920
  "v",
4915
5921
  packageJson.version
4916
5922
  ] }),
4917
- process.env.GH_MANAGER_DEBUG === "1" && /* @__PURE__ */ jsx26(Text26, { backgroundColor: "blue", color: "white", children: " debug mode " })
5923
+ process.env.GH_MANAGER_DEBUG === "1" && /* @__PURE__ */ jsx32(Text32, { backgroundColor: "blue", color: "white", children: " debug mode " })
4918
5924
  ] }),
4919
- viewer && /* @__PURE__ */ jsx26(Text26, { color: "gray", children: orgContext !== "personal" && orgContext.login ? `${orgContext.login}/@${viewer} ` : `@${viewer} ` })
5925
+ viewer && /* @__PURE__ */ jsx32(Text32, { color: "gray", children: orgContext !== "personal" && orgContext.login ? `${orgContext.login}/@${viewer} ` : `@${viewer} ` })
4920
5926
  ] }), [viewer, orgContext]);
4921
5927
  if (mode === "rate_limited") {
4922
5928
  const formatResetTime = (resetTime) => {
@@ -4939,71 +5945,71 @@ function App({ initialOrgSlug: initialOrgSlug2, inlineToken: inlineToken2, inlin
4939
5945
  return "Unknown";
4940
5946
  }
4941
5947
  };
4942
- return /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", height: dims.rows, paddingX: 2, paddingTop: verticalPadding, paddingBottom: verticalPadding, children: [
5948
+ return /* @__PURE__ */ jsxs31(Box31, { flexDirection: "column", height: dims.rows, paddingX: 2, paddingTop: verticalPadding, paddingBottom: verticalPadding, children: [
4943
5949
  header,
4944
- /* @__PURE__ */ jsx26(Box25, { flexGrow: 1, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsxs25(Box25, { borderStyle: "single", borderColor: "yellow", paddingX: 3, paddingY: 2, flexDirection: "column", width: Math.min(dims.cols - 8, 80), children: [
4945
- /* @__PURE__ */ jsx26(Text26, { bold: true, color: "yellow", marginBottom: 1, children: "\u26A0\uFE0F Rate Limit Exceeded" }),
4946
- /* @__PURE__ */ jsx26(Text26, { color: "gray", marginBottom: 1, children: "You've hit GitHub's API rate limit for your token." }),
4947
- /* @__PURE__ */ jsx26(Text26, { color: "gray", marginBottom: 1, children: "This happens when you make too many requests in a short time." }),
4948
- rateLimitReset && /* @__PURE__ */ jsxs25(Box25, { marginTop: 1, marginBottom: 1, children: [
4949
- /* @__PURE__ */ jsxs25(Text26, { children: [
4950
- /* @__PURE__ */ jsx26(Text26, { color: "cyan", children: "Reset in:" }),
5950
+ /* @__PURE__ */ jsx32(Box31, { flexGrow: 1, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsxs31(Box31, { borderStyle: "single", borderColor: "yellow", paddingX: 3, paddingY: 2, flexDirection: "column", width: Math.min(dims.cols - 8, 80), children: [
5951
+ /* @__PURE__ */ jsx32(Text32, { bold: true, color: "yellow", marginBottom: 1, children: "\u26A0\uFE0F Rate Limit Exceeded" }),
5952
+ /* @__PURE__ */ jsx32(Text32, { color: "gray", marginBottom: 1, children: "You've hit GitHub's API rate limit for your token." }),
5953
+ /* @__PURE__ */ jsx32(Text32, { color: "gray", marginBottom: 1, children: "This happens when you make too many requests in a short time." }),
5954
+ rateLimitReset && /* @__PURE__ */ jsxs31(Box31, { marginTop: 1, marginBottom: 1, children: [
5955
+ /* @__PURE__ */ jsxs31(Text32, { children: [
5956
+ /* @__PURE__ */ jsx32(Text32, { color: "cyan", children: "Reset in:" }),
4951
5957
  " ",
4952
- /* @__PURE__ */ jsx26(Text26, { bold: true, children: formatResetTime(rateLimitReset) })
5958
+ /* @__PURE__ */ jsx32(Text32, { bold: true, children: formatResetTime(rateLimitReset) })
4953
5959
  ] }),
4954
- /* @__PURE__ */ jsxs25(Text26, { color: "gray", dimColor: true, children: [
5960
+ /* @__PURE__ */ jsxs31(Text32, { color: "gray", dimColor: true, children: [
4955
5961
  "(",
4956
5962
  new Date(rateLimitReset).toLocaleTimeString(),
4957
5963
  ")"
4958
5964
  ] })
4959
5965
  ] }),
4960
- /* @__PURE__ */ jsxs25(Box25, { marginTop: 2, flexDirection: "column", gap: 1, children: [
4961
- /* @__PURE__ */ jsx26(Text26, { bold: true, children: "What would you like to do?" }),
4962
- /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", paddingLeft: 2, children: [
4963
- /* @__PURE__ */ jsxs25(Text26, { children: [
4964
- /* @__PURE__ */ jsx26(Text26, { color: "cyan", bold: true, children: "R" }),
5966
+ /* @__PURE__ */ jsxs31(Box31, { marginTop: 2, flexDirection: "column", gap: 1, children: [
5967
+ /* @__PURE__ */ jsx32(Text32, { bold: true, children: "What would you like to do?" }),
5968
+ /* @__PURE__ */ jsxs31(Box31, { flexDirection: "column", paddingLeft: 2, children: [
5969
+ /* @__PURE__ */ jsxs31(Text32, { children: [
5970
+ /* @__PURE__ */ jsx32(Text32, { color: "cyan", bold: true, children: "R" }),
4965
5971
  " - Retry now ",
4966
5972
  rateLimitReset && formatResetTime(rateLimitReset) !== "Now (should be reset)" ? "(likely to fail until reset)" : "(should work now)"
4967
5973
  ] }),
4968
- /* @__PURE__ */ jsxs25(Text26, { children: [
4969
- /* @__PURE__ */ jsx26(Text26, { color: "cyan", bold: true, children: "L" }),
5974
+ /* @__PURE__ */ jsxs31(Text32, { children: [
5975
+ /* @__PURE__ */ jsx32(Text32, { color: "cyan", bold: true, children: "L" }),
4970
5976
  " - Logout and choose authentication method"
4971
5977
  ] }),
4972
- /* @__PURE__ */ jsxs25(Text26, { children: [
4973
- /* @__PURE__ */ jsx26(Text26, { color: "gray", bold: true, children: "Q/Esc" }),
5978
+ /* @__PURE__ */ jsxs31(Text32, { children: [
5979
+ /* @__PURE__ */ jsx32(Text32, { color: "gray", bold: true, children: "Q/Esc" }),
4974
5980
  " - Quit application"
4975
5981
  ] })
4976
5982
  ] })
4977
5983
  ] }),
4978
- /* @__PURE__ */ jsx26(Text26, { color: "gray", dimColor: true, marginTop: 2, children: "Tip: Using multiple tokens or waiting between requests can help avoid rate limits." })
5984
+ /* @__PURE__ */ jsx32(Text32, { color: "gray", dimColor: true, marginTop: 2, children: "Tip: Using multiple tokens or waiting between requests can help avoid rate limits." })
4979
5985
  ] }) })
4980
5986
  ] });
4981
5987
  }
4982
5988
  if (mode === "auth_method_selection") {
4983
- return /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", height: dims.rows, paddingX: 2, paddingTop: verticalPadding, paddingBottom: verticalPadding, children: [
5989
+ return /* @__PURE__ */ jsxs31(Box31, { flexDirection: "column", height: dims.rows, paddingX: 2, paddingTop: verticalPadding, paddingBottom: verticalPadding, children: [
4984
5990
  header,
4985
- /* @__PURE__ */ jsx26(Box25, { flexGrow: 1, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", alignItems: "center", children: [
4986
- /* @__PURE__ */ jsx26(AuthMethodSelector, { onSelect: handleAuthMethodSelect }),
4987
- error && /* @__PURE__ */ jsx26(Text26, { color: "red", marginTop: 1, children: error })
5991
+ /* @__PURE__ */ jsx32(Box31, { flexGrow: 1, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsxs31(Box31, { flexDirection: "column", alignItems: "center", children: [
5992
+ /* @__PURE__ */ jsx32(AuthMethodSelector, { onSelect: handleAuthMethodSelect }),
5993
+ error && /* @__PURE__ */ jsx32(Text32, { color: "red", marginTop: 1, children: error })
4988
5994
  ] }) })
4989
5995
  ] });
4990
5996
  }
4991
5997
  if (mode === "oauth_flow") {
4992
- return /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", height: dims.rows, paddingX: 2, paddingTop: verticalPadding, paddingBottom: verticalPadding, children: [
5998
+ return /* @__PURE__ */ jsxs31(Box31, { flexDirection: "column", height: dims.rows, paddingX: 2, paddingTop: verticalPadding, paddingBottom: verticalPadding, children: [
4993
5999
  header,
4994
- /* @__PURE__ */ jsx26(Box25, { flexGrow: 1, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsx26(OAuthProgress, { status: oauthStatus, error: error || void 0, deviceCode: oauthDeviceCode || void 0 }) })
6000
+ /* @__PURE__ */ jsx32(Box31, { flexGrow: 1, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsx32(OAuthProgress, { status: oauthStatus, error: error || void 0, deviceCode: oauthDeviceCode || void 0 }) })
4995
6001
  ] });
4996
6002
  }
4997
6003
  if (mode === "prompt") {
4998
- return /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", height: dims.rows, paddingX: 2, paddingTop: verticalPadding, paddingBottom: verticalPadding, children: [
6004
+ return /* @__PURE__ */ jsxs31(Box31, { flexDirection: "column", height: dims.rows, paddingX: 2, paddingTop: verticalPadding, paddingBottom: verticalPadding, children: [
4999
6005
  header,
5000
- /* @__PURE__ */ jsx26(Box25, { flexGrow: 1, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsxs25(Box25, { borderStyle: "single", borderColor: "cyan", paddingX: 2, paddingY: 1, flexDirection: "column", children: [
5001
- /* @__PURE__ */ jsx26(Text26, { bold: true, marginBottom: 1, children: "Authentication Required" }),
5002
- /* @__PURE__ */ jsx26(Text26, { color: "gray", marginBottom: 1, children: "Enter your GitHub Personal Access Token" }),
5003
- /* @__PURE__ */ jsxs25(Box25, { children: [
5004
- /* @__PURE__ */ jsx26(Text26, { children: "Token: " }),
5005
- /* @__PURE__ */ jsx26(
5006
- TextInput8,
6006
+ /* @__PURE__ */ jsx32(Box31, { flexGrow: 1, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsxs31(Box31, { borderStyle: "single", borderColor: "cyan", paddingX: 2, paddingY: 1, flexDirection: "column", children: [
6007
+ /* @__PURE__ */ jsx32(Text32, { bold: true, marginBottom: 1, children: "Authentication Required" }),
6008
+ /* @__PURE__ */ jsx32(Text32, { color: "gray", marginBottom: 1, children: "Enter your GitHub Personal Access Token" }),
6009
+ /* @__PURE__ */ jsxs31(Box31, { children: [
6010
+ /* @__PURE__ */ jsx32(Text32, { children: "Token: " }),
6011
+ /* @__PURE__ */ jsx32(
6012
+ TextInput9,
5007
6013
  {
5008
6014
  value: input,
5009
6015
  onChange: setInput,
@@ -5012,30 +6018,30 @@ function App({ initialOrgSlug: initialOrgSlug2, inlineToken: inlineToken2, inlin
5012
6018
  }
5013
6019
  )
5014
6020
  ] }),
5015
- error && /* @__PURE__ */ jsx26(Text26, { color: "red", marginTop: 1, children: error }),
5016
- /* @__PURE__ */ jsx26(Text26, { color: "gray", dimColor: true, marginTop: 1, children: "The token will be stored securely in your local config" }),
5017
- /* @__PURE__ */ jsx26(Text26, { color: "gray", dimColor: true, marginTop: 1, children: "Press Esc to go back" })
6021
+ error && /* @__PURE__ */ jsx32(Text32, { color: "red", marginTop: 1, children: error }),
6022
+ /* @__PURE__ */ jsx32(Text32, { color: "gray", dimColor: true, marginTop: 1, children: "The token will be stored securely in your local config" }),
6023
+ /* @__PURE__ */ jsx32(Text32, { color: "gray", dimColor: true, marginTop: 1, children: "Press Esc to go back" })
5018
6024
  ] }) })
5019
6025
  ] });
5020
6026
  }
5021
6027
  if (mode === "validating" || mode === "checking") {
5022
- return /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", height: dims.rows, paddingX: 2, paddingTop: verticalPadding, paddingBottom: verticalPadding, children: [
6028
+ return /* @__PURE__ */ jsxs31(Box31, { flexDirection: "column", height: dims.rows, paddingX: 2, paddingTop: verticalPadding, paddingBottom: verticalPadding, children: [
5023
6029
  header,
5024
- /* @__PURE__ */ jsx26(Box25, { flexGrow: 1, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", alignItems: "center", children: [
5025
- /* @__PURE__ */ jsx26(Text26, { color: "yellow", children: "Validating token..." }),
5026
- mode === "validating" && /* @__PURE__ */ jsx26(Text26, { color: "gray", dimColor: true, marginTop: 1, children: "Press Esc to cancel" })
6030
+ /* @__PURE__ */ jsx32(Box31, { flexGrow: 1, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsxs31(Box31, { flexDirection: "column", alignItems: "center", children: [
6031
+ /* @__PURE__ */ jsx32(Text32, { color: "yellow", children: "Validating token..." }),
6032
+ mode === "validating" && /* @__PURE__ */ jsx32(Text32, { color: "gray", dimColor: true, marginTop: 1, children: "Press Esc to cancel" })
5027
6033
  ] }) })
5028
6034
  ] });
5029
6035
  }
5030
6036
  if (mode === "error") {
5031
- return /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", height: dims.rows, paddingX: 2, paddingTop: verticalPadding, paddingBottom: verticalPadding, children: [
6037
+ return /* @__PURE__ */ jsxs31(Box31, { flexDirection: "column", height: dims.rows, paddingX: 2, paddingTop: verticalPadding, paddingBottom: verticalPadding, children: [
5032
6038
  header,
5033
- /* @__PURE__ */ jsx26(Box25, { flexGrow: 1, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsx26(Text26, { color: "red", children: error ?? "Unexpected error" }) })
6039
+ /* @__PURE__ */ jsx32(Box31, { flexGrow: 1, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsx32(Text32, { color: "red", children: error ?? "Unexpected error" }) })
5034
6040
  ] });
5035
6041
  }
5036
- return /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", height: dims.rows, paddingX: 2, paddingTop: verticalPadding, paddingBottom: verticalPadding, children: [
6042
+ return /* @__PURE__ */ jsxs31(Box31, { flexDirection: "column", height: dims.rows, paddingX: 2, paddingTop: verticalPadding, paddingBottom: verticalPadding, children: [
5037
6043
  header,
5038
- /* @__PURE__ */ jsx26(
6044
+ /* @__PURE__ */ jsx32(
5039
6045
  RepoList,
5040
6046
  {
5041
6047
  token,
@@ -5050,7 +6056,7 @@ function App({ initialOrgSlug: initialOrgSlug2, inlineToken: inlineToken2, inlin
5050
6056
  }
5051
6057
 
5052
6058
  // src/index.tsx
5053
- import { jsx as jsx27, jsxs as jsxs26 } from "react/jsx-runtime";
6059
+ import { jsx as jsx33, jsxs as jsxs32 } from "react/jsx-runtime";
5054
6060
  var argv = process.argv.slice(2);
5055
6061
  var getFlagValue = (name) => {
5056
6062
  const idx = argv.findIndex((a) => a === `--${name}` || a.startsWith(`--${name}=`));
@@ -5163,8 +6169,8 @@ var inlineToken = (() => {
5163
6169
  })();
5164
6170
  logger.debug("Rendering UI");
5165
6171
  var { unmount } = render(
5166
- /* @__PURE__ */ jsxs26(Box26, { flexDirection: "column", children: [
5167
- /* @__PURE__ */ jsx27(App, { initialOrgSlug, inlineToken, inlineTokenEphemeral: Boolean(inlineToken) }),
5168
- /* @__PURE__ */ jsx27(Text27, { color: "gray" })
6172
+ /* @__PURE__ */ jsxs32(Box32, { flexDirection: "column", children: [
6173
+ /* @__PURE__ */ jsx33(App, { initialOrgSlug, inlineToken, inlineTokenEphemeral: Boolean(inlineToken) }),
6174
+ /* @__PURE__ */ jsx33(Text33, { color: "gray" })
5169
6175
  ] })
5170
6176
  );