@gjsify/adwaita-nativescript 0.44.0 → 0.46.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/index.js +1 -1
- package/lib/esm/namespace.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-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-icon.js +1 -1
- package/lib/esm/widgets/adw-image-button.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-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-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-wrap-box.js +1 -1
- package/lib/esm/widgets/builder-slots.js +1 -0
- package/lib/esm/widgets/entry-row-view.js +1 -1
- package/lib/esm/widgets/{adw-button.js → gtk-button.js} +1 -1
- package/lib/esm/widgets/gtk-drop-down.js +1 -0
- package/lib/esm/widgets/gtk-entry.js +1 -0
- package/lib/esm/widgets/{adw-menu-button.js → gtk-menu-button.js} +1 -1
- package/lib/esm/widgets/host-insets.android.js +1 -0
- package/lib/esm/widgets/host-insets.ios.js +1 -0
- package/lib/esm/widgets/host-insets.js +1 -0
- package/lib/esm/widgets/icon-path.js +2 -2
- package/lib/esm/widgets/icons.android.js +1 -1
- package/lib/esm/widgets/icons.ios.js +1 -1
- package/lib/esm/widgets/index.js +1 -1
- package/lib/esm/widgets/split-view-base.js +1 -1
- package/lib/esm/widgets/view-switcher-base.js +1 -1
- package/lib/esm/widgets/window-insets.js +1 -1
- package/lib/esm/widgets/wrap-box-layout.js +1 -1
- package/lib/esm/widgets/xml-values.js +1 -0
- package/lib/types/index.d.ts +2 -1
- package/lib/types/namespace.d.ts +92 -0
- package/lib/types/widgets/adw-about-dialog.d.ts +1 -1
- package/lib/types/widgets/adw-action-row.d.ts +17 -2
- package/lib/types/widgets/adw-avatar.d.ts +1 -1
- package/lib/types/widgets/adw-banner.d.ts +2 -2
- package/lib/types/widgets/adw-bottom-sheet.d.ts +22 -3
- package/lib/types/widgets/adw-button-content.d.ts +4 -4
- package/lib/types/widgets/adw-button-row.d.ts +4 -4
- package/lib/types/widgets/adw-carousel.d.ts +16 -4
- package/lib/types/widgets/adw-clamp.d.ts +15 -3
- package/lib/types/widgets/adw-combo-row.d.ts +3 -3
- package/lib/types/widgets/adw-data-grid.d.ts +1 -1
- package/lib/types/widgets/adw-entry-row.d.ts +4 -4
- package/lib/types/widgets/adw-expander-row.d.ts +22 -2
- package/lib/types/widgets/adw-header-bar.d.ts +15 -2
- package/lib/types/widgets/adw-icon.d.ts +3 -3
- package/lib/types/widgets/adw-image-button.d.ts +3 -3
- package/lib/types/widgets/adw-navigation-split-view.d.ts +1 -1
- package/lib/types/widgets/adw-navigation-view.d.ts +13 -2
- package/lib/types/widgets/adw-overlay-split-view.d.ts +1 -1
- package/lib/types/widgets/adw-password-entry-row.d.ts +2 -2
- package/lib/types/widgets/adw-preferences-dialog.d.ts +9 -2
- package/lib/types/widgets/adw-preferences-group.d.ts +13 -1
- package/lib/types/widgets/adw-preferences-page.d.ts +9 -2
- package/lib/types/widgets/adw-sidebar.d.ts +1 -1
- package/lib/types/widgets/adw-slider-row.d.ts +4 -4
- package/lib/types/widgets/adw-spin-row.d.ts +4 -4
- package/lib/types/widgets/adw-spinner.d.ts +2 -2
- package/lib/types/widgets/adw-split-button.d.ts +23 -7
- package/lib/types/widgets/adw-status-page.d.ts +11 -3
- package/lib/types/widgets/adw-switch-row.d.ts +1 -1
- package/lib/types/widgets/adw-tab-view.d.ts +2 -2
- package/lib/types/widgets/adw-toast-overlay.d.ts +2 -1
- package/lib/types/widgets/adw-toggle-group.d.ts +2 -2
- package/lib/types/widgets/adw-toolbar-view.d.ts +22 -4
- package/lib/types/widgets/adw-view-stack.d.ts +3 -2
- package/lib/types/widgets/adw-view-switcher-bar.d.ts +2 -2
- package/lib/types/widgets/adw-wrap-box.d.ts +7 -7
- package/lib/types/widgets/builder-slots.d.ts +16 -0
- package/lib/types/widgets/entry-row-view.d.ts +1 -1
- package/lib/types/widgets/{adw-button.d.ts → gtk-button.d.ts} +7 -2
- package/lib/types/widgets/{adw-drop-down.d.ts → gtk-drop-down.d.ts} +4 -4
- package/lib/types/widgets/{adw-entry.d.ts → gtk-entry.d.ts} +6 -6
- package/lib/types/widgets/{adw-menu-button.d.ts → gtk-menu-button.d.ts} +3 -3
- package/lib/types/widgets/host-insets.android.d.ts +4 -0
- package/lib/types/widgets/host-insets.d.ts +13 -0
- package/lib/types/widgets/host-insets.ios.d.ts +4 -0
- package/lib/types/widgets/icon-path.d.ts +72 -7
- package/lib/types/widgets/index.d.ts +21 -14
- package/lib/types/widgets/split-button.d.ts +2 -2
- package/lib/types/widgets/split-view-base.d.ts +15 -6
- package/lib/types/widgets/view-switcher-base.d.ts +1 -1
- package/lib/types/widgets/window-insets.d.ts +24 -0
- package/lib/types/widgets/wrap-box-layout.d.ts +3 -60
- package/lib/types/widgets/xml-values.d.ts +18 -0
- package/package.json +11 -8
- package/lib/esm/widgets/adw-drop-down.js +0 -1
- package/lib/esm/widgets/adw-entry.js +0 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { View } from '@nativescript/core';
|
|
2
|
+
import { GridLayout, StackLayout } from '@nativescript/core';
|
|
2
3
|
import type { BottomSheetCloseOutcome, BottomSheetCloseSource } from '@gjsify/adwaita-core';
|
|
3
4
|
import { CLOSE_ATTEMPT, NOTIFY_OPEN, SHEET_CLOSE, type NotifyOpenEventData } from './bottom-sheet-state.js';
|
|
4
5
|
export { CLOSE_ATTEMPT, NOTIFY_OPEN, SHEET_CLOSE };
|
|
@@ -16,6 +17,24 @@ export declare class AdwBottomSheet extends GridLayout {
|
|
|
16
17
|
setContent(view: View | null): void;
|
|
17
18
|
/** Set (or replace) the sheet panel's child (shown when open). */
|
|
18
19
|
setSheet(view: View | null): void;
|
|
20
|
+
/**
|
|
21
|
+
* An XML child asks for the sheet or for the content, and a bare one is CONTENT —
|
|
22
|
+
* the always-visible layer, which is what a sheet with nothing behind it would be
|
|
23
|
+
* missing. `LayoutBase`'s inherited default would put either into the grid
|
|
24
|
+
* alongside the sheet panel, where it neither paints under the sheet nor moves
|
|
25
|
+
* with it.
|
|
26
|
+
*/
|
|
27
|
+
_addChildFromBuilder(name: string, view: View): void;
|
|
28
|
+
/**
|
|
29
|
+
* The always-visible content layer, or `null`.
|
|
30
|
+
*
|
|
31
|
+
* A read-back for `setContent`: a write-only pane cannot be asserted, and the XML
|
|
32
|
+
* door made that concrete — the gallery probe has to ask the widget where the
|
|
33
|
+
* child it declared actually went.
|
|
34
|
+
*/
|
|
35
|
+
get content(): View | null;
|
|
36
|
+
/** The sheet panel's child, or `null` — the read-back for `setSheet`. */
|
|
37
|
+
get sheet(): View | null;
|
|
19
38
|
/** Open the sheet programmatically. */
|
|
20
39
|
open(): void;
|
|
21
40
|
/**
|
|
@@ -25,13 +44,13 @@ export declare class AdwBottomSheet extends GridLayout {
|
|
|
25
44
|
close(): void;
|
|
26
45
|
/** Whether the sheet is open. Toggling shows/hides the panel + emits `notify::open`. */
|
|
27
46
|
get openState(): boolean;
|
|
28
|
-
set openState(value: boolean);
|
|
47
|
+
set openState(value: boolean | string);
|
|
29
48
|
/**
|
|
30
49
|
* Whether the user may dismiss the sheet (`AdwBottomSheet:can-close`). When
|
|
31
50
|
* off, a refused dismissal emits `close-attempt` instead of closing.
|
|
32
51
|
*/
|
|
33
52
|
get canClose(): boolean;
|
|
34
|
-
set canClose(
|
|
53
|
+
set canClose(raw: boolean | string);
|
|
35
54
|
/**
|
|
36
55
|
* Route a dismissal affordance through the shared gate and act on the
|
|
37
56
|
* verdict: close, emit `close-attempt`, emit `sheet.close` for the host to
|
|
@@ -26,8 +26,8 @@ export declare class AdwButtonContent extends StackLayout {
|
|
|
26
26
|
* the C sets that fallback (:355-356) and never hides `self->icon`. The doc
|
|
27
27
|
* comments at :228/:343 say otherwise — see `buttonContentIconSvg`.
|
|
28
28
|
*/
|
|
29
|
-
get
|
|
30
|
-
set
|
|
29
|
+
get iconName(): string;
|
|
30
|
+
set iconName(svg: string);
|
|
31
31
|
/** Whether the icon currently shown is the empty-slot fallback. */
|
|
32
32
|
get iconIsFallback(): boolean;
|
|
33
33
|
/** The icon fill colour (hex). Set to the button's foreground (e.g. white on suggested-action). */
|
|
@@ -41,7 +41,7 @@ export declare class AdwButtonContent extends StackLayout {
|
|
|
41
41
|
* Defaults to FALSE (:253-256), so an underscore is a literal unless asked.
|
|
42
42
|
*/
|
|
43
43
|
get useUnderline(): boolean;
|
|
44
|
-
set useUnderline(
|
|
44
|
+
set useUnderline(raw: boolean | string);
|
|
45
45
|
/**
|
|
46
46
|
* Whether the label may be smaller than its natural size (:489-491).
|
|
47
47
|
*
|
|
@@ -51,7 +51,7 @@ export declare class AdwButtonContent extends StackLayout {
|
|
|
51
51
|
* but the truncation ellipsis is not available on this platform.
|
|
52
52
|
*/
|
|
53
53
|
get canShrink(): boolean;
|
|
54
|
-
set canShrink(
|
|
54
|
+
set canShrink(raw: boolean | string);
|
|
55
55
|
/** The label's `PangoEllipsizeMode` for the current `canShrink` (:462). */
|
|
56
56
|
get ellipsize(): ButtonContentEllipsize;
|
|
57
57
|
private _renderLabel;
|
|
@@ -34,14 +34,14 @@ export declare class AdwButtonRow extends AdwActionRow {
|
|
|
34
34
|
* A leading Adwaita symbolic SVG string before the centered title (e.g.
|
|
35
35
|
* `listAddSymbolic`). Empty collapses the icon.
|
|
36
36
|
*/
|
|
37
|
-
get
|
|
38
|
-
set
|
|
37
|
+
get startIconName(): string;
|
|
38
|
+
set startIconName(value: string);
|
|
39
39
|
/**
|
|
40
40
|
* A trailing Adwaita symbolic SVG string after the centered title (e.g.
|
|
41
41
|
* `goNextSymbolic`) — `Adw.ButtonRow:end-icon-name`. Empty collapses it.
|
|
42
42
|
*/
|
|
43
|
-
get
|
|
44
|
-
set
|
|
43
|
+
get endIconName(): string;
|
|
44
|
+
set endIconName(value: string);
|
|
45
45
|
/**
|
|
46
46
|
* The icons' fill colour (hex). Defaults to the Adwaita accent; callers set
|
|
47
47
|
* the destructive red when the row carries `destructive-action` so the
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { View } from '@nativescript/core';
|
|
2
|
+
import { GridLayout, ScrollView, StackLayout, type EventData } from '@nativescript/core';
|
|
2
3
|
import { DEFAULT_CAROUSEL_PAGE_WIDTH, type CarouselNotifyPayload } from './carousel-state.js';
|
|
3
4
|
export { DEFAULT_CAROUSEL_PAGE_WIDTH };
|
|
4
5
|
/** Event name emitted when {@link AdwCarousel.position} changes. Mirrors GObject `notify::position`. */
|
|
@@ -33,6 +34,15 @@ export declare class AdwCarousel extends GridLayout {
|
|
|
33
34
|
constructor();
|
|
34
35
|
/** Append a page — `adw_carousel_append` (adw-carousel.c:1348-1357). */
|
|
35
36
|
addPage(view: View): void;
|
|
37
|
+
/**
|
|
38
|
+
* An XML child is a PAGE, appended in document order.
|
|
39
|
+
*
|
|
40
|
+
* The name is ignored: a carousel has one kind of child. Without this,
|
|
41
|
+
* `LayoutBase`'s default puts the view straight into the grid the carousel builds
|
|
42
|
+
* its scroller and dots in — on top of the track rather than on it, and the page
|
|
43
|
+
* never gets a width, a `adw-carousel-page` class or a dot.
|
|
44
|
+
*/
|
|
45
|
+
_addChildFromBuilder(_name: string, view: View): void;
|
|
36
46
|
/**
|
|
37
47
|
* Insert a page at `position` — `adw_carousel_insert` (adw-carousel.c:1370-1407).
|
|
38
48
|
* `-1` or a position past the end appends. Returns whether it was added.
|
|
@@ -51,6 +61,8 @@ export declare class AdwCarousel extends GridLayout {
|
|
|
51
61
|
scrollToPage(index: number): void;
|
|
52
62
|
/** One keynav step — `navigate_to_direction` (adw-carousel.c:475-508). */
|
|
53
63
|
navigate(direction: 'back' | 'forward'): boolean;
|
|
64
|
+
/** The pages on the track, in order — the read-back for `addPage`/`insertPage`. */
|
|
65
|
+
get pages(): readonly View[];
|
|
54
66
|
/** The number of pages. */
|
|
55
67
|
get nPages(): number;
|
|
56
68
|
/** The fractional scroll position; 1 matches 1 page. */
|
|
@@ -63,19 +75,19 @@ export declare class AdwCarousel extends GridLayout {
|
|
|
63
75
|
* `get_page_at_position` rule used everywhere else, so 0.5 lands on page 0
|
|
64
76
|
* where the old `Math.round` picked page 1.
|
|
65
77
|
*/
|
|
66
|
-
set position(
|
|
78
|
+
set position(raw: number | string);
|
|
67
79
|
/** The page the current position settles on, `-1` when the carousel is empty. */
|
|
68
80
|
get currentPage(): number;
|
|
69
81
|
/** Whether the carousel can be navigated (`AdwCarousel:interactive`, default TRUE). */
|
|
70
82
|
get interactive(): boolean;
|
|
71
|
-
set interactive(
|
|
83
|
+
set interactive(raw: boolean | string);
|
|
72
84
|
/**
|
|
73
85
|
* The per-page width in DIPs used for scroll-offset math. Set this to the
|
|
74
86
|
* carousel's on-screen width so `scrollToPage` lands cleanly. Re-applies to
|
|
75
87
|
* all existing pages.
|
|
76
88
|
*/
|
|
77
89
|
get pageWidth(): number;
|
|
78
|
-
set pageWidth(
|
|
90
|
+
set pageWidth(raw: number | string);
|
|
79
91
|
/** The px pitch between two page origins — `self->distance` (adw-carousel.c:767). */
|
|
80
92
|
private _distance;
|
|
81
93
|
/** The state's id for a page view, or `null` when it is not one of ours. */
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { View } from '@nativescript/core';
|
|
2
|
+
import { GridLayout } from '@nativescript/core';
|
|
2
3
|
import { DEFAULT_CLAMP_MAX_SIZE, DEFAULT_CLAMP_TIGHTENING_THRESHOLD } from './chrome.js';
|
|
3
4
|
export { DEFAULT_CLAMP_MAX_SIZE, DEFAULT_CLAMP_TIGHTENING_THRESHOLD };
|
|
4
5
|
export declare class AdwClamp extends GridLayout {
|
|
@@ -11,9 +12,20 @@ export declare class AdwClamp extends GridLayout {
|
|
|
11
12
|
setChild(view: View | null): void;
|
|
12
13
|
/** The currently-clamped child, or `null`. */
|
|
13
14
|
get child(): View | null;
|
|
15
|
+
/**
|
|
16
|
+
* XML inflation — every child a template declares is THE clamped child.
|
|
17
|
+
*
|
|
18
|
+
* Without this the `LayoutBase` default calls `addChild`, which puts the view
|
|
19
|
+
* in the grid and leaves `_child` null, so `_allocate` returns early: measured
|
|
20
|
+
* on Android, a clamp written in markup rendered its child at full width with
|
|
21
|
+
* no size class at all, i.e. as if there were no clamp around it. The name is
|
|
22
|
+
* ignored because there is only one destination — `<AdwClamp.child>` and a
|
|
23
|
+
* bare child mean the same thing.
|
|
24
|
+
*/
|
|
25
|
+
_addChildFromBuilder(_name: string, view: View): void;
|
|
14
26
|
/** `Adw.Clamp:maximum-size` — the widest the child may ever get, in DIPs. */
|
|
15
27
|
get maximumSize(): number;
|
|
16
|
-
set maximumSize(value: number);
|
|
28
|
+
set maximumSize(value: number | string);
|
|
17
29
|
/**
|
|
18
30
|
* `Adw.Clamp:tightening-threshold` — the width above which the clamp starts
|
|
19
31
|
* tightening its grip, easing the child toward {@link maximumSize} instead of
|
|
@@ -21,7 +33,7 @@ export declare class AdwClamp extends GridLayout {
|
|
|
21
33
|
* only the GTK pane responded to it.
|
|
22
34
|
*/
|
|
23
35
|
get tighteningThreshold(): number;
|
|
24
|
-
set tighteningThreshold(value: number);
|
|
36
|
+
set tighteningThreshold(value: number | string);
|
|
25
37
|
/**
|
|
26
38
|
* Re-run libadwaita's allocation against the container's current width.
|
|
27
39
|
*
|
|
@@ -4,7 +4,7 @@ import { AdwActionRow } from './adw-action-row.js';
|
|
|
4
4
|
import { AdwIcon } from './adw-icon.js';
|
|
5
5
|
export { ComboState } from '@gjsify/adwaita-core';
|
|
6
6
|
export type { AdwComboOption, ComboStateChange, ComboStateListener } from '@gjsify/adwaita-core';
|
|
7
|
-
/** Event name emitted when {@link AdwComboRow.
|
|
7
|
+
/** Event name emitted when {@link AdwComboRow.selected} changes. Mirrors GObject `notify::selected`. */
|
|
8
8
|
export declare const NOTIFY_SELECTED = "notify::selected";
|
|
9
9
|
/** Payload of the `notify::selected` event. */
|
|
10
10
|
export interface NotifySelectedEventData extends EventData {
|
|
@@ -36,8 +36,8 @@ export declare class AdwComboRow extends AdwActionRow {
|
|
|
36
36
|
get options(): AdwComboOption[];
|
|
37
37
|
set options(value: AdwComboOption[]);
|
|
38
38
|
/** The selected option index. Updates the inline value label. */
|
|
39
|
-
get
|
|
40
|
-
set
|
|
39
|
+
get selected(): number;
|
|
40
|
+
set selected(raw: number | string);
|
|
41
41
|
/** The selected option's `value`, or `''` when out of range. */
|
|
42
42
|
get selectedValue(): string;
|
|
43
43
|
set selectedValue(value: string);
|
|
@@ -35,7 +35,7 @@ export declare class AdwDataGrid extends GridLayout {
|
|
|
35
35
|
* `interactive` class and answer a tap, and nothing about the layout.
|
|
36
36
|
*/
|
|
37
37
|
get interactive(): boolean;
|
|
38
|
-
set interactive(
|
|
38
|
+
set interactive(raw: boolean | string);
|
|
39
39
|
private _render;
|
|
40
40
|
/**
|
|
41
41
|
* (Re)declare the column tracks from the descriptors.
|
|
@@ -60,16 +60,16 @@ export declare class AdwEntryRow extends AdwActionRow {
|
|
|
60
60
|
get textLength(): number;
|
|
61
61
|
/** `Adw.EntryRow:max-length` — maximum number of characters, `0` = unlimited. */
|
|
62
62
|
get maxLength(): number;
|
|
63
|
-
set maxLength(
|
|
63
|
+
set maxLength(raw: number | string);
|
|
64
64
|
/** Whether the entry accepts edits (`GtkEditable:editable`). */
|
|
65
65
|
get editable(): boolean;
|
|
66
|
-
set editable(
|
|
66
|
+
set editable(raw: boolean | string);
|
|
67
67
|
/** `Adw.EntryRow:show-apply-button` — typing reveals an apply button. */
|
|
68
68
|
get showApplyButton(): boolean;
|
|
69
|
-
set showApplyButton(
|
|
69
|
+
set showApplyButton(raw: boolean | string);
|
|
70
70
|
/** `Adw.EntryRow:activates-default` — reported on `entry-activated`, acted on by the host. */
|
|
71
71
|
get activatesDefault(): boolean;
|
|
72
|
-
set activatesDefault(
|
|
72
|
+
set activatesDefault(raw: boolean | string);
|
|
73
73
|
/** Whether the field currently has focus. */
|
|
74
74
|
get editing(): boolean;
|
|
75
75
|
/** Append a suffix — `adw_entry_row_add_suffix` appends into a BOX, so suffixes COEXIST. */
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { View } from '@nativescript/core';
|
|
2
|
+
import { ItemSpec, StackLayout, type EventData } from '@nativescript/core';
|
|
2
3
|
import { AdwActionRow } from './adw-action-row.js';
|
|
3
4
|
import { AdwIcon } from './adw-icon.js';
|
|
4
5
|
export { ExpanderState } from '@gjsify/adwaita-core';
|
|
@@ -25,7 +26,26 @@ export declare class AdwExpanderRow extends AdwActionRow {
|
|
|
25
26
|
addRow(viewOrSpec: View | ItemSpec): void;
|
|
26
27
|
/** Remove a previously-added child row from the disclosure container. */
|
|
27
28
|
removeRow(view: View): void;
|
|
29
|
+
/**
|
|
30
|
+
* An XML child is a ROW inside the disclosure — the one placement an expander row
|
|
31
|
+
* adds over its base, and the reason this overrides `AdwActionRow`'s prefix/suffix
|
|
32
|
+
* rule rather than inheriting it. The two edges stay reachable by name.
|
|
33
|
+
*/
|
|
34
|
+
_addChildFromBuilder(name: string, view: View): void;
|
|
35
|
+
/**
|
|
36
|
+
* The rows inside the disclosure, in order — the read-back for `addRow`.
|
|
37
|
+
*
|
|
38
|
+
* NOT `rows`, which is what it was called first. `GridLayoutBase` declares `rows`
|
|
39
|
+
* as a SETTER-ONLY accessor (its getter is `rowsInternal`), so a getter of that
|
|
40
|
+
* name on a subclass shadows it: `expanderRow.rows = 'auto,*'` then throws
|
|
41
|
+
* `TypeError: Cannot set property rows … which has only a getter` in strict mode,
|
|
42
|
+
* which every NativeScript bundle is. Measured against that prototype shape, and
|
|
43
|
+
* it would have broken apps that never touch XML. `rows` and `columns` are the
|
|
44
|
+
* only two accessors of that shape on the bases this package extends —
|
|
45
|
+
* `scripts/check-nativescript-accessor-shadowing.mjs` holds both.
|
|
46
|
+
*/
|
|
47
|
+
get disclosureRows(): readonly View[];
|
|
28
48
|
/** Whether the disclosure is revealed. */
|
|
29
49
|
get expanded(): boolean;
|
|
30
|
-
set expanded(value: boolean);
|
|
50
|
+
set expanded(value: boolean | string);
|
|
31
51
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { View } from '@nativescript/core';
|
|
2
|
+
import { GridLayout, StackLayout } from '@nativescript/core';
|
|
2
3
|
export declare class AdwHeaderBar extends GridLayout {
|
|
3
4
|
/** The start (left) slot — a horizontal stack. */
|
|
4
5
|
protected readonly _startBox: StackLayout;
|
|
@@ -19,7 +20,7 @@ export declare class AdwHeaderBar extends GridLayout {
|
|
|
19
20
|
* matching `Adw.HeaderBar`'s `.flat` style. Toggling swaps the `flat` class.
|
|
20
21
|
*/
|
|
21
22
|
get flat(): boolean;
|
|
22
|
-
set flat(
|
|
23
|
+
set flat(raw: boolean | string);
|
|
23
24
|
/** Pack a widget at the start (left) of the bar — `gtk_box_append`. */
|
|
24
25
|
packStart(view: View): void;
|
|
25
26
|
/**
|
|
@@ -35,6 +36,18 @@ export declare class AdwHeaderBar extends GridLayout {
|
|
|
35
36
|
packEnd(view: View): void;
|
|
36
37
|
/** Replace the centered title widget with a custom one (e.g. a URL entry). */
|
|
37
38
|
setTitleWidget(view: View): void;
|
|
39
|
+
/**
|
|
40
|
+
* XML inflation — route a template's child through the packing API.
|
|
41
|
+
*
|
|
42
|
+
* NativeScript spells a slot as a complex property, so `<AdwHeaderBar.endBox>`
|
|
43
|
+
* arrives here as `endBox`; a bare child arrives under its element name and
|
|
44
|
+
* takes the fallback, `packStart`. Without this the `GridLayout` default added
|
|
45
|
+
* the view straight to the grid at column 0: measured on Android, a header bar
|
|
46
|
+
* written in markup left `startBox` and `endBox` empty while the button still
|
|
47
|
+
* appeared, so it LOOKED packed and was not — a second one would have been
|
|
48
|
+
* drawn on top of the first rather than beside it.
|
|
49
|
+
*/
|
|
50
|
+
_addChildFromBuilder(name: string, view: View): void;
|
|
38
51
|
/** The centered title widget. */
|
|
39
52
|
get titleWidget(): View;
|
|
40
53
|
/** The start (left) slot container. */
|
|
@@ -12,8 +12,8 @@ export declare class AdwIcon extends Image {
|
|
|
12
12
|
private _syncThemeColor;
|
|
13
13
|
private _render;
|
|
14
14
|
/** The Adwaita symbolic SVG string to render (e.g. `panDownSymbolic`). */
|
|
15
|
-
get
|
|
16
|
-
set
|
|
15
|
+
get iconName(): string;
|
|
16
|
+
set iconName(svg: string);
|
|
17
17
|
/** The icon fill colour (hex). Setting it PINS the colour (it no longer follows
|
|
18
18
|
* the light/dark scheme) — use it for context colours like white on a suggested
|
|
19
19
|
* button or destructive red, which must survive both schemes. */
|
|
@@ -21,5 +21,5 @@ export declare class AdwIcon extends Image {
|
|
|
21
21
|
set iconColor(value: string);
|
|
22
22
|
/** The icon size in DIPs (default 16). Re-renders + resizes the image box. */
|
|
23
23
|
get iconSize(): number;
|
|
24
|
-
set iconSize(
|
|
24
|
+
set iconSize(raw: number | string);
|
|
25
25
|
}
|
|
@@ -15,15 +15,15 @@ export declare class AdwImageButton extends GridLayout {
|
|
|
15
15
|
/** Re-render the icon bitmap from the current svg / colour / size. */
|
|
16
16
|
private _render;
|
|
17
17
|
/** The Adwaita symbolic SVG string to render (e.g. `goPreviousSymbolic`). */
|
|
18
|
-
get
|
|
19
|
-
set
|
|
18
|
+
get iconName(): string;
|
|
19
|
+
set iconName(svg: string);
|
|
20
20
|
/** The icon fill colour (hex). Setting it PINS the colour (it no longer follows
|
|
21
21
|
* the light/dark scheme) — for context colours that must survive both schemes. */
|
|
22
22
|
get iconColor(): string;
|
|
23
23
|
set iconColor(value: string);
|
|
24
24
|
/** The icon size in DIPs (default 16). Re-renders + resizes the image box. */
|
|
25
25
|
get iconSize(): number;
|
|
26
|
-
set iconSize(
|
|
26
|
+
set iconSize(raw: number | string);
|
|
27
27
|
/** The underlying icon {@link Image} (e.g. to tweak alignment). */
|
|
28
28
|
get image(): Image;
|
|
29
29
|
}
|
|
@@ -29,5 +29,5 @@ export declare class AdwNavigationSplitView extends AdwSplitViewBase<NsNavigatio
|
|
|
29
29
|
pop(): NavigationActionResult;
|
|
30
30
|
/** `Adw.NavigationSplitView:show-content`, the C's own spelling of the flag. */
|
|
31
31
|
get showContent(): boolean;
|
|
32
|
-
set showContent(
|
|
32
|
+
set showContent(raw: boolean | string);
|
|
33
33
|
}
|
|
@@ -22,6 +22,17 @@ export declare class AdwNavigationView extends GridLayout {
|
|
|
22
22
|
* which also re-arms after `replace([])`.
|
|
23
23
|
*/
|
|
24
24
|
add(view: View, tag?: string | null, options?: Omit<AdwNavigationPageProps, 'tag'>): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* An XML child is a PAGE, registered in document order — so the first one is
|
|
27
|
+
* pushed and the rest wait behind it, exactly as `add` already promises.
|
|
28
|
+
*
|
|
29
|
+
* Registered with NO TAG: `add(view)` defaults it to `null`, and nothing in the
|
|
30
|
+
* markup can supply one, because a `tag` is this widget's own idea rather than a
|
|
31
|
+
* property of the child. `pushByTag` is therefore not reachable for a page that
|
|
32
|
+
* came from a template; a loader that wants it registers the page itself, or
|
|
33
|
+
* calls `setPageTag` on one it looked up. What XML contributes is the tree.
|
|
34
|
+
*/
|
|
35
|
+
_addChildFromBuilder(_name: string, view: View): void;
|
|
25
36
|
/**
|
|
26
37
|
* Remove a page (`AdwNavigationView.remove`). One that is on the stack is
|
|
27
38
|
* removed once it is POPPED. Named `removePage` rather than `remove` so the
|
|
@@ -80,9 +91,9 @@ export declare class AdwNavigationView extends GridLayout {
|
|
|
80
91
|
* subset has no transition, so the swap is instant either way.
|
|
81
92
|
*/
|
|
82
93
|
get animateTransitions(): boolean;
|
|
83
|
-
set animateTransitions(
|
|
94
|
+
set animateTransitions(raw: boolean | string);
|
|
84
95
|
/** `Adw.NavigationView:pop-on-escape` — consulted by {@link popFromEscape}. */
|
|
85
96
|
get popOnEscape(): boolean;
|
|
86
|
-
set popOnEscape(
|
|
97
|
+
set popOnEscape(raw: boolean | string);
|
|
87
98
|
private _emit;
|
|
88
99
|
}
|
|
@@ -10,7 +10,7 @@ export declare class AdwOverlaySplitView extends AdwSplitViewBase<NsOverlaySplit
|
|
|
10
10
|
* default FALSE) — whether collapsing leaves the sidebar's visibility alone.
|
|
11
11
|
*/
|
|
12
12
|
get pinSidebar(): boolean;
|
|
13
|
-
set pinSidebar(
|
|
13
|
+
set pinSidebar(raw: boolean | string);
|
|
14
14
|
protected _applyLayout(): void;
|
|
15
15
|
/** Animate a collapsed show/hide toggle; fall back to instant off-screen/off-device. */
|
|
16
16
|
protected _transitionSidebar(): void;
|
|
@@ -18,14 +18,14 @@ export declare class AdwPasswordEntryRow extends AdwEntryRow {
|
|
|
18
18
|
constructor();
|
|
19
19
|
/** Whether the contents are shown in clear text (`GtkText:visibility`). */
|
|
20
20
|
get revealed(): boolean;
|
|
21
|
-
set revealed(value: boolean);
|
|
21
|
+
set revealed(value: boolean | string);
|
|
22
22
|
/**
|
|
23
23
|
* Legacy spelling of {@link revealed}. The web port called it `revealed`, this
|
|
24
24
|
* one called it `peeking`, and neither name is in the C — kept so existing
|
|
25
25
|
* NativeScript callers keep working while `revealed` is the shared name.
|
|
26
26
|
*/
|
|
27
27
|
get peeking(): boolean;
|
|
28
|
-
set peeking(value: boolean);
|
|
28
|
+
set peeking(value: boolean | string);
|
|
29
29
|
/** Flip masked↔revealed — `show_text_clicked_cb` (C:90-97). */
|
|
30
30
|
togglePeek(): boolean;
|
|
31
31
|
/** Whether Caps Lock is engaged, as last reported by the host. */
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { View } from '@nativescript/core';
|
|
2
|
+
import { GridLayout, Label, StackLayout } from '@nativescript/core';
|
|
2
3
|
import type { SearchPreferencesOptions } from '@gjsify/adwaita-core';
|
|
3
4
|
import { type NsPreferencesSearchResult, type NsSearchablePage } from './preferences-search.js';
|
|
4
5
|
/** Event name emitted when the dialog is closed. */
|
|
@@ -14,6 +15,12 @@ export declare class AdwPreferencesDialog extends GridLayout {
|
|
|
14
15
|
set title(value: string);
|
|
15
16
|
/** Add an `AdwPreferencesPage` (or any view) to the dialog body. */
|
|
16
17
|
add(view: View): void;
|
|
18
|
+
/**
|
|
19
|
+
* An XML child is a page in the dialog BODY, not a child of the grid the dialog
|
|
20
|
+
* builds its header and scroller in — which is where `LayoutBase`'s inherited
|
|
21
|
+
* `_addChildFromBuilder` would have put it, on top of the title bar.
|
|
22
|
+
*/
|
|
23
|
+
_addChildFromBuilder(_name: string, view: View): void;
|
|
17
24
|
/** Remove a previously-added page from the body. */
|
|
18
25
|
remove(view: View): void;
|
|
19
26
|
/**
|
|
@@ -38,7 +45,7 @@ export declare class AdwPreferencesDialog extends GridLayout {
|
|
|
38
45
|
close(): void;
|
|
39
46
|
/** Whether the dialog is currently shown. */
|
|
40
47
|
get open(): boolean;
|
|
41
|
-
set open(value: boolean);
|
|
48
|
+
set open(value: boolean | string);
|
|
42
49
|
/** The scrollable body that hosts the preferences pages. */
|
|
43
50
|
get body(): StackLayout;
|
|
44
51
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { View } from '@nativescript/core';
|
|
2
|
+
import { GridLayout, Label, StackLayout } from '@nativescript/core';
|
|
2
3
|
import type { NsSearchableGroup, NsSearchableRow } from './preferences-search.js';
|
|
3
4
|
export declare class AdwPreferencesGroup extends StackLayout implements NsSearchableGroup {
|
|
4
5
|
/** The header box: labels on the leading edge, suffix on the trailing one. */
|
|
@@ -45,6 +46,17 @@ export declare class AdwPreferencesGroup extends StackLayout implements NsSearch
|
|
|
45
46
|
*/
|
|
46
47
|
get headerSuffix(): View | null;
|
|
47
48
|
set headerSuffix(view: View | null);
|
|
49
|
+
/**
|
|
50
|
+
* XML inflation — a template's children are ROWS, not stray layout children.
|
|
51
|
+
*
|
|
52
|
+
* `<AdwPreferencesGroup.headerSuffix>` reaches the suffix host; everything
|
|
53
|
+
* else goes into the boxed list, which is where a row has to be to get the
|
|
54
|
+
* card, the rounded ends and the separators. Without this the `StackLayout`
|
|
55
|
+
* default appended each row NEXT TO the listbox: measured on Android, the
|
|
56
|
+
* rows rendered — unboxed, on the page background, with no `.boxed-list`
|
|
57
|
+
* around them — which is the failure that looks like a styling bug.
|
|
58
|
+
*/
|
|
59
|
+
_addChildFromBuilder(name: string, view: View): void;
|
|
48
60
|
/** Append a row (or any view) to the boxed list. */
|
|
49
61
|
addRow(view: View): void;
|
|
50
62
|
/** Remove a previously-added row from the boxed list. */
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { View } from '@nativescript/core';
|
|
2
|
+
import { ScrollView, StackLayout } from '@nativescript/core';
|
|
2
3
|
import type { NsSearchableGroup, NsSearchablePage } from './preferences-search.js';
|
|
3
4
|
export declare class AdwPreferencesPage extends ScrollView implements NsSearchablePage {
|
|
4
5
|
/** The vertical stack that actually holds the groups. */
|
|
@@ -26,11 +27,17 @@ export declare class AdwPreferencesPage extends ScrollView implements NsSearchab
|
|
|
26
27
|
* a search-result subtitle strips before showing it (:196-199).
|
|
27
28
|
*/
|
|
28
29
|
get useUnderline(): boolean;
|
|
29
|
-
set useUnderline(value: boolean);
|
|
30
|
+
set useUnderline(value: boolean | string);
|
|
30
31
|
/** Append a preferences group (or any view) to the page. */
|
|
31
32
|
addGroup(view: View): void;
|
|
32
33
|
/** Remove a previously-added group from the page. */
|
|
33
34
|
removeGroup(view: View): void;
|
|
35
|
+
/**
|
|
36
|
+
* An XML child is a GROUP. `ScrollView`'s inherited `_addChildFromBuilder` sets
|
|
37
|
+
* `content`, which would REPLACE the page's own scroll body — one group in place
|
|
38
|
+
* of all of them, and no error.
|
|
39
|
+
*/
|
|
40
|
+
_addChildFromBuilder(_name: string, view: View): void;
|
|
34
41
|
/**
|
|
35
42
|
* The groups this page contributes to a preferences search, in order.
|
|
36
43
|
*
|
|
@@ -51,7 +51,7 @@ export declare class AdwSidebar extends ScrollView {
|
|
|
51
51
|
* selection rather than being ignored (adw-sidebar.c:3028-3029).
|
|
52
52
|
*/
|
|
53
53
|
get selected(): number;
|
|
54
|
-
set selected(
|
|
54
|
+
set selected(raw: number | string);
|
|
55
55
|
/** The selected item, or undefined — `adw_sidebar_get_selected_item`. */
|
|
56
56
|
get selectedItem(): AdwSidebarItemSpec | undefined;
|
|
57
57
|
/**
|
|
@@ -29,16 +29,16 @@ export declare class AdwSliderRow extends StackLayout {
|
|
|
29
29
|
set title(value: string);
|
|
30
30
|
/** The current numeric value (always within `[min, max]`, snapped to `step`). */
|
|
31
31
|
get value(): number;
|
|
32
|
-
set value(
|
|
32
|
+
set value(raw: number | string);
|
|
33
33
|
/** Lower bound. Re-clamps the current value if it now falls below. */
|
|
34
34
|
get min(): number;
|
|
35
|
-
set min(
|
|
35
|
+
set min(raw: number | string);
|
|
36
36
|
/** Upper bound. Re-clamps the current value if it now falls above. */
|
|
37
37
|
get max(): number;
|
|
38
|
-
set max(
|
|
38
|
+
set max(raw: number | string);
|
|
39
39
|
/** Snap granularity applied as the slider is dragged. */
|
|
40
40
|
get step(): number;
|
|
41
|
-
set step(
|
|
41
|
+
set step(raw: number | string);
|
|
42
42
|
/** The underlying {@link Slider} (e.g. to tweak styling). */
|
|
43
43
|
get slider(): Slider;
|
|
44
44
|
}
|
|
@@ -23,14 +23,14 @@ export declare class AdwSpinRow extends AdwActionRow {
|
|
|
23
23
|
constructor();
|
|
24
24
|
/** The current numeric value (always within `[min, max]`). */
|
|
25
25
|
get value(): number;
|
|
26
|
-
set value(v: number);
|
|
26
|
+
set value(v: number | string);
|
|
27
27
|
/** Lower bound. Re-clamps the current value if it now falls below. */
|
|
28
28
|
get min(): number;
|
|
29
|
-
set min(v: number);
|
|
29
|
+
set min(v: number | string);
|
|
30
30
|
/** Upper bound. Re-clamps the current value if it now falls above. */
|
|
31
31
|
get max(): number;
|
|
32
|
-
set max(v: number);
|
|
32
|
+
set max(v: number | string);
|
|
33
33
|
/** Increment/decrement step applied per button press. */
|
|
34
34
|
get step(): number;
|
|
35
|
-
set step(v: number);
|
|
35
|
+
set step(v: number | string);
|
|
36
36
|
}
|
|
@@ -13,7 +13,7 @@ export declare class AdwSpinner extends GridLayout {
|
|
|
13
13
|
private _applySpinning;
|
|
14
14
|
/** Whether the spinner is animating. Gated on being mapped, as in GTK. */
|
|
15
15
|
get spinning(): boolean;
|
|
16
|
-
set spinning(value: boolean);
|
|
16
|
+
set spinning(value: boolean | string);
|
|
17
17
|
/**
|
|
18
18
|
* The BOX size in DIPs — what was requested, floored at the measured
|
|
19
19
|
* minimum 16 and NOT capped.
|
|
@@ -24,7 +24,7 @@ export declare class AdwSpinner extends GridLayout {
|
|
|
24
24
|
* silently took 64 DIPs of layout instead of the 200 it was given.
|
|
25
25
|
*/
|
|
26
26
|
get size(): number;
|
|
27
|
-
set size(value: number);
|
|
27
|
+
set size(value: number | string);
|
|
28
28
|
/** The drawn ring diameter — `spinnerGeometry`, capped at 64. */
|
|
29
29
|
get ringDiameter(): number;
|
|
30
30
|
}
|
|
@@ -28,7 +28,16 @@ export declare class AdwSplitButton extends GridLayout {
|
|
|
28
28
|
private readonly _state;
|
|
29
29
|
/** Which of the two action views is currently parented. */
|
|
30
30
|
private _showingIcon;
|
|
31
|
-
|
|
31
|
+
/**
|
|
32
|
+
* `GtkWidget:sensitive`, in GTK's polarity and no other.
|
|
33
|
+
*
|
|
34
|
+
* The field was `_disabled` while the property was, and the rename INVERTED the
|
|
35
|
+
* property. Keeping the old polarity inside would have left every reader holding
|
|
36
|
+
* two of them, one negation apart, in a class where a forgotten `!` dims a live
|
|
37
|
+
* button and emits nothing — silently, because NativeScript has no insensitive
|
|
38
|
+
* state to contradict it. One polarity, so there is nothing to forget.
|
|
39
|
+
*/
|
|
40
|
+
private _sensitive;
|
|
32
41
|
constructor();
|
|
33
42
|
/**
|
|
34
43
|
* Present the dropdown menu and dispatch the choice BY POSITION.
|
|
@@ -53,8 +62,8 @@ export declare class AdwSplitButton extends GridLayout {
|
|
|
53
62
|
* The SVG string IS the icon identity here, so it is what the state machine
|
|
54
63
|
* stores as the icon name; NS resolves no icon theme.
|
|
55
64
|
*/
|
|
56
|
-
get
|
|
57
|
-
set
|
|
65
|
+
get iconName(): string;
|
|
66
|
+
set iconName(svg: string);
|
|
58
67
|
/** The dropdown menu entries (opened as a native `action()` sheet on arrow tap). */
|
|
59
68
|
get menu(): readonly AdwMenuEntry[];
|
|
60
69
|
set menu(value: readonly (string | AdwMenuEntry)[]);
|
|
@@ -70,10 +79,17 @@ export declare class AdwSplitButton extends GridLayout {
|
|
|
70
79
|
set dropdownTooltip(value: string);
|
|
71
80
|
/** Whether an underline in the label marks a mnemonic. */
|
|
72
81
|
get useUnderline(): boolean;
|
|
73
|
-
set useUnderline(
|
|
74
|
-
/**
|
|
75
|
-
|
|
76
|
-
|
|
82
|
+
set useUnderline(raw: boolean | string);
|
|
83
|
+
/**
|
|
84
|
+
* Whether the control is sensitive — `GtkWidget:sensitive`, so `false` is the
|
|
85
|
+
* insensitive state: dimmed, and emitting neither signal.
|
|
86
|
+
*
|
|
87
|
+
* The port spelled this `disabled` until ADR 0034 clause 1. Converging the name
|
|
88
|
+
* INVERTS it, which is why the ledger recorded the pair rather than renaming
|
|
89
|
+
* quietly: a `sensitive` that still meant `disabled` is worse than either name.
|
|
90
|
+
*/
|
|
91
|
+
get sensitive(): boolean;
|
|
92
|
+
set sensitive(raw: boolean | string);
|
|
77
93
|
/** The main action part (for composing a custom content widget). */
|
|
78
94
|
get actionButton(): StackLayout;
|
|
79
95
|
}
|