@vizejs/fresco-native 0.101.0 → 0.102.0
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/index.d.ts +185 -1
- package/index.js +4 -0
- package/package.json +4 -1
- package/vize-fresco.darwin-arm64.node +0 -0
- package/vize-fresco.darwin-x64.node +0 -0
- package/vize-fresco.linux-arm64-gnu.node +0 -0
- package/vize-fresco.linux-arm64-musl.node +0 -0
- package/vize-fresco.linux-x64-gnu.node +0 -0
- package/vize-fresco.linux-x64-musl.node +0 -0
- package/vize-fresco.win32-arm64-msvc.node +0 -0
- package/vize-fresco.win32-x64-msvc.node +0 -0
package/index.d.ts
CHANGED
|
@@ -1 +1,185 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export interface StyleNapi {
|
|
2
|
+
fg?: string;
|
|
3
|
+
bg?: string;
|
|
4
|
+
bold?: boolean;
|
|
5
|
+
dim?: boolean;
|
|
6
|
+
italic?: boolean;
|
|
7
|
+
underline?: boolean;
|
|
8
|
+
inverse?: boolean;
|
|
9
|
+
blink?: boolean;
|
|
10
|
+
hidden?: boolean;
|
|
11
|
+
strikethrough?: boolean;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface FlexStyleNapi {
|
|
15
|
+
display?: string;
|
|
16
|
+
position?: string;
|
|
17
|
+
top?: string;
|
|
18
|
+
right?: string;
|
|
19
|
+
bottom?: string;
|
|
20
|
+
left?: string;
|
|
21
|
+
overflow?: string;
|
|
22
|
+
overflowX?: string;
|
|
23
|
+
overflowY?: string;
|
|
24
|
+
flexDirection?: string;
|
|
25
|
+
flexWrap?: string;
|
|
26
|
+
justifyContent?: string;
|
|
27
|
+
alignItems?: string;
|
|
28
|
+
alignSelf?: string;
|
|
29
|
+
alignContent?: string;
|
|
30
|
+
flexGrow?: number;
|
|
31
|
+
flexShrink?: number;
|
|
32
|
+
flexBasis?: string;
|
|
33
|
+
width?: string;
|
|
34
|
+
height?: string;
|
|
35
|
+
minWidth?: string;
|
|
36
|
+
minHeight?: string;
|
|
37
|
+
maxWidth?: string;
|
|
38
|
+
maxHeight?: string;
|
|
39
|
+
aspectRatio?: number;
|
|
40
|
+
padding?: number;
|
|
41
|
+
paddingTop?: number;
|
|
42
|
+
paddingRight?: number;
|
|
43
|
+
paddingBottom?: number;
|
|
44
|
+
paddingLeft?: number;
|
|
45
|
+
margin?: number;
|
|
46
|
+
marginTop?: number;
|
|
47
|
+
marginRight?: number;
|
|
48
|
+
marginBottom?: number;
|
|
49
|
+
marginLeft?: number;
|
|
50
|
+
gap?: number;
|
|
51
|
+
columnGap?: number;
|
|
52
|
+
rowGap?: number;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface RenderNodeNapi {
|
|
56
|
+
id: number;
|
|
57
|
+
nodeType: string;
|
|
58
|
+
text?: string;
|
|
59
|
+
wrap?: boolean;
|
|
60
|
+
wrapMode?: string;
|
|
61
|
+
value?: string;
|
|
62
|
+
placeholder?: string;
|
|
63
|
+
focused?: boolean;
|
|
64
|
+
cursor?: number;
|
|
65
|
+
mask?: boolean;
|
|
66
|
+
maskChar?: string;
|
|
67
|
+
style?: FlexStyleNapi;
|
|
68
|
+
appearance?: StyleNapi;
|
|
69
|
+
border?: string;
|
|
70
|
+
children?: number[];
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export interface ModifiersNapi {
|
|
74
|
+
ctrl: boolean;
|
|
75
|
+
alt: boolean;
|
|
76
|
+
shift: boolean;
|
|
77
|
+
meta: boolean;
|
|
78
|
+
super: boolean;
|
|
79
|
+
hyper: boolean;
|
|
80
|
+
capsLock: boolean;
|
|
81
|
+
numLock: boolean;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export interface InputEventNapi {
|
|
85
|
+
eventType: "key" | "mouse" | "resize" | "focus" | "paste" | (string & {});
|
|
86
|
+
key?: string;
|
|
87
|
+
char?: string;
|
|
88
|
+
keyEventType?: "press" | "repeat" | "release";
|
|
89
|
+
modifiers?: ModifiersNapi;
|
|
90
|
+
button?: string;
|
|
91
|
+
x?: number;
|
|
92
|
+
y?: number;
|
|
93
|
+
width?: number;
|
|
94
|
+
height?: number;
|
|
95
|
+
text?: string;
|
|
96
|
+
cursor?: number;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export interface ImeStateNapi {
|
|
100
|
+
active: boolean;
|
|
101
|
+
mode: string;
|
|
102
|
+
composing: boolean;
|
|
103
|
+
preedit?: string;
|
|
104
|
+
preeditCursor?: number;
|
|
105
|
+
candidates?: string[];
|
|
106
|
+
selected?: number;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export interface TerminalInfoNapi {
|
|
110
|
+
width: number;
|
|
111
|
+
height: number;
|
|
112
|
+
colors: boolean;
|
|
113
|
+
trueColor: boolean;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export interface TerminalOptionsNapi {
|
|
117
|
+
rawMode?: boolean;
|
|
118
|
+
alternateScreen?: boolean;
|
|
119
|
+
mouse?: boolean;
|
|
120
|
+
bracketedPaste?: boolean;
|
|
121
|
+
hideCursor?: boolean;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export interface LayoutResultNapi {
|
|
125
|
+
id: number;
|
|
126
|
+
x: number;
|
|
127
|
+
y: number;
|
|
128
|
+
width: number;
|
|
129
|
+
height: number;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export function initTerminal(): void;
|
|
133
|
+
export function initTerminalWithMouse(): void;
|
|
134
|
+
export function initTerminalWithOptions(options: TerminalOptionsNapi): void;
|
|
135
|
+
export function restoreTerminal(): void;
|
|
136
|
+
export function getTerminalInfo(): TerminalInfoNapi;
|
|
137
|
+
export function clearScreen(): void;
|
|
138
|
+
export function flushTerminal(): void;
|
|
139
|
+
export function syncTerminalSize(): boolean;
|
|
140
|
+
|
|
141
|
+
export function initLayout(): void;
|
|
142
|
+
export function createLayoutNode(style?: FlexStyleNapi): number;
|
|
143
|
+
export function createLayoutLeaf(width: number, height: number, style?: FlexStyleNapi): number;
|
|
144
|
+
export function setLayoutRoot(id: number): void;
|
|
145
|
+
export function addLayoutChild(parent: number, child: number): void;
|
|
146
|
+
export function removeLayoutChild(parent: number, child: number): void;
|
|
147
|
+
export function setLayoutStyle(id: number, style: FlexStyleNapi): void;
|
|
148
|
+
export function removeLayoutNode(id: number): void;
|
|
149
|
+
export function computeLayout(width: number, height: number): void;
|
|
150
|
+
export function getLayout(id: number): LayoutResultNapi | undefined;
|
|
151
|
+
export function getAllLayouts(): LayoutResultNapi[];
|
|
152
|
+
export function clearLayout(): void;
|
|
153
|
+
|
|
154
|
+
export function renderText(x: number, y: number, text: string, style?: StyleNapi): void;
|
|
155
|
+
export function renderBox(
|
|
156
|
+
x: number,
|
|
157
|
+
y: number,
|
|
158
|
+
width: number,
|
|
159
|
+
height: number,
|
|
160
|
+
border?: string,
|
|
161
|
+
style?: StyleNapi,
|
|
162
|
+
): void;
|
|
163
|
+
export function fillRect(
|
|
164
|
+
x: number,
|
|
165
|
+
y: number,
|
|
166
|
+
width: number,
|
|
167
|
+
height: number,
|
|
168
|
+
char?: string,
|
|
169
|
+
style?: StyleNapi,
|
|
170
|
+
): void;
|
|
171
|
+
export function clearRect(x: number, y: number, width: number, height: number): void;
|
|
172
|
+
export function setCursor(x: number, y: number): void;
|
|
173
|
+
export function showCursor(): void;
|
|
174
|
+
export function hideCursor(): void;
|
|
175
|
+
export function setCursorShape(shape: "block" | "underline" | "bar" | (string & {})): void;
|
|
176
|
+
export function renderTree(nodes: RenderNodeNapi[]): void;
|
|
177
|
+
export function getLastRenderLayouts(): LayoutResultNapi[];
|
|
178
|
+
|
|
179
|
+
export function pollEvent(timeoutMs: number): InputEventNapi | undefined;
|
|
180
|
+
export function pollEventNonBlocking(): InputEventNapi | undefined;
|
|
181
|
+
export function readEvent(): InputEventNapi;
|
|
182
|
+
export function getImeState(): ImeStateNapi;
|
|
183
|
+
export function enableIme(): boolean;
|
|
184
|
+
export function disableIme(): boolean;
|
|
185
|
+
export function setImeMode(mode: string): boolean;
|
package/index.js
CHANGED
|
@@ -313,8 +313,10 @@ const {
|
|
|
313
313
|
hideCursor,
|
|
314
314
|
setCursorShape,
|
|
315
315
|
renderTree,
|
|
316
|
+
getLastRenderLayouts,
|
|
316
317
|
initTerminal,
|
|
317
318
|
initTerminalWithMouse,
|
|
319
|
+
initTerminalWithOptions,
|
|
318
320
|
restoreTerminal,
|
|
319
321
|
getTerminalInfo,
|
|
320
322
|
clearScreen,
|
|
@@ -350,8 +352,10 @@ module.exports.showCursor = showCursor;
|
|
|
350
352
|
module.exports.hideCursor = hideCursor;
|
|
351
353
|
module.exports.setCursorShape = setCursorShape;
|
|
352
354
|
module.exports.renderTree = renderTree;
|
|
355
|
+
module.exports.getLastRenderLayouts = getLastRenderLayouts;
|
|
353
356
|
module.exports.initTerminal = initTerminal;
|
|
354
357
|
module.exports.initTerminalWithMouse = initTerminalWithMouse;
|
|
358
|
+
module.exports.initTerminalWithOptions = initTerminalWithOptions;
|
|
355
359
|
module.exports.restoreTerminal = restoreTerminal;
|
|
356
360
|
module.exports.getTerminalInfo = getTerminalInfo;
|
|
357
361
|
module.exports.clearScreen = clearScreen;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vizejs/fresco-native",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.102.0",
|
|
4
4
|
"description": "Vue TUI framework - Native bindings",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"fresco",
|
|
@@ -42,6 +42,9 @@
|
|
|
42
42
|
"aarch64-unknown-linux-musl"
|
|
43
43
|
]
|
|
44
44
|
},
|
|
45
|
+
"engines": {
|
|
46
|
+
"node": ">=22"
|
|
47
|
+
},
|
|
45
48
|
"scripts": {
|
|
46
49
|
"build": "napi build --platform --release --manifest-path ../../crates/vize_fresco/Cargo.toml -p vize_fresco --features napi --output-dir .",
|
|
47
50
|
"build:ci": "napi build --platform --profile ci --manifest-path ../../crates/vize_fresco/Cargo.toml -p vize_fresco --features napi --output-dir .",
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|