@gjsify/adwaita-nativescript 0.64.14 → 0.64.15-next.287

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 (76) hide show
  1. package/lib/esm/name-selector.js +1 -0
  2. package/lib/esm/platform-host.js +1 -1
  3. package/lib/esm/widgets/adw-image-button.js +1 -1
  4. package/lib/esm/widgets/adw-split-button.js +1 -1
  5. package/lib/esm/widgets/bin-layout.js +1 -0
  6. package/lib/esm/widgets/css-names.js +1 -0
  7. package/lib/esm/widgets/gtk-button.js +1 -1
  8. package/lib/esm/widgets/gtk-menu-button.js +1 -1
  9. package/lib/esm/widgets/gtk-scrolled-window.js +1 -1
  10. package/lib/esm/widgets/menu-slot.js +1 -1
  11. package/lib/esm/widgets/scrolled-window-policy.js +1 -1
  12. package/lib/esm/widgets/signals.js +1 -1
  13. package/lib/esm/widgets/widget-layout.js +1 -1
  14. package/lib/types/button-bin.spec.d.ts +2 -0
  15. package/lib/types/css-names.spec.d.ts +1 -0
  16. package/lib/types/menu-button-properties.spec.d.ts +2 -0
  17. package/lib/types/menu-model-route-d.node-gi.spec.d.ts +2 -0
  18. package/lib/types/name-selector.d.ts +20 -0
  19. package/lib/types/name-selector.spec.d.ts +2 -0
  20. package/lib/types/testing/ns-core.d.mts +19 -0
  21. package/lib/types/widgets/adw-about-dialog.d.ts +2 -0
  22. package/lib/types/widgets/adw-action-row.d.ts +2 -0
  23. package/lib/types/widgets/adw-alert-dialog.d.ts +2 -0
  24. package/lib/types/widgets/adw-avatar.d.ts +2 -0
  25. package/lib/types/widgets/adw-banner.d.ts +2 -0
  26. package/lib/types/widgets/adw-bottom-sheet.d.ts +2 -0
  27. package/lib/types/widgets/adw-button-content.d.ts +2 -0
  28. package/lib/types/widgets/adw-carousel.d.ts +2 -0
  29. package/lib/types/widgets/adw-clamp.d.ts +2 -0
  30. package/lib/types/widgets/adw-data-grid.d.ts +2 -0
  31. package/lib/types/widgets/adw-header-bar.d.ts +2 -0
  32. package/lib/types/widgets/adw-image-button.d.ts +4 -2
  33. package/lib/types/widgets/adw-navigation-page.d.ts +2 -0
  34. package/lib/types/widgets/adw-navigation-view.d.ts +2 -0
  35. package/lib/types/widgets/adw-preferences-group.d.ts +2 -0
  36. package/lib/types/widgets/adw-preferences-page.d.ts +2 -0
  37. package/lib/types/widgets/adw-shortcut-label.d.ts +2 -0
  38. package/lib/types/widgets/adw-sidebar.d.ts +2 -0
  39. package/lib/types/widgets/adw-slider-row.d.ts +2 -0
  40. package/lib/types/widgets/adw-spinner.d.ts +2 -0
  41. package/lib/types/widgets/adw-split-button.d.ts +42 -27
  42. package/lib/types/widgets/adw-status-page.d.ts +2 -0
  43. package/lib/types/widgets/adw-tab-view.d.ts +2 -0
  44. package/lib/types/widgets/adw-toast-overlay.d.ts +2 -0
  45. package/lib/types/widgets/adw-toggle-group.d.ts +2 -0
  46. package/lib/types/widgets/adw-toggle.d.ts +2 -0
  47. package/lib/types/widgets/adw-toolbar-view.d.ts +2 -0
  48. package/lib/types/widgets/adw-view-stack.d.ts +2 -0
  49. package/lib/types/widgets/adw-view-switcher-bar.d.ts +2 -0
  50. package/lib/types/widgets/adw-window-title.d.ts +2 -0
  51. package/lib/types/widgets/adw-wrap-box.d.ts +2 -0
  52. package/lib/types/widgets/bin-layout.d.ts +12 -0
  53. package/lib/types/widgets/carousel-indicator-base.d.ts +2 -0
  54. package/lib/types/widgets/css-names.d.ts +9 -0
  55. package/lib/types/widgets/gtk-action-bar.d.ts +2 -0
  56. package/lib/types/widgets/gtk-button.d.ts +8 -5
  57. package/lib/types/widgets/gtk-drop-down.d.ts +2 -0
  58. package/lib/types/widgets/gtk-entry.d.ts +2 -0
  59. package/lib/types/widgets/gtk-image.d.ts +2 -0
  60. package/lib/types/widgets/gtk-label.d.ts +2 -0
  61. package/lib/types/widgets/gtk-menu-button.d.ts +26 -20
  62. package/lib/types/widgets/gtk-popover-menu.d.ts +2 -0
  63. package/lib/types/widgets/gtk-scrolled-window.d.ts +9 -0
  64. package/lib/types/widgets/gtk-stack.d.ts +2 -0
  65. package/lib/types/widgets/gtk-text-view.d.ts +2 -0
  66. package/lib/types/widgets/menu-slot.d.ts +15 -4
  67. package/lib/types/widgets/scrolled-window-policy.d.ts +4 -2
  68. package/lib/types/widgets/signals.d.ts +2 -0
  69. package/lib/types/widgets/split-view-base.d.ts +2 -0
  70. package/lib/types/widgets/stack-page.d.ts +2 -0
  71. package/lib/types/widgets/styled-layout-base.d.ts +2 -0
  72. package/lib/types/widgets/view-stack-page.d.ts +2 -0
  73. package/lib/types/widgets/view-switcher-base.d.ts +2 -0
  74. package/lib/types/widgets/widget-layout.d.ts +2 -0
  75. package/package.json +20 -15
  76. package/src/testing/ns-core.mts +39 -0
