@thi.ng/text-canvas 2.3.2 → 2.3.5
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/bars.d.ts +2 -2
- package/canvas.d.ts +1 -1
- package/circle.d.ts +1 -1
- package/format.d.ts +1 -1
- package/hvline.d.ts +2 -2
- package/image.d.ts +4 -4
- package/line.d.ts +1 -1
- package/package.json +14 -14
- package/text.d.ts +1 -1
package/CHANGELOG.md
CHANGED
package/bars.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const barChartHLines: (height: number, vals: Iterable<number>, min?: number, max?: number) => string[];
|
|
2
|
-
export declare const barChartHStr: (height: number, vals: Iterable<number>, min?: number
|
|
2
|
+
export declare const barChartHStr: (height: number, vals: Iterable<number>, min?: number, max?: number) => string;
|
|
3
3
|
export declare const barChartVLines: (width: number, vals: Iterable<number>, min?: number, max?: number) => string[];
|
|
4
|
-
export declare const barChartVStr: (width: number, vals: Iterable<number>, min?: number
|
|
4
|
+
export declare const barChartVStr: (width: number, vals: Iterable<number>, min?: number, max?: number) => string;
|
|
5
5
|
export declare const barHorizontal: (width: number, x: number, min?: number, max?: number) => string;
|
|
6
6
|
export declare const barVertical: (height: number, x: number, min?: number, max?: number, delim?: string) => string;
|
|
7
7
|
//# sourceMappingURL=bars.d.ts.map
|
package/canvas.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export declare class Canvas implements IGrid2D<Uint32Array, number> {
|
|
|
22
22
|
setAt(x: number, y: number, val: NumOrString): boolean;
|
|
23
23
|
setAtUnsafe(x: number, y: number, col: number): boolean;
|
|
24
24
|
}
|
|
25
|
-
export declare const canvas: (width: number, height: number, format?: number
|
|
25
|
+
export declare const canvas: (width: number, height: number, format?: number, style?: StrokeStyle) => Canvas;
|
|
26
26
|
export declare const beginClip: (canvas: Canvas, x: number, y: number, w: number, h: number) => void;
|
|
27
27
|
export declare const endClip: (canvas: Canvas) => any;
|
|
28
28
|
export declare const withClip: (canvas: Canvas, x: number, y: number, w: number, h: number, fn: Fn0<any>) => void;
|
package/circle.d.ts
CHANGED
|
@@ -12,5 +12,5 @@ import type { Canvas } from "./canvas.js";
|
|
|
12
12
|
* @param char -
|
|
13
13
|
* @param fill -
|
|
14
14
|
*/
|
|
15
|
-
export declare const circle: (canvas: Canvas, cx: number, cy: number, r: number, char?: NumOrString
|
|
15
|
+
export declare const circle: (canvas: Canvas, cx: number, cy: number, r: number, char?: NumOrString, fill?: boolean, format?: number) => void;
|
|
16
16
|
//# sourceMappingURL=circle.d.ts.map
|
package/format.d.ts
CHANGED
|
@@ -8,5 +8,5 @@ import type { Canvas } from "./canvas.js";
|
|
|
8
8
|
* @param canvas -
|
|
9
9
|
* @param format -
|
|
10
10
|
*/
|
|
11
|
-
export declare const formatCanvas: (canvas: Canvas, format?: StringFormat
|
|
11
|
+
export declare const formatCanvas: (canvas: Canvas, format?: StringFormat) => string;
|
|
12
12
|
//# sourceMappingURL=format.d.ts.map
|
package/hvline.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ import type { Canvas } from "./canvas.js";
|
|
|
14
14
|
* @param e -
|
|
15
15
|
* @param m -
|
|
16
16
|
*/
|
|
17
|
-
export declare const hline: (canvas: Canvas, x: number, y: number, len: number, s?: NumOrString
|
|
17
|
+
export declare const hline: (canvas: Canvas, x: number, y: number, len: number, s?: NumOrString, e?: NumOrString, m?: NumOrString, format?: number) => void;
|
|
18
18
|
/**
|
|
19
19
|
* Draws a vertical line from `x`,`y`, taking the current clip rect,
|
|
20
20
|
* format and style into account. The optional `s`, `e` (line endings)
|
|
@@ -29,5 +29,5 @@ export declare const hline: (canvas: Canvas, x: number, y: number, len: number,
|
|
|
29
29
|
* @param e -
|
|
30
30
|
* @param m -
|
|
31
31
|
*/
|
|
32
|
-
export declare const vline: (canvas: Canvas, x: number, y: number, len: number, s?: NumOrString
|
|
32
|
+
export declare const vline: (canvas: Canvas, x: number, y: number, len: number, s?: NumOrString, e?: NumOrString, m?: NumOrString, format?: number) => void;
|
|
33
33
|
//# sourceMappingURL=hvline.d.ts.map
|
package/image.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ export declare const scrollV: (canvas: Canvas, dy: number, clear?: number) => vo
|
|
|
24
24
|
* @param pixels -
|
|
25
25
|
* @param opts -
|
|
26
26
|
*/
|
|
27
|
-
export declare const image: (canvas: Canvas, x: number, y: number, w: number, h: number, pixels: ArrayLike<number>, opts?: Partial<ImageOpts>
|
|
27
|
+
export declare const image: (canvas: Canvas, x: number, y: number, w: number, h: number, pixels: ArrayLike<number>, opts?: Partial<ImageOpts>) => void;
|
|
28
28
|
/**
|
|
29
29
|
* Optimized version of {@link image}, which only uses a single char for all
|
|
30
30
|
* pixels and applies pixel values directly as formatting data (for each pixel).
|
|
@@ -60,7 +60,7 @@ export declare const imageRaw: (canvas: Canvas, x: number, y: number, w: number,
|
|
|
60
60
|
* @param thresh -
|
|
61
61
|
* @param format -
|
|
62
62
|
*/
|
|
63
|
-
export declare const imageBraille: (canvas: Canvas, x: number, y: number, w: number, h: number, pixels: ArrayLike<number>, thresh: number, format?: number
|
|
63
|
+
export declare const imageBraille: (canvas: Canvas, x: number, y: number, w: number, h: number, pixels: ArrayLike<number>, thresh: number, format?: number) => void;
|
|
64
64
|
/**
|
|
65
65
|
* Syntax sugar for {@link imageBraille}. Takes a thi.ng/pixel compatible 8bit
|
|
66
66
|
* grayscale pixel buffer and converts it into a new {@link canvas}.
|
|
@@ -102,7 +102,7 @@ export declare const imageCanvas565: (src: {
|
|
|
102
102
|
width: number;
|
|
103
103
|
height: number;
|
|
104
104
|
data: UIntArray;
|
|
105
|
-
}, char?: string
|
|
105
|
+
}, char?: string) => Canvas;
|
|
106
106
|
/**
|
|
107
107
|
* Same as {@link imageCanvas565}, but returns resulting canvas as 24bit ANSI
|
|
108
108
|
* string.
|
|
@@ -114,5 +114,5 @@ export declare const imageString565: (src: {
|
|
|
114
114
|
width: number;
|
|
115
115
|
height: number;
|
|
116
116
|
data: UIntArray;
|
|
117
|
-
}, char?: string
|
|
117
|
+
}, char?: string, fmt?: import("@thi.ng/text-format").StringFormat) => string;
|
|
118
118
|
//# sourceMappingURL=image.d.ts.map
|
package/line.d.ts
CHANGED
|
@@ -12,5 +12,5 @@ import type { Canvas } from "./canvas.js";
|
|
|
12
12
|
* @param by -
|
|
13
13
|
* @param char -
|
|
14
14
|
*/
|
|
15
|
-
export declare const line: (canvas: Canvas, ax: number, ay: number, bx: number, by: number, char?: NumOrString
|
|
15
|
+
export declare const line: (canvas: Canvas, ax: number, ay: number, bx: number, by: number, char?: NumOrString, format?: number) => void;
|
|
16
16
|
//# sourceMappingURL=line.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/text-canvas",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.5",
|
|
4
4
|
"description": "Text based canvas, drawing, tables with arbitrary formatting (incl. ANSI/HTML)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -34,23 +34,23 @@
|
|
|
34
34
|
"test": "testament test"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@thi.ng/api": "^8.3.
|
|
38
|
-
"@thi.ng/arrays": "^2.2.
|
|
39
|
-
"@thi.ng/checks": "^3.1
|
|
40
|
-
"@thi.ng/geom-clip-line": "^2.1.
|
|
41
|
-
"@thi.ng/math": "^5.3.
|
|
42
|
-
"@thi.ng/strings": "^3.3.
|
|
43
|
-
"@thi.ng/text-format": "^1.1.
|
|
44
|
-
"@thi.ng/transducers": "^8.3.
|
|
37
|
+
"@thi.ng/api": "^8.3.7",
|
|
38
|
+
"@thi.ng/arrays": "^2.2.5",
|
|
39
|
+
"@thi.ng/checks": "^3.2.1",
|
|
40
|
+
"@thi.ng/geom-clip-line": "^2.1.14",
|
|
41
|
+
"@thi.ng/math": "^5.3.3",
|
|
42
|
+
"@thi.ng/strings": "^3.3.5",
|
|
43
|
+
"@thi.ng/text-format": "^1.1.7",
|
|
44
|
+
"@thi.ng/transducers": "^8.3.5"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@microsoft/api-extractor": "^7.
|
|
48
|
-
"@thi.ng/testament": "^0.2.
|
|
47
|
+
"@microsoft/api-extractor": "^7.25.0",
|
|
48
|
+
"@thi.ng/testament": "^0.2.8",
|
|
49
49
|
"rimraf": "^3.0.2",
|
|
50
50
|
"tools": "^0.0.1",
|
|
51
51
|
"tslib": "^2.4.0",
|
|
52
|
-
"typedoc": "^0.22.
|
|
53
|
-
"typescript": "^4.
|
|
52
|
+
"typedoc": "^0.22.17",
|
|
53
|
+
"typescript": "^4.7.3"
|
|
54
54
|
},
|
|
55
55
|
"keywords": [
|
|
56
56
|
"4bit",
|
|
@@ -138,5 +138,5 @@
|
|
|
138
138
|
],
|
|
139
139
|
"year": 2020
|
|
140
140
|
},
|
|
141
|
-
"gitHead": "
|
|
141
|
+
"gitHead": "ab0188234419f2d9f471de80871df930e5555bd6\n"
|
|
142
142
|
}
|
package/text.d.ts
CHANGED
|
@@ -42,5 +42,5 @@ export declare const textColumn: (canvas: Canvas, x: number, y: number, width: n
|
|
|
42
42
|
* @param txt -
|
|
43
43
|
* @param opts -
|
|
44
44
|
*/
|
|
45
|
-
export declare const textBox: (canvas: Canvas, x: number, y: number, width: number, height: number, txt: string, opts?: Partial<TextBoxOpts>
|
|
45
|
+
export declare const textBox: (canvas: Canvas, x: number, y: number, width: number, height: number, txt: string, opts?: Partial<TextBoxOpts>) => number;
|
|
46
46
|
//# sourceMappingURL=text.d.ts.map
|