@gjsify/adwaita-nativescript 0.47.0 → 0.49.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/esm/_virtual/_rolldown/runtime.js +1 -1
- package/lib/esm/index.js +1 -1
- package/lib/esm/namespace/adw.js +1 -0
- package/lib/esm/namespace/gtk.js +1 -0
- package/lib/esm/widgets/adw-about-dialog.js +1 -1
- package/lib/esm/widgets/adw-action-row.js +1 -1
- package/lib/esm/widgets/adw-alert-dialog.js +1 -1
- package/lib/esm/widgets/adw-avatar.js +1 -1
- package/lib/esm/widgets/adw-banner.js +1 -1
- package/lib/esm/widgets/adw-bottom-sheet.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-carousel.js +1 -1
- package/lib/esm/widgets/adw-clamp.js +1 -1
- package/lib/esm/widgets/adw-combo-row.js +1 -1
- package/lib/esm/widgets/adw-data-grid.js +1 -1
- package/lib/esm/widgets/adw-entry-row.js +1 -1
- package/lib/esm/widgets/adw-expander-row.js +1 -1
- package/lib/esm/widgets/adw-header-bar.js +1 -1
- package/lib/esm/widgets/adw-image-button.js +1 -1
- package/lib/esm/widgets/adw-inline-view-switcher.js +1 -1
- package/lib/esm/widgets/adw-navigation-split-view.js +1 -1
- package/lib/esm/widgets/adw-navigation-view.js +1 -1
- package/lib/esm/widgets/adw-overlay-split-view.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-shortcut-label.js +1 -1
- package/lib/esm/widgets/adw-sidebar.js +1 -1
- package/lib/esm/widgets/adw-slider-row.js +1 -1
- package/lib/esm/widgets/adw-spin-row.js +1 -1
- package/lib/esm/widgets/adw-spinner.js +1 -1
- package/lib/esm/widgets/adw-split-button.js +1 -1
- package/lib/esm/widgets/adw-status-page.js +1 -1
- package/lib/esm/widgets/adw-switch-row.js +1 -1
- package/lib/esm/widgets/adw-tab-view.js +1 -1
- package/lib/esm/widgets/adw-toast-overlay.js +1 -1
- package/lib/esm/widgets/adw-toggle-group.js +1 -1
- package/lib/esm/widgets/adw-toolbar-view.js +1 -1
- package/lib/esm/widgets/adw-view-stack.js +1 -1
- package/lib/esm/widgets/adw-view-switcher-bar.js +1 -1
- package/lib/esm/widgets/adw-view-switcher.js +1 -1
- package/lib/esm/widgets/adw-window-title.js +1 -1
- package/lib/esm/widgets/adw-wrap-box.js +1 -1
- package/lib/esm/widgets/avatar-view.js +1 -0
- package/lib/esm/widgets/box-layout.js +1 -0
- package/lib/esm/widgets/button-content.js +1 -1
- package/lib/esm/widgets/button-slot.js +1 -0
- package/lib/esm/widgets/construct-props.js +1 -0
- package/lib/esm/widgets/entry-row-view.js +1 -1
- package/lib/esm/widgets/gtk-align.js +1 -0
- package/lib/esm/widgets/gtk-box.js +1 -0
- package/lib/esm/widgets/gtk-button.js +1 -1
- package/lib/esm/widgets/gtk-drop-down.js +1 -1
- package/lib/esm/widgets/gtk-entry.js +1 -1
- package/lib/esm/widgets/gtk-image.js +1 -0
- package/lib/esm/widgets/gtk-label.js +1 -0
- package/lib/esm/widgets/gtk-menu-button.js +1 -1
- package/lib/esm/widgets/icon-theme.js +1 -0
- package/lib/esm/widgets/index.js +1 -1
- package/lib/esm/widgets/label-text.js +1 -0
- package/lib/esm/widgets/menu-sheet.js +1 -0
- package/lib/esm/widgets/signals.js +1 -0
- package/lib/esm/widgets/split-button.js +1 -1
- package/lib/esm/widgets/split-view-base.js +1 -1
- package/lib/esm/widgets/style-classes.js +1 -0
- package/lib/esm/widgets/view-switcher-base.js +1 -1
- package/lib/esm/widgets/view-switcher-model.js +1 -1
- package/lib/types/avatar.spec.d.ts +2 -0
- package/lib/types/box-layout.spec.d.ts +2 -0
- package/lib/types/button-slot.spec.d.ts +2 -0
- package/lib/types/construct-props.spec.d.ts +2 -0
- package/lib/types/icon-theme.spec.d.ts +2 -0
- package/lib/types/index.d.ts +4 -3
- package/lib/types/label-text.spec.d.ts +2 -0
- package/lib/types/namespace/adw.d.ts +38 -0
- package/lib/types/namespace/gtk.d.ts +7 -0
- package/lib/types/signals.spec.d.ts +2 -0
- package/lib/types/style-classes.spec.d.ts +2 -0
- package/lib/types/widgets/adw-about-dialog.d.ts +16 -3
- package/lib/types/widgets/adw-action-row.d.ts +38 -10
- package/lib/types/widgets/adw-alert-dialog.d.ts +30 -13
- package/lib/types/widgets/adw-avatar.d.ts +49 -3
- package/lib/types/widgets/adw-banner.d.ts +16 -3
- package/lib/types/widgets/adw-bottom-sheet.d.ts +32 -16
- package/lib/types/widgets/adw-button-content.d.ts +20 -6
- package/lib/types/widgets/adw-button-row.d.ts +10 -7
- package/lib/types/widgets/adw-carousel.d.ts +19 -7
- package/lib/types/widgets/adw-clamp.d.ts +17 -5
- package/lib/types/widgets/adw-combo-row.d.ts +8 -7
- package/lib/types/widgets/adw-data-grid.d.ts +17 -4
- package/lib/types/widgets/adw-entry-row.d.ts +16 -14
- package/lib/types/widgets/adw-expander-row.d.ts +21 -10
- package/lib/types/widgets/adw-header-bar.d.ts +39 -14
- package/lib/types/widgets/adw-image-button.d.ts +22 -5
- package/lib/types/widgets/adw-inline-view-switcher.d.ts +2 -1
- package/lib/types/widgets/adw-navigation-split-view.d.ts +2 -1
- package/lib/types/widgets/adw-navigation-view.d.ts +40 -21
- package/lib/types/widgets/adw-overlay-split-view.d.ts +3 -2
- package/lib/types/widgets/adw-password-entry-row.d.ts +2 -1
- package/lib/types/widgets/adw-preferences-dialog.d.ts +16 -3
- package/lib/types/widgets/adw-preferences-group.d.ts +19 -6
- package/lib/types/widgets/adw-preferences-page.d.ts +37 -8
- package/lib/types/widgets/adw-shortcut-label.d.ts +15 -2
- package/lib/types/widgets/adw-sidebar.d.ts +15 -2
- package/lib/types/widgets/adw-slider-row.d.ts +30 -19
- package/lib/types/widgets/adw-spin-row.d.ts +18 -14
- package/lib/types/widgets/adw-spinner.d.ts +14 -2
- package/lib/types/widgets/adw-split-button.d.ts +60 -12
- package/lib/types/widgets/adw-status-page.d.ts +22 -8
- package/lib/types/widgets/adw-switch-row.d.ts +2 -1
- package/lib/types/widgets/adw-tab-view.d.ts +34 -8
- package/lib/types/widgets/adw-toast-overlay.d.ts +19 -7
- package/lib/types/widgets/adw-toggle-group.d.ts +14 -2
- package/lib/types/widgets/adw-toolbar-view.d.ts +21 -8
- package/lib/types/widgets/adw-view-stack.d.ts +38 -5
- package/lib/types/widgets/adw-view-switcher-bar.d.ts +16 -3
- package/lib/types/widgets/adw-view-switcher.d.ts +2 -1
- package/lib/types/widgets/adw-window-title.d.ts +16 -3
- package/lib/types/widgets/adw-wrap-box.d.ts +21 -8
- package/lib/types/widgets/avatar-view.d.ts +57 -0
- package/lib/types/widgets/bottom-sheet-state.d.ts +1 -1
- package/lib/types/widgets/box-layout.d.ts +39 -0
- package/lib/types/widgets/button-content.d.ts +4 -4
- package/lib/types/widgets/button-slot.d.ts +16 -0
- package/lib/types/widgets/construct-props.d.ts +82 -0
- package/lib/types/widgets/entry-row-view.d.ts +9 -8
- package/lib/types/widgets/gtk-align.d.ts +59 -0
- package/lib/types/widgets/gtk-box.d.ts +75 -0
- package/lib/types/widgets/gtk-button.d.ts +110 -28
- package/lib/types/widgets/gtk-drop-down.d.ts +21 -8
- package/lib/types/widgets/gtk-entry.d.ts +15 -2
- package/lib/types/widgets/gtk-image.d.ts +42 -0
- package/lib/types/widgets/gtk-label.d.ts +82 -0
- package/lib/types/widgets/gtk-menu-button.d.ts +29 -18
- package/lib/types/widgets/icon-theme.d.ts +77 -0
- package/lib/types/widgets/icons.d.ts +3 -1
- package/lib/types/widgets/index.d.ts +18 -5
- package/lib/types/widgets/label-text.d.ts +13 -0
- package/lib/types/widgets/menu-sheet.d.ts +58 -0
- package/lib/types/widgets/row-state.d.ts +1 -1
- package/lib/types/widgets/signals.d.ts +40 -0
- package/lib/types/widgets/split-button.d.ts +2 -21
- package/lib/types/widgets/split-view-base.d.ts +18 -6
- package/lib/types/widgets/status-page-content.d.ts +1 -1
- package/lib/types/widgets/style-classes.d.ts +61 -0
- package/lib/types/widgets/view-switcher-base.d.ts +12 -1
- package/lib/types/widgets/view-switcher-model.d.ts +3 -12
- package/package.json +14 -10
- package/src/theme/adwaita.css +66 -8
- package/lib/esm/namespace.js +0 -1
- package/lib/esm/widgets/adw-icon.js +0 -1
- package/lib/types/namespace.d.ts +0 -92
- package/lib/types/widgets/adw-icon.d.ts +0 -25
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
import type { View } from '@nativescript/core';
|
|
2
2
|
import { GridLayout, StackLayout } from '@nativescript/core';
|
|
3
3
|
import { type AdwToolbarStyle } from './chrome.js';
|
|
4
|
-
|
|
4
|
+
import { type ConstructProps } from './construct-props.js';
|
|
5
|
+
declare const AdwToolbarView_base: (abstract new (...args: any[]) => {
|
|
6
|
+
connect(eventName: string, callback: (self: /*elided*/ any, data: import("@nativescript/core").EventData) => void): number;
|
|
7
|
+
disconnect(handlerId: number): void;
|
|
8
|
+
_emit(eventName: string): void;
|
|
9
|
+
addEventListener(eventName: string, callback: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown, once?: boolean): void;
|
|
10
|
+
removeEventListener(eventName: string, callback?: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown): void;
|
|
11
|
+
notify<T extends import("@nativescript/core").EventData>(data: T): void;
|
|
12
|
+
notifyPropertyChange(name: string, value: unknown, oldValue?: unknown): void;
|
|
13
|
+
set(name: string, value: unknown): void;
|
|
14
|
+
get(name: string): unknown;
|
|
15
|
+
}) & typeof GridLayout;
|
|
16
|
+
export declare class AdwToolbarView extends AdwToolbarView_base {
|
|
5
17
|
/** The top-bar slot (row 0) — stack of header bars / toolbars. */
|
|
6
18
|
protected readonly _topBox: StackLayout;
|
|
7
19
|
/** The bottom-bar slot (row 2) — stack of bottom toolbars. */
|
|
@@ -14,13 +26,13 @@ export declare class AdwToolbarView extends GridLayout {
|
|
|
14
26
|
private _topBarCount;
|
|
15
27
|
private _bottomBarCount;
|
|
16
28
|
private _detachInsets;
|
|
17
|
-
constructor();
|
|
18
|
-
/** Append a widget (e.g. an {@link AdwHeaderBar}) to the top-bar slot
|
|
19
|
-
|
|
20
|
-
/** Append a widget to the bottom-bar slot
|
|
21
|
-
|
|
22
|
-
/** Set (or replace) the main content view
|
|
23
|
-
|
|
29
|
+
constructor(props?: ConstructProps<AdwToolbarView>);
|
|
30
|
+
/** Append a widget (e.g. an {@link AdwHeaderBar}) to the top-bar slot — `adw_toolbar_view_add_top_bar`. */
|
|
31
|
+
add_top_bar(view: View): void;
|
|
32
|
+
/** Append a widget to the bottom-bar slot — `adw_toolbar_view_add_bottom_bar`. */
|
|
33
|
+
add_bottom_bar(view: View): void;
|
|
34
|
+
/** Set (or replace) the main content view — `adw_toolbar_view_set_content`. `null` clears it. */
|
|
35
|
+
set_content(view: View | null): void;
|
|
24
36
|
/**
|
|
25
37
|
* XML inflation — route a template's child through the slot API.
|
|
26
38
|
*
|
|
@@ -92,3 +104,4 @@ export declare class AdwToolbarView extends GridLayout {
|
|
|
92
104
|
*/
|
|
93
105
|
private _syncClasses;
|
|
94
106
|
}
|
|
107
|
+
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { View } from '@nativescript/core';
|
|
2
2
|
import { GridLayout, type EventData } from '@nativescript/core';
|
|
3
3
|
import { type AdwViewStackPage, type ViewStackNotifyPayload } from './view-stack-state.js';
|
|
4
|
+
import { type ConstructProps } from './construct-props.js';
|
|
4
5
|
export type { AdwViewStackPage };
|
|
5
6
|
/** Event name emitted when the visible child changes. Mirrors GObject `notify::visible-child`. */
|
|
6
7
|
export declare const NOTIFY_VISIBLE_CHILD = "notify::visible-child";
|
|
@@ -11,9 +12,20 @@ export declare const NOTIFY_VISIBLE_CHILD = "notify::visible-child";
|
|
|
11
12
|
*/
|
|
12
13
|
export interface NotifyVisibleChildEventData extends EventData, ViewStackNotifyPayload {
|
|
13
14
|
}
|
|
14
|
-
|
|
15
|
+
declare const AdwViewStack_base: (abstract new (...args: any[]) => {
|
|
16
|
+
connect(eventName: string, callback: (self: /*elided*/ any, data: EventData) => void): number;
|
|
17
|
+
disconnect(handlerId: number): void;
|
|
18
|
+
_emit(eventName: string): void;
|
|
19
|
+
addEventListener(eventName: string, callback: (data: EventData) => void, thisArg?: unknown, once?: boolean): void;
|
|
20
|
+
removeEventListener(eventName: string, callback?: (data: EventData) => void, thisArg?: unknown): void;
|
|
21
|
+
notify<T extends EventData>(data: T): void;
|
|
22
|
+
notifyPropertyChange(name: string, value: unknown, oldValue?: unknown): void;
|
|
23
|
+
set(name: string, value: unknown): void;
|
|
24
|
+
get(name: string): unknown;
|
|
25
|
+
}) & typeof GridLayout;
|
|
26
|
+
export declare class AdwViewStack extends AdwViewStack_base {
|
|
15
27
|
private readonly _state;
|
|
16
|
-
constructor();
|
|
28
|
+
constructor(props?: ConstructProps<AdwViewStack>);
|
|
17
29
|
/**
|
|
18
30
|
* Register a page. It becomes visible when nothing is selected yet — and,
|
|
19
31
|
* unlike before, that auto-pick NOTIFIES, so a bound switcher highlights the
|
|
@@ -22,7 +34,7 @@ export declare class AdwViewStack extends GridLayout {
|
|
|
22
34
|
*/
|
|
23
35
|
add(content: View, name: string, title?: string, icon?: string): AdwViewStackPage;
|
|
24
36
|
/** Convenience alias matching `Adw.ViewStack.add_titled`. */
|
|
25
|
-
|
|
37
|
+
add_titled(content: View, name: string, title: string): AdwViewStackPage;
|
|
26
38
|
/**
|
|
27
39
|
* Remove the first page named `name` and detach its content view. Returns
|
|
28
40
|
* whether anything was removed. When the removed page was the visible one the
|
|
@@ -39,9 +51,30 @@ export declare class AdwViewStack extends GridLayout {
|
|
|
39
51
|
setPageVisible(name: string, visible: boolean): boolean;
|
|
40
52
|
/** All registered pages, in add order (a bound switcher reads this). */
|
|
41
53
|
get pages(): readonly AdwViewStackPage[];
|
|
42
|
-
/**
|
|
54
|
+
/**
|
|
55
|
+
* The visible page's position, `-1` when nothing is selected.
|
|
56
|
+
*
|
|
57
|
+
* A REPORT, NOT A DOOR (ADR 0048). `Adw.ViewStack` selects by NAME, and an ordinal
|
|
58
|
+
* is derived: an insertion before the visible page increments it, a reorder rewrites
|
|
59
|
+
* it and a removal decrements it — the three cases `ViewStackState` carries code for.
|
|
60
|
+
* So it is safe to read at a moment and unsafe to hold, and selecting is
|
|
61
|
+
* {@link visibleChildName}.
|
|
62
|
+
*/
|
|
43
63
|
get visibleChildIndex(): number;
|
|
44
|
-
|
|
64
|
+
/**
|
|
65
|
+
* Show the page at position `n`. Returns whether the selection moved.
|
|
66
|
+
*
|
|
67
|
+
* THE ORDINAL IS A CALL, NOT A PROPERTY (ADR 0048). It resolves against the page list
|
|
68
|
+
* as it is at THIS moment and keeps nothing, which is the whole difference from the
|
|
69
|
+
* setter it replaces: a held index silently comes to mean another page after an
|
|
70
|
+
* insert, a reorder or a removal. Port-owned — measured, `refs/libadwaita` gives
|
|
71
|
+
* `AdwViewStack` no ordinal API at all — and named for the `selectNthPage` the tab
|
|
72
|
+
* view already has, so the two widgets ask the same question the same way.
|
|
73
|
+
*
|
|
74
|
+
* A non-integer or out-of-range `n` selects nothing; the guard is the core's
|
|
75
|
+
* ({@link ViewStackState.setVisibleIndex}) and is pinned by the shared vectors.
|
|
76
|
+
*/
|
|
77
|
+
selectNthPage(n: number): boolean;
|
|
45
78
|
/** The visible page name (`Adw.ViewStack.visible-child-name`), `''` for none. */
|
|
46
79
|
get visibleChildName(): string;
|
|
47
80
|
set visibleChildName(name: string | null | undefined);
|
|
@@ -1,15 +1,27 @@
|
|
|
1
1
|
import { GridLayout } from '@nativescript/core';
|
|
2
2
|
import type { AdwViewStack } from './adw-view-stack.js';
|
|
3
|
-
|
|
3
|
+
import { type ConstructProps } from './construct-props.js';
|
|
4
|
+
declare const AdwViewSwitcherBar_base: (abstract new (...args: any[]) => {
|
|
5
|
+
connect(eventName: string, callback: (self: /*elided*/ any, data: import("@nativescript/core").EventData) => void): number;
|
|
6
|
+
disconnect(handlerId: number): void;
|
|
7
|
+
_emit(eventName: string): void;
|
|
8
|
+
addEventListener(eventName: string, callback: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown, once?: boolean): void;
|
|
9
|
+
removeEventListener(eventName: string, callback?: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown): void;
|
|
10
|
+
notify<T extends import("@nativescript/core").EventData>(data: T): void;
|
|
11
|
+
notifyPropertyChange(name: string, value: unknown, oldValue?: unknown): void;
|
|
12
|
+
set(name: string, value: unknown): void;
|
|
13
|
+
get(name: string): unknown;
|
|
14
|
+
}) & typeof GridLayout;
|
|
15
|
+
export declare class AdwViewSwitcherBar extends AdwViewSwitcherBar_base {
|
|
4
16
|
/** The horizontal (homogeneous) row of buttons. */
|
|
5
17
|
private readonly _bar;
|
|
6
18
|
private _nodes;
|
|
7
19
|
private _stack;
|
|
8
20
|
private _stackListener;
|
|
9
21
|
private readonly _barState;
|
|
10
|
-
constructor();
|
|
22
|
+
constructor(props?: ConstructProps<AdwViewSwitcherBar>);
|
|
11
23
|
/** Bind to an {@link AdwViewStack}: build buttons from its pages + two-way sync. */
|
|
12
|
-
|
|
24
|
+
set_stack(stack: AdwViewStack | null): void;
|
|
13
25
|
/** The bound stack (`Adw.ViewSwitcherBar.stack`). */
|
|
14
26
|
get stack(): AdwViewStack | null;
|
|
15
27
|
set stack(value: AdwViewStack | null);
|
|
@@ -39,3 +51,4 @@ export declare class AdwViewSwitcherBar extends GridLayout {
|
|
|
39
51
|
private _buildButton;
|
|
40
52
|
private _applyRevealed;
|
|
41
53
|
}
|
|
54
|
+
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AdwViewSwitcherBase } from './view-switcher-base.js';
|
|
2
|
+
import { type ConstructProps } from './construct-props.js';
|
|
2
3
|
export declare class AdwViewSwitcher extends AdwViewSwitcherBase {
|
|
3
|
-
constructor();
|
|
4
|
+
constructor(props?: ConstructProps<AdwViewSwitcher>);
|
|
4
5
|
protected get barClass(): string;
|
|
5
6
|
protected get buttonClass(): string;
|
|
6
7
|
}
|
|
@@ -1,16 +1,28 @@
|
|
|
1
|
-
import { Label, StackLayout } from '@nativescript/core';
|
|
1
|
+
import { Label, StackLayout, type EventData } from '@nativescript/core';
|
|
2
|
+
import { type ConstructProps } from './construct-props.js';
|
|
2
3
|
/** Event name emitted when {@link AdwWindowTitle.title} changes. */
|
|
3
4
|
export declare const NOTIFY_TITLE = "notify::title";
|
|
4
5
|
/** Event name emitted when {@link AdwWindowTitle.subtitle} changes. */
|
|
5
6
|
export declare const NOTIFY_SUBTITLE = "notify::subtitle";
|
|
6
|
-
|
|
7
|
+
declare const AdwWindowTitle_base: (abstract new (...args: any[]) => {
|
|
8
|
+
connect(eventName: string, callback: (self: /*elided*/ any, data: EventData) => void): number;
|
|
9
|
+
disconnect(handlerId: number): void;
|
|
10
|
+
_emit(eventName: string): void;
|
|
11
|
+
addEventListener(eventName: string, callback: (data: EventData) => void, thisArg?: unknown, once?: boolean): void;
|
|
12
|
+
removeEventListener(eventName: string, callback?: (data: EventData) => void, thisArg?: unknown): void;
|
|
13
|
+
notify<T extends EventData>(data: T): void;
|
|
14
|
+
notifyPropertyChange(name: string, value: unknown, oldValue?: unknown): void;
|
|
15
|
+
set(name: string, value: unknown): void;
|
|
16
|
+
get(name: string): unknown;
|
|
17
|
+
}) & typeof StackLayout;
|
|
18
|
+
export declare class AdwWindowTitle extends AdwWindowTitle_base {
|
|
7
19
|
/** The bold title label. */
|
|
8
20
|
protected readonly _titleLabel: Label;
|
|
9
21
|
/** The dim subtitle label. */
|
|
10
22
|
protected readonly _subtitleLabel: Label;
|
|
11
23
|
/** The headless title/subtitle pair + change detection (ADR 0004). */
|
|
12
24
|
private readonly _state;
|
|
13
|
-
constructor();
|
|
25
|
+
constructor(props?: ConstructProps<AdwWindowTitle>);
|
|
14
26
|
/** The window title (bold, top line). Empty collapses its label. */
|
|
15
27
|
get title(): string;
|
|
16
28
|
set title(value: string);
|
|
@@ -21,3 +33,4 @@ export declare class AdwWindowTitle extends StackLayout {
|
|
|
21
33
|
private _apply;
|
|
22
34
|
private _notify;
|
|
23
35
|
}
|
|
36
|
+
export {};
|
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
import { FlexboxLayout, type View } from '@nativescript/core';
|
|
2
2
|
import { type AdwLengthUnit, type AdwWrapBoxJustify, type AdwWrapBoxOrientation, type AdwWrapBoxPackDirection, type AdwWrapPolicy } from '@gjsify/adwaita-core';
|
|
3
|
+
import { type ConstructProps } from './construct-props.js';
|
|
3
4
|
/** Every `notify::` an `Adw.WrapBox` emits (adw-wrap-box.c:284-497). */
|
|
4
5
|
export type AdwWrapBoxProperty = 'child-spacing' | 'child-spacing-unit' | 'pack-direction' | 'align' | 'justify' | 'justify-last-line' | 'line-spacing' | 'line-spacing-unit' | 'line-homogeneous' | 'natural-line-length' | 'natural-line-length-unit' | 'wrap-reverse' | 'wrap-policy' | 'orientation';
|
|
5
|
-
|
|
6
|
+
declare const AdwWrapBox_base: (abstract new (...args: any[]) => {
|
|
7
|
+
connect(eventName: string, callback: (self: /*elided*/ any, data: import("@nativescript/core").EventData) => void): number;
|
|
8
|
+
disconnect(handlerId: number): void;
|
|
9
|
+
_emit(eventName: string): void;
|
|
10
|
+
addEventListener(eventName: string, callback: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown, once?: boolean): void;
|
|
11
|
+
removeEventListener(eventName: string, callback?: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown): void;
|
|
12
|
+
notify<T extends import("@nativescript/core").EventData>(data: T): void;
|
|
13
|
+
notifyPropertyChange(name: string, value: unknown, oldValue?: unknown): void;
|
|
14
|
+
set(name: string, value: unknown): void;
|
|
15
|
+
get(name: string): unknown;
|
|
16
|
+
}) & typeof FlexboxLayout;
|
|
17
|
+
export declare class AdwWrapBox extends AdwWrapBox_base {
|
|
6
18
|
private _childSpacing;
|
|
7
19
|
private _lineSpacing;
|
|
8
20
|
private _childSpacingUnit;
|
|
@@ -17,17 +29,17 @@ export declare class AdwWrapBox extends FlexboxLayout {
|
|
|
17
29
|
private _orientation;
|
|
18
30
|
private _naturalLineLength;
|
|
19
31
|
private _naturalLineLengthUnit;
|
|
20
|
-
constructor();
|
|
32
|
+
constructor(props?: ConstructProps<AdwWrapBox>);
|
|
21
33
|
/** Append a child — `adw_wrap_box_append` (adw-wrap-box.c:1344-1352). */
|
|
22
|
-
|
|
34
|
+
append(view: View): void;
|
|
23
35
|
/** Remove a previously-added child — `adw_wrap_box_remove` (:1387-1395). */
|
|
24
36
|
remove(view: View): void;
|
|
25
37
|
/** `adw_wrap_box_remove_all` (:1406-1414). */
|
|
26
|
-
|
|
38
|
+
remove_all(): void;
|
|
27
39
|
/**
|
|
28
|
-
* Every path a child can enter by — `
|
|
40
|
+
* Every path a child can enter by — `append()`, a direct `addChild()`, and XML
|
|
29
41
|
* inflation via `_addChildFromBuilder` — ends here, which is why the spacing
|
|
30
|
-
* is applied here and not in `
|
|
42
|
+
* is applied here and not in `append()`. It used to be applied in `append()` only,
|
|
31
43
|
* so a child declared in markup got no spacing at all; C routes GtkBuildable's
|
|
32
44
|
* `add_child` through the same append for the same reason.
|
|
33
45
|
*/
|
|
@@ -40,9 +52,9 @@ export declare class AdwWrapBox extends FlexboxLayout {
|
|
|
40
52
|
* `WRAP_BOX_CHILD_ORDER_VECTORS`. Returns whether the insert happened; a
|
|
41
53
|
* refusal is where C would have hit a `g_return_if_fail`.
|
|
42
54
|
*/
|
|
43
|
-
|
|
55
|
+
insert_child_after(view: View, sibling?: View | null): boolean;
|
|
44
56
|
/** `adw_wrap_box_reorder_child_after` (:1315-1332). Same NULL rule. */
|
|
45
|
-
|
|
57
|
+
reorder_child_after(view: View, sibling?: View | null): boolean;
|
|
46
58
|
private _childViews;
|
|
47
59
|
private _applyOrder;
|
|
48
60
|
/** Gap between items in a line, in {@link childSpacingUnit}. Defaults to 0, as in C. */
|
|
@@ -101,3 +113,4 @@ export declare class AdwWrapBox extends FlexboxLayout {
|
|
|
101
113
|
private _applyLayout;
|
|
102
114
|
private _applyChildren;
|
|
103
115
|
}
|
|
116
|
+
export {};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { type AdwAvatarMode } from '@gjsify/adwaita-core';
|
|
2
|
+
import { type NsVisibility } from './row-state.js';
|
|
3
|
+
export type { AdwAvatarMode };
|
|
4
|
+
/** The fallback icon NAME, exported because it is a SUBSTITUTION a caller can see. */
|
|
5
|
+
export declare const AVATAR_DEFAULT_ICON = "avatar-default-symbolic";
|
|
6
|
+
/**
|
|
7
|
+
* `update_icon`: the caller's icon, or the default when none was set.
|
|
8
|
+
*
|
|
9
|
+
* The emptiness test is the port's, not the C's — C keys on `icon_name != NULL`, and a
|
|
10
|
+
* NativeScript setter has no null to tell from `''`. Same reading `AdwStatusPage` takes.
|
|
11
|
+
*/
|
|
12
|
+
export declare function avatarIcon(iconName: string | null | undefined): string;
|
|
13
|
+
/** Which of the avatar's two NativeScript children is in the layout. */
|
|
14
|
+
export interface AvatarVisibilities {
|
|
15
|
+
/** The initials label. */
|
|
16
|
+
label: NsVisibility;
|
|
17
|
+
/** The fallback symbolic icon. */
|
|
18
|
+
icon: NsVisibility;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The two `visibility` values for a mode, straight off `update_visibility`'s three
|
|
22
|
+
* `gtk_widget_set_visible` calls (refs/libadwaita/src/adw-avatar.c:122-123#has_custom_image).
|
|
23
|
+
*
|
|
24
|
+
* `'image'` is REACHABLE and shows NEITHER child, rather than being folded into `'icon'`:
|
|
25
|
+
* a function that cannot express the third mode is how the web element shipped a
|
|
26
|
+
* `hasCustomImage: false` no vector could falsify.
|
|
27
|
+
*/
|
|
28
|
+
export declare function avatarVisibilities(mode: AdwAvatarMode): AvatarVisibilities;
|
|
29
|
+
/** What `AdwAvatar` sets on its two children for a given property state. */
|
|
30
|
+
export interface AvatarViewState extends AvatarVisibilities {
|
|
31
|
+
/** The mode `update_visibility` picked. */
|
|
32
|
+
mode: AdwAvatarMode;
|
|
33
|
+
/**
|
|
34
|
+
* The icon the icon child renders — the default when the caller set none.
|
|
35
|
+
*
|
|
36
|
+
* NOT `icon`: {@link AvatarVisibilities} already owns that key for the child's
|
|
37
|
+
* `visibility`, and one interface cannot hold both.
|
|
38
|
+
*/
|
|
39
|
+
iconName: string;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* The WHOLE decision `AdwAvatar` makes, so that a spec can drive it.
|
|
43
|
+
*
|
|
44
|
+
* It lives here for a reason a mutation showed: `extends GridLayout` puts the class out of
|
|
45
|
+
* reach of every unit test in this package, so anything decided inside it is
|
|
46
|
+
* unfalsifiable — the fallback was reverted to "always initials" in the widget body and
|
|
47
|
+
* the whole suite, plus every gate that reads this tree, stayed green. What is left
|
|
48
|
+
* unreachable is three assignments; no test here closes that.
|
|
49
|
+
*
|
|
50
|
+
* `hasCustomImage` is hard `false` because the port has no `custom-image` counterpart
|
|
51
|
+
* (status/open-todos.md); when it lands, only this argument changes.
|
|
52
|
+
*/
|
|
53
|
+
export declare function avatarViewState(input: {
|
|
54
|
+
showInitials: boolean;
|
|
55
|
+
text: string;
|
|
56
|
+
iconName: string;
|
|
57
|
+
}): AvatarViewState;
|
|
@@ -63,7 +63,7 @@ export declare function requestBottomSheetClose(state: BottomSheetPresentation,
|
|
|
63
63
|
* libadwaita never writes to the child's own style classes — the marker lives on
|
|
64
64
|
* the internal bin (`adw_bottom_sheet_set_content`, adw-bottom-sheet.c:1497-1510).
|
|
65
65
|
* This port does write it, and used to do so with a bare string concat, so
|
|
66
|
-
* `
|
|
66
|
+
* `set_content(v)` twice left `'adw-bottom-sheet-content adw-bottom-sheet-content'`.
|
|
67
67
|
*/
|
|
68
68
|
export declare function addMarkerClass(className: string | null | undefined, marker: string): string;
|
|
69
69
|
/**
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { resolveWrapBoxChildOrder } from '@gjsify/adwaita-core';
|
|
2
|
+
/**
|
|
3
|
+
* `Gtk.Box:spacing`'s default, in DIPs. `0` in C (`gtkbox.c`, the property's default
|
|
4
|
+
* value), which is also what makes the margin write invisible until a caller asks.
|
|
5
|
+
*/
|
|
6
|
+
export declare const DEFAULT_BOX_SPACING = 0;
|
|
7
|
+
/** Which axis a box stacks along — NativeScript's two words, and `Gtk.Orientation`'s nicks. */
|
|
8
|
+
export type BoxOrientation = 'horizontal' | 'vertical';
|
|
9
|
+
/**
|
|
10
|
+
* A spacing value as the box will hold it: a finite, non-negative number of DIPs.
|
|
11
|
+
*
|
|
12
|
+
* `gtk_box_set_spacing` takes an `int` and the property's minimum is 0, so a negative
|
|
13
|
+
* value is clamped rather than refused — the same clamp `normalizeWrapBoxSpacing` applies
|
|
14
|
+
* one widget over, restated here because that one carries the wrap box's UNIT machinery
|
|
15
|
+
* (`Adw.LengthUnit`) and a `Gtk.Box` has no unit to convert from.
|
|
16
|
+
*/
|
|
17
|
+
export declare function normalizeBoxSpacing(value: unknown): number;
|
|
18
|
+
/** Whether writing `next` over `current` is a change the box must push to its children. */
|
|
19
|
+
export declare function boxSpacingChanges(current: number, next: unknown): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* The margin shorthand that gives child `index` its share of the box's gap.
|
|
22
|
+
*
|
|
23
|
+
* `top right bottom left`, NativeScript's own order. The first child gets none: with N
|
|
24
|
+
* children there are N−1 gaps, and putting the gap on the LEADING edge of every child but
|
|
25
|
+
* the first is the only distribution that leaves the box's own bounds untouched.
|
|
26
|
+
*/
|
|
27
|
+
export declare function boxChildMargin(index: number, spacing: unknown, orientation: BoxOrientation): string;
|
|
28
|
+
/**
|
|
29
|
+
* Where the child list ends up after an `insert_child_after` / `reorder_child_after`, or
|
|
30
|
+
* `null` where C would have hit a `g_return_if_fail`.
|
|
31
|
+
*
|
|
32
|
+
* SHARED WITH THE WRAP BOX RATHER THAN COPIED, and the name is the wrap box's only
|
|
33
|
+
* because that widget needed it first: the rule is `gtk_widget_insert_after`'s — a NULL
|
|
34
|
+
* sibling means the FIRST position, not the last — and `gtk_box_insert_child_after`
|
|
35
|
+
* documents itself by pointing at it. `resolveWrapBoxChildOrder` is generic over the
|
|
36
|
+
* child type and pure, so the alternative was a second copy of one paragraph of GTK
|
|
37
|
+
* semantics that could drift from the vectors already pinning it.
|
|
38
|
+
*/
|
|
39
|
+
export { resolveWrapBoxChildOrder as resolveBoxChildOrder };
|
|
@@ -5,17 +5,17 @@ export type { ButtonContentEllipsize };
|
|
|
5
5
|
/** The class the content carries while `can-shrink` is set, for the theme to key off. */
|
|
6
6
|
export declare const BUTTON_CONTENT_CAN_SHRINK_CLASS = "can-shrink";
|
|
7
7
|
/**
|
|
8
|
-
* The
|
|
9
|
-
*
|
|
8
|
+
* The icon the icon view is given: the app's, or the `image-missing` NAME for an empty
|
|
9
|
+
* slot — the fallback `init` applies too, while `icon_name` is still `""`.
|
|
10
10
|
*
|
|
11
11
|
* The C NEVER hides the image, only the label, so this port keeps the icon view
|
|
12
12
|
* parented at all times and swaps its source. Upstream's own doc comments claim the
|
|
13
13
|
* icon is hidden instead; the code disagrees with them and this follows the code
|
|
14
14
|
* (see the conformance vector's `rule`).
|
|
15
15
|
*/
|
|
16
|
-
export declare function
|
|
16
|
+
export declare function buttonContentIcon(icon: string): string;
|
|
17
17
|
/** Whether the icon shown is the empty-slot fallback rather than an app asset. */
|
|
18
|
-
export declare function buttonContentIconIsFallback(
|
|
18
|
+
export declare function buttonContentIconIsFallback(icon: string): boolean;
|
|
19
19
|
/**
|
|
20
20
|
* The parent button's `className` with `image-text-button` added — the root-time half
|
|
21
21
|
* of `adw_button_content_root`. Adds rather than rewrites, so a caller's composed
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** The slot a `Gtk.Button` currently shows. `empty` is a button with no child at all. */
|
|
2
|
+
export type ButtonSlot = 'label' | 'icon' | 'child' | 'empty';
|
|
3
|
+
/** Which property was written. */
|
|
4
|
+
export type ButtonSlotWrite = 'label' | 'icon' | 'child';
|
|
5
|
+
/**
|
|
6
|
+
* The slot a button shows after `wrote` was assigned `value`.
|
|
7
|
+
*
|
|
8
|
+
* AN EMPTY LABEL IS STILL THE LABEL SLOT, and an empty icon name is still the icon slot:
|
|
9
|
+
* `gtk_button_set_label("")` leaves a `GtkLabel` in the child, showing nothing — the
|
|
10
|
+
* button is not childless, it has an empty label. Only `set_child(NULL)` empties it, which
|
|
11
|
+
* is the one write that can return `empty`. Reading `''` as "clear the button" would make
|
|
12
|
+
* a caller who blanks a label lose the padding the child was holding.
|
|
13
|
+
*/
|
|
14
|
+
export declare function buttonSlotAfterWrite(wrote: ButtonSlotWrite, value: unknown): ButtonSlot;
|
|
15
|
+
/** Whether moving from `from` to `to` has to detach the view `from` had parented. */
|
|
16
|
+
export declare function buttonSlotDetaches(from: ButtonSlot, to: ButtonSlot): boolean;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The keys a widget's construct-props bag accepts, derived from the widget itself.
|
|
3
|
+
*
|
|
4
|
+
* Methods are dropped; everything else a caller could assign stays, its type read off the
|
|
5
|
+
* GETTER (so `size?: number` even though `set size(value: number | string)` also takes the
|
|
6
|
+
* string XML hands over — the bag is the TypeScript door, the attribute is the string one).
|
|
7
|
+
*
|
|
8
|
+
* A read-only accessor survives this type and is refused at RUNTIME instead. The
|
|
9
|
+
* `readonly`-detecting mapped type that would have caught `parent` at compile time was
|
|
10
|
+
* measured to drop `size` as well — a getter/setter pair with different types does not
|
|
11
|
+
* compare equal under it — and a type that silently loses real properties is worse than
|
|
12
|
+
* one that admits two impossible ones and says so when they arrive.
|
|
13
|
+
*/
|
|
14
|
+
export type ConstructProps<T> = Partial<{
|
|
15
|
+
[K in keyof T as T[K] extends (...args: never[]) => unknown ? never : K]: K extends AlignmentProp ? T[K] | number : T[K];
|
|
16
|
+
}>;
|
|
17
|
+
/**
|
|
18
|
+
* The NativeScript properties whose value this package reads as a `Gtk.Align`.
|
|
19
|
+
*
|
|
20
|
+
* `horizontalAlignment` and `verticalAlignment` are NativeScript's own — declared by
|
|
21
|
+
* `View`, never re-declared by a widget here — so this is a WIDENING of what they accept
|
|
22
|
+
* and not a second vocabulary: every NativeScript spelling passes through untouched, and
|
|
23
|
+
* only the GTK-side ones are translated.
|
|
24
|
+
*
|
|
25
|
+
* WHERE THIS DOOR AND THE ATTRIBUTE DOOR DISAGREE, exactly. NativeScript's `verticalAlignment`
|
|
26
|
+
* is `'top' | 'middle' | 'bottom' | 'stretch'`, and its layout pass sends anything else to the
|
|
27
|
+
* `default:` arm, which is `stretch`
|
|
28
|
+
* (`ui/core/view/view-helper/view-helper-common.ts`, both platforms). So the three GTK
|
|
29
|
+
* spellings this table TRANSLATES on that axis — `center`, `start`, `end` — reach the widget
|
|
30
|
+
* as `middle`/`top`/`bottom` through the bag and as themselves through
|
|
31
|
+
* `<adw:Avatar verticalAlignment="center">`, where they silently stretch. The horizontal axis
|
|
32
|
+
* has no such gap: `start`, `end` and `center` are NativeScript's own words, and `fill` maps
|
|
33
|
+
* to `stretch`, which is also what the `default:` arm does with it. Nothing here closes the
|
|
34
|
+
* vertical three — the attribute door has no coercer to hang this on and a per-widget
|
|
35
|
+
* `set verticalAlignment` would shadow `View`'s, which is the hazard arm 2 of
|
|
36
|
+
* `check-nativescript-xml-doors.mjs` exists for — so it is a declared divergence and the same
|
|
37
|
+
* § 1 convergence question ADR 0034 § Amendment 12 leaves open for `halign` / `valign`.
|
|
38
|
+
*/
|
|
39
|
+
declare const ALIGNMENT_AXES: {
|
|
40
|
+
readonly horizontalAlignment: "horizontal";
|
|
41
|
+
readonly verticalAlignment: "vertical";
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* The keys the bag reads as a `Gtk.Align` — the runtime table's OWN key set, so the type
|
|
45
|
+
* cannot admit one the applier does not translate or refuse one it does.
|
|
46
|
+
*
|
|
47
|
+
* {@link ConstructProps} widens exactly these to `| number`. Without it the constant spelling
|
|
48
|
+
* was reachable at runtime and refused by the compiler: `new AdwAvatar({ horizontalAlignment:
|
|
49
|
+
* Gtk.Align.CENTER })` was `TS2322: Type 'number' is not assignable to type 'string'`, which
|
|
50
|
+
* is the one caller the second spelling exists for.
|
|
51
|
+
*/
|
|
52
|
+
export type AlignmentProp = keyof typeof ALIGNMENT_AXES;
|
|
53
|
+
/**
|
|
54
|
+
* A `Gtk.Align` value — the nick, or the constant a GJS caller's `Gtk.Align.CENTER` is —
|
|
55
|
+
* as the NativeScript alignment for `axis`. Any other value is NativeScript's own and is
|
|
56
|
+
* returned unchanged.
|
|
57
|
+
*
|
|
58
|
+
* The number spelling is resolved through {@link GTK_ALIGN} rather than assumed, because
|
|
59
|
+
* the constants are NOT the positions in the nick list: `GTK_ALIGN_BASELINE` was
|
|
60
|
+
* deprecated in GTK 4.12 and made an ALIAS of `GTK_ALIGN_BASELINE_FILL`, so both are 4 and
|
|
61
|
+
* `GTK_ALIGN_BASELINE_CENTER` is 5 where its position says 6.
|
|
62
|
+
*/
|
|
63
|
+
export declare function nsAlignment(value: unknown, axis: 'horizontal' | 'vertical'): unknown;
|
|
64
|
+
/**
|
|
65
|
+
* Apply a construct-props bag through the target's declared setters.
|
|
66
|
+
*
|
|
67
|
+
* Called as the LAST statement of a widget's own constructor, so the bag wins over whatever
|
|
68
|
+
* that constructor set up — which is the point of a construct property.
|
|
69
|
+
*
|
|
70
|
+
* An `undefined` VALUE is skipped rather than assigned: every key of a `Partial` is
|
|
71
|
+
* optional, so `{ title: maybeTitle }` is the ordinary spelling of "set it if I have one",
|
|
72
|
+
* and assigning `undefined` there would clear a default the constructor had just chosen. An
|
|
73
|
+
* unknown KEY still throws — the key is what the caller got wrong.
|
|
74
|
+
*
|
|
75
|
+
* The parameter is a bare record rather than `ConstructProps<T>` because inside a
|
|
76
|
+
* constructor `this` has the POLYMORPHIC this-type: a generic `<T extends object>(target: T,
|
|
77
|
+
* props?: ConstructProps<T>)` infers `T` as `this`, and `ConstructProps<AdwAvatar>` is not
|
|
78
|
+
* assignable to `ConstructProps<this>` — 46 of 46 call sites failed to compile that way. The
|
|
79
|
+
* typed door is the widget's own constructor signature; this is what it hands over.
|
|
80
|
+
*/
|
|
81
|
+
export declare function applyConstructProps(target: object, props?: Readonly<Record<string, unknown>>): void;
|
|
82
|
+
export {};
|
|
@@ -37,7 +37,7 @@ export interface PasswordEntryRowViews {
|
|
|
37
37
|
field: {
|
|
38
38
|
secure: boolean;
|
|
39
39
|
};
|
|
40
|
-
/** The peek toggle, whose `
|
|
40
|
+
/** The peek toggle, whose `iconName` takes an Adwaita icon name or SVG source. */
|
|
41
41
|
peekButton: {
|
|
42
42
|
iconName: string;
|
|
43
43
|
};
|
|
@@ -47,7 +47,7 @@ export declare const NS_ENTRY_ROW_CLASS = "adw-row adw-action-row adw-entry-row"
|
|
|
47
47
|
/** Base class list of a password entry row. */
|
|
48
48
|
export declare const NS_PASSWORD_ENTRY_ROW_CLASS = "adw-row adw-action-row adw-entry-row adw-password-entry-row";
|
|
49
49
|
/** Class list of the trailing pencil. */
|
|
50
|
-
export declare const NS_EDIT_ICON_CLASS = "
|
|
50
|
+
export declare const NS_EDIT_ICON_CLASS = "gtk-image adw-entry-edit";
|
|
51
51
|
/**
|
|
52
52
|
* Marker class for a desensitized part. NS has no insensitive state, so the
|
|
53
53
|
* class is only a styling hook — {@link NS_INSENSITIVE_OPACITY} is what the user
|
|
@@ -85,12 +85,13 @@ export declare function entryRowClassName(base: string, state: EntryRowRenderSta
|
|
|
85
85
|
*/
|
|
86
86
|
export declare function applyEntryRowState(views: EntryRowViews, state: EntryRowRenderState, base: string): void;
|
|
87
87
|
/**
|
|
88
|
-
*
|
|
88
|
+
* Paint one password-entry-row render snapshot — `notify_visibility_cb` (C:62-81).
|
|
89
89
|
*
|
|
90
|
-
* The core names
|
|
91
|
-
* `view-conceal-symbolic`, adw-password-entry-row.c:68,73)
|
|
92
|
-
*
|
|
90
|
+
* The peek icon goes through UNTRANSLATED. The core names it the way the C does
|
|
91
|
+
* (`view-reveal-symbolic` / `view-conceal-symbolic`, adw-password-entry-row.c:68,73),
|
|
92
|
+
* and since `icon-theme.ts` this port resolves that name at the widget — so the
|
|
93
|
+
* `peekIconSvg` that used to sit here, mapping the two names onto two imported
|
|
94
|
+
* documents, was one of four hand-rolled registries and is gone. Its whole body was
|
|
95
|
+
* the substitution the registry now performs for every name at once.
|
|
93
96
|
*/
|
|
94
|
-
export declare function peekIconSvg(iconName: PasswordEntryRowRenderState['peekIconName']): string;
|
|
95
|
-
/** Paint one password-entry-row render snapshot — `notify_visibility_cb` (C:62-81). */
|
|
96
97
|
export declare function applyPasswordEntryRowState(views: PasswordEntryRowViews, state: PasswordEntryRowRenderState): void;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Every `Gtk.Align` member, in GIR declaration order.
|
|
3
|
+
*
|
|
4
|
+
* Held against `GtkAlignNick` in `packages/framework/gtk-host/src/generated/props.ts` —
|
|
5
|
+
* in-repo, GIR-derived, emitted by a generator that has never heard of this port — so this
|
|
6
|
+
* array is a copy that cannot drift rather than a second source.
|
|
7
|
+
*/
|
|
8
|
+
export declare const GTK_ALIGN_NICKS: readonly ["fill", "start", "end", "center", "baseline-fill", "baseline", "baseline-center"];
|
|
9
|
+
/**
|
|
10
|
+
* The members that are a SECOND NAME for another member rather than a value of their own,
|
|
11
|
+
* as alias to the member it stands for.
|
|
12
|
+
*
|
|
13
|
+
* The single authored GIR fact in this file. An alias takes its target's number and does
|
|
14
|
+
* not consume one, which is what shifts every later member below its position.
|
|
15
|
+
*
|
|
16
|
+
* `baseline` is here because GTK 4.12 deprecated `GTK_ALIGN_BASELINE` in favour of
|
|
17
|
+
* `GTK_ALIGN_BASELINE_FILL` and gave the new name the SAME value — "a different name for
|
|
18
|
+
* `GTK_ALIGN_BASELINE`", as the GIR doc on `baseline-fill` puts it — rather than adding a
|
|
19
|
+
* member. That is the whole of the off-by-one below it.
|
|
20
|
+
*/
|
|
21
|
+
export declare const GTK_ALIGN_ALIASES: Readonly<Record<string, string>>;
|
|
22
|
+
/**
|
|
23
|
+
* Every `Gtk.Align` member, nick to constant.
|
|
24
|
+
*
|
|
25
|
+
* Six distinct values across seven nicks: `baseline` and `baseline-fill` are the same
|
|
26
|
+
* member under two names.
|
|
27
|
+
*/
|
|
28
|
+
export declare const GTK_ALIGN: Readonly<Record<string, number>>;
|
|
29
|
+
/**
|
|
30
|
+
* `Gtk.Align` to `View.horizontalAlignment`.
|
|
31
|
+
*
|
|
32
|
+
* FOUR OF THE SEVEN MEMBERS MAP, not two. ADR 0034 § Context measured NativeScript's
|
|
33
|
+
* horizontal vocabulary as `'left' | 'center' | 'right' | 'stretch'` and concluded that
|
|
34
|
+
* `start` and `end` have no counterpart; `@nativescript/core` 9.0.21-next.15 declares
|
|
35
|
+
* `'start' | 'left' | 'center' | 'right' | 'end' | 'stretch'` (`core-types/index.ts:127`),
|
|
36
|
+
* and its shared layout pass resolves `start`/`end` against the view's own `direction`
|
|
37
|
+
* (`ui/core/view/view-helper/view-helper-common.ts:98-111`) — the same direction-relative
|
|
38
|
+
* meaning GTK gives them. The remainder is the three baselines and nothing else.
|
|
39
|
+
*/
|
|
40
|
+
export declare const NS_HORIZONTAL_ALIGNMENT: Readonly<Record<string, string>>;
|
|
41
|
+
/**
|
|
42
|
+
* `Gtk.Align` to `View.verticalAlignment`.
|
|
43
|
+
*
|
|
44
|
+
* NativeScript's vertical vocabulary is `'top' | 'middle' | 'bottom' | 'stretch'` — no
|
|
45
|
+
* `center` and no `start`/`end`, so all four mapped members are genuinely translated here
|
|
46
|
+
* rather than passed through. GTK's vertical `start`/`end` are not direction-relative
|
|
47
|
+
* (`gtkenums.h` scopes that to the horizontal context), which is why they can be top and
|
|
48
|
+
* bottom without asking the view which way its text runs.
|
|
49
|
+
*/
|
|
50
|
+
export declare const NS_VERTICAL_ALIGNMENT: Readonly<Record<string, string>>;
|
|
51
|
+
/**
|
|
52
|
+
* Why a `Gtk.Align` member has no NativeScript counterpart on either axis.
|
|
53
|
+
*
|
|
54
|
+
* ADR 0034 § 1's declared remainder: a member that is absent from both maps and absent from
|
|
55
|
+
* here is a silent omission, and the gate fails on it.
|
|
56
|
+
*/
|
|
57
|
+
export declare const GTK_ALIGN_REFUSALS: Readonly<Record<string, string>>;
|
|
58
|
+
/** The refusal reason for `nick`, for an error message that says why and not only no. */
|
|
59
|
+
export declare function gtkAlignRefusal(nick: string): string;
|