@gjsify/adwaita-nativescript 0.48.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.
Files changed (144) hide show
  1. package/lib/esm/index.js +1 -1
  2. package/lib/esm/namespace/gtk.js +1 -1
  3. package/lib/esm/widgets/adw-about-dialog.js +1 -1
  4. package/lib/esm/widgets/adw-action-row.js +1 -1
  5. package/lib/esm/widgets/adw-alert-dialog.js +1 -1
  6. package/lib/esm/widgets/adw-avatar.js +1 -1
  7. package/lib/esm/widgets/adw-banner.js +1 -1
  8. package/lib/esm/widgets/adw-bottom-sheet.js +1 -1
  9. package/lib/esm/widgets/adw-button-content.js +1 -1
  10. package/lib/esm/widgets/adw-button-row.js +1 -1
  11. package/lib/esm/widgets/adw-carousel.js +1 -1
  12. package/lib/esm/widgets/adw-clamp.js +1 -1
  13. package/lib/esm/widgets/adw-combo-row.js +1 -1
  14. package/lib/esm/widgets/adw-data-grid.js +1 -1
  15. package/lib/esm/widgets/adw-entry-row.js +1 -1
  16. package/lib/esm/widgets/adw-expander-row.js +1 -1
  17. package/lib/esm/widgets/adw-header-bar.js +1 -1
  18. package/lib/esm/widgets/adw-image-button.js +1 -1
  19. package/lib/esm/widgets/adw-inline-view-switcher.js +1 -1
  20. package/lib/esm/widgets/adw-navigation-split-view.js +1 -1
  21. package/lib/esm/widgets/adw-navigation-view.js +1 -1
  22. package/lib/esm/widgets/adw-overlay-split-view.js +1 -1
  23. package/lib/esm/widgets/adw-password-entry-row.js +1 -1
  24. package/lib/esm/widgets/adw-preferences-dialog.js +1 -1
  25. package/lib/esm/widgets/adw-preferences-group.js +1 -1
  26. package/lib/esm/widgets/adw-preferences-page.js +1 -1
  27. package/lib/esm/widgets/adw-shortcut-label.js +1 -1
  28. package/lib/esm/widgets/adw-sidebar.js +1 -1
  29. package/lib/esm/widgets/adw-slider-row.js +1 -1
  30. package/lib/esm/widgets/adw-spin-row.js +1 -1
  31. package/lib/esm/widgets/adw-spinner.js +1 -1
  32. package/lib/esm/widgets/adw-split-button.js +1 -1
  33. package/lib/esm/widgets/adw-status-page.js +1 -1
  34. package/lib/esm/widgets/adw-switch-row.js +1 -1
  35. package/lib/esm/widgets/adw-tab-view.js +1 -1
  36. package/lib/esm/widgets/adw-toast-overlay.js +1 -1
  37. package/lib/esm/widgets/adw-toggle-group.js +1 -1
  38. package/lib/esm/widgets/adw-toolbar-view.js +1 -1
  39. package/lib/esm/widgets/adw-view-stack.js +1 -1
  40. package/lib/esm/widgets/adw-view-switcher-bar.js +1 -1
  41. package/lib/esm/widgets/adw-view-switcher.js +1 -1
  42. package/lib/esm/widgets/adw-window-title.js +1 -1
  43. package/lib/esm/widgets/adw-wrap-box.js +1 -1
  44. package/lib/esm/widgets/avatar-view.js +1 -0
  45. package/lib/esm/widgets/box-layout.js +1 -0
  46. package/lib/esm/widgets/button-content.js +1 -1
  47. package/lib/esm/widgets/button-slot.js +1 -0
  48. package/lib/esm/widgets/construct-props.js +1 -0
  49. package/lib/esm/widgets/entry-row-view.js +1 -1
  50. package/lib/esm/widgets/gtk-align.js +1 -0
  51. package/lib/esm/widgets/gtk-box.js +1 -0
  52. package/lib/esm/widgets/gtk-button.js +1 -1
  53. package/lib/esm/widgets/gtk-drop-down.js +1 -1
  54. package/lib/esm/widgets/gtk-entry.js +1 -1
  55. package/lib/esm/widgets/gtk-image.js +1 -1
  56. package/lib/esm/widgets/gtk-label.js +1 -0
  57. package/lib/esm/widgets/gtk-menu-button.js +1 -1
  58. package/lib/esm/widgets/icon-theme.js +1 -0
  59. package/lib/esm/widgets/index.js +1 -1
  60. package/lib/esm/widgets/label-text.js +1 -0
  61. package/lib/esm/widgets/signals.js +1 -0
  62. package/lib/esm/widgets/split-view-base.js +1 -1
  63. package/lib/esm/widgets/style-classes.js +1 -0
  64. package/lib/esm/widgets/view-switcher-base.js +1 -1
  65. package/lib/esm/widgets/view-switcher-model.js +1 -1
  66. package/lib/types/avatar.spec.d.ts +2 -0
  67. package/lib/types/box-layout.spec.d.ts +2 -0
  68. package/lib/types/button-slot.spec.d.ts +2 -0
  69. package/lib/types/construct-props.spec.d.ts +2 -0
  70. package/lib/types/icon-theme.spec.d.ts +2 -0
  71. package/lib/types/index.d.ts +2 -2
  72. package/lib/types/label-text.spec.d.ts +2 -0
  73. package/lib/types/namespace/gtk.d.ts +2 -0
  74. package/lib/types/signals.spec.d.ts +2 -0
  75. package/lib/types/style-classes.spec.d.ts +2 -0
  76. package/lib/types/widgets/adw-about-dialog.d.ts +16 -3
  77. package/lib/types/widgets/adw-action-row.d.ts +38 -10
  78. package/lib/types/widgets/adw-alert-dialog.d.ts +30 -13
  79. package/lib/types/widgets/adw-avatar.d.ts +49 -3
  80. package/lib/types/widgets/adw-banner.d.ts +16 -3
  81. package/lib/types/widgets/adw-bottom-sheet.d.ts +32 -16
  82. package/lib/types/widgets/adw-button-content.d.ts +18 -4
  83. package/lib/types/widgets/adw-button-row.d.ts +6 -3
  84. package/lib/types/widgets/adw-carousel.d.ts +19 -7
  85. package/lib/types/widgets/adw-clamp.d.ts +17 -5
  86. package/lib/types/widgets/adw-combo-row.d.ts +2 -1
  87. package/lib/types/widgets/adw-data-grid.d.ts +17 -4
  88. package/lib/types/widgets/adw-entry-row.d.ts +13 -11
  89. package/lib/types/widgets/adw-expander-row.d.ts +19 -8
  90. package/lib/types/widgets/adw-header-bar.d.ts +39 -14
  91. package/lib/types/widgets/adw-image-button.d.ts +22 -5
  92. package/lib/types/widgets/adw-inline-view-switcher.d.ts +2 -1
  93. package/lib/types/widgets/adw-navigation-split-view.d.ts +2 -1
  94. package/lib/types/widgets/adw-navigation-view.d.ts +40 -21
  95. package/lib/types/widgets/adw-overlay-split-view.d.ts +3 -2
  96. package/lib/types/widgets/adw-password-entry-row.d.ts +2 -1
  97. package/lib/types/widgets/adw-preferences-dialog.d.ts +16 -3
  98. package/lib/types/widgets/adw-preferences-group.d.ts +19 -6
  99. package/lib/types/widgets/adw-preferences-page.d.ts +37 -8
  100. package/lib/types/widgets/adw-shortcut-label.d.ts +15 -2
  101. package/lib/types/widgets/adw-sidebar.d.ts +15 -2
  102. package/lib/types/widgets/adw-slider-row.d.ts +15 -2
  103. package/lib/types/widgets/adw-spin-row.d.ts +2 -1
  104. package/lib/types/widgets/adw-spinner.d.ts +14 -2
  105. package/lib/types/widgets/adw-split-button.d.ts +15 -2
  106. package/lib/types/widgets/adw-status-page.d.ts +20 -6
  107. package/lib/types/widgets/adw-switch-row.d.ts +2 -1
  108. package/lib/types/widgets/adw-tab-view.d.ts +34 -8
  109. package/lib/types/widgets/adw-toast-overlay.d.ts +19 -7
  110. package/lib/types/widgets/adw-toggle-group.d.ts +14 -2
  111. package/lib/types/widgets/adw-toolbar-view.d.ts +21 -8
  112. package/lib/types/widgets/adw-view-stack.d.ts +38 -5
  113. package/lib/types/widgets/adw-view-switcher-bar.d.ts +16 -3
  114. package/lib/types/widgets/adw-view-switcher.d.ts +2 -1
  115. package/lib/types/widgets/adw-window-title.d.ts +16 -3
  116. package/lib/types/widgets/adw-wrap-box.d.ts +21 -8
  117. package/lib/types/widgets/avatar-view.d.ts +57 -0
  118. package/lib/types/widgets/bottom-sheet-state.d.ts +1 -1
  119. package/lib/types/widgets/box-layout.d.ts +39 -0
  120. package/lib/types/widgets/button-content.d.ts +4 -4
  121. package/lib/types/widgets/button-slot.d.ts +16 -0
  122. package/lib/types/widgets/construct-props.d.ts +82 -0
  123. package/lib/types/widgets/entry-row-view.d.ts +8 -7
  124. package/lib/types/widgets/gtk-align.d.ts +59 -0
  125. package/lib/types/widgets/gtk-box.d.ts +75 -0
  126. package/lib/types/widgets/gtk-button.d.ts +110 -28
  127. package/lib/types/widgets/gtk-drop-down.d.ts +15 -2
  128. package/lib/types/widgets/gtk-entry.d.ts +15 -2
  129. package/lib/types/widgets/gtk-image.d.ts +22 -5
  130. package/lib/types/widgets/gtk-label.d.ts +82 -0
  131. package/lib/types/widgets/gtk-menu-button.d.ts +2 -1
  132. package/lib/types/widgets/icon-theme.d.ts +77 -0
  133. package/lib/types/widgets/icons.d.ts +3 -1
  134. package/lib/types/widgets/index.d.ts +14 -3
  135. package/lib/types/widgets/label-text.d.ts +13 -0
  136. package/lib/types/widgets/row-state.d.ts +1 -1
  137. package/lib/types/widgets/signals.d.ts +40 -0
  138. package/lib/types/widgets/split-view-base.d.ts +18 -6
  139. package/lib/types/widgets/status-page-content.d.ts +1 -1
  140. package/lib/types/widgets/style-classes.d.ts +61 -0
  141. package/lib/types/widgets/view-switcher-base.d.ts +12 -1
  142. package/lib/types/widgets/view-switcher-model.d.ts +2 -11
  143. package/package.json +7 -7
  144. package/src/theme/adwaita.css +58 -0
