@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.
Files changed (155) hide show
  1. package/lib/esm/_virtual/_rolldown/runtime.js +1 -1
  2. package/lib/esm/index.js +1 -1
  3. package/lib/esm/namespace/adw.js +1 -0
  4. package/lib/esm/namespace/gtk.js +1 -0
  5. package/lib/esm/widgets/adw-about-dialog.js +1 -1
  6. package/lib/esm/widgets/adw-action-row.js +1 -1
  7. package/lib/esm/widgets/adw-alert-dialog.js +1 -1
  8. package/lib/esm/widgets/adw-avatar.js +1 -1
  9. package/lib/esm/widgets/adw-banner.js +1 -1
  10. package/lib/esm/widgets/adw-bottom-sheet.js +1 -1
  11. package/lib/esm/widgets/adw-button-content.js +1 -1
  12. package/lib/esm/widgets/adw-button-row.js +1 -1
  13. package/lib/esm/widgets/adw-carousel.js +1 -1
  14. package/lib/esm/widgets/adw-clamp.js +1 -1
  15. package/lib/esm/widgets/adw-combo-row.js +1 -1
  16. package/lib/esm/widgets/adw-data-grid.js +1 -1
  17. package/lib/esm/widgets/adw-entry-row.js +1 -1
  18. package/lib/esm/widgets/adw-expander-row.js +1 -1
  19. package/lib/esm/widgets/adw-header-bar.js +1 -1
  20. package/lib/esm/widgets/adw-image-button.js +1 -1
  21. package/lib/esm/widgets/adw-inline-view-switcher.js +1 -1
  22. package/lib/esm/widgets/adw-navigation-split-view.js +1 -1
  23. package/lib/esm/widgets/adw-navigation-view.js +1 -1
  24. package/lib/esm/widgets/adw-overlay-split-view.js +1 -1
  25. package/lib/esm/widgets/adw-password-entry-row.js +1 -1
  26. package/lib/esm/widgets/adw-preferences-dialog.js +1 -1
  27. package/lib/esm/widgets/adw-preferences-group.js +1 -1
  28. package/lib/esm/widgets/adw-preferences-page.js +1 -1
  29. package/lib/esm/widgets/adw-shortcut-label.js +1 -1
  30. package/lib/esm/widgets/adw-sidebar.js +1 -1
  31. package/lib/esm/widgets/adw-slider-row.js +1 -1
  32. package/lib/esm/widgets/adw-spin-row.js +1 -1
  33. package/lib/esm/widgets/adw-spinner.js +1 -1
  34. package/lib/esm/widgets/adw-split-button.js +1 -1
  35. package/lib/esm/widgets/adw-status-page.js +1 -1
  36. package/lib/esm/widgets/adw-switch-row.js +1 -1
  37. package/lib/esm/widgets/adw-tab-view.js +1 -1
  38. package/lib/esm/widgets/adw-toast-overlay.js +1 -1
  39. package/lib/esm/widgets/adw-toggle-group.js +1 -1
  40. package/lib/esm/widgets/adw-toolbar-view.js +1 -1
  41. package/lib/esm/widgets/adw-view-stack.js +1 -1
  42. package/lib/esm/widgets/adw-view-switcher-bar.js +1 -1
  43. package/lib/esm/widgets/adw-view-switcher.js +1 -1
  44. package/lib/esm/widgets/adw-window-title.js +1 -1
  45. package/lib/esm/widgets/adw-wrap-box.js +1 -1
  46. package/lib/esm/widgets/avatar-view.js +1 -0
  47. package/lib/esm/widgets/box-layout.js +1 -0
  48. package/lib/esm/widgets/button-content.js +1 -1
  49. package/lib/esm/widgets/button-slot.js +1 -0
  50. package/lib/esm/widgets/construct-props.js +1 -0
  51. package/lib/esm/widgets/entry-row-view.js +1 -1
  52. package/lib/esm/widgets/gtk-align.js +1 -0
  53. package/lib/esm/widgets/gtk-box.js +1 -0
  54. package/lib/esm/widgets/gtk-button.js +1 -1
  55. package/lib/esm/widgets/gtk-drop-down.js +1 -1
  56. package/lib/esm/widgets/gtk-entry.js +1 -1
  57. package/lib/esm/widgets/gtk-image.js +1 -0
  58. package/lib/esm/widgets/gtk-label.js +1 -0
  59. package/lib/esm/widgets/gtk-menu-button.js +1 -1
  60. package/lib/esm/widgets/icon-theme.js +1 -0
  61. package/lib/esm/widgets/index.js +1 -1
  62. package/lib/esm/widgets/label-text.js +1 -0
  63. package/lib/esm/widgets/menu-sheet.js +1 -0
  64. package/lib/esm/widgets/signals.js +1 -0
  65. package/lib/esm/widgets/split-button.js +1 -1
  66. package/lib/esm/widgets/split-view-base.js +1 -1
  67. package/lib/esm/widgets/style-classes.js +1 -0
  68. package/lib/esm/widgets/view-switcher-base.js +1 -1
  69. package/lib/esm/widgets/view-switcher-model.js +1 -1
  70. package/lib/types/avatar.spec.d.ts +2 -0
  71. package/lib/types/box-layout.spec.d.ts +2 -0
  72. package/lib/types/button-slot.spec.d.ts +2 -0
  73. package/lib/types/construct-props.spec.d.ts +2 -0
  74. package/lib/types/icon-theme.spec.d.ts +2 -0
  75. package/lib/types/index.d.ts +4 -3
  76. package/lib/types/label-text.spec.d.ts +2 -0
  77. package/lib/types/namespace/adw.d.ts +38 -0
  78. package/lib/types/namespace/gtk.d.ts +7 -0
  79. package/lib/types/signals.spec.d.ts +2 -0
  80. package/lib/types/style-classes.spec.d.ts +2 -0
  81. package/lib/types/widgets/adw-about-dialog.d.ts +16 -3
  82. package/lib/types/widgets/adw-action-row.d.ts +38 -10
  83. package/lib/types/widgets/adw-alert-dialog.d.ts +30 -13
  84. package/lib/types/widgets/adw-avatar.d.ts +49 -3
  85. package/lib/types/widgets/adw-banner.d.ts +16 -3
  86. package/lib/types/widgets/adw-bottom-sheet.d.ts +32 -16
  87. package/lib/types/widgets/adw-button-content.d.ts +20 -6
  88. package/lib/types/widgets/adw-button-row.d.ts +10 -7
  89. package/lib/types/widgets/adw-carousel.d.ts +19 -7
  90. package/lib/types/widgets/adw-clamp.d.ts +17 -5
  91. package/lib/types/widgets/adw-combo-row.d.ts +8 -7
  92. package/lib/types/widgets/adw-data-grid.d.ts +17 -4
  93. package/lib/types/widgets/adw-entry-row.d.ts +16 -14
  94. package/lib/types/widgets/adw-expander-row.d.ts +21 -10
  95. package/lib/types/widgets/adw-header-bar.d.ts +39 -14
  96. package/lib/types/widgets/adw-image-button.d.ts +22 -5
  97. package/lib/types/widgets/adw-inline-view-switcher.d.ts +2 -1
  98. package/lib/types/widgets/adw-navigation-split-view.d.ts +2 -1
  99. package/lib/types/widgets/adw-navigation-view.d.ts +40 -21
  100. package/lib/types/widgets/adw-overlay-split-view.d.ts +3 -2
  101. package/lib/types/widgets/adw-password-entry-row.d.ts +2 -1
  102. package/lib/types/widgets/adw-preferences-dialog.d.ts +16 -3
  103. package/lib/types/widgets/adw-preferences-group.d.ts +19 -6
  104. package/lib/types/widgets/adw-preferences-page.d.ts +37 -8
  105. package/lib/types/widgets/adw-shortcut-label.d.ts +15 -2
  106. package/lib/types/widgets/adw-sidebar.d.ts +15 -2
  107. package/lib/types/widgets/adw-slider-row.d.ts +30 -19
  108. package/lib/types/widgets/adw-spin-row.d.ts +18 -14
  109. package/lib/types/widgets/adw-spinner.d.ts +14 -2
  110. package/lib/types/widgets/adw-split-button.d.ts +60 -12
  111. package/lib/types/widgets/adw-status-page.d.ts +22 -8
  112. package/lib/types/widgets/adw-switch-row.d.ts +2 -1
  113. package/lib/types/widgets/adw-tab-view.d.ts +34 -8
  114. package/lib/types/widgets/adw-toast-overlay.d.ts +19 -7
  115. package/lib/types/widgets/adw-toggle-group.d.ts +14 -2
  116. package/lib/types/widgets/adw-toolbar-view.d.ts +21 -8
  117. package/lib/types/widgets/adw-view-stack.d.ts +38 -5
  118. package/lib/types/widgets/adw-view-switcher-bar.d.ts +16 -3
  119. package/lib/types/widgets/adw-view-switcher.d.ts +2 -1
  120. package/lib/types/widgets/adw-window-title.d.ts +16 -3
  121. package/lib/types/widgets/adw-wrap-box.d.ts +21 -8
  122. package/lib/types/widgets/avatar-view.d.ts +57 -0
  123. package/lib/types/widgets/bottom-sheet-state.d.ts +1 -1
  124. package/lib/types/widgets/box-layout.d.ts +39 -0
  125. package/lib/types/widgets/button-content.d.ts +4 -4
  126. package/lib/types/widgets/button-slot.d.ts +16 -0
  127. package/lib/types/widgets/construct-props.d.ts +82 -0
  128. package/lib/types/widgets/entry-row-view.d.ts +9 -8
  129. package/lib/types/widgets/gtk-align.d.ts +59 -0
  130. package/lib/types/widgets/gtk-box.d.ts +75 -0
  131. package/lib/types/widgets/gtk-button.d.ts +110 -28
  132. package/lib/types/widgets/gtk-drop-down.d.ts +21 -8
  133. package/lib/types/widgets/gtk-entry.d.ts +15 -2
  134. package/lib/types/widgets/gtk-image.d.ts +42 -0
  135. package/lib/types/widgets/gtk-label.d.ts +82 -0
  136. package/lib/types/widgets/gtk-menu-button.d.ts +29 -18
  137. package/lib/types/widgets/icon-theme.d.ts +77 -0
  138. package/lib/types/widgets/icons.d.ts +3 -1
  139. package/lib/types/widgets/index.d.ts +18 -5
  140. package/lib/types/widgets/label-text.d.ts +13 -0
  141. package/lib/types/widgets/menu-sheet.d.ts +58 -0
  142. package/lib/types/widgets/row-state.d.ts +1 -1
  143. package/lib/types/widgets/signals.d.ts +40 -0
  144. package/lib/types/widgets/split-button.d.ts +2 -21
  145. package/lib/types/widgets/split-view-base.d.ts +18 -6
  146. package/lib/types/widgets/status-page-content.d.ts +1 -1
  147. package/lib/types/widgets/style-classes.d.ts +61 -0
  148. package/lib/types/widgets/view-switcher-base.d.ts +12 -1
  149. package/lib/types/widgets/view-switcher-model.d.ts +3 -12
  150. package/package.json +14 -10
  151. package/src/theme/adwaita.css +66 -8
  152. package/lib/esm/namespace.js +0 -1
  153. package/lib/esm/widgets/adw-icon.js +0 -1
  154. package/lib/types/namespace.d.ts +0 -92
  155. package/lib/types/widgets/adw-icon.d.ts +0 -25
