mirror of
https://github.com/jarrodwatts/claude-hud.git
synced 2026-05-21 07:22:44 +00:00
build: compile dist/ [auto]
This commit is contained in:
2
dist/utils/terminal.d.ts
vendored
Normal file
2
dist/utils/terminal.d.ts
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export declare function getAdaptiveBarWidth(): number;
|
||||
//# sourceMappingURL=terminal.d.ts.map
|
||||
1
dist/utils/terminal.d.ts.map
vendored
Normal file
1
dist/utils/terminal.d.ts.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"terminal.d.ts","sourceRoot":"","sources":["../../src/utils/terminal.ts"],"names":[],"mappings":"AAEA,wBAAgB,mBAAmB,IAAI,MAAM,CAY5C"}
|
||||
17
dist/utils/terminal.js
vendored
Normal file
17
dist/utils/terminal.js
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
// Returns a progress bar width scaled to the current terminal width.
|
||||
// Wide (>=100): 10, Medium (60-99): 6, Narrow (<60): 4. Defaults to 10.
|
||||
export function getAdaptiveBarWidth() {
|
||||
const stdoutCols = process.stdout?.columns;
|
||||
const cols = (typeof stdoutCols === 'number' && Number.isFinite(stdoutCols) && stdoutCols > 0)
|
||||
? Math.floor(stdoutCols)
|
||||
: Number.parseInt(process.env.COLUMNS ?? '', 10);
|
||||
if (Number.isFinite(cols) && cols > 0) {
|
||||
if (cols >= 100)
|
||||
return 10;
|
||||
if (cols >= 60)
|
||||
return 6;
|
||||
return 4;
|
||||
}
|
||||
return 10;
|
||||
}
|
||||
//# sourceMappingURL=terminal.js.map
|
||||
1
dist/utils/terminal.js.map
vendored
Normal file
1
dist/utils/terminal.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"terminal.js","sourceRoot":"","sources":["../../src/utils/terminal.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,wEAAwE;AACxE,MAAM,UAAU,mBAAmB;IACjC,MAAM,UAAU,GAAG,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC;IAC3C,MAAM,IAAI,GAAG,CAAC,OAAO,UAAU,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,UAAU,GAAG,CAAC,CAAC;QAC5F,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC;QACxB,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;IAEnD,IAAI,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,CAAC,EAAE,CAAC;QACtC,IAAI,IAAI,IAAI,GAAG;YAAE,OAAO,EAAE,CAAC;QAC3B,IAAI,IAAI,IAAI,EAAE;YAAE,OAAO,CAAC,CAAC;QACzB,OAAO,CAAC,CAAC;IACX,CAAC;IACD,OAAO,EAAE,CAAC;AACZ,CAAC"}
|
||||
Reference in New Issue
Block a user