@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2024-03-01T15:22:50Z
3
+ - **Last updated**: 2024-03-02T14:05:53Z
4
4
  - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
5
5
 
6
6
  All notable changes to this project will be documented in this file.
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
- setFormat(canvas, FG_BLACK | BG_LIGHT_CYAN | BOLD | UNDERLINE);
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.6",
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.4",
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.72",
42
+ "@thi.ng/geom-clip-line": "^2.3.73",
43
43
  "@thi.ng/math": "^5.10.4",
44
- "@thi.ng/strings": "^3.7.19",
45
- "@thi.ng/text-format": "^2.1.4",
46
- "@thi.ng/transducers": "^8.9.8"
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": "d660ae8fd1bf64d919b4334f19509f1f539d70f6\n"
150
+ "gitHead": "df9e312af741d87e6b450afcfea6a6e381662b1e\n"
151
151
  }