@thi.ng/text-canvas 3.0.5 → 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 +10 -13
- package/package.json +11 -11
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -1,16 +1,5 @@
|
|
|
1
1
|
<!-- This file is generated - DO NOT EDIT! -->
|
|
2
2
|
<!-- Please see: https://github.com/thi-ng/umbrella/blob/develop/CONTRIBUTING.md#changes-to-readme-files -->
|
|
3
|
-
> [!IMPORTANT]
|
|
4
|
-
> ‼️ Announcing the thi.ng user survey 2024 📋
|
|
5
|
-
>
|
|
6
|
-
> [Please participate in the survey here!](https://forms.gle/XacbSDEmQMPZg8197)\
|
|
7
|
-
> (open until end of February)
|
|
8
|
-
>
|
|
9
|
-
> **To achieve a better sample size, I'd highly appreciate if you could
|
|
10
|
-
> circulate the link to this survey in your own networks.**
|
|
11
|
-
>
|
|
12
|
-
> [Discussion](https://github.com/thi-ng/umbrella/discussions/447)
|
|
13
|
-
|
|
14
3
|
# 
|
|
15
4
|
|
|
16
5
|
[](https://www.npmjs.com/package/@thi.ng/text-canvas)
|
|
@@ -22,7 +11,7 @@
|
|
|
22
11
|
> of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo
|
|
23
12
|
> and anti-framework.
|
|
24
13
|
>
|
|
25
|
-
> 🚀
|
|
14
|
+
> 🚀 Please help me to work full-time on these projects by [sponsoring me on
|
|
26
15
|
> GitHub](https://github.com/sponsors/postspectacular). Thank you! ❤️
|
|
27
16
|
|
|
28
17
|
- [About](#about)
|
|
@@ -119,6 +108,8 @@ directory are using this package:
|
|
|
119
108
|
### Canvas creation
|
|
120
109
|
|
|
121
110
|
```ts
|
|
111
|
+
import { canvas } from "@thi.ng/text-canvas";
|
|
112
|
+
|
|
122
113
|
const c = canvas(width, height, format?, style?);
|
|
123
114
|
```
|
|
124
115
|
|
|
@@ -184,7 +175,10 @@ These color IDs MUST be prefixed with either `FG_` (foreground) or `BG_`
|
|
|
184
175
|
Format IDs can be combined via the binary OR operator (`|`), e.g.:
|
|
185
176
|
|
|
186
177
|
```ts
|
|
187
|
-
|
|
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);
|
|
188
182
|
```
|
|
189
183
|
|
|
190
184
|
### String conversion format presets
|
|
@@ -207,6 +201,9 @@ package):
|
|
|
207
201
|
information discarded, e.g. for [`NO_COLOR`](https://no-color.org/) support)
|
|
208
202
|
|
|
209
203
|
```ts
|
|
204
|
+
import { formatCanvas } from "@thi.ng/text-canvas";
|
|
205
|
+
import { FMT_ANSI16, FMT_HTML_TACHYONS } from "@thi.ng/text-format";
|
|
206
|
+
|
|
210
207
|
// Terminal
|
|
211
208
|
process.stdout.write(formatCanvas(canvas, FMT_ANSI16));
|
|
212
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",
|
|
@@ -35,15 +35,15 @@
|
|
|
35
35
|
"test": "bun test"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@thi.ng/api": "^8.9.
|
|
39
|
-
"@thi.ng/arrays": "^2.8.
|
|
40
|
-
"@thi.ng/checks": "^3.5.
|
|
41
|
-
"@thi.ng/errors": "^2.4.
|
|
42
|
-
"@thi.ng/geom-clip-line": "^2.3.
|
|
43
|
-
"@thi.ng/math": "^5.10.
|
|
44
|
-
"@thi.ng/strings": "^3.7.
|
|
45
|
-
"@thi.ng/text-format": "^2.1.
|
|
46
|
-
"@thi.ng/transducers": "^8.9.
|
|
38
|
+
"@thi.ng/api": "^8.9.27",
|
|
39
|
+
"@thi.ng/arrays": "^2.8.5",
|
|
40
|
+
"@thi.ng/checks": "^3.5.1",
|
|
41
|
+
"@thi.ng/errors": "^2.4.19",
|
|
42
|
+
"@thi.ng/geom-clip-line": "^2.3.73",
|
|
43
|
+
"@thi.ng/math": "^5.10.4",
|
|
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
|
}
|