@gjsify/adwaita-nativescript 0.47.0 → 0.49.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/_virtual/_rolldown/runtime.js +1 -1
- package/lib/esm/index.js +1 -1
- package/lib/esm/namespace/adw.js +1 -0
- package/lib/esm/namespace/gtk.js +1 -0
- package/lib/esm/widgets/adw-about-dialog.js +1 -1
- 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-banner.js +1 -1
- package/lib/esm/widgets/adw-bottom-sheet.js +1 -1
- package/lib/esm/widgets/adw-button-content.js +1 -1
- package/lib/esm/widgets/adw-button-row.js +1 -1
- 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-data-grid.js +1 -1
- package/lib/esm/widgets/adw-entry-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-image-button.js +1 -1
- package/lib/esm/widgets/adw-inline-view-switcher.js +1 -1
- package/lib/esm/widgets/adw-navigation-split-view.js +1 -1
- package/lib/esm/widgets/adw-navigation-view.js +1 -1
- package/lib/esm/widgets/adw-overlay-split-view.js +1 -1
- package/lib/esm/widgets/adw-password-entry-row.js +1 -1
- package/lib/esm/widgets/adw-preferences-dialog.js +1 -1
- package/lib/esm/widgets/adw-preferences-group.js +1 -1
- package/lib/esm/widgets/adw-preferences-page.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-slider-row.js +1 -1
- package/lib/esm/widgets/adw-spin-row.js +1 -1
- package/lib/esm/widgets/adw-spinner.js +1 -1
- package/lib/esm/widgets/adw-split-button.js +1 -1
- package/lib/esm/widgets/adw-status-page.js +1 -1
- package/lib/esm/widgets/adw-switch-row.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-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/adw-view-switcher.js +1 -1
- package/lib/esm/widgets/adw-window-title.js +1 -1
- package/lib/esm/widgets/adw-wrap-box.js +1 -1
- package/lib/esm/widgets/avatar-view.js +1 -0
- package/lib/esm/widgets/box-layout.js +1 -0
- package/lib/esm/widgets/button-content.js +1 -1
- package/lib/esm/widgets/button-slot.js +1 -0
- package/lib/esm/widgets/construct-props.js +1 -0
- package/lib/esm/widgets/entry-row-view.js +1 -1
- package/lib/esm/widgets/gtk-align.js +1 -0
- package/lib/esm/widgets/gtk-box.js +1 -0
- package/lib/esm/widgets/gtk-button.js +1 -1
- package/lib/esm/widgets/gtk-drop-down.js +1 -1
- package/lib/esm/widgets/gtk-entry.js +1 -1
- package/lib/esm/widgets/gtk-image.js +1 -0
- package/lib/esm/widgets/gtk-label.js +1 -0
- package/lib/esm/widgets/gtk-menu-button.js +1 -1
- package/lib/esm/widgets/icon-theme.js +1 -0
- package/lib/esm/widgets/index.js +1 -1
- package/lib/esm/widgets/label-text.js +1 -0
- package/lib/esm/widgets/menu-sheet.js +1 -0
- package/lib/esm/widgets/signals.js +1 -0
- package/lib/esm/widgets/split-button.js +1 -1
- package/lib/esm/widgets/split-view-base.js +1 -1
- package/lib/esm/widgets/style-classes.js +1 -0
- package/lib/esm/widgets/view-switcher-base.js +1 -1
- package/lib/esm/widgets/view-switcher-model.js +1 -1
- package/lib/types/avatar.spec.d.ts +2 -0
- package/lib/types/box-layout.spec.d.ts +2 -0
- package/lib/types/button-slot.spec.d.ts +2 -0
- package/lib/types/construct-props.spec.d.ts +2 -0
- package/lib/types/icon-theme.spec.d.ts +2 -0
- package/lib/types/index.d.ts +4 -3
- package/lib/types/label-text.spec.d.ts +2 -0
- package/lib/types/namespace/adw.d.ts +38 -0
- package/lib/types/namespace/gtk.d.ts +7 -0
- package/lib/types/signals.spec.d.ts +2 -0
- package/lib/types/style-classes.spec.d.ts +2 -0
- package/lib/types/widgets/adw-about-dialog.d.ts +16 -3
- package/lib/types/widgets/adw-action-row.d.ts +38 -10
- package/lib/types/widgets/adw-alert-dialog.d.ts +30 -13
- package/lib/types/widgets/adw-avatar.d.ts +49 -3
- package/lib/types/widgets/adw-banner.d.ts +16 -3
- package/lib/types/widgets/adw-bottom-sheet.d.ts +32 -16
- package/lib/types/widgets/adw-button-content.d.ts +20 -6
- package/lib/types/widgets/adw-button-row.d.ts +10 -7
- package/lib/types/widgets/adw-carousel.d.ts +19 -7
- package/lib/types/widgets/adw-clamp.d.ts +17 -5
- package/lib/types/widgets/adw-combo-row.d.ts +8 -7
- package/lib/types/widgets/adw-data-grid.d.ts +17 -4
- package/lib/types/widgets/adw-entry-row.d.ts +16 -14
- package/lib/types/widgets/adw-expander-row.d.ts +21 -10
- package/lib/types/widgets/adw-header-bar.d.ts +39 -14
- package/lib/types/widgets/adw-image-button.d.ts +22 -5
- package/lib/types/widgets/adw-inline-view-switcher.d.ts +2 -1
- package/lib/types/widgets/adw-navigation-split-view.d.ts +2 -1
- package/lib/types/widgets/adw-navigation-view.d.ts +40 -21
- package/lib/types/widgets/adw-overlay-split-view.d.ts +3 -2
- package/lib/types/widgets/adw-password-entry-row.d.ts +2 -1
- package/lib/types/widgets/adw-preferences-dialog.d.ts +16 -3
- package/lib/types/widgets/adw-preferences-group.d.ts +19 -6
- package/lib/types/widgets/adw-preferences-page.d.ts +37 -8
- package/lib/types/widgets/adw-shortcut-label.d.ts +15 -2
- package/lib/types/widgets/adw-sidebar.d.ts +15 -2
- package/lib/types/widgets/adw-slider-row.d.ts +30 -19
- package/lib/types/widgets/adw-spin-row.d.ts +18 -14
- package/lib/types/widgets/adw-spinner.d.ts +14 -2
- package/lib/types/widgets/adw-split-button.d.ts +60 -12
- package/lib/types/widgets/adw-status-page.d.ts +22 -8
- package/lib/types/widgets/adw-switch-row.d.ts +2 -1
- package/lib/types/widgets/adw-tab-view.d.ts +34 -8
- package/lib/types/widgets/adw-toast-overlay.d.ts +19 -7
- package/lib/types/widgets/adw-toggle-group.d.ts +14 -2
- package/lib/types/widgets/adw-toolbar-view.d.ts +21 -8
- package/lib/types/widgets/adw-view-stack.d.ts +38 -5
- package/lib/types/widgets/adw-view-switcher-bar.d.ts +16 -3
- package/lib/types/widgets/adw-view-switcher.d.ts +2 -1
- package/lib/types/widgets/adw-window-title.d.ts +16 -3
- package/lib/types/widgets/adw-wrap-box.d.ts +21 -8
- package/lib/types/widgets/avatar-view.d.ts +57 -0
- package/lib/types/widgets/bottom-sheet-state.d.ts +1 -1
- package/lib/types/widgets/box-layout.d.ts +39 -0
- package/lib/types/widgets/button-content.d.ts +4 -4
- package/lib/types/widgets/button-slot.d.ts +16 -0
- package/lib/types/widgets/construct-props.d.ts +82 -0
- package/lib/types/widgets/entry-row-view.d.ts +9 -8
- package/lib/types/widgets/gtk-align.d.ts +59 -0
- package/lib/types/widgets/gtk-box.d.ts +75 -0
- package/lib/types/widgets/gtk-button.d.ts +110 -28
- package/lib/types/widgets/gtk-drop-down.d.ts +21 -8
- package/lib/types/widgets/gtk-entry.d.ts +15 -2
- package/lib/types/widgets/gtk-image.d.ts +42 -0
- package/lib/types/widgets/gtk-label.d.ts +82 -0
- package/lib/types/widgets/gtk-menu-button.d.ts +29 -18
- package/lib/types/widgets/icon-theme.d.ts +77 -0
- package/lib/types/widgets/icons.d.ts +3 -1
- package/lib/types/widgets/index.d.ts +18 -5
- package/lib/types/widgets/label-text.d.ts +13 -0
- package/lib/types/widgets/menu-sheet.d.ts +58 -0
- package/lib/types/widgets/row-state.d.ts +1 -1
- package/lib/types/widgets/signals.d.ts +40 -0
- package/lib/types/widgets/split-button.d.ts +2 -21
- package/lib/types/widgets/split-view-base.d.ts +18 -6
- package/lib/types/widgets/status-page-content.d.ts +1 -1
- package/lib/types/widgets/style-classes.d.ts +61 -0
- package/lib/types/widgets/view-switcher-base.d.ts +12 -1
- package/lib/types/widgets/view-switcher-model.d.ts +3 -12
- package/package.json +14 -10
- package/src/theme/adwaita.css +66 -8
- package/lib/esm/namespace.js +0 -1
- package/lib/esm/widgets/adw-icon.js +0 -1
- package/lib/types/namespace.d.ts +0 -92
- package/lib/types/widgets/adw-icon.d.ts +0 -25
|
@@ -1,15 +1,27 @@
|
|
|
1
1
|
import type { View } from '@nativescript/core';
|
|
2
2
|
import { GridLayout } from '@nativescript/core';
|
|
3
3
|
import { DEFAULT_CLAMP_MAX_SIZE, DEFAULT_CLAMP_TIGHTENING_THRESHOLD } from './chrome.js';
|
|
4
|
+
import { type ConstructProps } from './construct-props.js';
|
|
4
5
|
export { DEFAULT_CLAMP_MAX_SIZE, DEFAULT_CLAMP_TIGHTENING_THRESHOLD };
|
|
5
|
-
|
|
6
|
+
declare const AdwClamp_base: (abstract new (...args: any[]) => {
|
|
7
|
+
connect(eventName: string, callback: (self: /*elided*/ any, data: import("@nativescript/core").EventData) => void): number;
|
|
8
|
+
disconnect(handlerId: number): void;
|
|
9
|
+
_emit(eventName: string): void;
|
|
10
|
+
addEventListener(eventName: string, callback: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown, once?: boolean): void;
|
|
11
|
+
removeEventListener(eventName: string, callback?: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown): void;
|
|
12
|
+
notify<T extends import("@nativescript/core").EventData>(data: T): void;
|
|
13
|
+
notifyPropertyChange(name: string, value: unknown, oldValue?: unknown): void;
|
|
14
|
+
set(name: string, value: unknown): void;
|
|
15
|
+
get(name: string): unknown;
|
|
16
|
+
}) & typeof GridLayout;
|
|
17
|
+
export declare class AdwClamp extends AdwClamp_base {
|
|
6
18
|
private _props;
|
|
7
19
|
private _child;
|
|
8
20
|
/** The container width the child was last clamped against, in DIPs. */
|
|
9
|
-
private
|
|
10
|
-
constructor();
|
|
11
|
-
/** Set (or replace) the clamped, centered child
|
|
12
|
-
|
|
21
|
+
private _clampWidth;
|
|
22
|
+
constructor(props?: ConstructProps<AdwClamp>);
|
|
23
|
+
/** Set (or replace) the clamped, centered child — `adw_clamp_set_child`. `null` clears it. */
|
|
24
|
+
set_child(view: View | null): void;
|
|
13
25
|
/** The currently-clamped child, or `null`. */
|
|
14
26
|
get child(): View | null;
|
|
15
27
|
/**
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Label, type EventData } from '@nativescript/core';
|
|
2
|
-
import type { AdwComboOption } from '@gjsify/adwaita-core';
|
|
2
|
+
import type { AdwComboOption, AdwListModelInput } from '@gjsify/adwaita-core';
|
|
3
3
|
import { AdwActionRow } from './adw-action-row.js';
|
|
4
|
-
import {
|
|
4
|
+
import { GtkImage } from './gtk-image.js';
|
|
5
|
+
import { type ConstructProps } from './construct-props.js';
|
|
5
6
|
export { ComboState } from '@gjsify/adwaita-core';
|
|
6
7
|
export type { AdwComboOption, ComboStateChange, ComboStateListener } from '@gjsify/adwaita-core';
|
|
7
8
|
/** Event name emitted when {@link AdwComboRow.selected} changes. Mirrors GObject `notify::selected`. */
|
|
@@ -17,10 +18,10 @@ export declare class AdwComboRow extends AdwActionRow {
|
|
|
17
18
|
/** The dim inline value label (selected option). */
|
|
18
19
|
protected readonly _valueLabel: Label;
|
|
19
20
|
/** The down-chevron — a real Adwaita `pan-down-symbolic` icon. */
|
|
20
|
-
protected readonly _chevron:
|
|
21
|
+
protected readonly _chevron: GtkImage;
|
|
21
22
|
/** The headless options list + selectedIndex↔selectedValue state machine (ADR 0004). */
|
|
22
23
|
private readonly _state;
|
|
23
|
-
constructor();
|
|
24
|
+
constructor(props?: ConstructProps<AdwComboRow>);
|
|
24
25
|
/**
|
|
25
26
|
* `model_changed` (adw-combo-row.c:187-195) — one option or none is not a
|
|
26
27
|
* choice, so the chevron goes and the row stops being activatable.
|
|
@@ -32,9 +33,9 @@ export declare class AdwComboRow extends AdwActionRow {
|
|
|
32
33
|
private _syncChooser;
|
|
33
34
|
/** Open the native action chooser and apply the picked option. */
|
|
34
35
|
private _openChooser;
|
|
35
|
-
/** The
|
|
36
|
-
get
|
|
37
|
-
set
|
|
36
|
+
/** The list model (`Adw.ComboRow:model`). Updates the inline value label. */
|
|
37
|
+
get model(): AdwComboOption[];
|
|
38
|
+
set model(value: AdwListModelInput);
|
|
38
39
|
/** The selected option index. Updates the inline value label. */
|
|
39
40
|
get selected(): number;
|
|
40
41
|
set selected(raw: number | string);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { GridLayout, type EventData } from '@nativescript/core';
|
|
2
2
|
import type { AdwDataGridColumn, AdwDataGridRow } from '@gjsify/adwaita-core';
|
|
3
|
+
import { type ConstructProps } from './construct-props.js';
|
|
3
4
|
/** Event name emitted when an interactive row is tapped. Mirrors the browser's `row-activated`. */
|
|
4
5
|
export declare const ROW_ACTIVATED = "row-activated";
|
|
5
6
|
/** Payload of the `row-activated` event. */
|
|
@@ -8,19 +9,30 @@ export interface RowActivatedEventData extends EventData {
|
|
|
8
9
|
index: number;
|
|
9
10
|
row: AdwDataGridRow;
|
|
10
11
|
}
|
|
11
|
-
|
|
12
|
+
declare const AdwDataGrid_base: (abstract new (...args: any[]) => {
|
|
13
|
+
connect(eventName: string, callback: (self: /*elided*/ any, data: EventData) => void): number;
|
|
14
|
+
disconnect(handlerId: number): void;
|
|
15
|
+
_emit(eventName: string): void;
|
|
16
|
+
addEventListener(eventName: string, callback: (data: EventData) => void, thisArg?: unknown, once?: boolean): void;
|
|
17
|
+
removeEventListener(eventName: string, callback?: (data: EventData) => void, thisArg?: unknown): void;
|
|
18
|
+
notify<T extends EventData>(data: T): void;
|
|
19
|
+
notifyPropertyChange(name: string, value: unknown, oldValue?: unknown): void;
|
|
20
|
+
set(name: string, value: unknown): void;
|
|
21
|
+
get(name: string): unknown;
|
|
22
|
+
}) & typeof GridLayout;
|
|
23
|
+
export declare class AdwDataGrid extends AdwDataGrid_base {
|
|
12
24
|
private _columns;
|
|
13
|
-
private
|
|
25
|
+
private _dataRows;
|
|
14
26
|
private _interactive;
|
|
15
27
|
/** The header row's nodes, or `null` while there are no columns. */
|
|
16
28
|
private _header;
|
|
17
|
-
/** One entry per data row, index-aligned with {@link
|
|
29
|
+
/** One entry per data row, index-aligned with {@link _dataRows}. */
|
|
18
30
|
private _rowNodes;
|
|
19
31
|
/** The tracks the declared columns were built from — the re-declare guard. */
|
|
20
32
|
private _trackKey;
|
|
21
33
|
/** The columns×rows the views were built for — the rebuild guard. */
|
|
22
34
|
private _shapeKey;
|
|
23
|
-
constructor();
|
|
35
|
+
constructor(props?: ConstructProps<AdwDataGrid>);
|
|
24
36
|
/** The column descriptors. Setting them re-derives the tracks. */
|
|
25
37
|
get columns(): AdwDataGridColumn[];
|
|
26
38
|
set columns(value: ReadonlyArray<AdwDataGridColumn>);
|
|
@@ -65,3 +77,4 @@ export declare class AdwDataGrid extends GridLayout {
|
|
|
65
77
|
*/
|
|
66
78
|
private _activate;
|
|
67
79
|
}
|
|
80
|
+
export {};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Label, StackLayout, TextField, type EventData, type View } from '@nativescript/core';
|
|
2
2
|
import { EntryRowState, type EntryRowRenderState } from '@gjsify/adwaita-core';
|
|
3
3
|
import { AdwActionRow } from './adw-action-row.js';
|
|
4
|
-
import {
|
|
4
|
+
import { GtkImage } from './gtk-image.js';
|
|
5
5
|
import { AdwImageButton } from './adw-image-button.js';
|
|
6
|
+
import { type ConstructProps } from './construct-props.js';
|
|
6
7
|
export { EntryRowState } from '@gjsify/adwaita-core';
|
|
7
8
|
export type { EntryRowRenderState, EntryRowActivation } from '@gjsify/adwaita-core';
|
|
8
9
|
/** Event name emitted when {@link AdwEntryRow.text} changes. Mirrors GObject `notify::text`. */
|
|
@@ -44,15 +45,15 @@ export declare class AdwEntryRow extends AdwActionRow {
|
|
|
44
45
|
/** The trailing affordance box — `Adw.EntryRow`'s suffixes BOX, not a slot. */
|
|
45
46
|
protected readonly _suffixes: StackLayout;
|
|
46
47
|
/** The pencil (`edit_icon`). Non-interactive, like its `can-target=False` original. */
|
|
47
|
-
protected readonly _editIcon:
|
|
48
|
+
protected readonly _editIcon: GtkImage;
|
|
48
49
|
/** The caps-lock warning slot (`indicator`). */
|
|
49
|
-
protected readonly _indicator:
|
|
50
|
+
protected readonly _indicator: GtkImage;
|
|
50
51
|
protected readonly _applyButton: AdwImageButton;
|
|
51
|
-
/** The suffix installed through the inherited single-slot {@link
|
|
52
|
+
/** The suffix installed through the inherited single-slot {@link add_suffix}. */
|
|
52
53
|
private _slotSuffix;
|
|
53
54
|
private _lastText;
|
|
54
55
|
private _lastLength;
|
|
55
|
-
constructor();
|
|
56
|
+
constructor(props?: ConstructProps<AdwEntryRow>);
|
|
56
57
|
/** The editable text. */
|
|
57
58
|
get text(): string;
|
|
58
59
|
set text(value: string);
|
|
@@ -72,17 +73,18 @@ export declare class AdwEntryRow extends AdwActionRow {
|
|
|
72
73
|
set activatesDefault(raw: boolean | string);
|
|
73
74
|
/** Whether the field currently has focus. */
|
|
74
75
|
get editing(): boolean;
|
|
75
|
-
/** Append a suffix — `adw_entry_row_add_suffix` appends into a BOX, so suffixes COEXIST. */
|
|
76
|
-
addSuffix(view: View): void;
|
|
77
76
|
/**
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
77
|
+
* Append a suffix — `adw_entry_row_add_suffix` appends into a BOX, so suffixes
|
|
78
|
+
* COEXIST here as upstream, unlike the one-slot rule `AdwActionRow.add_suffix` states.
|
|
79
|
+
*
|
|
80
|
+
* The override matters for the password row: the base's one-slot `add_suffix` would
|
|
81
|
+
* detach the row's own peek toggle to make room, leaving `_peekButton` pointing at a
|
|
82
|
+
* detached view so the row could never be revealed again.
|
|
83
83
|
*/
|
|
84
|
-
|
|
85
|
-
/**
|
|
84
|
+
add_suffix(view: View): void;
|
|
85
|
+
/** Remove a suffix added through {@link add_suffix} — `adw_entry_row_remove`. */
|
|
86
|
+
remove(view: View): void;
|
|
87
|
+
/** The suffix most recently installed through {@link add_suffix}, or `null`. */
|
|
86
88
|
get suffix(): View | null;
|
|
87
89
|
/**
|
|
88
90
|
* Drive the trailing indicator — `adw_entry_row_set_show_indicator`. Private to
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { View } from '@nativescript/core';
|
|
2
|
-
import {
|
|
2
|
+
import { StackLayout, type EventData } from '@nativescript/core';
|
|
3
3
|
import { AdwActionRow } from './adw-action-row.js';
|
|
4
|
-
import {
|
|
4
|
+
import { GtkImage } from './gtk-image.js';
|
|
5
|
+
import { type ConstructProps } from './construct-props.js';
|
|
5
6
|
export { ExpanderState } from '@gjsify/adwaita-core';
|
|
6
7
|
export type { ExpanderStateListener } from '@gjsify/adwaita-core';
|
|
7
8
|
/** Event name emitted when {@link AdwExpanderRow.expanded} changes. Mirrors GObject `notify::expanded`. */
|
|
@@ -16,16 +17,25 @@ export declare class AdwExpanderRow extends AdwActionRow {
|
|
|
16
17
|
* (adw-expander-row.c:72), so the search does not consult a subtitle here. */
|
|
17
18
|
readonly isActionRow: boolean;
|
|
18
19
|
/** The disclosure chevron (suffix) — a plain symbolic icon, like Adw.ExpanderRow. */
|
|
19
|
-
protected readonly _toggle:
|
|
20
|
+
protected readonly _toggle: GtkImage;
|
|
20
21
|
/** The container of revealed child rows (second grid row). */
|
|
21
22
|
protected readonly _disclosure: StackLayout;
|
|
22
23
|
/** The headless expanded/collapsed disclosure state machine (ADR 0004). */
|
|
23
24
|
private readonly _state;
|
|
24
|
-
constructor();
|
|
25
|
-
/**
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
constructor(props?: ConstructProps<AdwExpanderRow>);
|
|
26
|
+
/**
|
|
27
|
+
* Append a child row (or any view) to the disclosure container —
|
|
28
|
+
* `adw_expander_row_add_row`.
|
|
29
|
+
*
|
|
30
|
+
* The GIR name is what ended a collision: this method was `addRow(View | ItemSpec)`,
|
|
31
|
+
* a union that existed only because `GridLayoutBase` already declares
|
|
32
|
+
* `addRow(itemSpec: ItemSpec)` and a same-named method with a narrower parameter is
|
|
33
|
+
* a type error against the real `@nativescript/core`. `add_row` is nobody else's, so
|
|
34
|
+
* the grid's track setup and the row's child list no longer share a name.
|
|
35
|
+
*/
|
|
36
|
+
add_row(view: View): void;
|
|
37
|
+
/** Remove a previously-added child row from the disclosure container — `adw_expander_row_remove`. */
|
|
38
|
+
remove(view: View): void;
|
|
29
39
|
/**
|
|
30
40
|
* An XML child is a ROW inside the disclosure — the one placement an expander row
|
|
31
41
|
* adds over its base, and the reason this overrides `AdwActionRow`'s prefix/suffix
|
|
@@ -33,7 +43,7 @@ export declare class AdwExpanderRow extends AdwActionRow {
|
|
|
33
43
|
*/
|
|
34
44
|
_addChildFromBuilder(name: string, view: View): void;
|
|
35
45
|
/**
|
|
36
|
-
* The rows inside the disclosure, in order — the read-back for `
|
|
46
|
+
* The rows inside the disclosure, in order — the read-back for `add_row`.
|
|
37
47
|
*
|
|
38
48
|
* NOT `rows`, which is what it was called first. `GridLayoutBase` declares `rows`
|
|
39
49
|
* as a SETTER-ONLY accessor (its getter is `rowsInternal`), so a getter of that
|
|
@@ -42,7 +52,8 @@ export declare class AdwExpanderRow extends AdwActionRow {
|
|
|
42
52
|
* which every NativeScript bundle is. Measured against that prototype shape, and
|
|
43
53
|
* it would have broken apps that never touch XML. `rows` and `columns` are the
|
|
44
54
|
* only two accessors of that shape on the bases this package extends —
|
|
45
|
-
* `scripts/check-nativescript-
|
|
55
|
+
* `scripts/check-nativescript-xml-doors.mjs` holds both (in `SETTER_ONLY_ON_BASE`,
|
|
56
|
+
* `scripts/nativescript-xml-doors.mjs:116`).
|
|
46
57
|
*/
|
|
47
58
|
get disclosureRows(): readonly View[];
|
|
48
59
|
/** Whether the disclosure is revealed. */
|
|
@@ -1,14 +1,26 @@
|
|
|
1
1
|
import type { View } from '@nativescript/core';
|
|
2
2
|
import { GridLayout, StackLayout } from '@nativescript/core';
|
|
3
|
-
|
|
3
|
+
import { type ConstructProps } from './construct-props.js';
|
|
4
|
+
declare const AdwHeaderBar_base: (abstract new (...args: any[]) => {
|
|
5
|
+
connect(eventName: string, callback: (self: /*elided*/ any, data: import("@nativescript/core").EventData) => void): number;
|
|
6
|
+
disconnect(handlerId: number): void;
|
|
7
|
+
_emit(eventName: string): void;
|
|
8
|
+
addEventListener(eventName: string, callback: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown, once?: boolean): void;
|
|
9
|
+
removeEventListener(eventName: string, callback?: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown): void;
|
|
10
|
+
notify<T extends import("@nativescript/core").EventData>(data: T): void;
|
|
11
|
+
notifyPropertyChange(name: string, value: unknown, oldValue?: unknown): void;
|
|
12
|
+
set(name: string, value: unknown): void;
|
|
13
|
+
get(name: string): unknown;
|
|
14
|
+
}) & typeof GridLayout;
|
|
15
|
+
export declare class AdwHeaderBar extends AdwHeaderBar_base {
|
|
4
16
|
/** The start (left) slot — a horizontal stack. */
|
|
5
17
|
protected readonly _startBox: StackLayout;
|
|
6
18
|
/** The end (right) slot — a horizontal stack. */
|
|
7
19
|
protected readonly _endBox: StackLayout;
|
|
8
20
|
/** The centered title widget (default {@link AdwWindowTitle}). */
|
|
9
21
|
private _titleWidget;
|
|
10
|
-
private
|
|
11
|
-
constructor();
|
|
22
|
+
private _styleClasses;
|
|
23
|
+
constructor(props?: ConstructProps<AdwHeaderBar>);
|
|
12
24
|
/** The header title — forwarded to the default {@link AdwWindowTitle}. */
|
|
13
25
|
get title(): string;
|
|
14
26
|
set title(value: string);
|
|
@@ -16,13 +28,25 @@ export declare class AdwHeaderBar extends GridLayout {
|
|
|
16
28
|
get subtitle(): string;
|
|
17
29
|
set subtitle(value: string);
|
|
18
30
|
/**
|
|
19
|
-
*
|
|
20
|
-
*
|
|
31
|
+
* The style classes this header bar carries (`GtkWidget:css-classes`), without the
|
|
32
|
+
* `adw-header-bar` class that makes it one — GTK's own rule for the property.
|
|
33
|
+
*
|
|
34
|
+
* IT WAS `flat`, A BOOLEAN (ADR 0049), and the port's own doc said what it really was:
|
|
35
|
+
* "matching `Adw.HeaderBar`'s `.flat` style. Toggling swaps the `flat` class." A style
|
|
36
|
+
* class is `GtkWidget:css-classes` on GTK, which is a LIST — so `flat` was one look
|
|
37
|
+
* with a property of its own while every other look had none.
|
|
38
|
+
*
|
|
39
|
+
* NOT `cssClasses`: `ViewBase` owns that name as a live `Set<string>` the CSS engine
|
|
40
|
+
* rebuilds on every `className` write, and shadowing it kills the widget in its own
|
|
41
|
+
* constructor — see `style-classes.ts`.
|
|
42
|
+
*
|
|
43
|
+
* `header.styleClasses = 'flat'` replaces `header.flat = true`, and from XML
|
|
44
|
+
* `styleClasses="flat"` replaces `flat="true"`.
|
|
21
45
|
*/
|
|
22
|
-
get
|
|
23
|
-
set
|
|
24
|
-
/** Pack a widget at the start (left) of the bar — `gtk_box_append`. */
|
|
25
|
-
|
|
46
|
+
get styleClasses(): string[];
|
|
47
|
+
set styleClasses(value: string | null | undefined);
|
|
48
|
+
/** Pack a widget at the start (left) of the bar — `adw_header_bar_pack_start`, a `gtk_box_append`. */
|
|
49
|
+
pack_start(view: View): void;
|
|
26
50
|
/**
|
|
27
51
|
* Pack a widget at the end (right) of the bar.
|
|
28
52
|
*
|
|
@@ -30,18 +54,18 @@ export declare class AdwHeaderBar extends GridLayout {
|
|
|
30
54
|
* adw-header-bar.c:1106): "packed with reference to the end" means the FIRST
|
|
31
55
|
* widget packed is the one nearest the end of the bar, and each later one
|
|
32
56
|
* goes in front of it. The port appended instead, so every end slot came out
|
|
33
|
-
* mirrored — `
|
|
57
|
+
* mirrored — `pack_end(menu); pack_end(search)` drew `menu | search` where
|
|
34
58
|
* libadwaita draws `search | menu`, with the menu button in the corner.
|
|
35
59
|
*/
|
|
36
|
-
|
|
37
|
-
/** Replace the centered title widget with a custom one
|
|
38
|
-
|
|
60
|
+
pack_end(view: View): void;
|
|
61
|
+
/** Replace the centered title widget with a custom one — `adw_header_bar_set_title_widget`. */
|
|
62
|
+
set_title_widget(view: View): void;
|
|
39
63
|
/**
|
|
40
64
|
* XML inflation — route a template's child through the packing API.
|
|
41
65
|
*
|
|
42
66
|
* NativeScript spells a slot as a complex property, so `<AdwHeaderBar.endBox>`
|
|
43
67
|
* arrives here as `endBox`; a bare child arrives under its element name and
|
|
44
|
-
* takes the fallback, `
|
|
68
|
+
* takes the fallback, `pack_start`. Without this the `GridLayout` default added
|
|
45
69
|
* the view straight to the grid at column 0: measured on Android, a header bar
|
|
46
70
|
* written in markup left `startBox` and `endBox` empty while the button still
|
|
47
71
|
* appeared, so it LOOKED packed and was not — a second one would have been
|
|
@@ -55,3 +79,4 @@ export declare class AdwHeaderBar extends GridLayout {
|
|
|
55
79
|
/** The end (right) slot container. */
|
|
56
80
|
get endBox(): StackLayout;
|
|
57
81
|
}
|
|
82
|
+
export {};
|
|
@@ -1,22 +1,38 @@
|
|
|
1
1
|
import { GridLayout, Image } from '@nativescript/core';
|
|
2
|
+
import { type ConstructProps } from './construct-props.js';
|
|
2
3
|
/** Default symbolic-icon size, in DIPs — the Adwaita 16px icon grid. */
|
|
3
4
|
export declare const DEFAULT_ICON_BUTTON_ICON_SIZE = 16;
|
|
4
|
-
|
|
5
|
+
declare const AdwImageButton_base: (abstract new (...args: any[]) => {
|
|
6
|
+
connect(eventName: string, callback: (self: /*elided*/ any, data: import("@nativescript/core").EventData) => void): number;
|
|
7
|
+
disconnect(handlerId: number): void;
|
|
8
|
+
_emit(eventName: string): void;
|
|
9
|
+
addEventListener(eventName: string, callback: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown, once?: boolean): void;
|
|
10
|
+
removeEventListener(eventName: string, callback?: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown): void;
|
|
11
|
+
notify<T extends import("@nativescript/core").EventData>(data: T): void;
|
|
12
|
+
notifyPropertyChange(name: string, value: unknown, oldValue?: unknown): void;
|
|
13
|
+
set(name: string, value: unknown): void;
|
|
14
|
+
get(name: string): unknown;
|
|
15
|
+
}) & typeof GridLayout;
|
|
16
|
+
export declare class AdwImageButton extends AdwImageButton_base {
|
|
5
17
|
/** The centered icon image. */
|
|
6
18
|
protected readonly _image: Image;
|
|
7
|
-
private
|
|
19
|
+
private _icon;
|
|
8
20
|
private _iconColor;
|
|
9
21
|
private _explicitColor;
|
|
10
22
|
private _iconSize;
|
|
11
23
|
private _unsubScheme;
|
|
12
|
-
constructor();
|
|
24
|
+
constructor(props?: ConstructProps<AdwImageButton>);
|
|
13
25
|
/** Adopt the active scheme's default fill (no-op if the caller pinned a colour). */
|
|
14
26
|
private _syncThemeColor;
|
|
15
27
|
/** Re-render the icon bitmap from the current svg / colour / size. */
|
|
16
28
|
private _render;
|
|
17
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* The icon to render: an Adwaita icon NAME (`'go-previous-symbolic'`) or an Adwaita
|
|
31
|
+
* symbolic SVG SOURCE string (e.g. `goPreviousSymbolic`). A name the compiled subset
|
|
32
|
+
* does not carry draws the `image-missing` glyph; `''` draws nothing.
|
|
33
|
+
*/
|
|
18
34
|
get iconName(): string;
|
|
19
|
-
set iconName(
|
|
35
|
+
set iconName(value: string);
|
|
20
36
|
/** The icon fill colour (hex). Setting it PINS the colour (it no longer follows
|
|
21
37
|
* the light/dark scheme) — for context colours that must survive both schemes. */
|
|
22
38
|
get iconColor(): string;
|
|
@@ -27,3 +43,4 @@ export declare class AdwImageButton extends GridLayout {
|
|
|
27
43
|
/** The underlying icon {@link Image} (e.g. to tweak alignment). */
|
|
28
44
|
get image(): Image;
|
|
29
45
|
}
|
|
46
|
+
export {};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { AdwInlineViewSwitcherDisplayMode } from '@gjsify/adwaita-core';
|
|
2
2
|
import { AdwViewSwitcherBase } from './view-switcher-base.js';
|
|
3
3
|
import type { ViewSwitcherKind } from './view-switcher-model.js';
|
|
4
|
+
import { type ConstructProps } from './construct-props.js';
|
|
4
5
|
export declare class AdwInlineViewSwitcher extends AdwViewSwitcherBase {
|
|
5
6
|
private _displayMode;
|
|
6
|
-
constructor();
|
|
7
|
+
constructor(props?: ConstructProps<AdwInlineViewSwitcher>);
|
|
7
8
|
protected get barClass(): string;
|
|
8
9
|
protected get buttonClass(): string;
|
|
9
10
|
protected get buttonDisplayMode(): AdwInlineViewSwitcherDisplayMode;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { AdwSplitViewBase } from './split-view-base.js';
|
|
2
2
|
import { NsNavigationSplitViewState } from './split-view-state.js';
|
|
3
3
|
import type { NavigationActionResult } from '@gjsify/adwaita-core';
|
|
4
|
+
import { type ConstructProps } from './construct-props.js';
|
|
4
5
|
export declare class AdwNavigationSplitView extends AdwSplitViewBase<NsNavigationSplitViewState> {
|
|
5
|
-
constructor();
|
|
6
|
+
constructor(props?: ConstructProps<AdwNavigationSplitView>);
|
|
6
7
|
protected _applyLayout(): void;
|
|
7
8
|
/** Animate the collapsed master⇄detail swap; instant off-screen/off-device. */
|
|
8
9
|
protected _transitionSidebar(): void;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { GridLayout, type EventData, type View } from '@nativescript/core';
|
|
2
2
|
import type { AdwNavigationPageProps, NavigationShortcutResult } from '@gjsify/adwaita-core';
|
|
3
3
|
import { NOTIFY_VISIBLE_PAGE, POPPED, PUSHED, REPLACED } from './navigation-stack.js';
|
|
4
|
+
import { type ConstructProps } from './construct-props.js';
|
|
4
5
|
export { NOTIFY_VISIBLE_PAGE, POPPED, PUSHED, REPLACED };
|
|
5
6
|
/** Payload of every navigation signal — `pushed`, `popped`, `replaced`, `notify::visible-page`. */
|
|
6
7
|
export interface AdwNavigationEventData extends EventData {
|
|
@@ -13,9 +14,20 @@ export interface AdwNavigationEventData extends EventData {
|
|
|
13
14
|
}
|
|
14
15
|
/** Payload of the `notify::visible-page` event. */
|
|
15
16
|
export type NotifyVisiblePageEventData = AdwNavigationEventData;
|
|
16
|
-
|
|
17
|
+
declare const AdwNavigationView_base: (abstract new (...args: any[]) => {
|
|
18
|
+
connect(eventName: string, callback: (self: /*elided*/ any, data: EventData) => void): number;
|
|
19
|
+
disconnect(handlerId: number): void;
|
|
20
|
+
_emit(eventName: string): void;
|
|
21
|
+
addEventListener(eventName: string, callback: (data: EventData) => void, thisArg?: unknown, once?: boolean): void;
|
|
22
|
+
removeEventListener(eventName: string, callback?: (data: EventData) => void, thisArg?: unknown): void;
|
|
23
|
+
notify<T extends EventData>(data: T): void;
|
|
24
|
+
notifyPropertyChange(name: string, value: unknown, oldValue?: unknown): void;
|
|
25
|
+
set(name: string, value: unknown): void;
|
|
26
|
+
get(name: string): unknown;
|
|
27
|
+
}) & typeof GridLayout;
|
|
28
|
+
export declare class AdwNavigationView extends AdwNavigationView_base {
|
|
17
29
|
private readonly _nav;
|
|
18
|
-
constructor();
|
|
30
|
+
constructor(props?: ConstructProps<AdwNavigationView>);
|
|
19
31
|
/**
|
|
20
32
|
* Register a page (optionally with a tag for `push(tag)`). A page added while
|
|
21
33
|
* the stack is EMPTY is pushed automatically, so the view is never blank —
|
|
@@ -28,40 +40,47 @@ export declare class AdwNavigationView extends GridLayout {
|
|
|
28
40
|
*
|
|
29
41
|
* Registered with NO TAG: `add(view)` defaults it to `null`, and nothing in the
|
|
30
42
|
* markup can supply one, because a `tag` is this widget's own idea rather than a
|
|
31
|
-
* property of the child. `
|
|
43
|
+
* property of the child. `push_by_tag` is therefore not reachable for a page that
|
|
32
44
|
* came from a template; a loader that wants it registers the page itself, or
|
|
33
45
|
* calls `setPageTag` on one it looked up. What XML contributes is the tree.
|
|
34
46
|
*/
|
|
35
47
|
_addChildFromBuilder(_name: string, view: View): void;
|
|
36
48
|
/**
|
|
37
|
-
* Remove a page
|
|
38
|
-
* removed once it is POPPED.
|
|
39
|
-
*
|
|
40
|
-
*
|
|
49
|
+
* Remove a page — `adw_navigation_view_remove`. One that is on the stack is
|
|
50
|
+
* removed once it is POPPED.
|
|
51
|
+
*
|
|
52
|
+
* This was `removePage`, "so the widget never shadows a member of NativeScript's
|
|
53
|
+
* own `ViewBase`, the same reason `@gjsify/adwaita-web` avoids
|
|
54
|
+
* `HTMLElement.remove()`". The web half is true; the NativeScript half was never
|
|
55
|
+
* measured. Against `@nativescript/core@9.1.0-alpha.11` no view base declares a
|
|
56
|
+
* `remove` at all — the one `remove(` in the package is `ImageCache.remove(key)` —
|
|
57
|
+
* and `AdwWrapBox` and `AdwPreferencesDialog` had carried the name the whole time
|
|
58
|
+
* without incident. The same shape as the `openState` reasoning ADR 0034
|
|
59
|
+
* § Amendment 11 keeps: a collision ruled a name out, and the collision was assumed.
|
|
41
60
|
*/
|
|
42
|
-
|
|
61
|
+
remove(view: View): boolean;
|
|
43
62
|
/** Push a page (a previously-registered tag, or a fresh view) onto the stack. */
|
|
44
63
|
push(viewOrTag: View | string, options?: AdwNavigationPageProps): boolean;
|
|
45
|
-
/** Push the page carrying `tag`. */
|
|
46
|
-
|
|
64
|
+
/** Push the page carrying `tag` — `adw_navigation_view_push_by_tag`. */
|
|
65
|
+
push_by_tag(tag: string): boolean;
|
|
47
66
|
/**
|
|
48
67
|
* Pop the top page. Returns `true` if a page was popped (the stack keeps ≥1).
|
|
49
68
|
* `can-pop` does NOT gate this — it gates {@link popFromShortcut} and the back
|
|
50
69
|
* button, exactly as libadwaita documents.
|
|
51
70
|
*/
|
|
52
71
|
pop(): boolean;
|
|
53
|
-
/** Pop until `view` is visible, in ONE transition
|
|
54
|
-
|
|
55
|
-
/** Pop until the page carrying `tag` is visible
|
|
56
|
-
|
|
72
|
+
/** Pop until `view` is visible, in ONE transition — `adw_navigation_view_pop_to_page`. */
|
|
73
|
+
pop_to_page(view: View): boolean;
|
|
74
|
+
/** Pop until the page carrying `tag` is visible — `adw_navigation_view_pop_to_tag`. */
|
|
75
|
+
pop_to_tag(tag: string): boolean;
|
|
57
76
|
/** Replace the whole stack; the last entry becomes visible. Never animates. */
|
|
58
77
|
replace(entries: ReadonlyArray<View | string | null>): void;
|
|
59
|
-
/** Replace the stack with the pages carrying `tags`. */
|
|
60
|
-
|
|
61
|
-
/** The page with this tag, or `null`. */
|
|
62
|
-
|
|
63
|
-
/** The page popping `view` would reveal, or `null`. */
|
|
64
|
-
|
|
78
|
+
/** Replace the stack with the pages carrying `tags` — `adw_navigation_view_replace_with_tags`. */
|
|
79
|
+
replace_with_tags(tags: readonly string[]): void;
|
|
80
|
+
/** The page with this tag, or `null` — `adw_navigation_view_find_page`. */
|
|
81
|
+
find_page(tag: string): View | null;
|
|
82
|
+
/** The page popping `view` would reveal, or `null` — `adw_navigation_view_get_previous_page`. */
|
|
83
|
+
get_previous_page(view: View): View | null;
|
|
65
84
|
/** Set a page's tag. Rejected when another page already owns it. */
|
|
66
85
|
setPageTag(view: View, tag: string | null): boolean;
|
|
67
86
|
/** Set a page's title — used as the NEXT page's back-button tooltip. */
|
|
@@ -95,5 +114,5 @@ export declare class AdwNavigationView extends GridLayout {
|
|
|
95
114
|
/** `Adw.NavigationView:pop-on-escape` — consulted by {@link popFromEscape}. */
|
|
96
115
|
get popOnEscape(): boolean;
|
|
97
116
|
set popOnEscape(raw: boolean | string);
|
|
98
|
-
private
|
|
117
|
+
private _emitNavigation;
|
|
99
118
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { AdwSplitViewBase } from './split-view-base.js';
|
|
2
2
|
import { NsOverlaySplitViewState } from './split-view-state.js';
|
|
3
|
+
import { type ConstructProps } from './construct-props.js';
|
|
3
4
|
export declare class AdwOverlaySplitView extends AdwSplitViewBase<NsOverlaySplitViewState> {
|
|
4
5
|
/** Dimmed backdrop drawn between content and the overlaid sidebar; tapping it
|
|
5
6
|
* closes the sidebar (Adwaita's click-outside-to-dismiss). Created lazily. */
|
|
6
7
|
private _scrim;
|
|
7
|
-
constructor();
|
|
8
|
+
constructor(props?: ConstructProps<AdwOverlaySplitView>);
|
|
8
9
|
/**
|
|
9
10
|
* `Adw.OverlaySplitView:pin-sidebar` (adw-overlay-split-view.c:990-992,
|
|
10
11
|
* default FALSE) — whether collapsing leaves the sidebar's visibility alone.
|
|
@@ -33,7 +34,7 @@ export declare class AdwOverlaySplitView extends AdwSplitViewBase<NsOverlaySplit
|
|
|
33
34
|
private _ensureScrim;
|
|
34
35
|
/** Re-establish paint order: content < scrim < sidebar (NS paints in add order).
|
|
35
36
|
* Removing + re-adding the scrim/sidebar keeps them above the content no matter
|
|
36
|
-
* what order
|
|
37
|
+
* what order set_content/set_sidebar/collapsed ran in. */
|
|
37
38
|
private _raiseOverlayChildren;
|
|
38
39
|
/** Detach the scrim (side-by-side mode has no overlay). */
|
|
39
40
|
private _detachScrim;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { EventData } from '@nativescript/core';
|
|
2
2
|
import { AdwEntryRow } from './adw-entry-row.js';
|
|
3
3
|
import { AdwImageButton } from './adw-image-button.js';
|
|
4
|
+
import { type ConstructProps } from './construct-props.js';
|
|
4
5
|
export { PasswordEntryRowState } from '@gjsify/adwaita-core';
|
|
5
6
|
export type { PasswordEntryRowRenderState } from '@gjsify/adwaita-core';
|
|
6
7
|
/** Event name emitted when the peek state flips. Mirrors a GObject `notify::`. */
|
|
@@ -15,7 +16,7 @@ export declare class AdwPasswordEntryRow extends AdwEntryRow {
|
|
|
15
16
|
private readonly _password;
|
|
16
17
|
/** The trailing peek (reveal/conceal) toggle button. */
|
|
17
18
|
protected readonly _peekButton: AdwImageButton;
|
|
18
|
-
constructor();
|
|
19
|
+
constructor(props?: ConstructProps<AdwPasswordEntryRow>);
|
|
19
20
|
/** Whether the contents are shown in clear text (`GtkText:visibility`). */
|
|
20
21
|
get revealed(): boolean;
|
|
21
22
|
set revealed(value: boolean | string);
|
|
@@ -1,15 +1,27 @@
|
|
|
1
1
|
import type { View } from '@nativescript/core';
|
|
2
|
-
import { GridLayout, Label, StackLayout } from '@nativescript/core';
|
|
2
|
+
import { GridLayout, Label, StackLayout, type EventData } from '@nativescript/core';
|
|
3
3
|
import type { SearchPreferencesOptions } from '@gjsify/adwaita-core';
|
|
4
4
|
import { type NsPreferencesSearchResult, type NsSearchablePage } from './preferences-search.js';
|
|
5
|
+
import { type ConstructProps } from './construct-props.js';
|
|
5
6
|
/** Event name emitted when the dialog is closed. */
|
|
6
7
|
export declare const CLOSED = "closed";
|
|
7
|
-
|
|
8
|
+
declare const AdwPreferencesDialog_base: (abstract new (...args: any[]) => {
|
|
9
|
+
connect(eventName: string, callback: (self: /*elided*/ any, data: EventData) => void): number;
|
|
10
|
+
disconnect(handlerId: number): void;
|
|
11
|
+
_emit(eventName: string): void;
|
|
12
|
+
addEventListener(eventName: string, callback: (data: EventData) => void, thisArg?: unknown, once?: boolean): void;
|
|
13
|
+
removeEventListener(eventName: string, callback?: (data: EventData) => void, thisArg?: unknown): void;
|
|
14
|
+
notify<T extends EventData>(data: T): void;
|
|
15
|
+
notifyPropertyChange(name: string, value: unknown, oldValue?: unknown): void;
|
|
16
|
+
set(name: string, value: unknown): void;
|
|
17
|
+
get(name: string): unknown;
|
|
18
|
+
}) & typeof GridLayout;
|
|
19
|
+
export declare class AdwPreferencesDialog extends AdwPreferencesDialog_base {
|
|
8
20
|
protected readonly _card: GridLayout;
|
|
9
21
|
protected readonly _headerBox: GridLayout;
|
|
10
22
|
protected readonly _titleLabel: Label;
|
|
11
23
|
protected readonly _body: StackLayout;
|
|
12
|
-
constructor();
|
|
24
|
+
constructor(props?: ConstructProps<AdwPreferencesDialog>);
|
|
13
25
|
/** The dialog title. */
|
|
14
26
|
get title(): string;
|
|
15
27
|
set title(value: string);
|
|
@@ -49,3 +61,4 @@ export declare class AdwPreferencesDialog extends GridLayout {
|
|
|
49
61
|
/** The scrollable body that hosts the preferences pages. */
|
|
50
62
|
get body(): StackLayout;
|
|
51
63
|
}
|
|
64
|
+
export {};
|
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
import type { View } from '@nativescript/core';
|
|
2
2
|
import { GridLayout, Label, StackLayout } from '@nativescript/core';
|
|
3
3
|
import type { NsSearchableGroup, NsSearchableRow } from './preferences-search.js';
|
|
4
|
-
|
|
4
|
+
import { type ConstructProps } from './construct-props.js';
|
|
5
|
+
declare const AdwPreferencesGroup_base: (abstract new (...args: any[]) => {
|
|
6
|
+
connect(eventName: string, callback: (self: /*elided*/ any, data: import("@nativescript/core").EventData) => void): number;
|
|
7
|
+
disconnect(handlerId: number): void;
|
|
8
|
+
_emit(eventName: string): void;
|
|
9
|
+
addEventListener(eventName: string, callback: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown, once?: boolean): void;
|
|
10
|
+
removeEventListener(eventName: string, callback?: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown): void;
|
|
11
|
+
notify<T extends import("@nativescript/core").EventData>(data: T): void;
|
|
12
|
+
notifyPropertyChange(name: string, value: unknown, oldValue?: unknown): void;
|
|
13
|
+
set(name: string, value: unknown): void;
|
|
14
|
+
get(name: string): unknown;
|
|
15
|
+
}) & typeof StackLayout;
|
|
16
|
+
export declare class AdwPreferencesGroup extends AdwPreferencesGroup_base implements NsSearchableGroup {
|
|
5
17
|
/** The header box: labels on the leading edge, suffix on the trailing one. */
|
|
6
18
|
protected readonly _header: GridLayout;
|
|
7
19
|
/** The group header label. */
|
|
@@ -15,7 +27,7 @@ export declare class AdwPreferencesGroup extends StackLayout implements NsSearch
|
|
|
15
27
|
private _title;
|
|
16
28
|
private _description;
|
|
17
29
|
private _headerSuffix;
|
|
18
|
-
constructor();
|
|
30
|
+
constructor(props?: ConstructProps<AdwPreferencesGroup>);
|
|
19
31
|
/**
|
|
20
32
|
* The group title (dim, uppercase header above the boxed list).
|
|
21
33
|
*
|
|
@@ -57,10 +69,10 @@ export declare class AdwPreferencesGroup extends StackLayout implements NsSearch
|
|
|
57
69
|
* around them — which is the failure that looks like a styling bug.
|
|
58
70
|
*/
|
|
59
71
|
_addChildFromBuilder(name: string, view: View): void;
|
|
60
|
-
/** Append a row (or any view) to the boxed list
|
|
61
|
-
|
|
62
|
-
/** Remove a previously-added row from the boxed list
|
|
63
|
-
|
|
72
|
+
/** Append a row (or any view) to the boxed list — `adw_preferences_group_add`. */
|
|
73
|
+
add(view: View): void;
|
|
74
|
+
/** Remove a previously-added row from the boxed list — `adw_preferences_group_remove`. */
|
|
75
|
+
remove(view: View): void;
|
|
64
76
|
/**
|
|
65
77
|
* The rows this group contributes to a preferences search, in listbox order.
|
|
66
78
|
*
|
|
@@ -91,3 +103,4 @@ export declare class AdwPreferencesGroup extends StackLayout implements NsSearch
|
|
|
91
103
|
/** The boxed-list container (column of rows). */
|
|
92
104
|
get listbox(): StackLayout;
|
|
93
105
|
}
|
|
106
|
+
export {};
|