@thi.ng/text-canvas 3.0.6 → 3.0.7
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/CHANGELOG.md +1 -1
- package/README.md +9 -1
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -108,6 +108,8 @@ directory are using this package:
|
|
|
108
108
|
### Canvas creation
|
|
109
109
|
|
|
110
110
|
```ts
|
|
111
|
+
import { canvas } from "@thi.ng/text-canvas";
|
|
112
|
+
|
|
111
113
|
const c = canvas(width, height, format?, style?);
|
|
112
114
|
```
|
|
113
115
|
|
|
@@ -173,7 +175,10 @@ These color IDs MUST be prefixed with either `FG_` (foreground) or `BG_`
|
|
|
173
175
|
Format IDs can be combined via the binary OR operator (`|`), e.g.:
|
|
174
176
|
|
|
175
177
|
```ts
|
|
176
|
-
|
|
178
|
+
import { setFormat } from "@thi.ng/text-canvas";
|
|
179
|
+
import * as tf from "@thi.ng/text-format";
|
|
180
|
+
|
|
181
|
+
setFormat(canvas, tf.FG_BLACK | tf.BG_LIGHT_CYAN | tf.BOLD | tf.UNDERLINE);
|
|
177
182
|
```
|
|
178
183
|
|
|
179
184
|
### String conversion format presets
|
|
@@ -196,6 +201,9 @@ package):
|
|
|
196
201
|
information discarded, e.g. for [`NO_COLOR`](https://no-color.org/) support)
|
|
197
202
|
|
|
198
203
|
```ts
|
|
204
|
+
import { formatCanvas } from "@thi.ng/text-canvas";
|
|
205
|
+
import { FMT_ANSI16, FMT_HTML_TACHYONS } from "@thi.ng/text-format";
|
|
206
|
+
|
|
199
207
|
// Terminal
|
|
200
208
|
process.stdout.write(formatCanvas(canvas, FMT_ANSI16));
|
|
201
209
|
// or
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/text-canvas",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.7",
|
|
4
4
|
"description": "Text based canvas, drawing, plotting, tables with arbitrary formatting (incl. ANSI/HTML)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -36,14 +36,14 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@thi.ng/api": "^8.9.27",
|
|
39
|
-
"@thi.ng/arrays": "^2.8.
|
|
39
|
+
"@thi.ng/arrays": "^2.8.5",
|
|
40
40
|
"@thi.ng/checks": "^3.5.1",
|
|
41
41
|
"@thi.ng/errors": "^2.4.19",
|
|
42
|
-
"@thi.ng/geom-clip-line": "^2.3.
|
|
42
|
+
"@thi.ng/geom-clip-line": "^2.3.73",
|
|
43
43
|
"@thi.ng/math": "^5.10.4",
|
|
44
|
-
"@thi.ng/strings": "^3.7.
|
|
45
|
-
"@thi.ng/text-format": "^2.1.
|
|
46
|
-
"@thi.ng/transducers": "^8.9.
|
|
44
|
+
"@thi.ng/strings": "^3.7.20",
|
|
45
|
+
"@thi.ng/text-format": "^2.1.5",
|
|
46
|
+
"@thi.ng/transducers": "^8.9.9"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@microsoft/api-extractor": "^7.40.1",
|
|
@@ -147,5 +147,5 @@
|
|
|
147
147
|
],
|
|
148
148
|
"year": 2020
|
|
149
149
|
},
|
|
150
|
-
"gitHead": "
|
|
150
|
+
"gitHead": "df9e312af741d87e6b450afcfea6a6e381662b1e\n"
|
|
151
151
|
}
|