@gjsify/adwaita-nativescript 0.64.11 → 0.64.12-next.280
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/esm/index.js +1 -1
- package/lib/esm/namespace/adw.js +1 -1
- package/lib/esm/namespace/gdk.js +1 -1
- package/lib/esm/namespace/graphene.js +1 -0
- package/lib/esm/namespace/gtk.js +1 -1
- package/lib/esm/widgets/adw-alert-dialog.js +1 -1
- package/lib/esm/widgets/adw-expander-row.js +1 -1
- package/lib/esm/widgets/adw-overlay-split-view.js +1 -1
- package/lib/esm/widgets/adw-view-stack.js +1 -1
- package/lib/esm/widgets/gtk-application-window.js +1 -0
- package/lib/esm/widgets/gtk-button.js +1 -1
- package/lib/esm/widgets/gtk-menu-button.js +1 -1
- package/lib/esm/widgets/gtk-scrolled-window.js +1 -1
- package/lib/esm/widgets/gtk-stack.js +1 -1
- package/lib/esm/widgets/gtk-toggle-button.js +1 -1
- package/lib/esm/widgets/gtk-window.js +1 -1
- package/lib/esm/widgets/index.js +1 -1
- package/lib/esm/widgets/signals.js +1 -1
- package/lib/esm/widgets/style-manager-host.js +1 -1
- package/lib/esm/widgets/style-manager.js +1 -1
- package/lib/esm/widgets/system-accent.js +1 -0
- package/lib/esm/widgets/widget-layout.js +1 -1
- package/lib/types/expander-row-properties.spec.d.ts +2 -0
- package/lib/types/gtk-button-clicked.spec.d.ts +1 -0
- package/lib/types/index.d.ts +3 -2
- package/lib/types/namespace/adw.d.ts +1 -1
- package/lib/types/namespace/gdk.d.ts +1 -0
- package/lib/types/namespace/graphene.d.ts +1 -0
- package/lib/types/namespace/gtk.d.ts +1 -0
- package/lib/types/system-accent.spec.d.ts +2 -0
- package/lib/types/testing/ns-core.d.mts +9 -9
- package/lib/types/widgets/adw-about-dialog.d.ts +3 -0
- package/lib/types/widgets/adw-action-row.d.ts +3 -0
- package/lib/types/widgets/adw-alert-dialog.d.ts +3 -0
- package/lib/types/widgets/adw-application-window.d.ts +7 -0
- package/lib/types/widgets/adw-avatar.d.ts +3 -0
- package/lib/types/widgets/adw-banner.d.ts +3 -0
- package/lib/types/widgets/adw-bottom-sheet.d.ts +3 -0
- package/lib/types/widgets/adw-button-content.d.ts +3 -0
- package/lib/types/widgets/adw-carousel.d.ts +3 -0
- package/lib/types/widgets/adw-clamp.d.ts +3 -0
- package/lib/types/widgets/adw-data-grid.d.ts +3 -0
- package/lib/types/widgets/adw-expander-row.d.ts +93 -16
- package/lib/types/widgets/adw-header-bar.d.ts +3 -0
- package/lib/types/widgets/adw-image-button.d.ts +3 -0
- package/lib/types/widgets/adw-navigation-page.d.ts +3 -0
- package/lib/types/widgets/adw-navigation-view.d.ts +3 -0
- package/lib/types/widgets/adw-overlay-split-view.d.ts +5 -0
- package/lib/types/widgets/adw-preferences-group.d.ts +3 -0
- package/lib/types/widgets/adw-preferences-page.d.ts +3 -0
- package/lib/types/widgets/adw-shortcut-label.d.ts +3 -0
- package/lib/types/widgets/adw-sidebar.d.ts +3 -0
- package/lib/types/widgets/adw-slider-row.d.ts +3 -0
- package/lib/types/widgets/adw-spinner.d.ts +3 -0
- package/lib/types/widgets/adw-split-button.d.ts +3 -0
- package/lib/types/widgets/adw-status-page.d.ts +3 -0
- package/lib/types/widgets/adw-tab-view.d.ts +3 -0
- package/lib/types/widgets/adw-toast-overlay.d.ts +3 -0
- package/lib/types/widgets/adw-toggle-group.d.ts +3 -0
- package/lib/types/widgets/adw-toggle.d.ts +3 -0
- package/lib/types/widgets/adw-toolbar-view.d.ts +3 -0
- package/lib/types/widgets/adw-view-stack.d.ts +13 -0
- package/lib/types/widgets/adw-view-switcher-bar.d.ts +3 -0
- package/lib/types/widgets/adw-window-title.d.ts +3 -0
- package/lib/types/widgets/adw-wrap-box.d.ts +3 -0
- package/lib/types/widgets/carousel-indicator-base.d.ts +3 -0
- package/lib/types/widgets/gtk-action-bar.d.ts +3 -0
- package/lib/types/widgets/gtk-application-window.d.ts +13 -0
- package/lib/types/widgets/gtk-button.d.ts +3 -2
- package/lib/types/widgets/gtk-drop-down.d.ts +3 -0
- package/lib/types/widgets/gtk-entry.d.ts +3 -0
- package/lib/types/widgets/gtk-image.d.ts +3 -0
- package/lib/types/widgets/gtk-label.d.ts +3 -0
- package/lib/types/widgets/gtk-menu-button.d.ts +5 -0
- package/lib/types/widgets/gtk-popover-menu.d.ts +3 -0
- package/lib/types/widgets/gtk-scrolled-window.d.ts +11 -1
- package/lib/types/widgets/gtk-stack.d.ts +11 -0
- package/lib/types/widgets/gtk-text-view.d.ts +3 -0
- package/lib/types/widgets/gtk-window.d.ts +7 -0
- package/lib/types/widgets/index.d.ts +2 -2
- package/lib/types/widgets/signals.d.ts +9 -1
- package/lib/types/widgets/split-view-base.d.ts +3 -0
- package/lib/types/widgets/stack-page.d.ts +3 -0
- package/lib/types/widgets/style-manager.d.ts +7 -2
- package/lib/types/widgets/styled-layout-base.d.ts +3 -0
- package/lib/types/widgets/system-accent.d.ts +22 -0
- package/lib/types/widgets/view-stack-page.d.ts +3 -0
- package/lib/types/widgets/view-switcher-base.d.ts +3 -0
- package/lib/types/widgets/widget-layout.d.ts +7 -1
- package/package.json +14 -13
- package/src/testing/ns-core.mts +21 -15
- package/src/theme/adwaita.css +25 -4
|
@@ -51,6 +51,9 @@ declare const AdwWindowTitle_base: ((abstract new (...args: any[]) => {
|
|
|
51
51
|
get_next_sibling(): object | null;
|
|
52
52
|
get_prev_sibling(): object | null;
|
|
53
53
|
get_parent(): object | null;
|
|
54
|
+
get_width(): number;
|
|
55
|
+
get_height(): number;
|
|
56
|
+
compute_point(target: object, point: import("@gjsify/adwaita-core").Point): [boolean, import("@gjsify/adwaita-core").Point];
|
|
54
57
|
insert_action_group(prefix: string, group: import("@gjsify/adwaita-core").ActionGroupLike | null): void;
|
|
55
58
|
get focusable(): boolean;
|
|
56
59
|
set focusable(value: boolean | string);
|
|
@@ -49,6 +49,9 @@ declare const AdwWrapBox_base: ((abstract new (...args: any[]) => {
|
|
|
49
49
|
get_next_sibling(): object | null;
|
|
50
50
|
get_prev_sibling(): object | null;
|
|
51
51
|
get_parent(): object | null;
|
|
52
|
+
get_width(): number;
|
|
53
|
+
get_height(): number;
|
|
54
|
+
compute_point(target: object, point: import("@gjsify/adwaita-core").Point): [boolean, import("@gjsify/adwaita-core").Point];
|
|
52
55
|
insert_action_group(prefix: string, group: import("@gjsify/adwaita-core").ActionGroupLike | null): void;
|
|
53
56
|
get focusable(): boolean;
|
|
54
57
|
set focusable(value: boolean | string);
|
|
@@ -47,6 +47,9 @@ declare const AdwCarouselIndicatorBase_base: ((abstract new (...args: any[]) =>
|
|
|
47
47
|
get_next_sibling(): object | null;
|
|
48
48
|
get_prev_sibling(): object | null;
|
|
49
49
|
get_parent(): object | null;
|
|
50
|
+
get_width(): number;
|
|
51
|
+
get_height(): number;
|
|
52
|
+
compute_point(target: object, point: import("@gjsify/adwaita-core").Point): [boolean, import("@gjsify/adwaita-core").Point];
|
|
50
53
|
insert_action_group(prefix: string, group: import("@gjsify/adwaita-core").ActionGroupLike | null): void;
|
|
51
54
|
get focusable(): boolean;
|
|
52
55
|
set focusable(value: boolean | string);
|
|
@@ -47,6 +47,9 @@ declare const GtkActionBar_base: ((abstract new (...args: any[]) => {
|
|
|
47
47
|
get_next_sibling(): object | null;
|
|
48
48
|
get_prev_sibling(): object | null;
|
|
49
49
|
get_parent(): object | null;
|
|
50
|
+
get_width(): number;
|
|
51
|
+
get_height(): number;
|
|
52
|
+
compute_point(target: object, point: import("@gjsify/adwaita-core").Point): [boolean, import("@gjsify/adwaita-core").Point];
|
|
50
53
|
insert_action_group(prefix: string, group: import("@gjsify/adwaita-core").ActionGroupLike | null): void;
|
|
51
54
|
get focusable(): boolean;
|
|
52
55
|
set focusable(value: boolean | string);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type ActionLike } from '@gjsify/adwaita-core';
|
|
2
|
+
import { type ConstructProps } from './construct-props.js';
|
|
3
|
+
import { GtkWindow } from './gtk-window.js';
|
|
4
|
+
export declare class GtkApplicationWindow extends GtkWindow {
|
|
5
|
+
/** `Gio.ActionMap.add_action`: installed by `installActionMap`; reachable as `win.<name>`. */
|
|
6
|
+
add_action: (action: ActionLike) => void;
|
|
7
|
+
/** `Gio.ActionMap.lookup_action`: the window's own action, or `null`. */
|
|
8
|
+
lookup_action: (action_name: string) => ActionLike | null;
|
|
9
|
+
/** `Gio.ActionMap.remove_action`: an unknown name does nothing. */
|
|
10
|
+
remove_action: (action_name: string) => void;
|
|
11
|
+
static readonly GTypeName: string;
|
|
12
|
+
constructor(props?: ConstructProps<GtkApplicationWindow>);
|
|
13
|
+
}
|
|
@@ -52,6 +52,9 @@ declare const GtkButton_base: ((abstract new (...args: any[]) => {
|
|
|
52
52
|
get_next_sibling(): object | null;
|
|
53
53
|
get_prev_sibling(): object | null;
|
|
54
54
|
get_parent(): object | null;
|
|
55
|
+
get_width(): number;
|
|
56
|
+
get_height(): number;
|
|
57
|
+
compute_point(target: object, point: import("@gjsify/adwaita-core").Point): [boolean, import("@gjsify/adwaita-core").Point];
|
|
55
58
|
insert_action_group(prefix: string, group: import("@gjsify/adwaita-core").ActionGroupLike | null): void;
|
|
56
59
|
get focusable(): boolean;
|
|
57
60
|
set focusable(value: boolean | string);
|
|
@@ -70,8 +73,6 @@ declare const GtkButton_base: ((abstract new (...args: any[]) => {
|
|
|
70
73
|
}) & typeof GridLayout;
|
|
71
74
|
export declare class GtkButton extends GtkButton_base {
|
|
72
75
|
static readonly GTypeName: string;
|
|
73
|
-
/** The GTK signals this widget emits through `connect` — read by the shared-tree builder (ADR 0093). */
|
|
74
|
-
static readonly emittedSignals: readonly string[];
|
|
75
76
|
/**
|
|
76
77
|
* The names this widget's `_addChildFromBuilder` honours — see `./builder-slots.ts`.
|
|
77
78
|
* `Gtk.Button:child` is the property a `.blp` writes as `child: Adw.ButtonContent { … }`,
|
|
@@ -61,6 +61,9 @@ declare const GtkDropDown_base: ((abstract new (...args: any[]) => {
|
|
|
61
61
|
get_next_sibling(): object | null;
|
|
62
62
|
get_prev_sibling(): object | null;
|
|
63
63
|
get_parent(): object | null;
|
|
64
|
+
get_width(): number;
|
|
65
|
+
get_height(): number;
|
|
66
|
+
compute_point(target: object, point: import("@gjsify/adwaita-core").Point): [boolean, import("@gjsify/adwaita-core").Point];
|
|
64
67
|
insert_action_group(prefix: string, group: import("@gjsify/adwaita-core").ActionGroupLike | null): void;
|
|
65
68
|
get focusable(): boolean;
|
|
66
69
|
set focusable(value: boolean | string);
|
|
@@ -59,6 +59,9 @@ declare const GtkEntry_base: ((abstract new (...args: any[]) => {
|
|
|
59
59
|
get_next_sibling(): object | null;
|
|
60
60
|
get_prev_sibling(): object | null;
|
|
61
61
|
get_parent(): object | null;
|
|
62
|
+
get_width(): number;
|
|
63
|
+
get_height(): number;
|
|
64
|
+
compute_point(target: object, point: import("@gjsify/adwaita-core").Point): [boolean, import("@gjsify/adwaita-core").Point];
|
|
62
65
|
insert_action_group(prefix: string, group: import("@gjsify/adwaita-core").ActionGroupLike | null): void;
|
|
63
66
|
get focusable(): boolean;
|
|
64
67
|
set focusable(value: boolean | string);
|
|
@@ -57,6 +57,9 @@ declare const GtkImage_base: ((abstract new (...args: any[]) => {
|
|
|
57
57
|
get_next_sibling(): object | null;
|
|
58
58
|
get_prev_sibling(): object | null;
|
|
59
59
|
get_parent(): object | null;
|
|
60
|
+
get_width(): number;
|
|
61
|
+
get_height(): number;
|
|
62
|
+
compute_point(target: object, point: import("@gjsify/adwaita-core").Point): [boolean, import("@gjsify/adwaita-core").Point];
|
|
60
63
|
insert_action_group(prefix: string, group: import("@gjsify/adwaita-core").ActionGroupLike | null): void;
|
|
61
64
|
get focusable(): boolean;
|
|
62
65
|
set focusable(value: boolean | string);
|
|
@@ -47,6 +47,9 @@ declare const GtkLabel_base: ((abstract new (...args: any[]) => {
|
|
|
47
47
|
get_next_sibling(): object | null;
|
|
48
48
|
get_prev_sibling(): object | null;
|
|
49
49
|
get_parent(): object | null;
|
|
50
|
+
get_width(): number;
|
|
51
|
+
get_height(): number;
|
|
52
|
+
compute_point(target: object, point: import("@gjsify/adwaita-core").Point): [boolean, import("@gjsify/adwaita-core").Point];
|
|
50
53
|
insert_action_group(prefix: string, group: import("@gjsify/adwaita-core").ActionGroupLike | null): void;
|
|
51
54
|
get focusable(): boolean;
|
|
52
55
|
set focusable(value: boolean | string);
|
|
@@ -38,6 +38,11 @@ export declare class GtkMenuButton extends AdwImageButton {
|
|
|
38
38
|
*/
|
|
39
39
|
get menuModel(): AdwMenuModel;
|
|
40
40
|
set menuModel(value: AdwMenuInput);
|
|
41
|
+
/** `Gtk.MenuButton:menu-model` — the GIR spelling of {@link menuModel}. */
|
|
42
|
+
get menu_model(): AdwMenuModel;
|
|
43
|
+
set menu_model(value: AdwMenuInput);
|
|
44
|
+
get_menu_model(): AdwMenuModel;
|
|
45
|
+
set_menu_model(value: AdwMenuInput): void;
|
|
41
46
|
/**
|
|
42
47
|
* What the action group publishes about the actions this menu names — the portable
|
|
43
48
|
* stand-in for a `GActionGroup`. Left `null`, the registry above the button answers
|
|
@@ -50,6 +50,9 @@ declare const GtkPopoverMenu_base: ((abstract new (...args: any[]) => {
|
|
|
50
50
|
get_next_sibling(): object | null;
|
|
51
51
|
get_prev_sibling(): object | null;
|
|
52
52
|
get_parent(): object | null;
|
|
53
|
+
get_width(): number;
|
|
54
|
+
get_height(): number;
|
|
55
|
+
compute_point(target: object, point: import("@gjsify/adwaita-core").Point): [boolean, import("@gjsify/adwaita-core").Point];
|
|
53
56
|
insert_action_group(prefix: string, group: import("@gjsify/adwaita-core").ActionGroupLike | null): void;
|
|
54
57
|
get focusable(): boolean;
|
|
55
58
|
set focusable(value: boolean | string);
|
|
@@ -15,6 +15,8 @@ export declare class GtkScrolledWindow extends AdwSingleChildBase {
|
|
|
15
15
|
private _hasFrame;
|
|
16
16
|
private _hadjustment;
|
|
17
17
|
private _vadjustment;
|
|
18
|
+
private _listening;
|
|
19
|
+
private _syncing;
|
|
18
20
|
constructor(props?: ConstructProps<GtkScrolledWindow>);
|
|
19
21
|
/** `Gtk.ScrolledWindow:hscrollbar-policy` — a `Gtk.PolicyType`; defaults to `automatic`. */
|
|
20
22
|
get hscrollbarPolicy(): GtkPolicyNick;
|
|
@@ -26,13 +28,21 @@ export declare class GtkScrolledWindow extends AdwSingleChildBase {
|
|
|
26
28
|
get_policy(): [number, number];
|
|
27
29
|
/** `gtk_scrolled_window_set_policy`; a value that is not a `Gtk.PolicyType` constant throws. */
|
|
28
30
|
set_policy(hscrollbar_policy: number, vscrollbar_policy: number): void;
|
|
29
|
-
/**
|
|
31
|
+
/**
|
|
32
|
+
* `Gtk.ScrolledWindow:hadjustment` — the one it was given, else a window-owned one.
|
|
33
|
+
*
|
|
34
|
+
* Observable and kept in step with the `ScrollView` both ways: the scroll offset and the
|
|
35
|
+
* content/viewport sizes are configured into it, and a write to its value scrolls.
|
|
36
|
+
*/
|
|
30
37
|
get hadjustment(): GtkAdjustment;
|
|
31
38
|
get vadjustment(): GtkAdjustment;
|
|
32
39
|
get_hadjustment(): GtkAdjustment;
|
|
33
40
|
get_vadjustment(): GtkAdjustment;
|
|
34
41
|
set_hadjustment(adjustment: GtkAdjustment): void;
|
|
35
42
|
set_vadjustment(adjustment: GtkAdjustment): void;
|
|
43
|
+
private _track;
|
|
44
|
+
private readonly _syncAdjustments;
|
|
45
|
+
private _syncAxis;
|
|
36
46
|
/** `Gtk.ScrolledWindow:has-frame` — held and read back; no frame is drawn (see the header). */
|
|
37
47
|
get hasFrame(): boolean;
|
|
38
48
|
set hasFrame(raw: boolean | string);
|
|
@@ -57,6 +57,9 @@ declare const GtkStack_base: ((abstract new (...args: any[]) => {
|
|
|
57
57
|
get_next_sibling(): object | null;
|
|
58
58
|
get_prev_sibling(): object | null;
|
|
59
59
|
get_parent(): object | null;
|
|
60
|
+
get_width(): number;
|
|
61
|
+
get_height(): number;
|
|
62
|
+
compute_point(target: object, point: import("@gjsify/adwaita-core").Point): [boolean, import("@gjsify/adwaita-core").Point];
|
|
60
63
|
insert_action_group(prefix: string, group: import("@gjsify/adwaita-core").ActionGroupLike | null): void;
|
|
61
64
|
get focusable(): boolean;
|
|
62
65
|
set focusable(value: boolean | string);
|
|
@@ -120,6 +123,14 @@ export declare class GtkStack extends GtkStack_base {
|
|
|
120
123
|
/** `Gtk.Stack:visible-child` — the visible page's child, or `null`. */
|
|
121
124
|
get visibleChild(): View | null;
|
|
122
125
|
set visibleChild(child: View | null);
|
|
126
|
+
/** `gtk_stack_get_visible_child_name`. */
|
|
127
|
+
get_visible_child_name(): string | null;
|
|
128
|
+
/** `gtk_stack_set_visible_child_name`. */
|
|
129
|
+
set_visible_child_name(name: string): void;
|
|
130
|
+
/** `gtk_stack_get_visible_child`. */
|
|
131
|
+
get_visible_child(): View | null;
|
|
132
|
+
/** `gtk_stack_set_visible_child`. */
|
|
133
|
+
set_visible_child(child: View): void;
|
|
123
134
|
/** `Gtk.Stack:transition-type` — held and validated, never rendered. */
|
|
124
135
|
get transitionType(): GtkStackTransitionNick;
|
|
125
136
|
set transitionType(value: GtkStackTransitionNick);
|
|
@@ -59,6 +59,9 @@ declare const GtkTextView_base: ((abstract new (...args: any[]) => {
|
|
|
59
59
|
get_next_sibling(): object | null;
|
|
60
60
|
get_prev_sibling(): object | null;
|
|
61
61
|
get_parent(): object | null;
|
|
62
|
+
get_width(): number;
|
|
63
|
+
get_height(): number;
|
|
64
|
+
compute_point(target: object, point: import("@gjsify/adwaita-core").Point): [boolean, import("@gjsify/adwaita-core").Point];
|
|
62
65
|
insert_action_group(prefix: string, group: import("@gjsify/adwaita-core").ActionGroupLike | null): void;
|
|
63
66
|
get focusable(): boolean;
|
|
64
67
|
set focusable(value: boolean | string);
|
|
@@ -69,4 +69,11 @@ export declare class GtkWindow extends AdwSingleChildBase {
|
|
|
69
69
|
/** `GtkWindow:default-height` — held and read back; the screen is the height. */
|
|
70
70
|
get defaultHeight(): number;
|
|
71
71
|
set defaultHeight(value: number | string);
|
|
72
|
+
/** `gtk_window_get_default_size`: `[width, height]`, `[0, 0]` until one is set. */
|
|
73
|
+
get_default_size(): [number, number];
|
|
74
|
+
/**
|
|
75
|
+
* `gtk_window_set_default_size`: a value below -1 is refused as in GTK, an equal one does not
|
|
76
|
+
* notify, and `default-height` notifies before `default-width`.
|
|
77
|
+
*/
|
|
78
|
+
set_default_size(width: number, height: number): void;
|
|
72
79
|
}
|
|
@@ -14,8 +14,7 @@ export { AdwSpinRow, NOTIFY_VALUE, SpinState } from './adw-spin-row.js';
|
|
|
14
14
|
export type { NotifyValueEventData, SpinStateChange, SpinStateListener } from './adw-spin-row.js';
|
|
15
15
|
export { AdwSliderRow, NOTIFY_SLIDER_VALUE } from './adw-slider-row.js';
|
|
16
16
|
export type { NotifySliderValueEventData } from './adw-slider-row.js';
|
|
17
|
-
export { AdwExpanderRow,
|
|
18
|
-
export type { ExpanderStateListener, NotifyExpandedEventData } from './adw-expander-row.js';
|
|
17
|
+
export { AdwExpanderRow, NOTIFY_EXPANDED, NOTIFY_ENABLE_EXPANSION, NOTIFY_SHOW_ENABLE_SWITCH, NS_EXPANDER_ARROW_DISABLED_OPACITY, } from './adw-expander-row.js';
|
|
19
18
|
export { GtkButton, GTK_BUTTON_CLICKED, GTK_BUTTON_LABEL_CLASS } from './gtk-button.js';
|
|
20
19
|
export { buttonSlotAfterWrite, buttonSlotDetaches } from './button-slot.js';
|
|
21
20
|
export type { ButtonSlot, ButtonSlotWrite } from './button-slot.js';
|
|
@@ -44,6 +43,7 @@ export { revealerChildVisibility } from './revealer-state.js';
|
|
|
44
43
|
export type { RevealerChildVisibility } from './revealer-state.js';
|
|
45
44
|
export { GtkScrolledWindow } from './gtk-scrolled-window.js';
|
|
46
45
|
export { GtkWindow } from './gtk-window.js';
|
|
46
|
+
export { GtkApplicationWindow } from './gtk-application-window.js';
|
|
47
47
|
export { DEFAULT_SCROLLBAR_POLICY, GTK_POLICY_TYPES, normalizePolicy, policyScrolls, scrollOrientationFor, } from './scrolled-window-policy.js';
|
|
48
48
|
export type { GtkPolicyNick } from './scrolled-window-policy.js';
|
|
49
49
|
export { GtkStack, NOTIFY_STACK_VISIBLE_CHILD, NOTIFY_STACK_VISIBLE_CHILD_NAME } from './gtk-stack.js';
|
|
@@ -56,7 +56,12 @@ export interface GObjectSignals {
|
|
|
56
56
|
connect(eventName: string, callback: (self: this, data: EventData) => unknown): number;
|
|
57
57
|
/** Remove exactly the handler `connect` returned this id for. Throws on an id nothing holds. */
|
|
58
58
|
disconnect(handlerId: number): void;
|
|
59
|
-
/**
|
|
59
|
+
/**
|
|
60
|
+
* `g_signal_emit_by_name`: run every handler `connect` added for `eventName`, with `args` in the
|
|
61
|
+
* payload. Valid ONLY for a signal the class declares, or `notify::<declared prop>`; any other
|
|
62
|
+
* name throws as GJS does for an unknown signal. NativeScript's own events go through
|
|
63
|
+
* `notify({ eventName, object })`.
|
|
64
|
+
*/
|
|
60
65
|
emit(eventName: string, ...args: unknown[]): void;
|
|
61
66
|
/**
|
|
62
67
|
* `g_object_get_property`: the GTK property `name` (`'can-close'` or camel case). A
|
|
@@ -136,6 +141,9 @@ export declare function withSignals<TBase extends ObservableConstructor>(Base: T
|
|
|
136
141
|
get_next_sibling(): object | null;
|
|
137
142
|
get_prev_sibling(): object | null;
|
|
138
143
|
get_parent(): object | null;
|
|
144
|
+
get_width(): number;
|
|
145
|
+
get_height(): number;
|
|
146
|
+
compute_point(target: object, point: import("@gjsify/adwaita-core").Point): [boolean, import("@gjsify/adwaita-core").Point];
|
|
139
147
|
insert_action_group(prefix: string, group: import("@gjsify/adwaita-core").ActionGroupLike | null): void;
|
|
140
148
|
get focusable(): boolean;
|
|
141
149
|
set focusable(value: boolean | string);
|
|
@@ -56,6 +56,9 @@ declare const AdwSplitViewBase_base: ((abstract new (...args: any[]) => {
|
|
|
56
56
|
get_next_sibling(): object | null;
|
|
57
57
|
get_prev_sibling(): object | null;
|
|
58
58
|
get_parent(): object | null;
|
|
59
|
+
get_width(): number;
|
|
60
|
+
get_height(): number;
|
|
61
|
+
compute_point(target: object, point: import("@gjsify/adwaita-core").Point): [boolean, import("@gjsify/adwaita-core").Point];
|
|
59
62
|
insert_action_group(prefix: string, group: import("@gjsify/adwaita-core").ActionGroupLike | null): void;
|
|
60
63
|
get focusable(): boolean;
|
|
61
64
|
set focusable(value: boolean | string);
|
|
@@ -54,6 +54,9 @@ declare const GtkStackPage_base: ((abstract new (...args: any[]) => {
|
|
|
54
54
|
get_next_sibling(): object | null;
|
|
55
55
|
get_prev_sibling(): object | null;
|
|
56
56
|
get_parent(): object | null;
|
|
57
|
+
get_width(): number;
|
|
58
|
+
get_height(): number;
|
|
59
|
+
compute_point(target: object, point: import("@gjsify/adwaita-core").Point): [boolean, import("@gjsify/adwaita-core").Point];
|
|
57
60
|
insert_action_group(prefix: string, group: import("@gjsify/adwaita-core").ActionGroupLike | null): void;
|
|
58
61
|
get focusable(): boolean;
|
|
59
62
|
set focusable(value: boolean | string);
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
import { StyleManagerBase, type AdwColorScheme, type StyleSource } from '@gjsify/adwaita-core';
|
|
1
|
+
import { StyleManagerBase, type AdwAccentColorName, type AdwColorScheme, type StyleSource } from '@gjsify/adwaita-core';
|
|
2
2
|
/** The system's light/dark preference as a platform reports it. */
|
|
3
3
|
export interface SystemAppearance {
|
|
4
4
|
/** The current preference, `null` while the platform cannot tell. */
|
|
5
5
|
current(): AdwColorScheme | null;
|
|
6
6
|
/** Calls `changed` with each new preference; returns the unsubscribe. */
|
|
7
|
-
subscribe(changed: (scheme: AdwColorScheme) => void): () => void;
|
|
7
|
+
subscribe(changed: (scheme: AdwColorScheme | null) => void): () => void;
|
|
8
|
+
/** Whether the system asks for more contrast; absent means it cannot. */
|
|
9
|
+
highContrast?(): boolean;
|
|
10
|
+
/** The system accent snapped to one of the nine; `null` or absent when it has none. */
|
|
11
|
+
accentColor?(): AdwAccentColorName | null;
|
|
8
12
|
}
|
|
13
|
+
export declare function setAccentPainter(next: ((accent: AdwAccentColorName) => void) | null): void;
|
|
9
14
|
/**
|
|
10
15
|
* Hand the source the system's appearance (or take it away with `null`). From then on the scheme
|
|
11
16
|
* follows the system while no `FORCE_*` scheme pins it, and `system_supports_color_schemes` answers
|
|
@@ -46,6 +46,9 @@ declare const AdwStyledLayoutBase_base: ((abstract new (...args: any[]) => {
|
|
|
46
46
|
get_next_sibling(): object | null;
|
|
47
47
|
get_prev_sibling(): object | null;
|
|
48
48
|
get_parent(): object | null;
|
|
49
|
+
get_width(): number;
|
|
50
|
+
get_height(): number;
|
|
51
|
+
compute_point(target: object, point: import("@gjsify/adwaita-core").Point): [boolean, import("@gjsify/adwaita-core").Point];
|
|
49
52
|
insert_action_group(prefix: string, group: import("@gjsify/adwaita-core").ActionGroupLike | null): void;
|
|
50
53
|
get focusable(): boolean;
|
|
51
54
|
set focusable(value: boolean | string);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type AdwAccentColorName } from '@gjsify/adwaita-core';
|
|
2
|
+
/** The slice of the `android` global read here; absent off Android, so every hop is a refusal. */
|
|
3
|
+
export interface AndroidGlobals {
|
|
4
|
+
os?: {
|
|
5
|
+
Build?: {
|
|
6
|
+
VERSION?: {
|
|
7
|
+
SDK_INT?: number;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export interface AndroidContext {
|
|
13
|
+
getSystemService(name: string): {
|
|
14
|
+
getContrast?(): number;
|
|
15
|
+
} | null;
|
|
16
|
+
getResources?(): {
|
|
17
|
+
getIdentifier(name: string, type: string, pkg: string): number;
|
|
18
|
+
} | null;
|
|
19
|
+
getColor?(id: number): number;
|
|
20
|
+
}
|
|
21
|
+
export declare function systemHighContrast(android: AndroidGlobals | undefined, context: AndroidContext | null): boolean;
|
|
22
|
+
export declare function systemAccent(android: AndroidGlobals | undefined, context: AndroidContext | null): AdwAccentColorName | null;
|
|
@@ -54,6 +54,9 @@ declare const AdwViewStackPage_base: ((abstract new (...args: any[]) => {
|
|
|
54
54
|
get_next_sibling(): object | null;
|
|
55
55
|
get_prev_sibling(): object | null;
|
|
56
56
|
get_parent(): object | null;
|
|
57
|
+
get_width(): number;
|
|
58
|
+
get_height(): number;
|
|
59
|
+
compute_point(target: object, point: import("@gjsify/adwaita-core").Point): [boolean, import("@gjsify/adwaita-core").Point];
|
|
57
60
|
insert_action_group(prefix: string, group: import("@gjsify/adwaita-core").ActionGroupLike | null): void;
|
|
58
61
|
get focusable(): boolean;
|
|
59
62
|
set focusable(value: boolean | string);
|
|
@@ -58,6 +58,9 @@ declare const AdwViewSwitcherBase_base: ((abstract new (...args: any[]) => {
|
|
|
58
58
|
get_next_sibling(): object | null;
|
|
59
59
|
get_prev_sibling(): object | null;
|
|
60
60
|
get_parent(): object | null;
|
|
61
|
+
get_width(): number;
|
|
62
|
+
get_height(): number;
|
|
63
|
+
compute_point(target: object, point: import("@gjsify/adwaita-core").Point): [boolean, import("@gjsify/adwaita-core").Point];
|
|
61
64
|
insert_action_group(prefix: string, group: import("@gjsify/adwaita-core").ActionGroupLike | null): void;
|
|
62
65
|
get focusable(): boolean;
|
|
63
66
|
set focusable(value: boolean | string);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Observable } from '@nativescript/core';
|
|
2
|
-
import type
|
|
2
|
+
import { Point, type ActionGroupLike } from '@gjsify/adwaita-core';
|
|
3
3
|
/**
|
|
4
4
|
* A constructor the mixin can wrap — the same shape `withSignals` accepts, restated here so
|
|
5
5
|
* this module does not import the one that applies it.
|
|
@@ -92,6 +92,12 @@ export declare abstract class GtkWidgetLayoutMembers {
|
|
|
92
92
|
get_next_sibling(): object | null;
|
|
93
93
|
get_prev_sibling(): object | null;
|
|
94
94
|
get_parent(): object | null;
|
|
95
|
+
/** `gtk_widget_get_width`: the allocated width in DIPs; 0 until a layout pass ran. */
|
|
96
|
+
get_width(): number;
|
|
97
|
+
/** `gtk_widget_get_height`: the allocated height in DIPs; 0 until a layout pass ran. */
|
|
98
|
+
get_height(): number;
|
|
99
|
+
/** `gtk_widget_compute_point`: `[false, (0, 0)]` when the two views share no tree. */
|
|
100
|
+
compute_point(target: object, point: Point): [boolean, Point];
|
|
95
101
|
/** `gtk_widget_insert_action_group`: `null` removes the group of `prefix`. */
|
|
96
102
|
insert_action_group(prefix: string, group: ActionGroupLike | null): void;
|
|
97
103
|
get focusable(): boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/adwaita-nativescript",
|
|
3
|
-
"version": "0.64.
|
|
3
|
+
"version": "0.64.12-next.280",
|
|
4
4
|
"description": "Native Adwaita widgets for the NativeScript runtime — real NativeScript components (StackLayout/GridLayout/Switch/Label) styled like Libadwaita, not a webview",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "lib/esm/index.js",
|
|
@@ -73,15 +73,15 @@
|
|
|
73
73
|
"design-system"
|
|
74
74
|
],
|
|
75
75
|
"dependencies": {
|
|
76
|
-
"@gjsify/adwaita-core": "
|
|
77
|
-
"@gjsify/adwaita-fonts": "
|
|
78
|
-
"@gjsify/adwaita-icons": "
|
|
79
|
-
"@gjsify/canvas2d-core": "
|
|
80
|
-
"@gjsify/native-platform": "
|
|
76
|
+
"@gjsify/adwaita-core": "0.64.12-next.280",
|
|
77
|
+
"@gjsify/adwaita-fonts": "0.64.12-next.280",
|
|
78
|
+
"@gjsify/adwaita-icons": "0.64.12-next.280",
|
|
79
|
+
"@gjsify/canvas2d-core": "0.64.12-next.280",
|
|
80
|
+
"@gjsify/native-platform": "0.64.12-next.280"
|
|
81
81
|
},
|
|
82
82
|
"peerDependencies": {
|
|
83
83
|
"@nativescript/core": "*",
|
|
84
|
-
"@gjsify/app-settings": "
|
|
84
|
+
"@gjsify/app-settings": "0.64.12-next.280"
|
|
85
85
|
},
|
|
86
86
|
"peerDependenciesMeta": {
|
|
87
87
|
"@nativescript/core": {
|
|
@@ -92,11 +92,11 @@
|
|
|
92
92
|
}
|
|
93
93
|
},
|
|
94
94
|
"devDependencies": {
|
|
95
|
-
"@gjsify/app-settings": "
|
|
96
|
-
"@gjsify/blueprint": "
|
|
97
|
-
"@gjsify/cli": "
|
|
98
|
-
"@gjsify/unit": "
|
|
99
|
-
"@gjsify/vite-plugin-blueprint": "
|
|
95
|
+
"@gjsify/app-settings": "0.64.12-next.280",
|
|
96
|
+
"@gjsify/blueprint": "0.64.12-next.280",
|
|
97
|
+
"@gjsify/cli": "0.64.12-next.280",
|
|
98
|
+
"@gjsify/unit": "0.64.12-next.280",
|
|
99
|
+
"@gjsify/vite-plugin-blueprint": "0.64.12-next.280",
|
|
100
100
|
"@types/node": "^25.9.2",
|
|
101
101
|
"typescript": "^6.0.3"
|
|
102
102
|
},
|
|
@@ -125,5 +125,6 @@
|
|
|
125
125
|
"bugs": {
|
|
126
126
|
"url": "https://github.com/gjsify/gjsify/issues"
|
|
127
127
|
},
|
|
128
|
-
"homepage": "https://github.com/gjsify/gjsify/tree/main/packages/nativescript-bridge/adwaita#readme"
|
|
128
|
+
"homepage": "https://github.com/gjsify/gjsify/tree/main/packages/nativescript-bridge/adwaita#readme",
|
|
129
|
+
"gitHead": "0a9185d91127072fce6aa54dc126e87e6ecd0c3d"
|
|
129
130
|
}
|
package/src/testing/ns-core.mts
CHANGED
|
@@ -532,6 +532,10 @@ export class LayoutBase extends View {
|
|
|
532
532
|
return this.#children[index];
|
|
533
533
|
}
|
|
534
534
|
|
|
535
|
+
getChildIndex(child: View): number {
|
|
536
|
+
return this.#children.indexOf(child);
|
|
537
|
+
}
|
|
538
|
+
|
|
535
539
|
getChildrenCount(): number {
|
|
536
540
|
return this.#children.length;
|
|
537
541
|
}
|
|
@@ -738,21 +742,6 @@ export class Button extends View {
|
|
|
738
742
|
text = '';
|
|
739
743
|
}
|
|
740
744
|
|
|
741
|
-
export class ScrollView extends View {
|
|
742
|
-
orientation: 'horizontal' | 'vertical' = 'vertical';
|
|
743
|
-
content: View = null;
|
|
744
|
-
readonly horizontalOffset: number = 0;
|
|
745
|
-
readonly verticalOffset: number = 0;
|
|
746
|
-
|
|
747
|
-
scrollToHorizontalOffset(_value: number, _animated: boolean): void {}
|
|
748
|
-
|
|
749
|
-
scrollToVerticalOffset(_value: number, _animated: boolean): void {}
|
|
750
|
-
|
|
751
|
-
eachChildView(callback: (child: View) => boolean): void {
|
|
752
|
-
if (this.content) callback(this.content);
|
|
753
|
-
}
|
|
754
|
-
}
|
|
755
|
-
|
|
756
745
|
/**
|
|
757
746
|
* Upstream's `content` setter (`ui/content-view/index.ts`) `_removeView`s the old view and
|
|
758
747
|
* `_addView`s the new one, and `eachChildView` answers that one view — so the tree members see
|
|
@@ -789,6 +778,23 @@ export class ContentView extends LayoutBase {
|
|
|
789
778
|
}
|
|
790
779
|
}
|
|
791
780
|
|
|
781
|
+
/** Upstream's `ScrollView` is a `ContentView`: its content is `_addView`ed, so it has the scroller as its parent. */
|
|
782
|
+
export class ScrollView extends ContentView {
|
|
783
|
+
orientation: 'horizontal' | 'vertical' = 'vertical';
|
|
784
|
+
horizontalOffset: number = 0;
|
|
785
|
+
verticalOffset: number = 0;
|
|
786
|
+
|
|
787
|
+
scrollToHorizontalOffset(value: number, _animated: boolean): void {
|
|
788
|
+
this.horizontalOffset = value;
|
|
789
|
+
this.notify({ eventName: 'scroll', object: this, scrollX: value, scrollY: this.verticalOffset });
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
scrollToVerticalOffset(value: number, _animated: boolean): void {
|
|
793
|
+
this.verticalOffset = value;
|
|
794
|
+
this.notify({ eventName: 'scroll', object: this, scrollX: this.horizontalOffset, scrollY: value });
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
|
|
792
798
|
export class WrapLayout extends LayoutBase {
|
|
793
799
|
orientation: 'horizontal' | 'vertical' = 'horizontal';
|
|
794
800
|
itemWidth = 0;
|
package/src/theme/adwaita.css
CHANGED
|
@@ -469,15 +469,36 @@ Page.adw-window {
|
|
|
469
469
|
* a 32 tap target it never got. `color` and `font-size` were dead for the other
|
|
470
470
|
* reason: it is an `Image` of a pre-coloured bitmap.
|
|
471
471
|
*
|
|
472
|
-
* The tap target is
|
|
473
|
-
*
|
|
474
|
-
* tapping anywhere on it", adw-expander-row.ui:25-27)
|
|
475
|
-
*
|
|
472
|
+
* The tap target is NOT this rule's business either (#1155): the row listens on the
|
|
473
|
+
* title/subtitle stack as well as the chevron, which is how libadwaita's activatable
|
|
474
|
+
* header row reads ("tapping anywhere on it", adw-expander-row.ui:25-27). The
|
|
475
|
+
* chevron's own 16 is upstream's minimum and stays it.
|
|
476
|
+
*
|
|
477
|
+
* `opacity` here is the RESTING 70%; the chevron's second opacity — the disabled
|
|
478
|
+
* 50% of `sensitive` — is assigned by the widget, because the NS CSS subset has no
|
|
479
|
+
* widget states to select on (`NS_EXPANDER_ARROW_DISABLED_OPACITY`). NS multiplies
|
|
480
|
+
* neither: a local `opacity` write wins over this one outright. */
|
|
476
481
|
.adw-expander-toggle {
|
|
477
482
|
opacity: 0.7;
|
|
478
483
|
margin: 0;
|
|
479
484
|
}
|
|
480
485
|
|
|
486
|
+
/* The trailing cluster, in the `.ui`'s order: the suffixes box, the enable switch,
|
|
487
|
+
* the chevron. `> .suffixes { border-spacing: 6px }` (_lists.scss:155-161) is the 6
|
|
488
|
+
* between them — a `StackLayout` has no spacing, so it is a leading margin on each
|
|
489
|
+
* part instead. The suffixes BOX carries none of its own: it collapses while empty
|
|
490
|
+
* (`adw_expander_row_add_suffix` is what makes it visible), and a margin on a
|
|
491
|
+
* collapsed view would still be a gap. */
|
|
492
|
+
.adw-expander-row-cluster {
|
|
493
|
+
vertical-align: center;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
.adw-expander-row-cluster .adw-switch,
|
|
497
|
+
.adw-expander-row-cluster .adw-expander-toggle,
|
|
498
|
+
.adw-expander-row-suffixes .adw-row-suffix {
|
|
499
|
+
margin: 0 0 0 6;
|
|
500
|
+
}
|
|
501
|
+
|
|
481
502
|
.adw-expander-disclosure {
|
|
482
503
|
background-color: #fafafb;
|
|
483
504
|
margin: 8 0 0 0;
|