@nativedesktop/react 0.4.25 → 0.4.26
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.
|
@@ -89,12 +89,15 @@ export interface SourceTreeNode {
|
|
|
89
89
|
actionIds?: string[];
|
|
90
90
|
testID?: string;
|
|
91
91
|
}
|
|
92
|
-
/** CommandPalette result row:
|
|
92
|
+
/** CommandPalette result row, drawn on one line: leading icon, title, subtitle in secondary text after it, and `hint` right-aligned (the action Enter takes on the row, e.g. "Switch to Tab", or a shortcut). `id` is echoed in onActivate. `iconData` (a data: URL or bare base64 image, e.g. a favicon) wins over `iconName`. `completion` on the FIRST row is inline autocompletion: when it starts with what the user typed (case-insensitively) and their last edit inserted text, the field shows the rest of it selected after the caret; Tab or Right accepts it (queryChanged then carries the whole text), typing replaces it, Backspace removes it, after which Enter on that row submits the typed text instead of activating the row. The app supplies rows already filtered and ordered; the widget renders them in order and never filters or reorders. */
|
|
93
93
|
export interface CommandPaletteItem {
|
|
94
94
|
id: string;
|
|
95
95
|
title: string;
|
|
96
96
|
subtitle?: string;
|
|
97
97
|
iconName?: string;
|
|
98
|
+
iconData?: string;
|
|
99
|
+
hint?: string;
|
|
100
|
+
completion?: string;
|
|
98
101
|
}
|
|
99
102
|
/** One datum. `x`/`y` are the numeric axes; `label` names the point on a category axis and names the slice on a pie. The OHLC quartet carries candlestick bodies and wicks and is ignored by every other chart type (which read `y`). */
|
|
100
103
|
export interface ChartPoint {
|
|
@@ -131,6 +131,29 @@ export interface ScrollIntoViewResult {
|
|
|
131
131
|
ok: boolean;
|
|
132
132
|
scrolled: boolean;
|
|
133
133
|
}
|
|
134
|
+
/** One visible palette row. `icon`/`title`/`subtitle`/`hint` are null when the row does not draw that part. `truncated` is true when the title or subtitle is drawn shorter than its text (an ellipsis). */
|
|
135
|
+
export interface PaletteRowLayout {
|
|
136
|
+
row: Geometry;
|
|
137
|
+
icon: Geometry | null;
|
|
138
|
+
title: Geometry | null;
|
|
139
|
+
subtitle: Geometry | null;
|
|
140
|
+
hint: Geometry | null;
|
|
141
|
+
truncated: boolean;
|
|
142
|
+
highlighted: boolean;
|
|
143
|
+
}
|
|
144
|
+
/** `window` is the content area the panel is drawn over; `panel` the card itself; `field` the text field, whose `fieldText` and selection (`selectionStart`, `selectionLength`, in UTF-16 units) show inline autocompletion. `rows` lists the rows currently drawn, top to bottom. */
|
|
145
|
+
export interface PaletteLayout {
|
|
146
|
+
ref: number;
|
|
147
|
+
presented: boolean;
|
|
148
|
+
window: Geometry | null;
|
|
149
|
+
panel: Geometry | null;
|
|
150
|
+
field: Geometry | null;
|
|
151
|
+
fieldText: string;
|
|
152
|
+
selectionStart: number;
|
|
153
|
+
selectionLength: number;
|
|
154
|
+
dimmed: boolean;
|
|
155
|
+
rows: PaletteRowLayout[];
|
|
156
|
+
}
|
|
134
157
|
/** Live page state read off the engine on the UI thread (WebKitGTK's uri/title/is-loading/can-go-back/can-go-forward, WKWebView's url/title/isLoading/canGoBack/canGoForward) — no page JavaScript, no app cooperation. url/title are null before the first commit. */
|
|
135
158
|
export interface WebViewInfo {
|
|
136
159
|
ref: number;
|
|
@@ -262,6 +285,12 @@ export interface WebviewInfoParams {
|
|
|
262
285
|
testId?: string;
|
|
263
286
|
window?: number;
|
|
264
287
|
}
|
|
288
|
+
/** Live geometry of a CommandPalette's presented panel, so a drive can assert its layout (centring, row fit, truncation) instead of reading pixels. Rects use node Geometry units relative to the window the panel is presented over. A palette that is not presented answers {presented:false} with empty rows. Target by exactly one of ref / testId. */
|
|
289
|
+
export interface PaletteLayoutParams {
|
|
290
|
+
ref?: number;
|
|
291
|
+
testId?: string;
|
|
292
|
+
window?: number;
|
|
293
|
+
}
|
|
265
294
|
/** Reads a menu owner's live native menu back, flattened in draw order, so a drive can assert what the user would actually see instead of what the React tree says. Targets a Menubar node (the installed app menu, including the platform's default menus on AppKit), a MenuButton/SplitButton, or a TrayItem; a Menu node answers -32602, since a <menu> only ever draws inside one of those owners. Target by exactly one of ref / testId. */
|
|
266
295
|
export interface MenuModelParams {
|
|
267
296
|
ref?: number;
|
|
@@ -368,6 +397,10 @@ export interface RpcMethods {
|
|
|
368
397
|
params: WebviewInfoParams;
|
|
369
398
|
result: WebViewInfo;
|
|
370
399
|
};
|
|
400
|
+
paletteLayout: {
|
|
401
|
+
params: PaletteLayoutParams;
|
|
402
|
+
result: PaletteLayout;
|
|
403
|
+
};
|
|
371
404
|
menuModel: {
|
|
372
405
|
params: MenuModelParams;
|
|
373
406
|
result: MenuModelResult;
|