ccstatusline 2.2.26 → 2.2.27
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/README.md +6 -0
- package/dist/ccstatusline.js +1268 -776
- package/package.json +1 -1
package/dist/ccstatusline.js
CHANGED
|
@@ -53241,6 +53241,133 @@ var init_migrations = __esm(() => {
|
|
|
53241
53241
|
];
|
|
53242
53242
|
});
|
|
53243
53243
|
|
|
53244
|
+
// src/utils/terminal.ts
|
|
53245
|
+
import { execSync } from "child_process";
|
|
53246
|
+
import * as fs2 from "fs";
|
|
53247
|
+
import * as path from "path";
|
|
53248
|
+
function getPackageVersion() {
|
|
53249
|
+
if (/^\d+\.\d+\.\d+/.test(PACKAGE_VERSION)) {
|
|
53250
|
+
return PACKAGE_VERSION;
|
|
53251
|
+
}
|
|
53252
|
+
const possiblePaths = [
|
|
53253
|
+
path.join(__dirname, "..", "..", "package.json"),
|
|
53254
|
+
path.join(__dirname, "..", "package.json")
|
|
53255
|
+
];
|
|
53256
|
+
for (const packageJsonPath of possiblePaths) {
|
|
53257
|
+
try {
|
|
53258
|
+
if (fs2.existsSync(packageJsonPath)) {
|
|
53259
|
+
const packageJson = JSON.parse(fs2.readFileSync(packageJsonPath, "utf-8"));
|
|
53260
|
+
return packageJson.version ?? "";
|
|
53261
|
+
}
|
|
53262
|
+
} catch {}
|
|
53263
|
+
}
|
|
53264
|
+
return "";
|
|
53265
|
+
}
|
|
53266
|
+
function probeTerminalWidth() {
|
|
53267
|
+
const overrideRaw = process.env.CCSTATUSLINE_WIDTH;
|
|
53268
|
+
if (overrideRaw) {
|
|
53269
|
+
const override = parsePositiveInteger(overrideRaw);
|
|
53270
|
+
if (override !== null) {
|
|
53271
|
+
return override;
|
|
53272
|
+
}
|
|
53273
|
+
}
|
|
53274
|
+
if (process.platform === "win32") {
|
|
53275
|
+
return null;
|
|
53276
|
+
}
|
|
53277
|
+
let pid = process.pid;
|
|
53278
|
+
for (let depth = 0;depth < 8; depth += 1) {
|
|
53279
|
+
const parentPid = getParentProcessId(pid);
|
|
53280
|
+
if (parentPid === null) {
|
|
53281
|
+
break;
|
|
53282
|
+
}
|
|
53283
|
+
pid = parentPid;
|
|
53284
|
+
const tty2 = getTTYForProcess(pid);
|
|
53285
|
+
if (tty2 === null) {
|
|
53286
|
+
continue;
|
|
53287
|
+
}
|
|
53288
|
+
const width = getWidthForTTY(tty2);
|
|
53289
|
+
if (width !== null) {
|
|
53290
|
+
return width;
|
|
53291
|
+
}
|
|
53292
|
+
}
|
|
53293
|
+
try {
|
|
53294
|
+
const width = execSync("tput cols 2>/dev/null", {
|
|
53295
|
+
encoding: "utf8",
|
|
53296
|
+
stdio: ["pipe", "pipe", "ignore"],
|
|
53297
|
+
windowsHide: true
|
|
53298
|
+
}).trim();
|
|
53299
|
+
return parsePositiveInteger(width);
|
|
53300
|
+
} catch {}
|
|
53301
|
+
return null;
|
|
53302
|
+
}
|
|
53303
|
+
function parsePositiveInteger(value) {
|
|
53304
|
+
const parsed = parseInt(value, 10);
|
|
53305
|
+
if (isNaN(parsed) || parsed <= 0) {
|
|
53306
|
+
return null;
|
|
53307
|
+
}
|
|
53308
|
+
return parsed;
|
|
53309
|
+
}
|
|
53310
|
+
function getParentProcessId(pid) {
|
|
53311
|
+
try {
|
|
53312
|
+
const parentPidOutput = execSync(`ps -o ppid= -p ${pid}`, {
|
|
53313
|
+
encoding: "utf8",
|
|
53314
|
+
stdio: ["pipe", "pipe", "ignore"],
|
|
53315
|
+
shell: "/bin/sh",
|
|
53316
|
+
windowsHide: true
|
|
53317
|
+
}).trim();
|
|
53318
|
+
return parsePositiveInteger(parentPidOutput);
|
|
53319
|
+
} catch {
|
|
53320
|
+
return null;
|
|
53321
|
+
}
|
|
53322
|
+
}
|
|
53323
|
+
function getTTYForProcess(pid) {
|
|
53324
|
+
try {
|
|
53325
|
+
const tty2 = execSync(`ps -o tty= -p ${pid}`, {
|
|
53326
|
+
encoding: "utf8",
|
|
53327
|
+
stdio: ["pipe", "pipe", "ignore"],
|
|
53328
|
+
shell: "/bin/sh",
|
|
53329
|
+
windowsHide: true
|
|
53330
|
+
}).replace(/\s+/g, "");
|
|
53331
|
+
if (!tty2 || tty2 === "??" || tty2 === "?") {
|
|
53332
|
+
return null;
|
|
53333
|
+
}
|
|
53334
|
+
return tty2;
|
|
53335
|
+
} catch {
|
|
53336
|
+
return null;
|
|
53337
|
+
}
|
|
53338
|
+
}
|
|
53339
|
+
function getWidthForTTY(tty2) {
|
|
53340
|
+
const devicePath = `/dev/${tty2}`;
|
|
53341
|
+
const attempts = [
|
|
53342
|
+
`stty -F ${devicePath} size`,
|
|
53343
|
+
`stty -f ${devicePath} size`,
|
|
53344
|
+
`stty size < ${devicePath}`
|
|
53345
|
+
];
|
|
53346
|
+
for (const cmd of attempts) {
|
|
53347
|
+
try {
|
|
53348
|
+
const width = execSync(`${cmd} 2>/dev/null | awk '{print $2}'`, {
|
|
53349
|
+
encoding: "utf8",
|
|
53350
|
+
stdio: ["pipe", "pipe", "ignore"],
|
|
53351
|
+
shell: "/bin/sh",
|
|
53352
|
+
windowsHide: true
|
|
53353
|
+
}).trim();
|
|
53354
|
+
const parsed = parsePositiveInteger(width);
|
|
53355
|
+
if (parsed !== null) {
|
|
53356
|
+
return parsed;
|
|
53357
|
+
}
|
|
53358
|
+
} catch {}
|
|
53359
|
+
}
|
|
53360
|
+
return null;
|
|
53361
|
+
}
|
|
53362
|
+
function getTerminalWidth() {
|
|
53363
|
+
return probeTerminalWidth();
|
|
53364
|
+
}
|
|
53365
|
+
function canDetectTerminalWidth() {
|
|
53366
|
+
return probeTerminalWidth() !== null;
|
|
53367
|
+
}
|
|
53368
|
+
var __dirname = "/home/runner/work/ccstatusline/ccstatusline/src/utils", PACKAGE_VERSION = "2.2.27";
|
|
53369
|
+
var init_terminal = () => {};
|
|
53370
|
+
|
|
53244
53371
|
// src/utils/fuzzy.ts
|
|
53245
53372
|
function isWordStart(text, position) {
|
|
53246
53373
|
return position === 0 || text[position - 1] === " " || text[position - 1] === "-" || text[position - 1] === "_" || text[position - 1] === "/";
|
|
@@ -53525,40 +53652,40 @@ class OutputStyleWidget {
|
|
|
53525
53652
|
// src/utils/git.ts
|
|
53526
53653
|
import { execFileSync } from "child_process";
|
|
53527
53654
|
import { createHash } from "node:crypto";
|
|
53528
|
-
import * as
|
|
53655
|
+
import * as fs3 from "node:fs";
|
|
53529
53656
|
import * as os3 from "node:os";
|
|
53530
|
-
import * as
|
|
53657
|
+
import * as path2 from "node:path";
|
|
53531
53658
|
function getCacheDir() {
|
|
53532
|
-
return
|
|
53659
|
+
return path2.join(os3.homedir(), ".cache", "ccstatusline");
|
|
53533
53660
|
}
|
|
53534
53661
|
function getCachePath(gitDir) {
|
|
53535
53662
|
const repoHash = createHash("sha256").update(gitDir).digest("hex").slice(0, 16);
|
|
53536
|
-
return
|
|
53663
|
+
return path2.join(getCacheDir(), "git-cache", `git-${repoHash}.json`);
|
|
53537
53664
|
}
|
|
53538
53665
|
function getMtimeMs(filePath) {
|
|
53539
53666
|
try {
|
|
53540
|
-
return
|
|
53667
|
+
return fs3.statSync(filePath).mtimeMs;
|
|
53541
53668
|
} catch {
|
|
53542
53669
|
return null;
|
|
53543
53670
|
}
|
|
53544
53671
|
}
|
|
53545
53672
|
function normalizeDirectory(candidate) {
|
|
53546
53673
|
try {
|
|
53547
|
-
const resolved =
|
|
53548
|
-
const stats =
|
|
53549
|
-
return stats.isDirectory() ? resolved :
|
|
53674
|
+
const resolved = path2.resolve(candidate);
|
|
53675
|
+
const stats = fs3.statSync(resolved);
|
|
53676
|
+
return stats.isDirectory() ? resolved : path2.dirname(resolved);
|
|
53550
53677
|
} catch {
|
|
53551
53678
|
return null;
|
|
53552
53679
|
}
|
|
53553
53680
|
}
|
|
53554
53681
|
function readGitDirFile(gitFilePath) {
|
|
53555
53682
|
try {
|
|
53556
|
-
const content =
|
|
53683
|
+
const content = fs3.readFileSync(gitFilePath, "utf-8").trim();
|
|
53557
53684
|
const match = /^gitdir:\s*(.+)$/i.exec(content);
|
|
53558
53685
|
if (!match?.[1]) {
|
|
53559
53686
|
return null;
|
|
53560
53687
|
}
|
|
53561
|
-
return
|
|
53688
|
+
return path2.resolve(path2.dirname(gitFilePath), match[1]);
|
|
53562
53689
|
} catch {
|
|
53563
53690
|
return null;
|
|
53564
53691
|
}
|
|
@@ -53566,9 +53693,9 @@ function readGitDirFile(gitFilePath) {
|
|
|
53566
53693
|
function discoverGitDir(startDir) {
|
|
53567
53694
|
let current = startDir;
|
|
53568
53695
|
for (;; ) {
|
|
53569
|
-
const gitPath =
|
|
53696
|
+
const gitPath = path2.join(current, ".git");
|
|
53570
53697
|
try {
|
|
53571
|
-
const stats =
|
|
53698
|
+
const stats = fs3.statSync(gitPath);
|
|
53572
53699
|
if (stats.isDirectory()) {
|
|
53573
53700
|
return gitPath;
|
|
53574
53701
|
}
|
|
@@ -53576,7 +53703,7 @@ function discoverGitDir(startDir) {
|
|
|
53576
53703
|
return readGitDirFile(gitPath);
|
|
53577
53704
|
}
|
|
53578
53705
|
} catch {}
|
|
53579
|
-
const parent =
|
|
53706
|
+
const parent = path2.dirname(current);
|
|
53580
53707
|
if (parent === current) {
|
|
53581
53708
|
return null;
|
|
53582
53709
|
}
|
|
@@ -53597,8 +53724,8 @@ function getGitRepoMetadata(cwd2) {
|
|
|
53597
53724
|
}
|
|
53598
53725
|
return {
|
|
53599
53726
|
cachePath: getCachePath(gitDir),
|
|
53600
|
-
headMtimeMs: getMtimeMs(
|
|
53601
|
-
indexMtimeMs: getMtimeMs(
|
|
53727
|
+
headMtimeMs: getMtimeMs(path2.join(gitDir, "HEAD")),
|
|
53728
|
+
indexMtimeMs: getMtimeMs(path2.join(gitDir, "index"))
|
|
53602
53729
|
};
|
|
53603
53730
|
}
|
|
53604
53731
|
function getGitCacheTtlMs(context) {
|
|
@@ -53625,7 +53752,7 @@ function isCacheEntryFresh(entry, metadata, ttlMs, now2) {
|
|
|
53625
53752
|
}
|
|
53626
53753
|
function readPersistentCache(cachePath) {
|
|
53627
53754
|
try {
|
|
53628
|
-
const parsed = JSON.parse(
|
|
53755
|
+
const parsed = JSON.parse(fs3.readFileSync(cachePath, "utf-8"));
|
|
53629
53756
|
if (typeof parsed !== "object" || parsed === null) {
|
|
53630
53757
|
return null;
|
|
53631
53758
|
}
|
|
@@ -53650,11 +53777,11 @@ function readPersistentCache(cachePath) {
|
|
|
53650
53777
|
}
|
|
53651
53778
|
function writePersistentCache(cachePath, cache3) {
|
|
53652
53779
|
try {
|
|
53653
|
-
const cacheDir =
|
|
53654
|
-
|
|
53780
|
+
const cacheDir = path2.dirname(cachePath);
|
|
53781
|
+
fs3.mkdirSync(cacheDir, { recursive: true });
|
|
53655
53782
|
const tempPath = `${cachePath}.${process.pid}.${Date.now()}.tmp`;
|
|
53656
|
-
|
|
53657
|
-
|
|
53783
|
+
fs3.writeFileSync(tempPath, JSON.stringify(cache3), "utf-8");
|
|
53784
|
+
fs3.renameSync(tempPath, cachePath);
|
|
53658
53785
|
} catch {}
|
|
53659
53786
|
}
|
|
53660
53787
|
function readPersistentCacheEntry(metadata, cacheKey, cwd2, ttlMs, now2) {
|
|
@@ -53849,7 +53976,7 @@ function getGitConflictCount(context) {
|
|
|
53849
53976
|
`).map((line) => {
|
|
53850
53977
|
const parts = line.split(/\s+/).slice(3);
|
|
53851
53978
|
return parts.join(" ");
|
|
53852
|
-
}).filter((
|
|
53979
|
+
}).filter((path3) => path3.length > 0));
|
|
53853
53980
|
return files.size;
|
|
53854
53981
|
}
|
|
53855
53982
|
function getGitShortSha(context) {
|
|
@@ -53973,8 +54100,8 @@ function renderOsc8Link(url2, text) {
|
|
|
53973
54100
|
function encodeGitRefForUrlPath(ref) {
|
|
53974
54101
|
return ref.split("/").map((segment) => encodeURIComponent(segment)).join("/");
|
|
53975
54102
|
}
|
|
53976
|
-
function encodeFilePathForUri(
|
|
53977
|
-
return
|
|
54103
|
+
function encodeFilePathForUri(path3) {
|
|
54104
|
+
return path3.replace(/\\/g, "/").split("/").map((segment) => encodeURIComponent(segment)).join("/");
|
|
53978
54105
|
}
|
|
53979
54106
|
function buildIdeFileUrl(filePath, ideLinkMode) {
|
|
53980
54107
|
const normalizedPath = filePath.replace(/\\/g, "/");
|
|
@@ -55600,17 +55727,17 @@ import {
|
|
|
55600
55727
|
} from "child_process";
|
|
55601
55728
|
import {
|
|
55602
55729
|
closeSync,
|
|
55603
|
-
existsSync as
|
|
55730
|
+
existsSync as existsSync3,
|
|
55604
55731
|
mkdirSync as mkdirSync2,
|
|
55605
55732
|
openSync,
|
|
55606
|
-
readFileSync as
|
|
55733
|
+
readFileSync as readFileSync4,
|
|
55607
55734
|
statSync as statSync2,
|
|
55608
55735
|
unlinkSync,
|
|
55609
55736
|
writeFileSync as writeFileSync2
|
|
55610
55737
|
} from "fs";
|
|
55611
55738
|
import { createHash as createHash2 } from "node:crypto";
|
|
55612
55739
|
import os4 from "node:os";
|
|
55613
|
-
import
|
|
55740
|
+
import path3 from "node:path";
|
|
55614
55741
|
function readField(entry, key) {
|
|
55615
55742
|
const value = entry[key];
|
|
55616
55743
|
return typeof value === "string" ? value.toUpperCase() : "";
|
|
@@ -55658,10 +55785,10 @@ function computeCiRollup(rollup) {
|
|
|
55658
55785
|
return { state, failing, pending, success: success2 };
|
|
55659
55786
|
}
|
|
55660
55787
|
function getCacheDir2(deps) {
|
|
55661
|
-
return
|
|
55788
|
+
return path3.join(deps.getHomedir(), ".cache", "ccstatusline");
|
|
55662
55789
|
}
|
|
55663
55790
|
function getGitReviewCacheDir(deps) {
|
|
55664
|
-
return
|
|
55791
|
+
return path3.join(getCacheDir2(deps), "git-review");
|
|
55665
55792
|
}
|
|
55666
55793
|
function runGitForCache(args, cwd2, deps) {
|
|
55667
55794
|
try {
|
|
@@ -55693,7 +55820,7 @@ function getCacheRef(cwd2, deps) {
|
|
|
55693
55820
|
}
|
|
55694
55821
|
function getCachePath2(cwd2, ref, deps) {
|
|
55695
55822
|
const hash2 = createHash2("sha256").update(cwd2).update("\x00").update(ref).digest("hex").slice(0, 16);
|
|
55696
|
-
return
|
|
55823
|
+
return path3.join(getGitReviewCacheDir(deps), `git-review-${hash2}.json`);
|
|
55697
55824
|
}
|
|
55698
55825
|
function isGitReviewData(value) {
|
|
55699
55826
|
if (typeof value !== "object" || value === null) {
|
|
@@ -56123,11 +56250,11 @@ var init_git_review_cache = __esm(() => {
|
|
|
56123
56250
|
DEFAULT_GIT_REVIEW_CACHE_DEPS = {
|
|
56124
56251
|
closeSync,
|
|
56125
56252
|
execFileSync: execFileSync2,
|
|
56126
|
-
existsSync:
|
|
56253
|
+
existsSync: existsSync3,
|
|
56127
56254
|
getExecPath: () => process.execPath,
|
|
56128
56255
|
mkdirSync: mkdirSync2,
|
|
56129
56256
|
openSync,
|
|
56130
|
-
readFileSync:
|
|
56257
|
+
readFileSync: readFileSync4,
|
|
56131
56258
|
getScriptPath: () => process.argv[1],
|
|
56132
56259
|
spawn,
|
|
56133
56260
|
statSync: statSync2,
|
|
@@ -58163,133 +58290,6 @@ function calculateContextPercentage(context) {
|
|
|
58163
58290
|
}
|
|
58164
58291
|
var init_context_percentage = () => {};
|
|
58165
58292
|
|
|
58166
|
-
// src/utils/terminal.ts
|
|
58167
|
-
import { execSync } from "child_process";
|
|
58168
|
-
import * as fs3 from "fs";
|
|
58169
|
-
import * as path3 from "path";
|
|
58170
|
-
function getPackageVersion() {
|
|
58171
|
-
if (/^\d+\.\d+\.\d+/.test(PACKAGE_VERSION)) {
|
|
58172
|
-
return PACKAGE_VERSION;
|
|
58173
|
-
}
|
|
58174
|
-
const possiblePaths = [
|
|
58175
|
-
path3.join(__dirname, "..", "..", "package.json"),
|
|
58176
|
-
path3.join(__dirname, "..", "package.json")
|
|
58177
|
-
];
|
|
58178
|
-
for (const packageJsonPath of possiblePaths) {
|
|
58179
|
-
try {
|
|
58180
|
-
if (fs3.existsSync(packageJsonPath)) {
|
|
58181
|
-
const packageJson = JSON.parse(fs3.readFileSync(packageJsonPath, "utf-8"));
|
|
58182
|
-
return packageJson.version ?? "";
|
|
58183
|
-
}
|
|
58184
|
-
} catch {}
|
|
58185
|
-
}
|
|
58186
|
-
return "";
|
|
58187
|
-
}
|
|
58188
|
-
function probeTerminalWidth() {
|
|
58189
|
-
const overrideRaw = process.env.CCSTATUSLINE_WIDTH;
|
|
58190
|
-
if (overrideRaw) {
|
|
58191
|
-
const override = parsePositiveInteger(overrideRaw);
|
|
58192
|
-
if (override !== null) {
|
|
58193
|
-
return override;
|
|
58194
|
-
}
|
|
58195
|
-
}
|
|
58196
|
-
if (process.platform === "win32") {
|
|
58197
|
-
return null;
|
|
58198
|
-
}
|
|
58199
|
-
let pid = process.pid;
|
|
58200
|
-
for (let depth = 0;depth < 8; depth += 1) {
|
|
58201
|
-
const parentPid = getParentProcessId(pid);
|
|
58202
|
-
if (parentPid === null) {
|
|
58203
|
-
break;
|
|
58204
|
-
}
|
|
58205
|
-
pid = parentPid;
|
|
58206
|
-
const tty2 = getTTYForProcess(pid);
|
|
58207
|
-
if (tty2 === null) {
|
|
58208
|
-
continue;
|
|
58209
|
-
}
|
|
58210
|
-
const width = getWidthForTTY(tty2);
|
|
58211
|
-
if (width !== null) {
|
|
58212
|
-
return width;
|
|
58213
|
-
}
|
|
58214
|
-
}
|
|
58215
|
-
try {
|
|
58216
|
-
const width = execSync("tput cols 2>/dev/null", {
|
|
58217
|
-
encoding: "utf8",
|
|
58218
|
-
stdio: ["pipe", "pipe", "ignore"],
|
|
58219
|
-
windowsHide: true
|
|
58220
|
-
}).trim();
|
|
58221
|
-
return parsePositiveInteger(width);
|
|
58222
|
-
} catch {}
|
|
58223
|
-
return null;
|
|
58224
|
-
}
|
|
58225
|
-
function parsePositiveInteger(value) {
|
|
58226
|
-
const parsed = parseInt(value, 10);
|
|
58227
|
-
if (isNaN(parsed) || parsed <= 0) {
|
|
58228
|
-
return null;
|
|
58229
|
-
}
|
|
58230
|
-
return parsed;
|
|
58231
|
-
}
|
|
58232
|
-
function getParentProcessId(pid) {
|
|
58233
|
-
try {
|
|
58234
|
-
const parentPidOutput = execSync(`ps -o ppid= -p ${pid}`, {
|
|
58235
|
-
encoding: "utf8",
|
|
58236
|
-
stdio: ["pipe", "pipe", "ignore"],
|
|
58237
|
-
shell: "/bin/sh",
|
|
58238
|
-
windowsHide: true
|
|
58239
|
-
}).trim();
|
|
58240
|
-
return parsePositiveInteger(parentPidOutput);
|
|
58241
|
-
} catch {
|
|
58242
|
-
return null;
|
|
58243
|
-
}
|
|
58244
|
-
}
|
|
58245
|
-
function getTTYForProcess(pid) {
|
|
58246
|
-
try {
|
|
58247
|
-
const tty2 = execSync(`ps -o tty= -p ${pid}`, {
|
|
58248
|
-
encoding: "utf8",
|
|
58249
|
-
stdio: ["pipe", "pipe", "ignore"],
|
|
58250
|
-
shell: "/bin/sh",
|
|
58251
|
-
windowsHide: true
|
|
58252
|
-
}).replace(/\s+/g, "");
|
|
58253
|
-
if (!tty2 || tty2 === "??" || tty2 === "?") {
|
|
58254
|
-
return null;
|
|
58255
|
-
}
|
|
58256
|
-
return tty2;
|
|
58257
|
-
} catch {
|
|
58258
|
-
return null;
|
|
58259
|
-
}
|
|
58260
|
-
}
|
|
58261
|
-
function getWidthForTTY(tty2) {
|
|
58262
|
-
const devicePath = `/dev/${tty2}`;
|
|
58263
|
-
const attempts = [
|
|
58264
|
-
`stty -F ${devicePath} size`,
|
|
58265
|
-
`stty -f ${devicePath} size`,
|
|
58266
|
-
`stty size < ${devicePath}`
|
|
58267
|
-
];
|
|
58268
|
-
for (const cmd of attempts) {
|
|
58269
|
-
try {
|
|
58270
|
-
const width = execSync(`${cmd} 2>/dev/null | awk '{print $2}'`, {
|
|
58271
|
-
encoding: "utf8",
|
|
58272
|
-
stdio: ["pipe", "pipe", "ignore"],
|
|
58273
|
-
shell: "/bin/sh",
|
|
58274
|
-
windowsHide: true
|
|
58275
|
-
}).trim();
|
|
58276
|
-
const parsed = parsePositiveInteger(width);
|
|
58277
|
-
if (parsed !== null) {
|
|
58278
|
-
return parsed;
|
|
58279
|
-
}
|
|
58280
|
-
} catch {}
|
|
58281
|
-
}
|
|
58282
|
-
return null;
|
|
58283
|
-
}
|
|
58284
|
-
function getTerminalWidth() {
|
|
58285
|
-
return probeTerminalWidth();
|
|
58286
|
-
}
|
|
58287
|
-
function canDetectTerminalWidth() {
|
|
58288
|
-
return probeTerminalWidth() !== null;
|
|
58289
|
-
}
|
|
58290
|
-
var __dirname = "/home/runner/work/ccstatusline/ccstatusline/src/utils", PACKAGE_VERSION = "2.2.26";
|
|
58291
|
-
var init_terminal = () => {};
|
|
58292
|
-
|
|
58293
58293
|
// src/utils/format-tokens.ts
|
|
58294
58294
|
function formatTokens(count, decimals = 1) {
|
|
58295
58295
|
if (count >= 1e6 - 500 / 10 ** decimals)
|
|
@@ -71358,20 +71358,73 @@ async function saveSettings(settings) {
|
|
|
71358
71358
|
await syncWidgetHooks2(settings);
|
|
71359
71359
|
} catch {}
|
|
71360
71360
|
}
|
|
71361
|
-
|
|
71362
|
-
|
|
71363
|
-
|
|
71364
|
-
return;
|
|
71361
|
+
function expandPath(filePath) {
|
|
71362
|
+
if (filePath.startsWith("~/") || filePath === "~") {
|
|
71363
|
+
return path8.join(os9.homedir(), filePath.slice(2));
|
|
71365
71364
|
}
|
|
71366
|
-
|
|
71367
|
-
|
|
71368
|
-
|
|
71369
|
-
|
|
71365
|
+
return filePath;
|
|
71366
|
+
}
|
|
71367
|
+
async function exportConfig(settings, filePath) {
|
|
71368
|
+
const expanded = expandPath(filePath);
|
|
71369
|
+
const exportData = { ...settings, exportedBy: getPackageVersion() };
|
|
71370
|
+
await mkdir(path8.dirname(expanded), { recursive: true });
|
|
71371
|
+
await writeFile(expanded, JSON.stringify(exportData, null, 2), "utf-8");
|
|
71372
|
+
}
|
|
71373
|
+
async function validateImportFile(filePath) {
|
|
71374
|
+
const expanded = expandPath(filePath);
|
|
71375
|
+
let raw;
|
|
71376
|
+
try {
|
|
71377
|
+
raw = await readFile3(expanded, "utf-8");
|
|
71378
|
+
} catch {
|
|
71379
|
+
return { status: "invalid", reason: `Cannot read file: ${expanded}` };
|
|
71370
71380
|
}
|
|
71371
|
-
|
|
71372
|
-
|
|
71373
|
-
|
|
71374
|
-
}
|
|
71381
|
+
let parsed;
|
|
71382
|
+
try {
|
|
71383
|
+
parsed = JSON.parse(raw);
|
|
71384
|
+
} catch {
|
|
71385
|
+
return { status: "invalid", reason: "File is not valid JSON" };
|
|
71386
|
+
}
|
|
71387
|
+
if (typeof parsed === "object" && parsed !== null && "version" in parsed && typeof parsed.version === "number" && parsed.version > CURRENT_VERSION) {
|
|
71388
|
+
return {
|
|
71389
|
+
status: "invalid",
|
|
71390
|
+
reason: `Config version ${parsed.version} is newer than supported version ${CURRENT_VERSION}`
|
|
71391
|
+
};
|
|
71392
|
+
}
|
|
71393
|
+
if (needsMigration(parsed, CURRENT_VERSION)) {
|
|
71394
|
+
parsed = migrateConfig(parsed, CURRENT_VERSION);
|
|
71395
|
+
}
|
|
71396
|
+
const result2 = SettingsSchema.safeParse(parsed);
|
|
71397
|
+
if (!result2.success) {
|
|
71398
|
+
return { status: "invalid", reason: `Invalid config format: ${result2.error.issues[0]?.message ?? "unknown error"}` };
|
|
71399
|
+
}
|
|
71400
|
+
const presentKeys = Object.keys(parsed).filter((key) => (key in result2.data));
|
|
71401
|
+
return { status: "valid", data: result2.data, presentKeys };
|
|
71402
|
+
}
|
|
71403
|
+
function applyImport(current, imported, mode, presentKeys = Object.keys(imported)) {
|
|
71404
|
+
const mergeKeys = new Set(presentKeys);
|
|
71405
|
+
const importedClean = Object.fromEntries(Object.entries(imported).filter(([k]) => !IMPORT_EXCLUDED_KEYS.includes(k) && (mode === "replace" || mergeKeys.has(k))));
|
|
71406
|
+
if (mode === "replace") {
|
|
71407
|
+
return SettingsSchema.parse({
|
|
71408
|
+
...importedClean,
|
|
71409
|
+
installation: current.installation
|
|
71410
|
+
});
|
|
71411
|
+
}
|
|
71412
|
+
return { ...current, ...importedClean };
|
|
71413
|
+
}
|
|
71414
|
+
async function saveInstallationMetadata(metadata) {
|
|
71415
|
+
const paths = getSettingsPaths();
|
|
71416
|
+
if (!metadata && !fs13.existsSync(paths.settingsPath)) {
|
|
71417
|
+
return;
|
|
71418
|
+
}
|
|
71419
|
+
const settings = await loadSettings();
|
|
71420
|
+
if (getConfigLoadError() !== null) {
|
|
71421
|
+
console.error("Skipping installation-metadata write: settings.json is unreadable (left unchanged).");
|
|
71422
|
+
return;
|
|
71423
|
+
}
|
|
71424
|
+
const settingsWithVersion = {
|
|
71425
|
+
...settings,
|
|
71426
|
+
version: CURRENT_VERSION
|
|
71427
|
+
};
|
|
71375
71428
|
if (metadata) {
|
|
71376
71429
|
settingsWithVersion.installation = metadata;
|
|
71377
71430
|
} else {
|
|
@@ -71379,10 +71432,11 @@ async function saveInstallationMetadata(metadata) {
|
|
|
71379
71432
|
}
|
|
71380
71433
|
await writeSettingsJson(settingsWithVersion, paths);
|
|
71381
71434
|
}
|
|
71382
|
-
var readFile3, writeFile, mkdir, rename, unlink, lstat, readlink, realpath2, DEFAULT_SETTINGS_PATH, settingsPath, lastLoadError = null;
|
|
71435
|
+
var readFile3, writeFile, mkdir, rename, unlink, lstat, readlink, realpath2, DEFAULT_SETTINGS_PATH, settingsPath, lastLoadError = null, IMPORT_EXCLUDED_KEYS;
|
|
71383
71436
|
var init_config = __esm(async () => {
|
|
71384
71437
|
init_Settings();
|
|
71385
71438
|
init_migrations();
|
|
71439
|
+
init_terminal();
|
|
71386
71440
|
await init_widgets2();
|
|
71387
71441
|
readFile3 = fs13.promises.readFile;
|
|
71388
71442
|
writeFile = fs13.promises.writeFile;
|
|
@@ -71394,6 +71448,7 @@ var init_config = __esm(async () => {
|
|
|
71394
71448
|
realpath2 = fs13.promises.realpath;
|
|
71395
71449
|
DEFAULT_SETTINGS_PATH = path8.join(os9.homedir(), ".config", "ccstatusline", "settings.json");
|
|
71396
71450
|
settingsPath = DEFAULT_SETTINGS_PATH;
|
|
71451
|
+
IMPORT_EXCLUDED_KEYS = ["installation", "version", "updatemessage", "exportedBy"];
|
|
71397
71452
|
});
|
|
71398
71453
|
|
|
71399
71454
|
// src/utils/claude-settings.ts
|
|
@@ -72444,7 +72499,7 @@ var dist_default5 = Gradient;
|
|
|
72444
72499
|
|
|
72445
72500
|
// src/tui/App.tsx
|
|
72446
72501
|
await init_claude_settings();
|
|
72447
|
-
var
|
|
72502
|
+
var import_react56 = __toESM(require_react(), 1);
|
|
72448
72503
|
|
|
72449
72504
|
// src/utils/clone-settings.ts
|
|
72450
72505
|
function cloneSettings(settings) {
|
|
@@ -74767,6 +74822,348 @@ var ColorMenu = ({ widgets, lineIndex, settings, onUpdate, onBack }) => {
|
|
|
74767
74822
|
]
|
|
74768
74823
|
}, undefined, true, undefined, this);
|
|
74769
74824
|
};
|
|
74825
|
+
// src/tui/components/ExportConfigDialog.tsx
|
|
74826
|
+
init_input_guards();
|
|
74827
|
+
await init_build2();
|
|
74828
|
+
var import_react42 = __toESM(require_react(), 1);
|
|
74829
|
+
var jsx_dev_runtime15 = __toESM(require_jsx_dev_runtime(), 1);
|
|
74830
|
+
import * as os13 from "os";
|
|
74831
|
+
import * as path12 from "path";
|
|
74832
|
+
var DEFAULT_EXPORT_PATH = path12.join(os13.homedir(), "ccstatusline-config.json");
|
|
74833
|
+
function ExportConfigDialog({ onExport, onCancel }) {
|
|
74834
|
+
const [inputValue, setInputValue] = import_react42.useState(DEFAULT_EXPORT_PATH);
|
|
74835
|
+
use_input_default((input, key) => {
|
|
74836
|
+
if (key.return) {
|
|
74837
|
+
onExport(inputValue);
|
|
74838
|
+
} else if (key.escape) {
|
|
74839
|
+
onCancel();
|
|
74840
|
+
} else if (key.backspace) {
|
|
74841
|
+
setInputValue(inputValue.slice(0, -1));
|
|
74842
|
+
} else if (shouldInsertInput(input, key)) {
|
|
74843
|
+
setInputValue(inputValue + input);
|
|
74844
|
+
}
|
|
74845
|
+
});
|
|
74846
|
+
return /* @__PURE__ */ jsx_dev_runtime15.jsxDEV(Box_default, {
|
|
74847
|
+
flexDirection: "column",
|
|
74848
|
+
children: [
|
|
74849
|
+
/* @__PURE__ */ jsx_dev_runtime15.jsxDEV(Text, {
|
|
74850
|
+
bold: true,
|
|
74851
|
+
children: "Export Config"
|
|
74852
|
+
}, undefined, false, undefined, this),
|
|
74853
|
+
/* @__PURE__ */ jsx_dev_runtime15.jsxDEV(Text, {
|
|
74854
|
+
dimColor: true,
|
|
74855
|
+
children: "Enter the file path to export your configuration to:"
|
|
74856
|
+
}, undefined, false, undefined, this),
|
|
74857
|
+
/* @__PURE__ */ jsx_dev_runtime15.jsxDEV(Box_default, {
|
|
74858
|
+
marginTop: 1,
|
|
74859
|
+
children: [
|
|
74860
|
+
/* @__PURE__ */ jsx_dev_runtime15.jsxDEV(Text, {
|
|
74861
|
+
children: "Path: "
|
|
74862
|
+
}, undefined, false, undefined, this),
|
|
74863
|
+
/* @__PURE__ */ jsx_dev_runtime15.jsxDEV(Text, {
|
|
74864
|
+
children: inputValue
|
|
74865
|
+
}, undefined, false, undefined, this),
|
|
74866
|
+
/* @__PURE__ */ jsx_dev_runtime15.jsxDEV(Text, {
|
|
74867
|
+
inverse: true,
|
|
74868
|
+
children: " "
|
|
74869
|
+
}, undefined, false, undefined, this)
|
|
74870
|
+
]
|
|
74871
|
+
}, undefined, true, undefined, this),
|
|
74872
|
+
/* @__PURE__ */ jsx_dev_runtime15.jsxDEV(Box_default, {
|
|
74873
|
+
marginTop: 1,
|
|
74874
|
+
children: /* @__PURE__ */ jsx_dev_runtime15.jsxDEV(Text, {
|
|
74875
|
+
dimColor: true,
|
|
74876
|
+
children: "Enter to confirm, Escape to cancel"
|
|
74877
|
+
}, undefined, false, undefined, this)
|
|
74878
|
+
}, undefined, false, undefined, this)
|
|
74879
|
+
]
|
|
74880
|
+
}, undefined, true, undefined, this);
|
|
74881
|
+
}
|
|
74882
|
+
// src/tui/components/ImportConfigDialog.tsx
|
|
74883
|
+
init_input_guards();
|
|
74884
|
+
await init_build2();
|
|
74885
|
+
var import_react43 = __toESM(require_react(), 1);
|
|
74886
|
+
var jsx_dev_runtime16 = __toESM(require_jsx_dev_runtime(), 1);
|
|
74887
|
+
function ImportConfigDialog({ onFileChosen, onCancel }) {
|
|
74888
|
+
const [inputValue, setInputValue] = import_react43.useState("");
|
|
74889
|
+
use_input_default((input, key) => {
|
|
74890
|
+
if (key.return) {
|
|
74891
|
+
onFileChosen(inputValue);
|
|
74892
|
+
} else if (key.escape) {
|
|
74893
|
+
onCancel();
|
|
74894
|
+
} else if (key.backspace) {
|
|
74895
|
+
setInputValue(inputValue.slice(0, -1));
|
|
74896
|
+
} else if (shouldInsertInput(input, key)) {
|
|
74897
|
+
setInputValue(inputValue + input);
|
|
74898
|
+
}
|
|
74899
|
+
});
|
|
74900
|
+
return /* @__PURE__ */ jsx_dev_runtime16.jsxDEV(Box_default, {
|
|
74901
|
+
flexDirection: "column",
|
|
74902
|
+
children: [
|
|
74903
|
+
/* @__PURE__ */ jsx_dev_runtime16.jsxDEV(Text, {
|
|
74904
|
+
bold: true,
|
|
74905
|
+
children: "Import Config"
|
|
74906
|
+
}, undefined, false, undefined, this),
|
|
74907
|
+
/* @__PURE__ */ jsx_dev_runtime16.jsxDEV(Text, {
|
|
74908
|
+
dimColor: true,
|
|
74909
|
+
children: "Enter the file path to import configuration from:"
|
|
74910
|
+
}, undefined, false, undefined, this),
|
|
74911
|
+
/* @__PURE__ */ jsx_dev_runtime16.jsxDEV(Box_default, {
|
|
74912
|
+
marginTop: 1,
|
|
74913
|
+
children: [
|
|
74914
|
+
/* @__PURE__ */ jsx_dev_runtime16.jsxDEV(Text, {
|
|
74915
|
+
children: "Path: "
|
|
74916
|
+
}, undefined, false, undefined, this),
|
|
74917
|
+
/* @__PURE__ */ jsx_dev_runtime16.jsxDEV(Text, {
|
|
74918
|
+
children: inputValue
|
|
74919
|
+
}, undefined, false, undefined, this),
|
|
74920
|
+
/* @__PURE__ */ jsx_dev_runtime16.jsxDEV(Text, {
|
|
74921
|
+
inverse: true,
|
|
74922
|
+
children: " "
|
|
74923
|
+
}, undefined, false, undefined, this)
|
|
74924
|
+
]
|
|
74925
|
+
}, undefined, true, undefined, this),
|
|
74926
|
+
/* @__PURE__ */ jsx_dev_runtime16.jsxDEV(Box_default, {
|
|
74927
|
+
marginTop: 1,
|
|
74928
|
+
children: /* @__PURE__ */ jsx_dev_runtime16.jsxDEV(Text, {
|
|
74929
|
+
dimColor: true,
|
|
74930
|
+
children: "Enter to confirm, Escape to cancel"
|
|
74931
|
+
}, undefined, false, undefined, this)
|
|
74932
|
+
}, undefined, false, undefined, this)
|
|
74933
|
+
]
|
|
74934
|
+
}, undefined, true, undefined, this);
|
|
74935
|
+
}
|
|
74936
|
+
// src/tui/components/ImportPreviewDialog.tsx
|
|
74937
|
+
await __promiseAll([
|
|
74938
|
+
init_build2(),
|
|
74939
|
+
init_config()
|
|
74940
|
+
]);
|
|
74941
|
+
var import_react44 = __toESM(require_react(), 1);
|
|
74942
|
+
var jsx_dev_runtime17 = __toESM(require_jsx_dev_runtime(), 1);
|
|
74943
|
+
var EXCLUDED_KEYS = new Set(["version", "installation", "updatemessage"]);
|
|
74944
|
+
function getImportPreviewKeys(current, imported) {
|
|
74945
|
+
const keys2 = new Set([
|
|
74946
|
+
...Object.keys(current),
|
|
74947
|
+
...Object.keys(imported)
|
|
74948
|
+
]);
|
|
74949
|
+
return [...keys2].filter((key) => !EXCLUDED_KEYS.has(key));
|
|
74950
|
+
}
|
|
74951
|
+
function getImportPreviewSettings(current, validation, mode) {
|
|
74952
|
+
return applyImport(current, validation.data, mode, validation.presentKeys);
|
|
74953
|
+
}
|
|
74954
|
+
function formatScalar(value) {
|
|
74955
|
+
if (value === null || value === undefined) {
|
|
74956
|
+
return "none";
|
|
74957
|
+
}
|
|
74958
|
+
if (typeof value === "boolean" || typeof value === "number") {
|
|
74959
|
+
return String(value);
|
|
74960
|
+
}
|
|
74961
|
+
if (typeof value === "string") {
|
|
74962
|
+
return value || "(empty)";
|
|
74963
|
+
}
|
|
74964
|
+
return JSON.stringify(value);
|
|
74965
|
+
}
|
|
74966
|
+
function diffObject(current, imported, prefix) {
|
|
74967
|
+
const keys2 = new Set([...Object.keys(current), ...Object.keys(imported)]);
|
|
74968
|
+
const entries = [];
|
|
74969
|
+
for (const key of keys2) {
|
|
74970
|
+
const path13 = prefix ? `${prefix}.${key}` : key;
|
|
74971
|
+
const a = current[key];
|
|
74972
|
+
const b = imported[key];
|
|
74973
|
+
if (JSON.stringify(a) === JSON.stringify(b)) {
|
|
74974
|
+
continue;
|
|
74975
|
+
}
|
|
74976
|
+
if (a && b && typeof a === "object" && typeof b === "object" && !Array.isArray(a) && !Array.isArray(b)) {
|
|
74977
|
+
entries.push(...diffObject(a, b, path13));
|
|
74978
|
+
} else {
|
|
74979
|
+
entries.push({ path: path13, current: a, imported: b });
|
|
74980
|
+
}
|
|
74981
|
+
}
|
|
74982
|
+
return entries;
|
|
74983
|
+
}
|
|
74984
|
+
function diffLines(currentLines, importedLines) {
|
|
74985
|
+
const entries = [];
|
|
74986
|
+
const lineCount = Math.max(currentLines.length, importedLines.length);
|
|
74987
|
+
for (let li = 0;li < lineCount; li++) {
|
|
74988
|
+
const curLine = currentLines[li] ?? [];
|
|
74989
|
+
const impLine = importedLines[li] ?? [];
|
|
74990
|
+
const widgetCount = Math.max(curLine.length, impLine.length);
|
|
74991
|
+
for (let wi = 0;wi < widgetCount; wi++) {
|
|
74992
|
+
const curWidget = curLine[wi];
|
|
74993
|
+
const impWidget = impLine[wi];
|
|
74994
|
+
if (JSON.stringify(curWidget) === JSON.stringify(impWidget)) {
|
|
74995
|
+
continue;
|
|
74996
|
+
}
|
|
74997
|
+
if (!curWidget) {
|
|
74998
|
+
const addedType = impWidget?.type ?? "unknown";
|
|
74999
|
+
entries.push({ path: `line ${li + 1} +${addedType}`, current: undefined, imported: "[added]" });
|
|
75000
|
+
continue;
|
|
75001
|
+
}
|
|
75002
|
+
if (!impWidget) {
|
|
75003
|
+
entries.push({ path: `line ${li + 1} -${curWidget.type}`, current: "[removed]", imported: undefined });
|
|
75004
|
+
continue;
|
|
75005
|
+
}
|
|
75006
|
+
const label = `${curWidget.type} (line ${li + 1})`;
|
|
75007
|
+
const widgetKeys = new Set([...Object.keys(curWidget), ...Object.keys(impWidget)]);
|
|
75008
|
+
for (const key of widgetKeys) {
|
|
75009
|
+
if (key === "id") {
|
|
75010
|
+
continue;
|
|
75011
|
+
}
|
|
75012
|
+
const a = curWidget[key];
|
|
75013
|
+
const b = impWidget[key];
|
|
75014
|
+
if (JSON.stringify(a) !== JSON.stringify(b)) {
|
|
75015
|
+
entries.push({ path: `${label} ${key}`, current: a, imported: b });
|
|
75016
|
+
}
|
|
75017
|
+
}
|
|
75018
|
+
}
|
|
75019
|
+
}
|
|
75020
|
+
return entries;
|
|
75021
|
+
}
|
|
75022
|
+
function ImportPreviewDialog({
|
|
75023
|
+
validation,
|
|
75024
|
+
currentSettings,
|
|
75025
|
+
onApply,
|
|
75026
|
+
onCancel
|
|
75027
|
+
}) {
|
|
75028
|
+
const [previewMode, setPreviewMode] = import_react44.useState("replace");
|
|
75029
|
+
const previewSettings = getImportPreviewSettings(currentSettings, validation, previewMode);
|
|
75030
|
+
const topLevelKeys = getImportPreviewKeys(currentSettings, previewSettings);
|
|
75031
|
+
const items = [
|
|
75032
|
+
{ label: "Replace All", value: "replace", description: "Overwrite all settings with the imported config" },
|
|
75033
|
+
{ label: "Merge", value: "merge", description: "Overlay imported settings on top of current settings" },
|
|
75034
|
+
"-",
|
|
75035
|
+
{ label: "Cancel", value: "cancel" }
|
|
75036
|
+
];
|
|
75037
|
+
function handleSelect(value) {
|
|
75038
|
+
if (value === "cancel" || value === "back") {
|
|
75039
|
+
onCancel();
|
|
75040
|
+
} else {
|
|
75041
|
+
onApply(value);
|
|
75042
|
+
}
|
|
75043
|
+
}
|
|
75044
|
+
function handleSelectionChange(value) {
|
|
75045
|
+
if (value === "replace" || value === "merge") {
|
|
75046
|
+
setPreviewMode(value);
|
|
75047
|
+
}
|
|
75048
|
+
}
|
|
75049
|
+
const diffRows = [];
|
|
75050
|
+
for (const key of topLevelKeys) {
|
|
75051
|
+
const current = currentSettings[key];
|
|
75052
|
+
const imported = previewSettings[key];
|
|
75053
|
+
const changed = JSON.stringify(current) !== JSON.stringify(imported);
|
|
75054
|
+
if (!changed) {
|
|
75055
|
+
diffRows.push(/* @__PURE__ */ jsx_dev_runtime17.jsxDEV(Box_default, {
|
|
75056
|
+
children: /* @__PURE__ */ jsx_dev_runtime17.jsxDEV(Text, {
|
|
75057
|
+
dimColor: true,
|
|
75058
|
+
children: ` ${key}: ${formatScalar(current)}`
|
|
75059
|
+
}, undefined, false, undefined, this)
|
|
75060
|
+
}, key, false, undefined, this));
|
|
75061
|
+
continue;
|
|
75062
|
+
}
|
|
75063
|
+
if (key === "lines") {
|
|
75064
|
+
const entries = diffLines(current, imported);
|
|
75065
|
+
diffRows.push(/* @__PURE__ */ jsx_dev_runtime17.jsxDEV(Box_default, {
|
|
75066
|
+
flexDirection: "column",
|
|
75067
|
+
children: [
|
|
75068
|
+
/* @__PURE__ */ jsx_dev_runtime17.jsxDEV(Text, {
|
|
75069
|
+
children: ` ${key}:`
|
|
75070
|
+
}, undefined, false, undefined, this),
|
|
75071
|
+
entries.map((e, i) => /* @__PURE__ */ jsx_dev_runtime17.jsxDEV(Box_default, {
|
|
75072
|
+
marginLeft: 4,
|
|
75073
|
+
children: [
|
|
75074
|
+
/* @__PURE__ */ jsx_dev_runtime17.jsxDEV(Text, {
|
|
75075
|
+
children: `${e.path}: `
|
|
75076
|
+
}, undefined, false, undefined, this),
|
|
75077
|
+
/* @__PURE__ */ jsx_dev_runtime17.jsxDEV(Text, {
|
|
75078
|
+
color: "red",
|
|
75079
|
+
children: formatScalar(e.current)
|
|
75080
|
+
}, undefined, false, undefined, this),
|
|
75081
|
+
/* @__PURE__ */ jsx_dev_runtime17.jsxDEV(Text, {
|
|
75082
|
+
children: " → "
|
|
75083
|
+
}, undefined, false, undefined, this),
|
|
75084
|
+
/* @__PURE__ */ jsx_dev_runtime17.jsxDEV(Text, {
|
|
75085
|
+
color: "green",
|
|
75086
|
+
children: formatScalar(e.imported)
|
|
75087
|
+
}, undefined, false, undefined, this)
|
|
75088
|
+
]
|
|
75089
|
+
}, i, true, undefined, this))
|
|
75090
|
+
]
|
|
75091
|
+
}, key, true, undefined, this));
|
|
75092
|
+
continue;
|
|
75093
|
+
}
|
|
75094
|
+
if (current && imported && typeof current === "object" && typeof imported === "object" && !Array.isArray(current)) {
|
|
75095
|
+
const entries = diffObject(current, imported, key);
|
|
75096
|
+
diffRows.push(/* @__PURE__ */ jsx_dev_runtime17.jsxDEV(Box_default, {
|
|
75097
|
+
flexDirection: "column",
|
|
75098
|
+
children: [
|
|
75099
|
+
/* @__PURE__ */ jsx_dev_runtime17.jsxDEV(Text, {
|
|
75100
|
+
children: ` ${key}:`
|
|
75101
|
+
}, undefined, false, undefined, this),
|
|
75102
|
+
entries.map((e, i) => /* @__PURE__ */ jsx_dev_runtime17.jsxDEV(Box_default, {
|
|
75103
|
+
marginLeft: 4,
|
|
75104
|
+
children: [
|
|
75105
|
+
/* @__PURE__ */ jsx_dev_runtime17.jsxDEV(Text, {
|
|
75106
|
+
children: `${e.path}: `
|
|
75107
|
+
}, undefined, false, undefined, this),
|
|
75108
|
+
/* @__PURE__ */ jsx_dev_runtime17.jsxDEV(Text, {
|
|
75109
|
+
color: "red",
|
|
75110
|
+
children: formatScalar(e.current)
|
|
75111
|
+
}, undefined, false, undefined, this),
|
|
75112
|
+
/* @__PURE__ */ jsx_dev_runtime17.jsxDEV(Text, {
|
|
75113
|
+
children: " → "
|
|
75114
|
+
}, undefined, false, undefined, this),
|
|
75115
|
+
/* @__PURE__ */ jsx_dev_runtime17.jsxDEV(Text, {
|
|
75116
|
+
color: "green",
|
|
75117
|
+
children: formatScalar(e.imported)
|
|
75118
|
+
}, undefined, false, undefined, this)
|
|
75119
|
+
]
|
|
75120
|
+
}, i, true, undefined, this))
|
|
75121
|
+
]
|
|
75122
|
+
}, key, true, undefined, this));
|
|
75123
|
+
continue;
|
|
75124
|
+
}
|
|
75125
|
+
diffRows.push(/* @__PURE__ */ jsx_dev_runtime17.jsxDEV(Box_default, {
|
|
75126
|
+
children: [
|
|
75127
|
+
/* @__PURE__ */ jsx_dev_runtime17.jsxDEV(Text, {
|
|
75128
|
+
children: ` ${key}: `
|
|
75129
|
+
}, undefined, false, undefined, this),
|
|
75130
|
+
/* @__PURE__ */ jsx_dev_runtime17.jsxDEV(Text, {
|
|
75131
|
+
color: "red",
|
|
75132
|
+
children: formatScalar(current)
|
|
75133
|
+
}, undefined, false, undefined, this),
|
|
75134
|
+
/* @__PURE__ */ jsx_dev_runtime17.jsxDEV(Text, {
|
|
75135
|
+
children: " → "
|
|
75136
|
+
}, undefined, false, undefined, this),
|
|
75137
|
+
/* @__PURE__ */ jsx_dev_runtime17.jsxDEV(Text, {
|
|
75138
|
+
color: "green",
|
|
75139
|
+
children: formatScalar(imported)
|
|
75140
|
+
}, undefined, false, undefined, this)
|
|
75141
|
+
]
|
|
75142
|
+
}, key, true, undefined, this));
|
|
75143
|
+
}
|
|
75144
|
+
return /* @__PURE__ */ jsx_dev_runtime17.jsxDEV(Box_default, {
|
|
75145
|
+
flexDirection: "column",
|
|
75146
|
+
children: [
|
|
75147
|
+
/* @__PURE__ */ jsx_dev_runtime17.jsxDEV(Text, {
|
|
75148
|
+
bold: true,
|
|
75149
|
+
children: "Import Preview"
|
|
75150
|
+
}, undefined, false, undefined, this),
|
|
75151
|
+
/* @__PURE__ */ jsx_dev_runtime17.jsxDEV(Text, {
|
|
75152
|
+
dimColor: true,
|
|
75153
|
+
children: "Changes that will be applied:"
|
|
75154
|
+
}, undefined, false, undefined, this),
|
|
75155
|
+
/* @__PURE__ */ jsx_dev_runtime17.jsxDEV(Box_default, {
|
|
75156
|
+
flexDirection: "column",
|
|
75157
|
+
children: diffRows
|
|
75158
|
+
}, undefined, false, undefined, this),
|
|
75159
|
+
/* @__PURE__ */ jsx_dev_runtime17.jsxDEV(List, {
|
|
75160
|
+
items,
|
|
75161
|
+
onSelect: handleSelect,
|
|
75162
|
+
onSelectionChange: handleSelectionChange
|
|
75163
|
+
}, undefined, false, undefined, this)
|
|
75164
|
+
]
|
|
75165
|
+
}, undefined, true, undefined, this);
|
|
75166
|
+
}
|
|
74770
75167
|
// src/tui/components/GlobalOverridesMenu.tsx
|
|
74771
75168
|
init_ColorLevel();
|
|
74772
75169
|
init_Settings();
|
|
@@ -74774,22 +75171,22 @@ init_colors();
|
|
|
74774
75171
|
init_gradient();
|
|
74775
75172
|
init_input_guards();
|
|
74776
75173
|
await init_build2();
|
|
74777
|
-
var
|
|
74778
|
-
var
|
|
75174
|
+
var import_react45 = __toESM(require_react(), 1);
|
|
75175
|
+
var jsx_dev_runtime18 = __toESM(require_jsx_dev_runtime(), 1);
|
|
74779
75176
|
var GlobalOverridesMenu = ({ settings, onUpdate, onBack }) => {
|
|
74780
|
-
const [editingPadding, setEditingPadding] =
|
|
74781
|
-
const [editingSeparator, setEditingSeparator] =
|
|
74782
|
-
const [confirmingSeparator, setConfirmingSeparator] =
|
|
74783
|
-
const [paddingInput, setPaddingInput] =
|
|
74784
|
-
const [separatorInput, setSeparatorInput] =
|
|
74785
|
-
const [inheritColors, setInheritColors] =
|
|
74786
|
-
const [globalBold, setGlobalBold] =
|
|
74787
|
-
const [minimalistMode, setMinimalistMode] =
|
|
74788
|
-
const [gradientMode, setGradientMode] =
|
|
74789
|
-
const [gradientIndex, setGradientIndex] =
|
|
74790
|
-
const [gradientCustomStep, setGradientCustomStep] =
|
|
74791
|
-
const [gradientStartHex, setGradientStartHex] =
|
|
74792
|
-
const [gradientHexInput, setGradientHexInput] =
|
|
75177
|
+
const [editingPadding, setEditingPadding] = import_react45.useState(false);
|
|
75178
|
+
const [editingSeparator, setEditingSeparator] = import_react45.useState(false);
|
|
75179
|
+
const [confirmingSeparator, setConfirmingSeparator] = import_react45.useState(false);
|
|
75180
|
+
const [paddingInput, setPaddingInput] = import_react45.useState(settings.defaultPadding ?? "");
|
|
75181
|
+
const [separatorInput, setSeparatorInput] = import_react45.useState(settings.defaultSeparator ?? "");
|
|
75182
|
+
const [inheritColors, setInheritColors] = import_react45.useState(settings.inheritSeparatorColors);
|
|
75183
|
+
const [globalBold, setGlobalBold] = import_react45.useState(settings.globalBold);
|
|
75184
|
+
const [minimalistMode, setMinimalistMode] = import_react45.useState(settings.minimalistMode);
|
|
75185
|
+
const [gradientMode, setGradientMode] = import_react45.useState(false);
|
|
75186
|
+
const [gradientIndex, setGradientIndex] = import_react45.useState(0);
|
|
75187
|
+
const [gradientCustomStep, setGradientCustomStep] = import_react45.useState(null);
|
|
75188
|
+
const [gradientStartHex, setGradientStartHex] = import_react45.useState("");
|
|
75189
|
+
const [gradientHexInput, setGradientHexInput] = import_react45.useState("");
|
|
74793
75190
|
const isPowerlineEnabled = settings.powerline.enabled;
|
|
74794
75191
|
const hasManualSeparators = settings.lines.some((line) => line.some((item) => item.type === "separator"));
|
|
74795
75192
|
const bgColors = ["none", ...COLOR_MAP.filter((c) => c.isBackground).map((c) => c.name)];
|
|
@@ -74971,41 +75368,41 @@ var GlobalOverridesMenu = ({ settings, onUpdate, onBack }) => {
|
|
|
74971
75368
|
if (gradientMode) {
|
|
74972
75369
|
const level = getColorLevelString(settings.colorLevel);
|
|
74973
75370
|
if (gradientCustomStep) {
|
|
74974
|
-
return /* @__PURE__ */
|
|
75371
|
+
return /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Box_default, {
|
|
74975
75372
|
flexDirection: "column",
|
|
74976
75373
|
children: [
|
|
74977
|
-
/* @__PURE__ */
|
|
75374
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
74978
75375
|
bold: true,
|
|
74979
75376
|
children: "Custom Gradient - Override FG Color"
|
|
74980
75377
|
}, undefined, false, undefined, this),
|
|
74981
|
-
/* @__PURE__ */
|
|
75378
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Box_default, {
|
|
74982
75379
|
marginTop: 1,
|
|
74983
75380
|
flexDirection: "column",
|
|
74984
75381
|
children: [
|
|
74985
|
-
/* @__PURE__ */
|
|
75382
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
74986
75383
|
children: gradientCustomStep === "start" ? "Enter START hex color (without #):" : "Enter END hex color (without #):"
|
|
74987
75384
|
}, undefined, false, undefined, this),
|
|
74988
|
-
gradientCustomStep === "end" && /* @__PURE__ */
|
|
75385
|
+
gradientCustomStep === "end" && /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
74989
75386
|
dimColor: true,
|
|
74990
75387
|
children: [
|
|
74991
75388
|
"Start: #",
|
|
74992
75389
|
gradientStartHex
|
|
74993
75390
|
]
|
|
74994
75391
|
}, undefined, true, undefined, this),
|
|
74995
|
-
/* @__PURE__ */
|
|
75392
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
74996
75393
|
children: [
|
|
74997
75394
|
"#",
|
|
74998
75395
|
gradientHexInput,
|
|
74999
|
-
/* @__PURE__ */
|
|
75396
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
75000
75397
|
dimColor: true,
|
|
75001
75398
|
children: gradientHexInput.length < 6 ? "_".repeat(6 - gradientHexInput.length) : ""
|
|
75002
75399
|
}, undefined, false, undefined, this)
|
|
75003
75400
|
]
|
|
75004
75401
|
}, undefined, true, undefined, this),
|
|
75005
|
-
/* @__PURE__ */
|
|
75402
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
75006
75403
|
children: " "
|
|
75007
75404
|
}, undefined, false, undefined, this),
|
|
75008
|
-
/* @__PURE__ */
|
|
75405
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
75009
75406
|
dimColor: true,
|
|
75010
75407
|
children: "Press Enter when done, ESC to go back"
|
|
75011
75408
|
}, undefined, false, undefined, this)
|
|
@@ -75014,31 +75411,31 @@ var GlobalOverridesMenu = ({ settings, onUpdate, onBack }) => {
|
|
|
75014
75411
|
]
|
|
75015
75412
|
}, undefined, true, undefined, this);
|
|
75016
75413
|
}
|
|
75017
|
-
return /* @__PURE__ */
|
|
75414
|
+
return /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Box_default, {
|
|
75018
75415
|
flexDirection: "column",
|
|
75019
75416
|
children: [
|
|
75020
|
-
/* @__PURE__ */
|
|
75417
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
75021
75418
|
bold: true,
|
|
75022
75419
|
children: "Select Gradient - Override FG Color"
|
|
75023
75420
|
}, undefined, false, undefined, this),
|
|
75024
|
-
/* @__PURE__ */
|
|
75421
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Box_default, {
|
|
75025
75422
|
marginTop: 1,
|
|
75026
|
-
children: /* @__PURE__ */
|
|
75423
|
+
children: /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
75027
75424
|
dimColor: true,
|
|
75028
75425
|
children: "↑↓ to select, Enter to apply, ESC to cancel"
|
|
75029
75426
|
}, undefined, false, undefined, this)
|
|
75030
75427
|
}, undefined, false, undefined, this),
|
|
75031
|
-
/* @__PURE__ */
|
|
75428
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Box_default, {
|
|
75032
75429
|
marginTop: 1,
|
|
75033
75430
|
flexDirection: "column",
|
|
75034
75431
|
children: [
|
|
75035
|
-
GRADIENT_PRESET_NAMES.map((name, idx) => /* @__PURE__ */
|
|
75432
|
+
GRADIENT_PRESET_NAMES.map((name, idx) => /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
75036
75433
|
children: [
|
|
75037
75434
|
idx === gradientIndex ? "▶ " : " ",
|
|
75038
75435
|
applyColors(name, `gradient:${name}`, undefined, idx === gradientIndex, level)
|
|
75039
75436
|
]
|
|
75040
75437
|
}, name, true, undefined, this)),
|
|
75041
|
-
/* @__PURE__ */
|
|
75438
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
75042
75439
|
children: [
|
|
75043
75440
|
gradientIndex === GRADIENT_PRESET_NAMES.length ? "▶ " : " ",
|
|
75044
75441
|
"Custom (enter two hex stops)"
|
|
@@ -75049,95 +75446,95 @@ var GlobalOverridesMenu = ({ settings, onUpdate, onBack }) => {
|
|
|
75049
75446
|
]
|
|
75050
75447
|
}, undefined, true, undefined, this);
|
|
75051
75448
|
}
|
|
75052
|
-
return /* @__PURE__ */
|
|
75449
|
+
return /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Box_default, {
|
|
75053
75450
|
flexDirection: "column",
|
|
75054
75451
|
children: [
|
|
75055
|
-
/* @__PURE__ */
|
|
75452
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
75056
75453
|
bold: true,
|
|
75057
75454
|
children: "Global Overrides"
|
|
75058
75455
|
}, undefined, false, undefined, this),
|
|
75059
|
-
/* @__PURE__ */
|
|
75456
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
75060
75457
|
dimColor: true,
|
|
75061
75458
|
children: "Configure automatic padding and separators between widgets"
|
|
75062
75459
|
}, undefined, false, undefined, this),
|
|
75063
|
-
isPowerlineEnabled && /* @__PURE__ */
|
|
75460
|
+
isPowerlineEnabled && /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Box_default, {
|
|
75064
75461
|
marginTop: 1,
|
|
75065
|
-
children: /* @__PURE__ */
|
|
75462
|
+
children: /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
75066
75463
|
color: "yellow",
|
|
75067
75464
|
children: "⚠ Some options are disabled while Powerline mode is active"
|
|
75068
75465
|
}, undefined, false, undefined, this)
|
|
75069
75466
|
}, undefined, false, undefined, this),
|
|
75070
|
-
/* @__PURE__ */
|
|
75467
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Box_default, {
|
|
75071
75468
|
marginTop: 1
|
|
75072
75469
|
}, undefined, false, undefined, this),
|
|
75073
|
-
editingPadding ? /* @__PURE__ */
|
|
75470
|
+
editingPadding ? /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Box_default, {
|
|
75074
75471
|
flexDirection: "column",
|
|
75075
75472
|
children: [
|
|
75076
|
-
/* @__PURE__ */
|
|
75473
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Box_default, {
|
|
75077
75474
|
children: [
|
|
75078
|
-
/* @__PURE__ */
|
|
75475
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
75079
75476
|
children: "Enter default padding (applied per the Padding Side setting): "
|
|
75080
75477
|
}, undefined, false, undefined, this),
|
|
75081
|
-
/* @__PURE__ */
|
|
75478
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
75082
75479
|
color: "cyan",
|
|
75083
75480
|
children: paddingInput ? `"${paddingInput}"` : "(empty)"
|
|
75084
75481
|
}, undefined, false, undefined, this)
|
|
75085
75482
|
]
|
|
75086
75483
|
}, undefined, true, undefined, this),
|
|
75087
|
-
/* @__PURE__ */
|
|
75484
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
75088
75485
|
dimColor: true,
|
|
75089
75486
|
children: "Press Enter to save, ESC to cancel"
|
|
75090
75487
|
}, undefined, false, undefined, this)
|
|
75091
75488
|
]
|
|
75092
|
-
}, undefined, true, undefined, this) : editingSeparator ? /* @__PURE__ */
|
|
75489
|
+
}, undefined, true, undefined, this) : editingSeparator ? /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Box_default, {
|
|
75093
75490
|
flexDirection: "column",
|
|
75094
75491
|
children: [
|
|
75095
|
-
/* @__PURE__ */
|
|
75492
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Box_default, {
|
|
75096
75493
|
children: [
|
|
75097
|
-
/* @__PURE__ */
|
|
75494
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
75098
75495
|
children: "Enter default separator (placed between widgets): "
|
|
75099
75496
|
}, undefined, false, undefined, this),
|
|
75100
|
-
/* @__PURE__ */
|
|
75497
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
75101
75498
|
color: "cyan",
|
|
75102
75499
|
children: separatorInput ? `"${separatorInput}"` : "(empty - no separator will be added)"
|
|
75103
75500
|
}, undefined, false, undefined, this)
|
|
75104
75501
|
]
|
|
75105
75502
|
}, undefined, true, undefined, this),
|
|
75106
|
-
/* @__PURE__ */
|
|
75503
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
75107
75504
|
dimColor: true,
|
|
75108
75505
|
children: "Press Enter to save, ESC to cancel"
|
|
75109
75506
|
}, undefined, false, undefined, this)
|
|
75110
75507
|
]
|
|
75111
|
-
}, undefined, true, undefined, this) : confirmingSeparator ? /* @__PURE__ */
|
|
75508
|
+
}, undefined, true, undefined, this) : confirmingSeparator ? /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Box_default, {
|
|
75112
75509
|
flexDirection: "column",
|
|
75113
75510
|
children: [
|
|
75114
|
-
/* @__PURE__ */
|
|
75511
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Box_default, {
|
|
75115
75512
|
marginBottom: 1,
|
|
75116
|
-
children: /* @__PURE__ */
|
|
75513
|
+
children: /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
75117
75514
|
color: "yellow",
|
|
75118
75515
|
children: "⚠ Warning: Setting a default separator will remove all existing manual separators from your status lines."
|
|
75119
75516
|
}, undefined, false, undefined, this)
|
|
75120
75517
|
}, undefined, false, undefined, this),
|
|
75121
|
-
/* @__PURE__ */
|
|
75518
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Box_default, {
|
|
75122
75519
|
children: [
|
|
75123
|
-
/* @__PURE__ */
|
|
75520
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
75124
75521
|
children: "New default separator: "
|
|
75125
75522
|
}, undefined, false, undefined, this),
|
|
75126
|
-
/* @__PURE__ */
|
|
75523
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
75127
75524
|
color: "cyan",
|
|
75128
75525
|
children: separatorInput ? `"${separatorInput}"` : "(empty)"
|
|
75129
75526
|
}, undefined, false, undefined, this)
|
|
75130
75527
|
]
|
|
75131
75528
|
}, undefined, true, undefined, this),
|
|
75132
|
-
/* @__PURE__ */
|
|
75529
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Box_default, {
|
|
75133
75530
|
marginTop: 1,
|
|
75134
|
-
children: /* @__PURE__ */
|
|
75531
|
+
children: /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
75135
75532
|
children: "Do you want to continue? "
|
|
75136
75533
|
}, undefined, false, undefined, this)
|
|
75137
75534
|
}, undefined, false, undefined, this),
|
|
75138
|
-
/* @__PURE__ */
|
|
75535
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Box_default, {
|
|
75139
75536
|
marginTop: 1,
|
|
75140
|
-
children: /* @__PURE__ */
|
|
75537
|
+
children: /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(ConfirmDialog, {
|
|
75141
75538
|
inline: true,
|
|
75142
75539
|
onConfirm: () => {
|
|
75143
75540
|
const updatedSettings = {
|
|
@@ -75155,77 +75552,77 @@ var GlobalOverridesMenu = ({ settings, onUpdate, onBack }) => {
|
|
|
75155
75552
|
}, undefined, false, undefined, this)
|
|
75156
75553
|
}, undefined, false, undefined, this)
|
|
75157
75554
|
]
|
|
75158
|
-
}, undefined, true, undefined, this) : /* @__PURE__ */
|
|
75555
|
+
}, undefined, true, undefined, this) : /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(jsx_dev_runtime18.Fragment, {
|
|
75159
75556
|
children: [
|
|
75160
|
-
/* @__PURE__ */
|
|
75557
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Box_default, {
|
|
75161
75558
|
children: [
|
|
75162
|
-
/* @__PURE__ */
|
|
75559
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
75163
75560
|
children: " Global Bold: "
|
|
75164
75561
|
}, undefined, false, undefined, this),
|
|
75165
|
-
/* @__PURE__ */
|
|
75562
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
75166
75563
|
color: globalBold ? "green" : "red",
|
|
75167
75564
|
children: globalBold ? "✓ Enabled" : "✗ Disabled"
|
|
75168
75565
|
}, undefined, false, undefined, this),
|
|
75169
|
-
/* @__PURE__ */
|
|
75566
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
75170
75567
|
dimColor: true,
|
|
75171
75568
|
children: " - Press (o) to toggle"
|
|
75172
75569
|
}, undefined, false, undefined, this)
|
|
75173
75570
|
]
|
|
75174
75571
|
}, undefined, true, undefined, this),
|
|
75175
|
-
/* @__PURE__ */
|
|
75572
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Box_default, {
|
|
75176
75573
|
children: [
|
|
75177
|
-
/* @__PURE__ */
|
|
75574
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
75178
75575
|
children: " Minimalist Mode: "
|
|
75179
75576
|
}, undefined, false, undefined, this),
|
|
75180
|
-
/* @__PURE__ */
|
|
75577
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
75181
75578
|
color: minimalistMode ? "green" : "red",
|
|
75182
75579
|
children: minimalistMode ? "✓ Enabled" : "✗ Disabled"
|
|
75183
75580
|
}, undefined, false, undefined, this),
|
|
75184
|
-
/* @__PURE__ */
|
|
75581
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
75185
75582
|
dimColor: true,
|
|
75186
75583
|
children: " - Press (m) to toggle"
|
|
75187
75584
|
}, undefined, false, undefined, this)
|
|
75188
75585
|
]
|
|
75189
75586
|
}, undefined, true, undefined, this),
|
|
75190
|
-
/* @__PURE__ */
|
|
75587
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Box_default, {
|
|
75191
75588
|
children: [
|
|
75192
|
-
/* @__PURE__ */
|
|
75589
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
75193
75590
|
children: " Default Padding: "
|
|
75194
75591
|
}, undefined, false, undefined, this),
|
|
75195
|
-
/* @__PURE__ */
|
|
75592
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
75196
75593
|
color: "cyan",
|
|
75197
75594
|
children: settings.defaultPadding ? `"${settings.defaultPadding}"` : "(none)"
|
|
75198
75595
|
}, undefined, false, undefined, this),
|
|
75199
|
-
/* @__PURE__ */
|
|
75596
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
75200
75597
|
dimColor: true,
|
|
75201
75598
|
children: " - Press (p) to edit"
|
|
75202
75599
|
}, undefined, false, undefined, this)
|
|
75203
75600
|
]
|
|
75204
75601
|
}, undefined, true, undefined, this),
|
|
75205
|
-
/* @__PURE__ */
|
|
75602
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Box_default, {
|
|
75206
75603
|
children: [
|
|
75207
|
-
/* @__PURE__ */
|
|
75604
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
75208
75605
|
children: " Padding Side: "
|
|
75209
75606
|
}, undefined, false, undefined, this),
|
|
75210
|
-
/* @__PURE__ */
|
|
75607
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
75211
75608
|
color: "cyan",
|
|
75212
75609
|
children: settings.defaultPaddingSide === "left" ? "Left only" : settings.defaultPaddingSide === "right" ? "Right only" : "Both"
|
|
75213
75610
|
}, undefined, false, undefined, this),
|
|
75214
|
-
/* @__PURE__ */
|
|
75611
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
75215
75612
|
dimColor: true,
|
|
75216
75613
|
children: " - Press (d) to cycle"
|
|
75217
75614
|
}, undefined, false, undefined, this)
|
|
75218
75615
|
]
|
|
75219
75616
|
}, undefined, true, undefined, this),
|
|
75220
|
-
/* @__PURE__ */
|
|
75617
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Box_default, {
|
|
75221
75618
|
children: [
|
|
75222
|
-
/* @__PURE__ */
|
|
75619
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
75223
75620
|
children: "Override FG Color: "
|
|
75224
75621
|
}, undefined, false, undefined, this),
|
|
75225
75622
|
(() => {
|
|
75226
75623
|
const fgColor = settings.overrideForegroundColor ?? "none";
|
|
75227
75624
|
if (fgColor === "none") {
|
|
75228
|
-
return /* @__PURE__ */
|
|
75625
|
+
return /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
75229
75626
|
color: "gray",
|
|
75230
75627
|
children: "(none)"
|
|
75231
75628
|
}, undefined, false, undefined, this);
|
|
@@ -75233,38 +75630,38 @@ var GlobalOverridesMenu = ({ settings, onUpdate, onBack }) => {
|
|
|
75233
75630
|
const body = fgColor.substring(9);
|
|
75234
75631
|
const displayName = GRADIENT_PRESET_NAMES.includes(body.toLowerCase()) ? `Gradient: ${body.toLowerCase()}` : `Gradient: ${body}`;
|
|
75235
75632
|
const level = getColorLevelString(settings.colorLevel);
|
|
75236
|
-
return /* @__PURE__ */
|
|
75633
|
+
return /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
75237
75634
|
children: applyColors(displayName, fgColor, undefined, false, level)
|
|
75238
75635
|
}, undefined, false, undefined, this);
|
|
75239
75636
|
} else {
|
|
75240
75637
|
const displayName = getColorDisplayName(fgColor);
|
|
75241
75638
|
const fgChalk = getChalkColor(fgColor, "ansi16", false);
|
|
75242
75639
|
const display = fgChalk ? fgChalk(displayName) : displayName;
|
|
75243
|
-
return /* @__PURE__ */
|
|
75640
|
+
return /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
75244
75641
|
children: display
|
|
75245
75642
|
}, undefined, false, undefined, this);
|
|
75246
75643
|
}
|
|
75247
75644
|
})(),
|
|
75248
|
-
/* @__PURE__ */
|
|
75645
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
75249
75646
|
dimColor: true,
|
|
75250
75647
|
children: " - (f) cycle, (g) gradient, (x) clear"
|
|
75251
75648
|
}, undefined, false, undefined, this)
|
|
75252
75649
|
]
|
|
75253
75650
|
}, undefined, true, undefined, this),
|
|
75254
|
-
/* @__PURE__ */
|
|
75651
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Box_default, {
|
|
75255
75652
|
children: [
|
|
75256
|
-
/* @__PURE__ */
|
|
75653
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
75257
75654
|
children: "Override BG Color: "
|
|
75258
75655
|
}, undefined, false, undefined, this),
|
|
75259
|
-
isPowerlineEnabled ? /* @__PURE__ */
|
|
75656
|
+
isPowerlineEnabled ? /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
75260
75657
|
dimColor: true,
|
|
75261
75658
|
children: "[disabled - Powerline active]"
|
|
75262
|
-
}, undefined, false, undefined, this) : /* @__PURE__ */
|
|
75659
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(jsx_dev_runtime18.Fragment, {
|
|
75263
75660
|
children: [
|
|
75264
75661
|
(() => {
|
|
75265
75662
|
const bgColor = settings.overrideBackgroundColor ?? "none";
|
|
75266
75663
|
if (bgColor === "none") {
|
|
75267
|
-
return /* @__PURE__ */
|
|
75664
|
+
return /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
75268
75665
|
color: "gray",
|
|
75269
75666
|
children: "(none)"
|
|
75270
75667
|
}, undefined, false, undefined, this);
|
|
@@ -75272,12 +75669,12 @@ var GlobalOverridesMenu = ({ settings, onUpdate, onBack }) => {
|
|
|
75272
75669
|
const displayName = getColorDisplayName(bgColor);
|
|
75273
75670
|
const bgChalk = getChalkColor(bgColor, "ansi16", true);
|
|
75274
75671
|
const display = bgChalk ? bgChalk(` ${displayName} `) : displayName;
|
|
75275
|
-
return /* @__PURE__ */
|
|
75672
|
+
return /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
75276
75673
|
children: display
|
|
75277
75674
|
}, undefined, false, undefined, this);
|
|
75278
75675
|
}
|
|
75279
75676
|
})(),
|
|
75280
|
-
/* @__PURE__ */
|
|
75677
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
75281
75678
|
dimColor: true,
|
|
75282
75679
|
children: " - (b) cycle, (c) clear"
|
|
75283
75680
|
}, undefined, false, undefined, this)
|
|
@@ -75285,21 +75682,21 @@ var GlobalOverridesMenu = ({ settings, onUpdate, onBack }) => {
|
|
|
75285
75682
|
}, undefined, true, undefined, this)
|
|
75286
75683
|
]
|
|
75287
75684
|
}, undefined, true, undefined, this),
|
|
75288
|
-
/* @__PURE__ */
|
|
75685
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Box_default, {
|
|
75289
75686
|
children: [
|
|
75290
|
-
/* @__PURE__ */
|
|
75687
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
75291
75688
|
children: " Inherit Colors: "
|
|
75292
75689
|
}, undefined, false, undefined, this),
|
|
75293
|
-
isPowerlineEnabled ? /* @__PURE__ */
|
|
75690
|
+
isPowerlineEnabled ? /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
75294
75691
|
dimColor: true,
|
|
75295
75692
|
children: "[disabled - Powerline active]"
|
|
75296
|
-
}, undefined, false, undefined, this) : /* @__PURE__ */
|
|
75693
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(jsx_dev_runtime18.Fragment, {
|
|
75297
75694
|
children: [
|
|
75298
|
-
/* @__PURE__ */
|
|
75695
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
75299
75696
|
color: inheritColors ? "green" : "red",
|
|
75300
75697
|
children: inheritColors ? "✓ Enabled" : "✗ Disabled"
|
|
75301
75698
|
}, undefined, false, undefined, this),
|
|
75302
|
-
/* @__PURE__ */
|
|
75699
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
75303
75700
|
dimColor: true,
|
|
75304
75701
|
children: " - Press (i) to toggle"
|
|
75305
75702
|
}, undefined, false, undefined, this)
|
|
@@ -75307,21 +75704,21 @@ var GlobalOverridesMenu = ({ settings, onUpdate, onBack }) => {
|
|
|
75307
75704
|
}, undefined, true, undefined, this)
|
|
75308
75705
|
]
|
|
75309
75706
|
}, undefined, true, undefined, this),
|
|
75310
|
-
/* @__PURE__ */
|
|
75707
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Box_default, {
|
|
75311
75708
|
children: [
|
|
75312
|
-
/* @__PURE__ */
|
|
75709
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
75313
75710
|
children: "Default Separator: "
|
|
75314
75711
|
}, undefined, false, undefined, this),
|
|
75315
|
-
isPowerlineEnabled ? /* @__PURE__ */
|
|
75712
|
+
isPowerlineEnabled ? /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
75316
75713
|
dimColor: true,
|
|
75317
75714
|
children: "[disabled - Powerline active]"
|
|
75318
|
-
}, undefined, false, undefined, this) : /* @__PURE__ */
|
|
75715
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(jsx_dev_runtime18.Fragment, {
|
|
75319
75716
|
children: [
|
|
75320
|
-
/* @__PURE__ */
|
|
75717
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
75321
75718
|
color: "cyan",
|
|
75322
75719
|
children: settings.defaultSeparator ? `"${settings.defaultSeparator}"` : "(none)"
|
|
75323
75720
|
}, undefined, false, undefined, this),
|
|
75324
|
-
/* @__PURE__ */
|
|
75721
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
75325
75722
|
dimColor: true,
|
|
75326
75723
|
children: " - Press (s) to edit"
|
|
75327
75724
|
}, undefined, false, undefined, this)
|
|
@@ -75329,43 +75726,43 @@ var GlobalOverridesMenu = ({ settings, onUpdate, onBack }) => {
|
|
|
75329
75726
|
}, undefined, true, undefined, this)
|
|
75330
75727
|
]
|
|
75331
75728
|
}, undefined, true, undefined, this),
|
|
75332
|
-
/* @__PURE__ */
|
|
75729
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Box_default, {
|
|
75333
75730
|
marginTop: 2,
|
|
75334
|
-
children: /* @__PURE__ */
|
|
75731
|
+
children: /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
75335
75732
|
dimColor: true,
|
|
75336
75733
|
children: "Press ESC to go back"
|
|
75337
75734
|
}, undefined, false, undefined, this)
|
|
75338
75735
|
}, undefined, false, undefined, this),
|
|
75339
|
-
/* @__PURE__ */
|
|
75736
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Box_default, {
|
|
75340
75737
|
marginTop: 1,
|
|
75341
75738
|
flexDirection: "column",
|
|
75342
75739
|
children: [
|
|
75343
|
-
/* @__PURE__ */
|
|
75740
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
75344
75741
|
dimColor: true,
|
|
75345
75742
|
wrap: "wrap",
|
|
75346
75743
|
children: "Note: These settings are applied during rendering and don't add widgets to your widget list."
|
|
75347
75744
|
}, undefined, false, undefined, this),
|
|
75348
|
-
/* @__PURE__ */
|
|
75745
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
75349
75746
|
dimColor: true,
|
|
75350
75747
|
wrap: "wrap",
|
|
75351
75748
|
children: "• Padding Side: Choose whether default padding applies to both sides, left only, or right only"
|
|
75352
75749
|
}, undefined, false, undefined, this),
|
|
75353
|
-
/* @__PURE__ */
|
|
75750
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
75354
75751
|
dimColor: true,
|
|
75355
75752
|
wrap: "wrap",
|
|
75356
75753
|
children: "• Inherit colors: Separators will use colors from the preceding widget"
|
|
75357
75754
|
}, undefined, false, undefined, this),
|
|
75358
|
-
/* @__PURE__ */
|
|
75755
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
75359
75756
|
dimColor: true,
|
|
75360
75757
|
wrap: "wrap",
|
|
75361
75758
|
children: "• Global Bold: Makes all text bold regardless of individual settings"
|
|
75362
75759
|
}, undefined, false, undefined, this),
|
|
75363
|
-
/* @__PURE__ */
|
|
75760
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
75364
75761
|
dimColor: true,
|
|
75365
75762
|
wrap: "wrap",
|
|
75366
75763
|
children: "• Minimalist Mode: Strips decorative prefixes and labels from widgets"
|
|
75367
75764
|
}, undefined, false, undefined, this),
|
|
75368
|
-
/* @__PURE__ */
|
|
75765
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
|
|
75369
75766
|
dimColor: true,
|
|
75370
75767
|
wrap: "wrap",
|
|
75371
75768
|
children: "• Override colors: All widgets will use these colors instead of their configured colors"
|
|
@@ -75382,8 +75779,8 @@ await __promiseAll([
|
|
|
75382
75779
|
init_build2(),
|
|
75383
75780
|
init_claude_settings()
|
|
75384
75781
|
]);
|
|
75385
|
-
var
|
|
75386
|
-
var
|
|
75782
|
+
var import_react46 = __toESM(require_react(), 1);
|
|
75783
|
+
var jsx_dev_runtime19 = __toESM(require_jsx_dev_runtime(), 1);
|
|
75387
75784
|
var AUTO_UPDATE_DESCRIPTION = "Runs `@latest` through npx/bunx. Stays current automatically, with a small startup cost when the package runner checks or resolves the package. Because it follows the latest published package, pinned install is available if you prefer explicit updates.";
|
|
75388
75785
|
function getPinnedDescription(currentVersion) {
|
|
75389
75786
|
return `Installs \`ccstatusline@${currentVersion}\` globally and Claude Code runs \`ccstatusline\`. Fast on each render because Claude Code runs the installed ccstatusline binary directly. The version changes only when you update the global install.`;
|
|
@@ -75467,8 +75864,8 @@ var InstallMenu = ({
|
|
|
75467
75864
|
onCancel,
|
|
75468
75865
|
initialPackageSelection = 0
|
|
75469
75866
|
}) => {
|
|
75470
|
-
const [step, setStep] =
|
|
75471
|
-
const [updateStyle, setUpdateStyle] =
|
|
75867
|
+
const [step, setStep] = import_react46.useState("style");
|
|
75868
|
+
const [updateStyle, setUpdateStyle] = import_react46.useState("pinned");
|
|
75472
75869
|
use_input_default((_, key) => {
|
|
75473
75870
|
if (key.escape) {
|
|
75474
75871
|
if (step === "manager") {
|
|
@@ -75478,16 +75875,16 @@ var InstallMenu = ({
|
|
|
75478
75875
|
onCancel();
|
|
75479
75876
|
}
|
|
75480
75877
|
});
|
|
75481
|
-
return /* @__PURE__ */
|
|
75878
|
+
return /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Box_default, {
|
|
75482
75879
|
flexDirection: "column",
|
|
75483
75880
|
children: [
|
|
75484
|
-
/* @__PURE__ */
|
|
75881
|
+
/* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Text, {
|
|
75485
75882
|
bold: true,
|
|
75486
75883
|
children: "Install ccstatusline to Claude Code"
|
|
75487
75884
|
}, undefined, false, undefined, this),
|
|
75488
|
-
existingStatusLine && /* @__PURE__ */
|
|
75885
|
+
existingStatusLine && /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Box_default, {
|
|
75489
75886
|
marginBottom: 1,
|
|
75490
|
-
children: /* @__PURE__ */
|
|
75887
|
+
children: /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Text, {
|
|
75491
75888
|
color: "yellow",
|
|
75492
75889
|
children: [
|
|
75493
75890
|
'⚠ Current status line: "',
|
|
@@ -75496,15 +75893,15 @@ var InstallMenu = ({
|
|
|
75496
75893
|
]
|
|
75497
75894
|
}, undefined, true, undefined, this)
|
|
75498
75895
|
}, undefined, false, undefined, this),
|
|
75499
|
-
step === "style" && /* @__PURE__ */
|
|
75896
|
+
step === "style" && /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(jsx_dev_runtime19.Fragment, {
|
|
75500
75897
|
children: [
|
|
75501
|
-
/* @__PURE__ */
|
|
75502
|
-
children: /* @__PURE__ */
|
|
75898
|
+
/* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Box_default, {
|
|
75899
|
+
children: /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Text, {
|
|
75503
75900
|
dimColor: true,
|
|
75504
75901
|
children: "Select update style:"
|
|
75505
75902
|
}, undefined, false, undefined, this)
|
|
75506
75903
|
}, undefined, false, undefined, this),
|
|
75507
|
-
/* @__PURE__ */
|
|
75904
|
+
/* @__PURE__ */ jsx_dev_runtime19.jsxDEV(List, {
|
|
75508
75905
|
color: "blue",
|
|
75509
75906
|
marginTop: 1,
|
|
75510
75907
|
items: getStyleItems(currentVersion),
|
|
@@ -75521,15 +75918,15 @@ var InstallMenu = ({
|
|
|
75521
75918
|
}, undefined, false, undefined, this)
|
|
75522
75919
|
]
|
|
75523
75920
|
}, undefined, true, undefined, this),
|
|
75524
|
-
step === "manager" && /* @__PURE__ */
|
|
75921
|
+
step === "manager" && /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(jsx_dev_runtime19.Fragment, {
|
|
75525
75922
|
children: [
|
|
75526
|
-
/* @__PURE__ */
|
|
75527
|
-
children: /* @__PURE__ */
|
|
75923
|
+
/* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Box_default, {
|
|
75924
|
+
children: /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Text, {
|
|
75528
75925
|
dimColor: true,
|
|
75529
75926
|
children: "Select package manager:"
|
|
75530
75927
|
}, undefined, false, undefined, this)
|
|
75531
75928
|
}, undefined, false, undefined, this),
|
|
75532
|
-
/* @__PURE__ */
|
|
75929
|
+
/* @__PURE__ */ jsx_dev_runtime19.jsxDEV(List, {
|
|
75533
75930
|
color: "blue",
|
|
75534
75931
|
marginTop: 1,
|
|
75535
75932
|
items: getManagerItems(updateStyle, commandAvailability, currentVersion),
|
|
@@ -75545,9 +75942,9 @@ var InstallMenu = ({
|
|
|
75545
75942
|
}, undefined, false, undefined, this)
|
|
75546
75943
|
]
|
|
75547
75944
|
}, undefined, true, undefined, this),
|
|
75548
|
-
/* @__PURE__ */
|
|
75945
|
+
/* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Box_default, {
|
|
75549
75946
|
marginTop: 2,
|
|
75550
|
-
children: /* @__PURE__ */
|
|
75947
|
+
children: /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Text, {
|
|
75551
75948
|
dimColor: true,
|
|
75552
75949
|
children: [
|
|
75553
75950
|
"The selected command will be written to",
|
|
@@ -75556,9 +75953,9 @@ var InstallMenu = ({
|
|
|
75556
75953
|
]
|
|
75557
75954
|
}, undefined, true, undefined, this)
|
|
75558
75955
|
}, undefined, false, undefined, this),
|
|
75559
|
-
/* @__PURE__ */
|
|
75956
|
+
/* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Box_default, {
|
|
75560
75957
|
marginTop: 1,
|
|
75561
|
-
children: /* @__PURE__ */
|
|
75958
|
+
children: /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Text, {
|
|
75562
75959
|
dimColor: true,
|
|
75563
75960
|
children: "Press Enter to select, ESC to go back"
|
|
75564
75961
|
}, undefined, false, undefined, this)
|
|
@@ -75573,7 +75970,7 @@ await __promiseAll([
|
|
|
75573
75970
|
init_build2(),
|
|
75574
75971
|
init_widgets2()
|
|
75575
75972
|
]);
|
|
75576
|
-
var
|
|
75973
|
+
var import_react47 = __toESM(require_react(), 1);
|
|
75577
75974
|
|
|
75578
75975
|
// src/tui/components/items-editor/input-handlers.ts
|
|
75579
75976
|
await init_widgets2();
|
|
@@ -75926,7 +76323,7 @@ function handleNormalInputMode({
|
|
|
75926
76323
|
}
|
|
75927
76324
|
|
|
75928
76325
|
// src/tui/components/ItemsEditor.tsx
|
|
75929
|
-
var
|
|
76326
|
+
var jsx_dev_runtime20 = __toESM(require_jsx_dev_runtime(), 1);
|
|
75930
76327
|
function isMergedIntoPreviousWidget(widgets, index) {
|
|
75931
76328
|
if (index <= 0) {
|
|
75932
76329
|
return false;
|
|
@@ -75934,11 +76331,11 @@ function isMergedIntoPreviousWidget(widgets, index) {
|
|
|
75934
76331
|
return Boolean(widgets[index - 1]?.merge);
|
|
75935
76332
|
}
|
|
75936
76333
|
var ItemsEditor = ({ widgets, onUpdate, onBack, lineNumber, settings }) => {
|
|
75937
|
-
const [selectedIndex, setSelectedIndex] =
|
|
75938
|
-
const [moveMode, setMoveMode] =
|
|
75939
|
-
const [customEditorWidget, setCustomEditorWidget] =
|
|
75940
|
-
const [widgetPicker, setWidgetPicker] =
|
|
75941
|
-
const [showClearConfirm, setShowClearConfirm] =
|
|
76334
|
+
const [selectedIndex, setSelectedIndex] = import_react47.useState(0);
|
|
76335
|
+
const [moveMode, setMoveMode] = import_react47.useState(false);
|
|
76336
|
+
const [customEditorWidget, setCustomEditorWidget] = import_react47.useState(null);
|
|
76337
|
+
const [widgetPicker, setWidgetPicker] = import_react47.useState(null);
|
|
76338
|
+
const [showClearConfirm, setShowClearConfirm] = import_react47.useState(false);
|
|
75942
76339
|
const separatorChars = ["|", "-", ",", " "];
|
|
75943
76340
|
const widgetCatalog = getWidgetCatalog(settings);
|
|
75944
76341
|
const widgetCategories = ["All", ...getWidgetCatalogCategories(widgetCatalog)];
|
|
@@ -76131,19 +76528,19 @@ var ItemsEditor = ({ widgets, onUpdate, onBack, lineNumber, settings }) => {
|
|
|
76131
76528
|
});
|
|
76132
76529
|
}
|
|
76133
76530
|
if (showClearConfirm) {
|
|
76134
|
-
return /* @__PURE__ */
|
|
76531
|
+
return /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
76135
76532
|
flexDirection: "column",
|
|
76136
76533
|
children: [
|
|
76137
|
-
/* @__PURE__ */
|
|
76534
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
76138
76535
|
bold: true,
|
|
76139
76536
|
color: "yellow",
|
|
76140
76537
|
children: "⚠ Confirm Clear Line"
|
|
76141
76538
|
}, undefined, false, undefined, this),
|
|
76142
|
-
/* @__PURE__ */
|
|
76539
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
76143
76540
|
marginTop: 1,
|
|
76144
76541
|
flexDirection: "column",
|
|
76145
76542
|
children: [
|
|
76146
|
-
/* @__PURE__ */
|
|
76543
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
76147
76544
|
children: [
|
|
76148
76545
|
"This will remove all widgets from Line",
|
|
76149
76546
|
" ",
|
|
@@ -76151,21 +76548,21 @@ var ItemsEditor = ({ widgets, onUpdate, onBack, lineNumber, settings }) => {
|
|
|
76151
76548
|
"."
|
|
76152
76549
|
]
|
|
76153
76550
|
}, undefined, true, undefined, this),
|
|
76154
|
-
/* @__PURE__ */
|
|
76551
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
76155
76552
|
color: "red",
|
|
76156
76553
|
children: "This action cannot be undone!"
|
|
76157
76554
|
}, undefined, false, undefined, this)
|
|
76158
76555
|
]
|
|
76159
76556
|
}, undefined, true, undefined, this),
|
|
76160
|
-
/* @__PURE__ */
|
|
76557
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
76161
76558
|
marginTop: 2,
|
|
76162
|
-
children: /* @__PURE__ */
|
|
76559
|
+
children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
76163
76560
|
children: "Continue?"
|
|
76164
76561
|
}, undefined, false, undefined, this)
|
|
76165
76562
|
}, undefined, false, undefined, this),
|
|
76166
|
-
/* @__PURE__ */
|
|
76563
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
76167
76564
|
marginTop: 1,
|
|
76168
|
-
children: /* @__PURE__ */
|
|
76565
|
+
children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(ConfirmDialog, {
|
|
76169
76566
|
inline: true,
|
|
76170
76567
|
onConfirm: () => {
|
|
76171
76568
|
onUpdate([]);
|
|
@@ -76180,12 +76577,12 @@ var ItemsEditor = ({ widgets, onUpdate, onBack, lineNumber, settings }) => {
|
|
|
76180
76577
|
]
|
|
76181
76578
|
}, undefined, true, undefined, this);
|
|
76182
76579
|
}
|
|
76183
|
-
return /* @__PURE__ */
|
|
76580
|
+
return /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
76184
76581
|
flexDirection: "column",
|
|
76185
76582
|
children: [
|
|
76186
|
-
/* @__PURE__ */
|
|
76583
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
76187
76584
|
children: [
|
|
76188
|
-
/* @__PURE__ */
|
|
76585
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
76189
76586
|
bold: true,
|
|
76190
76587
|
children: [
|
|
76191
76588
|
"Edit Line",
|
|
@@ -76194,17 +76591,17 @@ var ItemsEditor = ({ widgets, onUpdate, onBack, lineNumber, settings }) => {
|
|
|
76194
76591
|
" "
|
|
76195
76592
|
]
|
|
76196
76593
|
}, undefined, true, undefined, this),
|
|
76197
|
-
moveMode && /* @__PURE__ */
|
|
76594
|
+
moveMode && /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
76198
76595
|
color: "blue",
|
|
76199
76596
|
children: "[MOVE MODE]"
|
|
76200
76597
|
}, undefined, false, undefined, this),
|
|
76201
|
-
widgetPicker && /* @__PURE__ */
|
|
76598
|
+
widgetPicker && /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
76202
76599
|
color: "cyan",
|
|
76203
76600
|
children: `[${pickerActionLabel.toUpperCase()}]`
|
|
76204
76601
|
}, undefined, false, undefined, this),
|
|
76205
|
-
(settings.powerline.enabled || Boolean(settings.defaultSeparator)) && /* @__PURE__ */
|
|
76602
|
+
(settings.powerline.enabled || Boolean(settings.defaultSeparator)) && /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
76206
76603
|
marginLeft: 2,
|
|
76207
|
-
children: /* @__PURE__ */
|
|
76604
|
+
children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
76208
76605
|
color: "yellow",
|
|
76209
76606
|
children: [
|
|
76210
76607
|
"⚠",
|
|
@@ -76215,46 +76612,46 @@ var ItemsEditor = ({ widgets, onUpdate, onBack, lineNumber, settings }) => {
|
|
|
76215
76612
|
}, undefined, false, undefined, this)
|
|
76216
76613
|
]
|
|
76217
76614
|
}, undefined, true, undefined, this),
|
|
76218
|
-
moveMode ? /* @__PURE__ */
|
|
76615
|
+
moveMode ? /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
76219
76616
|
flexDirection: "column",
|
|
76220
76617
|
marginBottom: 1,
|
|
76221
|
-
children: /* @__PURE__ */
|
|
76618
|
+
children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
76222
76619
|
dimColor: true,
|
|
76223
76620
|
children: "↑↓ to move widget, ESC or Enter to exit move mode"
|
|
76224
76621
|
}, undefined, false, undefined, this)
|
|
76225
|
-
}, undefined, false, undefined, this) : widgetPicker ? /* @__PURE__ */
|
|
76622
|
+
}, undefined, false, undefined, this) : widgetPicker ? /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
76226
76623
|
flexDirection: "column",
|
|
76227
|
-
children: widgetPicker.level === "category" ? /* @__PURE__ */
|
|
76624
|
+
children: widgetPicker.level === "category" ? /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(jsx_dev_runtime20.Fragment, {
|
|
76228
76625
|
children: [
|
|
76229
|
-
widgetPicker.categoryQuery.trim().length > 0 ? /* @__PURE__ */
|
|
76626
|
+
widgetPicker.categoryQuery.trim().length > 0 ? /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
76230
76627
|
dimColor: true,
|
|
76231
76628
|
children: "↑↓ select widget match, Enter apply, ESC clear/cancel"
|
|
76232
|
-
}, undefined, false, undefined, this) : /* @__PURE__ */
|
|
76629
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
76233
76630
|
dimColor: true,
|
|
76234
76631
|
children: "↑↓ select category, type to search all widgets, Enter continue, ESC cancel"
|
|
76235
76632
|
}, undefined, false, undefined, this),
|
|
76236
|
-
/* @__PURE__ */
|
|
76633
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
76237
76634
|
children: [
|
|
76238
|
-
/* @__PURE__ */
|
|
76635
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
76239
76636
|
dimColor: true,
|
|
76240
76637
|
children: "Search: "
|
|
76241
76638
|
}, undefined, false, undefined, this),
|
|
76242
|
-
/* @__PURE__ */
|
|
76639
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
76243
76640
|
color: "cyan",
|
|
76244
76641
|
children: widgetPicker.categoryQuery || "(none)"
|
|
76245
76642
|
}, undefined, false, undefined, this)
|
|
76246
76643
|
]
|
|
76247
76644
|
}, undefined, true, undefined, this)
|
|
76248
76645
|
]
|
|
76249
|
-
}, undefined, true, undefined, this) : /* @__PURE__ */
|
|
76646
|
+
}, undefined, true, undefined, this) : /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(jsx_dev_runtime20.Fragment, {
|
|
76250
76647
|
children: [
|
|
76251
|
-
/* @__PURE__ */
|
|
76648
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
76252
76649
|
dimColor: true,
|
|
76253
76650
|
children: "↑↓ select widget, type to search widgets, Enter apply, ESC back"
|
|
76254
76651
|
}, undefined, false, undefined, this),
|
|
76255
|
-
/* @__PURE__ */
|
|
76652
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
76256
76653
|
children: [
|
|
76257
|
-
/* @__PURE__ */
|
|
76654
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
76258
76655
|
dimColor: true,
|
|
76259
76656
|
children: [
|
|
76260
76657
|
"Category:",
|
|
@@ -76265,7 +76662,7 @@ var ItemsEditor = ({ widgets, onUpdate, onBack, lineNumber, settings }) => {
|
|
|
76265
76662
|
" "
|
|
76266
76663
|
]
|
|
76267
76664
|
}, undefined, true, undefined, this),
|
|
76268
|
-
/* @__PURE__ */
|
|
76665
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
76269
76666
|
color: "cyan",
|
|
76270
76667
|
children: widgetPicker.widgetQuery || "(none)"
|
|
76271
76668
|
}, undefined, false, undefined, this)
|
|
@@ -76273,59 +76670,59 @@ var ItemsEditor = ({ widgets, onUpdate, onBack, lineNumber, settings }) => {
|
|
|
76273
76670
|
}, undefined, true, undefined, this)
|
|
76274
76671
|
]
|
|
76275
76672
|
}, undefined, true, undefined, this)
|
|
76276
|
-
}, undefined, false, undefined, this) : /* @__PURE__ */
|
|
76673
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
76277
76674
|
flexDirection: "column",
|
|
76278
76675
|
children: [
|
|
76279
|
-
/* @__PURE__ */
|
|
76676
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
76280
76677
|
dimColor: true,
|
|
76281
76678
|
children: helpText
|
|
76282
76679
|
}, undefined, false, undefined, this),
|
|
76283
|
-
/* @__PURE__ */
|
|
76680
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
76284
76681
|
dimColor: true,
|
|
76285
76682
|
children: customKeybindsText || " "
|
|
76286
76683
|
}, undefined, false, undefined, this)
|
|
76287
76684
|
]
|
|
76288
76685
|
}, undefined, true, undefined, this),
|
|
76289
|
-
hasFlexSeparator && !widthDetectionAvailable && /* @__PURE__ */
|
|
76686
|
+
hasFlexSeparator && !widthDetectionAvailable && /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
76290
76687
|
marginTop: 1,
|
|
76291
76688
|
children: [
|
|
76292
|
-
/* @__PURE__ */
|
|
76689
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
76293
76690
|
color: "yellow",
|
|
76294
76691
|
children: "⚠ Note: Terminal width detection is currently unavailable in your environment."
|
|
76295
76692
|
}, undefined, false, undefined, this),
|
|
76296
|
-
/* @__PURE__ */
|
|
76693
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
76297
76694
|
dimColor: true,
|
|
76298
76695
|
children: " Flex separators will act as normal separators until width detection is available."
|
|
76299
76696
|
}, undefined, false, undefined, this)
|
|
76300
76697
|
]
|
|
76301
76698
|
}, undefined, true, undefined, this),
|
|
76302
|
-
widgetPicker && /* @__PURE__ */
|
|
76699
|
+
widgetPicker && /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
76303
76700
|
marginTop: 1,
|
|
76304
76701
|
flexDirection: "column",
|
|
76305
|
-
children: widgetPicker.level === "category" ? widgetPicker.categoryQuery.trim().length > 0 ? topLevelSearchEntries.length === 0 ? /* @__PURE__ */
|
|
76702
|
+
children: widgetPicker.level === "category" ? widgetPicker.categoryQuery.trim().length > 0 ? topLevelSearchEntries.length === 0 ? /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
76306
76703
|
dimColor: true,
|
|
76307
76704
|
children: "No widgets match the search."
|
|
76308
|
-
}, undefined, false, undefined, this) : /* @__PURE__ */
|
|
76705
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(jsx_dev_runtime20.Fragment, {
|
|
76309
76706
|
children: [
|
|
76310
76707
|
topLevelSearchEntries.map((entry, index) => {
|
|
76311
76708
|
const isSelected = entry.type === selectedTopLevelSearchEntry?.type;
|
|
76312
76709
|
const segments = getMatchSegments(entry.displayName, widgetPicker.categoryQuery);
|
|
76313
|
-
return /* @__PURE__ */
|
|
76710
|
+
return /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
76314
76711
|
flexDirection: "row",
|
|
76315
76712
|
flexWrap: "nowrap",
|
|
76316
76713
|
children: [
|
|
76317
|
-
/* @__PURE__ */
|
|
76714
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
76318
76715
|
width: 3,
|
|
76319
|
-
children: /* @__PURE__ */
|
|
76716
|
+
children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
76320
76717
|
color: isSelected ? "green" : undefined,
|
|
76321
76718
|
children: isSelected ? "▶ " : " "
|
|
76322
76719
|
}, undefined, false, undefined, this)
|
|
76323
76720
|
}, undefined, false, undefined, this),
|
|
76324
|
-
/* @__PURE__ */
|
|
76721
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
76325
76722
|
color: isSelected ? "green" : undefined,
|
|
76326
76723
|
children: `${index + 1}. `
|
|
76327
76724
|
}, undefined, false, undefined, this),
|
|
76328
|
-
segments.map((seg, i) => /* @__PURE__ */
|
|
76725
|
+
segments.map((seg, i) => /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
76329
76726
|
color: isSelected ? "green" : seg.matched ? "yellowBright" : undefined,
|
|
76330
76727
|
bold: isSelected ? true : seg.matched,
|
|
76331
76728
|
children: seg.text
|
|
@@ -76333,73 +76730,73 @@ var ItemsEditor = ({ widgets, onUpdate, onBack, lineNumber, settings }) => {
|
|
|
76333
76730
|
]
|
|
76334
76731
|
}, entry.type, true, undefined, this);
|
|
76335
76732
|
}),
|
|
76336
|
-
selectedTopLevelSearchEntry && /* @__PURE__ */
|
|
76733
|
+
selectedTopLevelSearchEntry && /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
76337
76734
|
marginTop: 1,
|
|
76338
76735
|
paddingLeft: 2,
|
|
76339
|
-
children: /* @__PURE__ */
|
|
76736
|
+
children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
76340
76737
|
dimColor: true,
|
|
76341
76738
|
children: selectedTopLevelSearchEntry.description
|
|
76342
76739
|
}, undefined, false, undefined, this)
|
|
76343
76740
|
}, undefined, false, undefined, this)
|
|
76344
76741
|
]
|
|
76345
|
-
}, undefined, true, undefined, this) : pickerCategories.length === 0 ? /* @__PURE__ */
|
|
76742
|
+
}, undefined, true, undefined, this) : pickerCategories.length === 0 ? /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
76346
76743
|
dimColor: true,
|
|
76347
76744
|
children: "No categories available."
|
|
76348
|
-
}, undefined, false, undefined, this) : /* @__PURE__ */
|
|
76745
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(jsx_dev_runtime20.Fragment, {
|
|
76349
76746
|
children: [
|
|
76350
76747
|
pickerCategories.map((category, index) => {
|
|
76351
76748
|
const isSelected = category === selectedPickerCategory;
|
|
76352
|
-
return /* @__PURE__ */
|
|
76749
|
+
return /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
76353
76750
|
flexDirection: "row",
|
|
76354
76751
|
flexWrap: "nowrap",
|
|
76355
76752
|
children: [
|
|
76356
|
-
/* @__PURE__ */
|
|
76753
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
76357
76754
|
width: 3,
|
|
76358
|
-
children: /* @__PURE__ */
|
|
76755
|
+
children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
76359
76756
|
color: isSelected ? "green" : undefined,
|
|
76360
76757
|
children: isSelected ? "▶ " : " "
|
|
76361
76758
|
}, undefined, false, undefined, this)
|
|
76362
76759
|
}, undefined, false, undefined, this),
|
|
76363
|
-
/* @__PURE__ */
|
|
76760
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
76364
76761
|
color: isSelected ? "green" : undefined,
|
|
76365
76762
|
children: `${index + 1}. ${category}`
|
|
76366
76763
|
}, undefined, false, undefined, this)
|
|
76367
76764
|
]
|
|
76368
76765
|
}, category, true, undefined, this);
|
|
76369
76766
|
}),
|
|
76370
|
-
selectedPickerCategory === "All" && /* @__PURE__ */
|
|
76767
|
+
selectedPickerCategory === "All" && /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
76371
76768
|
marginTop: 1,
|
|
76372
76769
|
paddingLeft: 2,
|
|
76373
|
-
children: /* @__PURE__ */
|
|
76770
|
+
children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
76374
76771
|
dimColor: true,
|
|
76375
76772
|
children: "Search across all widget categories."
|
|
76376
76773
|
}, undefined, false, undefined, this)
|
|
76377
76774
|
}, undefined, false, undefined, this)
|
|
76378
76775
|
]
|
|
76379
|
-
}, undefined, true, undefined, this) : pickerEntries.length === 0 ? /* @__PURE__ */
|
|
76776
|
+
}, undefined, true, undefined, this) : pickerEntries.length === 0 ? /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
76380
76777
|
dimColor: true,
|
|
76381
76778
|
children: "No widgets match the current category/search."
|
|
76382
|
-
}, undefined, false, undefined, this) : /* @__PURE__ */
|
|
76779
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(jsx_dev_runtime20.Fragment, {
|
|
76383
76780
|
children: [
|
|
76384
76781
|
pickerEntries.map((entry, index) => {
|
|
76385
76782
|
const isSelected = entry.type === selectedPickerEntry?.type;
|
|
76386
76783
|
const segments = getMatchSegments(entry.displayName, widgetPicker.widgetQuery);
|
|
76387
|
-
return /* @__PURE__ */
|
|
76784
|
+
return /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
76388
76785
|
flexDirection: "row",
|
|
76389
76786
|
flexWrap: "nowrap",
|
|
76390
76787
|
children: [
|
|
76391
|
-
/* @__PURE__ */
|
|
76788
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
76392
76789
|
width: 3,
|
|
76393
|
-
children: /* @__PURE__ */
|
|
76790
|
+
children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
76394
76791
|
color: isSelected ? "green" : undefined,
|
|
76395
76792
|
children: isSelected ? "▶ " : " "
|
|
76396
76793
|
}, undefined, false, undefined, this)
|
|
76397
76794
|
}, undefined, false, undefined, this),
|
|
76398
|
-
/* @__PURE__ */
|
|
76795
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
76399
76796
|
color: isSelected ? "green" : undefined,
|
|
76400
76797
|
children: `${index + 1}. `
|
|
76401
76798
|
}, undefined, false, undefined, this),
|
|
76402
|
-
segments.map((seg, i) => /* @__PURE__ */
|
|
76799
|
+
segments.map((seg, i) => /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
76403
76800
|
color: isSelected ? "green" : seg.matched ? "yellowBright" : undefined,
|
|
76404
76801
|
bold: seg.matched,
|
|
76405
76802
|
children: seg.text
|
|
@@ -76407,10 +76804,10 @@ var ItemsEditor = ({ widgets, onUpdate, onBack, lineNumber, settings }) => {
|
|
|
76407
76804
|
]
|
|
76408
76805
|
}, entry.type, true, undefined, this);
|
|
76409
76806
|
}),
|
|
76410
|
-
selectedPickerEntry && /* @__PURE__ */
|
|
76807
|
+
selectedPickerEntry && /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
76411
76808
|
marginTop: 1,
|
|
76412
76809
|
paddingLeft: 2,
|
|
76413
|
-
children: /* @__PURE__ */
|
|
76810
|
+
children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
76414
76811
|
dimColor: true,
|
|
76415
76812
|
children: selectedPickerEntry.description
|
|
76416
76813
|
}, undefined, false, undefined, this)
|
|
@@ -76418,64 +76815,64 @@ var ItemsEditor = ({ widgets, onUpdate, onBack, lineNumber, settings }) => {
|
|
|
76418
76815
|
]
|
|
76419
76816
|
}, undefined, true, undefined, this)
|
|
76420
76817
|
}, undefined, false, undefined, this),
|
|
76421
|
-
!widgetPicker && /* @__PURE__ */
|
|
76818
|
+
!widgetPicker && /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
76422
76819
|
marginTop: 1,
|
|
76423
76820
|
flexDirection: "column",
|
|
76424
|
-
children: widgets.length === 0 ? /* @__PURE__ */
|
|
76821
|
+
children: widgets.length === 0 ? /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
76425
76822
|
dimColor: true,
|
|
76426
76823
|
children: "No widgets. Press 'a' to add one."
|
|
76427
|
-
}, undefined, false, undefined, this) : /* @__PURE__ */
|
|
76824
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(jsx_dev_runtime20.Fragment, {
|
|
76428
76825
|
children: [
|
|
76429
76826
|
widgets.map((widget, index) => {
|
|
76430
76827
|
const isSelected = index === selectedIndex;
|
|
76431
76828
|
const widgetImpl = widget.type !== "separator" && widget.type !== "flex-separator" ? getWidget(widget.type) : null;
|
|
76432
76829
|
const { displayText, modifierText } = widgetImpl?.getEditorDisplay(widget) ?? { displayText: getWidgetDisplay(widget) };
|
|
76433
76830
|
const supportsRawValue = widgetImpl?.supportsRawValue() ?? false;
|
|
76434
|
-
return /* @__PURE__ */
|
|
76831
|
+
return /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
76435
76832
|
flexDirection: "row",
|
|
76436
76833
|
flexWrap: "nowrap",
|
|
76437
76834
|
children: [
|
|
76438
|
-
/* @__PURE__ */
|
|
76835
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
76439
76836
|
width: 3,
|
|
76440
|
-
children: /* @__PURE__ */
|
|
76837
|
+
children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
76441
76838
|
color: isSelected ? moveMode ? "blue" : "green" : undefined,
|
|
76442
76839
|
children: isSelected ? moveMode ? "◆ " : "▶ " : " "
|
|
76443
76840
|
}, undefined, false, undefined, this)
|
|
76444
76841
|
}, undefined, false, undefined, this),
|
|
76445
|
-
/* @__PURE__ */
|
|
76842
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
76446
76843
|
color: isSelected ? moveMode ? "blue" : "green" : undefined,
|
|
76447
76844
|
children: `${index + 1}. ${displayText || getWidgetDisplay(widget)}`
|
|
76448
76845
|
}, undefined, false, undefined, this),
|
|
76449
|
-
modifierText && /* @__PURE__ */
|
|
76846
|
+
modifierText && /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
76450
76847
|
dimColor: true,
|
|
76451
76848
|
children: [
|
|
76452
76849
|
" ",
|
|
76453
76850
|
modifierText
|
|
76454
76851
|
]
|
|
76455
76852
|
}, undefined, true, undefined, this),
|
|
76456
|
-
supportsRawValue && widget.rawValue && /* @__PURE__ */
|
|
76853
|
+
supportsRawValue && widget.rawValue && /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
76457
76854
|
dimColor: true,
|
|
76458
76855
|
children: " (raw value)"
|
|
76459
76856
|
}, undefined, false, undefined, this),
|
|
76460
|
-
widget.merge === true && /* @__PURE__ */
|
|
76857
|
+
widget.merge === true && /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
76461
76858
|
dimColor: true,
|
|
76462
76859
|
children: " (merged→)"
|
|
76463
76860
|
}, undefined, false, undefined, this),
|
|
76464
|
-
widget.merge === "no-padding" && /* @__PURE__ */
|
|
76861
|
+
widget.merge === "no-padding" && /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
76465
76862
|
dimColor: true,
|
|
76466
76863
|
children: " (merged-no-pad→)"
|
|
76467
76864
|
}, undefined, false, undefined, this),
|
|
76468
|
-
widget.excludeFromAutoAlign && settings.powerline.enabled && settings.powerline.autoAlign && !isMergedIntoPreviousWidget(widgets, index) && /* @__PURE__ */
|
|
76865
|
+
widget.excludeFromAutoAlign && settings.powerline.enabled && settings.powerline.autoAlign && !isMergedIntoPreviousWidget(widgets, index) && /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
76469
76866
|
dimColor: true,
|
|
76470
76867
|
children: " (no-align)"
|
|
76471
76868
|
}, undefined, false, undefined, this)
|
|
76472
76869
|
]
|
|
76473
76870
|
}, widget.id, true, undefined, this);
|
|
76474
76871
|
}),
|
|
76475
|
-
currentWidget && /* @__PURE__ */
|
|
76872
|
+
currentWidget && /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
76476
76873
|
marginTop: 1,
|
|
76477
76874
|
paddingLeft: 2,
|
|
76478
|
-
children: /* @__PURE__ */
|
|
76875
|
+
children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
76479
76876
|
dimColor: true,
|
|
76480
76877
|
children: (() => {
|
|
76481
76878
|
if (currentWidget.type === "separator") {
|
|
@@ -76498,8 +76895,8 @@ var ItemsEditor = ({ widgets, onUpdate, onBack, lineNumber, settings }) => {
|
|
|
76498
76895
|
// src/tui/components/LineSelector.tsx
|
|
76499
76896
|
await init_build2();
|
|
76500
76897
|
var import_pluralize = __toESM(require_pluralize(), 1);
|
|
76501
|
-
var
|
|
76502
|
-
var
|
|
76898
|
+
var import_react48 = __toESM(require_react(), 1);
|
|
76899
|
+
var jsx_dev_runtime21 = __toESM(require_jsx_dev_runtime(), 1);
|
|
76503
76900
|
var LineSelector = ({
|
|
76504
76901
|
lines,
|
|
76505
76902
|
onSelect,
|
|
@@ -76511,17 +76908,17 @@ var LineSelector = ({
|
|
|
76511
76908
|
settings,
|
|
76512
76909
|
allowEditing = false
|
|
76513
76910
|
}) => {
|
|
76514
|
-
const [selectedIndex, setSelectedIndex] =
|
|
76515
|
-
const [showDeleteDialog, setShowDeleteDialog] =
|
|
76516
|
-
const [moveMode, setMoveMode] =
|
|
76517
|
-
const [localLines, setLocalLines] =
|
|
76518
|
-
|
|
76911
|
+
const [selectedIndex, setSelectedIndex] = import_react48.useState(initialSelection);
|
|
76912
|
+
const [showDeleteDialog, setShowDeleteDialog] = import_react48.useState(false);
|
|
76913
|
+
const [moveMode, setMoveMode] = import_react48.useState(false);
|
|
76914
|
+
const [localLines, setLocalLines] = import_react48.useState(lines);
|
|
76915
|
+
import_react48.useEffect(() => {
|
|
76519
76916
|
setLocalLines(lines);
|
|
76520
76917
|
}, [lines]);
|
|
76521
|
-
|
|
76918
|
+
import_react48.useEffect(() => {
|
|
76522
76919
|
setSelectedIndex(initialSelection);
|
|
76523
76920
|
}, [initialSelection]);
|
|
76524
|
-
const selectedLine =
|
|
76921
|
+
const selectedLine = import_react48.useMemo(() => localLines[selectedIndex], [localLines, selectedIndex]);
|
|
76525
76922
|
const appendLine = () => {
|
|
76526
76923
|
const newLines = [...localLines, []];
|
|
76527
76924
|
setLocalLines(newLines);
|
|
@@ -76598,16 +76995,16 @@ var LineSelector = ({
|
|
|
76598
76995
|
}
|
|
76599
76996
|
});
|
|
76600
76997
|
if (isThemeManaged) {
|
|
76601
|
-
return /* @__PURE__ */
|
|
76998
|
+
return /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
76602
76999
|
flexDirection: "column",
|
|
76603
77000
|
children: [
|
|
76604
|
-
/* @__PURE__ */
|
|
77001
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
76605
77002
|
bold: true,
|
|
76606
77003
|
children: title ?? "Select Line"
|
|
76607
77004
|
}, undefined, false, undefined, this),
|
|
76608
|
-
/* @__PURE__ */
|
|
77005
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
76609
77006
|
marginTop: 1,
|
|
76610
|
-
children: /* @__PURE__ */
|
|
77007
|
+
children: /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
76611
77008
|
color: "yellow",
|
|
76612
77009
|
children: [
|
|
76613
77010
|
"⚠ Colors are currently managed by the Powerline theme:",
|
|
@@ -76615,30 +77012,30 @@ var LineSelector = ({
|
|
|
76615
77012
|
]
|
|
76616
77013
|
}, undefined, true, undefined, this)
|
|
76617
77014
|
}, undefined, false, undefined, this),
|
|
76618
|
-
/* @__PURE__ */
|
|
77015
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
76619
77016
|
marginTop: 1,
|
|
76620
|
-
children: /* @__PURE__ */
|
|
77017
|
+
children: /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
76621
77018
|
dimColor: true,
|
|
76622
77019
|
children: "To customize colors, either:"
|
|
76623
77020
|
}, undefined, false, undefined, this)
|
|
76624
77021
|
}, undefined, false, undefined, this),
|
|
76625
|
-
/* @__PURE__ */
|
|
77022
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
76626
77023
|
marginLeft: 2,
|
|
76627
|
-
children: /* @__PURE__ */
|
|
77024
|
+
children: /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
76628
77025
|
dimColor: true,
|
|
76629
77026
|
children: "• Change to 'Custom' theme in Powerline Configuration → Themes"
|
|
76630
77027
|
}, undefined, false, undefined, this)
|
|
76631
77028
|
}, undefined, false, undefined, this),
|
|
76632
|
-
/* @__PURE__ */
|
|
77029
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
76633
77030
|
marginLeft: 2,
|
|
76634
|
-
children: /* @__PURE__ */
|
|
77031
|
+
children: /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
76635
77032
|
dimColor: true,
|
|
76636
77033
|
children: "• Disable Powerline mode in Powerline Configuration"
|
|
76637
77034
|
}, undefined, false, undefined, this)
|
|
76638
77035
|
}, undefined, false, undefined, this),
|
|
76639
|
-
/* @__PURE__ */
|
|
77036
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
76640
77037
|
marginTop: 2,
|
|
76641
|
-
children: /* @__PURE__ */
|
|
77038
|
+
children: /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
76642
77039
|
children: "Press any key to go back..."
|
|
76643
77040
|
}, undefined, false, undefined, this)
|
|
76644
77041
|
}, undefined, false, undefined, this)
|
|
@@ -76647,25 +77044,25 @@ var LineSelector = ({
|
|
|
76647
77044
|
}
|
|
76648
77045
|
if (showDeleteDialog && selectedLine) {
|
|
76649
77046
|
const suffix = selectedLine.length > 0 ? import_pluralize.default("widget", selectedLine.length, true) : "empty";
|
|
76650
|
-
return /* @__PURE__ */
|
|
77047
|
+
return /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
76651
77048
|
flexDirection: "column",
|
|
76652
77049
|
children: [
|
|
76653
|
-
/* @__PURE__ */
|
|
77050
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
76654
77051
|
flexDirection: "column",
|
|
76655
77052
|
gap: 1,
|
|
76656
77053
|
children: [
|
|
76657
|
-
/* @__PURE__ */
|
|
77054
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
76658
77055
|
bold: true,
|
|
76659
|
-
children: /* @__PURE__ */
|
|
77056
|
+
children: /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
76660
77057
|
children: [
|
|
76661
|
-
/* @__PURE__ */
|
|
77058
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
76662
77059
|
children: [
|
|
76663
77060
|
"☰ Line",
|
|
76664
77061
|
selectedIndex + 1
|
|
76665
77062
|
]
|
|
76666
77063
|
}, undefined, true, undefined, this),
|
|
76667
77064
|
" ",
|
|
76668
|
-
/* @__PURE__ */
|
|
77065
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
76669
77066
|
dimColor: true,
|
|
76670
77067
|
children: [
|
|
76671
77068
|
"(",
|
|
@@ -76676,15 +77073,15 @@ var LineSelector = ({
|
|
|
76676
77073
|
]
|
|
76677
77074
|
}, undefined, true, undefined, this)
|
|
76678
77075
|
}, undefined, false, undefined, this),
|
|
76679
|
-
/* @__PURE__ */
|
|
77076
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
76680
77077
|
bold: true,
|
|
76681
77078
|
children: "Are you sure you want to delete line?"
|
|
76682
77079
|
}, undefined, false, undefined, this)
|
|
76683
77080
|
]
|
|
76684
77081
|
}, undefined, true, undefined, this),
|
|
76685
|
-
/* @__PURE__ */
|
|
77082
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
76686
77083
|
marginTop: 1,
|
|
76687
|
-
children: /* @__PURE__ */
|
|
77084
|
+
children: /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(ConfirmDialog, {
|
|
76688
77085
|
inline: true,
|
|
76689
77086
|
onConfirm: () => {
|
|
76690
77087
|
deleteLine(selectedIndex);
|
|
@@ -76704,52 +77101,52 @@ var LineSelector = ({
|
|
|
76704
77101
|
sublabel: `(${line.length > 0 ? import_pluralize.default("widget", line.length, true) : "empty"})`,
|
|
76705
77102
|
value: index
|
|
76706
77103
|
}));
|
|
76707
|
-
return /* @__PURE__ */
|
|
76708
|
-
children: /* @__PURE__ */
|
|
77104
|
+
return /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(jsx_dev_runtime21.Fragment, {
|
|
77105
|
+
children: /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
76709
77106
|
flexDirection: "column",
|
|
76710
77107
|
children: [
|
|
76711
|
-
/* @__PURE__ */
|
|
77108
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
76712
77109
|
children: [
|
|
76713
|
-
/* @__PURE__ */
|
|
77110
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
76714
77111
|
bold: true,
|
|
76715
77112
|
children: [
|
|
76716
77113
|
title ?? "Select Line to Edit",
|
|
76717
77114
|
" "
|
|
76718
77115
|
]
|
|
76719
77116
|
}, undefined, true, undefined, this),
|
|
76720
|
-
moveMode && /* @__PURE__ */
|
|
77117
|
+
moveMode && /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
76721
77118
|
color: "blue",
|
|
76722
77119
|
children: "[MOVE MODE]"
|
|
76723
77120
|
}, undefined, false, undefined, this)
|
|
76724
77121
|
]
|
|
76725
77122
|
}, undefined, true, undefined, this),
|
|
76726
|
-
/* @__PURE__ */
|
|
77123
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
76727
77124
|
dimColor: true,
|
|
76728
77125
|
children: "Choose which status line to configure"
|
|
76729
77126
|
}, undefined, false, undefined, this),
|
|
76730
|
-
moveMode ? /* @__PURE__ */
|
|
77127
|
+
moveMode ? /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
76731
77128
|
dimColor: true,
|
|
76732
77129
|
children: "↑↓ to move line, ESC or Enter to exit move mode"
|
|
76733
|
-
}, undefined, false, undefined, this) : /* @__PURE__ */
|
|
77130
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
76734
77131
|
dimColor: true,
|
|
76735
77132
|
children: allowEditing ? localLines.length > 1 ? "(a) to append new line, (d) to delete line, (m) to move line, ESC to go back" : "(a) to append new line, ESC to go back" : "ESC to go back"
|
|
76736
77133
|
}, undefined, false, undefined, this),
|
|
76737
|
-
moveMode ? /* @__PURE__ */
|
|
77134
|
+
moveMode ? /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
76738
77135
|
marginTop: 1,
|
|
76739
77136
|
flexDirection: "column",
|
|
76740
77137
|
children: localLines.map((line, index) => {
|
|
76741
77138
|
const isSelected = selectedIndex === index;
|
|
76742
77139
|
const suffix = line.length ? import_pluralize.default("widget", line.length, true) : "empty";
|
|
76743
|
-
return /* @__PURE__ */
|
|
76744
|
-
children: /* @__PURE__ */
|
|
77140
|
+
return /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
77141
|
+
children: /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
76745
77142
|
color: isSelected ? "blue" : undefined,
|
|
76746
77143
|
children: [
|
|
76747
|
-
/* @__PURE__ */
|
|
77144
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
76748
77145
|
children: isSelected ? "◆ " : " "
|
|
76749
77146
|
}, undefined, false, undefined, this),
|
|
76750
|
-
/* @__PURE__ */
|
|
77147
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
76751
77148
|
children: [
|
|
76752
|
-
/* @__PURE__ */
|
|
77149
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
76753
77150
|
children: [
|
|
76754
77151
|
"☰ Line",
|
|
76755
77152
|
" ",
|
|
@@ -76757,7 +77154,7 @@ var LineSelector = ({
|
|
|
76757
77154
|
]
|
|
76758
77155
|
}, undefined, true, undefined, this),
|
|
76759
77156
|
" ",
|
|
76760
|
-
/* @__PURE__ */
|
|
77157
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
76761
77158
|
dimColor: !isSelected,
|
|
76762
77159
|
children: [
|
|
76763
77160
|
"(",
|
|
@@ -76771,7 +77168,7 @@ var LineSelector = ({
|
|
|
76771
77168
|
}, undefined, true, undefined, this)
|
|
76772
77169
|
}, index, false, undefined, this);
|
|
76773
77170
|
})
|
|
76774
|
-
}, undefined, false, undefined, this) : /* @__PURE__ */
|
|
77171
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(List, {
|
|
76775
77172
|
marginTop: 1,
|
|
76776
77173
|
items: lineItems,
|
|
76777
77174
|
onSelect: (line) => {
|
|
@@ -76793,7 +77190,7 @@ var LineSelector = ({
|
|
|
76793
77190
|
};
|
|
76794
77191
|
// src/tui/components/MainMenu.tsx
|
|
76795
77192
|
await init_build2();
|
|
76796
|
-
var
|
|
77193
|
+
var jsx_dev_runtime22 = __toESM(require_jsx_dev_runtime(), 1);
|
|
76797
77194
|
function usesManageInstallation(installation) {
|
|
76798
77195
|
return installation?.method === "pinned" || installation?.method === "self-managed";
|
|
76799
77196
|
}
|
|
@@ -76854,6 +77251,17 @@ function buildMainMenuItems(isClaudeInstalled, hasChanges, installation) {
|
|
|
76854
77251
|
description: "Configure Claude Code status line settings like refresh interval"
|
|
76855
77252
|
},
|
|
76856
77253
|
"-",
|
|
77254
|
+
{
|
|
77255
|
+
label: "\uD83D\uDCE4 Export Config",
|
|
77256
|
+
value: "exportConfig",
|
|
77257
|
+
description: "Save your current configuration to a JSON file for backup or sharing"
|
|
77258
|
+
},
|
|
77259
|
+
{
|
|
77260
|
+
label: "\uD83D\uDCE5 Import Config",
|
|
77261
|
+
value: "importConfig",
|
|
77262
|
+
description: "Load configuration from a previously exported JSON file"
|
|
77263
|
+
},
|
|
77264
|
+
"-",
|
|
76857
77265
|
getInstallationMenuItem(isClaudeInstalled, installation)
|
|
76858
77266
|
];
|
|
76859
77267
|
if (hasChanges) {
|
|
@@ -76914,21 +77322,21 @@ var MainMenu = ({
|
|
|
76914
77322
|
}) => {
|
|
76915
77323
|
const menuItems = buildMainMenuItems(isClaudeInstalled, hasChanges, installation);
|
|
76916
77324
|
const showTruncationWarning = previewIsTruncated && settings?.flexMode === "full-minus-40";
|
|
76917
|
-
return /* @__PURE__ */
|
|
77325
|
+
return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
|
|
76918
77326
|
flexDirection: "column",
|
|
76919
77327
|
children: [
|
|
76920
|
-
showTruncationWarning && /* @__PURE__ */
|
|
77328
|
+
showTruncationWarning && /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
|
|
76921
77329
|
marginBottom: 1,
|
|
76922
|
-
children: /* @__PURE__ */
|
|
77330
|
+
children: /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
|
|
76923
77331
|
color: "yellow",
|
|
76924
77332
|
children: "⚠ Some lines are truncated, see Terminal Options → Terminal Width for info"
|
|
76925
77333
|
}, undefined, false, undefined, this)
|
|
76926
77334
|
}, undefined, false, undefined, this),
|
|
76927
|
-
/* @__PURE__ */
|
|
77335
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
|
|
76928
77336
|
bold: true,
|
|
76929
77337
|
children: "Main Menu"
|
|
76930
77338
|
}, undefined, false, undefined, this),
|
|
76931
|
-
/* @__PURE__ */
|
|
77339
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(List, {
|
|
76932
77340
|
items: menuItems,
|
|
76933
77341
|
marginTop: 1,
|
|
76934
77342
|
onSelect: (value, index) => {
|
|
@@ -76944,7 +77352,7 @@ var MainMenu = ({
|
|
|
76944
77352
|
};
|
|
76945
77353
|
// src/tui/components/ManageInstallationMenu.tsx
|
|
76946
77354
|
await init_build2();
|
|
76947
|
-
var
|
|
77355
|
+
var jsx_dev_runtime23 = __toESM(require_jsx_dev_runtime(), 1);
|
|
76948
77356
|
function getInstallationLabel(installation) {
|
|
76949
77357
|
if (installation.method === "pinned") {
|
|
76950
77358
|
const version2 = installation.installedVersion ? ` ${installation.installedVersion}` : "";
|
|
@@ -77023,16 +77431,16 @@ var ManageInstallationMenu = ({
|
|
|
77023
77431
|
onBack();
|
|
77024
77432
|
}
|
|
77025
77433
|
});
|
|
77026
|
-
return /* @__PURE__ */
|
|
77434
|
+
return /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Box_default, {
|
|
77027
77435
|
flexDirection: "column",
|
|
77028
77436
|
children: [
|
|
77029
|
-
/* @__PURE__ */
|
|
77437
|
+
/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
|
|
77030
77438
|
bold: true,
|
|
77031
77439
|
children: "Manage Installation"
|
|
77032
77440
|
}, undefined, false, undefined, this),
|
|
77033
|
-
/* @__PURE__ */
|
|
77441
|
+
/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Box_default, {
|
|
77034
77442
|
marginTop: 1,
|
|
77035
|
-
children: /* @__PURE__ */
|
|
77443
|
+
children: /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
|
|
77036
77444
|
children: [
|
|
77037
77445
|
"Current:",
|
|
77038
77446
|
" ",
|
|
@@ -77040,21 +77448,21 @@ var ManageInstallationMenu = ({
|
|
|
77040
77448
|
]
|
|
77041
77449
|
}, undefined, true, undefined, this)
|
|
77042
77450
|
}, undefined, false, undefined, this),
|
|
77043
|
-
activeCommandLabel && /* @__PURE__ */
|
|
77044
|
-
children: /* @__PURE__ */
|
|
77451
|
+
activeCommandLabel && /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Box_default, {
|
|
77452
|
+
children: /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
|
|
77045
77453
|
dimColor: true,
|
|
77046
77454
|
children: activeCommandLabel
|
|
77047
77455
|
}, undefined, false, undefined, this)
|
|
77048
77456
|
}, undefined, false, undefined, this),
|
|
77049
|
-
activeCommand?.warning && /* @__PURE__ */
|
|
77457
|
+
activeCommand?.warning && /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Box_default, {
|
|
77050
77458
|
marginTop: 1,
|
|
77051
|
-
children: /* @__PURE__ */
|
|
77459
|
+
children: /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
|
|
77052
77460
|
color: "yellow",
|
|
77053
77461
|
wrap: "wrap",
|
|
77054
77462
|
children: activeCommand.warning
|
|
77055
77463
|
}, undefined, false, undefined, this)
|
|
77056
77464
|
}, undefined, false, undefined, this),
|
|
77057
|
-
/* @__PURE__ */
|
|
77465
|
+
/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(List, {
|
|
77058
77466
|
marginTop: 1,
|
|
77059
77467
|
items: buildManageInstallationItems(),
|
|
77060
77468
|
onSelect: (value) => {
|
|
@@ -77081,28 +77489,28 @@ var UninstallMenu = ({
|
|
|
77081
77489
|
onBack();
|
|
77082
77490
|
}
|
|
77083
77491
|
});
|
|
77084
|
-
return /* @__PURE__ */
|
|
77492
|
+
return /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Box_default, {
|
|
77085
77493
|
flexDirection: "column",
|
|
77086
77494
|
children: [
|
|
77087
|
-
/* @__PURE__ */
|
|
77495
|
+
/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
|
|
77088
77496
|
bold: true,
|
|
77089
77497
|
children: "Uninstall ccstatusline"
|
|
77090
77498
|
}, undefined, false, undefined, this),
|
|
77091
|
-
/* @__PURE__ */
|
|
77499
|
+
/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Box_default, {
|
|
77092
77500
|
marginTop: 1,
|
|
77093
|
-
children: /* @__PURE__ */
|
|
77501
|
+
children: /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
|
|
77094
77502
|
dimColor: true,
|
|
77095
77503
|
children: "Choose what to remove from this machine."
|
|
77096
77504
|
}, undefined, false, undefined, this)
|
|
77097
77505
|
}, undefined, false, undefined, this),
|
|
77098
|
-
detectedManagers.length === 0 && /* @__PURE__ */
|
|
77506
|
+
detectedManagers.length === 0 && /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Box_default, {
|
|
77099
77507
|
marginTop: 1,
|
|
77100
|
-
children: /* @__PURE__ */
|
|
77508
|
+
children: /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
|
|
77101
77509
|
dimColor: true,
|
|
77102
77510
|
children: "No global npm or bun ccstatusline package was detected."
|
|
77103
77511
|
}, undefined, false, undefined, this)
|
|
77104
77512
|
}, undefined, false, undefined, this),
|
|
77105
|
-
/* @__PURE__ */
|
|
77513
|
+
/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(List, {
|
|
77106
77514
|
marginTop: 1,
|
|
77107
77515
|
items,
|
|
77108
77516
|
onSelect: (value) => {
|
|
@@ -77119,8 +77527,8 @@ var UninstallMenu = ({
|
|
|
77119
77527
|
};
|
|
77120
77528
|
// src/tui/components/PowerlineSetup.tsx
|
|
77121
77529
|
await init_build2();
|
|
77122
|
-
var
|
|
77123
|
-
import * as
|
|
77530
|
+
var import_react51 = __toESM(require_react(), 1);
|
|
77531
|
+
import * as os14 from "os";
|
|
77124
77532
|
|
|
77125
77533
|
// src/utils/powerline-settings.ts
|
|
77126
77534
|
init_colors();
|
|
@@ -77150,8 +77558,8 @@ function buildEnabledPowerlineSettings(settings, removeManualSeparators) {
|
|
|
77150
77558
|
// src/tui/components/PowerlineSeparatorEditor.tsx
|
|
77151
77559
|
init_input_guards();
|
|
77152
77560
|
await init_build2();
|
|
77153
|
-
var
|
|
77154
|
-
var
|
|
77561
|
+
var import_react49 = __toESM(require_react(), 1);
|
|
77562
|
+
var jsx_dev_runtime24 = __toESM(require_jsx_dev_runtime(), 1);
|
|
77155
77563
|
var PowerlineSeparatorEditor = ({
|
|
77156
77564
|
settings,
|
|
77157
77565
|
mode,
|
|
@@ -77171,10 +77579,10 @@ var PowerlineSeparatorEditor = ({
|
|
|
77171
77579
|
};
|
|
77172
77580
|
const separators = getItems();
|
|
77173
77581
|
const invertBgs = mode === "separator" ? powerlineConfig.separatorInvertBackground : [];
|
|
77174
|
-
const [selectedIndex, setSelectedIndex] =
|
|
77175
|
-
const [hexInputMode, setHexInputMode] =
|
|
77176
|
-
const [hexInput, setHexInput] =
|
|
77177
|
-
const [cursorPos, setCursorPos] =
|
|
77582
|
+
const [selectedIndex, setSelectedIndex] = import_react49.useState(0);
|
|
77583
|
+
const [hexInputMode, setHexInputMode] = import_react49.useState(false);
|
|
77584
|
+
const [hexInput, setHexInput] = import_react49.useState("");
|
|
77585
|
+
const [cursorPos, setCursorPos] = import_react49.useState(0);
|
|
77178
77586
|
const getPresets = () => {
|
|
77179
77587
|
if (mode === "separator") {
|
|
77180
77588
|
return [
|
|
@@ -77366,18 +77774,18 @@ var PowerlineSeparatorEditor = ({
|
|
|
77366
77774
|
}
|
|
77367
77775
|
};
|
|
77368
77776
|
const canDelete = mode !== "separator" || separators.length > 1;
|
|
77369
|
-
return /* @__PURE__ */
|
|
77777
|
+
return /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Box_default, {
|
|
77370
77778
|
flexDirection: "column",
|
|
77371
77779
|
children: [
|
|
77372
|
-
/* @__PURE__ */
|
|
77780
|
+
/* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
|
|
77373
77781
|
bold: true,
|
|
77374
77782
|
children: getTitle()
|
|
77375
77783
|
}, undefined, false, undefined, this),
|
|
77376
|
-
hexInputMode ? /* @__PURE__ */
|
|
77784
|
+
hexInputMode ? /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Box_default, {
|
|
77377
77785
|
marginTop: 2,
|
|
77378
77786
|
flexDirection: "column",
|
|
77379
77787
|
children: [
|
|
77380
|
-
/* @__PURE__ */
|
|
77788
|
+
/* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
|
|
77381
77789
|
children: [
|
|
77382
77790
|
"Enter hex code (4-6 digits) for",
|
|
77383
77791
|
" ",
|
|
@@ -77386,51 +77794,51 @@ var PowerlineSeparatorEditor = ({
|
|
|
77386
77794
|
":"
|
|
77387
77795
|
]
|
|
77388
77796
|
}, undefined, true, undefined, this),
|
|
77389
|
-
/* @__PURE__ */
|
|
77797
|
+
/* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
|
|
77390
77798
|
children: [
|
|
77391
77799
|
"U+",
|
|
77392
77800
|
hexInput.slice(0, cursorPos),
|
|
77393
|
-
/* @__PURE__ */
|
|
77801
|
+
/* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
|
|
77394
77802
|
backgroundColor: "gray",
|
|
77395
77803
|
color: "black",
|
|
77396
77804
|
children: hexInput[cursorPos] ?? "_"
|
|
77397
77805
|
}, undefined, false, undefined, this),
|
|
77398
77806
|
hexInput.slice(cursorPos + 1),
|
|
77399
|
-
hexInput.length < 6 && hexInput.length === cursorPos && /* @__PURE__ */
|
|
77807
|
+
hexInput.length < 6 && hexInput.length === cursorPos && /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
|
|
77400
77808
|
dimColor: true,
|
|
77401
77809
|
children: "_".repeat(6 - hexInput.length - 1)
|
|
77402
77810
|
}, undefined, false, undefined, this)
|
|
77403
77811
|
]
|
|
77404
77812
|
}, undefined, true, undefined, this),
|
|
77405
|
-
/* @__PURE__ */
|
|
77813
|
+
/* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
|
|
77406
77814
|
dimColor: true,
|
|
77407
77815
|
children: "Enter 4-6 hex digits (0-9, A-F) for a Unicode code point, then press Enter. ESC to cancel."
|
|
77408
77816
|
}, undefined, false, undefined, this),
|
|
77409
|
-
/* @__PURE__ */
|
|
77817
|
+
/* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
|
|
77410
77818
|
dimColor: true,
|
|
77411
77819
|
children: "Examples: E0B0 (powerline), 1F984 (\uD83E\uDD84), 2764 (❤)"
|
|
77412
77820
|
}, undefined, false, undefined, this)
|
|
77413
77821
|
]
|
|
77414
|
-
}, undefined, true, undefined, this) : /* @__PURE__ */
|
|
77822
|
+
}, undefined, true, undefined, this) : /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(jsx_dev_runtime24.Fragment, {
|
|
77415
77823
|
children: [
|
|
77416
|
-
/* @__PURE__ */
|
|
77417
|
-
children: /* @__PURE__ */
|
|
77824
|
+
/* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Box_default, {
|
|
77825
|
+
children: /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
|
|
77418
77826
|
dimColor: true,
|
|
77419
77827
|
children: `↑↓ select, ← → cycle, (a)dd, (i)nsert${canDelete ? ", (d)elete" : ""}, (c)lear, (h)ex${mode === "separator" ? ", (t)oggle invert" : ""}, ESC back`
|
|
77420
77828
|
}, undefined, false, undefined, this)
|
|
77421
77829
|
}, undefined, false, undefined, this),
|
|
77422
|
-
/* @__PURE__ */
|
|
77830
|
+
/* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Box_default, {
|
|
77423
77831
|
marginTop: 2,
|
|
77424
77832
|
flexDirection: "column",
|
|
77425
|
-
children: separators.length > 0 ? separators.map((sep2, index) => /* @__PURE__ */
|
|
77426
|
-
children: /* @__PURE__ */
|
|
77833
|
+
children: separators.length > 0 ? separators.map((sep2, index) => /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Box_default, {
|
|
77834
|
+
children: /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
|
|
77427
77835
|
color: index === selectedIndex ? "green" : undefined,
|
|
77428
77836
|
children: [
|
|
77429
77837
|
index === selectedIndex ? "▶ " : " ",
|
|
77430
77838
|
`${index + 1}: ${getSeparatorDisplay(sep2, index)}`
|
|
77431
77839
|
]
|
|
77432
77840
|
}, undefined, true, undefined, this)
|
|
77433
|
-
}, index, false, undefined, this)) : /* @__PURE__ */
|
|
77841
|
+
}, index, false, undefined, this)) : /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
|
|
77434
77842
|
dimColor: true,
|
|
77435
77843
|
children: "(none configured - press 'a' to add)"
|
|
77436
77844
|
}, undefined, false, undefined, this)
|
|
@@ -77445,8 +77853,8 @@ var PowerlineSeparatorEditor = ({
|
|
|
77445
77853
|
init_ColorLevel();
|
|
77446
77854
|
init_colors();
|
|
77447
77855
|
await init_build2();
|
|
77448
|
-
var
|
|
77449
|
-
var
|
|
77856
|
+
var import_react50 = __toESM(require_react(), 1);
|
|
77857
|
+
var jsx_dev_runtime25 = __toESM(require_jsx_dev_runtime(), 1);
|
|
77450
77858
|
function buildPowerlineThemeItems(themes, originalTheme) {
|
|
77451
77859
|
return themes.map((themeName) => {
|
|
77452
77860
|
const theme = getPowerlineTheme(themeName);
|
|
@@ -77499,20 +77907,20 @@ var PowerlineThemeSelector = ({
|
|
|
77499
77907
|
onUpdate,
|
|
77500
77908
|
onBack
|
|
77501
77909
|
}) => {
|
|
77502
|
-
const themes =
|
|
77910
|
+
const themes = import_react50.useMemo(() => getPowerlineThemes(), []);
|
|
77503
77911
|
const currentTheme = settings.powerline.theme ?? "custom";
|
|
77504
|
-
const [selectedIndex, setSelectedIndex] =
|
|
77505
|
-
const [showCustomizeConfirm, setShowCustomizeConfirm] =
|
|
77506
|
-
const originalThemeRef =
|
|
77507
|
-
const originalSettingsRef =
|
|
77508
|
-
const latestSettingsRef =
|
|
77509
|
-
const latestOnUpdateRef =
|
|
77510
|
-
const didHandleInitialSelectionRef =
|
|
77511
|
-
|
|
77912
|
+
const [selectedIndex, setSelectedIndex] = import_react50.useState(Math.max(0, themes.indexOf(currentTheme)));
|
|
77913
|
+
const [showCustomizeConfirm, setShowCustomizeConfirm] = import_react50.useState(false);
|
|
77914
|
+
const originalThemeRef = import_react50.useRef(currentTheme);
|
|
77915
|
+
const originalSettingsRef = import_react50.useRef(settings);
|
|
77916
|
+
const latestSettingsRef = import_react50.useRef(settings);
|
|
77917
|
+
const latestOnUpdateRef = import_react50.useRef(onUpdate);
|
|
77918
|
+
const didHandleInitialSelectionRef = import_react50.useRef(false);
|
|
77919
|
+
import_react50.useEffect(() => {
|
|
77512
77920
|
latestSettingsRef.current = settings;
|
|
77513
77921
|
latestOnUpdateRef.current = onUpdate;
|
|
77514
77922
|
}, [settings, onUpdate]);
|
|
77515
|
-
|
|
77923
|
+
import_react50.useEffect(() => {
|
|
77516
77924
|
const themeName = themes[selectedIndex];
|
|
77517
77925
|
if (!themeName) {
|
|
77518
77926
|
return;
|
|
@@ -77544,41 +77952,41 @@ var PowerlineThemeSelector = ({
|
|
|
77544
77952
|
}
|
|
77545
77953
|
});
|
|
77546
77954
|
const selectedThemeName = themes[selectedIndex];
|
|
77547
|
-
const themeItems =
|
|
77955
|
+
const themeItems = import_react50.useMemo(() => buildPowerlineThemeItems(themes, originalThemeRef.current), [themes]);
|
|
77548
77956
|
if (showCustomizeConfirm) {
|
|
77549
|
-
return /* @__PURE__ */
|
|
77957
|
+
return /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Box_default, {
|
|
77550
77958
|
flexDirection: "column",
|
|
77551
77959
|
children: [
|
|
77552
|
-
/* @__PURE__ */
|
|
77960
|
+
/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
|
|
77553
77961
|
bold: true,
|
|
77554
77962
|
color: "yellow",
|
|
77555
77963
|
children: "⚠ Confirm Customization"
|
|
77556
77964
|
}, undefined, false, undefined, this),
|
|
77557
|
-
/* @__PURE__ */
|
|
77965
|
+
/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Box_default, {
|
|
77558
77966
|
marginTop: 1,
|
|
77559
77967
|
flexDirection: "column",
|
|
77560
77968
|
children: [
|
|
77561
|
-
/* @__PURE__ */
|
|
77969
|
+
/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
|
|
77562
77970
|
children: "This will copy the current theme colors to your widgets"
|
|
77563
77971
|
}, undefined, false, undefined, this),
|
|
77564
|
-
/* @__PURE__ */
|
|
77972
|
+
/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
|
|
77565
77973
|
children: "and switch to Custom theme mode."
|
|
77566
77974
|
}, undefined, false, undefined, this),
|
|
77567
|
-
/* @__PURE__ */
|
|
77975
|
+
/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
|
|
77568
77976
|
color: "red",
|
|
77569
77977
|
children: "This will overwrite any existing custom colors!"
|
|
77570
77978
|
}, undefined, false, undefined, this)
|
|
77571
77979
|
]
|
|
77572
77980
|
}, undefined, true, undefined, this),
|
|
77573
|
-
/* @__PURE__ */
|
|
77981
|
+
/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Box_default, {
|
|
77574
77982
|
marginTop: 2,
|
|
77575
|
-
children: /* @__PURE__ */
|
|
77983
|
+
children: /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
|
|
77576
77984
|
children: "Continue?"
|
|
77577
77985
|
}, undefined, false, undefined, this)
|
|
77578
77986
|
}, undefined, false, undefined, this),
|
|
77579
|
-
/* @__PURE__ */
|
|
77987
|
+
/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Box_default, {
|
|
77580
77988
|
marginTop: 1,
|
|
77581
|
-
children: /* @__PURE__ */
|
|
77989
|
+
children: /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(ConfirmDialog, {
|
|
77582
77990
|
inline: true,
|
|
77583
77991
|
onConfirm: () => {
|
|
77584
77992
|
if (selectedThemeName) {
|
|
@@ -77598,26 +78006,26 @@ var PowerlineThemeSelector = ({
|
|
|
77598
78006
|
]
|
|
77599
78007
|
}, undefined, true, undefined, this);
|
|
77600
78008
|
}
|
|
77601
|
-
return /* @__PURE__ */
|
|
78009
|
+
return /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Box_default, {
|
|
77602
78010
|
flexDirection: "column",
|
|
77603
78011
|
children: [
|
|
77604
|
-
/* @__PURE__ */
|
|
78012
|
+
/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
|
|
77605
78013
|
bold: true,
|
|
77606
78014
|
children: [
|
|
77607
78015
|
`Powerline Theme Selection | `,
|
|
77608
|
-
/* @__PURE__ */
|
|
78016
|
+
/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
|
|
77609
78017
|
dimColor: true,
|
|
77610
78018
|
children: `Original: ${originalThemeRef.current}`
|
|
77611
78019
|
}, undefined, false, undefined, this)
|
|
77612
78020
|
]
|
|
77613
78021
|
}, undefined, true, undefined, this),
|
|
77614
|
-
/* @__PURE__ */
|
|
77615
|
-
children: /* @__PURE__ */
|
|
78022
|
+
/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Box_default, {
|
|
78023
|
+
children: /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
|
|
77616
78024
|
dimColor: true,
|
|
77617
78025
|
children: `↑↓ navigate, Enter apply${selectedThemeName && selectedThemeName !== "custom" ? ", (c)ustomize theme" : ""}, ESC cancel`
|
|
77618
78026
|
}, undefined, false, undefined, this)
|
|
77619
78027
|
}, undefined, false, undefined, this),
|
|
77620
|
-
/* @__PURE__ */
|
|
78028
|
+
/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(List, {
|
|
77621
78029
|
marginTop: 1,
|
|
77622
78030
|
items: themeItems,
|
|
77623
78031
|
onSelect: () => {
|
|
@@ -77631,16 +78039,16 @@ var PowerlineThemeSelector = ({
|
|
|
77631
78039
|
},
|
|
77632
78040
|
initialSelection: selectedIndex
|
|
77633
78041
|
}, undefined, false, undefined, this),
|
|
77634
|
-
selectedThemeName && selectedThemeName !== "custom" && /* @__PURE__ */
|
|
78042
|
+
selectedThemeName && selectedThemeName !== "custom" && /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Box_default, {
|
|
77635
78043
|
marginTop: 1,
|
|
77636
|
-
children: /* @__PURE__ */
|
|
78044
|
+
children: /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
|
|
77637
78045
|
dimColor: true,
|
|
77638
78046
|
children: "Press (c) to customize this theme - copies colors to widgets"
|
|
77639
78047
|
}, undefined, false, undefined, this)
|
|
77640
78048
|
}, undefined, false, undefined, this),
|
|
77641
|
-
settings.colorLevel === 1 && /* @__PURE__ */
|
|
78049
|
+
settings.colorLevel === 1 && /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Box_default, {
|
|
77642
78050
|
marginTop: 1,
|
|
77643
|
-
children: /* @__PURE__ */
|
|
78051
|
+
children: /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
|
|
77644
78052
|
color: "yellow",
|
|
77645
78053
|
children: "⚠ 16 color mode themes have a very limited palette, we recommend switching color level in Terminal Options"
|
|
77646
78054
|
}, undefined, false, undefined, this)
|
|
@@ -77650,7 +78058,7 @@ var PowerlineThemeSelector = ({
|
|
|
77650
78058
|
};
|
|
77651
78059
|
|
|
77652
78060
|
// src/tui/components/PowerlineSetup.tsx
|
|
77653
|
-
var
|
|
78061
|
+
var jsx_dev_runtime26 = __toESM(require_jsx_dev_runtime(), 1);
|
|
77654
78062
|
var POWERLINE_MENU_LABEL_WIDTH = 11;
|
|
77655
78063
|
function formatPowerlineMenuLabel(label) {
|
|
77656
78064
|
return label.padEnd(POWERLINE_MENU_LABEL_WIDTH, " ");
|
|
@@ -77753,10 +78161,10 @@ var PowerlineSetup = ({
|
|
|
77753
78161
|
onClearMessage
|
|
77754
78162
|
}) => {
|
|
77755
78163
|
const powerlineConfig = settings.powerline;
|
|
77756
|
-
const [screen, setScreen] =
|
|
77757
|
-
const [selectedMenuItem, setSelectedMenuItem] =
|
|
77758
|
-
const [confirmingEnable, setConfirmingEnable] =
|
|
77759
|
-
const [confirmingFontInstall, setConfirmingFontInstall] =
|
|
78164
|
+
const [screen, setScreen] = import_react51.useState("menu");
|
|
78165
|
+
const [selectedMenuItem, setSelectedMenuItem] = import_react51.useState(0);
|
|
78166
|
+
const [confirmingEnable, setConfirmingEnable] = import_react51.useState(false);
|
|
78167
|
+
const [confirmingFontInstall, setConfirmingFontInstall] = import_react51.useState(false);
|
|
77760
78168
|
const hasManualSeparatorItems = settings.lines.some((line) => line.some((item) => item.type === "separator"));
|
|
77761
78169
|
const hasGlobalFgOverride = Boolean(settings.overrideForegroundColor && settings.overrideForegroundColor !== "none");
|
|
77762
78170
|
const globalOverrideMessage = hasGlobalFgOverride ? "⚠ Global override for FG active" : null;
|
|
@@ -77811,7 +78219,7 @@ var PowerlineSetup = ({
|
|
|
77811
78219
|
}
|
|
77812
78220
|
});
|
|
77813
78221
|
if (screen === "separator") {
|
|
77814
|
-
return /* @__PURE__ */
|
|
78222
|
+
return /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(PowerlineSeparatorEditor, {
|
|
77815
78223
|
settings,
|
|
77816
78224
|
mode: "separator",
|
|
77817
78225
|
onUpdate,
|
|
@@ -77821,7 +78229,7 @@ var PowerlineSetup = ({
|
|
|
77821
78229
|
}, undefined, false, undefined, this);
|
|
77822
78230
|
}
|
|
77823
78231
|
if (screen === "startCap") {
|
|
77824
|
-
return /* @__PURE__ */
|
|
78232
|
+
return /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(PowerlineSeparatorEditor, {
|
|
77825
78233
|
settings,
|
|
77826
78234
|
mode: "startCap",
|
|
77827
78235
|
onUpdate,
|
|
@@ -77831,7 +78239,7 @@ var PowerlineSetup = ({
|
|
|
77831
78239
|
}, undefined, false, undefined, this);
|
|
77832
78240
|
}
|
|
77833
78241
|
if (screen === "endCap") {
|
|
77834
|
-
return /* @__PURE__ */
|
|
78242
|
+
return /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(PowerlineSeparatorEditor, {
|
|
77835
78243
|
settings,
|
|
77836
78244
|
mode: "endCap",
|
|
77837
78245
|
onUpdate,
|
|
@@ -77841,7 +78249,7 @@ var PowerlineSetup = ({
|
|
|
77841
78249
|
}, undefined, false, undefined, this);
|
|
77842
78250
|
}
|
|
77843
78251
|
if (screen === "themes") {
|
|
77844
|
-
return /* @__PURE__ */
|
|
78252
|
+
return /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(PowerlineThemeSelector, {
|
|
77845
78253
|
settings,
|
|
77846
78254
|
onUpdate,
|
|
77847
78255
|
onBack: () => {
|
|
@@ -77849,16 +78257,16 @@ var PowerlineSetup = ({
|
|
|
77849
78257
|
}
|
|
77850
78258
|
}, undefined, false, undefined, this);
|
|
77851
78259
|
}
|
|
77852
|
-
return /* @__PURE__ */
|
|
78260
|
+
return /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
|
|
77853
78261
|
flexDirection: "column",
|
|
77854
78262
|
children: [
|
|
77855
|
-
!confirmingFontInstall && !installingFonts && !fontInstallMessage && /* @__PURE__ */
|
|
78263
|
+
!confirmingFontInstall && !installingFonts && !fontInstallMessage && /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
|
|
77856
78264
|
children: [
|
|
77857
|
-
/* @__PURE__ */
|
|
78265
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
77858
78266
|
bold: true,
|
|
77859
78267
|
children: "Powerline Setup"
|
|
77860
78268
|
}, undefined, false, undefined, this),
|
|
77861
|
-
globalOverrideMessage && /* @__PURE__ */
|
|
78269
|
+
globalOverrideMessage && /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
77862
78270
|
color: "yellow",
|
|
77863
78271
|
dimColor: true,
|
|
77864
78272
|
children: [
|
|
@@ -77868,133 +78276,133 @@ var PowerlineSetup = ({
|
|
|
77868
78276
|
}, undefined, true, undefined, this)
|
|
77869
78277
|
]
|
|
77870
78278
|
}, undefined, true, undefined, this),
|
|
77871
|
-
confirmingFontInstall ? /* @__PURE__ */
|
|
78279
|
+
confirmingFontInstall ? /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
|
|
77872
78280
|
flexDirection: "column",
|
|
77873
78281
|
children: [
|
|
77874
|
-
/* @__PURE__ */
|
|
78282
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
|
|
77875
78283
|
marginBottom: 1,
|
|
77876
|
-
children: /* @__PURE__ */
|
|
78284
|
+
children: /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
77877
78285
|
color: "cyan",
|
|
77878
78286
|
bold: true,
|
|
77879
78287
|
children: "Font Installation"
|
|
77880
78288
|
}, undefined, false, undefined, this)
|
|
77881
78289
|
}, undefined, false, undefined, this),
|
|
77882
|
-
/* @__PURE__ */
|
|
78290
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
|
|
77883
78291
|
marginBottom: 1,
|
|
77884
78292
|
flexDirection: "column",
|
|
77885
78293
|
children: [
|
|
77886
|
-
/* @__PURE__ */
|
|
78294
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
77887
78295
|
bold: true,
|
|
77888
78296
|
children: "What will happen:"
|
|
77889
78297
|
}, undefined, false, undefined, this),
|
|
77890
|
-
/* @__PURE__ */
|
|
78298
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
77891
78299
|
children: [
|
|
77892
|
-
/* @__PURE__ */
|
|
78300
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
77893
78301
|
dimColor: true,
|
|
77894
78302
|
children: "• Clone fonts from "
|
|
77895
78303
|
}, undefined, false, undefined, this),
|
|
77896
|
-
/* @__PURE__ */
|
|
78304
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
77897
78305
|
color: "blue",
|
|
77898
78306
|
children: "https://github.com/powerline/fonts"
|
|
77899
78307
|
}, undefined, false, undefined, this)
|
|
77900
78308
|
]
|
|
77901
78309
|
}, undefined, true, undefined, this),
|
|
77902
|
-
|
|
78310
|
+
os14.platform() === "darwin" && /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(jsx_dev_runtime26.Fragment, {
|
|
77903
78311
|
children: [
|
|
77904
|
-
/* @__PURE__ */
|
|
78312
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
77905
78313
|
dimColor: true,
|
|
77906
78314
|
children: "• Run install.sh script which will:"
|
|
77907
78315
|
}, undefined, false, undefined, this),
|
|
77908
|
-
/* @__PURE__ */
|
|
78316
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
77909
78317
|
dimColor: true,
|
|
77910
78318
|
children: " - Copy all .ttf/.otf files to ~/Library/Fonts"
|
|
77911
78319
|
}, undefined, false, undefined, this),
|
|
77912
|
-
/* @__PURE__ */
|
|
78320
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
77913
78321
|
dimColor: true,
|
|
77914
78322
|
children: " - Register fonts with macOS"
|
|
77915
78323
|
}, undefined, false, undefined, this)
|
|
77916
78324
|
]
|
|
77917
78325
|
}, undefined, true, undefined, this),
|
|
77918
|
-
|
|
78326
|
+
os14.platform() === "linux" && /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(jsx_dev_runtime26.Fragment, {
|
|
77919
78327
|
children: [
|
|
77920
|
-
/* @__PURE__ */
|
|
78328
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
77921
78329
|
dimColor: true,
|
|
77922
78330
|
children: "• Run install.sh script which will:"
|
|
77923
78331
|
}, undefined, false, undefined, this),
|
|
77924
|
-
/* @__PURE__ */
|
|
78332
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
77925
78333
|
dimColor: true,
|
|
77926
78334
|
children: " - Copy all .ttf/.otf files to ~/.local/share/fonts"
|
|
77927
78335
|
}, undefined, false, undefined, this),
|
|
77928
|
-
/* @__PURE__ */
|
|
78336
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
77929
78337
|
dimColor: true,
|
|
77930
78338
|
children: " - Run fc-cache to update font cache"
|
|
77931
78339
|
}, undefined, false, undefined, this)
|
|
77932
78340
|
]
|
|
77933
78341
|
}, undefined, true, undefined, this),
|
|
77934
|
-
|
|
78342
|
+
os14.platform() === "win32" && /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(jsx_dev_runtime26.Fragment, {
|
|
77935
78343
|
children: [
|
|
77936
|
-
/* @__PURE__ */
|
|
78344
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
77937
78345
|
dimColor: true,
|
|
77938
78346
|
children: "• Copy Powerline .ttf/.otf files to:"
|
|
77939
78347
|
}, undefined, false, undefined, this),
|
|
77940
|
-
/* @__PURE__ */
|
|
78348
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
77941
78349
|
dimColor: true,
|
|
77942
78350
|
children: " AppData\\Local\\Microsoft\\Windows\\Fonts"
|
|
77943
78351
|
}, undefined, false, undefined, this)
|
|
77944
78352
|
]
|
|
77945
78353
|
}, undefined, true, undefined, this),
|
|
77946
|
-
/* @__PURE__ */
|
|
78354
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
77947
78355
|
dimColor: true,
|
|
77948
78356
|
children: "• Clean up temporary files"
|
|
77949
78357
|
}, undefined, false, undefined, this)
|
|
77950
78358
|
]
|
|
77951
78359
|
}, undefined, true, undefined, this),
|
|
77952
|
-
/* @__PURE__ */
|
|
78360
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
|
|
77953
78361
|
marginBottom: 1,
|
|
77954
78362
|
children: [
|
|
77955
|
-
/* @__PURE__ */
|
|
78363
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
77956
78364
|
color: "yellow",
|
|
77957
78365
|
bold: true,
|
|
77958
78366
|
children: "Requirements: "
|
|
77959
78367
|
}, undefined, false, undefined, this),
|
|
77960
|
-
/* @__PURE__ */
|
|
78368
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
77961
78369
|
dimColor: true,
|
|
77962
78370
|
children: "Git installed, Internet connection, Write permissions"
|
|
77963
78371
|
}, undefined, false, undefined, this)
|
|
77964
78372
|
]
|
|
77965
78373
|
}, undefined, true, undefined, this),
|
|
77966
|
-
/* @__PURE__ */
|
|
78374
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
|
|
77967
78375
|
marginBottom: 1,
|
|
77968
78376
|
flexDirection: "column",
|
|
77969
78377
|
children: [
|
|
77970
|
-
/* @__PURE__ */
|
|
78378
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
77971
78379
|
color: "green",
|
|
77972
78380
|
bold: true,
|
|
77973
78381
|
children: "After install:"
|
|
77974
78382
|
}, undefined, false, undefined, this),
|
|
77975
|
-
/* @__PURE__ */
|
|
78383
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
77976
78384
|
dimColor: true,
|
|
77977
78385
|
children: "• Restart terminal"
|
|
77978
78386
|
}, undefined, false, undefined, this),
|
|
77979
|
-
/* @__PURE__ */
|
|
78387
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
77980
78388
|
dimColor: true,
|
|
77981
78389
|
children: "• Select a Powerline font"
|
|
77982
78390
|
}, undefined, false, undefined, this),
|
|
77983
|
-
/* @__PURE__ */
|
|
78391
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
77984
78392
|
dimColor: true,
|
|
77985
78393
|
children: ' (e.g. "Meslo LG S for Powerline")'
|
|
77986
78394
|
}, undefined, false, undefined, this)
|
|
77987
78395
|
]
|
|
77988
78396
|
}, undefined, true, undefined, this),
|
|
77989
|
-
/* @__PURE__ */
|
|
78397
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
|
|
77990
78398
|
marginTop: 1,
|
|
77991
|
-
children: /* @__PURE__ */
|
|
78399
|
+
children: /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
77992
78400
|
children: "Proceed? "
|
|
77993
78401
|
}, undefined, false, undefined, this)
|
|
77994
78402
|
}, undefined, false, undefined, this),
|
|
77995
|
-
/* @__PURE__ */
|
|
78403
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
|
|
77996
78404
|
marginTop: 1,
|
|
77997
|
-
children: /* @__PURE__ */
|
|
78405
|
+
children: /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(ConfirmDialog, {
|
|
77998
78406
|
inline: true,
|
|
77999
78407
|
onConfirm: () => {
|
|
78000
78408
|
setConfirmingFontInstall(false);
|
|
@@ -78006,36 +78414,36 @@ var PowerlineSetup = ({
|
|
|
78006
78414
|
}, undefined, false, undefined, this)
|
|
78007
78415
|
}, undefined, false, undefined, this)
|
|
78008
78416
|
]
|
|
78009
|
-
}, undefined, true, undefined, this) : confirmingEnable ? /* @__PURE__ */
|
|
78417
|
+
}, undefined, true, undefined, this) : confirmingEnable ? /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
|
|
78010
78418
|
flexDirection: "column",
|
|
78011
78419
|
marginTop: 1,
|
|
78012
78420
|
children: [
|
|
78013
|
-
hasManualSeparatorItems && /* @__PURE__ */
|
|
78421
|
+
hasManualSeparatorItems && /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(jsx_dev_runtime26.Fragment, {
|
|
78014
78422
|
children: [
|
|
78015
|
-
/* @__PURE__ */
|
|
78016
|
-
children: /* @__PURE__ */
|
|
78423
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
|
|
78424
|
+
children: /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
78017
78425
|
color: "yellow",
|
|
78018
78426
|
children: "⚠ Warning: Enabling Powerline mode will remove all existing manual separators from your status lines."
|
|
78019
78427
|
}, undefined, false, undefined, this)
|
|
78020
78428
|
}, undefined, false, undefined, this),
|
|
78021
|
-
/* @__PURE__ */
|
|
78429
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
|
|
78022
78430
|
marginBottom: 1,
|
|
78023
|
-
children: /* @__PURE__ */
|
|
78431
|
+
children: /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
78024
78432
|
dimColor: true,
|
|
78025
78433
|
children: "Powerline mode uses its own separator system and is incompatible with manual separators."
|
|
78026
78434
|
}, undefined, false, undefined, this)
|
|
78027
78435
|
}, undefined, false, undefined, this)
|
|
78028
78436
|
]
|
|
78029
78437
|
}, undefined, true, undefined, this),
|
|
78030
|
-
/* @__PURE__ */
|
|
78438
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
|
|
78031
78439
|
marginTop: hasManualSeparatorItems ? 1 : 0,
|
|
78032
|
-
children: /* @__PURE__ */
|
|
78440
|
+
children: /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
78033
78441
|
children: "Do you want to continue? "
|
|
78034
78442
|
}, undefined, false, undefined, this)
|
|
78035
78443
|
}, undefined, false, undefined, this),
|
|
78036
|
-
/* @__PURE__ */
|
|
78444
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
|
|
78037
78445
|
marginTop: 1,
|
|
78038
|
-
children: /* @__PURE__ */
|
|
78446
|
+
children: /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(ConfirmDialog, {
|
|
78039
78447
|
inline: true,
|
|
78040
78448
|
onConfirm: () => {
|
|
78041
78449
|
onUpdate(buildEnabledPowerlineSettings(settings, true));
|
|
@@ -78047,51 +78455,51 @@ var PowerlineSetup = ({
|
|
|
78047
78455
|
}, undefined, false, undefined, this)
|
|
78048
78456
|
}, undefined, false, undefined, this)
|
|
78049
78457
|
]
|
|
78050
|
-
}, undefined, true, undefined, this) : installingFonts ? /* @__PURE__ */
|
|
78051
|
-
children: /* @__PURE__ */
|
|
78458
|
+
}, undefined, true, undefined, this) : installingFonts ? /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
|
|
78459
|
+
children: /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
78052
78460
|
color: "yellow",
|
|
78053
78461
|
children: "Installing Powerline fonts... This may take a moment."
|
|
78054
78462
|
}, undefined, false, undefined, this)
|
|
78055
|
-
}, undefined, false, undefined, this) : fontInstallMessage ? /* @__PURE__ */
|
|
78463
|
+
}, undefined, false, undefined, this) : fontInstallMessage ? /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
|
|
78056
78464
|
flexDirection: "column",
|
|
78057
78465
|
children: [
|
|
78058
|
-
/* @__PURE__ */
|
|
78466
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
78059
78467
|
color: fontInstallMessage.includes("success") ? "green" : "red",
|
|
78060
78468
|
children: fontInstallMessage
|
|
78061
78469
|
}, undefined, false, undefined, this),
|
|
78062
|
-
/* @__PURE__ */
|
|
78470
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
|
|
78063
78471
|
marginTop: 1,
|
|
78064
|
-
children: /* @__PURE__ */
|
|
78472
|
+
children: /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
78065
78473
|
dimColor: true,
|
|
78066
78474
|
children: "Press any key to continue..."
|
|
78067
78475
|
}, undefined, false, undefined, this)
|
|
78068
78476
|
}, undefined, false, undefined, this)
|
|
78069
78477
|
]
|
|
78070
|
-
}, undefined, true, undefined, this) : /* @__PURE__ */
|
|
78478
|
+
}, undefined, true, undefined, this) : /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(jsx_dev_runtime26.Fragment, {
|
|
78071
78479
|
children: [
|
|
78072
|
-
/* @__PURE__ */
|
|
78480
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
|
|
78073
78481
|
flexDirection: "column",
|
|
78074
|
-
children: /* @__PURE__ */
|
|
78482
|
+
children: /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
78075
78483
|
children: [
|
|
78076
78484
|
" Font Status: ",
|
|
78077
|
-
powerlineFontStatus.installed ? /* @__PURE__ */
|
|
78485
|
+
powerlineFontStatus.installed ? /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(jsx_dev_runtime26.Fragment, {
|
|
78078
78486
|
children: [
|
|
78079
|
-
/* @__PURE__ */
|
|
78487
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
78080
78488
|
color: "green",
|
|
78081
78489
|
children: "✓ Installed"
|
|
78082
78490
|
}, undefined, false, undefined, this),
|
|
78083
|
-
/* @__PURE__ */
|
|
78491
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
78084
78492
|
dimColor: true,
|
|
78085
78493
|
children: " - Ensure fonts are active in your terminal"
|
|
78086
78494
|
}, undefined, false, undefined, this)
|
|
78087
78495
|
]
|
|
78088
|
-
}, undefined, true, undefined, this) : /* @__PURE__ */
|
|
78496
|
+
}, undefined, true, undefined, this) : /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(jsx_dev_runtime26.Fragment, {
|
|
78089
78497
|
children: [
|
|
78090
|
-
/* @__PURE__ */
|
|
78498
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
78091
78499
|
color: "yellow",
|
|
78092
78500
|
children: "✗ Not Installed"
|
|
78093
78501
|
}, undefined, false, undefined, this),
|
|
78094
|
-
/* @__PURE__ */
|
|
78502
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
78095
78503
|
dimColor: true,
|
|
78096
78504
|
children: " - Press (i) to install Powerline fonts"
|
|
78097
78505
|
}, undefined, false, undefined, this)
|
|
@@ -78100,62 +78508,62 @@ var PowerlineSetup = ({
|
|
|
78100
78508
|
]
|
|
78101
78509
|
}, undefined, true, undefined, this)
|
|
78102
78510
|
}, undefined, false, undefined, this),
|
|
78103
|
-
/* @__PURE__ */
|
|
78511
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
|
|
78104
78512
|
children: [
|
|
78105
|
-
/* @__PURE__ */
|
|
78513
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
78106
78514
|
children: " Powerline Mode: "
|
|
78107
78515
|
}, undefined, false, undefined, this),
|
|
78108
|
-
/* @__PURE__ */
|
|
78516
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
78109
78517
|
color: powerlineConfig.enabled ? "green" : "red",
|
|
78110
78518
|
children: powerlineConfig.enabled ? "✓ Enabled " : "✗ Disabled "
|
|
78111
78519
|
}, undefined, false, undefined, this),
|
|
78112
|
-
/* @__PURE__ */
|
|
78520
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
78113
78521
|
dimColor: true,
|
|
78114
78522
|
children: " - Press (t) to toggle"
|
|
78115
78523
|
}, undefined, false, undefined, this)
|
|
78116
78524
|
]
|
|
78117
78525
|
}, undefined, true, undefined, this),
|
|
78118
|
-
powerlineConfig.enabled && /* @__PURE__ */
|
|
78526
|
+
powerlineConfig.enabled && /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(jsx_dev_runtime26.Fragment, {
|
|
78119
78527
|
children: [
|
|
78120
|
-
/* @__PURE__ */
|
|
78528
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
|
|
78121
78529
|
children: [
|
|
78122
|
-
/* @__PURE__ */
|
|
78530
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
78123
78531
|
children: " Align Widgets: "
|
|
78124
78532
|
}, undefined, false, undefined, this),
|
|
78125
|
-
/* @__PURE__ */
|
|
78533
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
78126
78534
|
color: powerlineConfig.autoAlign ? "green" : "red",
|
|
78127
78535
|
children: powerlineConfig.autoAlign ? "✓ Enabled " : "✗ Disabled "
|
|
78128
78536
|
}, undefined, false, undefined, this),
|
|
78129
|
-
/* @__PURE__ */
|
|
78537
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
78130
78538
|
dimColor: true,
|
|
78131
78539
|
children: " - Press (a) to toggle"
|
|
78132
78540
|
}, undefined, false, undefined, this)
|
|
78133
78541
|
]
|
|
78134
78542
|
}, undefined, true, undefined, this),
|
|
78135
|
-
/* @__PURE__ */
|
|
78543
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
|
|
78136
78544
|
children: [
|
|
78137
|
-
/* @__PURE__ */
|
|
78545
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
78138
78546
|
children: " Continue Theme: "
|
|
78139
78547
|
}, undefined, false, undefined, this),
|
|
78140
|
-
/* @__PURE__ */
|
|
78548
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
78141
78549
|
color: powerlineConfig.continueThemeAcrossLines ? "green" : "red",
|
|
78142
78550
|
children: powerlineConfig.continueThemeAcrossLines ? "✓ Enabled " : "✗ Disabled "
|
|
78143
78551
|
}, undefined, false, undefined, this),
|
|
78144
|
-
/* @__PURE__ */
|
|
78552
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
78145
78553
|
dimColor: true,
|
|
78146
78554
|
children: " - Press (c) to toggle"
|
|
78147
78555
|
}, undefined, false, undefined, this)
|
|
78148
78556
|
]
|
|
78149
78557
|
}, undefined, true, undefined, this),
|
|
78150
|
-
/* @__PURE__ */
|
|
78558
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
|
|
78151
78559
|
flexDirection: "column",
|
|
78152
78560
|
marginTop: 1,
|
|
78153
78561
|
children: [
|
|
78154
|
-
/* @__PURE__ */
|
|
78562
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
78155
78563
|
dimColor: true,
|
|
78156
78564
|
children: "Powerline mode uses its own separator system"
|
|
78157
78565
|
}, undefined, false, undefined, this),
|
|
78158
|
-
/* @__PURE__ */
|
|
78566
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
78159
78567
|
dimColor: true,
|
|
78160
78568
|
children: "Continue Theme keeps the Powerline color sequence running across lines"
|
|
78161
78569
|
}, undefined, false, undefined, this)
|
|
@@ -78163,14 +78571,14 @@ var PowerlineSetup = ({
|
|
|
78163
78571
|
}, undefined, true, undefined, this)
|
|
78164
78572
|
]
|
|
78165
78573
|
}, undefined, true, undefined, this),
|
|
78166
|
-
!powerlineConfig.enabled && /* @__PURE__ */
|
|
78574
|
+
!powerlineConfig.enabled && /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
|
|
78167
78575
|
marginTop: 1,
|
|
78168
|
-
children: /* @__PURE__ */
|
|
78576
|
+
children: /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
78169
78577
|
dimColor: true,
|
|
78170
78578
|
children: "Enable Powerline mode to configure separators, caps, and themes."
|
|
78171
78579
|
}, undefined, false, undefined, this)
|
|
78172
78580
|
}, undefined, false, undefined, this),
|
|
78173
|
-
/* @__PURE__ */
|
|
78581
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(List, {
|
|
78174
78582
|
marginTop: 1,
|
|
78175
78583
|
items: buildPowerlineSetupMenuItems(powerlineConfig),
|
|
78176
78584
|
onSelect: (value) => {
|
|
@@ -78194,8 +78602,8 @@ var PowerlineSetup = ({
|
|
|
78194
78602
|
// src/tui/components/RefreshIntervalMenu.tsx
|
|
78195
78603
|
init_input_guards();
|
|
78196
78604
|
await init_build2();
|
|
78197
|
-
var
|
|
78198
|
-
var
|
|
78605
|
+
var import_react52 = __toESM(require_react(), 1);
|
|
78606
|
+
var jsx_dev_runtime27 = __toESM(require_jsx_dev_runtime(), 1);
|
|
78199
78607
|
function getRefreshInputValue(interval) {
|
|
78200
78608
|
return interval === null ? "" : String(interval);
|
|
78201
78609
|
}
|
|
@@ -78266,11 +78674,11 @@ var RefreshIntervalMenu = ({
|
|
|
78266
78674
|
onGitCacheTtlUpdate,
|
|
78267
78675
|
onBack
|
|
78268
78676
|
}) => {
|
|
78269
|
-
const [editingRefreshInterval, setEditingRefreshInterval] =
|
|
78270
|
-
const [editingGitCacheTtl, setEditingGitCacheTtl] =
|
|
78271
|
-
const [refreshInput, setRefreshInput] =
|
|
78272
|
-
const [gitCacheTtlInput, setGitCacheTtlInput] =
|
|
78273
|
-
const [validationError, setValidationError] =
|
|
78677
|
+
const [editingRefreshInterval, setEditingRefreshInterval] = import_react52.useState(false);
|
|
78678
|
+
const [editingGitCacheTtl, setEditingGitCacheTtl] = import_react52.useState(false);
|
|
78679
|
+
const [refreshInput, setRefreshInput] = import_react52.useState(() => getRefreshInputValue(currentInterval));
|
|
78680
|
+
const [gitCacheTtlInput, setGitCacheTtlInput] = import_react52.useState(() => String(gitCacheTtlSeconds));
|
|
78681
|
+
const [validationError, setValidationError] = import_react52.useState(null);
|
|
78274
78682
|
use_input_default((input, key) => {
|
|
78275
78683
|
if (editingRefreshInterval) {
|
|
78276
78684
|
if (key.return) {
|
|
@@ -78336,22 +78744,22 @@ var RefreshIntervalMenu = ({
|
|
|
78336
78744
|
onBack();
|
|
78337
78745
|
}
|
|
78338
78746
|
});
|
|
78339
|
-
return /* @__PURE__ */
|
|
78747
|
+
return /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Box_default, {
|
|
78340
78748
|
flexDirection: "column",
|
|
78341
78749
|
children: [
|
|
78342
|
-
/* @__PURE__ */
|
|
78750
|
+
/* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text, {
|
|
78343
78751
|
bold: true,
|
|
78344
78752
|
children: "Configure Status Line"
|
|
78345
78753
|
}, undefined, false, undefined, this),
|
|
78346
|
-
/* @__PURE__ */
|
|
78754
|
+
/* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text, {
|
|
78347
78755
|
color: "white",
|
|
78348
78756
|
children: "Configure Claude Code status line settings"
|
|
78349
78757
|
}, undefined, false, undefined, this),
|
|
78350
|
-
editingRefreshInterval ? /* @__PURE__ */
|
|
78758
|
+
editingRefreshInterval ? /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Box_default, {
|
|
78351
78759
|
marginTop: 1,
|
|
78352
78760
|
flexDirection: "column",
|
|
78353
78761
|
children: [
|
|
78354
|
-
/* @__PURE__ */
|
|
78762
|
+
/* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text, {
|
|
78355
78763
|
children: [
|
|
78356
78764
|
"Enter refresh interval in seconds (1-60):",
|
|
78357
78765
|
" ",
|
|
@@ -78359,19 +78767,19 @@ var RefreshIntervalMenu = ({
|
|
|
78359
78767
|
refreshInput.length > 0 ? "s" : ""
|
|
78360
78768
|
]
|
|
78361
78769
|
}, undefined, true, undefined, this),
|
|
78362
|
-
validationError ? /* @__PURE__ */
|
|
78770
|
+
validationError ? /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text, {
|
|
78363
78771
|
color: "red",
|
|
78364
78772
|
children: validationError
|
|
78365
|
-
}, undefined, false, undefined, this) : /* @__PURE__ */
|
|
78773
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text, {
|
|
78366
78774
|
dimColor: true,
|
|
78367
78775
|
children: "Press Enter to confirm, ESC to cancel. Leave empty to remove."
|
|
78368
78776
|
}, undefined, false, undefined, this)
|
|
78369
78777
|
]
|
|
78370
|
-
}, undefined, true, undefined, this) : editingGitCacheTtl ? /* @__PURE__ */
|
|
78778
|
+
}, undefined, true, undefined, this) : editingGitCacheTtl ? /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Box_default, {
|
|
78371
78779
|
marginTop: 1,
|
|
78372
78780
|
flexDirection: "column",
|
|
78373
78781
|
children: [
|
|
78374
|
-
/* @__PURE__ */
|
|
78782
|
+
/* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text, {
|
|
78375
78783
|
children: [
|
|
78376
78784
|
"Enter Git cache TTL in seconds (0-60):",
|
|
78377
78785
|
" ",
|
|
@@ -78379,27 +78787,27 @@ var RefreshIntervalMenu = ({
|
|
|
78379
78787
|
gitCacheTtlInput.length > 0 ? "s" : ""
|
|
78380
78788
|
]
|
|
78381
78789
|
}, undefined, true, undefined, this),
|
|
78382
|
-
/* @__PURE__ */
|
|
78790
|
+
/* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text, {
|
|
78383
78791
|
children: " "
|
|
78384
78792
|
}, undefined, false, undefined, this),
|
|
78385
|
-
/* @__PURE__ */
|
|
78793
|
+
/* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text, {
|
|
78386
78794
|
dimColor: true,
|
|
78387
78795
|
wrap: "wrap",
|
|
78388
78796
|
children: "This affects how quickly git widgets notice unstaged and untracked working-tree changes."
|
|
78389
78797
|
}, undefined, false, undefined, this),
|
|
78390
|
-
validationError ? /* @__PURE__ */
|
|
78798
|
+
validationError ? /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text, {
|
|
78391
78799
|
color: "red",
|
|
78392
78800
|
children: validationError
|
|
78393
|
-
}, undefined, false, undefined, this) : /* @__PURE__ */
|
|
78801
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text, {
|
|
78394
78802
|
dimColor: true,
|
|
78395
78803
|
children: "0 disables age-based expiry; cache validity uses .git/HEAD and .git/index mtimes only."
|
|
78396
78804
|
}, undefined, false, undefined, this),
|
|
78397
|
-
/* @__PURE__ */
|
|
78805
|
+
/* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text, {
|
|
78398
78806
|
dimColor: true,
|
|
78399
78807
|
children: "Press Enter to confirm, ESC to cancel."
|
|
78400
78808
|
}, undefined, false, undefined, this)
|
|
78401
78809
|
]
|
|
78402
|
-
}, undefined, true, undefined, this) : /* @__PURE__ */
|
|
78810
|
+
}, undefined, true, undefined, this) : /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(List, {
|
|
78403
78811
|
marginTop: 1,
|
|
78404
78812
|
items: buildConfigureStatusLineItems(currentInterval, supportsRefreshInterval, gitCacheTtlSeconds),
|
|
78405
78813
|
onSelect: (value) => {
|
|
@@ -78424,7 +78832,7 @@ var RefreshIntervalMenu = ({
|
|
|
78424
78832
|
init_source();
|
|
78425
78833
|
init_ansi();
|
|
78426
78834
|
await init_build2();
|
|
78427
|
-
var
|
|
78835
|
+
var import_react53 = __toESM(require_react(), 1);
|
|
78428
78836
|
|
|
78429
78837
|
// src/utils/powerline-theme-index.ts
|
|
78430
78838
|
function countPowerlineThemeSlots(entries) {
|
|
@@ -78492,7 +78900,7 @@ function advanceGlobalSeparatorIndex(currentIndex, widgets, preRenderedWidgets)
|
|
|
78492
78900
|
}
|
|
78493
78901
|
|
|
78494
78902
|
// src/tui/components/StatusLinePreview.tsx
|
|
78495
|
-
var
|
|
78903
|
+
var jsx_dev_runtime28 = __toESM(require_jsx_dev_runtime(), 1);
|
|
78496
78904
|
var renderSingleLine = (widgets, terminalWidth, settings, lineIndex, globalSeparatorIndex, globalPowerlineThemeIndex, globalPowerlineStartCapIndex, preRenderedWidgets, preCalculatedMaxWidths) => {
|
|
78497
78905
|
const context = {
|
|
78498
78906
|
terminalWidth,
|
|
@@ -78513,7 +78921,7 @@ function preparePreviewLineForTerminal(line, terminalWidth) {
|
|
|
78513
78921
|
return truncateStyledText(printableLine, availableWidth, { ellipsis: true });
|
|
78514
78922
|
}
|
|
78515
78923
|
var StatusLinePreview = ({ lines, terminalWidth, settings, onTruncationChange }) => {
|
|
78516
|
-
const { renderedLines, anyTruncated } =
|
|
78924
|
+
const { renderedLines, anyTruncated } = import_react53.default.useMemo(() => {
|
|
78517
78925
|
if (!settings)
|
|
78518
78926
|
return { renderedLines: [], anyTruncated: false };
|
|
78519
78927
|
const preRenderedLines = preRenderAllWidgets(lines, settings, {
|
|
@@ -78548,29 +78956,29 @@ var StatusLinePreview = ({ lines, terminalWidth, settings, onTruncationChange })
|
|
|
78548
78956
|
}
|
|
78549
78957
|
return { renderedLines: result2, anyTruncated: truncated };
|
|
78550
78958
|
}, [lines, terminalWidth, settings]);
|
|
78551
|
-
|
|
78959
|
+
import_react53.default.useEffect(() => {
|
|
78552
78960
|
onTruncationChange?.(anyTruncated);
|
|
78553
78961
|
}, [anyTruncated, onTruncationChange]);
|
|
78554
|
-
return /* @__PURE__ */
|
|
78962
|
+
return /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
|
|
78555
78963
|
flexDirection: "column",
|
|
78556
78964
|
children: [
|
|
78557
|
-
/* @__PURE__ */
|
|
78965
|
+
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
|
|
78558
78966
|
borderStyle: "round",
|
|
78559
78967
|
borderColor: "gray",
|
|
78560
78968
|
borderDimColor: true,
|
|
78561
78969
|
width: "100%",
|
|
78562
78970
|
paddingLeft: 1,
|
|
78563
|
-
children: /* @__PURE__ */
|
|
78971
|
+
children: /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
|
|
78564
78972
|
children: [
|
|
78565
78973
|
">",
|
|
78566
|
-
/* @__PURE__ */
|
|
78974
|
+
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
|
|
78567
78975
|
dimColor: true,
|
|
78568
78976
|
children: " Preview (ctrl+s to save configuration at any time)"
|
|
78569
78977
|
}, undefined, false, undefined, this)
|
|
78570
78978
|
]
|
|
78571
78979
|
}, undefined, true, undefined, this)
|
|
78572
78980
|
}, undefined, false, undefined, this),
|
|
78573
|
-
renderedLines.map((line, index) => /* @__PURE__ */
|
|
78981
|
+
renderedLines.map((line, index) => /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
|
|
78574
78982
|
wrap: "truncate",
|
|
78575
78983
|
children: [
|
|
78576
78984
|
PREVIEW_LINE_INDENT,
|
|
@@ -78584,7 +78992,7 @@ var StatusLinePreview = ({ lines, terminalWidth, settings, onTruncationChange })
|
|
|
78584
78992
|
// src/tui/components/TerminalOptionsMenu.tsx
|
|
78585
78993
|
init_source();
|
|
78586
78994
|
await init_build2();
|
|
78587
|
-
var
|
|
78995
|
+
var import_react54 = __toESM(require_react(), 1);
|
|
78588
78996
|
|
|
78589
78997
|
// src/utils/color-sanitize.ts
|
|
78590
78998
|
await init_widgets2();
|
|
@@ -78639,7 +79047,7 @@ function sanitizeLinesForColorLevel(lines, nextLevel) {
|
|
|
78639
79047
|
}
|
|
78640
79048
|
|
|
78641
79049
|
// src/tui/components/TerminalOptionsMenu.tsx
|
|
78642
|
-
var
|
|
79050
|
+
var jsx_dev_runtime29 = __toESM(require_jsx_dev_runtime(), 1);
|
|
78643
79051
|
function getNextColorLevel(level) {
|
|
78644
79052
|
return (level + 1) % 4;
|
|
78645
79053
|
}
|
|
@@ -78673,8 +79081,8 @@ var TerminalOptionsMenu = ({
|
|
|
78673
79081
|
onUpdate,
|
|
78674
79082
|
onBack
|
|
78675
79083
|
}) => {
|
|
78676
|
-
const [showColorWarning, setShowColorWarning] =
|
|
78677
|
-
const [pendingColorLevel, setPendingColorLevel] =
|
|
79084
|
+
const [showColorWarning, setShowColorWarning] = import_react54.useState(false);
|
|
79085
|
+
const [pendingColorLevel, setPendingColorLevel] = import_react54.useState(null);
|
|
78678
79086
|
const handleSelect = (value) => {
|
|
78679
79087
|
if (value === "back") {
|
|
78680
79088
|
onBack();
|
|
@@ -78722,27 +79130,27 @@ var TerminalOptionsMenu = ({
|
|
|
78722
79130
|
onBack();
|
|
78723
79131
|
}
|
|
78724
79132
|
});
|
|
78725
|
-
return /* @__PURE__ */
|
|
79133
|
+
return /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Box_default, {
|
|
78726
79134
|
flexDirection: "column",
|
|
78727
79135
|
children: [
|
|
78728
|
-
/* @__PURE__ */
|
|
79136
|
+
/* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
|
|
78729
79137
|
bold: true,
|
|
78730
79138
|
children: "Terminal Options"
|
|
78731
79139
|
}, undefined, false, undefined, this),
|
|
78732
|
-
showColorWarning ? /* @__PURE__ */
|
|
79140
|
+
showColorWarning ? /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Box_default, {
|
|
78733
79141
|
flexDirection: "column",
|
|
78734
79142
|
marginTop: 1,
|
|
78735
79143
|
children: [
|
|
78736
|
-
/* @__PURE__ */
|
|
79144
|
+
/* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
|
|
78737
79145
|
color: "yellow",
|
|
78738
79146
|
children: "⚠ Warning: Custom colors detected!"
|
|
78739
79147
|
}, undefined, false, undefined, this),
|
|
78740
|
-
/* @__PURE__ */
|
|
79148
|
+
/* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
|
|
78741
79149
|
children: "Switching color modes will reset custom ansi256 or hex colors to defaults."
|
|
78742
79150
|
}, undefined, false, undefined, this),
|
|
78743
|
-
/* @__PURE__ */
|
|
79151
|
+
/* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Box_default, {
|
|
78744
79152
|
marginTop: 1,
|
|
78745
|
-
children: /* @__PURE__ */
|
|
79153
|
+
children: /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(ConfirmDialog, {
|
|
78746
79154
|
message: "Continue?",
|
|
78747
79155
|
onConfirm: handleColorConfirm,
|
|
78748
79156
|
onCancel: handleColorCancel,
|
|
@@ -78750,13 +79158,13 @@ var TerminalOptionsMenu = ({
|
|
|
78750
79158
|
}, undefined, false, undefined, this)
|
|
78751
79159
|
}, undefined, false, undefined, this)
|
|
78752
79160
|
]
|
|
78753
|
-
}, undefined, true, undefined, this) : /* @__PURE__ */
|
|
79161
|
+
}, undefined, true, undefined, this) : /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(jsx_dev_runtime29.Fragment, {
|
|
78754
79162
|
children: [
|
|
78755
|
-
/* @__PURE__ */
|
|
79163
|
+
/* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
|
|
78756
79164
|
color: "white",
|
|
78757
79165
|
children: "Configure terminal-specific settings for optimal display"
|
|
78758
79166
|
}, undefined, false, undefined, this),
|
|
78759
|
-
/* @__PURE__ */
|
|
79167
|
+
/* @__PURE__ */ jsx_dev_runtime29.jsxDEV(List, {
|
|
78760
79168
|
marginTop: 1,
|
|
78761
79169
|
items: buildTerminalOptionsItems(settings.colorLevel),
|
|
78762
79170
|
onSelect: handleSelect,
|
|
@@ -78785,8 +79193,8 @@ var getColorLevelLabel = (level) => {
|
|
|
78785
79193
|
// src/tui/components/TerminalWidthMenu.tsx
|
|
78786
79194
|
init_input_guards();
|
|
78787
79195
|
await init_build2();
|
|
78788
|
-
var
|
|
78789
|
-
var
|
|
79196
|
+
var import_react55 = __toESM(require_react(), 1);
|
|
79197
|
+
var jsx_dev_runtime30 = __toESM(require_jsx_dev_runtime(), 1);
|
|
78790
79198
|
var TERMINAL_WIDTH_OPTIONS = ["full", "full-minus-40", "full-until-compact"];
|
|
78791
79199
|
function getTerminalWidthSelectionIndex(selectedOption) {
|
|
78792
79200
|
const selectedIndex = TERMINAL_WIDTH_OPTIONS.indexOf(selectedOption);
|
|
@@ -78833,11 +79241,11 @@ var TerminalWidthMenu = ({
|
|
|
78833
79241
|
onUpdate,
|
|
78834
79242
|
onBack
|
|
78835
79243
|
}) => {
|
|
78836
|
-
const [selectedOption, setSelectedOption] =
|
|
78837
|
-
const [compactThreshold, setCompactThreshold] =
|
|
78838
|
-
const [editingThreshold, setEditingThreshold] =
|
|
78839
|
-
const [thresholdInput, setThresholdInput] =
|
|
78840
|
-
const [validationError, setValidationError] =
|
|
79244
|
+
const [selectedOption, setSelectedOption] = import_react55.useState(settings.flexMode);
|
|
79245
|
+
const [compactThreshold, setCompactThreshold] = import_react55.useState(settings.compactThreshold);
|
|
79246
|
+
const [editingThreshold, setEditingThreshold] = import_react55.useState(false);
|
|
79247
|
+
const [thresholdInput, setThresholdInput] = import_react55.useState(String(settings.compactThreshold));
|
|
79248
|
+
const [validationError, setValidationError] = import_react55.useState(null);
|
|
78841
79249
|
use_input_default((input, key) => {
|
|
78842
79250
|
if (editingThreshold) {
|
|
78843
79251
|
if (key.return) {
|
|
@@ -78876,27 +79284,27 @@ var TerminalWidthMenu = ({
|
|
|
78876
79284
|
onBack();
|
|
78877
79285
|
}
|
|
78878
79286
|
});
|
|
78879
|
-
return /* @__PURE__ */
|
|
79287
|
+
return /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
|
|
78880
79288
|
flexDirection: "column",
|
|
78881
79289
|
children: [
|
|
78882
|
-
/* @__PURE__ */
|
|
79290
|
+
/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
|
|
78883
79291
|
bold: true,
|
|
78884
79292
|
children: "Terminal Width"
|
|
78885
79293
|
}, undefined, false, undefined, this),
|
|
78886
|
-
/* @__PURE__ */
|
|
79294
|
+
/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
|
|
78887
79295
|
color: "white",
|
|
78888
79296
|
children: "These settings affect where long lines are truncated, and where right-alignment occurs when using flex separators"
|
|
78889
79297
|
}, undefined, false, undefined, this),
|
|
78890
|
-
/* @__PURE__ */
|
|
79298
|
+
/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
|
|
78891
79299
|
dimColor: true,
|
|
78892
79300
|
wrap: "wrap",
|
|
78893
79301
|
children: "Claude code does not currently provide an available width variable for the statusline and features like IDE integration, auto-compaction notices, etc all cause the statusline to wrap if we do not truncate it"
|
|
78894
79302
|
}, undefined, false, undefined, this),
|
|
78895
|
-
editingThreshold ? /* @__PURE__ */
|
|
79303
|
+
editingThreshold ? /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
|
|
78896
79304
|
marginTop: 1,
|
|
78897
79305
|
flexDirection: "column",
|
|
78898
79306
|
children: [
|
|
78899
|
-
/* @__PURE__ */
|
|
79307
|
+
/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
|
|
78900
79308
|
children: [
|
|
78901
79309
|
"Enter compact threshold (1-99):",
|
|
78902
79310
|
" ",
|
|
@@ -78904,15 +79312,15 @@ var TerminalWidthMenu = ({
|
|
|
78904
79312
|
"%"
|
|
78905
79313
|
]
|
|
78906
79314
|
}, undefined, true, undefined, this),
|
|
78907
|
-
validationError ? /* @__PURE__ */
|
|
79315
|
+
validationError ? /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
|
|
78908
79316
|
color: "red",
|
|
78909
79317
|
children: validationError
|
|
78910
|
-
}, undefined, false, undefined, this) : /* @__PURE__ */
|
|
79318
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
|
|
78911
79319
|
dimColor: true,
|
|
78912
79320
|
children: "Press Enter to confirm, ESC to cancel"
|
|
78913
79321
|
}, undefined, false, undefined, this)
|
|
78914
79322
|
]
|
|
78915
|
-
}, undefined, true, undefined, this) : /* @__PURE__ */
|
|
79323
|
+
}, undefined, true, undefined, this) : /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(List, {
|
|
78916
79324
|
marginTop: 1,
|
|
78917
79325
|
items: buildTerminalWidthItems(selectedOption, compactThreshold),
|
|
78918
79326
|
initialSelection: getTerminalWidthSelectionIndex(selectedOption),
|
|
@@ -78939,7 +79347,7 @@ var TerminalWidthMenu = ({
|
|
|
78939
79347
|
};
|
|
78940
79348
|
// src/tui/components/UpdateCheckerMenu.tsx
|
|
78941
79349
|
await init_build2();
|
|
78942
|
-
var
|
|
79350
|
+
var jsx_dev_runtime31 = __toESM(require_jsx_dev_runtime(), 1);
|
|
78943
79351
|
function getInstallationLabel2(result2) {
|
|
78944
79352
|
const { installation } = result2;
|
|
78945
79353
|
if (installation.method === "auto-update") {
|
|
@@ -78990,16 +79398,16 @@ var UpdateCheckerMenu = ({
|
|
|
78990
79398
|
}
|
|
78991
79399
|
});
|
|
78992
79400
|
if (state.status === "checking") {
|
|
78993
|
-
return /* @__PURE__ */
|
|
79401
|
+
return /* @__PURE__ */ jsx_dev_runtime31.jsxDEV(Box_default, {
|
|
78994
79402
|
flexDirection: "column",
|
|
78995
79403
|
children: [
|
|
78996
|
-
/* @__PURE__ */
|
|
79404
|
+
/* @__PURE__ */ jsx_dev_runtime31.jsxDEV(Text, {
|
|
78997
79405
|
bold: true,
|
|
78998
79406
|
children: "Check for Updates"
|
|
78999
79407
|
}, undefined, false, undefined, this),
|
|
79000
|
-
/* @__PURE__ */
|
|
79408
|
+
/* @__PURE__ */ jsx_dev_runtime31.jsxDEV(Box_default, {
|
|
79001
79409
|
marginTop: 1,
|
|
79002
|
-
children: /* @__PURE__ */
|
|
79410
|
+
children: /* @__PURE__ */ jsx_dev_runtime31.jsxDEV(Text, {
|
|
79003
79411
|
dimColor: true,
|
|
79004
79412
|
children: "Checking npm registry..."
|
|
79005
79413
|
}, undefined, false, undefined, this)
|
|
@@ -79007,32 +79415,32 @@ var UpdateCheckerMenu = ({
|
|
|
79007
79415
|
]
|
|
79008
79416
|
}, undefined, true, undefined, this);
|
|
79009
79417
|
}
|
|
79010
|
-
return /* @__PURE__ */
|
|
79418
|
+
return /* @__PURE__ */ jsx_dev_runtime31.jsxDEV(Box_default, {
|
|
79011
79419
|
flexDirection: "column",
|
|
79012
79420
|
children: [
|
|
79013
|
-
/* @__PURE__ */
|
|
79421
|
+
/* @__PURE__ */ jsx_dev_runtime31.jsxDEV(Text, {
|
|
79014
79422
|
bold: true,
|
|
79015
79423
|
children: "Check for Updates"
|
|
79016
79424
|
}, undefined, false, undefined, this),
|
|
79017
|
-
/* @__PURE__ */
|
|
79425
|
+
/* @__PURE__ */ jsx_dev_runtime31.jsxDEV(Box_default, {
|
|
79018
79426
|
marginTop: 1,
|
|
79019
79427
|
flexDirection: "column",
|
|
79020
79428
|
children: [
|
|
79021
|
-
/* @__PURE__ */
|
|
79429
|
+
/* @__PURE__ */ jsx_dev_runtime31.jsxDEV(Text, {
|
|
79022
79430
|
children: [
|
|
79023
79431
|
"Current:",
|
|
79024
79432
|
" ",
|
|
79025
79433
|
state.currentVersion
|
|
79026
79434
|
]
|
|
79027
79435
|
}, undefined, true, undefined, this),
|
|
79028
|
-
state.status !== "registry-failure" && /* @__PURE__ */
|
|
79436
|
+
state.status !== "registry-failure" && /* @__PURE__ */ jsx_dev_runtime31.jsxDEV(Text, {
|
|
79029
79437
|
children: [
|
|
79030
79438
|
"Latest:",
|
|
79031
79439
|
" ",
|
|
79032
79440
|
state.latestVersion
|
|
79033
79441
|
]
|
|
79034
79442
|
}, undefined, true, undefined, this),
|
|
79035
|
-
/* @__PURE__ */
|
|
79443
|
+
/* @__PURE__ */ jsx_dev_runtime31.jsxDEV(Text, {
|
|
79036
79444
|
children: [
|
|
79037
79445
|
"Install:",
|
|
79038
79446
|
" ",
|
|
@@ -79041,11 +79449,11 @@ var UpdateCheckerMenu = ({
|
|
|
79041
79449
|
}, undefined, true, undefined, this)
|
|
79042
79450
|
]
|
|
79043
79451
|
}, undefined, true, undefined, this),
|
|
79044
|
-
state.status === "registry-failure" && /* @__PURE__ */
|
|
79452
|
+
state.status === "registry-failure" && /* @__PURE__ */ jsx_dev_runtime31.jsxDEV(jsx_dev_runtime31.Fragment, {
|
|
79045
79453
|
children: [
|
|
79046
|
-
/* @__PURE__ */
|
|
79454
|
+
/* @__PURE__ */ jsx_dev_runtime31.jsxDEV(Box_default, {
|
|
79047
79455
|
marginTop: 1,
|
|
79048
|
-
children: /* @__PURE__ */
|
|
79456
|
+
children: /* @__PURE__ */ jsx_dev_runtime31.jsxDEV(Text, {
|
|
79049
79457
|
color: "red",
|
|
79050
79458
|
children: [
|
|
79051
79459
|
"Registry check failed:",
|
|
@@ -79054,7 +79462,7 @@ var UpdateCheckerMenu = ({
|
|
|
79054
79462
|
]
|
|
79055
79463
|
}, undefined, true, undefined, this)
|
|
79056
79464
|
}, undefined, false, undefined, this),
|
|
79057
|
-
/* @__PURE__ */
|
|
79465
|
+
/* @__PURE__ */ jsx_dev_runtime31.jsxDEV(List, {
|
|
79058
79466
|
marginTop: 1,
|
|
79059
79467
|
items: [{ label: "Check again", value: "refresh" }],
|
|
79060
79468
|
onSelect: (value) => {
|
|
@@ -79068,16 +79476,16 @@ var UpdateCheckerMenu = ({
|
|
|
79068
79476
|
}, undefined, false, undefined, this)
|
|
79069
79477
|
]
|
|
79070
79478
|
}, undefined, true, undefined, this),
|
|
79071
|
-
state.status === "up-to-date" && /* @__PURE__ */
|
|
79479
|
+
state.status === "up-to-date" && /* @__PURE__ */ jsx_dev_runtime31.jsxDEV(jsx_dev_runtime31.Fragment, {
|
|
79072
79480
|
children: [
|
|
79073
|
-
/* @__PURE__ */
|
|
79481
|
+
/* @__PURE__ */ jsx_dev_runtime31.jsxDEV(Box_default, {
|
|
79074
79482
|
marginTop: 1,
|
|
79075
|
-
children: /* @__PURE__ */
|
|
79483
|
+
children: /* @__PURE__ */ jsx_dev_runtime31.jsxDEV(Text, {
|
|
79076
79484
|
color: "green",
|
|
79077
79485
|
children: "ccstatusline is up to date."
|
|
79078
79486
|
}, undefined, false, undefined, this)
|
|
79079
79487
|
}, undefined, false, undefined, this),
|
|
79080
|
-
/* @__PURE__ */
|
|
79488
|
+
/* @__PURE__ */ jsx_dev_runtime31.jsxDEV(List, {
|
|
79081
79489
|
marginTop: 1,
|
|
79082
79490
|
items: [{ label: "Check again", value: "refresh" }],
|
|
79083
79491
|
onSelect: (value) => {
|
|
@@ -79091,26 +79499,26 @@ var UpdateCheckerMenu = ({
|
|
|
79091
79499
|
}, undefined, false, undefined, this)
|
|
79092
79500
|
]
|
|
79093
79501
|
}, undefined, true, undefined, this),
|
|
79094
|
-
state.status === "update-available" && /* @__PURE__ */
|
|
79502
|
+
state.status === "update-available" && /* @__PURE__ */ jsx_dev_runtime31.jsxDEV(jsx_dev_runtime31.Fragment, {
|
|
79095
79503
|
children: [
|
|
79096
|
-
/* @__PURE__ */
|
|
79504
|
+
/* @__PURE__ */ jsx_dev_runtime31.jsxDEV(Box_default, {
|
|
79097
79505
|
marginTop: 1,
|
|
79098
|
-
children: /* @__PURE__ */
|
|
79506
|
+
children: /* @__PURE__ */ jsx_dev_runtime31.jsxDEV(Text, {
|
|
79099
79507
|
color: "yellow",
|
|
79100
79508
|
children: "An update is available."
|
|
79101
79509
|
}, undefined, false, undefined, this)
|
|
79102
79510
|
}, undefined, false, undefined, this),
|
|
79103
|
-
state.installation.method === "auto-update" && /* @__PURE__ */
|
|
79511
|
+
state.installation.method === "auto-update" && /* @__PURE__ */ jsx_dev_runtime31.jsxDEV(Box_default, {
|
|
79104
79512
|
marginTop: 1,
|
|
79105
79513
|
flexDirection: "column",
|
|
79106
79514
|
children: [
|
|
79107
|
-
/* @__PURE__ */
|
|
79515
|
+
/* @__PURE__ */ jsx_dev_runtime31.jsxDEV(Text, {
|
|
79108
79516
|
children: "No manual hook change is needed. Claude Code already runs @latest."
|
|
79109
79517
|
}, undefined, false, undefined, this),
|
|
79110
|
-
/* @__PURE__ */
|
|
79518
|
+
/* @__PURE__ */ jsx_dev_runtime31.jsxDEV(Text, {
|
|
79111
79519
|
children: "The next @latest invocation will resolve the latest package."
|
|
79112
79520
|
}, undefined, false, undefined, this),
|
|
79113
|
-
/* @__PURE__ */
|
|
79521
|
+
/* @__PURE__ */ jsx_dev_runtime31.jsxDEV(Text, {
|
|
79114
79522
|
children: [
|
|
79115
79523
|
"Launch command for a fresh TUI:",
|
|
79116
79524
|
" ",
|
|
@@ -79119,7 +79527,7 @@ var UpdateCheckerMenu = ({
|
|
|
79119
79527
|
}, undefined, true, undefined, this)
|
|
79120
79528
|
]
|
|
79121
79529
|
}, undefined, true, undefined, this),
|
|
79122
|
-
state.actions.length > 0 && /* @__PURE__ */
|
|
79530
|
+
state.actions.length > 0 && /* @__PURE__ */ jsx_dev_runtime31.jsxDEV(List, {
|
|
79123
79531
|
marginTop: 1,
|
|
79124
79532
|
items: getActionItems(state.actions),
|
|
79125
79533
|
onSelect: (value) => {
|
|
@@ -79135,7 +79543,7 @@ var UpdateCheckerMenu = ({
|
|
|
79135
79543
|
},
|
|
79136
79544
|
showBackButton: true
|
|
79137
79545
|
}, undefined, false, undefined, this),
|
|
79138
|
-
state.actions.length === 0 && /* @__PURE__ */
|
|
79546
|
+
state.actions.length === 0 && /* @__PURE__ */ jsx_dev_runtime31.jsxDEV(List, {
|
|
79139
79547
|
marginTop: 1,
|
|
79140
79548
|
items: [{ label: "Check again", value: "refresh" }],
|
|
79141
79549
|
onSelect: (value) => {
|
|
@@ -79153,7 +79561,7 @@ var UpdateCheckerMenu = ({
|
|
|
79153
79561
|
}, undefined, true, undefined, this);
|
|
79154
79562
|
};
|
|
79155
79563
|
// src/tui/App.tsx
|
|
79156
|
-
var
|
|
79564
|
+
var jsx_dev_runtime32 = __toESM(require_jsx_dev_runtime(), 1);
|
|
79157
79565
|
var GITHUB_REPO_URL = "https://github.com/sirmalloc/ccstatusline";
|
|
79158
79566
|
var NOTICE_ITEMS = [
|
|
79159
79567
|
{
|
|
@@ -79172,22 +79580,22 @@ var FlowNotice = ({
|
|
|
79172
79580
|
onContinue();
|
|
79173
79581
|
}
|
|
79174
79582
|
});
|
|
79175
|
-
return /* @__PURE__ */
|
|
79583
|
+
return /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Box_default, {
|
|
79176
79584
|
flexDirection: "column",
|
|
79177
79585
|
children: [
|
|
79178
|
-
/* @__PURE__ */
|
|
79586
|
+
/* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text, {
|
|
79179
79587
|
bold: true,
|
|
79180
79588
|
children: title
|
|
79181
79589
|
}, undefined, false, undefined, this),
|
|
79182
|
-
/* @__PURE__ */
|
|
79590
|
+
/* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Box_default, {
|
|
79183
79591
|
marginTop: 1,
|
|
79184
|
-
children: /* @__PURE__ */
|
|
79592
|
+
children: /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text, {
|
|
79185
79593
|
color,
|
|
79186
79594
|
wrap: "wrap",
|
|
79187
79595
|
children: message
|
|
79188
79596
|
}, undefined, false, undefined, this)
|
|
79189
79597
|
}, undefined, false, undefined, this),
|
|
79190
|
-
/* @__PURE__ */
|
|
79598
|
+
/* @__PURE__ */ jsx_dev_runtime32.jsxDEV(List, {
|
|
79191
79599
|
marginTop: 1,
|
|
79192
79600
|
items: NOTICE_ITEMS,
|
|
79193
79601
|
onSelect: () => {
|
|
@@ -79227,18 +79635,18 @@ var PinnedVersionMismatchScreen = ({
|
|
|
79227
79635
|
onExit();
|
|
79228
79636
|
}
|
|
79229
79637
|
});
|
|
79230
|
-
return /* @__PURE__ */
|
|
79638
|
+
return /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Box_default, {
|
|
79231
79639
|
flexDirection: "column",
|
|
79232
79640
|
children: [
|
|
79233
|
-
/* @__PURE__ */
|
|
79641
|
+
/* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text, {
|
|
79234
79642
|
bold: true,
|
|
79235
79643
|
children: "Pinned Install Version Mismatch"
|
|
79236
79644
|
}, undefined, false, undefined, this),
|
|
79237
|
-
/* @__PURE__ */
|
|
79645
|
+
/* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Box_default, {
|
|
79238
79646
|
marginTop: 1,
|
|
79239
79647
|
flexDirection: "column",
|
|
79240
79648
|
children: [
|
|
79241
|
-
/* @__PURE__ */
|
|
79649
|
+
/* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text, {
|
|
79242
79650
|
color: "yellow",
|
|
79243
79651
|
children: [
|
|
79244
79652
|
"Claude Code is pinned to ccstatusline v",
|
|
@@ -79248,17 +79656,17 @@ var PinnedVersionMismatchScreen = ({
|
|
|
79248
79656
|
"."
|
|
79249
79657
|
]
|
|
79250
79658
|
}, undefined, true, undefined, this),
|
|
79251
|
-
/* @__PURE__ */
|
|
79659
|
+
/* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text, {
|
|
79252
79660
|
dimColor: true,
|
|
79253
79661
|
wrap: "wrap",
|
|
79254
79662
|
children: "To avoid writing config that the pinned runtime may not support, update the pinned global install or exit and relaunch the pinned version."
|
|
79255
79663
|
}, undefined, false, undefined, this)
|
|
79256
79664
|
]
|
|
79257
79665
|
}, undefined, true, undefined, this),
|
|
79258
|
-
/* @__PURE__ */
|
|
79666
|
+
/* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Box_default, {
|
|
79259
79667
|
marginTop: 1,
|
|
79260
79668
|
flexDirection: "column",
|
|
79261
|
-
children: /* @__PURE__ */
|
|
79669
|
+
children: /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text, {
|
|
79262
79670
|
children: [
|
|
79263
79671
|
"Current pinned version:",
|
|
79264
79672
|
" ",
|
|
@@ -79266,7 +79674,7 @@ var PinnedVersionMismatchScreen = ({
|
|
|
79266
79674
|
]
|
|
79267
79675
|
}, undefined, true, undefined, this)
|
|
79268
79676
|
}, undefined, false, undefined, this),
|
|
79269
|
-
/* @__PURE__ */
|
|
79677
|
+
/* @__PURE__ */ jsx_dev_runtime32.jsxDEV(List, {
|
|
79270
79678
|
marginTop: 1,
|
|
79271
79679
|
items: getPinnedMismatchItems(mismatch, canRunPackageManager),
|
|
79272
79680
|
onSelect: (value) => {
|
|
@@ -79363,6 +79771,11 @@ function getPathInferredInstallation(installation, activeCommand) {
|
|
|
79363
79771
|
function getConfirmCancelScreen(confirmDialog) {
|
|
79364
79772
|
return confirmDialog?.cancelScreen ?? "main";
|
|
79365
79773
|
}
|
|
79774
|
+
function applyTuiImport(current, imported, mode, presentKeys) {
|
|
79775
|
+
const nextSettings = applyImport(current, imported, mode, presentKeys);
|
|
79776
|
+
source_default.level = nextSettings.colorLevel;
|
|
79777
|
+
return nextSettings;
|
|
79778
|
+
}
|
|
79366
79779
|
function clearInstallMenuSelection(menuSelections) {
|
|
79367
79780
|
if (menuSelections.install === undefined && menuSelections.installPackage === undefined) {
|
|
79368
79781
|
return menuSelections;
|
|
@@ -79393,32 +79806,33 @@ function buildInvalidConfigSaveConfirm(configLoadError, onConfirm) {
|
|
|
79393
79806
|
}
|
|
79394
79807
|
var App2 = () => {
|
|
79395
79808
|
const { exit } = use_app_default();
|
|
79396
|
-
const [settings, setSettings] =
|
|
79397
|
-
const [originalSettings, setOriginalSettings] =
|
|
79398
|
-
const [hasChanges, setHasChanges] =
|
|
79399
|
-
const [configLoadError, setConfigLoadError] =
|
|
79400
|
-
const [screen, setScreen] =
|
|
79401
|
-
const [selectedLine, setSelectedLine] =
|
|
79402
|
-
const [menuSelections, setMenuSelections] =
|
|
79403
|
-
const [confirmDialog, setConfirmDialog] =
|
|
79404
|
-
const [isClaudeInstalled, setIsClaudeInstalled] =
|
|
79405
|
-
const [terminalWidth, setTerminalWidth] =
|
|
79406
|
-
const [powerlineFontStatus, setPowerlineFontStatus] =
|
|
79407
|
-
const [installingFonts, setInstallingFonts] =
|
|
79408
|
-
const [fontInstallMessage, setFontInstallMessage] =
|
|
79409
|
-
const [existingStatusLine, setExistingStatusLine] =
|
|
79410
|
-
const [flashMessage, setFlashMessage] =
|
|
79411
|
-
const [previewIsTruncated, setPreviewIsTruncated] =
|
|
79412
|
-
const [currentRefreshInterval, setCurrentRefreshInterval] =
|
|
79413
|
-
const [supportsRefreshInterval] =
|
|
79414
|
-
const [commandAvailability] =
|
|
79415
|
-
const [updateCheckerState, setUpdateCheckerState] =
|
|
79416
|
-
const [flowNotice, setFlowNotice] =
|
|
79417
|
-
const [globalPackageInstallations, setGlobalPackageInstallations] =
|
|
79418
|
-
const [updatesReturnScreen, setUpdatesReturnScreen] =
|
|
79419
|
-
const [hasLoadedClaudeStatus, setHasLoadedClaudeStatus] =
|
|
79420
|
-
const [hasLoadedInstalledState, setHasLoadedInstalledState] =
|
|
79421
|
-
|
|
79809
|
+
const [settings, setSettings] = import_react56.useState(null);
|
|
79810
|
+
const [originalSettings, setOriginalSettings] = import_react56.useState(null);
|
|
79811
|
+
const [hasChanges, setHasChanges] = import_react56.useState(false);
|
|
79812
|
+
const [configLoadError, setConfigLoadError] = import_react56.useState(null);
|
|
79813
|
+
const [screen, setScreen] = import_react56.useState("main");
|
|
79814
|
+
const [selectedLine, setSelectedLine] = import_react56.useState(0);
|
|
79815
|
+
const [menuSelections, setMenuSelections] = import_react56.useState({});
|
|
79816
|
+
const [confirmDialog, setConfirmDialog] = import_react56.useState(null);
|
|
79817
|
+
const [isClaudeInstalled, setIsClaudeInstalled] = import_react56.useState(false);
|
|
79818
|
+
const [terminalWidth, setTerminalWidth] = import_react56.useState(process.stdout.columns || 80);
|
|
79819
|
+
const [powerlineFontStatus, setPowerlineFontStatus] = import_react56.useState({ installed: false });
|
|
79820
|
+
const [installingFonts, setInstallingFonts] = import_react56.useState(false);
|
|
79821
|
+
const [fontInstallMessage, setFontInstallMessage] = import_react56.useState(null);
|
|
79822
|
+
const [existingStatusLine, setExistingStatusLine] = import_react56.useState(null);
|
|
79823
|
+
const [flashMessage, setFlashMessage] = import_react56.useState(null);
|
|
79824
|
+
const [previewIsTruncated, setPreviewIsTruncated] = import_react56.useState(false);
|
|
79825
|
+
const [currentRefreshInterval, setCurrentRefreshInterval] = import_react56.useState(null);
|
|
79826
|
+
const [supportsRefreshInterval] = import_react56.useState(() => isClaudeCodeVersionAtLeast("2.1.97"));
|
|
79827
|
+
const [commandAvailability] = import_react56.useState(() => getPackageCommandAvailability());
|
|
79828
|
+
const [updateCheckerState, setUpdateCheckerState] = import_react56.useState({ status: "checking" });
|
|
79829
|
+
const [flowNotice, setFlowNotice] = import_react56.useState(null);
|
|
79830
|
+
const [globalPackageInstallations, setGlobalPackageInstallations] = import_react56.useState([]);
|
|
79831
|
+
const [updatesReturnScreen, setUpdatesReturnScreen] = import_react56.useState("main");
|
|
79832
|
+
const [hasLoadedClaudeStatus, setHasLoadedClaudeStatus] = import_react56.useState(false);
|
|
79833
|
+
const [hasLoadedInstalledState, setHasLoadedInstalledState] = import_react56.useState(false);
|
|
79834
|
+
const [importValidation, setImportValidation] = import_react56.useState(null);
|
|
79835
|
+
import_react56.useEffect(() => {
|
|
79422
79836
|
loadClaudeStatusLineState().then((statusLineState) => {
|
|
79423
79837
|
setExistingStatusLine(statusLineState.existingStatusLine);
|
|
79424
79838
|
setCurrentRefreshInterval(statusLineState.refreshInterval);
|
|
@@ -79452,13 +79866,13 @@ var App2 = () => {
|
|
|
79452
79866
|
process.stdout.off("resize", handleResize);
|
|
79453
79867
|
};
|
|
79454
79868
|
}, []);
|
|
79455
|
-
|
|
79869
|
+
import_react56.useEffect(() => {
|
|
79456
79870
|
if (originalSettings) {
|
|
79457
79871
|
const hasAnyChanges = JSON.stringify(settings) !== JSON.stringify(originalSettings);
|
|
79458
79872
|
setHasChanges(hasAnyChanges);
|
|
79459
79873
|
}
|
|
79460
79874
|
}, [settings, originalSettings]);
|
|
79461
|
-
|
|
79875
|
+
import_react56.useEffect(() => {
|
|
79462
79876
|
if (flashMessage) {
|
|
79463
79877
|
const timer = setTimeout(() => {
|
|
79464
79878
|
setFlashMessage(null);
|
|
@@ -79512,8 +79926,8 @@ var App2 = () => {
|
|
|
79512
79926
|
}
|
|
79513
79927
|
}
|
|
79514
79928
|
});
|
|
79515
|
-
const getGlobalResolutionWarning =
|
|
79516
|
-
const handleInstallSelection =
|
|
79929
|
+
const getGlobalResolutionWarning = import_react56.useCallback((packageManager) => inspectGlobalCommandResolution(packageManager).warning, []);
|
|
79930
|
+
const handleInstallSelection = import_react56.useCallback((selection) => {
|
|
79517
79931
|
getExistingStatusLine().then((existing) => {
|
|
79518
79932
|
const isAlreadyInstalled = isKnownCommand(existing ?? "");
|
|
79519
79933
|
const finalCommand = buildStatusLineCommand(selection.commandMode);
|
|
@@ -79599,11 +80013,11 @@ ${resolutionWarning}`,
|
|
|
79599
80013
|
setScreen("confirm");
|
|
79600
80014
|
});
|
|
79601
80015
|
}, [getGlobalResolutionWarning, supportsRefreshInterval]);
|
|
79602
|
-
const handleInstallMenuCancel =
|
|
80016
|
+
const handleInstallMenuCancel = import_react56.useCallback(() => {
|
|
79603
80017
|
setMenuSelections(clearInstallMenuSelection);
|
|
79604
80018
|
setScreen("main");
|
|
79605
80019
|
}, []);
|
|
79606
|
-
const handleUpdateCheck =
|
|
80020
|
+
const handleUpdateCheck = import_react56.useCallback(() => {
|
|
79607
80021
|
setUpdateCheckerState({ status: "checking" });
|
|
79608
80022
|
const installation = settings ? getCurrentInstallation(isClaudeInstalled, existingStatusLine, settings) : classifyInstallation(existingStatusLine, undefined);
|
|
79609
80023
|
const activeCommand = installation.method === "pinned" || installation.method === "self-managed" ? inspectActiveGlobalCommand({ commandAvailability }) : null;
|
|
@@ -79616,7 +80030,7 @@ ${resolutionWarning}`,
|
|
|
79616
80030
|
commandAvailability
|
|
79617
80031
|
}).then(setUpdateCheckerState);
|
|
79618
80032
|
}, [commandAvailability, existingStatusLine, isClaudeInstalled, settings]);
|
|
79619
|
-
const handleRunUpdateAction =
|
|
80033
|
+
const handleRunUpdateAction = import_react56.useCallback((action) => {
|
|
79620
80034
|
setConfirmDialog({
|
|
79621
80035
|
message: `Run global update command?
|
|
79622
80036
|
|
|
@@ -79666,8 +80080,53 @@ ${resolutionWarning}`,
|
|
|
79666
80080
|
});
|
|
79667
80081
|
setScreen("confirm");
|
|
79668
80082
|
}, [getGlobalResolutionWarning]);
|
|
80083
|
+
const handleExportConfig = import_react56.useCallback(async (filePath) => {
|
|
80084
|
+
try {
|
|
80085
|
+
if (!settings) {
|
|
80086
|
+
return;
|
|
80087
|
+
}
|
|
80088
|
+
await exportConfig(settings, filePath);
|
|
80089
|
+
setFlashMessage({ text: `Config exported to ${filePath}`, color: "green" });
|
|
80090
|
+
} catch (err) {
|
|
80091
|
+
setFlowNotice({
|
|
80092
|
+
title: "Export Failed",
|
|
80093
|
+
message: err instanceof Error ? err.message : String(err),
|
|
80094
|
+
color: "red",
|
|
80095
|
+
continueScreen: "main"
|
|
80096
|
+
});
|
|
80097
|
+
setScreen("flowNotice");
|
|
80098
|
+
return;
|
|
80099
|
+
}
|
|
80100
|
+
setScreen("main");
|
|
80101
|
+
}, [settings]);
|
|
80102
|
+
const handleImportFileChosen = import_react56.useCallback(async (filePath) => {
|
|
80103
|
+
const result2 = await validateImportFile(filePath);
|
|
80104
|
+
if (result2.status === "invalid") {
|
|
80105
|
+
setFlowNotice({
|
|
80106
|
+
title: "Import Failed",
|
|
80107
|
+
message: result2.reason,
|
|
80108
|
+
color: "red",
|
|
80109
|
+
continueScreen: "main"
|
|
80110
|
+
});
|
|
80111
|
+
setScreen("flowNotice");
|
|
80112
|
+
} else {
|
|
80113
|
+
setImportValidation(result2);
|
|
80114
|
+
setScreen("importPreview");
|
|
80115
|
+
}
|
|
80116
|
+
}, []);
|
|
80117
|
+
const handleImportApply = import_react56.useCallback((mode) => {
|
|
80118
|
+
if (!settings || importValidation?.status !== "valid") {
|
|
80119
|
+
return;
|
|
80120
|
+
}
|
|
80121
|
+
const importedSettings = applyTuiImport(settings, importValidation.data, mode, importValidation.presentKeys);
|
|
80122
|
+
setSettings(importedSettings);
|
|
80123
|
+
setHasChanges(true);
|
|
80124
|
+
setImportValidation(null);
|
|
80125
|
+
setFlashMessage({ text: "Config imported — review and save", color: "green" });
|
|
80126
|
+
setScreen("main");
|
|
80127
|
+
}, [importValidation, settings]);
|
|
79669
80128
|
if (!settings || !hasLoadedClaudeStatus || !hasLoadedInstalledState) {
|
|
79670
|
-
return /* @__PURE__ */
|
|
80129
|
+
return /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text, {
|
|
79671
80130
|
children: "Loading settings..."
|
|
79672
80131
|
}, undefined, false, undefined, this);
|
|
79673
80132
|
}
|
|
@@ -79817,6 +80276,12 @@ ${resolutionWarning}`,
|
|
|
79817
80276
|
case "configureStatusLine":
|
|
79818
80277
|
setScreen("refreshInterval");
|
|
79819
80278
|
break;
|
|
80279
|
+
case "exportConfig":
|
|
80280
|
+
setScreen("exportConfig");
|
|
80281
|
+
break;
|
|
80282
|
+
case "importConfig":
|
|
80283
|
+
setScreen("importConfig");
|
|
80284
|
+
break;
|
|
79820
80285
|
case "starGithub":
|
|
79821
80286
|
setConfirmDialog({
|
|
79822
80287
|
message: `Open the ccstatusline GitHub repository in your browser?
|
|
@@ -79875,31 +80340,31 @@ ${GITHUB_REPO_URL}`,
|
|
|
79875
80340
|
}
|
|
79876
80341
|
};
|
|
79877
80342
|
if (pinnedVersionMismatch) {
|
|
79878
|
-
return /* @__PURE__ */
|
|
80343
|
+
return /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Box_default, {
|
|
79879
80344
|
flexDirection: "column",
|
|
79880
80345
|
children: [
|
|
79881
|
-
/* @__PURE__ */
|
|
80346
|
+
/* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Box_default, {
|
|
79882
80347
|
marginBottom: 1,
|
|
79883
80348
|
children: [
|
|
79884
|
-
/* @__PURE__ */
|
|
80349
|
+
/* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text, {
|
|
79885
80350
|
bold: true,
|
|
79886
|
-
children: /* @__PURE__ */
|
|
80351
|
+
children: /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(dist_default5, {
|
|
79887
80352
|
name: "retro",
|
|
79888
80353
|
children: "CCStatusline Configuration"
|
|
79889
80354
|
}, undefined, false, undefined, this)
|
|
79890
80355
|
}, undefined, false, undefined, this),
|
|
79891
|
-
/* @__PURE__ */
|
|
80356
|
+
/* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text, {
|
|
79892
80357
|
bold: true,
|
|
79893
80358
|
children: ` | ${runningVersion && `v${runningVersion}`}`
|
|
79894
80359
|
}, undefined, false, undefined, this),
|
|
79895
|
-
flashMessage && /* @__PURE__ */
|
|
80360
|
+
flashMessage && /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text, {
|
|
79896
80361
|
color: flashMessage.color,
|
|
79897
80362
|
bold: true,
|
|
79898
80363
|
children: ` ${flashMessage.text}`
|
|
79899
80364
|
}, undefined, false, undefined, this)
|
|
79900
80365
|
]
|
|
79901
80366
|
}, undefined, true, undefined, this),
|
|
79902
|
-
/* @__PURE__ */
|
|
80367
|
+
/* @__PURE__ */ jsx_dev_runtime32.jsxDEV(PinnedVersionMismatchScreen, {
|
|
79903
80368
|
mismatch: pinnedVersionMismatch,
|
|
79904
80369
|
canRunPackageManager: commandAvailability[pinnedVersionMismatch.packageManager],
|
|
79905
80370
|
onUpdate: () => {
|
|
@@ -79923,49 +80388,49 @@ ${GITHUB_REPO_URL}`,
|
|
|
79923
80388
|
setScreen("items");
|
|
79924
80389
|
};
|
|
79925
80390
|
const configWarning = buildConfigLoadWarning(configLoadError);
|
|
79926
|
-
return /* @__PURE__ */
|
|
80391
|
+
return /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Box_default, {
|
|
79927
80392
|
flexDirection: "column",
|
|
79928
80393
|
children: [
|
|
79929
|
-
/* @__PURE__ */
|
|
80394
|
+
/* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Box_default, {
|
|
79930
80395
|
marginBottom: 1,
|
|
79931
80396
|
children: [
|
|
79932
|
-
/* @__PURE__ */
|
|
80397
|
+
/* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text, {
|
|
79933
80398
|
bold: true,
|
|
79934
|
-
children: /* @__PURE__ */
|
|
80399
|
+
children: /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(dist_default5, {
|
|
79935
80400
|
name: "retro",
|
|
79936
80401
|
children: "CCStatusline Configuration"
|
|
79937
80402
|
}, undefined, false, undefined, this)
|
|
79938
80403
|
}, undefined, false, undefined, this),
|
|
79939
|
-
/* @__PURE__ */
|
|
80404
|
+
/* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text, {
|
|
79940
80405
|
bold: true,
|
|
79941
80406
|
children: ` | ${runningVersion && `v${runningVersion}`}`
|
|
79942
80407
|
}, undefined, false, undefined, this),
|
|
79943
|
-
flashMessage && /* @__PURE__ */
|
|
80408
|
+
flashMessage && /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text, {
|
|
79944
80409
|
color: flashMessage.color,
|
|
79945
80410
|
bold: true,
|
|
79946
80411
|
children: ` ${flashMessage.text}`
|
|
79947
80412
|
}, undefined, false, undefined, this)
|
|
79948
80413
|
]
|
|
79949
80414
|
}, undefined, true, undefined, this),
|
|
79950
|
-
configWarning && /* @__PURE__ */
|
|
80415
|
+
configWarning && /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text, {
|
|
79951
80416
|
color: "red",
|
|
79952
80417
|
wrap: "wrap",
|
|
79953
80418
|
children: configWarning
|
|
79954
80419
|
}, undefined, false, undefined, this),
|
|
79955
|
-
isCustomConfigPath() && /* @__PURE__ */
|
|
80420
|
+
isCustomConfigPath() && /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text, {
|
|
79956
80421
|
dimColor: true,
|
|
79957
80422
|
children: `Config: ${getConfigPath()}`
|
|
79958
80423
|
}, undefined, false, undefined, this),
|
|
79959
|
-
/* @__PURE__ */
|
|
80424
|
+
/* @__PURE__ */ jsx_dev_runtime32.jsxDEV(StatusLinePreview, {
|
|
79960
80425
|
lines: settings.lines,
|
|
79961
80426
|
terminalWidth,
|
|
79962
80427
|
settings,
|
|
79963
80428
|
onTruncationChange: setPreviewIsTruncated
|
|
79964
80429
|
}, undefined, false, undefined, this),
|
|
79965
|
-
/* @__PURE__ */
|
|
80430
|
+
/* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Box_default, {
|
|
79966
80431
|
marginTop: 1,
|
|
79967
80432
|
children: [
|
|
79968
|
-
screen === "main" && /* @__PURE__ */
|
|
80433
|
+
screen === "main" && /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(MainMenu, {
|
|
79969
80434
|
onSelect: (value, index) => {
|
|
79970
80435
|
if (value !== "save" && value !== "exit") {
|
|
79971
80436
|
setMenuSelections((prev) => ({ ...prev, main: index }));
|
|
@@ -79980,7 +80445,7 @@ ${GITHUB_REPO_URL}`,
|
|
|
79980
80445
|
installation: effectiveInstallation,
|
|
79981
80446
|
previewIsTruncated
|
|
79982
80447
|
}, undefined, false, undefined, this),
|
|
79983
|
-
screen === "lines" && /* @__PURE__ */
|
|
80448
|
+
screen === "lines" && /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(LineSelector, {
|
|
79984
80449
|
lines: settings.lines,
|
|
79985
80450
|
onSelect: (line) => {
|
|
79986
80451
|
setMenuSelections((prev) => ({ ...prev, lines: line }));
|
|
@@ -79995,7 +80460,7 @@ ${GITHUB_REPO_URL}`,
|
|
|
79995
80460
|
title: "Select Line to Edit Items",
|
|
79996
80461
|
allowEditing: true
|
|
79997
80462
|
}, undefined, false, undefined, this),
|
|
79998
|
-
screen === "items" && /* @__PURE__ */
|
|
80463
|
+
screen === "items" && /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(ItemsEditor, {
|
|
79999
80464
|
widgets: settings.lines[selectedLine] ?? [],
|
|
80000
80465
|
onUpdate: (widgets) => {
|
|
80001
80466
|
updateLine(selectedLine, widgets);
|
|
@@ -80007,7 +80472,7 @@ ${GITHUB_REPO_URL}`,
|
|
|
80007
80472
|
lineNumber: selectedLine + 1,
|
|
80008
80473
|
settings
|
|
80009
80474
|
}, undefined, false, undefined, this),
|
|
80010
|
-
screen === "colorLines" && /* @__PURE__ */
|
|
80475
|
+
screen === "colorLines" && /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(LineSelector, {
|
|
80011
80476
|
lines: settings.lines,
|
|
80012
80477
|
onLinesUpdate: updateLines,
|
|
80013
80478
|
onSelect: (line) => {
|
|
@@ -80025,7 +80490,7 @@ ${GITHUB_REPO_URL}`,
|
|
|
80025
80490
|
settings,
|
|
80026
80491
|
allowEditing: false
|
|
80027
80492
|
}, undefined, false, undefined, this),
|
|
80028
|
-
screen === "colors" && /* @__PURE__ */
|
|
80493
|
+
screen === "colors" && /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(ColorMenu, {
|
|
80029
80494
|
widgets: settings.lines[selectedLine] ?? [],
|
|
80030
80495
|
lineIndex: selectedLine,
|
|
80031
80496
|
settings,
|
|
@@ -80038,7 +80503,7 @@ ${GITHUB_REPO_URL}`,
|
|
|
80038
80503
|
setScreen("colorLines");
|
|
80039
80504
|
}
|
|
80040
80505
|
}, undefined, false, undefined, this),
|
|
80041
|
-
screen === "terminalConfig" && /* @__PURE__ */
|
|
80506
|
+
screen === "terminalConfig" && /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(TerminalOptionsMenu, {
|
|
80042
80507
|
settings,
|
|
80043
80508
|
onUpdate: (updatedSettings) => {
|
|
80044
80509
|
setSettings(updatedSettings);
|
|
@@ -80052,7 +80517,7 @@ ${GITHUB_REPO_URL}`,
|
|
|
80052
80517
|
}
|
|
80053
80518
|
}
|
|
80054
80519
|
}, undefined, false, undefined, this),
|
|
80055
|
-
screen === "terminalWidth" && /* @__PURE__ */
|
|
80520
|
+
screen === "terminalWidth" && /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(TerminalWidthMenu, {
|
|
80056
80521
|
settings,
|
|
80057
80522
|
onUpdate: (updatedSettings) => {
|
|
80058
80523
|
setSettings(updatedSettings);
|
|
@@ -80061,7 +80526,7 @@ ${GITHUB_REPO_URL}`,
|
|
|
80061
80526
|
setScreen("terminalConfig");
|
|
80062
80527
|
}
|
|
80063
80528
|
}, undefined, false, undefined, this),
|
|
80064
|
-
screen === "globalOverrides" && /* @__PURE__ */
|
|
80529
|
+
screen === "globalOverrides" && /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(GlobalOverridesMenu, {
|
|
80065
80530
|
settings,
|
|
80066
80531
|
onUpdate: (updatedSettings) => {
|
|
80067
80532
|
setSettings(updatedSettings);
|
|
@@ -80071,7 +80536,7 @@ ${GITHUB_REPO_URL}`,
|
|
|
80071
80536
|
setScreen("main");
|
|
80072
80537
|
}
|
|
80073
80538
|
}, undefined, false, undefined, this),
|
|
80074
|
-
screen === "confirm" && confirmDialog && /* @__PURE__ */
|
|
80539
|
+
screen === "confirm" && confirmDialog && /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(ConfirmDialog, {
|
|
80075
80540
|
message: confirmDialog.message,
|
|
80076
80541
|
onConfirm: () => void confirmDialog.action(),
|
|
80077
80542
|
onCancel: () => {
|
|
@@ -80079,14 +80544,14 @@ ${GITHUB_REPO_URL}`,
|
|
|
80079
80544
|
setConfirmDialog(null);
|
|
80080
80545
|
}
|
|
80081
80546
|
}, undefined, false, undefined, this),
|
|
80082
|
-
screen === "flowNotice" && flowNotice && /* @__PURE__ */
|
|
80547
|
+
screen === "flowNotice" && flowNotice && /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(FlowNotice, {
|
|
80083
80548
|
...flowNotice,
|
|
80084
80549
|
onContinue: () => {
|
|
80085
80550
|
setScreen(flowNotice.continueScreen);
|
|
80086
80551
|
setFlowNotice(null);
|
|
80087
80552
|
}
|
|
80088
80553
|
}, undefined, false, undefined, this),
|
|
80089
|
-
screen === "install" && /* @__PURE__ */
|
|
80554
|
+
screen === "install" && /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(InstallMenu, {
|
|
80090
80555
|
commandAvailability,
|
|
80091
80556
|
currentVersion: getPackageVersion(),
|
|
80092
80557
|
existingStatusLine,
|
|
@@ -80100,7 +80565,7 @@ ${GITHUB_REPO_URL}`,
|
|
|
80100
80565
|
onCancel: handleInstallMenuCancel,
|
|
80101
80566
|
initialPackageSelection: menuSelections.installPackage
|
|
80102
80567
|
}, undefined, false, undefined, this),
|
|
80103
|
-
screen === "manageInstallation" && /* @__PURE__ */
|
|
80568
|
+
screen === "manageInstallation" && /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(ManageInstallationMenu, {
|
|
80104
80569
|
installation: effectiveInstallation,
|
|
80105
80570
|
activeCommand: activeGlobalCommand,
|
|
80106
80571
|
onSelect: handleManageInstallationSelect,
|
|
@@ -80112,7 +80577,7 @@ ${GITHUB_REPO_URL}`,
|
|
|
80112
80577
|
setScreen("main");
|
|
80113
80578
|
}
|
|
80114
80579
|
}, undefined, false, undefined, this),
|
|
80115
|
-
screen === "uninstallOptions" && /* @__PURE__ */
|
|
80580
|
+
screen === "uninstallOptions" && /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(UninstallMenu, {
|
|
80116
80581
|
installations: globalPackageInstallations,
|
|
80117
80582
|
onSelect: (selection) => {
|
|
80118
80583
|
handleUninstallSelection(selection, "uninstallOptions");
|
|
@@ -80121,7 +80586,7 @@ ${GITHUB_REPO_URL}`,
|
|
|
80121
80586
|
setScreen("manageInstallation");
|
|
80122
80587
|
}
|
|
80123
80588
|
}, undefined, false, undefined, this),
|
|
80124
|
-
screen === "updates" && /* @__PURE__ */
|
|
80589
|
+
screen === "updates" && /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(UpdateCheckerMenu, {
|
|
80125
80590
|
state: updateCheckerState,
|
|
80126
80591
|
onBack: () => {
|
|
80127
80592
|
setScreen(updatesReturnScreen);
|
|
@@ -80129,7 +80594,7 @@ ${GITHUB_REPO_URL}`,
|
|
|
80129
80594
|
onRefresh: handleUpdateCheck,
|
|
80130
80595
|
onRunAction: handleRunUpdateAction
|
|
80131
80596
|
}, undefined, false, undefined, this),
|
|
80132
|
-
screen === "refreshInterval" && /* @__PURE__ */
|
|
80597
|
+
screen === "refreshInterval" && /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(RefreshIntervalMenu, {
|
|
80133
80598
|
currentInterval: currentRefreshInterval,
|
|
80134
80599
|
supportsRefreshInterval,
|
|
80135
80600
|
gitCacheTtlSeconds: settings.gitCacheTtlSeconds,
|
|
@@ -80165,7 +80630,7 @@ ${GITHUB_REPO_URL}`,
|
|
|
80165
80630
|
setScreen("main");
|
|
80166
80631
|
}
|
|
80167
80632
|
}, undefined, false, undefined, this),
|
|
80168
|
-
screen === "powerline" && /* @__PURE__ */
|
|
80633
|
+
screen === "powerline" && /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(PowerlineSetup, {
|
|
80169
80634
|
settings,
|
|
80170
80635
|
powerlineFontStatus,
|
|
80171
80636
|
onUpdate: (updatedSettings) => {
|
|
@@ -80191,6 +80656,33 @@ ${GITHUB_REPO_URL}`,
|
|
|
80191
80656
|
onClearMessage: () => {
|
|
80192
80657
|
setFontInstallMessage(null);
|
|
80193
80658
|
}
|
|
80659
|
+
}, undefined, false, undefined, this),
|
|
80660
|
+
screen === "exportConfig" && /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(ExportConfigDialog, {
|
|
80661
|
+
onExport: (filePath) => {
|
|
80662
|
+
handleExportConfig(filePath);
|
|
80663
|
+
},
|
|
80664
|
+
onCancel: () => {
|
|
80665
|
+
setScreen("main");
|
|
80666
|
+
}
|
|
80667
|
+
}, undefined, false, undefined, this),
|
|
80668
|
+
screen === "importConfig" && /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(ImportConfigDialog, {
|
|
80669
|
+
onFileChosen: (filePath) => {
|
|
80670
|
+
handleImportFileChosen(filePath);
|
|
80671
|
+
},
|
|
80672
|
+
onCancel: () => {
|
|
80673
|
+
setScreen("main");
|
|
80674
|
+
}
|
|
80675
|
+
}, undefined, false, undefined, this),
|
|
80676
|
+
screen === "importPreview" && importValidation?.status === "valid" && /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(ImportPreviewDialog, {
|
|
80677
|
+
validation: importValidation,
|
|
80678
|
+
currentSettings: settings,
|
|
80679
|
+
onApply: (mode) => {
|
|
80680
|
+
handleImportApply(mode);
|
|
80681
|
+
},
|
|
80682
|
+
onCancel: () => {
|
|
80683
|
+
setImportValidation(null);
|
|
80684
|
+
setScreen("main");
|
|
80685
|
+
}
|
|
80194
80686
|
}, undefined, false, undefined, this)
|
|
80195
80687
|
]
|
|
80196
80688
|
}, undefined, true, undefined, this)
|
|
@@ -80199,7 +80691,7 @@ ${GITHUB_REPO_URL}`,
|
|
|
80199
80691
|
};
|
|
80200
80692
|
function runTUI() {
|
|
80201
80693
|
process.stdout.write("\x1B[2J\x1B[H");
|
|
80202
|
-
render_default(/* @__PURE__ */
|
|
80694
|
+
render_default(/* @__PURE__ */ jsx_dev_runtime32.jsxDEV(App2, {}, undefined, false, undefined, this));
|
|
80203
80695
|
}
|
|
80204
80696
|
// src/types/StatusJSON.ts
|
|
80205
80697
|
init_zod();
|
|
@@ -80285,18 +80777,18 @@ await init_config();
|
|
|
80285
80777
|
|
|
80286
80778
|
// src/utils/hook-handler.ts
|
|
80287
80779
|
import * as fs18 from "fs";
|
|
80288
|
-
import * as
|
|
80780
|
+
import * as path14 from "path";
|
|
80289
80781
|
|
|
80290
80782
|
// src/utils/skills.ts
|
|
80291
80783
|
import * as fs17 from "fs";
|
|
80292
|
-
import * as
|
|
80293
|
-
import * as
|
|
80784
|
+
import * as os15 from "os";
|
|
80785
|
+
import * as path13 from "path";
|
|
80294
80786
|
var EMPTY = { totalInvocations: 0, uniqueSkills: [], lastSkill: null };
|
|
80295
80787
|
function getSkillsDir() {
|
|
80296
|
-
return
|
|
80788
|
+
return path13.join(os15.homedir(), ".cache", "ccstatusline", "skills");
|
|
80297
80789
|
}
|
|
80298
80790
|
function getSkillsFilePath(sessionId) {
|
|
80299
|
-
return
|
|
80791
|
+
return path13.join(getSkillsDir(), `skills-${sessionId}.jsonl`);
|
|
80300
80792
|
}
|
|
80301
80793
|
function getSkillsMetrics(sessionId) {
|
|
80302
80794
|
const filePath = getSkillsFilePath(sessionId);
|
|
@@ -80358,7 +80850,7 @@ function handleHookInput(input) {
|
|
|
80358
80850
|
return;
|
|
80359
80851
|
}
|
|
80360
80852
|
const filePath = getSkillsFilePath(sessionId);
|
|
80361
|
-
fs18.mkdirSync(
|
|
80853
|
+
fs18.mkdirSync(path14.dirname(filePath), { recursive: true });
|
|
80362
80854
|
const entry = JSON.stringify({
|
|
80363
80855
|
timestamp: new Date().toISOString(),
|
|
80364
80856
|
session_id: sessionId,
|