@gjsify/adwaita-nativescript 0.64.2 → 0.64.3-next.262
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/language-host.js +1 -0
- package/lib/esm/language-source.android.js +1 -0
- package/lib/esm/language-source.ios.js +1 -0
- package/lib/esm/language-source.js +1 -0
- package/lib/esm/namespace/adw.js +1 -1
- package/lib/esm/namespace/glib.js +1 -1
- package/lib/esm/namespace/gobject.js +1 -1
- package/lib/esm/widgets/adw-about-dialog.js +7 -2
- package/lib/esm/widgets/adw-action-row.js +1 -1
- package/lib/esm/widgets/adw-button-row.js +1 -1
- package/lib/esm/widgets/adw-dialog.js +1 -1
- package/lib/esm/widgets/adw-entry-row.js +1 -1
- package/lib/esm/widgets/adw-password-entry-row.js +1 -1
- package/lib/esm/widgets/adw-preferences-dialog.js +1 -1
- package/lib/esm/widgets/adw-preferences-group.js +1 -1
- package/lib/esm/widgets/adw-preferences-page.js +1 -1
- package/lib/esm/widgets/adw-spinner.js +1 -1
- package/lib/esm/widgets/adw-switch-row.js +1 -1
- package/lib/esm/widgets/adw-window-title.js +1 -1
- package/lib/esm/widgets/gtk-check-button.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 -0
- package/lib/esm/widgets/style-manager.js +1 -1
- package/lib/esm/widgets/widget-layout.js +1 -1
- package/lib/esm/widgets/window-state.js +1 -1
- package/lib/types/about-dialog-credits.spec.d.ts +1 -0
- package/lib/types/about-dialog-links.spec.d.ts +1 -0
- package/lib/types/action-row-properties.spec.d.ts +2 -0
- package/lib/types/entry-row-properties.spec.d.ts +2 -0
- package/lib/types/index.d.ts +2 -2
- package/lib/types/language-host.d.ts +3 -0
- package/lib/types/language-source.android.d.ts +1 -0
- package/lib/types/language-source.d.ts +1 -0
- package/lib/types/language-source.ios.d.ts +1 -0
- package/lib/types/namespace/adw.d.ts +1 -1
- package/lib/types/namespace/glib.d.ts +4 -2
- package/lib/types/signals-gobject.spec.d.ts +2 -0
- package/lib/types/signals.spec.d.ts +24 -0
- package/lib/types/spinner-properties.spec.d.ts +2 -0
- package/lib/types/switch-row-properties.spec.d.ts +2 -0
- package/lib/types/testing/ns-core.d.mts +6 -0
- package/lib/types/widgets/adw-about-dialog.d.ts +84 -16
- package/lib/types/widgets/adw-action-row.d.ts +50 -21
- package/lib/types/widgets/adw-alert-dialog.d.ts +6 -2
- package/lib/types/widgets/adw-avatar.d.ts +6 -2
- package/lib/types/widgets/adw-banner.d.ts +6 -2
- package/lib/types/widgets/adw-bottom-sheet.d.ts +6 -2
- package/lib/types/widgets/adw-button-content.d.ts +6 -2
- package/lib/types/widgets/adw-carousel.d.ts +6 -2
- package/lib/types/widgets/adw-clamp.d.ts +6 -2
- package/lib/types/widgets/adw-data-grid.d.ts +6 -2
- package/lib/types/widgets/adw-dialog.d.ts +8 -1
- package/lib/types/widgets/adw-entry-row.d.ts +85 -48
- package/lib/types/widgets/adw-header-bar.d.ts +6 -2
- package/lib/types/widgets/adw-image-button.d.ts +6 -2
- package/lib/types/widgets/adw-navigation-page.d.ts +6 -2
- package/lib/types/widgets/adw-navigation-view.d.ts +6 -2
- package/lib/types/widgets/adw-password-entry-row.d.ts +6 -1
- package/lib/types/widgets/adw-preferences-dialog.d.ts +15 -82
- package/lib/types/widgets/adw-preferences-group.d.ts +25 -2
- package/lib/types/widgets/adw-preferences-page.d.ts +26 -2
- package/lib/types/widgets/adw-shortcut-label.d.ts +6 -2
- package/lib/types/widgets/adw-sidebar.d.ts +6 -2
- package/lib/types/widgets/adw-slider-row.d.ts +6 -2
- package/lib/types/widgets/adw-spinner.d.ts +24 -16
- package/lib/types/widgets/adw-split-button.d.ts +6 -2
- package/lib/types/widgets/adw-status-page.d.ts +6 -2
- package/lib/types/widgets/adw-switch-row.d.ts +25 -20
- package/lib/types/widgets/adw-tab-view.d.ts +6 -2
- package/lib/types/widgets/adw-toast-overlay.d.ts +6 -2
- package/lib/types/widgets/adw-toggle-group.d.ts +6 -2
- package/lib/types/widgets/adw-toggle.d.ts +6 -2
- package/lib/types/widgets/adw-toolbar-view.d.ts +6 -2
- package/lib/types/widgets/adw-view-stack.d.ts +6 -2
- package/lib/types/widgets/adw-view-switcher-bar.d.ts +6 -2
- package/lib/types/widgets/adw-window-title.d.ts +16 -12
- package/lib/types/widgets/adw-wrap-box.d.ts +6 -2
- package/lib/types/widgets/carousel-indicator-base.d.ts +6 -2
- package/lib/types/widgets/gtk-action-bar.d.ts +6 -2
- package/lib/types/widgets/gtk-button.d.ts +6 -2
- package/lib/types/widgets/gtk-check-button.d.ts +10 -1
- package/lib/types/widgets/gtk-drop-down.d.ts +6 -2
- package/lib/types/widgets/gtk-entry.d.ts +6 -2
- package/lib/types/widgets/gtk-image.d.ts +6 -2
- package/lib/types/widgets/gtk-label.d.ts +6 -2
- package/lib/types/widgets/gtk-popover-menu.d.ts +6 -2
- package/lib/types/widgets/gtk-stack.d.ts +6 -2
- package/lib/types/widgets/gtk-text-view.d.ts +6 -2
- package/lib/types/widgets/index.d.ts +1 -3
- package/lib/types/widgets/signals.d.ts +81 -3
- package/lib/types/widgets/split-view-base.d.ts +6 -2
- package/lib/types/widgets/stack-page.d.ts +6 -2
- package/lib/types/widgets/style-manager-host.d.ts +2 -0
- package/lib/types/widgets/style-manager.d.ts +14 -1
- package/lib/types/widgets/styled-layout-base.d.ts +6 -2
- package/lib/types/widgets/view-stack-page.d.ts +6 -2
- package/lib/types/widgets/view-switcher-base.d.ts +6 -2
- package/lib/types/widgets/widget-layout.d.ts +4 -0
- package/lib/types/widgets/window-state.d.ts +26 -0
- package/lib/types/window-title-properties.spec.d.ts +2 -0
- package/package.json +14 -13
- package/src/testing/ns-core.mts +20 -0
- package/src/theme/adwaita.css +31 -4
|
@@ -14,6 +14,8 @@ export interface NotifyEntryTextEventData extends EventData {
|
|
|
14
14
|
textLength: number;
|
|
15
15
|
}
|
|
16
16
|
declare const GtkEntry_base: ((abstract new (...args: any[]) => {
|
|
17
|
+
addEventListener(eventName: string, callback: (data: EventData) => void, thisArg?: unknown, once?: boolean): void;
|
|
18
|
+
removeEventListener(eventName: string, callback?: (data: EventData) => void, thisArg?: unknown): void;
|
|
17
19
|
connect(eventName: string, callback: (self: /*elided*/ any, data: EventData) => unknown): number;
|
|
18
20
|
disconnect(handlerId: number): void;
|
|
19
21
|
emit(eventName: string, ...args: unknown[]): void;
|
|
@@ -60,10 +62,12 @@ declare const GtkEntry_base: ((abstract new (...args: any[]) => {
|
|
|
60
62
|
insert_action_group(prefix: string, group: import("@gjsify/adwaita-core").ActionGroupLike | null): void;
|
|
61
63
|
get focusable(): boolean;
|
|
62
64
|
set focusable(value: boolean | string);
|
|
65
|
+
get focusOnClick(): boolean;
|
|
66
|
+
set focusOnClick(value: boolean | string);
|
|
67
|
+
get_focus_on_click(): boolean;
|
|
68
|
+
set_focus_on_click(focusOnClick: boolean): void;
|
|
63
69
|
grab_focus(): boolean;
|
|
64
70
|
_emit(eventName: string): void;
|
|
65
|
-
addEventListener(eventName: string, callback: (data: EventData) => void, thisArg?: unknown, once?: boolean): void;
|
|
66
|
-
removeEventListener(eventName: string, callback?: (data: EventData) => void, thisArg?: unknown): void;
|
|
67
71
|
notify<T extends EventData>(data: T): void;
|
|
68
72
|
notifyPropertyChange(name: string, value: unknown, oldValue?: unknown): void;
|
|
69
73
|
set(name: string, value: unknown): void;
|
|
@@ -12,6 +12,8 @@ import { type ConstructProps } from './construct-props.js';
|
|
|
12
12
|
*/
|
|
13
13
|
export declare const DEFAULT_GTK_IMAGE_SIZE: number;
|
|
14
14
|
declare const GtkImage_base: ((abstract new (...args: any[]) => {
|
|
15
|
+
addEventListener(eventName: string, callback: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown, once?: boolean): void;
|
|
16
|
+
removeEventListener(eventName: string, callback?: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown): void;
|
|
15
17
|
connect(eventName: string, callback: (self: /*elided*/ any, data: import("@nativescript/core").EventData) => unknown): number;
|
|
16
18
|
disconnect(handlerId: number): void;
|
|
17
19
|
emit(eventName: string, ...args: unknown[]): void;
|
|
@@ -58,10 +60,12 @@ declare const GtkImage_base: ((abstract new (...args: any[]) => {
|
|
|
58
60
|
insert_action_group(prefix: string, group: import("@gjsify/adwaita-core").ActionGroupLike | null): void;
|
|
59
61
|
get focusable(): boolean;
|
|
60
62
|
set focusable(value: boolean | string);
|
|
63
|
+
get focusOnClick(): boolean;
|
|
64
|
+
set focusOnClick(value: boolean | string);
|
|
65
|
+
get_focus_on_click(): boolean;
|
|
66
|
+
set_focus_on_click(focusOnClick: boolean): void;
|
|
61
67
|
grab_focus(): boolean;
|
|
62
68
|
_emit(eventName: string): void;
|
|
63
|
-
addEventListener(eventName: string, callback: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown, once?: boolean): void;
|
|
64
|
-
removeEventListener(eventName: string, callback?: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown): void;
|
|
65
69
|
notify<T extends import("@nativescript/core").EventData>(data: T): void;
|
|
66
70
|
notifyPropertyChange(name: string, value: unknown, oldValue?: unknown): void;
|
|
67
71
|
set(name: string, value: unknown): void;
|
|
@@ -2,6 +2,8 @@ import { Label } from '@nativescript/core';
|
|
|
2
2
|
import { type LabelEllipsizeMode, type LabelJustification } from '@gjsify/adwaita-core';
|
|
3
3
|
import { type ConstructProps } from './construct-props.js';
|
|
4
4
|
declare const GtkLabel_base: ((abstract new (...args: any[]) => {
|
|
5
|
+
addEventListener(eventName: string, callback: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown, once?: boolean): void;
|
|
6
|
+
removeEventListener(eventName: string, callback?: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown): void;
|
|
5
7
|
connect(eventName: string, callback: (self: /*elided*/ any, data: import("@nativescript/core").EventData) => unknown): number;
|
|
6
8
|
disconnect(handlerId: number): void;
|
|
7
9
|
emit(eventName: string, ...args: unknown[]): void;
|
|
@@ -48,10 +50,12 @@ declare const GtkLabel_base: ((abstract new (...args: any[]) => {
|
|
|
48
50
|
insert_action_group(prefix: string, group: import("@gjsify/adwaita-core").ActionGroupLike | null): void;
|
|
49
51
|
get focusable(): boolean;
|
|
50
52
|
set focusable(value: boolean | string);
|
|
53
|
+
get focusOnClick(): boolean;
|
|
54
|
+
set focusOnClick(value: boolean | string);
|
|
55
|
+
get_focus_on_click(): boolean;
|
|
56
|
+
set_focus_on_click(focusOnClick: boolean): void;
|
|
51
57
|
grab_focus(): boolean;
|
|
52
58
|
_emit(eventName: string): void;
|
|
53
|
-
addEventListener(eventName: string, callback: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown, once?: boolean): void;
|
|
54
|
-
removeEventListener(eventName: string, callback?: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown): void;
|
|
55
59
|
notify<T extends import("@nativescript/core").EventData>(data: T): void;
|
|
56
60
|
notifyPropertyChange(name: string, value: unknown, oldValue?: unknown): void;
|
|
57
61
|
set(name: string, value: unknown): void;
|
|
@@ -5,6 +5,8 @@ import { type ConstructProps } from './construct-props.js';
|
|
|
5
5
|
/** `GtkPopover::closed`, emitted when the menu goes away. */
|
|
6
6
|
export declare const CLOSED = "closed";
|
|
7
7
|
declare const GtkPopoverMenu_base: ((abstract new (...args: any[]) => {
|
|
8
|
+
addEventListener(eventName: string, callback: (data: EventData) => void, thisArg?: unknown, once?: boolean): void;
|
|
9
|
+
removeEventListener(eventName: string, callback?: (data: EventData) => void, thisArg?: unknown): void;
|
|
8
10
|
connect(eventName: string, callback: (self: /*elided*/ any, data: EventData) => unknown): number;
|
|
9
11
|
disconnect(handlerId: number): void;
|
|
10
12
|
emit(eventName: string, ...args: unknown[]): void;
|
|
@@ -51,10 +53,12 @@ declare const GtkPopoverMenu_base: ((abstract new (...args: any[]) => {
|
|
|
51
53
|
insert_action_group(prefix: string, group: import("@gjsify/adwaita-core").ActionGroupLike | null): void;
|
|
52
54
|
get focusable(): boolean;
|
|
53
55
|
set focusable(value: boolean | string);
|
|
56
|
+
get focusOnClick(): boolean;
|
|
57
|
+
set focusOnClick(value: boolean | string);
|
|
58
|
+
get_focus_on_click(): boolean;
|
|
59
|
+
set_focus_on_click(focusOnClick: boolean): void;
|
|
54
60
|
grab_focus(): boolean;
|
|
55
61
|
_emit(eventName: string): void;
|
|
56
|
-
addEventListener(eventName: string, callback: (data: EventData) => void, thisArg?: unknown, once?: boolean): void;
|
|
57
|
-
removeEventListener(eventName: string, callback?: (data: EventData) => void, thisArg?: unknown): void;
|
|
58
62
|
notify<T extends EventData>(data: T): void;
|
|
59
63
|
notifyPropertyChange(name: string, value: unknown, oldValue?: unknown): void;
|
|
60
64
|
set(name: string, value: unknown): void;
|
|
@@ -12,6 +12,8 @@ export declare const NOTIFY_STACK_VISIBLE_CHILD_NAME = "notify::visible-child-na
|
|
|
12
12
|
export interface NotifyStackVisibleChildEventData extends EventData, ViewStackNotifyPayload {
|
|
13
13
|
}
|
|
14
14
|
declare const GtkStack_base: ((abstract new (...args: any[]) => {
|
|
15
|
+
addEventListener(eventName: string, callback: (data: EventData) => void, thisArg?: unknown, once?: boolean): void;
|
|
16
|
+
removeEventListener(eventName: string, callback?: (data: EventData) => void, thisArg?: unknown): void;
|
|
15
17
|
connect(eventName: string, callback: (self: /*elided*/ any, data: EventData) => unknown): number;
|
|
16
18
|
disconnect(handlerId: number): void;
|
|
17
19
|
emit(eventName: string, ...args: unknown[]): void;
|
|
@@ -58,10 +60,12 @@ declare const GtkStack_base: ((abstract new (...args: any[]) => {
|
|
|
58
60
|
insert_action_group(prefix: string, group: import("@gjsify/adwaita-core").ActionGroupLike | null): void;
|
|
59
61
|
get focusable(): boolean;
|
|
60
62
|
set focusable(value: boolean | string);
|
|
63
|
+
get focusOnClick(): boolean;
|
|
64
|
+
set focusOnClick(value: boolean | string);
|
|
65
|
+
get_focus_on_click(): boolean;
|
|
66
|
+
set_focus_on_click(focusOnClick: boolean): void;
|
|
61
67
|
grab_focus(): boolean;
|
|
62
68
|
_emit(eventName: string): void;
|
|
63
|
-
addEventListener(eventName: string, callback: (data: EventData) => void, thisArg?: unknown, once?: boolean): void;
|
|
64
|
-
removeEventListener(eventName: string, callback?: (data: EventData) => void, thisArg?: unknown): void;
|
|
65
69
|
notify<T extends EventData>(data: T): void;
|
|
66
70
|
notifyPropertyChange(name: string, value: unknown, oldValue?: unknown): void;
|
|
67
71
|
set(name: string, value: unknown): void;
|
|
@@ -14,6 +14,8 @@ export interface GtkTextBufferSubset {
|
|
|
14
14
|
insert_at_cursor(text: string, len?: number): void;
|
|
15
15
|
}
|
|
16
16
|
declare const GtkTextView_base: ((abstract new (...args: any[]) => {
|
|
17
|
+
addEventListener(eventName: string, callback: (data: EventData) => void, thisArg?: unknown, once?: boolean): void;
|
|
18
|
+
removeEventListener(eventName: string, callback?: (data: EventData) => void, thisArg?: unknown): void;
|
|
17
19
|
connect(eventName: string, callback: (self: /*elided*/ any, data: EventData) => unknown): number;
|
|
18
20
|
disconnect(handlerId: number): void;
|
|
19
21
|
emit(eventName: string, ...args: unknown[]): void;
|
|
@@ -60,10 +62,12 @@ declare const GtkTextView_base: ((abstract new (...args: any[]) => {
|
|
|
60
62
|
insert_action_group(prefix: string, group: import("@gjsify/adwaita-core").ActionGroupLike | null): void;
|
|
61
63
|
get focusable(): boolean;
|
|
62
64
|
set focusable(value: boolean | string);
|
|
65
|
+
get focusOnClick(): boolean;
|
|
66
|
+
set focusOnClick(value: boolean | string);
|
|
67
|
+
get_focus_on_click(): boolean;
|
|
68
|
+
set_focus_on_click(focusOnClick: boolean): void;
|
|
63
69
|
grab_focus(): boolean;
|
|
64
70
|
_emit(eventName: string): void;
|
|
65
|
-
addEventListener(eventName: string, callback: (data: EventData) => void, thisArg?: unknown, once?: boolean): void;
|
|
66
|
-
removeEventListener(eventName: string, callback?: (data: EventData) => void, thisArg?: unknown): void;
|
|
67
71
|
notify<T extends EventData>(data: T): void;
|
|
68
72
|
notifyPropertyChange(name: string, value: unknown, oldValue?: unknown): void;
|
|
69
73
|
set(name: string, value: unknown): void;
|
|
@@ -2,9 +2,7 @@ export { AdwPreferencesPage } from './adw-preferences-page.js';
|
|
|
2
2
|
export { AdwPreferencesGroup } from './adw-preferences-group.js';
|
|
3
3
|
export { AdwActionRow } from './adw-action-row.js';
|
|
4
4
|
export { AdwSwitchRow, NOTIFY_ACTIVE } from './adw-switch-row.js';
|
|
5
|
-
export
|
|
6
|
-
export { AdwEntryRow, NOTIFY_TEXT } from './adw-entry-row.js';
|
|
7
|
-
export type { NotifyTextEventData } from './adw-entry-row.js';
|
|
5
|
+
export { AdwEntryRow, NOTIFY_TEXT, NOTIFY_TEXT_LENGTH, NOTIFY_MAX_LENGTH, NOTIFY_EDITABLE, NOTIFY_SHOW_APPLY_BUTTON, NOTIFY_ACTIVATES_DEFAULT, SIGNAL_APPLY, SIGNAL_ENTRY_ACTIVATED, } from './adw-entry-row.js';
|
|
8
6
|
export { AdwPasswordEntryRow } from './adw-password-entry-row.js';
|
|
9
7
|
export { GtkEntry, ACTIVATE as ENTRY_ACTIVATE, NOTIFY_TEXT as NOTIFY_ENTRY_TEXT } from './gtk-entry.js';
|
|
10
8
|
export type { NotifyEntryTextEventData } from './gtk-entry.js';
|
|
@@ -1,4 +1,49 @@
|
|
|
1
1
|
import type { EventData, Observable } from '@nativescript/core';
|
|
2
|
+
import { type ForeignClassMeta, type ForeignProperty } from '@gjsify/adwaita-core';
|
|
3
|
+
/**
|
|
4
|
+
* A declared property, plus the one thing the engine's vocabulary has no room for: how a value is
|
|
5
|
+
* brought into the property's shape BEFORE it is stored. The engine never sees `normalize`.
|
|
6
|
+
*/
|
|
7
|
+
export interface DeclaredProperty extends ForeignProperty {
|
|
8
|
+
/**
|
|
9
|
+
* Replaces the seam's own coercion for EVERY write, typed or not — a floor, a clamp, a lenient
|
|
10
|
+
* parse. Runs identically on both legs, ahead of the store and of the equal-write check, so a
|
|
11
|
+
* write the normalizer maps onto the held value is not a change.
|
|
12
|
+
*
|
|
13
|
+
* `self` is the INSTANCE being written, so a normalizer may read the row's other properties:
|
|
14
|
+
* `AdwEntryRow` clamps `text` to that row's own `max-length`, and derives `text-length` from
|
|
15
|
+
* its own `text` — which is also how a property that is read-only upstream is held read-only
|
|
16
|
+
* here, since a write that resolves to the value already held is not a change.
|
|
17
|
+
*/
|
|
18
|
+
readonly normalize?: (value: unknown, self: object) => unknown;
|
|
19
|
+
}
|
|
20
|
+
/** {@link ForeignClassMeta} whose properties may carry a {@link DeclaredProperty.normalize}. */
|
|
21
|
+
export interface DeclaredClassMeta extends Omit<ForeignClassMeta, 'Properties'> {
|
|
22
|
+
readonly Properties?: Readonly<Record<string, DeclaredProperty>>;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* {@link coerceDeclared}'s string reading on its own, so a {@link DeclaredProperty.normalize} that
|
|
26
|
+
* only wants to ADD a rule — a clamp, a floor — does not have to restate it. Without it every
|
|
27
|
+
* normalizer re-decides what `<AdwEntryRow maxLength="12">` means, and XML would answer one way
|
|
28
|
+
* for a property that has a normalizer and another way for one that does not.
|
|
29
|
+
*/
|
|
30
|
+
export declare function readDeclaredValue(name: string, kind: ForeignProperty['kind'], value: unknown): unknown;
|
|
31
|
+
/**
|
|
32
|
+
* `notify` on a class that DECLARES properties — GJS's `notify('<prop>')` beside NativeScript's
|
|
33
|
+
* `notify({ eventName })`, which is how both legs install it (node-gi routes on the argument's
|
|
34
|
+
* type, and the pure-JS leg imitates that).
|
|
35
|
+
*
|
|
36
|
+
* A migrated widget declares it the same way it declares its properties — `declare notify:
|
|
37
|
+
* GObjectNotify;` — rather than the mixin typing it for every class, because a class with no
|
|
38
|
+
* declaration HAS no property to name and the string form would be a type that lies about 39
|
|
39
|
+
* widgets. One line, beside the `declare` lines the migration already brings.
|
|
40
|
+
*/
|
|
41
|
+
export interface GObjectNotify {
|
|
42
|
+
/** `g_object_notify`: emit `notify::<propertyName>`. Throws on a name the class never declared. */
|
|
43
|
+
(propertyName: string): void;
|
|
44
|
+
/** NativeScript's own: dispatch `data` to the listeners of `data.eventName`. */
|
|
45
|
+
<T extends EventData>(data: T): void;
|
|
46
|
+
}
|
|
2
47
|
/** The two methods the mixin adds. Named so a consumer can annotate with it. */
|
|
3
48
|
export interface GObjectSignals {
|
|
4
49
|
/**
|
|
@@ -40,9 +85,14 @@ export type ObservableConstructor = abstract new (...args: any[]) => Observable;
|
|
|
40
85
|
*
|
|
41
86
|
* Applied ONCE per class that extends a platform base — `extends withSignals(GridLayout)`
|
|
42
87
|
* — and never on a class whose base is already a widget of this package, which inherits
|
|
43
|
-
* the two methods and would otherwise carry a second, identical copy one prototype up.
|
|
88
|
+
* the two methods and would otherwise carry a second, identical copy one prototype up. Such a
|
|
89
|
+
* class adds properties with {@link withProperties} instead.
|
|
44
90
|
*/
|
|
45
|
-
export declare function withSignals<TBase extends ObservableConstructor>(Base: TBase): ((abstract new (...args: any[]) => {
|
|
91
|
+
export declare function withSignals<TBase extends ObservableConstructor>(Base: TBase, meta?: DeclaredClassMeta): ((abstract new (...args: any[]) => {
|
|
92
|
+
/** Refuses a declared member's name; see the header. Covers `on` and `once` with it. */
|
|
93
|
+
addEventListener(eventName: string, callback: (data: EventData) => void, thisArg?: unknown, once?: boolean): void;
|
|
94
|
+
/** The other half of the refusal, and with it `off`. */
|
|
95
|
+
removeEventListener(eventName: string, callback?: (data: EventData) => void, thisArg?: unknown): void;
|
|
46
96
|
connect(eventName: string, callback: (self: /*elided*/ any, data: EventData) => unknown): number;
|
|
47
97
|
disconnect(handlerId: number): void;
|
|
48
98
|
emit(eventName: string, ...args: unknown[]): void;
|
|
@@ -89,7 +139,35 @@ export declare function withSignals<TBase extends ObservableConstructor>(Base: T
|
|
|
89
139
|
insert_action_group(prefix: string, group: import("@gjsify/adwaita-core").ActionGroupLike | null): void;
|
|
90
140
|
get focusable(): boolean;
|
|
91
141
|
set focusable(value: boolean | string);
|
|
142
|
+
get focusOnClick(): boolean;
|
|
143
|
+
set focusOnClick(value: boolean | string);
|
|
144
|
+
get_focus_on_click(): boolean;
|
|
145
|
+
set_focus_on_click(focusOnClick: boolean): void;
|
|
92
146
|
grab_focus(): boolean;
|
|
147
|
+
_emit(eventName: string): void;
|
|
148
|
+
notify<T extends EventData>(data: T): void;
|
|
149
|
+
notifyPropertyChange(name: string, value: unknown, oldValue?: unknown): void;
|
|
150
|
+
set(name: string, value: unknown): void;
|
|
151
|
+
get(name: string): unknown;
|
|
152
|
+
}) & {
|
|
153
|
+
/**
|
|
154
|
+
* What every widget emits; a class's own list adds to it (`emittedSignalsOf`). A
|
|
155
|
+
* declared property's `notify::` and a declared signal are emitted by the seam itself,
|
|
156
|
+
* so they belong here rather than in each migrated widget's own list.
|
|
157
|
+
*/
|
|
158
|
+
readonly emittedSignals: readonly string[];
|
|
159
|
+
}) & TBase;
|
|
160
|
+
/**
|
|
161
|
+
* Declare properties and signals on a class whose base is ALREADY a widget of this package —
|
|
162
|
+
* `class AdwSwitchRow extends withProperties(AdwActionRow, { ... })`.
|
|
163
|
+
*
|
|
164
|
+
* The same declaration as {@link withSignals}'s second argument, and nothing else: `connect`,
|
|
165
|
+
* `disconnect`, `emit`, `notify` and `GtkWidget`'s layout properties come down from the base
|
|
166
|
+
* widget, and they already answer this class's declaration because they resolve the instance's
|
|
167
|
+
* whole chain (see the header). Under route D this is a GType over the base's GType; under the
|
|
168
|
+
* pure-JS leg it is the same accessors over the same store, one prototype down.
|
|
169
|
+
*/
|
|
170
|
+
export declare function withProperties<TBase extends ObservableConstructor>(Base: TBase, meta: DeclaredClassMeta): ((abstract new (...args: any[]) => {
|
|
93
171
|
_emit(eventName: string): void;
|
|
94
172
|
addEventListener(eventName: string, callback: (data: EventData) => void, thisArg?: unknown, once?: boolean): void;
|
|
95
173
|
removeEventListener(eventName: string, callback?: (data: EventData) => void, thisArg?: unknown): void;
|
|
@@ -98,6 +176,6 @@ export declare function withSignals<TBase extends ObservableConstructor>(Base: T
|
|
|
98
176
|
set(name: string, value: unknown): void;
|
|
99
177
|
get(name: string): unknown;
|
|
100
178
|
}) & {
|
|
101
|
-
/**
|
|
179
|
+
/** Only what this class ADDS; `emittedSignalsOf` merges it with the base's. */
|
|
102
180
|
readonly emittedSignals: readonly string[];
|
|
103
181
|
}) & TBase;
|
|
@@ -11,6 +11,8 @@ export interface NotifyShowSidebarEventData extends EventData {
|
|
|
11
11
|
collapsed: boolean;
|
|
12
12
|
}
|
|
13
13
|
declare const AdwSplitViewBase_base: ((abstract new (...args: any[]) => {
|
|
14
|
+
addEventListener(eventName: string, callback: (data: EventData) => void, thisArg?: unknown, once?: boolean): void;
|
|
15
|
+
removeEventListener(eventName: string, callback?: (data: EventData) => void, thisArg?: unknown): void;
|
|
14
16
|
connect(eventName: string, callback: (self: /*elided*/ any, data: EventData) => unknown): number;
|
|
15
17
|
disconnect(handlerId: number): void;
|
|
16
18
|
emit(eventName: string, ...args: unknown[]): void;
|
|
@@ -57,10 +59,12 @@ declare const AdwSplitViewBase_base: ((abstract new (...args: any[]) => {
|
|
|
57
59
|
insert_action_group(prefix: string, group: import("@gjsify/adwaita-core").ActionGroupLike | null): void;
|
|
58
60
|
get focusable(): boolean;
|
|
59
61
|
set focusable(value: boolean | string);
|
|
62
|
+
get focusOnClick(): boolean;
|
|
63
|
+
set focusOnClick(value: boolean | string);
|
|
64
|
+
get_focus_on_click(): boolean;
|
|
65
|
+
set_focus_on_click(focusOnClick: boolean): void;
|
|
60
66
|
grab_focus(): boolean;
|
|
61
67
|
_emit(eventName: string): void;
|
|
62
|
-
addEventListener(eventName: string, callback: (data: EventData) => void, thisArg?: unknown, once?: boolean): void;
|
|
63
|
-
removeEventListener(eventName: string, callback?: (data: EventData) => void, thisArg?: unknown): void;
|
|
64
68
|
notify<T extends EventData>(data: T): void;
|
|
65
69
|
notifyPropertyChange(name: string, value: unknown, oldValue?: unknown): void;
|
|
66
70
|
set(name: string, value: unknown): void;
|
|
@@ -9,6 +9,8 @@ interface AwaitingStack {
|
|
|
9
9
|
_addChildFromBuilder(name: string, view: GtkStackPage): void;
|
|
10
10
|
}
|
|
11
11
|
declare const GtkStackPage_base: ((abstract new (...args: any[]) => {
|
|
12
|
+
addEventListener(eventName: string, callback: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown, once?: boolean): void;
|
|
13
|
+
removeEventListener(eventName: string, callback?: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown): void;
|
|
12
14
|
connect(eventName: string, callback: (self: /*elided*/ any, data: import("@nativescript/core").EventData) => unknown): number;
|
|
13
15
|
disconnect(handlerId: number): void;
|
|
14
16
|
emit(eventName: string, ...args: unknown[]): void;
|
|
@@ -55,10 +57,12 @@ declare const GtkStackPage_base: ((abstract new (...args: any[]) => {
|
|
|
55
57
|
insert_action_group(prefix: string, group: import("@gjsify/adwaita-core").ActionGroupLike | null): void;
|
|
56
58
|
get focusable(): boolean;
|
|
57
59
|
set focusable(value: boolean | string);
|
|
60
|
+
get focusOnClick(): boolean;
|
|
61
|
+
set focusOnClick(value: boolean | string);
|
|
62
|
+
get_focus_on_click(): boolean;
|
|
63
|
+
set_focus_on_click(focusOnClick: boolean): void;
|
|
58
64
|
grab_focus(): boolean;
|
|
59
65
|
_emit(eventName: string): void;
|
|
60
|
-
addEventListener(eventName: string, callback: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown, once?: boolean): void;
|
|
61
|
-
removeEventListener(eventName: string, callback?: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown): void;
|
|
62
66
|
notify<T extends import("@nativescript/core").EventData>(data: T): void;
|
|
63
67
|
notifyPropertyChange(name: string, value: unknown, oldValue?: unknown): void;
|
|
64
68
|
set(name: string, value: unknown): void;
|
|
@@ -1,4 +1,17 @@
|
|
|
1
|
-
import { StyleManagerBase, type StyleSource } from '@gjsify/adwaita-core';
|
|
1
|
+
import { StyleManagerBase, type AdwColorScheme, type StyleSource } from '@gjsify/adwaita-core';
|
|
2
|
+
/** The system's light/dark preference as a platform reports it. */
|
|
3
|
+
export interface SystemAppearance {
|
|
4
|
+
/** The current preference, `null` while the platform cannot tell. */
|
|
5
|
+
current(): AdwColorScheme | null;
|
|
6
|
+
/** Calls `changed` with each new preference; returns the unsubscribe. */
|
|
7
|
+
subscribe(changed: (scheme: AdwColorScheme) => void): () => void;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Hand the source the system's appearance (or take it away with `null`). From then on the scheme
|
|
11
|
+
* follows the system while no `FORCE_*` scheme pins it, and `system_supports_color_schemes` answers
|
|
12
|
+
* whether the system reports a preference.
|
|
13
|
+
*/
|
|
14
|
+
export declare function setSystemAppearance(next: SystemAppearance | null): void;
|
|
2
15
|
export declare const nativeScriptStyleSource: StyleSource;
|
|
3
16
|
export declare class AdwStyleManager extends StyleManagerBase {
|
|
4
17
|
static readonly GTypeName: string;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { GridLayout } from '@nativescript/core';
|
|
2
2
|
import { type AdwStyleClassesInput } from './style-classes.js';
|
|
3
3
|
declare const AdwStyledLayoutBase_base: ((abstract new (...args: any[]) => {
|
|
4
|
+
addEventListener(eventName: string, callback: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown, once?: boolean): void;
|
|
5
|
+
removeEventListener(eventName: string, callback?: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown): void;
|
|
4
6
|
connect(eventName: string, callback: (self: /*elided*/ any, data: import("@nativescript/core").EventData) => unknown): number;
|
|
5
7
|
disconnect(handlerId: number): void;
|
|
6
8
|
emit(eventName: string, ...args: unknown[]): void;
|
|
@@ -47,10 +49,12 @@ declare const AdwStyledLayoutBase_base: ((abstract new (...args: any[]) => {
|
|
|
47
49
|
insert_action_group(prefix: string, group: import("@gjsify/adwaita-core").ActionGroupLike | null): void;
|
|
48
50
|
get focusable(): boolean;
|
|
49
51
|
set focusable(value: boolean | string);
|
|
52
|
+
get focusOnClick(): boolean;
|
|
53
|
+
set focusOnClick(value: boolean | string);
|
|
54
|
+
get_focus_on_click(): boolean;
|
|
55
|
+
set_focus_on_click(focusOnClick: boolean): void;
|
|
50
56
|
grab_focus(): boolean;
|
|
51
57
|
_emit(eventName: string): void;
|
|
52
|
-
addEventListener(eventName: string, callback: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown, once?: boolean): void;
|
|
53
|
-
removeEventListener(eventName: string, callback?: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown): void;
|
|
54
58
|
notify<T extends import("@nativescript/core").EventData>(data: T): void;
|
|
55
59
|
notifyPropertyChange(name: string, value: unknown, oldValue?: unknown): void;
|
|
56
60
|
set(name: string, value: unknown): void;
|
|
@@ -9,6 +9,8 @@ interface AwaitingStack {
|
|
|
9
9
|
_addChildFromBuilder(name: string, view: AdwViewStackPage): void;
|
|
10
10
|
}
|
|
11
11
|
declare const AdwViewStackPage_base: ((abstract new (...args: any[]) => {
|
|
12
|
+
addEventListener(eventName: string, callback: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown, once?: boolean): void;
|
|
13
|
+
removeEventListener(eventName: string, callback?: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown): void;
|
|
12
14
|
connect(eventName: string, callback: (self: /*elided*/ any, data: import("@nativescript/core").EventData) => unknown): number;
|
|
13
15
|
disconnect(handlerId: number): void;
|
|
14
16
|
emit(eventName: string, ...args: unknown[]): void;
|
|
@@ -55,10 +57,12 @@ declare const AdwViewStackPage_base: ((abstract new (...args: any[]) => {
|
|
|
55
57
|
insert_action_group(prefix: string, group: import("@gjsify/adwaita-core").ActionGroupLike | null): void;
|
|
56
58
|
get focusable(): boolean;
|
|
57
59
|
set focusable(value: boolean | string);
|
|
60
|
+
get focusOnClick(): boolean;
|
|
61
|
+
set focusOnClick(value: boolean | string);
|
|
62
|
+
get_focus_on_click(): boolean;
|
|
63
|
+
set_focus_on_click(focusOnClick: boolean): void;
|
|
58
64
|
grab_focus(): boolean;
|
|
59
65
|
_emit(eventName: string): void;
|
|
60
|
-
addEventListener(eventName: string, callback: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown, once?: boolean): void;
|
|
61
|
-
removeEventListener(eventName: string, callback?: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown): void;
|
|
62
66
|
notify<T extends import("@nativescript/core").EventData>(data: T): void;
|
|
63
67
|
notifyPropertyChange(name: string, value: unknown, oldValue?: unknown): void;
|
|
64
68
|
set(name: string, value: unknown): void;
|
|
@@ -13,6 +13,8 @@ export declare const NOTIFY_SELECTED = "notify::selected";
|
|
|
13
13
|
export interface NotifyViewSelectedEventData extends EventData, ViewSwitcherNotifyPayload {
|
|
14
14
|
}
|
|
15
15
|
declare const AdwViewSwitcherBase_base: ((abstract new (...args: any[]) => {
|
|
16
|
+
addEventListener(eventName: string, callback: (data: EventData) => void, thisArg?: unknown, once?: boolean): void;
|
|
17
|
+
removeEventListener(eventName: string, callback?: (data: EventData) => void, thisArg?: unknown): void;
|
|
16
18
|
connect(eventName: string, callback: (self: /*elided*/ any, data: EventData) => unknown): number;
|
|
17
19
|
disconnect(handlerId: number): void;
|
|
18
20
|
emit(eventName: string, ...args: unknown[]): void;
|
|
@@ -59,10 +61,12 @@ declare const AdwViewSwitcherBase_base: ((abstract new (...args: any[]) => {
|
|
|
59
61
|
insert_action_group(prefix: string, group: import("@gjsify/adwaita-core").ActionGroupLike | null): void;
|
|
60
62
|
get focusable(): boolean;
|
|
61
63
|
set focusable(value: boolean | string);
|
|
64
|
+
get focusOnClick(): boolean;
|
|
65
|
+
set focusOnClick(value: boolean | string);
|
|
66
|
+
get_focus_on_click(): boolean;
|
|
67
|
+
set_focus_on_click(focusOnClick: boolean): void;
|
|
62
68
|
grab_focus(): boolean;
|
|
63
69
|
_emit(eventName: string): void;
|
|
64
|
-
addEventListener(eventName: string, callback: (data: EventData) => void, thisArg?: unknown, once?: boolean): void;
|
|
65
|
-
removeEventListener(eventName: string, callback?: (data: EventData) => void, thisArg?: unknown): void;
|
|
66
70
|
notify<T extends EventData>(data: T): void;
|
|
67
71
|
notifyPropertyChange(name: string, value: unknown, oldValue?: unknown): void;
|
|
68
72
|
set(name: string, value: unknown): void;
|
|
@@ -96,6 +96,10 @@ export declare abstract class GtkWidgetLayoutMembers {
|
|
|
96
96
|
insert_action_group(prefix: string, group: ActionGroupLike | null): void;
|
|
97
97
|
get focusable(): boolean;
|
|
98
98
|
set focusable(value: boolean | string);
|
|
99
|
+
get focusOnClick(): boolean;
|
|
100
|
+
set focusOnClick(value: boolean | string);
|
|
101
|
+
get_focus_on_click(): boolean;
|
|
102
|
+
set_focus_on_click(focusOnClick: boolean): void;
|
|
99
103
|
/** `gtk_widget_grab_focus`: asks the platform to move focus here; answers whether it now holds it. */
|
|
100
104
|
grab_focus(): boolean;
|
|
101
105
|
}
|
|
@@ -19,6 +19,32 @@ export declare function dialogPresentationMode(value: unknown): AdwDialogPresent
|
|
|
19
19
|
* and a blank attribute keeps what was there.
|
|
20
20
|
*/
|
|
21
21
|
export declare function surfaceSize(parsed: number, written: unknown, current: number, property: string): number;
|
|
22
|
+
/** `PORTRAIT_CONDITION` of adw-dialog.c: `max-width: 450px`. */
|
|
23
|
+
export declare const DIALOG_PORTRAIT_MAX_WIDTH = 450;
|
|
24
|
+
/** `LANDSCAPE_CONDITION` of adw-dialog.c: `max-height: 360px`. */
|
|
25
|
+
export declare const DIALOG_LANDSCAPE_MAX_HEIGHT = 360;
|
|
26
|
+
/** The card's margin on every side, as `.adw-dialog-card` writes it. */
|
|
27
|
+
export declare const DIALOG_CARD_MARGIN = 24;
|
|
28
|
+
/** Where a dialog's card goes and how big it is. `'auto'` follows the content. */
|
|
29
|
+
export interface DialogCardLayout {
|
|
30
|
+
readonly sheet: boolean;
|
|
31
|
+
readonly width: number | 'auto';
|
|
32
|
+
readonly height: number | 'auto';
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* The card layout for a dialog shown over a window of `available` size (DIP), or over a window
|
|
36
|
+
* not laid out yet (`null`).
|
|
37
|
+
*
|
|
38
|
+
* `auto` is a bottom sheet when the window matches `max-width: 450px or max-height: 360px`, a
|
|
39
|
+
* floating card otherwise — adw-dialog.c's two breakpoints. Before the first layout there is
|
|
40
|
+
* no window size to ask, so `auto` floats. A floating card is `content-width` /
|
|
41
|
+
* `content-height` wide and high, but never more than the window leaves around its margins: an
|
|
42
|
+
* NS `width` is an exact size, and libadwaita shrinks a dialog that does not fit.
|
|
43
|
+
*/
|
|
44
|
+
export declare function dialogCardLayout(available: {
|
|
45
|
+
readonly width: number;
|
|
46
|
+
readonly height: number;
|
|
47
|
+
} | null, mode: AdwDialogPresentationNick, contentWidth: number, contentHeight: number): DialogCardLayout;
|
|
22
48
|
/** What a dialog hands itself to when it is presented over a widget. */
|
|
23
49
|
export interface DialogHost {
|
|
24
50
|
/** Put `dialog` above everything the host shows. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/adwaita-nativescript",
|
|
3
|
-
"version": "0.64.
|
|
3
|
+
"version": "0.64.3-next.262",
|
|
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.3-next.262",
|
|
77
|
+
"@gjsify/adwaita-fonts": "0.64.3-next.262",
|
|
78
|
+
"@gjsify/adwaita-icons": "0.64.3-next.262",
|
|
79
|
+
"@gjsify/canvas2d-core": "0.64.3-next.262",
|
|
80
|
+
"@gjsify/native-platform": "0.64.3-next.262"
|
|
81
81
|
},
|
|
82
82
|
"peerDependencies": {
|
|
83
83
|
"@nativescript/core": "*",
|
|
84
|
-
"@gjsify/app-settings": "
|
|
84
|
+
"@gjsify/app-settings": "0.64.3-next.262"
|
|
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.3-next.262",
|
|
96
|
+
"@gjsify/blueprint": "0.64.3-next.262",
|
|
97
|
+
"@gjsify/cli": "0.64.3-next.262",
|
|
98
|
+
"@gjsify/unit": "0.64.3-next.262",
|
|
99
|
+
"@gjsify/vite-plugin-blueprint": "0.64.3-next.262",
|
|
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": "0f5ca82aab25bf9df8d1e790d28483b1f90fe3a9"
|
|
129
130
|
}
|
package/src/testing/ns-core.mts
CHANGED
|
@@ -608,6 +608,11 @@ export class GridLayout extends LayoutBase {
|
|
|
608
608
|
if (at !== -1) this._rows.splice(at, 1);
|
|
609
609
|
}
|
|
610
610
|
|
|
611
|
+
/** `GridLayoutBase.getColumns` — a copy, as on a device. */
|
|
612
|
+
getColumns(): ItemSpec[] {
|
|
613
|
+
return [...this._cols];
|
|
614
|
+
}
|
|
615
|
+
|
|
611
616
|
removeColumns(): void {
|
|
612
617
|
this._cols.length = 0;
|
|
613
618
|
}
|
|
@@ -933,6 +938,8 @@ const APPLIED_CSS: string[] = [];
|
|
|
933
938
|
|
|
934
939
|
const LIFECYCLE = new Map<string, ((args: unknown) => void)[]>();
|
|
935
940
|
|
|
941
|
+
const SYSTEM_APPEARANCE: { value: 'dark' | 'light' | null } = { value: null };
|
|
942
|
+
|
|
936
943
|
// An object, not a `namespace`: the gi-renderer-arms e2e loads this file with Node's strip-only
|
|
937
944
|
// type removal, which refuses every non-erasable construct.
|
|
938
945
|
export const Application = {
|
|
@@ -970,6 +977,19 @@ export const Application = {
|
|
|
970
977
|
if (at !== -1) existing.splice(at, 1);
|
|
971
978
|
},
|
|
972
979
|
|
|
980
|
+
/** The double has no configuration to read, so it cannot tell — until a spec says otherwise. */
|
|
981
|
+
systemAppearance(): 'dark' | 'light' | null {
|
|
982
|
+
return SYSTEM_APPEARANCE.value;
|
|
983
|
+
},
|
|
984
|
+
|
|
985
|
+
/** Change the system's appearance and deliver `systemAppearanceChanged`, as the platform does. */
|
|
986
|
+
emitSystemAppearance(value: 'dark' | 'light'): void {
|
|
987
|
+
SYSTEM_APPEARANCE.value = value;
|
|
988
|
+
for (const callback of (LIFECYCLE.get('systemAppearanceChanged') ?? []).slice()) {
|
|
989
|
+
callback({ eventName: 'systemAppearanceChanged', newValue: value });
|
|
990
|
+
}
|
|
991
|
+
},
|
|
992
|
+
|
|
973
993
|
/** Deliver a lifecycle event (`resume`, `suspend`) to its subscribers, as the platform does. */
|
|
974
994
|
emitLifecycle(event: string): void {
|
|
975
995
|
for (const callback of (LIFECYCLE.get(event) ?? []).slice()) callback({ eventName: event });
|
package/src/theme/adwaita.css
CHANGED
|
@@ -1768,15 +1768,27 @@ Page.adw-window {
|
|
|
1768
1768
|
background-color: #fafafb;
|
|
1769
1769
|
border-radius: 16;
|
|
1770
1770
|
padding: 24;
|
|
1771
|
-
width: 320;
|
|
1772
1771
|
margin: 24;
|
|
1773
1772
|
}
|
|
1774
1773
|
|
|
1774
|
+
/* The about card has no `content-width`; the preferences card's comes from AdwDialog. */
|
|
1775
|
+
.adw-about-dialog-card {
|
|
1776
|
+
width: 320;
|
|
1777
|
+
}
|
|
1778
|
+
|
|
1775
1779
|
.adw-about-dialog-icon {
|
|
1776
|
-
font-size: 48;
|
|
1777
1780
|
margin: 0 0 8 0;
|
|
1778
1781
|
}
|
|
1779
1782
|
|
|
1783
|
+
.adw-about-dialog-link,
|
|
1784
|
+
.adw-about-dialog-links-item {
|
|
1785
|
+
background-color: transparent;
|
|
1786
|
+
color: rgba(0, 0, 0, 0.8);
|
|
1787
|
+
text-decoration: underline;
|
|
1788
|
+
font-size: 13;
|
|
1789
|
+
margin: 2 0 2 0;
|
|
1790
|
+
}
|
|
1791
|
+
|
|
1780
1792
|
.adw-about-dialog-name {
|
|
1781
1793
|
font-size: 20;
|
|
1782
1794
|
font-weight: 700;
|
|
@@ -1793,7 +1805,11 @@ Page.adw-window {
|
|
|
1793
1805
|
.adw-about-dialog-developer,
|
|
1794
1806
|
.adw-about-dialog-comments,
|
|
1795
1807
|
.adw-about-dialog-website,
|
|
1796
|
-
.adw-about-dialog-
|
|
1808
|
+
.adw-about-dialog-support,
|
|
1809
|
+
.adw-about-dialog-issue,
|
|
1810
|
+
.adw-about-dialog-credits,
|
|
1811
|
+
.adw-about-dialog-acknowledgements,
|
|
1812
|
+
.adw-about-dialog-legal,
|
|
1797
1813
|
.adw-about-dialog-release-notes,
|
|
1798
1814
|
.adw-about-dialog-links,
|
|
1799
1815
|
.adw-about-dialog-debug-info {
|
|
@@ -1802,6 +1818,7 @@ Page.adw-window {
|
|
|
1802
1818
|
margin: 2 0 2 0;
|
|
1803
1819
|
}
|
|
1804
1820
|
|
|
1821
|
+
.adw-about-dialog-copy,
|
|
1805
1822
|
.adw-about-dialog-close {
|
|
1806
1823
|
background-color: rgba(0, 0, 0, 0.08);
|
|
1807
1824
|
color: rgba(0, 0, 0, 0.8);
|
|
@@ -2630,13 +2647,23 @@ Page.ns-dark.adw-window {
|
|
|
2630
2647
|
.ns-dark .adw-about-dialog-developer,
|
|
2631
2648
|
.ns-dark .adw-about-dialog-comments,
|
|
2632
2649
|
.ns-dark .adw-about-dialog-website,
|
|
2633
|
-
.ns-dark .adw-about-dialog-
|
|
2650
|
+
.ns-dark .adw-about-dialog-support,
|
|
2651
|
+
.ns-dark .adw-about-dialog-issue,
|
|
2652
|
+
.ns-dark .adw-about-dialog-credits,
|
|
2653
|
+
.ns-dark .adw-about-dialog-acknowledgements,
|
|
2654
|
+
.ns-dark .adw-about-dialog-legal,
|
|
2634
2655
|
.ns-dark .adw-about-dialog-release-notes,
|
|
2635
2656
|
.ns-dark .adw-about-dialog-links,
|
|
2636
2657
|
.ns-dark .adw-about-dialog-debug-info {
|
|
2637
2658
|
color: rgba(255, 255, 255, 0.6);
|
|
2638
2659
|
}
|
|
2639
2660
|
|
|
2661
|
+
.ns-dark .adw-about-dialog-link,
|
|
2662
|
+
.ns-dark .adw-about-dialog-links-item {
|
|
2663
|
+
color: #ffffff;
|
|
2664
|
+
}
|
|
2665
|
+
|
|
2666
|
+
.ns-dark .adw-about-dialog-copy,
|
|
2640
2667
|
.ns-dark .adw-about-dialog-close {
|
|
2641
2668
|
background-color: rgba(255, 255, 255, 0.1);
|
|
2642
2669
|
color: #ffffff;
|