@@ -1,14 +1,42 @@
1
1
  import type { View } from '@nativescript/core';
2
2
  import { ScrollView, StackLayout } from '@nativescript/core';
3
3
  import type { NsSearchableGroup, NsSearchablePage } from './preferences-search.js';
4
- export declare class AdwPreferencesPage extends ScrollView implements NsSearchablePage {
5
- /** The vertical stack that actually holds the groups. */
6
- protected readonly _content: StackLayout;
4
+ import { type ConstructProps } from './construct-props.js';
5
+ declare const AdwPreferencesPage_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 ScrollView;
16
+ export declare class AdwPreferencesPage extends AdwPreferencesPage_base implements NsSearchablePage {
17
+ /**
18
+ * The vertical stack that actually holds the groups.
19
+ *
20
+ * NOT `_content`, which is what it was called first. `ContentView` — in this
21
+ * class's chain via `ScrollView` — uses `this._content` as the backing store for
22
+ * its own `content` accessor (`ui/content-view/index.js:12,15-21`). Sharing that
23
+ * name does not shadow the field, it IS the field: `readonly` becomes a
24
+ * compile-time fiction, because `set content` writes it, so any `page.content = x`
25
+ * silently re-points this handle and `add`/`searchGroups`/`groups` then work
26
+ * on the wrong view. No type-checker can catch it — `_content` appears in no
27
+ * `.d.ts` of `@nativescript/core`, only in the compiled JS.
28
+ *
29
+ * Five sibling widgets keep `_content` safely, because their chain runs
30
+ * `GridLayout → LayoutBase → CustomLayoutView` and never reaches `ContentView`.
31
+ * This class and `AdwSidebar` (which calls its stack `_list`) are the two on
32
+ * `ScrollView`, and so the two where the name is taken.
33
+ */
34
+ protected readonly _groups: StackLayout;
7
35
  private _title;
8
36
  private _name;
9
37
  private _iconName;
10
38
  private _useUnderline;
11
- constructor();
39
+ constructor(props?: ConstructProps<AdwPreferencesPage>);
12
40
  /**
13
41
  * `AdwPreferencesPage:title` — shown by a view switcher and by the search
14
42
  * results, never by the page itself. `null` is the empty string
@@ -28,10 +56,10 @@ export declare class AdwPreferencesPage extends ScrollView implements NsSearchab
28
56
  */
29
57
  get useUnderline(): boolean;
30
58
  set useUnderline(value: boolean | string);
31
- /** Append a preferences group (or any view) to the page. */
32
- addGroup(view: View): void;
33
- /** Remove a previously-added group from the page. */
34
- removeGroup(view: View): void;
59
+ /** Append a preferences group (or any view) to the page — `adw_preferences_page_add`. */
60
+ add(view: View): void;
61
+ /** Remove a previously-added group from the page — `adw_preferences_page_remove`. */
62
+ remove(view: View): void;
35
63
  /**
36
64
  * An XML child is a GROUP. `ScrollView`'s inherited `_addChildFromBuilder` sets
37
65
  * `content`, which would REPLACE the page's own scroll body — one group in place
@@ -48,3 +76,4 @@ export declare class AdwPreferencesPage extends ScrollView implements NsSearchab
48
76
  /** The vertical content stack holding the groups. */
49
77
  get groups(): StackLayout;
50
78
  }
79
+ export {};
@@ -1,8 +1,20 @@
1
1
  import { StackLayout } from '@nativescript/core';
2
- export declare class AdwShortcutLabel extends StackLayout {
2
+ import { type ConstructProps } from './construct-props.js';
3
+ declare const AdwShortcutLabel_base: (abstract new (...args: any[]) => {
4
+ connect(eventName: string, callback: (self: /*elided*/ any, data: import("@nativescript/core").EventData) => void): number;
5
+ disconnect(handlerId: number): void;
6
+ _emit(eventName: string): void;
7
+ addEventListener(eventName: string, callback: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown, once?: boolean): void;
8
+ removeEventListener(eventName: string, callback?: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown): void;
9
+ notify<T extends import("@nativescript/core").EventData>(data: T): void;
10
+ notifyPropertyChange(name: string, value: unknown, oldValue?: unknown): void;
11
+ set(name: string, value: unknown): void;
12
+ get(name: string): unknown;
13
+ }) & typeof StackLayout;
14
+ export declare class AdwShortcutLabel extends AdwShortcutLabel_base {
3
15
  private _accelerator;
4
16
  private _disabledText;
5
- constructor();
17
+ constructor(props?: ConstructProps<AdwShortcutLabel>);
6
18
  /** The accelerator to draw, in `gtk_accelerator_parse` syntax (`<Control>C`). */
7
19
  get accelerator(): string;
8
20
  set accelerator(value: string);
@@ -11,3 +23,4 @@ export declare class AdwShortcutLabel extends StackLayout {
11
23
  set disabledText(value: string);
12
24
  private _rebuild;
13
25
  }
26
+ export {};
@@ -1,5 +1,6 @@
1
1
  import { ScrollView, StackLayout, type EventData } from '@nativescript/core';
2
2
  import type { AdwSidebarItemSpec, AdwSidebarSectionSpec, SidebarItemFilter } from './sidebar-model.js';
3
+ import { type ConstructProps } from './construct-props.js';
3
4
  /** Event name emitted when {@link AdwSidebar.selected} changes. Mirrors GObject `notify::selected`. */
4
5
  export declare const NOTIFY_SELECTED = "notify::selected";
5
6
  /**
@@ -25,12 +26,23 @@ export interface SidebarActivatedEventData extends EventData {
25
26
  /** The activated item's label. */
26
27
  title: string;
27
28
  }
28
- export declare class AdwSidebar extends ScrollView {
29
+ declare const AdwSidebar_base: (abstract new (...args: any[]) => {
30
+ connect(eventName: string, callback: (self: /*elided*/ any, data: EventData) => void): number;
31
+ disconnect(handlerId: number): void;
32
+ _emit(eventName: string): void;
33
+ addEventListener(eventName: string, callback: (data: EventData) => void, thisArg?: unknown, once?: boolean): void;
34
+ removeEventListener(eventName: string, callback?: (data: EventData) => void, thisArg?: unknown): void;
35
+ notify<T extends EventData>(data: T): void;
36
+ notifyPropertyChange(name: string, value: unknown, oldValue?: unknown): void;
37
+ set(name: string, value: unknown): void;
38
+ get(name: string): unknown;
39
+ }) & typeof ScrollView;
40
+ export declare class AdwSidebar extends AdwSidebar_base {
29
41
  /** The vertical list container. */
30
42
  protected readonly _list: StackLayout;
31
43
  private readonly _state;
32
44
  private readonly _rows;
33
- constructor();
45
+ constructor(props?: ConstructProps<AdwSidebar>);
34
46
  /** Set the navigation item labels — one untitled section. Rebuilds the tappable rows. */
35
47
  setItems(items: string[]): void;
36
48
  /** Set the full section model (titles, subtitles, icons, per-item `visible`/`enabled`). */
@@ -67,3 +79,4 @@ export declare class AdwSidebar extends ScrollView {
67
79
  /** Whether the FILTERED row list is empty — the `.empty` / placeholder state. */
68
80
  get isEmpty(): boolean;
69
81
  }
82
+ export {};
@@ -1,44 +1,55 @@
1
1
  import { Label, Slider, StackLayout, type EventData } from '@nativescript/core';
2
+ import type { AdwAdjustment, AdwAdjustmentInput } from '@gjsify/adwaita-core';
3
+ import { type ConstructProps } from './construct-props.js';
2
4
  /** Event name emitted when {@link AdwSliderRow.value} changes. Mirrors GObject `notify::value`. */
3
5
  export declare const NOTIFY_SLIDER_VALUE = "notify::value";
4
6
  /** Payload of the `notify::value` event. */
5
7
  export interface NotifySliderValueEventData extends EventData {
6
- /** The new numeric value (already clamped to `[min, max]` and snapped to `step`). */
8
+ /** The new numeric value (already clamped into the adjustment's range and snapped to a tick). */
7
9
  value: number;
8
10
  }
9
- 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 {
10
23
  /** The title label (header, left). */
11
24
  protected readonly _titleLabel: Label;
12
25
  /** The live value label (header, right, dim). */
13
26
  protected readonly _valueLabel: Label;
14
27
  /** The horizontal slider. */
15
28
  protected readonly _slider: Slider;
16
- private _value;
17
- private _min;
18
- private _max;
19
- private _step;
29
+ /** The headless adjustment: clamp, step and the two signals (ADR 0004, ADR 0047). */
30
+ private readonly _state;
20
31
  /** Guards the slider's `valueChange` while we programmatically set its value. */
21
32
  private _suppress;
22
- constructor();
23
- /** Clamp to `[min, max]` then snap to the nearest `step` from `min`. */
24
- private _snap;
33
+ constructor(props?: ConstructProps<AdwSliderRow>);
25
34
  /** Push the current value to the slider + label without emitting. */
26
35
  private _sync;
27
36
  /** The group title shown in the header (left). */
28
37
  get title(): string;
29
38
  set title(value: string);
30
- /** The current numeric value (always within `[min, max]`, snapped to `step`). */
39
+ /** The current numeric value (always within the adjustment's range, snapped to a tick). */
31
40
  get value(): number;
32
41
  set value(raw: number | string);
33
- /** Lower bound. Re-clamps the current value if it now falls below. */
34
- get min(): number;
35
- set min(raw: number | string);
36
- /** Upper bound. Re-clamps the current value if it now falls above. */
37
- get max(): number;
38
- set max(raw: number | string);
39
- /** Snap granularity applied as the slider is dragged. */
40
- get step(): number;
41
- set step(raw: number | string);
42
+ /**
43
+ * The numeric range this row slides through — the `Gtk.Adjustment` a `Gtk.Scale` is
44
+ * handed, under the same key the spin row uses.
45
+ *
46
+ * Reads back whole; writes MERGE, so `adjustment = { upper: 20 }` moves one bound and
47
+ * leaves the rest. From XML it is a JSON object —
48
+ * `adjustment='{"lower":0,"upper":20,"stepIncrement":5}'`.
49
+ */
50
+ get adjustment(): AdwAdjustment;
51
+ set adjustment(v: AdwAdjustmentInput | string);
42
52
  /** The underlying {@link Slider} (e.g. to tweak styling). */
43
53
  get slider(): Slider;
44
54
  }
55
+ export {};
@@ -1,14 +1,16 @@
1
1
  import { Label } from '@nativescript/core';
2
2
  import type { EventData } from '@nativescript/core';
3
+ import type { AdwAdjustment, AdwAdjustmentInput } from '@gjsify/adwaita-core';
3
4
  import { AdwActionRow } from './adw-action-row.js';
4
5
  import { AdwImageButton } from './adw-image-button.js';
6
+ import { type ConstructProps } from './construct-props.js';
5
7
  export { SpinState } from '@gjsify/adwaita-core';
6
- export type { SpinStateChange, SpinStateListener } from '@gjsify/adwaita-core';
8
+ export type { AdwAdjustment, AdwAdjustmentInput, SpinStateChange, SpinStateListener } from '@gjsify/adwaita-core';
7
9
  /** Event name emitted when {@link AdwSpinRow.value} changes. Mirrors GObject `notify::value`. */
8
10
  export declare const NOTIFY_VALUE = "notify::value";
9
11
  /** Payload of the `notify::value` event. */
10
12
  export interface NotifyValueEventData extends EventData {
11
- /** The new numeric value (already clamped to `[min, max]`). */
13
+ /** The new numeric value (already clamped into the adjustment's range). */
12
14
  value: number;
13
15
  }
14
16
  export declare class AdwSpinRow extends AdwActionRow {
@@ -18,19 +20,21 @@ export declare class AdwSpinRow extends AdwActionRow {
18
20
  protected readonly _plusButton: AdwImageButton;
19
21
  /** The value display before the stepper buttons. */
20
22
  protected readonly _valueLabel: Label;
21
- /** The headless value/min/max/step clamp-and-step state machine (ADR 0004). */
23
+ /** The headless adjustment: clamp, step and the two signals (ADR 0004, ADR 0047). */
22
24
  private readonly _state;
23
- constructor();
24
- /** The current numeric value (always within `[min, max]`). */
25
+ constructor(props?: ConstructProps<AdwSpinRow>);
26
+ /** The current numeric value (always within the adjustment's range). */
25
27
  get value(): number;
26
28
  set value(v: number | string);
27
- /** Lower bound. Re-clamps the current value if it now falls below. */
28
- get min(): number;
29
- set min(v: number | string);
30
- /** Upper bound. Re-clamps the current value if it now falls above. */
31
- get max(): number;
32
- set max(v: number | string);
33
- /** Increment/decrement step applied per button press. */
34
- get step(): number;
35
- set step(v: number | string);
29
+ /**
30
+ * The numeric range this row steps through — `Adw.SpinRow:adjustment`.
31
+ *
32
+ * Reads back whole; writes MERGE, so `adjustment = { upper: 20 }` moves one bound and
33
+ * leaves the rest, the value included (re-clamped if the move came under it). From XML
34
+ * it is a JSON object — `adjustment='{"lower":1,"upper":20}'` — which is why the setter
35
+ * takes a string: NativeScript's XML builder assigns attributes verbatim, so a
36
+ * non-string property needs its own door (see `xml-values.ts`).
37
+ */
38
+ get adjustment(): AdwAdjustment;
39
+ set adjustment(v: AdwAdjustmentInput | string);
36
40
  }
@@ -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
- import type { AdwMenuEntry, SplitButtonDirection } from '@gjsify/adwaita-core';
3
- import { AdwIcon } from './adw-icon.js';
2
+ import type { AdwMenuActions, AdwMenuInput, AdwMenuModel, SplitButtonDirection } from '@gjsify/adwaita-core';
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. */
@@ -9,23 +10,41 @@ export declare const MENU_TAPPED = "menuTapped";
9
10
  export interface MenuTappedEventData extends EventData {
10
11
  /** The chosen menu item label. */
11
12
  item: string;
12
- /** The chosen item's index in {@link AdwSplitButton.menu} — its GMenuModel POSITION. */
13
- index: number;
14
- /** The chosen item's detailed action name, when the entry carried one. */
13
+ /** The chosen item's id, falling back to its label. */
14
+ id: string;
15
+ /**
16
+ * Where the item sits in {@link AdwSplitButton.menuModel} — its `GMenuModel`
17
+ * POSITION, as a PATH since ADR 0042: a submenu is a model of its own, so `[2, 0]`
18
+ * is the first item of the third entry and a flat index cannot name it.
19
+ */
20
+ path: readonly number[];
21
+ /** The chosen item's detailed action name, when the item carried one. */
15
22
  action?: string;
16
23
  }
17
- 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 {
18
36
  /** The main action part (column 0). */
19
37
  protected readonly _actionPart: StackLayout;
20
38
  /** The action label (shown in label mode). */
21
39
  protected readonly _actionLabel: Label;
22
40
  /** The action symbolic icon (shown in icon mode). */
23
- protected readonly _actionIcon: AdwIcon;
41
+ protected readonly _actionIcon: GtkImage;
24
42
  /** The dropdown-arrow part (column 1). */
25
43
  protected readonly _dropdownPart: GridLayout;
26
44
  /** The direction arrow. */
27
- protected readonly _chevron: AdwIcon;
45
+ protected readonly _chevron: GtkImage;
28
46
  private readonly _state;
47
+ private _actions;
29
48
  /** Which of the two action views is currently parented. */
30
49
  private _showingIcon;
31
50
  /**
@@ -38,7 +57,7 @@ export declare class AdwSplitButton extends GridLayout {
38
57
  * state to contradict it. One polarity, so there is nothing to forget.
39
58
  */
40
59
  private _sensitive;
41
- constructor();
60
+ constructor(props?: ConstructProps<AdwSplitButton>);
42
61
  /**
43
62
  * Present the dropdown menu and dispatch the choice BY POSITION.
44
63
  *
@@ -64,9 +83,37 @@ export declare class AdwSplitButton extends GridLayout {
64
83
  */
65
84
  get iconName(): string;
66
85
  set iconName(svg: string);
67
- /** The dropdown menu entries (opened as a native `action()` sheet on arrow tap). */
68
- get menu(): readonly AdwMenuEntry[];
69
- set menu(value: readonly (string | AdwMenuEntry)[]);
86
+ /**
87
+ * The dropdown menu, normalised (ADR 0042) — opened as a native `action()` sheet on
88
+ * an arrow tap.
89
+ *
90
+ * Accepts everything the portable model does, INCLUDING the bare `string[]` this
91
+ * widget used to be alone in taking: that shorthand is now one of the model's own
92
+ * input forms rather than a NativeScript-only shape, so the same value works on
93
+ * every surface.
94
+ *
95
+ * IT DOES NOT TAKE A JSON STRING, which the browser element's `menu-model`
96
+ * ATTRIBUTE does. Not an oversight: NativeScript's Builder writes an XML attribute
97
+ * straight onto the property, so accepting one here would open the XML door — and
98
+ * the gallery probe that would have to prove it compares a read-back by IDENTITY
99
+ * (`gallery-page.ts`), which no structured value can satisfy. An input form nothing
100
+ * can run is a claim, not a feature.
101
+ *
102
+ * AND IT SAYS SO. Left to `normalizeMenuModel`, a string is "not an array" and
103
+ * becomes an EMPTY menu — so an XML author writing `menuModel="[…]"` would get a
104
+ * button whose dropdown is dead, with nothing anywhere saying why. A shut door that
105
+ * is silent is worse than one that is open.
106
+ */
107
+ get menuModel(): AdwMenuModel;
108
+ set menuModel(value: AdwMenuInput);
109
+ /**
110
+ * What the action group publishes about the actions this menu names — the portable
111
+ * stand-in for a `GActionGroup`, and the only source of a menu's enabled/checked
112
+ * state (ADR 0042). A sheet has no disabled row, so an insensitive item is not
113
+ * offered; a checked one wears a tick.
114
+ */
115
+ get actions(): AdwMenuActions | null;
116
+ set actions(value: AdwMenuActions | null);
70
117
  /** The direction the arrow points (and, on GTK, the popup opens). */
71
118
  get direction(): SplitButtonDirection;
72
119
  set direction(value: SplitButtonDirection);
@@ -93,3 +140,4 @@ export declare class AdwSplitButton extends GridLayout {
93
140
  /** The main action part (for composing a custom content widget). */
94
141
  get actionButton(): StackLayout;
95
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
- import { AdwIcon } from './adw-icon.js';
4
- export declare class AdwStatusPage extends GridLayout {
3
+ import { GtkImage } from './gtk-image.js';
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
- protected readonly _icon: AdwIcon;
9
- private _iconSvg;
20
+ protected readonly _icon: GtkImage;
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[]);