@gjsify/adwaita-nativescript 0.64.12-next.279 → 0.64.12-next.281
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/builder/index.js +1 -1
- package/lib/esm/builder/param-values.js +1 -1
- package/lib/esm/gobject-siblings.d.blp.js +0 -0
- 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/gio.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-button-content.js +1 -1
- package/lib/esm/widgets/adw-button-row.js +1 -1
- package/lib/esm/widgets/adw-combo-row.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-split-button.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-check-button.js +1 -1
- package/lib/esm/widgets/gtk-drop-down.js +1 -1
- package/lib/esm/widgets/gtk-list-box.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/split-button.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/builder/index.d.ts +5 -2
- package/lib/types/button-content-properties.spec.d.ts +1 -0
- 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/gio.d.ts +1 -0
- package/lib/types/namespace/graphene.d.ts +1 -0
- package/lib/types/namespace/gtk.d.ts +2 -1
- package/lib/types/split-button-properties.spec.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 +24 -13
- 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-combo-row.d.ts +1 -1
- 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 +31 -29
- 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 +4 -1
- 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 +10 -2
- package/lib/types/widgets/index.d.ts +4 -4
- package/lib/types/widgets/signals.d.ts +9 -1
- package/lib/types/widgets/split-button.d.ts +1 -10
- 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 +13 -13
- package/src/testing/ns-core.mts +21 -15
- package/src/theme/adwaita.css +25 -4
|
@@ -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);
|
|
@@ -50,8 +50,9 @@ export declare class GtkWindow extends AdwSingleChildBase {
|
|
|
50
50
|
close(): void;
|
|
51
51
|
private _requestClose;
|
|
52
52
|
/**
|
|
53
|
-
* What the back button does, in order: the topmost dialog,
|
|
54
|
-
* `close-request`.
|
|
53
|
+
* What the back button does, in order: the topmost dialog, an open bottom sheet, the innermost
|
|
54
|
+
* navigation view, then `close-request`. The sheet sits over the content a navigation view lives
|
|
55
|
+
* in, and libadwaita closes it on Escape before anything under it sees the key. Always consumes the press — the system's own back would `finish()` too, but
|
|
55
56
|
* without asking the handlers.
|
|
56
57
|
*/
|
|
57
58
|
private _handleBack;
|
|
@@ -69,4 +70,11 @@ export declare class GtkWindow extends AdwSingleChildBase {
|
|
|
69
70
|
/** `GtkWindow:default-height` — held and read back; the screen is the height. */
|
|
70
71
|
get defaultHeight(): number;
|
|
71
72
|
set defaultHeight(value: number | string);
|
|
73
|
+
/** `gtk_window_get_default_size`: `[width, height]`, `[0, 0]` until one is set. */
|
|
74
|
+
get_default_size(): [number, number];
|
|
75
|
+
/**
|
|
76
|
+
* `gtk_window_set_default_size`: a value below -1 is refused as in GTK, an equal one does not
|
|
77
|
+
* notify, and `default-height` notifies before `default-width`.
|
|
78
|
+
*/
|
|
79
|
+
set_default_size(width: number, height: number): void;
|
|
72
80
|
}
|
|
@@ -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';
|
|
@@ -85,8 +85,8 @@ export type { DataGridItemSpec } from './data-grid-model.js';
|
|
|
85
85
|
export { AdwSpinner, DEFAULT_SPINNER_SIZE } from './adw-spinner.js';
|
|
86
86
|
export { AdwStatusPage } from './adw-status-page.js';
|
|
87
87
|
export { AdwButtonRow, ACTIVATED } from './adw-button-row.js';
|
|
88
|
-
export { AdwButtonContent } from './adw-button-content.js';
|
|
89
|
-
export { AdwSplitButton,
|
|
88
|
+
export { AdwButtonContent, NOTIFY_BUTTON_CONTENT_ICON_NAME, NOTIFY_BUTTON_CONTENT_LABEL, NOTIFY_BUTTON_CONTENT_USE_UNDERLINE, NOTIFY_BUTTON_CONTENT_CAN_SHRINK, } from './adw-button-content.js';
|
|
89
|
+
export { AdwSplitButton, MENU_TAPPED } from './adw-split-button.js';
|
|
90
90
|
export type { MenuTappedEventData } from './adw-split-button.js';
|
|
91
91
|
export { AdwToggleGroup, NOTIFY_SELECTED as NOTIFY_TOGGLE_SELECTED, ToggleGroupState } from './adw-toggle-group.js';
|
|
92
92
|
export { AdwToggle } from './adw-toggle.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);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AdwArrowIcon, SplitButtonDirection
|
|
1
|
+
import type { AdwArrowIcon, SplitButtonDirection } from '@gjsify/adwaita-core';
|
|
2
2
|
export type { SplitButtonDirection };
|
|
3
3
|
/**
|
|
4
4
|
* The libadwaita arrow glyph names mapped to real Adwaita symbolic SVGs. Keyed by
|
|
@@ -8,12 +8,3 @@ export type { SplitButtonDirection };
|
|
|
8
8
|
export declare const ARROW_SVGS: Readonly<Record<AdwArrowIcon, string>>;
|
|
9
9
|
/** The arrow SVG for a direction; the split button's `none` is the down caret, not a hamburger. */
|
|
10
10
|
export declare function splitButtonArrowSvg(direction: SplitButtonDirection): string;
|
|
11
|
-
/**
|
|
12
|
-
* Apply `AdwSplitButton.iconName = svg` to the content machine. The SVG string IS
|
|
13
|
-
* the icon identity on NativeScript, so it goes where GTK puts the icon NAME.
|
|
14
|
-
*
|
|
15
|
-
* C offers no "unset the icon", only the side effect of filling another slot, so an
|
|
16
|
-
* empty SVG clears the content and lets the label half take over again — what a
|
|
17
|
-
* caller assigning `iconName` from a nullable lookup expects.
|
|
18
|
-
*/
|
|
19
|
-
export declare function setActionIcon(state: SplitButtonState, svg: string | null | undefined): void;
|
|
@@ -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.12-next.
|
|
3
|
+
"version": "0.64.12-next.281",
|
|
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": "0.64.12-next.
|
|
77
|
-
"@gjsify/adwaita-fonts": "0.64.12-next.
|
|
78
|
-
"@gjsify/adwaita-icons": "0.64.12-next.
|
|
79
|
-
"@gjsify/canvas2d-core": "0.64.12-next.
|
|
80
|
-
"@gjsify/native-platform": "0.64.12-next.
|
|
76
|
+
"@gjsify/adwaita-core": "0.64.12-next.281",
|
|
77
|
+
"@gjsify/adwaita-fonts": "0.64.12-next.281",
|
|
78
|
+
"@gjsify/adwaita-icons": "0.64.12-next.281",
|
|
79
|
+
"@gjsify/canvas2d-core": "0.64.12-next.281",
|
|
80
|
+
"@gjsify/native-platform": "0.64.12-next.281"
|
|
81
81
|
},
|
|
82
82
|
"peerDependencies": {
|
|
83
83
|
"@nativescript/core": "*",
|
|
84
|
-
"@gjsify/app-settings": "0.64.12-next.
|
|
84
|
+
"@gjsify/app-settings": "0.64.12-next.281"
|
|
85
85
|
},
|
|
86
86
|
"peerDependenciesMeta": {
|
|
87
87
|
"@nativescript/core": {
|
|
@@ -92,11 +92,11 @@
|
|
|
92
92
|
}
|
|
93
93
|
},
|
|
94
94
|
"devDependencies": {
|
|
95
|
-
"@gjsify/app-settings": "0.64.12-next.
|
|
96
|
-
"@gjsify/blueprint": "0.64.12-next.
|
|
97
|
-
"@gjsify/cli": "0.64.12-next.
|
|
98
|
-
"@gjsify/unit": "0.64.12-next.
|
|
99
|
-
"@gjsify/vite-plugin-blueprint": "0.64.12-next.
|
|
95
|
+
"@gjsify/app-settings": "0.64.12-next.281",
|
|
96
|
+
"@gjsify/blueprint": "0.64.12-next.281",
|
|
97
|
+
"@gjsify/cli": "0.64.12-next.281",
|
|
98
|
+
"@gjsify/unit": "0.64.12-next.281",
|
|
99
|
+
"@gjsify/vite-plugin-blueprint": "0.64.12-next.281",
|
|
100
100
|
"@types/node": "^25.9.2",
|
|
101
101
|
"typescript": "^6.0.3"
|
|
102
102
|
},
|
|
@@ -126,5 +126,5 @@
|
|
|
126
126
|
"url": "https://github.com/gjsify/gjsify/issues"
|
|
127
127
|
},
|
|
128
128
|
"homepage": "https://github.com/gjsify/gjsify/tree/main/packages/nativescript-bridge/adwaita#readme",
|
|
129
|
-
"gitHead": "
|
|
129
|
+
"gitHead": "c4d2e266c0d9849860b9828c14ebfe37b6d493b8"
|
|
130
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;
|