@thi.ng/text-format
Advanced tools
Comparing version 2.0.10 to 2.1.0
import type { StringFormat } from "./api.js"; | ||
export declare const ANSI_RESET = "\u001B[0m"; | ||
export declare const ANSI_SYNC_START = "\u001BP=1s\u001B\\"; | ||
export declare const ANSI_SYNC_END = "\u001BP=2s\u001B\\"; | ||
export declare const ANSI_HOME = "\u001B[H"; | ||
export declare const ANSI_HOME_LINE = "\u001B[0G"; | ||
export declare const ANSI_HOME_PREV_LINE = "\u001B[1F"; | ||
export declare const ANSI_CLEAR_SCREEN = "\u001B[2J"; | ||
export declare const ANSI_CLEAR_LINE = "\u001B[2K"; | ||
/** | ||
@@ -3,0 +11,0 @@ * String format preset, translating canvas format info to ANSI 4bit |
17
ansi.js
import { memoize1 } from "@thi.ng/memoize/memoize1"; | ||
import { defFormat } from "./format.js"; | ||
const ANSI_RESET = `\x1B[0m`; | ||
const ANSI_RESET = "\x1B[0m"; | ||
const ANSI_SYNC_START = "\x1BP=1s\x1B\\"; | ||
const ANSI_SYNC_END = "\x1BP=2s\x1B\\"; | ||
const ANSI_HOME = "\x1B[H"; | ||
const ANSI_HOME_LINE = "\x1B[0G"; | ||
const ANSI_HOME_PREV_LINE = "\x1B[1F"; | ||
const ANSI_CLEAR_SCREEN = "\x1B[2J"; | ||
const ANSI_CLEAR_LINE = "\x1B[2K"; | ||
const ANSI_FLAGS = ["", "1", "2", "1;2", "4", "1;4", "2;4", "1;2;4"]; | ||
@@ -46,2 +53,10 @@ const FMT_ANSI16 = { | ||
export { | ||
ANSI_CLEAR_LINE, | ||
ANSI_CLEAR_SCREEN, | ||
ANSI_HOME, | ||
ANSI_HOME_LINE, | ||
ANSI_HOME_PREV_LINE, | ||
ANSI_RESET, | ||
ANSI_SYNC_END, | ||
ANSI_SYNC_START, | ||
FMT_ANSI16, | ||
@@ -48,0 +63,0 @@ FMT_ANSI256, |
# Change Log | ||
- **Last updated**: 2024-02-10T08:59:57Z | ||
- **Last updated**: 2024-02-19T15:50:26Z | ||
- **Generator**: [thi.ng/monopub](https://thi.ng/monopub) | ||
@@ -12,2 +12,8 @@ | ||
## [2.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/text-format@2.1.0) (2024-02-19) | ||
#### 🚀 Features | ||
- add common ANSI escape seqs ([11231de](https://github.com/thi-ng/umbrella/commit/11231de)) | ||
# [2.0.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/text-format@2.0.0) (2023-12-18) | ||
@@ -14,0 +20,0 @@ |
{ | ||
"name": "@thi.ng/text-format", | ||
"version": "2.0.10", | ||
"version": "2.1.0", | ||
"description": "Customizable color text formatting with presets for ANSI & HTML", | ||
@@ -106,3 +106,3 @@ "type": "module", | ||
}, | ||
"gitHead": "e5e7d5c6ed2eadee7a91d59cbd0c86ce880ab1c5\n" | ||
"gitHead": "ea2ec2e4f14c572bbfac00c43953a6c4033da09e\n" | ||
} |
@@ -204,3 +204,3 @@ <!-- This file is generated - DO NOT EDIT! --> | ||
- [@thi.ng/text-canvas](https://github.com/thi-ng/umbrella/tree/develop/packages/text-canvas) - Text based canvas, drawing, tables with arbitrary formatting (incl. ANSI/HTML) | ||
- [@thi.ng/text-canvas](https://github.com/thi-ng/umbrella/tree/develop/packages/text-canvas) - Text based canvas, drawing, plotting, tables with arbitrary formatting (incl. ANSI/HTML) | ||
@@ -227,3 +227,3 @@ ## Installation | ||
Package sizes (brotli'd, pre-treeshake): ESM: 1.69 KB | ||
Package sizes (brotli'd, pre-treeshake): ESM: 1.80 KB | ||
@@ -230,0 +230,0 @@ ## Dependencies |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
46361
686