@opentuah/core 0.1.80 → 0.1.81
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/3d.js +1 -1
- package/{index-0envey0s.js → index-eh2t2dzk.js} +2 -5
- package/{index-0envey0s.js.map → index-eh2t2dzk.js.map} +3 -3
- package/index.js +20 -34
- package/index.js.map +4 -4
- package/lib/RGBA.d.ts +0 -1
- package/package.json +7 -7
- package/renderables/Diff.d.ts +8 -11
- package/renderables/LineNumberRenderable.d.ts +0 -15
- package/testing.js +1 -1
package/lib/RGBA.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
6
|
"type": "module",
|
|
7
|
-
"version": "0.1.
|
|
7
|
+
"version": "0.1.81",
|
|
8
8
|
"description": "OpenTUI is a TypeScript library for building terminal user interfaces (TUIs)",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"repository": {
|
|
@@ -57,11 +57,11 @@
|
|
|
57
57
|
"bun-webgpu": "0.1.4",
|
|
58
58
|
"planck": "^1.4.2",
|
|
59
59
|
"three": "0.177.0",
|
|
60
|
-
"@opentuah/core-darwin-x64": "0.1.
|
|
61
|
-
"@opentuah/core-darwin-arm64": "0.1.
|
|
62
|
-
"@opentuah/core-linux-x64": "0.1.
|
|
63
|
-
"@opentuah/core-linux-arm64": "0.1.
|
|
64
|
-
"@opentuah/core-win32-x64": "0.1.
|
|
65
|
-
"@opentuah/core-win32-arm64": "0.1.
|
|
60
|
+
"@opentuah/core-darwin-x64": "0.1.81",
|
|
61
|
+
"@opentuah/core-darwin-arm64": "0.1.81",
|
|
62
|
+
"@opentuah/core-linux-x64": "0.1.81",
|
|
63
|
+
"@opentuah/core-linux-arm64": "0.1.81",
|
|
64
|
+
"@opentuah/core-win32-x64": "0.1.81",
|
|
65
|
+
"@opentuah/core-win32-arm64": "0.1.81"
|
|
66
66
|
}
|
|
67
67
|
}
|
package/renderables/Diff.d.ts
CHANGED
|
@@ -3,12 +3,6 @@ import type { RenderContext } from "../types";
|
|
|
3
3
|
import { RGBA } from "../lib/RGBA";
|
|
4
4
|
import { SyntaxStyle } from "../syntax-style";
|
|
5
5
|
import type { TreeSitterClient } from "../lib/tree-sitter";
|
|
6
|
-
/** Represents a highlighted span within a line for word-level diff */
|
|
7
|
-
interface InlineHighlight {
|
|
8
|
-
startCol: number;
|
|
9
|
-
endCol: number;
|
|
10
|
-
type: "added-word" | "removed-word";
|
|
11
|
-
}
|
|
12
6
|
/** Represents a range within a string */
|
|
13
7
|
interface IRange {
|
|
14
8
|
location: number;
|
|
@@ -19,9 +13,13 @@ export declare function relativeChanges(stringA: string, stringB: string): {
|
|
|
19
13
|
stringARange: IRange;
|
|
20
14
|
stringBRange: IRange;
|
|
21
15
|
};
|
|
16
|
+
interface ColumnRange {
|
|
17
|
+
startCol: number;
|
|
18
|
+
endCol: number;
|
|
19
|
+
}
|
|
22
20
|
export declare function computeInlineHighlights(oldContent: string, newContent: string): {
|
|
23
|
-
oldHighlight:
|
|
24
|
-
newHighlight:
|
|
21
|
+
oldHighlight: ColumnRange | null;
|
|
22
|
+
newHighlight: ColumnRange | null;
|
|
25
23
|
};
|
|
26
24
|
export interface DiffRenderableOptions extends RenderableOptions<DiffRenderable> {
|
|
27
25
|
diff?: string;
|
|
@@ -55,12 +53,12 @@ export interface DiffRenderableOptions extends RenderableOptions<DiffRenderable>
|
|
|
55
53
|
disableWordHighlights?: boolean;
|
|
56
54
|
/**
|
|
57
55
|
* Background color for added words within modified lines.
|
|
58
|
-
* @default addedBg.brighten(1.
|
|
56
|
+
* @default addedBg.brighten(1.10)
|
|
59
57
|
*/
|
|
60
58
|
addedWordBg?: string | RGBA;
|
|
61
59
|
/**
|
|
62
60
|
* Background color for removed words within modified lines.
|
|
63
|
-
* @default removedBg.brighten(1.
|
|
61
|
+
* @default removedBg.brighten(1.10)
|
|
64
62
|
*/
|
|
65
63
|
removedWordBg?: string | RGBA;
|
|
66
64
|
hunkHeaderBg?: string | RGBA;
|
|
@@ -110,7 +108,6 @@ export declare class DiffRenderable extends Renderable {
|
|
|
110
108
|
private _waitingForHighlight;
|
|
111
109
|
private _lineInfoChangeHandler;
|
|
112
110
|
constructor(ctx: RenderContext, options: DiffRenderableOptions);
|
|
113
|
-
private toLineHighlights;
|
|
114
111
|
private processChangeBlockWithHighlights;
|
|
115
112
|
private static readonly HUNK_HEADER_RE;
|
|
116
113
|
private parseDiff;
|
|
@@ -89,23 +89,8 @@ export declare class LineNumberRenderable extends Renderable {
|
|
|
89
89
|
* @param inlineHighlights - Map from logical line index to array of highlights
|
|
90
90
|
*/
|
|
91
91
|
setInlineHighlights(inlineHighlights: Map<number, LineInlineHighlight[]>): void;
|
|
92
|
-
/**
|
|
93
|
-
* Gets the current inline highlights.
|
|
94
|
-
*/
|
|
95
|
-
getInlineHighlights(): Map<number, LineInlineHighlight[]>;
|
|
96
92
|
/**
|
|
97
93
|
* Clears all inline highlights.
|
|
98
94
|
*/
|
|
99
95
|
clearInlineHighlights(): void;
|
|
100
|
-
/**
|
|
101
|
-
* Sets inline highlights for a specific line.
|
|
102
|
-
*
|
|
103
|
-
* @param line - Logical line index
|
|
104
|
-
* @param highlights - Array of highlights for this line
|
|
105
|
-
*/
|
|
106
|
-
setLineInlineHighlights(line: number, highlights: LineInlineHighlight[]): void;
|
|
107
|
-
/**
|
|
108
|
-
* Clears inline highlights for a specific line.
|
|
109
|
-
*/
|
|
110
|
-
clearLineInlineHighlights(line: number): void;
|
|
111
96
|
}
|