tinky 1.4.4 → 1.6.0
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/README.ja-JP.md +40 -0
- package/README.md +39 -0
- package/README.zh-CN.md +38 -0
- package/lib/components/Text.js +10 -3
- package/lib/core/cell-buffer.d.ts +89 -0
- package/lib/core/cell-buffer.js +288 -0
- package/lib/core/cell-log-update-run.d.ts +39 -0
- package/lib/core/cell-log-update-run.js +518 -0
- package/lib/core/cell-output.d.ts +13 -0
- package/lib/core/cell-output.js +107 -0
- package/lib/core/cell-renderer.d.ts +25 -0
- package/lib/core/cell-renderer.js +60 -0
- package/lib/core/incremental-rendering.d.ts +43 -0
- package/lib/core/incremental-rendering.js +22 -0
- package/lib/core/output.d.ts +18 -6
- package/lib/core/output.js +61 -8
- package/lib/core/render-border.d.ts +2 -2
- package/lib/core/render-node-to-output.d.ts +2 -2
- package/lib/core/render.d.ts +16 -4
- package/lib/core/tinky.d.ts +28 -3
- package/lib/core/tinky.js +127 -5
- package/lib/index.d.ts +1 -0
- package/lib/utils/ansi-escapes.d.ts +2 -0
- package/lib/utils/ansi-escapes.js +2 -0
- package/lib/utils/render-background.d.ts +2 -2
- package/package.json +1 -1
|
@@ -2,6 +2,7 @@ export declare const cursorTo: (x: number, y?: number) => string;
|
|
|
2
2
|
export declare const cursorUp: (count?: number) => string;
|
|
3
3
|
export declare const cursorNextLine = "\u001B[E";
|
|
4
4
|
export declare const cursorLeft = "\u001B[G";
|
|
5
|
+
export declare const cursorForward: (count?: number) => string;
|
|
5
6
|
export declare const eraseEndLine = "\u001B[K";
|
|
6
7
|
export declare const eraseLine = "\u001B[2K";
|
|
7
8
|
export declare const eraseLines: (count: number) => string;
|
|
@@ -11,6 +12,7 @@ declare const ansiEscapes: {
|
|
|
11
12
|
cursorUp: (count?: number) => string;
|
|
12
13
|
cursorNextLine: string;
|
|
13
14
|
cursorLeft: string;
|
|
15
|
+
cursorForward: (count?: number) => string;
|
|
14
16
|
eraseEndLine: string;
|
|
15
17
|
eraseLine: string;
|
|
16
18
|
eraseLines: (count: number) => string;
|
|
@@ -11,6 +11,7 @@ export const cursorTo = (x, y) => {
|
|
|
11
11
|
export const cursorUp = (count = 1) => `${ESC}${count}A`;
|
|
12
12
|
export const cursorNextLine = `${ESC}E`;
|
|
13
13
|
export const cursorLeft = `${ESC}G`;
|
|
14
|
+
export const cursorForward = (count = 1) => `${ESC}${count}C`;
|
|
14
15
|
export const eraseEndLine = `${ESC}K`;
|
|
15
16
|
export const eraseLine = `${ESC}2K`;
|
|
16
17
|
export const eraseLines = (count) => {
|
|
@@ -29,6 +30,7 @@ const ansiEscapes = {
|
|
|
29
30
|
cursorUp,
|
|
30
31
|
cursorNextLine,
|
|
31
32
|
cursorLeft,
|
|
33
|
+
cursorForward,
|
|
32
34
|
eraseEndLine,
|
|
33
35
|
eraseLine,
|
|
34
36
|
eraseLines,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type DOMNode } from "../core/dom.js";
|
|
2
|
-
import { type
|
|
2
|
+
import { type OutputLike } from "../core/output.js";
|
|
3
3
|
/**
|
|
4
4
|
* Renders the background color of a node to the output.
|
|
5
5
|
*
|
|
@@ -8,4 +8,4 @@ import { type Output } from "../core/output.js";
|
|
|
8
8
|
* @param node - The DOM node to render the background for.
|
|
9
9
|
* @param output - The output instance to write to.
|
|
10
10
|
*/
|
|
11
|
-
export declare const renderBackground: (x: number, y: number, node: DOMNode, output:
|
|
11
|
+
export declare const renderBackground: (x: number, y: number, node: DOMNode, output: OutputLike) => void;
|