@gjsify/adwaita-nativescript 0.51.1 → 0.52.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/lib/esm/builder/index.js +1 -0
- package/lib/esm/index.js +1 -1
- package/lib/esm/namespace/adw.js +1 -1
- package/lib/esm/namespace/gio.js +1 -0
- package/lib/esm/namespace/gtk.js +1 -1
- package/lib/esm/values/sidebar.js +1 -0
- package/lib/esm/values/tab-page.js +1 -0
- package/lib/esm/widgets/adw-action-row.js +1 -1
- package/lib/esm/widgets/adw-alert-dialog.js +1 -1
- package/lib/esm/widgets/adw-avatar.js +1 -1
- package/lib/esm/widgets/adw-bottom-sheet.js +1 -1
- package/lib/esm/widgets/adw-button-row.js +1 -1
- package/lib/esm/widgets/adw-carousel-indicator-dots.js +1 -0
- package/lib/esm/widgets/adw-carousel-indicator-lines.js +1 -0
- package/lib/esm/widgets/adw-carousel.js +1 -1
- package/lib/esm/widgets/adw-clamp.js +1 -1
- package/lib/esm/widgets/adw-combo-row.js +1 -1
- package/lib/esm/widgets/adw-expander-row.js +1 -1
- package/lib/esm/widgets/adw-header-bar.js +1 -1
- package/lib/esm/widgets/adw-navigation-page.js +1 -0
- package/lib/esm/widgets/adw-navigation-view.js +1 -1
- package/lib/esm/widgets/adw-preferences-group.js +1 -1
- package/lib/esm/widgets/adw-shortcut-label.js +1 -1
- package/lib/esm/widgets/adw-sidebar.js +1 -1
- package/lib/esm/widgets/adw-spin-row.js +1 -1
- package/lib/esm/widgets/adw-status-page.js +1 -1
- package/lib/esm/widgets/adw-tab-view.js +1 -1
- package/lib/esm/widgets/adw-toast-overlay.js +1 -1
- package/lib/esm/widgets/adw-toggle-group.js +1 -1
- package/lib/esm/widgets/adw-toggle.js +1 -0
- package/lib/esm/widgets/adw-toolbar-view.js +1 -1
- package/lib/esm/widgets/adw-view-stack.js +1 -1
- package/lib/esm/widgets/adw-view-switcher-bar.js +1 -1
- package/lib/esm/widgets/bottom-sheet-state.js +1 -1
- package/lib/esm/widgets/box-layout.js +1 -1
- package/lib/esm/widgets/builder-slots.js +1 -1
- package/lib/esm/widgets/carousel-indicator-base.js +1 -0
- package/lib/esm/widgets/carousel-state.js +1 -1
- package/lib/esm/widgets/chrome.js +1 -1
- package/lib/esm/widgets/gtk-action-bar.js +1 -0
- package/lib/esm/widgets/gtk-box.js +1 -1
- package/lib/esm/widgets/gtk-button.js +1 -1
- package/lib/esm/widgets/gtk-drop-down.js +1 -1
- package/lib/esm/widgets/gtk-label.js +1 -1
- package/lib/esm/widgets/gtk-menu-button.js +1 -1
- package/lib/esm/widgets/icon-theme.js +1 -1
- package/lib/esm/widgets/id-reference.js +1 -0
- package/lib/esm/widgets/index.js +1 -1
- package/lib/esm/widgets/signals.js +1 -1
- package/lib/esm/widgets/split-view-base.js +1 -1
- package/lib/esm/widgets/view-stack-page.js +1 -0
- package/lib/esm/widgets/view-switcher-base.js +1 -1
- package/lib/esm/widgets/widget-layout.js +1 -0
- package/lib/types/blueprint-markup.spec.d.ts +4 -0
- package/lib/types/blueprint-trees.spec.d.ts +1 -0
- package/lib/types/builder/index.d.ts +70 -0
- package/lib/types/clamp-child.spec.d.ts +2 -0
- package/lib/types/gallery-blueprints.spec.d.ts +1 -0
- package/lib/types/gtk-value-doors.spec.d.ts +1 -0
- package/lib/types/index.d.ts +2 -1
- package/lib/types/namespace/adw.d.ts +8 -0
- package/lib/types/namespace/gio.d.ts +1 -0
- package/lib/types/namespace/gtk.d.ts +3 -0
- package/lib/types/shared-trees.spec.d.ts +2 -0
- package/lib/types/testing/ns-core.d.mts +340 -0
- package/lib/types/value-lists.spec.d.ts +1 -0
- package/lib/types/values/sidebar.d.ts +46 -0
- package/lib/types/values/tab-page.d.ts +16 -0
- package/lib/types/view-switcher-stack.spec.d.ts +1 -0
- package/lib/types/widgets/adw-about-dialog.d.ts +12 -0
- package/lib/types/widgets/adw-action-row.d.ts +22 -0
- package/lib/types/widgets/adw-alert-dialog.d.ts +18 -1
- package/lib/types/widgets/adw-avatar.d.ts +12 -0
- package/lib/types/widgets/adw-banner.d.ts +12 -0
- package/lib/types/widgets/adw-bottom-sheet.d.ts +77 -6
- package/lib/types/widgets/adw-button-content.d.ts +12 -0
- package/lib/types/widgets/adw-button-row.d.ts +21 -0
- package/lib/types/widgets/adw-carousel-indicator-dots.d.ts +7 -0
- package/lib/types/widgets/adw-carousel-indicator-lines.d.ts +7 -0
- package/lib/types/widgets/adw-carousel.d.ts +31 -15
- package/lib/types/widgets/adw-clamp.d.ts +19 -0
- package/lib/types/widgets/adw-combo-row.d.ts +20 -1
- package/lib/types/widgets/adw-data-grid.d.ts +12 -0
- package/lib/types/widgets/adw-expander-row.d.ts +2 -0
- package/lib/types/widgets/adw-header-bar.d.ts +14 -0
- package/lib/types/widgets/adw-image-button.d.ts +12 -0
- package/lib/types/widgets/adw-navigation-page.d.ts +63 -0
- package/lib/types/widgets/adw-navigation-view.d.ts +18 -5
- package/lib/types/widgets/adw-preferences-dialog.d.ts +12 -0
- package/lib/types/widgets/adw-preferences-group.d.ts +14 -0
- package/lib/types/widgets/adw-preferences-page.d.ts +12 -0
- package/lib/types/widgets/adw-shortcut-label.d.ts +12 -0
- package/lib/types/widgets/adw-sidebar.d.ts +26 -0
- package/lib/types/widgets/adw-slider-row.d.ts +12 -0
- package/lib/types/widgets/adw-spin-row.d.ts +12 -1
- package/lib/types/widgets/adw-spinner.d.ts +12 -0
- package/lib/types/widgets/adw-split-button.d.ts +12 -0
- package/lib/types/widgets/adw-status-page.d.ts +46 -0
- package/lib/types/widgets/adw-tab-view.d.ts +60 -27
- package/lib/types/widgets/adw-toast-overlay.d.ts +20 -0
- package/lib/types/widgets/adw-toggle-group.d.ts +51 -3
- package/lib/types/widgets/adw-toggle.d.ts +41 -0
- package/lib/types/widgets/adw-toolbar-view.d.ts +22 -1
- package/lib/types/widgets/adw-view-stack.d.ts +53 -7
- package/lib/types/widgets/adw-view-switcher-bar.d.ts +19 -2
- package/lib/types/widgets/adw-window-title.d.ts +12 -0
- package/lib/types/widgets/adw-wrap-box.d.ts +12 -0
- package/lib/types/widgets/bottom-sheet-state.d.ts +40 -7
- package/lib/types/widgets/box-layout.d.ts +3 -17
- package/lib/types/widgets/builder-slots.d.ts +48 -0
- package/lib/types/widgets/button-content.d.ts +4 -3
- package/lib/types/widgets/carousel-indicator-base.d.ts +54 -0
- package/lib/types/widgets/carousel-state.d.ts +12 -9
- package/lib/types/widgets/chrome.d.ts +32 -6
- package/lib/types/widgets/construct-props.d.ts +46 -5
- package/lib/types/widgets/gtk-action-bar.d.ts +53 -0
- package/lib/types/widgets/gtk-box.d.ts +12 -0
- package/lib/types/widgets/gtk-button.d.ts +27 -0
- package/lib/types/widgets/gtk-drop-down.d.ts +23 -1
- package/lib/types/widgets/gtk-entry.d.ts +12 -0
- package/lib/types/widgets/gtk-image.d.ts +12 -0
- package/lib/types/widgets/gtk-label.d.ts +47 -1
- package/lib/types/widgets/gtk-menu-button.d.ts +22 -0
- package/lib/types/widgets/id-reference.d.ts +13 -0
- package/lib/types/widgets/index.d.ts +16 -5
- package/lib/types/widgets/signals.d.ts +14 -1
- package/lib/types/widgets/split-view-base.d.ts +26 -2
- package/lib/types/widgets/tab-view-state.d.ts +3 -3
- package/lib/types/widgets/view-stack-page.d.ts +98 -0
- package/lib/types/widgets/view-stack-state.d.ts +7 -3
- package/lib/types/widgets/view-switcher-base.d.ts +62 -0
- package/lib/types/widgets/widget-layout.d.ts +50 -0
- package/package.json +21 -11
- package/src/theme/adwaita.css +122 -1
- package/lib/esm/widgets/label-text.js +0 -1
- package/lib/types/widgets/label-text.d.ts +0 -13
- /package/lib/types/{label-text.spec.d.ts → gio-menu.spec.d.ts} +0 -0
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
/** Payload shape for `Observable.notify` and every event listener. */
|
|
2
|
+
export interface EventData {
|
|
3
|
+
eventName: string;
|
|
4
|
+
object: Observable;
|
|
5
|
+
[key: string]: unknown;
|
|
6
|
+
}
|
|
7
|
+
type Listener = (data: EventData) => void;
|
|
8
|
+
export declare class Observable {
|
|
9
|
+
addEventListener(eventName: string, callback: Listener): void;
|
|
10
|
+
removeEventListener(eventName: string, callback?: Listener): void;
|
|
11
|
+
notify<T extends EventData>(data: T): void;
|
|
12
|
+
notifyPropertyChange(name: string, value: unknown, oldValue?: unknown): void;
|
|
13
|
+
_emit(eventName: string): void;
|
|
14
|
+
set(name: string, value: unknown): void;
|
|
15
|
+
get(name: string): unknown;
|
|
16
|
+
}
|
|
17
|
+
/** An `(x, y)` pair — a translate/scale animation target. */
|
|
18
|
+
export interface Pair {
|
|
19
|
+
x: number;
|
|
20
|
+
y: number;
|
|
21
|
+
}
|
|
22
|
+
/** An async operation that can be cancelled mid-flight. */
|
|
23
|
+
export interface Cancelable {
|
|
24
|
+
cancel(): void;
|
|
25
|
+
}
|
|
26
|
+
/** A running animation: a `Promise` that is also {@link Cancelable}. */
|
|
27
|
+
export type AnimationPromise = Promise<void> & Cancelable;
|
|
28
|
+
/** The slice of NativeScript's animation definition the Adwaita widgets use. */
|
|
29
|
+
export interface AnimationDefinition {
|
|
30
|
+
target?: View;
|
|
31
|
+
opacity?: number;
|
|
32
|
+
backgroundColor?: string;
|
|
33
|
+
translate?: Pair;
|
|
34
|
+
scale?: Pair;
|
|
35
|
+
width?: number | string;
|
|
36
|
+
height?: number | string;
|
|
37
|
+
rotate?: number;
|
|
38
|
+
duration?: number;
|
|
39
|
+
delay?: number;
|
|
40
|
+
iterations?: number;
|
|
41
|
+
curve?: string;
|
|
42
|
+
}
|
|
43
|
+
/** The payload of the `'touch'` gesture. */
|
|
44
|
+
export interface TouchGestureEventData extends EventData {
|
|
45
|
+
action: 'down' | 'up' | 'move' | 'cancel';
|
|
46
|
+
getX(): number;
|
|
47
|
+
getY(): number;
|
|
48
|
+
}
|
|
49
|
+
export declare class View extends Observable {
|
|
50
|
+
/**
|
|
51
|
+
* UNSET, NOT EMPTY — a view nobody has written a class onto reads `undefined`.
|
|
52
|
+
*
|
|
53
|
+
* This field held `''` and the setter coerced `value ?? ''`, which made the suite
|
|
54
|
+
* STRUCTURALLY BLIND to the whole class of defect that reads a `className` as if it
|
|
55
|
+
* were always a string: on a device `Adw.Clamp` with a classless child dies at
|
|
56
|
+
* startup with `TypeError: … reading 'split'`, and every test here passed because the
|
|
57
|
+
* double answered `''` to the one question a device answers `undefined`.
|
|
58
|
+
*
|
|
59
|
+
* The real semantics, measured against `@nativescript/core` 9.1.2 by registering
|
|
60
|
+
* `classNameProperty`'s own options on a bare class: the property carries no
|
|
61
|
+
* `defaultValue`, its getter is `key in this ? this[key] : defaultValue`, so it reads
|
|
62
|
+
* `undefined` until written; `undefined` is not `unsetValue`, so writing it stores
|
|
63
|
+
* `undefined` rather than resetting; and `valueChanged` feeds `cssClasses` only from
|
|
64
|
+
* `typeof newValue === 'string' && newValue !== ''`.
|
|
65
|
+
*
|
|
66
|
+
* A DOUBLE THAT SMOOTHS AN EDGE OFF THE PLATFORM CANNOT REPORT THAT EDGE. It is the
|
|
67
|
+
* only reason this file may differ from a convenient JS object at all.
|
|
68
|
+
*/
|
|
69
|
+
private _className;
|
|
70
|
+
/**
|
|
71
|
+
* The live class set the CSS engine matches against, rebuilt from `className` on every
|
|
72
|
+
* write. Reproduced because it is a name a port widget must NOT take: ADR 0049 first
|
|
73
|
+
* spelled the style-class list `cssClasses`, and the shadowing accessor left the Set
|
|
74
|
+
* missing so the first `className` write died inside a constructor.
|
|
75
|
+
*/
|
|
76
|
+
readonly cssClasses: Set<string>;
|
|
77
|
+
width: number | string;
|
|
78
|
+
height: number | string;
|
|
79
|
+
horizontalAlignment: string;
|
|
80
|
+
verticalAlignment: string;
|
|
81
|
+
/**
|
|
82
|
+
* UNSET like {@link View.className}, and for the same measured reason: the `Property`
|
|
83
|
+
* behind it carries no `defaultValue`, so NativeScript answers `undefined` until
|
|
84
|
+
* something writes one. Every member of this double that models such a property is
|
|
85
|
+
* declared without an initialiser, and
|
|
86
|
+
* `scripts/check-nativescript-ns-defaults.mjs` holds the list against
|
|
87
|
+
* `status/nativescript-undefined-defaults.json`.
|
|
88
|
+
*/
|
|
89
|
+
backgroundColor: string | undefined;
|
|
90
|
+
/** Unset like {@link View.className}: `idProperty` carries no `defaultValue` either. */
|
|
91
|
+
id: string | undefined;
|
|
92
|
+
opacity: number;
|
|
93
|
+
paddingTop: number;
|
|
94
|
+
paddingBottom: number;
|
|
95
|
+
paddingLeft: number;
|
|
96
|
+
paddingRight: number;
|
|
97
|
+
marginTop: number;
|
|
98
|
+
marginBottom: number;
|
|
99
|
+
marginLeft: number;
|
|
100
|
+
marginRight: number;
|
|
101
|
+
/** `'visible' | 'hidden' | 'collapse'` — NativeScript's own default is `'visible'`. */
|
|
102
|
+
visibility: string;
|
|
103
|
+
isUserInteractionEnabled: boolean;
|
|
104
|
+
translateX: number;
|
|
105
|
+
translateY: number;
|
|
106
|
+
/** Never loaded here: nothing mounts a view into a page without a platform. */
|
|
107
|
+
readonly isLoaded: boolean;
|
|
108
|
+
androidOverflowEdge: string;
|
|
109
|
+
accessibilityRole: string | undefined;
|
|
110
|
+
accessibilityState: string | undefined;
|
|
111
|
+
accessibilityLabel: string | undefined;
|
|
112
|
+
accessibilityHint: string | undefined;
|
|
113
|
+
readonly style: {
|
|
114
|
+
direction?: 'ltr' | 'rtl' | null;
|
|
115
|
+
};
|
|
116
|
+
/** The pseudo-classes `attachRowPressFeedback` toggles — observable, not styled. */
|
|
117
|
+
readonly pseudoClasses: Set<string>;
|
|
118
|
+
get className(): string | undefined;
|
|
119
|
+
set className(value: string | undefined);
|
|
120
|
+
get parent(): View | null;
|
|
121
|
+
/** No page exists without a platform, and nothing in the corpus asks for one. */
|
|
122
|
+
get page(): View | null;
|
|
123
|
+
/**
|
|
124
|
+
* Resolves immediately and animates nothing.
|
|
125
|
+
*
|
|
126
|
+
* There is no clock and no compositor here, so the honest answer is that the END STATE
|
|
127
|
+
* is reached at once — which is what the widgets that animate a reveal already fall back
|
|
128
|
+
* to when the CSS subset cannot express one.
|
|
129
|
+
*/
|
|
130
|
+
animate(_options: AnimationDefinition): AnimationPromise;
|
|
131
|
+
/** No layout pass ran, so there is no size to report. */
|
|
132
|
+
getActualSize(): {
|
|
133
|
+
width: number;
|
|
134
|
+
height: number;
|
|
135
|
+
};
|
|
136
|
+
/** Upstream's `eachChildView`: a leaf has none. Return `false` from the callback to stop. */
|
|
137
|
+
eachChildView(_callback: (child: View) => boolean): void;
|
|
138
|
+
/**
|
|
139
|
+
* `getViewById` as `ui/core/view-base/index.ts:134` walks it: this view first, then its
|
|
140
|
+
* descendants depth first through `eachChildView`, the first match wins.
|
|
141
|
+
*/
|
|
142
|
+
getViewById<T extends View = View>(id: string): T | undefined;
|
|
143
|
+
addPseudoClass(name: string): void;
|
|
144
|
+
deletePseudoClass(name: string): void;
|
|
145
|
+
}
|
|
146
|
+
/** One screen. Declared because the ambient slice declares it; nothing here builds one. */
|
|
147
|
+
export declare class Page extends View {
|
|
148
|
+
}
|
|
149
|
+
export declare class LayoutBase extends View {
|
|
150
|
+
#private;
|
|
151
|
+
addChild(view: View): void;
|
|
152
|
+
insertChild(view: View, atIndex: number): void;
|
|
153
|
+
/** `_removeView` refuses a view that is not this parent's; a silent no-op would hide it. */
|
|
154
|
+
removeChild(view: View): void;
|
|
155
|
+
removeChildren(): void;
|
|
156
|
+
getChildAt(index: number): View;
|
|
157
|
+
getChildrenCount(): number;
|
|
158
|
+
eachChildView(callback: (child: View) => boolean): void;
|
|
159
|
+
/**
|
|
160
|
+
* THE INHERITED XML-CHILD DOOR, and the reason this class is worth doubling at all.
|
|
161
|
+
*
|
|
162
|
+
* `LayoutBaseCommon._addChildFromBuilder(name, view)` IGNORES `name` and calls
|
|
163
|
+
* `addChild` — which drops a template's child into the composed widget's first cell
|
|
164
|
+
* instead of into the slot it asked for. Every placement rule in this package is an
|
|
165
|
+
* override of exactly this method (`widgets/builder-slots.ts`), so a double that
|
|
166
|
+
* quietly did something smarter here would test the driver's manners rather than the
|
|
167
|
+
* port's.
|
|
168
|
+
*
|
|
169
|
+
* ONE DELIBERATE DIVERGENCE, so it is not read later as an oversight. Upstream guards
|
|
170
|
+
* `if (value instanceof View)` and DROPS anything else, silently; here the non-view
|
|
171
|
+
* reaches `#adopt` and throws. Stricter than the platform on purpose: a child door
|
|
172
|
+
* handed a non-view is a port defect either way, and this surface's whole problem is
|
|
173
|
+
* that its two doors fail without saying anything.
|
|
174
|
+
*/
|
|
175
|
+
_addChildFromBuilder(_name: string, view: View): void;
|
|
176
|
+
}
|
|
177
|
+
export declare class StackLayout extends LayoutBase {
|
|
178
|
+
orientation: 'horizontal' | 'vertical';
|
|
179
|
+
}
|
|
180
|
+
export type GridUnitType = 'auto' | 'star' | 'pixel';
|
|
181
|
+
export declare class ItemSpec {
|
|
182
|
+
readonly value: number;
|
|
183
|
+
readonly gridUnitType: GridUnitType;
|
|
184
|
+
constructor(value: number, gridUnitType: GridUnitType);
|
|
185
|
+
}
|
|
186
|
+
export declare class GridLayout extends LayoutBase {
|
|
187
|
+
protected _rows: ItemSpec[];
|
|
188
|
+
protected _columns: ItemSpec[];
|
|
189
|
+
addColumn(itemSpec: ItemSpec): void;
|
|
190
|
+
addRow(itemSpec: ItemSpec): void;
|
|
191
|
+
removeRow(itemSpec: ItemSpec): void;
|
|
192
|
+
removeColumns(): void;
|
|
193
|
+
removeRows(): void;
|
|
194
|
+
/** Where a child was placed — the read-back the `set*` statics have on a device. */
|
|
195
|
+
static placementOf(view: View): {
|
|
196
|
+
row: number;
|
|
197
|
+
column: number;
|
|
198
|
+
rowSpan: number;
|
|
199
|
+
columnSpan: number;
|
|
200
|
+
};
|
|
201
|
+
static setColumn(view: View, value: number): void;
|
|
202
|
+
static setRow(view: View, value: number): void;
|
|
203
|
+
static setColumnSpan(view: View, value: number): void;
|
|
204
|
+
static setRowSpan(view: View, value: number): void;
|
|
205
|
+
}
|
|
206
|
+
export declare class Label extends View {
|
|
207
|
+
text: string;
|
|
208
|
+
textWrap: boolean;
|
|
209
|
+
textAlignment: string;
|
|
210
|
+
textOverflow: string;
|
|
211
|
+
/**
|
|
212
|
+
* Unset like {@link View.className}, and for the same measured reason: `maxLinesProperty`
|
|
213
|
+
* (`ui/text-base/text-base-common.ts`) carries no `defaultValue`.
|
|
214
|
+
* `scripts/check-nativescript-ns-defaults.mjs` holds this against
|
|
215
|
+
* `status/nativescript-undefined-defaults.json`.
|
|
216
|
+
*/
|
|
217
|
+
maxLines: number | undefined;
|
|
218
|
+
}
|
|
219
|
+
export declare class Switch extends View {
|
|
220
|
+
private _checked;
|
|
221
|
+
get checked(): boolean;
|
|
222
|
+
/**
|
|
223
|
+
* A write fires `checkedChange`, as the platform's own property does for a
|
|
224
|
+
* PROGRAMMATIC write and not only for a drag — which is the re-entry `AdwSwitchRow`'s
|
|
225
|
+
* single funnel exists to stop. A double that only fired on a gesture would leave that
|
|
226
|
+
* funnel untested and the row green by absence.
|
|
227
|
+
*/
|
|
228
|
+
set checked(value: boolean);
|
|
229
|
+
}
|
|
230
|
+
export declare class Slider extends View {
|
|
231
|
+
value: number;
|
|
232
|
+
minValue: number;
|
|
233
|
+
maxValue: number;
|
|
234
|
+
}
|
|
235
|
+
export declare class TextField extends View {
|
|
236
|
+
private _text;
|
|
237
|
+
hint: string;
|
|
238
|
+
secure: boolean;
|
|
239
|
+
editable: boolean;
|
|
240
|
+
get text(): string;
|
|
241
|
+
/** `textChange` for a programmatic write too — same reasoning as `Switch.checked`. */
|
|
242
|
+
set text(value: string);
|
|
243
|
+
}
|
|
244
|
+
export declare class Button extends View {
|
|
245
|
+
text: string;
|
|
246
|
+
}
|
|
247
|
+
export declare class ScrollView extends View {
|
|
248
|
+
orientation: 'horizontal' | 'vertical';
|
|
249
|
+
content: View;
|
|
250
|
+
readonly horizontalOffset: number;
|
|
251
|
+
readonly verticalOffset: number;
|
|
252
|
+
scrollToHorizontalOffset(_value: number, _animated: boolean): void;
|
|
253
|
+
scrollToVerticalOffset(_value: number, _animated: boolean): void;
|
|
254
|
+
eachChildView(callback: (child: View) => boolean): void;
|
|
255
|
+
}
|
|
256
|
+
export declare class ContentView extends LayoutBase {
|
|
257
|
+
content: View;
|
|
258
|
+
}
|
|
259
|
+
export declare class WrapLayout extends LayoutBase {
|
|
260
|
+
orientation: 'horizontal' | 'vertical';
|
|
261
|
+
itemWidth: number;
|
|
262
|
+
itemHeight: number;
|
|
263
|
+
}
|
|
264
|
+
export declare class FlexboxLayout extends LayoutBase {
|
|
265
|
+
flexDirection: 'row' | 'row-reverse' | 'column' | 'column-reverse';
|
|
266
|
+
flexWrap: 'nowrap' | 'wrap' | 'wrap-reverse';
|
|
267
|
+
justifyContent: 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around';
|
|
268
|
+
alignItems: 'flex-start' | 'flex-end' | 'center' | 'baseline' | 'stretch';
|
|
269
|
+
alignContent: 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'stretch';
|
|
270
|
+
static setFlexGrow(view: View, grow: number): void;
|
|
271
|
+
static setFlexShrink(view: View, shrink: number): void;
|
|
272
|
+
}
|
|
273
|
+
export declare class AbsoluteLayout extends LayoutBase {
|
|
274
|
+
private static readonly _left;
|
|
275
|
+
private static readonly _top;
|
|
276
|
+
static setLeft(view: View, value: number): void;
|
|
277
|
+
static setTop(view: View, value: number): void;
|
|
278
|
+
static getLeft(view: View): number;
|
|
279
|
+
static getTop(view: View): number;
|
|
280
|
+
}
|
|
281
|
+
export declare class ActivityIndicator extends View {
|
|
282
|
+
busy: boolean;
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* A decoded native image.
|
|
286
|
+
*
|
|
287
|
+
* Constructible and inert: the only producer on this surface is `renderSymbolicIcon`, whose
|
|
288
|
+
* platform-neutral module already returns `null` off a device, so nothing here ever holds a
|
|
289
|
+
* bitmap. Its dimensions are zero for the same reason `getActualSize` reports zero.
|
|
290
|
+
*/
|
|
291
|
+
export declare class ImageSource {
|
|
292
|
+
readonly nativeSource?: unknown;
|
|
293
|
+
readonly width: number;
|
|
294
|
+
readonly height: number;
|
|
295
|
+
constructor(nativeSource?: unknown);
|
|
296
|
+
}
|
|
297
|
+
export declare class Image extends View {
|
|
298
|
+
src: string | ImageSource | undefined;
|
|
299
|
+
imageSource: ImageSource | undefined;
|
|
300
|
+
stretch: string;
|
|
301
|
+
}
|
|
302
|
+
export declare class SegmentedBarItem extends Observable {
|
|
303
|
+
title: string;
|
|
304
|
+
}
|
|
305
|
+
export declare class SegmentedBar extends View {
|
|
306
|
+
items: SegmentedBarItem[] | undefined;
|
|
307
|
+
selectedIndex: number;
|
|
308
|
+
}
|
|
309
|
+
export declare enum GestureTypes {
|
|
310
|
+
tap = 1
|
|
311
|
+
}
|
|
312
|
+
export interface ConfirmOptions {
|
|
313
|
+
title?: string;
|
|
314
|
+
message?: string;
|
|
315
|
+
okButtonText?: string;
|
|
316
|
+
cancelButtonText?: string;
|
|
317
|
+
neutralButtonText?: string;
|
|
318
|
+
cancelable?: boolean;
|
|
319
|
+
}
|
|
320
|
+
export interface ActionOptions {
|
|
321
|
+
title?: string;
|
|
322
|
+
message?: string;
|
|
323
|
+
cancelButtonText?: string;
|
|
324
|
+
actions: string[];
|
|
325
|
+
cancelable?: boolean;
|
|
326
|
+
}
|
|
327
|
+
export declare function confirm(_options: ConfirmOptions): Promise<boolean | undefined>;
|
|
328
|
+
export declare function action(_options: ActionOptions): Promise<string>;
|
|
329
|
+
export declare namespace Application {
|
|
330
|
+
function addCss(cssText: string, _attributeScoped?: boolean): void;
|
|
331
|
+
/** What the accent layer appended — the read-back a device gives through the engine. */
|
|
332
|
+
function appliedCss(): readonly string[];
|
|
333
|
+
function on(event: string, callback: (args: unknown) => void): void;
|
|
334
|
+
function off(event: string, callback: (args: unknown) => void): void;
|
|
335
|
+
/** Absent, as on every platform that is not Android — and this is not Android. */
|
|
336
|
+
const android: undefined;
|
|
337
|
+
/** Absent, as on every platform that is not iOS — and this is not iOS. */
|
|
338
|
+
const ios: undefined;
|
|
339
|
+
}
|
|
340
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const AdwValueListsNsTest: () => Promise<void>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { AdwSidebarItemSpec, AdwSidebarSectionSpec } from '@gjsify/adwaita-core';
|
|
2
|
+
/** What `new Adw.SidebarItem({ … })` takes. */
|
|
3
|
+
export interface AdwSidebarItemProps {
|
|
4
|
+
title?: string | null;
|
|
5
|
+
subtitle?: string | null;
|
|
6
|
+
iconName?: string | null;
|
|
7
|
+
visible?: boolean | string;
|
|
8
|
+
enabled?: boolean | string;
|
|
9
|
+
}
|
|
10
|
+
export declare class AdwSidebarItem implements AdwSidebarItemSpec {
|
|
11
|
+
/** `Adw.SidebarItem:title`. */
|
|
12
|
+
title: string;
|
|
13
|
+
/** `Adw.SidebarItem:subtitle`. */
|
|
14
|
+
subtitle: string;
|
|
15
|
+
/** `Adw.SidebarItem:icon-name` — `''` for none. */
|
|
16
|
+
iconName: string;
|
|
17
|
+
/** `Adw.SidebarItem:visible` — bound to the row's `visible`. Default `true`. */
|
|
18
|
+
visible: boolean;
|
|
19
|
+
/** `Adw.SidebarItem:enabled` — bound to the row's `sensitive`. Default `true`. */
|
|
20
|
+
enabled: boolean;
|
|
21
|
+
constructor(props?: AdwSidebarItemProps | null);
|
|
22
|
+
}
|
|
23
|
+
/** What `new Adw.SidebarSection({ … })` takes. */
|
|
24
|
+
export interface AdwSidebarSectionProps {
|
|
25
|
+
title?: string | null;
|
|
26
|
+
}
|
|
27
|
+
export declare class AdwSidebarSection implements AdwSidebarSectionSpec {
|
|
28
|
+
/** `Adw.SidebarSection:title` — `''` draws a separator instead of a heading. */
|
|
29
|
+
title: string;
|
|
30
|
+
/** The section's items, in the order they were appended. */
|
|
31
|
+
readonly items: AdwSidebarItem[];
|
|
32
|
+
/** The sidebar showing this section, told when an item arrives — see {@link _bindOwner}. */
|
|
33
|
+
private _owner;
|
|
34
|
+
constructor(props?: AdwSidebarSectionProps | null);
|
|
35
|
+
/** `adw_sidebar_section_append`. A sidebar already showing the section redraws. */
|
|
36
|
+
append(item: AdwSidebarItem): void;
|
|
37
|
+
/**
|
|
38
|
+
* Called by the sidebar that takes this section. NativeScript's XML builder hands a
|
|
39
|
+
* `<adw:SidebarSection>` to the sidebar at its START tag, before its items are read, so
|
|
40
|
+
* the items reach a section the sidebar already drew — as `adw_sidebar_section_append` on
|
|
41
|
+
* a section in a sidebar does in C, which the sidebar follows through `items-changed`.
|
|
42
|
+
*/
|
|
43
|
+
_bindOwner(owner: () => void): void;
|
|
44
|
+
/** XML inflation: every child is an item, appended in document order. */
|
|
45
|
+
_addChildFromBuilder(_name: string, child: object): void;
|
|
46
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { View } from '@nativescript/core';
|
|
2
|
+
/** What `new Adw.TabPage({ … })` takes. */
|
|
3
|
+
export interface AdwTabPageProps {
|
|
4
|
+
title?: string | null;
|
|
5
|
+
}
|
|
6
|
+
export declare class AdwTabPage {
|
|
7
|
+
/** `Adw.TabPage:child` is the one destination, so it is the fallback too. */
|
|
8
|
+
static readonly builderSlots: readonly string[];
|
|
9
|
+
/** `Adw.TabPage:title` — the tab's label. */
|
|
10
|
+
title: string;
|
|
11
|
+
/** `Adw.TabPage:child` — the content the page shows, or `null` before one is set. */
|
|
12
|
+
child: View | null;
|
|
13
|
+
constructor(props?: AdwTabPageProps | null);
|
|
14
|
+
/** XML inflation: `child: …` (or a bare child) is the page's content. */
|
|
15
|
+
_addChildFromBuilder(_name: string, view: View): void;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const AdwViewSwitcherStackNsTest: () => Promise<void>;
|
|
@@ -5,6 +5,18 @@ export declare const CLOSED = "closed";
|
|
|
5
5
|
declare const AdwAboutDialog_base: (abstract new (...args: any[]) => {
|
|
6
6
|
connect(eventName: string, callback: (self: /*elided*/ any, data: EventData) => void): number;
|
|
7
7
|
disconnect(handlerId: number): void;
|
|
8
|
+
get halign(): string;
|
|
9
|
+
set halign(value: string | number);
|
|
10
|
+
get valign(): string;
|
|
11
|
+
set valign(value: string | number);
|
|
12
|
+
get hexpand(): boolean;
|
|
13
|
+
set hexpand(value: boolean | string);
|
|
14
|
+
get vexpand(): boolean;
|
|
15
|
+
set vexpand(value: boolean | string);
|
|
16
|
+
get marginStart(): number;
|
|
17
|
+
set marginStart(value: number | string);
|
|
18
|
+
get marginEnd(): number;
|
|
19
|
+
set marginEnd(value: number | string);
|
|
8
20
|
_emit(eventName: string): void;
|
|
9
21
|
addEventListener(eventName: string, callback: (data: EventData) => void, thisArg?: unknown, once?: boolean): void;
|
|
10
22
|
removeEventListener(eventName: string, callback?: (data: EventData) => void, thisArg?: unknown): void;
|
|
@@ -7,6 +7,18 @@ export declare const ACTIVATED = "activated";
|
|
|
7
7
|
declare const AdwActionRow_base: (abstract new (...args: any[]) => {
|
|
8
8
|
connect(eventName: string, callback: (self: /*elided*/ any, data: EventData) => void): number;
|
|
9
9
|
disconnect(handlerId: number): void;
|
|
10
|
+
get halign(): string;
|
|
11
|
+
set halign(value: string | number);
|
|
12
|
+
get valign(): string;
|
|
13
|
+
set valign(value: string | number);
|
|
14
|
+
get hexpand(): boolean;
|
|
15
|
+
set hexpand(value: boolean | string);
|
|
16
|
+
get vexpand(): boolean;
|
|
17
|
+
set vexpand(value: boolean | string);
|
|
18
|
+
get marginStart(): number;
|
|
19
|
+
set marginStart(value: number | string);
|
|
20
|
+
get marginEnd(): number;
|
|
21
|
+
set marginEnd(value: number | string);
|
|
10
22
|
_emit(eventName: string): void;
|
|
11
23
|
addEventListener(eventName: string, callback: (data: EventData) => void, thisArg?: unknown, once?: boolean): void;
|
|
12
24
|
removeEventListener(eventName: string, callback?: (data: EventData) => void, thisArg?: unknown): void;
|
|
@@ -16,6 +28,8 @@ declare const AdwActionRow_base: (abstract new (...args: any[]) => {
|
|
|
16
28
|
get(name: string): unknown;
|
|
17
29
|
}) & typeof GridLayout;
|
|
18
30
|
export declare class AdwActionRow extends AdwActionRow_base {
|
|
31
|
+
/** The names this widget's `_addChildFromBuilder` honours — see `./builder-slots.ts`. */
|
|
32
|
+
static readonly builderSlots: readonly string[];
|
|
19
33
|
/**
|
|
20
34
|
* Whether libadwaita would answer `ADW_IS_ACTION_ROW` for this row, which decides
|
|
21
35
|
* whether the preferences SEARCH consults its subtitle.
|
|
@@ -44,6 +58,14 @@ export declare class AdwActionRow extends AdwActionRow_base {
|
|
|
44
58
|
* cardinality is the declared remainder — the method ledger in
|
|
45
59
|
* `scripts/check-vocabulary-alignment.mjs` compares names, and ADR 0034 § Amendment 14
|
|
46
60
|
* names this as the divergence a name cannot carry. `remove()` clears the slot.
|
|
61
|
+
*
|
|
62
|
+
* INSERTED FIRST, NOT APPENDED, and on a `GridLayout` that is about the COMPOSED TREE
|
|
63
|
+
* rather than the layout: the column decides where it draws either way, so appending
|
|
64
|
+
* looked free — until an authored tree put a prefix on a row and the port realised it
|
|
65
|
+
* AFTER the disclosure's own rows, where `gtk_widget_get_first_child` and
|
|
66
|
+
* `<div class="adw-entry-row-prefixes">` both put it first. `adwaita-web`'s own slot
|
|
67
|
+
* binding already records the rule ("`addPrefix` PREPENDS, mirroring `gtk_box_prepend`");
|
|
68
|
+
* this is the third renderer joining it.
|
|
47
69
|
*/
|
|
48
70
|
add_prefix(view: View): void;
|
|
49
71
|
get prefix(): View | null;
|
|
@@ -14,6 +14,18 @@ export interface NotifyResponseEventData extends EventData {
|
|
|
14
14
|
declare const AdwAlertDialog_base: (abstract new (...args: any[]) => {
|
|
15
15
|
connect(eventName: string, callback: (self: /*elided*/ any, data: EventData) => void): number;
|
|
16
16
|
disconnect(handlerId: number): void;
|
|
17
|
+
get halign(): string;
|
|
18
|
+
set halign(value: string | number);
|
|
19
|
+
get valign(): string;
|
|
20
|
+
set valign(value: string | number);
|
|
21
|
+
get hexpand(): boolean;
|
|
22
|
+
set hexpand(value: boolean | string);
|
|
23
|
+
get vexpand(): boolean;
|
|
24
|
+
set vexpand(value: boolean | string);
|
|
25
|
+
get marginStart(): number;
|
|
26
|
+
set marginStart(value: number | string);
|
|
27
|
+
get marginEnd(): number;
|
|
28
|
+
set marginEnd(value: number | string);
|
|
17
29
|
_emit(eventName: string): void;
|
|
18
30
|
addEventListener(eventName: string, callback: (data: EventData) => void, thisArg?: unknown, once?: boolean): void;
|
|
19
31
|
removeEventListener(eventName: string, callback?: (data: EventData) => void, thisArg?: unknown): void;
|
|
@@ -25,7 +37,12 @@ declare const AdwAlertDialog_base: (abstract new (...args: any[]) => {
|
|
|
25
37
|
export declare class AdwAlertDialog extends AdwAlertDialog_base {
|
|
26
38
|
/** The headless response registry + ordering + resolution (ADR 0004). */
|
|
27
39
|
private readonly _responses;
|
|
28
|
-
|
|
40
|
+
/**
|
|
41
|
+
* `adw_alert_dialog_new(heading, body)`'s positional pair, or GJS's construct bag
|
|
42
|
+
* `new Adw.AlertDialog({ heading, body })` as the only argument — the form a GJS author
|
|
43
|
+
* writes and the one the shared-tree builder hands every value object it builds.
|
|
44
|
+
*/
|
|
45
|
+
constructor(headingOrProps?: string | ConstructProps<AdwAlertDialog>, body?: string, props?: ConstructProps<AdwAlertDialog>);
|
|
29
46
|
/** The dialog heading (title). */
|
|
30
47
|
get heading(): string;
|
|
31
48
|
set heading(value: string);
|
|
@@ -10,6 +10,18 @@ export { AVATAR_DEFAULT_ICON };
|
|
|
10
10
|
declare const AdwAvatar_base: (abstract new (...args: any[]) => {
|
|
11
11
|
connect(eventName: string, callback: (self: /*elided*/ any, data: import("@nativescript/core").EventData) => void): number;
|
|
12
12
|
disconnect(handlerId: number): void;
|
|
13
|
+
get halign(): string;
|
|
14
|
+
set halign(value: string | number);
|
|
15
|
+
get valign(): string;
|
|
16
|
+
set valign(value: string | number);
|
|
17
|
+
get hexpand(): boolean;
|
|
18
|
+
set hexpand(value: boolean | string);
|
|
19
|
+
get vexpand(): boolean;
|
|
20
|
+
set vexpand(value: boolean | string);
|
|
21
|
+
get marginStart(): number;
|
|
22
|
+
set marginStart(value: number | string);
|
|
23
|
+
get marginEnd(): number;
|
|
24
|
+
set marginEnd(value: number | string);
|
|
13
25
|
_emit(eventName: string): void;
|
|
14
26
|
addEventListener(eventName: string, callback: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown, once?: boolean): void;
|
|
15
27
|
removeEventListener(eventName: string, callback?: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown): void;
|
|
@@ -6,6 +6,18 @@ export declare const BUTTON_CLICKED = "buttonClicked";
|
|
|
6
6
|
declare const AdwBanner_base: (abstract new (...args: any[]) => {
|
|
7
7
|
connect(eventName: string, callback: (self: /*elided*/ any, data: EventData) => void): number;
|
|
8
8
|
disconnect(handlerId: number): void;
|
|
9
|
+
get halign(): string;
|
|
10
|
+
set halign(value: string | number);
|
|
11
|
+
get valign(): string;
|
|
12
|
+
set valign(value: string | number);
|
|
13
|
+
get hexpand(): boolean;
|
|
14
|
+
set hexpand(value: boolean | string);
|
|
15
|
+
get vexpand(): boolean;
|
|
16
|
+
set vexpand(value: boolean | string);
|
|
17
|
+
get marginStart(): number;
|
|
18
|
+
set marginStart(value: number | string);
|
|
19
|
+
get marginEnd(): number;
|
|
20
|
+
set marginEnd(value: number | string);
|
|
9
21
|
_emit(eventName: string): void;
|
|
10
22
|
addEventListener(eventName: string, callback: (data: EventData) => void, thisArg?: unknown, once?: boolean): void;
|
|
11
23
|
removeEventListener(eventName: string, callback?: (data: EventData) => void, thisArg?: unknown): void;
|