@opentui/core 0.1.98 → 0.1.100
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/Renderable.d.ts +6 -0
- package/{index-ks829haj.js → index-86ppjrgv.js} +27 -10
- package/{index-ks829haj.js.map → index-86ppjrgv.js.map} +5 -5
- package/{index-qs64hr08.js → index-nr5q8nyn.js} +3 -3
- package/{index-e4g80551.js → index-zkcykvp8.js} +153 -75
- package/{index-e4g80551.js.map → index-zkcykvp8.js.map} +9 -9
- package/index.js +2 -2
- package/lib/objects-in-viewport.d.ts +4 -4
- package/lib/tree-sitter/default-parsers.d.ts +1 -1
- package/package.json +7 -7
- package/renderables/ScrollBox.d.ts +1 -0
- package/renderer.d.ts +8 -0
- package/runtime-plugin-support.js +3 -3
- package/runtime-plugin.js +3 -3
- package/testing.js +1 -1
- package/types.d.ts +2 -0
- /package/{index-qs64hr08.js.map → index-nr5q8nyn.js.map} +0 -0
package/index.js
CHANGED
|
@@ -79,7 +79,7 @@ import {
|
|
|
79
79
|
registerCorePlugin,
|
|
80
80
|
resolveCoreSlot,
|
|
81
81
|
vstyles
|
|
82
|
-
} from "./index-
|
|
82
|
+
} from "./index-86ppjrgv.js";
|
|
83
83
|
import {
|
|
84
84
|
ASCIIFontSelectionHelper,
|
|
85
85
|
ATTRIBUTE_BASE_BITS,
|
|
@@ -236,7 +236,7 @@ import {
|
|
|
236
236
|
white,
|
|
237
237
|
wrapWithDelegates,
|
|
238
238
|
yellow
|
|
239
|
-
} from "./index-
|
|
239
|
+
} from "./index-zkcykvp8.js";
|
|
240
240
|
export {
|
|
241
241
|
yellow,
|
|
242
242
|
wrapWithDelegates,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ViewportBounds } from "../types.js";
|
|
2
2
|
interface ViewportObject {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
screenX: number;
|
|
4
|
+
screenY: number;
|
|
5
5
|
width: number;
|
|
6
6
|
height: number;
|
|
7
7
|
zIndex: number;
|
|
@@ -10,14 +10,14 @@ interface ViewportObject {
|
|
|
10
10
|
* Returns objects that overlap with the viewport bounds.
|
|
11
11
|
*
|
|
12
12
|
* @param viewport - The viewport bounds to check against
|
|
13
|
-
* @param objects - Array of objects MUST be sorted by position (
|
|
13
|
+
* @param objects - Array of objects MUST be sorted by screen position (screenY for column, screenX for row direction)
|
|
14
14
|
* @param direction - Primary scroll direction: "column" (vertical) or "row" (horizontal)
|
|
15
15
|
* @param padding - Extra padding around viewport to include nearby objects
|
|
16
16
|
* @param minTriggerSize - Minimum array size to use binary search optimization
|
|
17
17
|
* @returns Array of visible objects sorted by zIndex
|
|
18
18
|
*
|
|
19
19
|
* @remarks
|
|
20
|
-
* Objects must be pre-sorted by their start position (
|
|
20
|
+
* Objects must be pre-sorted by their start screen position (screenY for column direction, screenX for row direction).
|
|
21
21
|
* Unsorted input will produce incorrect results.
|
|
22
22
|
*/
|
|
23
23
|
export declare function getObjectsInViewport<T extends ViewportObject>(viewport: ViewportBounds, objects: T[], direction?: "row" | "column", padding?: number, minTriggerSize?: number): T[];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { FiletypeParserOptions } from "./types";
|
|
1
|
+
import type { FiletypeParserOptions } from "./types.js";
|
|
2
2
|
export declare function getParsers(): FiletypeParserOptions[];
|
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.100",
|
|
8
8
|
"description": "OpenTUI is a TypeScript library on a native Zig core for building terminal user interfaces (TUIs)",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"repository": {
|
|
@@ -67,11 +67,11 @@
|
|
|
67
67
|
"bun-webgpu": "0.1.5",
|
|
68
68
|
"planck": "^1.4.2",
|
|
69
69
|
"three": "0.177.0",
|
|
70
|
-
"@opentui/core-darwin-x64": "0.1.
|
|
71
|
-
"@opentui/core-darwin-arm64": "0.1.
|
|
72
|
-
"@opentui/core-linux-x64": "0.1.
|
|
73
|
-
"@opentui/core-linux-arm64": "0.1.
|
|
74
|
-
"@opentui/core-win32-x64": "0.1.
|
|
75
|
-
"@opentui/core-win32-arm64": "0.1.
|
|
70
|
+
"@opentui/core-darwin-x64": "0.1.100",
|
|
71
|
+
"@opentui/core-darwin-arm64": "0.1.100",
|
|
72
|
+
"@opentui/core-linux-x64": "0.1.100",
|
|
73
|
+
"@opentui/core-linux-arm64": "0.1.100",
|
|
74
|
+
"@opentui/core-win32-x64": "0.1.100",
|
|
75
|
+
"@opentui/core-win32-arm64": "0.1.100"
|
|
76
76
|
}
|
|
77
77
|
}
|
|
@@ -12,6 +12,7 @@ declare class ContentRenderable extends BoxRenderable {
|
|
|
12
12
|
constructor(ctx: RenderContext, viewport: BoxRenderable, viewportCulling: boolean, options: RenderableOptions<BoxRenderable>);
|
|
13
13
|
get viewportCulling(): boolean;
|
|
14
14
|
set viewportCulling(value: boolean);
|
|
15
|
+
protected _hasVisibleChildFilter(): boolean;
|
|
15
16
|
protected _getVisibleChildren(): number[];
|
|
16
17
|
}
|
|
17
18
|
export interface ScrollBoxOptions extends BoxOptions<ScrollBoxRenderable> {
|
package/renderer.d.ts
CHANGED
|
@@ -166,6 +166,7 @@ export declare class CliRenderer extends EventEmitter implements RenderContext {
|
|
|
166
166
|
private renderTimeout;
|
|
167
167
|
private lastTime;
|
|
168
168
|
private frameCount;
|
|
169
|
+
private _frameId;
|
|
169
170
|
private lastFpsTime;
|
|
170
171
|
private currentFps;
|
|
171
172
|
private targetFrameTime;
|
|
@@ -257,6 +258,7 @@ export declare class CliRenderer extends EventEmitter implements RenderContext {
|
|
|
257
258
|
popHitGridScissorRect(): void;
|
|
258
259
|
clearHitGridScissorRects(): void;
|
|
259
260
|
get widthMethod(): WidthMethod;
|
|
261
|
+
get frameId(): number;
|
|
260
262
|
private writeOut;
|
|
261
263
|
requestRender(): void;
|
|
262
264
|
private activateFrame;
|
|
@@ -342,6 +344,12 @@ export declare class CliRenderer extends EventEmitter implements RenderContext {
|
|
|
342
344
|
corner?: DebugOverlayCorner;
|
|
343
345
|
}): void;
|
|
344
346
|
setTerminalTitle(title: string): void;
|
|
347
|
+
/**
|
|
348
|
+
* Reset the terminal background color to its default via OSC 111.
|
|
349
|
+
* Called automatically by destroy() and suspend(), but exposed for
|
|
350
|
+
* consumers that need explicit control (e.g. before SIGTSTP).
|
|
351
|
+
*/
|
|
352
|
+
resetTerminalBgColor(): void;
|
|
345
353
|
copyToClipboardOSC52(text: string, target?: ClipboardTarget): boolean;
|
|
346
354
|
clearClipboardOSC52(target?: ClipboardTarget): boolean;
|
|
347
355
|
isOsc52Supported(): boolean;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import {
|
|
3
3
|
createRuntimePlugin,
|
|
4
4
|
runtimeModuleIdForSpecifier
|
|
5
|
-
} from "./index-
|
|
6
|
-
import"./index-
|
|
7
|
-
import"./index-
|
|
5
|
+
} from "./index-nr5q8nyn.js";
|
|
6
|
+
import"./index-86ppjrgv.js";
|
|
7
|
+
import"./index-zkcykvp8.js";
|
|
8
8
|
|
|
9
9
|
// src/runtime-plugin-support.ts
|
|
10
10
|
var {plugin: registerBunPlugin } = globalThis.Bun;
|
package/runtime-plugin.js
CHANGED
|
@@ -3,9 +3,9 @@ import {
|
|
|
3
3
|
createRuntimePlugin,
|
|
4
4
|
isCoreRuntimeModuleSpecifier,
|
|
5
5
|
runtimeModuleIdForSpecifier
|
|
6
|
-
} from "./index-
|
|
7
|
-
import"./index-
|
|
8
|
-
import"./index-
|
|
6
|
+
} from "./index-nr5q8nyn.js";
|
|
7
|
+
import"./index-86ppjrgv.js";
|
|
8
|
+
import"./index-zkcykvp8.js";
|
|
9
9
|
export {
|
|
10
10
|
runtimeModuleIdForSpecifier,
|
|
11
11
|
isCoreRuntimeModuleSpecifier,
|
package/testing.js
CHANGED
package/types.d.ts
CHANGED
|
@@ -63,6 +63,8 @@ export interface RenderContext extends EventEmitter {
|
|
|
63
63
|
clearHitGridScissorRects: () => void;
|
|
64
64
|
width: number;
|
|
65
65
|
height: number;
|
|
66
|
+
/** Monotonic, bumped once per `loop()` iteration. Lets renderables dedupe per-frame work. */
|
|
67
|
+
frameId: number;
|
|
66
68
|
requestRender: () => void;
|
|
67
69
|
setCursorPosition: (x: number, y: number, visible: boolean) => void;
|
|
68
70
|
setCursorStyle: (options: CursorStyleOptions) => void;
|
|
File without changes
|