@fairyhunter13/opentui-core 0.1.102 → 0.1.104
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/3d.js.map +2 -2
- package/README.md +2 -2
- package/assets/markdown_inline/highlights.scm +25 -12
- package/buffer.d.ts +2 -0
- package/{index-km01g6g8.js → index-8z2zcznw.js} +2647 -1077
- package/index-8z2zcznw.js.map +67 -0
- package/index-rghvzce0.js +411 -0
- package/index-rghvzce0.js.map +10 -0
- package/{index-ryzjamvx.js → index-vvxmgn7j.js} +5249 -6645
- package/index-vvxmgn7j.js.map +42 -0
- package/index.js +11 -5
- package/index.js.map +1 -1
- package/lib/border.d.ts +2 -0
- package/lib/stdin-parser.d.ts +1 -0
- package/package.json +9 -12
- package/parser.worker.js +8 -15
- package/parser.worker.js.map +3 -3
- package/plugins/registry.d.ts +4 -0
- package/renderables/Box.d.ts +9 -0
- package/renderables/EditBufferRenderable.d.ts +76 -1
- package/renderables/LineNumberRenderable.d.ts +4 -0
- package/renderables/Markdown.d.ts +0 -4
- package/renderables/Textarea.d.ts +0 -51
- package/renderables/index.d.ts +1 -0
- package/renderer.d.ts +31 -11
- package/runtime-plugin-support.js +3 -3
- package/runtime-plugin.d.ts +5 -0
- package/runtime-plugin.js +3 -3
- package/testing.js +33 -11
- package/testing.js.map +5 -5
- package/types.d.ts +3 -0
- package/zig.d.ts +1 -1
- package/index-kj3abj37.js +0 -188
- package/index-kj3abj37.js.map +0 -10
- package/index-km01g6g8.js.map +0 -64
- package/index-ryzjamvx.js.map +0 -45
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ OpenTUI is a native terminal UI core written in Zig with TypeScript bindings. Th
|
|
|
13
13
|
## Install
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
bun install @
|
|
16
|
+
bun install @opentui/core
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
## Build
|
|
@@ -52,7 +52,7 @@ NativeSpanFeed TypeScript benchmarks:
|
|
|
52
52
|
Renderables are hierarchical objects that can be positioned, nested, styled and rendered to the terminal:
|
|
53
53
|
|
|
54
54
|
```typescript
|
|
55
|
-
import { createCliRenderer, TextRenderable } from "@
|
|
55
|
+
import { createCliRenderer, TextRenderable } from "@opentui/core"
|
|
56
56
|
|
|
57
57
|
const renderer = await createCliRenderer()
|
|
58
58
|
|
|
@@ -40,24 +40,37 @@
|
|
|
40
40
|
"]" @conceal)
|
|
41
41
|
(#set! conceal " "))
|
|
42
42
|
|
|
43
|
-
;
|
|
43
|
+
; Style image link brackets and parens
|
|
44
44
|
(image
|
|
45
|
-
[
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
45
|
+
["[" "(" ")"] @markup.link)
|
|
46
|
+
|
|
47
|
+
(image
|
|
48
|
+
"]" @markup.link)
|
|
49
|
+
|
|
50
|
+
; Conceal image ! prefix
|
|
51
|
+
((image
|
|
52
|
+
"!" @conceal)
|
|
53
|
+
(#set! conceal ""))
|
|
54
|
+
|
|
55
|
+
; Conceal image opening bracket
|
|
56
|
+
((image
|
|
57
|
+
"[" @conceal)
|
|
53
58
|
(#set! conceal ""))
|
|
54
59
|
|
|
55
|
-
; Conceal
|
|
60
|
+
; Conceal image closing bracket with space replacement (matches inline link behavior)
|
|
61
|
+
((image
|
|
62
|
+
"]" @conceal)
|
|
63
|
+
(#set! conceal " "))
|
|
64
|
+
|
|
65
|
+
; Style image link destination
|
|
66
|
+
(image
|
|
67
|
+
(link_destination) @markup.link.url)
|
|
68
|
+
|
|
69
|
+
; Conceal full reference links - only conceal brackets, keep link_label visible
|
|
56
70
|
(full_reference_link
|
|
57
71
|
[
|
|
58
72
|
"["
|
|
59
73
|
"]"
|
|
60
|
-
(link_label)
|
|
61
74
|
] @markup.link
|
|
62
75
|
(#set! conceal ""))
|
|
63
76
|
|
|
@@ -92,7 +105,7 @@
|
|
|
92
105
|
; Replace common HTML entities.
|
|
93
106
|
((entity_reference) @character.special
|
|
94
107
|
(#eq? @character.special " ")
|
|
95
|
-
(#set! conceal ""))
|
|
108
|
+
(#set! conceal " "))
|
|
96
109
|
|
|
97
110
|
((entity_reference) @character.special
|
|
98
111
|
(#eq? @character.special "<")
|
package/buffer.d.ts
CHANGED
|
@@ -74,6 +74,8 @@ export declare class OptimizedBuffer {
|
|
|
74
74
|
shouldFill?: boolean;
|
|
75
75
|
title?: string;
|
|
76
76
|
titleAlignment?: "left" | "center" | "right";
|
|
77
|
+
bottomTitle?: string;
|
|
78
|
+
bottomTitleAlignment?: "left" | "center" | "right";
|
|
77
79
|
}): void;
|
|
78
80
|
pushScissorRect(x: number, y: number, width: number, height: number): void;
|
|
79
81
|
popScissorRect(): void;
|