@@ -30,6 +30,8 @@ declare const AdwSplitButton_base: ((abstract new (...args: any[]) => {
30
30
  emit(eventName: string, ...args: unknown[]): void;
31
31
  get_property(name: string): unknown;
32
32
  set_property(name: string, value: unknown): void;
33
+ get cssType(): string | undefined;
34
+ set cssType(value: string | undefined);
33
35
  get halign(): string;
34
36
  set halign(value: string | number);
35
37
  get valign(): string;
@@ -110,6 +112,37 @@ export declare class AdwSplitButton extends AdwSplitButton_base {
110
112
  * for what should be shown; a PopupMenu has no tooltip surface, so this is carried for parity.
111
113
  */
112
114
  dropdownTooltip: string;
115
+ /**
116
+ * The dropdown menu — a real `Gio.MenuModel` (ADR 0128), opened as a `PopupMenu` on an
117
+ * arrow tap.
118
+ *
119
+ * Accepts everything the portable model does, INCLUDING the bare `string[]` this
120
+ * widget used to be alone in taking: that shorthand is now one of the model's own
121
+ * input forms rather than a NativeScript-only shape, so the same value works on
122
+ * every surface.
123
+ *
124
+ * IT DOES NOT TAKE A JSON STRING, which the browser element's `menu-model`
125
+ * ATTRIBUTE does. Not an oversight: NativeScript's Builder writes an XML attribute
126
+ * straight onto the property, so accepting one here would open the XML door — and
127
+ * the gallery probe that would have to prove it compares a read-back by IDENTITY
128
+ * (`gallery-page.ts`), which no structured value can satisfy. An input form nothing
129
+ * can run is a claim, not a feature.
130
+ *
131
+ * AND IT SAYS SO. Left to the core's door a string would be PARSED, because that door
132
+ * is also the browser's `menu-model` attribute (ADR 0128 § 4) — so an XML author writing
133
+ * `menuModel="[…]"` would get a menu this port never promised to build from markup. A
134
+ * shut door that is silent is worse than one that is open, so the refusal names itself,
135
+ * from `normalize` and so on both legs alike.
136
+ *
137
+ * `null` IS THE ONE SPELLING OF "NO MENU" since ADR 0128: an empty `Gio.Menu` is a menu
138
+ * that happens to have no rows, and it keeps the dropdown live exactly as it does on
139
+ * GTK (measured, `MENU_MODEL_DOOR_VECTORS`).
140
+ *
141
+ * A CHANGE IS `notify::menu-model` through {@link connect}, not the NativeScript
142
+ * `menuModelChange` this property emitted while it was hand-rolled: the declaration
143
+ * moved it onto the seam, where every declared property has one GObject channel.
144
+ */
145
+ menuModel: AdwMenuModel | null;
113
146
  /** The main action part (column 0). */
114
147
  protected readonly _actionPart: StackLayout;
115
148
  /** The action label (shown in label mode). */
@@ -145,6 +178,15 @@ export declare class AdwSplitButton extends AdwSplitButton_base {
145
178
  constructor(props?: ConstructProps<AdwSplitButton, {
146
179
  direction: number | SplitButtonDirection;
147
180
  }>);
181
+ /**
182
+ * Move the slot and the state onto the model the seam has just stored — the one hop every
183
+ * `menu-model` write takes, called from the declaration's `afterNotify` before it notifies.
184
+ *
185
+ * The slot snapshots and re-watches; the STATE is what drives `dropdownEnabled` and so the
186
+ * dropdown's dimming. `setMenuModel`'s own return value is ignored: the seam has already
187
+ * decided this write is a change, and the two guards are the same identity guard.
188
+ */
189
+ private _applyMenuModel;
148
190
  /**
149
191
  * Show the dropdown menu at the arrow half and dispatch the choice BY POSITION.
150
192
  *
@@ -158,33 +200,6 @@ export declare class AdwSplitButton extends AdwSplitButton_base {
158
200
  private _renderContent;
159
201
  /** Repaint the dropdown half and the dimming from the state machine. */
160
202
  private _render;
161
- /**
162
- * The dropdown menu, normalised (ADR 0042) — opened as a `PopupMenu` on an
163
- * arrow tap.
164
- *
165
- * Accepts everything the portable model does, INCLUDING the bare `string[]` this
166
- * widget used to be alone in taking: that shorthand is now one of the model's own
167
- * input forms rather than a NativeScript-only shape, so the same value works on
168
- * every surface.
169
- *
170
- * IT DOES NOT TAKE A JSON STRING, which the browser element's `menu-model`
171
- * ATTRIBUTE does. Not an oversight: NativeScript's Builder writes an XML attribute
172
- * straight onto the property, so accepting one here would open the XML door — and
173
- * the gallery probe that would have to prove it compares a read-back by IDENTITY
174
- * (`gallery-page.ts`), which no structured value can satisfy. An input form nothing
175
- * can run is a claim, not a feature.
176
- *
177
- * AND IT SAYS SO. Left to the core's door a string would be PARSED, because that door
178
- * is also the browser's `menu-model` attribute (ADR 0128 § 4) — so an XML author writing
179
- * `menuModel="[…]"` would get a menu this port never promised to build from markup. A
180
- * shut door that is silent is worse than one that is open, so the refusal names itself.
181
- *
182
- * `null` IS THE ONE SPELLING OF "NO MENU" since ADR 0128: an empty `Gio.Menu` is a menu
183
- * that happens to have no rows, and it keeps the dropdown live exactly as it does on
184
- * GTK (measured, `MENU_MODEL_DOOR_VECTORS`).
185
- */
186
- get menuModel(): AdwMenuModel | null;
187
- set menuModel(value: AdwMenuModel | null);
188
203
  /**
189
204
  * What the action group publishes about the actions this menu names — the portable
190
205
  * stand-in for a `GActionGroup`, and the only source of a menu's enabled/checked
@@ -10,6 +10,8 @@ declare const AdwStatusPage_base: ((abstract new (...args: any[]) => {
10
10
  emit(eventName: string, ...args: unknown[]): void;
11
11
  get_property(name: string): unknown;
12
12
  set_property(name: string, value: unknown): void;
13
+ get cssType(): string | undefined;
14
+ set cssType(value: string | undefined);
13
15
  get halign(): string;
14
16
  set halign(value: string | number);
15
17
  get valign(): string;
@@ -31,6 +31,8 @@ declare const AdwTabView_base: ((abstract new (...args: any[]) => {
31
31
  emit(eventName: string, ...args: unknown[]): void;
32
32
  get_property(name: string): unknown;
33
33
  set_property(name: string, value: unknown): void;
34
+ get cssType(): string | undefined;
35
+ set cssType(value: string | undefined);
34
36
  get halign(): string;
35
37
  set halign(value: string | number);
36
38
  get valign(): string;
@@ -12,6 +12,8 @@ declare const AdwToastOverlay_base: ((abstract new (...args: any[]) => {
12
12
  emit(eventName: string, ...args: unknown[]): void;
13
13
  get_property(name: string): unknown;
14
14
  set_property(name: string, value: unknown): void;
15
+ get cssType(): string | undefined;
16
+ set cssType(value: string | undefined);
15
17
  get halign(): string;
16
18
  set halign(value: string | number);
17
19
  get valign(): string;
@@ -29,6 +29,8 @@ declare const AdwToggleGroup_base: ((abstract new (...args: any[]) => {
29
29
  emit(eventName: string, ...args: unknown[]): void;
30
30
  get_property(name: string): unknown;
31
31
  set_property(name: string, value: unknown): void;
32
+ get cssType(): string | undefined;
33
+ set cssType(value: string | undefined);
32
34
  get halign(): string;
33
35
  set halign(value: string | number);
34
36
  get valign(): string;
@@ -8,6 +8,8 @@ declare const AdwToggle_base: ((abstract new (...args: any[]) => {
8
8
  emit(eventName: string, ...args: unknown[]): void;
9
9
  get_property(name: string): unknown;
10
10
  set_property(name: string, value: unknown): void;
11
+ get cssType(): string | undefined;
12
+ set cssType(value: string | undefined);
11
13
  get halign(): string;
12
14
  set halign(value: string | number);
13
15
  get valign(): string;
@@ -11,6 +11,8 @@ declare const AdwToolbarView_base: ((abstract new (...args: any[]) => {
11
11
  emit(eventName: string, ...args: unknown[]): void;
12
12
  get_property(name: string): unknown;
13
13
  set_property(name: string, value: unknown): void;
14
+ get cssType(): string | undefined;
15
+ set cssType(value: string | undefined);
14
16
  get halign(): string;
15
17
  set halign(value: string | number);
16
18
  get valign(): string;
@@ -23,6 +23,8 @@ declare const AdwViewStack_base: ((abstract new (...args: any[]) => {
23
23
  emit(eventName: string, ...args: unknown[]): void;
24
24
  get_property(name: string): unknown;
25
25
  set_property(name: string, value: unknown): void;
26
+ get cssType(): string | undefined;
27
+ set cssType(value: string | undefined);
26
28
  get halign(): string;
27
29
  set halign(value: string | number);
28
30
  get valign(): string;
@@ -10,6 +10,8 @@ declare const AdwViewSwitcherBar_base: ((abstract new (...args: any[]) => {
10
10
  emit(eventName: string, ...args: unknown[]): void;
11
11
  get_property(name: string): unknown;
12
12
  set_property(name: string, value: unknown): void;
13
+ get cssType(): string | undefined;
14
+ set cssType(value: string | undefined);
13
15
  get halign(): string;
14
16
  set halign(value: string | number);
15
17
  get valign(): string;
@@ -13,6 +13,8 @@ declare const AdwWindowTitle_base: ((abstract new (...args: any[]) => {
13
13
  emit(eventName: string, ...args: unknown[]): void;
14
14
  get_property(name: string): unknown;
15
15
  set_property(name: string, value: unknown): void;
16
+ get cssType(): string | undefined;
17
+ set cssType(value: string | undefined);
16
18
  get halign(): string;
17
19
  set halign(value: string | number);
18
20
  get valign(): string;
@@ -11,6 +11,8 @@ declare const AdwWrapBox_base: ((abstract new (...args: any[]) => {
11
11
  emit(eventName: string, ...args: unknown[]): void;
12
12
  get_property(name: string): unknown;
13
13
  set_property(name: string, value: unknown): void;
14
+ get cssType(): string | undefined;
15
+ set cssType(value: string | undefined);
14
16
  get halign(): string;
15
17
  set halign(value: string | number);
16
18
  get valign(): string;
@@ -0,0 +1,12 @@
1
+ import type { DockLayout, View } from '@nativescript/core';
2
+ /**
3
+ * Parent `view` as the single child of a bin-shaped `layout`, centred in whatever allocation
4
+ * that layout is given.
5
+ *
6
+ * `stretchLastChild` is WRITTEN rather than left to the platform default (`true`,
7
+ * `ui/layouts/dock-layout/dock-layout-common`), because it is the whole of what makes this a
8
+ * bin: with it the last — here only — child is laid out across the padding box of the real
9
+ * allocation. The two alignments are the child's half of the same statement, `Gtk.Align.CENTER`
10
+ * on both axes, which is what `gtk_widget_set_halign` / `set_valign` would say.
11
+ */
12
+ export declare function adoptIntoBin<T extends View>(layout: DockLayout, view: T): T;
@@ -9,6 +9,8 @@ declare const AdwCarouselIndicatorBase_base: ((abstract new (...args: any[]) =>
9
9
  emit(eventName: string, ...args: unknown[]): void;
10
10
  get_property(name: string): unknown;
11
11
  set_property(name: string, value: unknown): void;
12
+ get cssType(): string | undefined;
13
+ set cssType(value: string | undefined);
12
14
  get halign(): string;
13
15
  set halign(value: string | number);
14
16
  get valign(): string;
@@ -0,0 +1,9 @@
1
+ export declare const GTK_CSS_NAMES: Readonly<Record<string, string>>;
2
+ /** The `cssType` a CSS node name is matched under, spelled as NativeScript's parser spells a selector. */
3
+ export declare function nsTypeSelector(cssName: string): string;
4
+ /**
5
+ * The `cssType` of a widget class: the nearest class in its chain that declares a `GTypeName`
6
+ * in {@link GTK_CSS_NAMES}. An application's `class Mine extends GtkBox` is a `box`, as a GTK
7
+ * subclass inherits its parent's CSS name; `undefined` when no ancestor is listed.
8
+ */
9
+ export declare function cssTypeOf(ctor: Function): string | undefined;
@@ -9,6 +9,8 @@ declare const GtkActionBar_base: ((abstract new (...args: any[]) => {
9
9
  emit(eventName: string, ...args: unknown[]): void;
10
10
  get_property(name: string): unknown;
11
11
  set_property(name: string, value: unknown): void;
12
+ get cssType(): string | undefined;
13
+ set cssType(value: string | undefined);
12
14
  get halign(): string;
13
15
  set halign(value: string | number);
14
16
  get valign(): string;
@@ -1,4 +1,4 @@
1
- import { GridLayout, type View } from '@nativescript/core';
1
+ import { DockLayout, type View } from '@nativescript/core';
2
2
  import { type ConstructProps } from './construct-props.js';
3
3
  /** Event name emitted when the button is tapped. Mirrors `Gtk.Button::clicked`. */
4
4
  export declare const GTK_BUTTON_CLICKED = "clicked";
@@ -14,6 +14,8 @@ declare const GtkButton_base: ((abstract new (...args: any[]) => {
14
14
  emit(eventName: string, ...args: unknown[]): void;
15
15
  get_property(name: string): unknown;
16
16
  set_property(name: string, value: unknown): void;
17
+ get cssType(): string | undefined;
18
+ set cssType(value: string | undefined);
17
19
  get halign(): string;
18
20
  set halign(value: string | number);
19
21
  get valign(): string;
@@ -70,7 +72,7 @@ declare const GtkButton_base: ((abstract new (...args: any[]) => {
70
72
  get(name: string): unknown;
71
73
  }) & {
72
74
  readonly emittedSignals: readonly string[];
73
- }) & typeof GridLayout;
75
+ }) & typeof DockLayout;
74
76
  export declare class GtkButton extends GtkButton_base {
75
77
  static readonly GTypeName: string;
76
78
  /**
@@ -196,8 +198,9 @@ export declare class GtkButton extends GtkButton_base {
196
198
  * Put `value` in the single cell under `wrote`'s slot, detaching whatever the previous
197
199
  * slot had parented.
198
200
  *
199
- * The detach is the whole reason `button-slot.ts` exists: two views left in one
200
- * `GridLayout` cell paint on top of each other and nothing complains.
201
+ * The detach is the whole reason `button-slot.ts` exists: two views left in one bin
202
+ * paint on top of each other and nothing complains. It is also what keeps the content
203
+ * the LAST child, which is the one `DockLayout` stretches.
201
204
  */
202
205
  private _fill;
203
206
  /**
@@ -212,7 +215,7 @@ export declare class GtkButton extends GtkButton_base {
212
215
  */
213
216
  private _inOsdContainer;
214
217
  private _detach;
215
- /** Parent `view` in the single cell, centred, and remember it as the content. */
218
+ /** Parent `view` as the bin's one child, centred, and remember it as the content. */
216
219
  private _adopt;
217
220
  }
218
221
  export {};
@@ -15,6 +15,8 @@ declare const GtkDropDown_base: ((abstract new (...args: any[]) => {
15
15
  emit(eventName: string, ...args: unknown[]): void;
16
16
  get_property(name: string): unknown;
17
17
  set_property(name: string, value: unknown): void;
18
+ get cssType(): string | undefined;
19
+ set cssType(value: string | undefined);
18
20
  get halign(): string;
19
21
  set halign(value: string | number);
20
22
  get valign(): string;
@@ -23,6 +23,8 @@ declare const GtkEntry_base: ((abstract new (...args: any[]) => {
23
23
  emit(eventName: string, ...args: unknown[]): void;
24
24
  get_property(name: string): unknown;
25
25
  set_property(name: string, value: unknown): void;
26
+ get cssType(): string | undefined;
27
+ set cssType(value: string | undefined);
26
28
  get halign(): string;
27
29
  set halign(value: string | number);
28
30
  get valign(): string;
@@ -19,6 +19,8 @@ declare const GtkImage_base: ((abstract new (...args: any[]) => {
19
19
  emit(eventName: string, ...args: unknown[]): void;
20
20
  get_property(name: string): unknown;
21
21
  set_property(name: string, value: unknown): void;
22
+ get cssType(): string | undefined;
23
+ set cssType(value: string | undefined);
22
24
  get halign(): string;
23
25
  set halign(value: string | number);
24
26
  get valign(): string;
@@ -28,6 +28,8 @@ declare const GtkLabel_base: ((abstract new (...args: any[]) => {
28
28
  emit(eventName: string, ...args: unknown[]): void;
29
29
  get_property(name: string): unknown;
30
30
  set_property(name: string, value: unknown): void;
31
+ get cssType(): string | undefined;
32
+ set cssType(value: string | undefined);
31
33
  get halign(): string;
32
34
  set halign(value: string | number);
33
35
  get valign(): string;
@@ -18,22 +18,19 @@ export interface MenuItemActivatedEventData extends EventData {
18
18
  /** The chosen item's detailed action name, when the item carried one. */
19
19
  action?: string;
20
20
  }
21
- export declare class GtkMenuButton extends AdwImageButton {
21
+ declare const GtkMenuButton_base: ((abstract new (...args: any[]) => {
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
+ }) & {
30
+ readonly emittedSignals: readonly string[];
31
+ }) & typeof AdwImageButton;
32
+ export declare class GtkMenuButton extends GtkMenuButton_base {
22
33
  static readonly GTypeName: string;
23
- /**
24
- * `Gtk.MenuButton` has NO identity guard on `menu-model` — measured: every write
25
- * notifies, including the same model twice and `null` over `null`
26
- * (`MENU_MODEL_NOTIFY_VECTORS`), which is the opposite of what `Adw.SplitButton` next
27
- * door does. So the notify below is unconditional, and the slot does not gate it.
28
- */
29
- private readonly _slot;
30
- private _actions;
31
- private _menuTitle;
32
- private _primary;
33
- /** The image button's own classes, which every `styleClasses` write keeps. */
34
- private readonly _baseClassName;
35
- private _styleClasses;
36
- constructor(props?: ConstructProps<GtkMenuButton>);
37
34
  /**
38
35
  * The menu — a real `Gio.MenuModel` since ADR 0128 — opened as an Android `PopupMenu`
39
36
  * on tap. `null` is the one spelling of "no menu".
@@ -44,12 +41,20 @@ export declare class GtkMenuButton extends AdwImageButton {
44
41
  * refuses it. A JSON STRING is refused too, with its own message — see
45
42
  * `AdwSplitButton.menuModel` for why the XML door stays shut until a probe can prove
46
43
  * it, and why being shut is not the same as being silent.
44
+ *
45
+ * A CHANGE IS `notify::menu-model` through {@link connect}, not the NativeScript
46
+ * `menuModelChange` this property emitted while it was hand-rolled.
47
47
  */
48
- get menuModel(): AdwMenuModel | null;
49
- set menuModel(value: AdwMenuModel | null);
50
- /** `Gtk.MenuButton:menu-model` — the GIR spelling of {@link menuModel}. */
51
- get menu_model(): AdwMenuModel | null;
52
- set menu_model(value: AdwMenuModel | null);
48
+ menuModel: AdwMenuModel | null;
49
+ /** The menu this button holds, with its `items-changed` watcher and the tree the popup reads. */
50
+ private readonly _slot;
51
+ private _actions;
52
+ private _menuTitle;
53
+ private _primary;
54
+ /** The image button's own classes, which every `styleClasses` write keeps. */
55
+ private readonly _baseClassName;
56
+ private _styleClasses;
57
+ constructor(props?: ConstructProps<GtkMenuButton>);
53
58
  get_menu_model(): AdwMenuModel | null;
54
59
  set_menu_model(value: AdwMenuModel | null): void;
55
60
  /**
@@ -89,3 +94,4 @@ export declare class GtkMenuButton extends AdwImageButton {
89
94
  private _setClasses;
90
95
  private _openMenu;
91
96
  }
97
+ export {};
@@ -12,6 +12,8 @@ declare const GtkPopoverMenu_base: ((abstract new (...args: any[]) => {
12
12
  emit(eventName: string, ...args: unknown[]): void;
13
13
  get_property(name: string): unknown;
14
14
  set_property(name: string, value: unknown): void;
15
+ get cssType(): string | undefined;
16
+ set cssType(value: string | undefined);
15
17
  get halign(): string;
16
18
  set halign(value: string | number);
17
19
  get valign(): string;
@@ -10,6 +10,11 @@ export declare class GtkScrolledWindow extends AdwSingleChildBase {
10
10
  private readonly _scroll;
11
11
  /** The box the child really goes in — see "THE CHILD IS NOT THE CONTENT" in the header. */
12
12
  private readonly _viewport;
13
+ /** The horizontal half of a two-axis window — see "TWO AXES" in the header. */
14
+ private readonly _hscroll;
15
+ /** The box the child goes in once `_hscroll` is in play, for the same margin reason. */
16
+ private readonly _hbox;
17
+ private _nested;
13
18
  private _hscrollbarPolicy;
14
19
  private _vscrollbarPolicy;
15
20
  private _hasFrame;
@@ -46,6 +51,10 @@ export declare class GtkScrolledWindow extends AdwSingleChildBase {
46
51
  /** `Gtk.ScrolledWindow:has-frame` — held and read back; no frame is drawn (see the header). */
47
52
  get hasFrame(): boolean;
48
53
  set hasFrame(raw: boolean | string);
54
+ /** The view that scrolls sideways: the inner one of a two-axis window, else the only one. */
55
+ private get _horizontalScroller();
56
+ /** Where the child sits: the viewport box, or the horizontal scroller's box inside it. */
57
+ private get _holder();
49
58
  protected _adopt(view: View): void;
50
59
  protected _release(view: View): void;
51
60
  private _applyOrientation;
@@ -19,6 +19,8 @@ declare const GtkStack_base: ((abstract new (...args: any[]) => {
19
19
  emit(eventName: string, ...args: unknown[]): void;
20
20
  get_property(name: string): unknown;
21
21
  set_property(name: string, value: unknown): void;
22
+ get cssType(): string | undefined;
23
+ set cssType(value: string | undefined);
22
24
  get halign(): string;
23
25
  set halign(value: string | number);
24
26
  get valign(): string;
@@ -21,6 +21,8 @@ declare const GtkTextView_base: ((abstract new (...args: any[]) => {
21
21
  emit(eventName: string, ...args: unknown[]): void;
22
22
  get_property(name: string): unknown;
23
23
  set_property(name: string, value: unknown): void;
24
+ get cssType(): string | undefined;
25
+ set cssType(value: string | undefined);
24
26
  get halign(): string;
25
27
  set halign(value: string | number);
26
28
  get valign(): string;
@@ -26,15 +26,26 @@ export declare class MenuSlot {
26
26
  */
27
27
  get isEmpty(): boolean;
28
28
  /**
29
- * A property write: a real model by identity, `null` for no menu — and a `TypeError` for
30
- * a string, an array or anything else, which this door does not take (`buildMenu` is how
31
- * an array becomes a model now).
29
+ * READ a property write without holding it: a real model by identity, `null` for no menu —
30
+ * and a `TypeError` for a string, an array or anything else, which this door does not take
31
+ * (`buildMenu` is how an array becomes a model now).
32
32
  *
33
33
  * The refusal is a THROW because a property assignment is a call: whoever wrote the
34
34
  * menu is on the stack and can hear it. There is no second, quieter door here the way
35
35
  * the browser has one for markup.
36
+ *
37
+ * SPLIT FROM {@link adopt} for the seam: a declared property reads the write in `normalize`,
38
+ * ahead of the store and of the equal-write check, and takes the value on in `afterNotify`,
39
+ * which runs only for a write that moved (`signals.ts`). A single `write` would snapshot and
40
+ * re-watch on every write including an equal one, which is a notify the measurement says
41
+ * `Adw.SplitButton` does not make.
42
+ */
43
+ read(value: unknown): GioMenuModel | null;
44
+ /**
45
+ * {@link read} and {@link adopt} in one — the door for a widget whose `menuModel` the seam
46
+ * does NOT own (`gtk-popover-menu.ts`).
36
47
  */
37
48
  write(value: unknown): void;
38
49
  /** Hold `next`, snapshot it, and listen to it — the three that always happen together. */
39
- private _adopt;
50
+ adopt(next: GioMenuModel | null): void;
40
51
  }
@@ -9,9 +9,11 @@ export declare function policyScrolls(policy: GtkPolicyNick): boolean;
9
9
  /**
10
10
  * The one axis the `ScrollView` scrolls on, for a pair of policies.
11
11
  *
12
- * Vertical wins a tie, because that is the axis a page of content grows on; a window that
13
- * scrolls ONLY horizontally is the one case that flips it. Neither axis scrolling still
12
+ * Vertical wins a tie, because that is the axis a page of content grows on and the outer view
13
+ * of a two-axis window; a window that scrolls ONLY horizontally is the one case that flips it. Neither axis scrolling still
14
14
  * answers `vertical` — a `ScrollView` cannot refuse to scroll, so the child is simply held
15
15
  * at its natural size by the surrounding layout.
16
16
  */
17
17
  export declare function scrollOrientationFor(hscrollbarPolicy: GtkPolicyNick, vscrollbarPolicy: GtkPolicyNick): 'horizontal' | 'vertical';
18
+ /** Whether both axes scroll, which is when the window needs the second, nested `ScrollView`. */
19
+ export declare function scrollsBothAxes(hscrollbarPolicy: GtkPolicyNick, vscrollbarPolicy: GtkPolicyNick): boolean;
@@ -147,6 +147,8 @@ export declare function withSignals<TBase extends ObservableConstructor>(Base: T
147
147
  emit(eventName: string, ...args: unknown[]): void;
148
148
  get_property(name: string): unknown;
149
149
  set_property(name: string, value: unknown): void;
150
+ get cssType(): string | undefined;
151
+ set cssType(value: string | undefined);
150
152
  get halign(): string;
151
153
  set halign(value: string | number);
152
154
  get valign(): string;
@@ -18,6 +18,8 @@ declare const AdwSplitViewBase_base: ((abstract new (...args: any[]) => {
18
18
  emit(eventName: string, ...args: unknown[]): void;
19
19
  get_property(name: string): unknown;
20
20
  set_property(name: string, value: unknown): void;
21
+ get cssType(): string | undefined;
22
+ set cssType(value: string | undefined);
21
23
  get halign(): string;
22
24
  set halign(value: string | number);
23
25
  get valign(): string;
@@ -16,6 +16,8 @@ declare const GtkStackPage_base: ((abstract new (...args: any[]) => {
16
16
  emit(eventName: string, ...args: unknown[]): void;
17
17
  get_property(name: string): unknown;
18
18
  set_property(name: string, value: unknown): void;
19
+ get cssType(): string | undefined;
20
+ set cssType(value: string | undefined);
19
21
  get halign(): string;
20
22
  set halign(value: string | number);
21
23
  get valign(): string;
@@ -8,6 +8,8 @@ declare const AdwStyledLayoutBase_base: ((abstract new (...args: any[]) => {
8
8
  emit(eventName: string, ...args: unknown[]): void;
9
9
  get_property(name: string): unknown;
10
10
  set_property(name: string, value: unknown): void;
11
+ get cssType(): string | undefined;
12
+ set cssType(value: string | undefined);
11
13
  get halign(): string;
12
14
  set halign(value: string | number);
13
15
  get valign(): string;
@@ -16,6 +16,8 @@ declare const AdwViewStackPage_base: ((abstract new (...args: any[]) => {
16
16
  emit(eventName: string, ...args: unknown[]): void;
17
17
  get_property(name: string): unknown;
18
18
  set_property(name: string, value: unknown): void;
19
+ get cssType(): string | undefined;
20
+ set cssType(value: string | undefined);
19
21
  get halign(): string;
20
22
  set halign(value: string | number);
21
23
  get valign(): string;
@@ -20,6 +20,8 @@ declare const AdwViewSwitcherBase_base: ((abstract new (...args: any[]) => {
20
20
  emit(eventName: string, ...args: unknown[]): void;
21
21
  get_property(name: string): unknown;
22
22
  set_property(name: string, value: unknown): void;
23
+ get cssType(): string | undefined;
24
+ set cssType(value: string | undefined);
23
25
  get halign(): string;
24
26
  set halign(value: string | number);
25
27
  get valign(): string;
@@ -47,6 +47,8 @@ export interface GtkWidgetLayout {
47
47
  * The accessors keep their wider setter types (TS 5.1 unrelated accessor types).
48
48
  */
49
49
  export declare abstract class GtkWidgetLayoutMembers {
50
+ get cssType(): string | undefined;
51
+ set cssType(value: string | undefined);
50
52
  get halign(): string;
51
53
  set halign(value: string | number);
52
54
  get valign(): string;