@@ -1,5 +1,6 @@
1
1
  import { Label, Slider, StackLayout, type EventData } from '@nativescript/core';
2
2
  import type { AdwAdjustment, AdwAdjustmentInput } from '@gjsify/adwaita-core';
3
+ import { type ConstructProps } from './construct-props.js';
3
4
  /** Event name emitted when {@link AdwSliderRow.value} changes. Mirrors GObject `notify::value`. */
4
5
  export declare const NOTIFY_SLIDER_VALUE = "notify::value";
5
6
  /** Payload of the `notify::value` event. */
@@ -7,7 +8,18 @@ export interface NotifySliderValueEventData extends EventData {
7
8
  /** The new numeric value (already clamped into the adjustment's range and snapped to a tick). */
8
9
  value: number;
9
10
  }
10
- export declare class AdwSliderRow extends StackLayout {
11
+ declare const AdwSliderRow_base: (abstract new (...args: any[]) => {
12
+ connect(eventName: string, callback: (self: /*elided*/ any, data: EventData) => void): number;
13
+ disconnect(handlerId: number): void;
14
+ _emit(eventName: string): void;
15
+ addEventListener(eventName: string, callback: (data: EventData) => void, thisArg?: unknown, once?: boolean): void;
16
+ removeEventListener(eventName: string, callback?: (data: EventData) => void, thisArg?: unknown): void;
17
+ notify<T extends EventData>(data: T): void;
18
+ notifyPropertyChange(name: string, value: unknown, oldValue?: unknown): void;
19
+ set(name: string, value: unknown): void;
20
+ get(name: string): unknown;
21
+ }) & typeof StackLayout;
22
+ export declare class AdwSliderRow extends AdwSliderRow_base {
11
23
  /** The title label (header, left). */
12
24
  protected readonly _titleLabel: Label;
13
25
  /** The live value label (header, right, dim). */
@@ -18,7 +30,7 @@ export declare class AdwSliderRow extends StackLayout {
18
30
  private readonly _state;
19
31
  /** Guards the slider's `valueChange` while we programmatically set its value. */
20
32
  private _suppress;
21
- constructor();
33
+ constructor(props?: ConstructProps<AdwSliderRow>);
22
34
  /** Push the current value to the slider + label without emitting. */
23
35
  private _sync;
24
36
  /** The group title shown in the header (left). */
@@ -40,3 +52,4 @@ export declare class AdwSliderRow extends StackLayout {
40
52
  /** The underlying {@link Slider} (e.g. to tweak styling). */
41
53
  get slider(): Slider;
42
54
  }
55
+ export {};
@@ -3,6 +3,7 @@ import type { EventData } from '@nativescript/core';
3
3
  import type { AdwAdjustment, AdwAdjustmentInput } from '@gjsify/adwaita-core';
4
4
  import { AdwActionRow } from './adw-action-row.js';
5
5
  import { AdwImageButton } from './adw-image-button.js';
6
+ import { type ConstructProps } from './construct-props.js';
6
7
  export { SpinState } from '@gjsify/adwaita-core';
7
8
  export type { AdwAdjustment, AdwAdjustmentInput, SpinStateChange, SpinStateListener } from '@gjsify/adwaita-core';
8
9
  /** Event name emitted when {@link AdwSpinRow.value} changes. Mirrors GObject `notify::value`. */
@@ -21,7 +22,7 @@ export declare class AdwSpinRow extends AdwActionRow {
21
22
  protected readonly _valueLabel: Label;
22
23
  /** The headless adjustment: clamp, step and the two signals (ADR 0004, ADR 0047). */
23
24
  private readonly _state;
24
- constructor();
25
+ constructor(props?: ConstructProps<AdwSpinRow>);
25
26
  /** The current numeric value (always within the adjustment's range). */
26
27
  get value(): number;
27
28
  set value(v: number | string);
@@ -1,14 +1,26 @@
1
1
  import { GridLayout } from '@nativescript/core';
2
2
  import { DEFAULT_SPINNER_SIZE } from './chrome.js';
3
+ import { type ConstructProps } from './construct-props.js';
3
4
  export { DEFAULT_SPINNER_SIZE };
4
- export declare class AdwSpinner extends GridLayout {
5
+ declare const AdwSpinner_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 AdwSpinner extends AdwSpinner_base {
5
17
  /** The platform indicator — the RING, capped at 64 DIPs. */
6
18
  private readonly _indicator;
7
19
  /** The requested BOX size, floored at the measured minimum 16. */
8
20
  private _size;
9
21
  /** Whether the consumer wants it spinning, independent of whether it is mapped. */
10
22
  private _spinning;
11
- constructor();
23
+ constructor(props?: ConstructProps<AdwSpinner>);
12
24
  private _applySize;
13
25
  private _applySpinning;
14
26
  /** Whether the spinner is animating. Gated on being mapped, as in GTK. */
@@ -1,6 +1,7 @@
1
1
  import { GridLayout, Label, StackLayout, type EventData } from '@nativescript/core';
2
2
  import type { AdwMenuActions, AdwMenuInput, AdwMenuModel, SplitButtonDirection } from '@gjsify/adwaita-core';
3
3
  import { GtkImage } from './gtk-image.js';
4
+ import { type ConstructProps } from './construct-props.js';
4
5
  /** Event name emitted when the main action part is tapped. Mirrors `Adw.SplitButton::clicked`. */
5
6
  export declare const CLICKED = "clicked";
6
7
  /** Event name emitted when a dropdown menu item is chosen. */
@@ -20,7 +21,18 @@ export interface MenuTappedEventData extends EventData {
20
21
  /** The chosen item's detailed action name, when the item carried one. */
21
22
  action?: string;
22
23
  }
23
- export declare class AdwSplitButton extends GridLayout {
24
+ declare const AdwSplitButton_base: (abstract new (...args: any[]) => {
25
+ connect(eventName: string, callback: (self: /*elided*/ any, data: EventData) => void): number;
26
+ disconnect(handlerId: number): void;
27
+ _emit(eventName: string): void;
28
+ addEventListener(eventName: string, callback: (data: EventData) => void, thisArg?: unknown, once?: boolean): void;
29
+ removeEventListener(eventName: string, callback?: (data: EventData) => void, thisArg?: unknown): void;
30
+ notify<T extends EventData>(data: T): void;
31
+ notifyPropertyChange(name: string, value: unknown, oldValue?: unknown): void;
32
+ set(name: string, value: unknown): void;
33
+ get(name: string): unknown;
34
+ }) & typeof GridLayout;
35
+ export declare class AdwSplitButton extends AdwSplitButton_base {
24
36
  /** The main action part (column 0). */
25
37
  protected readonly _actionPart: StackLayout;
26
38
  /** The action label (shown in label mode). */
@@ -45,7 +57,7 @@ export declare class AdwSplitButton extends GridLayout {
45
57
  * state to contradict it. One polarity, so there is nothing to forget.
46
58
  */
47
59
  private _sensitive;
48
- constructor();
60
+ constructor(props?: ConstructProps<AdwSplitButton>);
49
61
  /**
50
62
  * Present the dropdown menu and dispatch the choice BY POSITION.
51
63
  *
@@ -128,3 +140,4 @@ export declare class AdwSplitButton extends GridLayout {
128
140
  /** The main action part (for composing a custom content widget). */
129
141
  get actionButton(): StackLayout;
130
142
  }
143
+ export {};
@@ -1,12 +1,24 @@
1
1
  import type { View } from '@nativescript/core';
2
2
  import { GridLayout, Label, StackLayout } from '@nativescript/core';
3
3
  import { GtkImage } from './gtk-image.js';
4
- export declare class AdwStatusPage extends GridLayout {
4
+ import { type ConstructProps } from './construct-props.js';
5
+ declare const AdwStatusPage_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 AdwStatusPage extends AdwStatusPage_base {
5
17
  /** The centered vertical stack. */
6
18
  protected readonly _stack: StackLayout;
7
19
  /** The large symbolic icon (shown when an `icon` SVG is set). */
8
20
  protected readonly _icon: GtkImage;
9
- private _iconSvg;
21
+ private _iconName;
10
22
  /** The large glyph label (shown when `iconText` is set — the legacy fallback). */
11
23
  protected readonly _iconLabel: Label;
12
24
  private _iconGlyph;
@@ -15,9 +27,10 @@ export declare class AdwStatusPage extends GridLayout {
15
27
  /** The dim description label. */
16
28
  protected readonly _descriptionLabel: Label;
17
29
  private _child;
18
- constructor();
30
+ constructor(props?: ConstructProps<AdwStatusPage>);
19
31
  /**
20
- * A large Adwaita symbolic SVG string shown above the title (e.g.
32
+ * The large icon shown above the title — an Adwaita icon NAME
33
+ * (`'folder-symbolic'`) or a symbolic SVG SOURCE string (e.g.
21
34
  * `folderSymbolic`). Setting a non-empty value shows the symbolic icon; empty
22
35
  * hides it. Matches `Adw.StatusPage`'s themed icon. Mutually exclusive with
23
36
  * {@link iconText} — whichever was set last wins.
@@ -43,8 +56,8 @@ export declare class AdwStatusPage extends GridLayout {
43
56
  */
44
57
  get description(): string;
45
58
  set description(value: string);
46
- /** Set (or replace) the optional child widget below the description. */
47
- setChild(view: View | null): void;
59
+ /** Set (or replace) the optional child widget below the description — `adw_status_page_set_child`. */
60
+ set_child(view: View | null): void;
48
61
  /** The currently-installed child, or `null`. */
49
62
  get child(): View | null;
50
63
  /**
@@ -55,3 +68,4 @@ export declare class AdwStatusPage extends GridLayout {
55
68
  */
56
69
  _addChildFromBuilder(_name: string, view: View): void;
57
70
  }
71
+ export {};
@@ -1,5 +1,6 @@
1
1
  import { Switch, type EventData } from '@nativescript/core';
2
2
  import { AdwActionRow } from './adw-action-row.js';
3
+ import { type ConstructProps } from './construct-props.js';
3
4
  /** Event name emitted when {@link AdwSwitchRow.active} changes. Mirrors GObject `notify::active`. */
4
5
  export declare const NOTIFY_ACTIVE = "notify::active";
5
6
  /** Payload of the `notify::active` event. */
@@ -12,7 +13,7 @@ export declare class AdwSwitchRow extends AdwActionRow {
12
13
  protected readonly _switch: Switch;
13
14
  /** The headless active flag + its notify rule (ADR 0004). */
14
15
  private readonly _switchState;
15
- constructor();
16
+ constructor(props?: ConstructProps<AdwSwitchRow>);
16
17
  /** Whether the switch is on. */
17
18
  get active(): boolean;
18
19
  set active(value: boolean | string);
@@ -2,6 +2,7 @@ import { GridLayout, type EventData, type View } from '@nativescript/core';
2
2
  import type { AdwTabPageSpec, TabViewPagesChange } from '@gjsify/adwaita-core';
3
3
  import { type AdwTabPage, type TabViewNotifyPayload } from './tab-view-state.js';
4
4
  import type { AdwViewPage } from './view-switcher-base.js';
5
+ import { type ConstructProps } from './construct-props.js';
5
6
  export type { AdwTabPage };
6
7
  /** Event name emitted when the selected page changes. Mirrors `notify::selected-page`. */
7
8
  export declare const NOTIFY_SELECTED_PAGE = "notify::selected-page";
@@ -22,7 +23,18 @@ export interface ClosePageEventData extends EventData {
22
23
  /** Its index while it is still in the view. */
23
24
  index: number;
24
25
  }
25
- export declare class AdwTabView extends GridLayout {
26
+ declare const AdwTabView_base: (abstract new (...args: any[]) => {
27
+ connect(eventName: string, callback: (self: /*elided*/ any, data: EventData) => void): number;
28
+ disconnect(handlerId: number): void;
29
+ _emit(eventName: string): void;
30
+ addEventListener(eventName: string, callback: (data: EventData) => void, thisArg?: unknown, once?: boolean): void;
31
+ removeEventListener(eventName: string, callback?: (data: EventData) => void, thisArg?: unknown): void;
32
+ notify<T extends EventData>(data: T): void;
33
+ notifyPropertyChange(name: string, value: unknown, oldValue?: unknown): void;
34
+ set(name: string, value: unknown): void;
35
+ get(name: string): unknown;
36
+ }) & typeof GridLayout;
37
+ export declare class AdwTabView extends AdwTabView_base {
26
38
  private readonly _state;
27
39
  private readonly _bar;
28
40
  private readonly _contentArea;
@@ -42,7 +54,7 @@ export declare class AdwTabView extends GridLayout {
42
54
  * and deciding stay separable.
43
55
  */
44
56
  closeHandler: ((page: AdwTabPage) => boolean | 'defer') | null;
45
- constructor();
57
+ constructor(props?: ConstructProps<AdwTabView>);
46
58
  /** All pages in order. */
47
59
  get pages(): readonly AdwTabPage[];
48
60
  /** Number of pages. */
@@ -53,14 +65,28 @@ export declare class AdwTabView extends GridLayout {
53
65
  get selectedId(): string | null;
54
66
  /** Index of the selected page, `-1` when the view is empty — never 0 for an empty view. */
55
67
  get selectedIndex(): number;
56
- /** The selected page index. Setting it IGNORES a non-integer or out-of-range value. */
57
- get selected(): number;
58
- set selected(raw: number | string);
68
+ /**
69
+ * The selected page (`Adw.TabView:selected-page`), `null` when the view is empty.
70
+ *
71
+ * THE PAGE, NOT ITS POSITION (ADR 0048). `Adw.TabView` is the one widget in this port
72
+ * whose counterpart selects by OBJECT rather than by name or by ordinal, and the model
73
+ * has held that object all along — this getter is the door onto it.
74
+ *
75
+ * READS THE PAGE, WRITES THE ID: the setter below takes the id this port uses as its
76
+ * page handle, because that is what an XML attribute can carry. TypeScript allows the
77
+ * two halves to differ, so `view.selectedPage = view.selectedPage` is a type error
78
+ * rather than a silent one — which is the intended reading, not an oversight.
79
+ */
80
+ get selectedPage(): AdwTabPage | null;
81
+ set selectedPage(id: string | null);
59
82
  isClosing(id: string): boolean;
60
- setSelectedPage(id: string | null): boolean;
83
+ /** `adw_tab_view_set_selected_page`. The page, or the id this port uses as its handle. */
84
+ set_selected_page(page: AdwTabPage | string | null): boolean;
61
85
  selectNthPage(n: number): boolean;
62
- selectPreviousPage(): boolean;
63
- selectNextPage(): boolean;
86
+ /** `adw_tab_view_select_previous_page`. */
87
+ select_previous_page(): boolean;
88
+ /** `adw_tab_view_select_next_page`. */
89
+ select_next_page(): boolean;
64
90
  selectFirstPage(): boolean;
65
91
  selectLastPage(): boolean;
66
92
  /** The next page, WRAPPING to the first (Ctrl+Tab). */
@@ -1,12 +1,24 @@
1
1
  import type { View } from '@nativescript/core';
2
- import { Button, GridLayout, Label } from '@nativescript/core';
2
+ import { Button, GridLayout, Label, type EventData } from '@nativescript/core';
3
3
  import { AdwToast } from '@gjsify/adwaita-core';
4
4
  import type { AdwToastOptions } from '@gjsify/adwaita-core';
5
+ import { type ConstructProps } from './construct-props.js';
5
6
  export { AdwToast, AdwToastQueue, DEFAULT_TOAST_TIMEOUT } from '@gjsify/adwaita-core';
6
7
  export type { AdwToastOptions, AdwToastQueueHandlers, AdwToastQueueOptions, ToastScheduler, ToastTimerHandle, } from '@gjsify/adwaita-core';
7
8
  /** Event name emitted when a toast's action button is tapped. */
8
9
  export declare const TOAST_BUTTON_CLICKED = "toastButtonClicked";
9
- export declare class AdwToastOverlay extends GridLayout {
10
+ declare const AdwToastOverlay_base: (abstract new (...args: any[]) => {
11
+ connect(eventName: string, callback: (self: /*elided*/ any, data: EventData) => void): number;
12
+ disconnect(handlerId: number): void;
13
+ _emit(eventName: string): void;
14
+ addEventListener(eventName: string, callback: (data: EventData) => void, thisArg?: unknown, once?: boolean): void;
15
+ removeEventListener(eventName: string, callback?: (data: EventData) => void, thisArg?: unknown): void;
16
+ notify<T extends EventData>(data: T): void;
17
+ notifyPropertyChange(name: string, value: unknown, oldValue?: unknown): void;
18
+ set(name: string, value: unknown): void;
19
+ get(name: string): unknown;
20
+ }) & typeof GridLayout;
21
+ export declare class AdwToastOverlay extends AdwToastOverlay_base {
10
22
  /** The always-visible content layer. */
11
23
  private _content;
12
24
  /** The bottom-anchored toast strip. */
@@ -16,11 +28,11 @@ export declare class AdwToastOverlay extends GridLayout {
16
28
  private _hasButton;
17
29
  /** The headless one-at-a-time + auto-dismiss state machine (ADR 0004). */
18
30
  private readonly _queue;
19
- constructor();
20
- /** Set (or replace) the always-visible content layer (under the toast). */
21
- setContent(view: View | null): void;
22
- /** Enqueue a {@link AdwToast} descriptor (shows now, or after the current one). */
23
- addToast(toast: AdwToast): void;
31
+ constructor(props?: ConstructProps<AdwToastOverlay>);
32
+ /** Set (or replace) the always-visible content layer (under the toast) — `adw_toast_overlay_set_child`. */
33
+ set_child(view: View | null): void;
34
+ /** Enqueue a {@link AdwToast} descriptor (shows now, or after the current one) — `adw_toast_overlay_add_toast`. */
35
+ add_toast(toast: AdwToast): void;
24
36
  /** Enqueue a transient toast with the given message and options. */
25
37
  showToast(title: string, options?: AdwToastOptions): void;
26
38
  /** Dismiss the current toast immediately (advances to the next queued one). */
@@ -1,4 +1,5 @@
1
1
  import { StackLayout, type EventData } from '@nativescript/core';
2
+ import { type ConstructProps } from './construct-props.js';
2
3
  export { ToggleGroupState } from '@gjsify/adwaita-core';
3
4
  export type { ToggleGroupStateChange, ToggleGroupStateListener } from '@gjsify/adwaita-core';
4
5
  /** Event name emitted when {@link AdwToggleGroup.selected} changes. Mirrors GObject `notify::selected`. */
@@ -15,12 +16,23 @@ export interface AdwToggle {
15
16
  label: string;
16
17
  icon?: string;
17
18
  }
18
- export declare class AdwToggleGroup extends StackLayout {
19
+ declare const AdwToggleGroup_base: (abstract new (...args: any[]) => {
20
+ connect(eventName: string, callback: (self: /*elided*/ any, data: EventData) => void): number;
21
+ disconnect(handlerId: number): void;
22
+ _emit(eventName: string): void;
23
+ addEventListener(eventName: string, callback: (data: EventData) => void, thisArg?: unknown, once?: boolean): void;
24
+ removeEventListener(eventName: string, callback?: (data: EventData) => void, thisArg?: unknown): void;
25
+ notify<T extends EventData>(data: T): void;
26
+ notifyPropertyChange(name: string, value: unknown, oldValue?: unknown): void;
27
+ set(name: string, value: unknown): void;
28
+ get(name: string): unknown;
29
+ }) & typeof StackLayout;
30
+ export declare class AdwToggleGroup extends AdwToggleGroup_base {
19
31
  private _toggles;
20
32
  private readonly _segments;
21
33
  /** The headless labels + selected-index state machine (ADR 0004). */
22
34
  private readonly _state;
23
- constructor();
35
+ constructor(props?: ConstructProps<AdwToggleGroup>);
24
36
  /** The segment labels (icon-less). Setting them rebuilds the toggle group. */
25
37
  get options(): string[];
26
38
  set options(value: string[]);
@@ -1,7 +1,19 @@
1
1
  import type { View } from '@nativescript/core';
2
2
  import { GridLayout, StackLayout } from '@nativescript/core';
3
3
  import { type AdwToolbarStyle } from './chrome.js';
4
- export declare class AdwToolbarView extends GridLayout {
4
+ import { type ConstructProps } from './construct-props.js';
5
+ declare const AdwToolbarView_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 AdwToolbarView extends AdwToolbarView_base {
5
17
  /** The top-bar slot (row 0) — stack of header bars / toolbars. */
6
18
  protected readonly _topBox: StackLayout;
7
19
  /** The bottom-bar slot (row 2) — stack of bottom toolbars. */
@@ -14,13 +26,13 @@ export declare class AdwToolbarView extends GridLayout {
14
26
  private _topBarCount;
15
27
  private _bottomBarCount;
16
28
  private _detachInsets;
17
- constructor();
18
- /** Append a widget (e.g. an {@link AdwHeaderBar}) to the top-bar slot. */
19
- addTopBar(view: View): void;
20
- /** Append a widget to the bottom-bar slot. */
21
- addBottomBar(view: View): void;
22
- /** Set (or replace) the main content view. Pass `null` to clear it. */
23
- setContent(view: View | null): void;
29
+ constructor(props?: ConstructProps<AdwToolbarView>);
30
+ /** Append a widget (e.g. an {@link AdwHeaderBar}) to the top-bar slot — `adw_toolbar_view_add_top_bar`. */
31
+ add_top_bar(view: View): void;
32
+ /** Append a widget to the bottom-bar slot — `adw_toolbar_view_add_bottom_bar`. */
33
+ add_bottom_bar(view: View): void;
34
+ /** Set (or replace) the main content view — `adw_toolbar_view_set_content`. `null` clears it. */
35
+ set_content(view: View | null): void;
24
36
  /**
25
37
  * XML inflation — route a template's child through the slot API.
26
38
  *
@@ -92,3 +104,4 @@ export declare class AdwToolbarView extends GridLayout {
92
104
  */
93
105
  private _syncClasses;
94
106
  }
107
+ export {};
@@ -1,6 +1,7 @@
1
1
  import type { View } from '@nativescript/core';
2
2
  import { GridLayout, type EventData } from '@nativescript/core';
3
3
  import { type AdwViewStackPage, type ViewStackNotifyPayload } from './view-stack-state.js';
4
+ import { type ConstructProps } from './construct-props.js';
4
5
  export type { AdwViewStackPage };
5
6
  /** Event name emitted when the visible child changes. Mirrors GObject `notify::visible-child`. */
6
7
  export declare const NOTIFY_VISIBLE_CHILD = "notify::visible-child";
@@ -11,9 +12,20 @@ export declare const NOTIFY_VISIBLE_CHILD = "notify::visible-child";
11
12
  */
12
13
  export interface NotifyVisibleChildEventData extends EventData, ViewStackNotifyPayload {
13
14
  }
14
- export declare class AdwViewStack extends GridLayout {
15
+ declare const AdwViewStack_base: (abstract new (...args: any[]) => {
16
+ connect(eventName: string, callback: (self: /*elided*/ any, data: EventData) => void): number;
17
+ disconnect(handlerId: number): void;
18
+ _emit(eventName: string): void;
19
+ addEventListener(eventName: string, callback: (data: EventData) => void, thisArg?: unknown, once?: boolean): void;
20
+ removeEventListener(eventName: string, callback?: (data: EventData) => void, thisArg?: unknown): void;
21
+ notify<T extends EventData>(data: T): void;
22
+ notifyPropertyChange(name: string, value: unknown, oldValue?: unknown): void;
23
+ set(name: string, value: unknown): void;
24
+ get(name: string): unknown;
25
+ }) & typeof GridLayout;
26
+ export declare class AdwViewStack extends AdwViewStack_base {
15
27
  private readonly _state;
16
- constructor();
28
+ constructor(props?: ConstructProps<AdwViewStack>);
17
29
  /**
18
30
  * Register a page. It becomes visible when nothing is selected yet — and,
19
31
  * unlike before, that auto-pick NOTIFIES, so a bound switcher highlights the
@@ -22,7 +34,7 @@ export declare class AdwViewStack extends GridLayout {
22
34
  */
23
35
  add(content: View, name: string, title?: string, icon?: string): AdwViewStackPage;
24
36
  /** Convenience alias matching `Adw.ViewStack.add_titled`. */
25
- addTitled(content: View, name: string, title: string): AdwViewStackPage;
37
+ add_titled(content: View, name: string, title: string): AdwViewStackPage;
26
38
  /**
27
39
  * Remove the first page named `name` and detach its content view. Returns
28
40
  * whether anything was removed. When the removed page was the visible one the
@@ -39,9 +51,30 @@ export declare class AdwViewStack extends GridLayout {
39
51
  setPageVisible(name: string, visible: boolean): boolean;
40
52
  /** All registered pages, in add order (a bound switcher reads this). */
41
53
  get pages(): readonly AdwViewStackPage[];
42
- /** The visible page index, `-1` when nothing is selected. Swaps the visible page + emits. */
54
+ /**
55
+ * The visible page's position, `-1` when nothing is selected.
56
+ *
57
+ * A REPORT, NOT A DOOR (ADR 0048). `Adw.ViewStack` selects by NAME, and an ordinal
58
+ * is derived: an insertion before the visible page increments it, a reorder rewrites
59
+ * it and a removal decrements it — the three cases `ViewStackState` carries code for.
60
+ * So it is safe to read at a moment and unsafe to hold, and selecting is
61
+ * {@link visibleChildName}.
62
+ */
43
63
  get visibleChildIndex(): number;
44
- set visibleChildIndex(raw: number | string);
64
+ /**
65
+ * Show the page at position `n`. Returns whether the selection moved.
66
+ *
67
+ * THE ORDINAL IS A CALL, NOT A PROPERTY (ADR 0048). It resolves against the page list
68
+ * as it is at THIS moment and keeps nothing, which is the whole difference from the
69
+ * setter it replaces: a held index silently comes to mean another page after an
70
+ * insert, a reorder or a removal. Port-owned — measured, `refs/libadwaita` gives
71
+ * `AdwViewStack` no ordinal API at all — and named for the `selectNthPage` the tab
72
+ * view already has, so the two widgets ask the same question the same way.
73
+ *
74
+ * A non-integer or out-of-range `n` selects nothing; the guard is the core's
75
+ * ({@link ViewStackState.setVisibleIndex}) and is pinned by the shared vectors.
76
+ */
77
+ selectNthPage(n: number): boolean;
45
78
  /** The visible page name (`Adw.ViewStack.visible-child-name`), `''` for none. */
46
79
  get visibleChildName(): string;
47
80
  set visibleChildName(name: string | null | undefined);
@@ -1,15 +1,27 @@
1
1
  import { GridLayout } from '@nativescript/core';
2
2
  import type { AdwViewStack } from './adw-view-stack.js';
3
- export declare class AdwViewSwitcherBar extends GridLayout {
3
+ import { type ConstructProps } from './construct-props.js';
4
+ declare const AdwViewSwitcherBar_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 AdwViewSwitcherBar extends AdwViewSwitcherBar_base {
4
16
  /** The horizontal (homogeneous) row of buttons. */
5
17
  private readonly _bar;
6
18
  private _nodes;
7
19
  private _stack;
8
20
  private _stackListener;
9
21
  private readonly _barState;
10
- constructor();
22
+ constructor(props?: ConstructProps<AdwViewSwitcherBar>);
11
23
  /** Bind to an {@link AdwViewStack}: build buttons from its pages + two-way sync. */
12
- setStack(stack: AdwViewStack | null): void;
24
+ set_stack(stack: AdwViewStack | null): void;
13
25
  /** The bound stack (`Adw.ViewSwitcherBar.stack`). */
14
26
  get stack(): AdwViewStack | null;
15
27
  set stack(value: AdwViewStack | null);
@@ -39,3 +51,4 @@ export declare class AdwViewSwitcherBar extends GridLayout {
39
51
  private _buildButton;
40
52
  private _applyRevealed;
41
53
  }
54
+ export {};
@@ -1,6 +1,7 @@
1
1
  import { AdwViewSwitcherBase } from './view-switcher-base.js';
2
+ import { type ConstructProps } from './construct-props.js';
2
3
  export declare class AdwViewSwitcher extends AdwViewSwitcherBase {
3
- constructor();
4
+ constructor(props?: ConstructProps<AdwViewSwitcher>);
4
5
  protected get barClass(): string;
5
6
  protected get buttonClass(): string;
6
7
  }
@@ -1,16 +1,28 @@
1
- import { Label, StackLayout } from '@nativescript/core';
1
+ import { Label, StackLayout, type EventData } from '@nativescript/core';
2
+ import { type ConstructProps } from './construct-props.js';
2
3
  /** Event name emitted when {@link AdwWindowTitle.title} changes. */
3
4
  export declare const NOTIFY_TITLE = "notify::title";
4
5
  /** Event name emitted when {@link AdwWindowTitle.subtitle} changes. */
5
6
  export declare const NOTIFY_SUBTITLE = "notify::subtitle";
6
- export declare class AdwWindowTitle extends StackLayout {
7
+ declare const AdwWindowTitle_base: (abstract new (...args: any[]) => {
8
+ connect(eventName: string, callback: (self: /*elided*/ any, data: EventData) => void): number;
9
+ disconnect(handlerId: number): void;
10
+ _emit(eventName: string): void;
11
+ addEventListener(eventName: string, callback: (data: EventData) => void, thisArg?: unknown, once?: boolean): void;
12
+ removeEventListener(eventName: string, callback?: (data: EventData) => void, thisArg?: unknown): void;
13
+ notify<T extends EventData>(data: T): void;
14
+ notifyPropertyChange(name: string, value: unknown, oldValue?: unknown): void;
15
+ set(name: string, value: unknown): void;
16
+ get(name: string): unknown;
17
+ }) & typeof StackLayout;
18
+ export declare class AdwWindowTitle extends AdwWindowTitle_base {
7
19
  /** The bold title label. */
8
20
  protected readonly _titleLabel: Label;
9
21
  /** The dim subtitle label. */
10
22
  protected readonly _subtitleLabel: Label;
11
23
  /** The headless title/subtitle pair + change detection (ADR 0004). */
12
24
  private readonly _state;
13
- constructor();
25
+ constructor(props?: ConstructProps<AdwWindowTitle>);
14
26
  /** The window title (bold, top line). Empty collapses its label. */
15
27
  get title(): string;
16
28
  set title(value: string);
@@ -21,3 +33,4 @@ export declare class AdwWindowTitle extends StackLayout {
21
33
  private _apply;
22
34
  private _notify;
23
35
  }
36
+ export {};
@@ -1,8 +1,20 @@
1
1
  import { FlexboxLayout, type View } from '@nativescript/core';
2
2
  import { type AdwLengthUnit, type AdwWrapBoxJustify, type AdwWrapBoxOrientation, type AdwWrapBoxPackDirection, type AdwWrapPolicy } from '@gjsify/adwaita-core';
3
+ import { type ConstructProps } from './construct-props.js';
3
4
  /** Every `notify::` an `Adw.WrapBox` emits (adw-wrap-box.c:284-497). */
4
5
  export type AdwWrapBoxProperty = 'child-spacing' | 'child-spacing-unit' | 'pack-direction' | 'align' | 'justify' | 'justify-last-line' | 'line-spacing' | 'line-spacing-unit' | 'line-homogeneous' | 'natural-line-length' | 'natural-line-length-unit' | 'wrap-reverse' | 'wrap-policy' | 'orientation';
5
- export declare class AdwWrapBox extends FlexboxLayout {
6
+ declare const AdwWrapBox_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 FlexboxLayout;
17
+ export declare class AdwWrapBox extends AdwWrapBox_base {
6
18
  private _childSpacing;
7
19
  private _lineSpacing;
8
20
  private _childSpacingUnit;
@@ -17,17 +29,17 @@ export declare class AdwWrapBox extends FlexboxLayout {
17
29
  private _orientation;
18
30
  private _naturalLineLength;
19
31
  private _naturalLineLengthUnit;
20
- constructor();
32
+ constructor(props?: ConstructProps<AdwWrapBox>);
21
33
  /** Append a child — `adw_wrap_box_append` (adw-wrap-box.c:1344-1352). */
22
- add(view: View): void;
34
+ append(view: View): void;
23
35
  /** Remove a previously-added child — `adw_wrap_box_remove` (:1387-1395). */
24
36
  remove(view: View): void;
25
37
  /** `adw_wrap_box_remove_all` (:1406-1414). */
26
- removeAll(): void;
38
+ remove_all(): void;
27
39
  /**
28
- * Every path a child can enter by — `add()`, a direct `addChild()`, and XML
40
+ * Every path a child can enter by — `append()`, a direct `addChild()`, and XML
29
41
  * inflation via `_addChildFromBuilder` — ends here, which is why the spacing
30
- * is applied here and not in `add()`. It used to be applied in `add()` only,
42
+ * is applied here and not in `append()`. It used to be applied in `append()` only,
31
43
  * so a child declared in markup got no spacing at all; C routes GtkBuildable's
32
44
  * `add_child` through the same append for the same reason.
33
45
  */
@@ -40,9 +52,9 @@ export declare class AdwWrapBox extends FlexboxLayout {
40
52
  * `WRAP_BOX_CHILD_ORDER_VECTORS`. Returns whether the insert happened; a
41
53
  * refusal is where C would have hit a `g_return_if_fail`.
42
54
  */
43
- insertChildAfter(view: View, sibling?: View | null): boolean;
55
+ insert_child_after(view: View, sibling?: View | null): boolean;
44
56
  /** `adw_wrap_box_reorder_child_after` (:1315-1332). Same NULL rule. */
45
- reorderChildAfter(view: View, sibling?: View | null): boolean;
57
+ reorder_child_after(view: View, sibling?: View | null): boolean;
46
58
  private _childViews;
47
59
  private _applyOrder;
48
60
  /** Gap between items in a line, in {@link childSpacingUnit}. Defaults to 0, as in C. */
@@ -101,3 +113,4 @@ export declare class AdwWrapBox extends FlexboxLayout {
101
113
  private _applyLayout;
102
114
  private _applyChildren;
103
115
  }
116
+ export {};