From 0367ad8c8515a97248a57e821d115082594e1c65 Mon Sep 17 00:00:00 2001 From: Yash-Singh1 Date: Sun, 17 Jan 2021 20:09:03 -0800 Subject: [PATCH 1/7] Added overline --- index.d.ts | 7 ++++++- index.js | 1 + index.test-d.ts | 1 + readme.md | 1 + 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index 723c2d4..39774ef 100644 --- a/index.d.ts +++ b/index.d.ts @@ -48,6 +48,11 @@ declare namespace ansiStyles { */ readonly underline: CSPair; + /** + Make text overline. (Not widely supported) + */ + readonly overline: CSPair; + /** Inverse background and foreground colors. */ @@ -139,7 +144,7 @@ declare namespace ansiStyles { @param hex - A hexadecimal string containing RGB data. */ - hexToRgb(hex: string): [red: number, green: number, blue: number]; + hexToRgb(hex: string): [number, number, number]; /** Convert from the RGB HEX color space to the ANSI 256 color space. diff --git a/index.js b/index.js index 6eca670..6489b01 100644 --- a/index.js +++ b/index.js @@ -16,6 +16,7 @@ function assembleStyles() { dim: [2, 22], italic: [3, 23], underline: [4, 24], + overline: [53, 55], inverse: [7, 27], hidden: [8, 28], strikethrough: [9, 29] diff --git a/index.test-d.ts b/index.test-d.ts index ac256ec..9979cb8 100644 --- a/index.test-d.ts +++ b/index.test-d.ts @@ -62,6 +62,7 @@ expectType(ansiStyles.modifier.italic); expectType(ansiStyles.modifier.reset); expectType(ansiStyles.modifier.strikethrough); expectType(ansiStyles.modifier.underline); +expectType(ansiStyles.modifier.overline); // -- Top level -- // --- Foreground color --- diff --git a/readme.md b/readme.md index d9793f8..2b7875c 100644 --- a/readme.md +++ b/readme.md @@ -42,6 +42,7 @@ Each style has an `open` and `close` property. - `dim` - `italic` *(Not widely supported)* - `underline` +- `overline` *(Not widely supported)* - `inverse` - `hidden` - `strikethrough` *(Not widely supported)* From cdb1bb73b7d8e4510d40fb08efcaeade15e075ca Mon Sep 17 00:00:00 2001 From: Yash-Singh1 Date: Mon, 18 Jan 2021 13:51:06 -0800 Subject: [PATCH 2/7] Reverted removal of red, green, blue --- index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index 39774ef..1b81e8f 100644 --- a/index.d.ts +++ b/index.d.ts @@ -144,7 +144,7 @@ declare namespace ansiStyles { @param hex - A hexadecimal string containing RGB data. */ - hexToRgb(hex: string): [number, number, number]; + hexToRgb(hex: string): [red: number, green: number, blue: number]; /** Convert from the RGB HEX color space to the ANSI 256 color space. From e20eb46ba1b03f275da48fa001eb23b2c3289c46 Mon Sep 17 00:00:00 2001 From: Yash-Singh1 Date: Mon, 18 Jan 2021 14:10:46 -0800 Subject: [PATCH 3/7] Added support info for overline --- index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index 1b81e8f..0067645 100644 --- a/index.d.ts +++ b/index.d.ts @@ -49,7 +49,7 @@ declare namespace ansiStyles { readonly underline: CSPair; /** - Make text overline. (Not widely supported) + Make text overline. Supported on VTE-based terminals, the GNOME terminal, mintty, and Git Bash */ readonly overline: CSPair; From 2826cf5f40624aa23bfe0fd00a3b21c26b2c5dc8 Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Tue, 19 Jan 2021 18:11:07 +0700 Subject: [PATCH 4/7] Update index.d.ts --- index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index 0067645..ec4e290 100644 --- a/index.d.ts +++ b/index.d.ts @@ -49,7 +49,7 @@ declare namespace ansiStyles { readonly underline: CSPair; /** - Make text overline. Supported on VTE-based terminals, the GNOME terminal, mintty, and Git Bash + Make text overline. Supported on VTE-based terminals, the GNOME terminal, mintty, and Git Bash. */ readonly overline: CSPair; From bcf6fe88adec5c385fc6b8520b6c93268ccfd857 Mon Sep 17 00:00:00 2001 From: Yash Singh Date: Tue, 19 Jan 2021 08:43:07 -0800 Subject: [PATCH 5/7] Synced README and index.d.ts --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 2b7875c..d5f1029 100644 --- a/readme.md +++ b/readme.md @@ -42,7 +42,7 @@ Each style has an `open` and `close` property. - `dim` - `italic` *(Not widely supported)* - `underline` -- `overline` *(Not widely supported)* +- `overline` *Supported on VTE-based terminals, the GNOME terminal, mintty, and Git Bash* - `inverse` - `hidden` - `strikethrough` *(Not widely supported)* From f2893ae5c6709768f333451ea6b27c7d1595c59e Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Fri, 22 Jan 2021 21:20:03 +0700 Subject: [PATCH 6/7] Update readme.md --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index d5f1029..719dd9a 100644 --- a/readme.md +++ b/readme.md @@ -42,7 +42,7 @@ Each style has an `open` and `close` property. - `dim` - `italic` *(Not widely supported)* - `underline` -- `overline` *Supported on VTE-based terminals, the GNOME terminal, mintty, and Git Bash* +- `overline` *Supported on VTE-based terminals, the GNOME terminal, mintty, and Git Bash.* - `inverse` - `hidden` - `strikethrough` *(Not widely supported)* From 1861481c386b66a07583dff4adfc99b53f01f609 Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Fri, 22 Jan 2021 21:20:39 +0700 Subject: [PATCH 7/7] Update index.d.ts --- index.d.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index ec4e290..54eedbc 100644 --- a/index.d.ts +++ b/index.d.ts @@ -49,7 +49,9 @@ declare namespace ansiStyles { readonly underline: CSPair; /** - Make text overline. Supported on VTE-based terminals, the GNOME terminal, mintty, and Git Bash. + Make text overline. + + Supported on VTE-based terminals, the GNOME terminal, mintty, and Git Bash. */ readonly overline: CSPair;