@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/lib/RGBA.d.ts CHANGED
@@ -17,7 +17,6 @@ export declare class RGBA {
17
17
  map<R>(fn: (value: number) => R): R[];
18
18
  toString(): string;
19
19
  brighten(factor: number): RGBA;
20
- withAlpha(alpha: number): RGBA;
21
20
  equals(other?: RGBA): boolean;
22
21
  }
23
22
  export type ColorInput = string | RGBA;
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.80",
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.80",
61
- "@opentuah/core-darwin-arm64": "0.1.80",
62
- "@opentuah/core-linux-x64": "0.1.80",
63
- "@opentuah/core-linux-arm64": "0.1.80",
64
- "@opentuah/core-win32-x64": "0.1.80",
65
- "@opentuah/core-win32-arm64": "0.1.80"
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
  }
@@ -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: InlineHighlight | null;
24
- newHighlight: InlineHighlight | null;
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.15)
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.15)
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
  }
package/testing.js CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  CliRenderer,
5
5
  TreeSitterClient,
6
6
  resolveRenderLib
7
- } from "./index-0envey0s.js";
7
+ } from "./index-eh2t2dzk.js";
8
8
 
9
9
  // src/testing/test-renderer.ts
10
10
  import { Readable } from "stream";