@opentui/core 0.5.6 → 0.5.8

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/editor-view.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { RGBA } from "./lib/RGBA.js";
2
2
  import { type EditorViewHandle, type RenderLib, type VisualCursor, type LineInfo } from "./zig.js";
3
3
  import type { EditBuffer } from "./edit-buffer.js";
4
+ import type { SelectionBehavior, SelectionOccupancy } from "./types.js";
4
5
  export interface Viewport {
5
6
  offsetY: number;
6
7
  offsetX: number;
@@ -34,9 +35,14 @@ export declare class EditorView {
34
35
  end: number;
35
36
  } | null;
36
37
  hasSelection(): boolean;
37
- setLocalSelection(anchorX: number, anchorY: number, focusX: number, focusY: number, bgColor?: RGBA, fgColor?: RGBA, updateCursor?: boolean, followCursor?: boolean): boolean;
38
- updateLocalSelection(anchorX: number, anchorY: number, focusX: number, focusY: number, bgColor?: RGBA, fgColor?: RGBA, updateCursor?: boolean, followCursor?: boolean): boolean;
38
+ setLocalSelection(anchorX: number, anchorY: number, focusX: number, focusY: number, bgColor?: RGBA, fgColor?: RGBA, updateCursor?: boolean, followCursor?: boolean, behavior?: SelectionBehavior): boolean;
39
+ updateLocalSelection(anchorX: number, anchorY: number, focusX: number, focusY: number, bgColor?: RGBA, fgColor?: RGBA, updateCursor?: boolean, followCursor?: boolean, behavior?: SelectionBehavior): boolean;
39
40
  resetLocalSelection(): void;
41
+ convertSelectionToCell(): boolean;
42
+ setSelectionOccupancy(occupancy: SelectionOccupancy): void;
43
+ getSelectionOccupancy(): SelectionOccupancy;
44
+ setSelectionInclusive(start: number, end: number, bgColor?: RGBA, fgColor?: RGBA): void;
45
+ setSelectionColors(bgColor?: RGBA, fgColor?: RGBA): void;
40
46
  getSelectedText(): string;
41
47
  getCursor(): {
42
48
  row: number;
@@ -53,6 +59,7 @@ export declare class EditorView {
53
59
  getEOL(): VisualCursor;
54
60
  getVisualSOL(): VisualCursor;
55
61
  getVisualEOL(): VisualCursor;
62
+ gotoVisualLineEnd(): void;
56
63
  getLineInfo(): LineInfo;
57
64
  getLogicalLineInfo(): LineInfo;
58
65
  get extmarks(): any;
package/index.bun.js CHANGED
@@ -44,7 +44,7 @@ import {
44
44
  mergeKeyAliases,
45
45
  mergeKeyBindings,
46
46
  wrapWithDelegates
47
- } from "./chunk-bun-da1keqyp.js";
47
+ } from "./chunk-bun-b3exa82d.js";
48
48
  import {
49
49
  ASCIIFontSelectionHelper,
50
50
  ATTRIBUTE_BASE_BITS,
@@ -204,7 +204,7 @@ import {
204
204
  visualizeRenderableTree,
205
205
  white,
206
206
  yellow
207
- } from "./chunk-bun-9335djz2.js";
207
+ } from "./chunk-bun-2956gvaq.js";
208
208
  // src/post/effects.ts
209
209
  function toU8(value) {
210
210
  return Math.round(Math.max(0, Math.min(1, Number.isFinite(value) ? value : 0)) * 255);
@@ -6219,7 +6219,7 @@ class ASCIIFontRenderable extends FrameBufferRenderable {
6219
6219
  this.renderFontToBuffer();
6220
6220
  this.requestRender();
6221
6221
  }
6222
- return changed;
6222
+ return this.selectionHelper.hasSelection();
6223
6223
  }
6224
6224
  getSelectedText() {
6225
6225
  const selection = this.selectionHelper.getSelection();
@@ -15570,5 +15570,5 @@ export {
15570
15570
  ACHROMATOPSIA_MATRIX
15571
15571
  };
15572
15572
 
15573
- //# debugId=0F3B0F5C55684C0564756E2164756E21
15573
+ //# debugId=C0029738F074C79064756E2164756E21
15574
15574
  //# sourceMappingURL=index.bun.js.map