bingocode 1.1.73 → 1.1.74
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/package.json
CHANGED
|
@@ -7,7 +7,7 @@ const repeatChar = (ch: string, n: number) => ch.repeat(Math.max(0, n));
|
|
|
7
7
|
// Truncate by terminal display width
|
|
8
8
|
const charDisplayWidth = (c: string) => c.charCodeAt(0) > 127 ? 2 : 1;
|
|
9
9
|
const displayWidth = (s: string) => [...s].reduce((acc, c) => acc + charDisplayWidth(c), 0);
|
|
10
|
-
const truncate = (s: string, maxCols: number) => {
|
|
10
|
+
export const truncate = (s: string, maxCols: number) => {
|
|
11
11
|
let cols = 0;
|
|
12
12
|
let out = '';
|
|
13
13
|
for (const c of s) {
|
|
@@ -295,5 +295,5 @@ export const InfoPair: React.FC<{ label: string; value: string; labelColor?: str
|
|
|
295
295
|
});
|
|
296
296
|
|
|
297
297
|
export default {
|
|
298
|
-
Kbd, Hint, Title, Divider, Panel, FallbackTop, TopBar, BottomBar, Chip, ChipRow, InfoPair
|
|
298
|
+
Kbd, Hint, Title, Divider, Panel, FallbackTop, TopBar, BottomBar, Chip, ChipRow, InfoPair, safePadEnd, truncate
|
|
299
299
|
};
|