@gjsify/adwaita-nativescript 0.11.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 -0
- package/lib/esm/fonts.js +2 -0
- package/lib/esm/index.js +1 -0
- package/lib/esm/widgets/adw-about-dialog.js +1 -0
- package/lib/esm/widgets/adw-action-row.js +1 -0
- package/lib/esm/widgets/adw-alert-dialog.js +1 -0
- package/lib/esm/widgets/adw-avatar.js +1 -0
- package/lib/esm/widgets/adw-banner.js +1 -0
- package/lib/esm/widgets/adw-bottom-sheet.js +1 -0
- package/lib/esm/widgets/adw-button-content.js +1 -0
- package/lib/esm/widgets/adw-button-row.js +1 -0
- package/lib/esm/widgets/adw-button.js +1 -0
- package/lib/esm/widgets/adw-carousel.js +1 -0
- package/lib/esm/widgets/adw-clamp.js +1 -0
- package/lib/esm/widgets/adw-combo-row.js +1 -0
- package/lib/esm/widgets/adw-entry-row.js +1 -0
- package/lib/esm/widgets/adw-expander-row.js +1 -0
- package/lib/esm/widgets/adw-header-bar.js +1 -0
- package/lib/esm/widgets/adw-icon.js +1 -0
- package/lib/esm/widgets/adw-image-button.js +1 -0
- package/lib/esm/widgets/adw-inline-view-switcher.js +1 -0
- package/lib/esm/widgets/adw-navigation-split-view.js +1 -0
- package/lib/esm/widgets/adw-navigation-view.js +1 -0
- package/lib/esm/widgets/adw-overlay-split-view.js +1 -0
- package/lib/esm/widgets/adw-password-entry-row.js +1 -0
- package/lib/esm/widgets/adw-preferences-dialog.js +1 -0
- package/lib/esm/widgets/adw-preferences-group.js +1 -0
- package/lib/esm/widgets/adw-preferences-page.js +1 -0
- package/lib/esm/widgets/adw-sidebar.js +1 -0
- package/lib/esm/widgets/adw-slider-row.js +1 -0
- package/lib/esm/widgets/adw-spin-row.js +1 -0
- package/lib/esm/widgets/adw-spinner.js +1 -0
- package/lib/esm/widgets/adw-split-button.js +1 -0
- package/lib/esm/widgets/adw-status-page.js +1 -0
- package/lib/esm/widgets/adw-switch-row.js +1 -0
- package/lib/esm/widgets/adw-tab-view.js +1 -0
- package/lib/esm/widgets/adw-toast-overlay.js +1 -0
- package/lib/esm/widgets/adw-toggle-group.js +1 -0
- package/lib/esm/widgets/adw-toolbar-view.js +1 -0
- package/lib/esm/widgets/adw-view-switcher.js +1 -0
- package/lib/esm/widgets/adw-window-title.js +1 -0
- package/lib/esm/widgets/adw-wrap-box.js +1 -0
- package/lib/esm/widgets/icon-path.js +1 -0
- package/lib/esm/widgets/icons.android.js +1 -0
- package/lib/esm/widgets/icons.js +1 -0
- package/lib/esm/widgets/index.js +1 -0
- package/lib/esm/widgets/row-press.js +1 -0
- package/lib/esm/widgets/split-view-base.js +1 -0
- package/lib/esm/widgets/view-switcher-base.js +1 -0
- package/lib/types/fonts.d.ts +38 -0
- package/lib/types/index.d.ts +16 -0
- package/lib/types/index.spec.d.ts +2 -0
- package/lib/types/widgets/adw-about-dialog.d.ts +50 -0
- package/lib/types/widgets/adw-action-row.d.ts +30 -0
- package/lib/types/widgets/adw-alert-dialog.d.ts +48 -0
- package/lib/types/widgets/adw-avatar.d.ts +20 -0
- package/lib/types/widgets/adw-banner.d.ts +25 -0
- package/lib/types/widgets/adw-bottom-sheet.d.ts +28 -0
- package/lib/types/widgets/adw-button-content.d.ts +18 -0
- package/lib/types/widgets/adw-button-row.d.ts +18 -0
- package/lib/types/widgets/adw-button.d.ts +21 -0
- package/lib/types/widgets/adw-carousel.d.ts +41 -0
- package/lib/types/widgets/adw-clamp.d.ts +15 -0
- package/lib/types/widgets/adw-combo-row.d.ts +42 -0
- package/lib/types/widgets/adw-entry-row.d.ts +17 -0
- package/lib/types/widgets/adw-expander-row.d.ts +24 -0
- package/lib/types/widgets/adw-header-bar.d.ts +35 -0
- package/lib/types/widgets/adw-icon.d.ts +19 -0
- package/lib/types/widgets/adw-image-button.d.ts +24 -0
- package/lib/types/widgets/adw-inline-view-switcher.d.ts +6 -0
- package/lib/types/widgets/adw-navigation-split-view.d.ts +11 -0
- package/lib/types/widgets/adw-navigation-view.d.ts +33 -0
- package/lib/types/widgets/adw-overlay-split-view.d.ts +28 -0
- package/lib/types/widgets/adw-password-entry-row.d.ts +4 -0
- package/lib/types/widgets/adw-preferences-dialog.d.ts +26 -0
- package/lib/types/widgets/adw-preferences-group.d.ts +23 -0
- package/lib/types/widgets/adw-preferences-page.d.ts +12 -0
- package/lib/types/widgets/adw-sidebar.d.ts +27 -0
- package/lib/types/widgets/adw-slider-row.d.ts +44 -0
- package/lib/types/widgets/adw-spin-row.d.ts +37 -0
- package/lib/types/widgets/adw-spinner.d.ts +14 -0
- package/lib/types/widgets/adw-split-button.d.ts +29 -0
- package/lib/types/widgets/adw-status-page.d.ts +36 -0
- package/lib/types/widgets/adw-switch-row.d.ts +17 -0
- package/lib/types/widgets/adw-tab-view.d.ts +9 -0
- package/lib/types/widgets/adw-toast-overlay.d.ts +47 -0
- package/lib/types/widgets/adw-toggle-group.d.ts +22 -0
- package/lib/types/widgets/adw-toolbar-view.d.ts +22 -0
- package/lib/types/widgets/adw-view-switcher.d.ts +6 -0
- package/lib/types/widgets/adw-window-title.d.ts +19 -0
- package/lib/types/widgets/adw-wrap-box.d.ts +17 -0
- package/lib/types/widgets/icon-path.d.ts +36 -0
- package/lib/types/widgets/icons.android.d.ts +11 -0
- package/lib/types/widgets/icons.d.ts +10 -0
- package/lib/types/widgets/index.d.ts +71 -0
- package/lib/types/widgets/row-press.d.ts +8 -0
- package/lib/types/widgets/split-view-base.d.ts +67 -0
- package/lib/types/widgets/view-switcher-base.d.ts +47 -0
- package/package.json +89 -0
- package/src/theme/adwaita.css +1234 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Label, StackLayout } from '@nativescript/core';
|
|
2
|
+
export declare class AdwButtonContent extends StackLayout {
|
|
3
|
+
/** The leading glyph label (lazily in the tree — only when an icon is set). */
|
|
4
|
+
protected readonly _iconLabel: Label;
|
|
5
|
+
/** The text label. */
|
|
6
|
+
protected readonly _label: Label;
|
|
7
|
+
private _hasIcon;
|
|
8
|
+
constructor();
|
|
9
|
+
/**
|
|
10
|
+
* A leading glyph (emoji / font glyph; the NS subset has no icon-theme lookup).
|
|
11
|
+
* Setting a non-empty value inserts it before the label; empty removes it.
|
|
12
|
+
*/
|
|
13
|
+
get iconName(): string;
|
|
14
|
+
set iconName(value: string);
|
|
15
|
+
/** The button content text. */
|
|
16
|
+
get label(): string;
|
|
17
|
+
set label(value: string);
|
|
18
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Label, StackLayout } from '@nativescript/core';
|
|
2
|
+
import { AdwActionRow } from './adw-action-row.js';
|
|
3
|
+
/** Event name emitted when the row is tapped. Mirrors `Adw.ButtonRow::activated`. */
|
|
4
|
+
export declare const ACTIVATED = "activated";
|
|
5
|
+
export declare class AdwButtonRow extends AdwActionRow {
|
|
6
|
+
/** The horizontal content box (leading glyph + centered title). */
|
|
7
|
+
protected readonly _contentBox: StackLayout;
|
|
8
|
+
/** The leading glyph label (lazily added — only when an icon is set). */
|
|
9
|
+
protected readonly _startIconLabel: Label;
|
|
10
|
+
private _hasStartIcon;
|
|
11
|
+
constructor();
|
|
12
|
+
/**
|
|
13
|
+
* A leading glyph before the centered title (emoji / font glyph). Setting a
|
|
14
|
+
* non-empty value inserts it; empty removes it.
|
|
15
|
+
*/
|
|
16
|
+
get startIcon(): string;
|
|
17
|
+
set startIcon(value: string);
|
|
18
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Button } from '@nativescript/core';
|
|
2
|
+
/** The Adwaita button variants this widget can apply. `'default'` = plain button. */
|
|
3
|
+
export type AdwButtonVariant = 'default' | 'suggested-action' | 'destructive-action' | 'flat' | 'pill';
|
|
4
|
+
export declare class AdwButton extends Button {
|
|
5
|
+
private _variant;
|
|
6
|
+
constructor();
|
|
7
|
+
/**
|
|
8
|
+
* The Adwaita style variant. Setting it swaps the corresponding CSS class
|
|
9
|
+
* (`.suggested-action`/`.destructive-action`/`.flat`/`.pill`) onto the button,
|
|
10
|
+
* preserving the base `adw-button` class. Note that `pill` is the rounded
|
|
11
|
+
* SHAPE and combines with no other variant here (set the shape OR the accent
|
|
12
|
+
* intent — matching how this CSS subset expresses them as flat classes).
|
|
13
|
+
*/
|
|
14
|
+
get variant(): AdwButtonVariant;
|
|
15
|
+
set variant(value: AdwButtonVariant);
|
|
16
|
+
/**
|
|
17
|
+
* All Adwaita variant class names this widget recognises — exposed for tests
|
|
18
|
+
* and for consumers composing class lists manually.
|
|
19
|
+
*/
|
|
20
|
+
static get variantClasses(): readonly string[];
|
|
21
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { GridLayout, ScrollView, StackLayout, View, type EventData } from '@nativescript/core';
|
|
2
|
+
/** Event name emitted when {@link AdwCarousel.position} changes. Mirrors GObject `notify::position`. */
|
|
3
|
+
export declare const NOTIFY_POSITION = "notify::position";
|
|
4
|
+
/** Payload of the `notify::position` event. */
|
|
5
|
+
export interface NotifyPositionEventData extends EventData {
|
|
6
|
+
/** The new page index. */
|
|
7
|
+
position: number;
|
|
8
|
+
}
|
|
9
|
+
/** Default page width (DIPs) used for offset math until the consumer sets `pageWidth`. */
|
|
10
|
+
export declare const DEFAULT_CAROUSEL_PAGE_WIDTH = 320;
|
|
11
|
+
export declare class AdwCarousel extends GridLayout {
|
|
12
|
+
/** The horizontal scroller holding the pages. */
|
|
13
|
+
protected readonly _scroller: ScrollView;
|
|
14
|
+
/** The horizontal track inside the scroller (holds full-width pages). */
|
|
15
|
+
protected readonly _track: StackLayout;
|
|
16
|
+
/** The dot-indicator row. */
|
|
17
|
+
protected readonly _dots: StackLayout;
|
|
18
|
+
private readonly _pages;
|
|
19
|
+
private readonly _dotLabels;
|
|
20
|
+
private _position;
|
|
21
|
+
private _pageWidth;
|
|
22
|
+
constructor();
|
|
23
|
+
/** Append a page. The page is forced to the current `pageWidth`. */
|
|
24
|
+
addPage(view: View): void;
|
|
25
|
+
/** Scroll to a page by index (clamped) and update the position. */
|
|
26
|
+
scrollToPage(index: number): void;
|
|
27
|
+
private _setPosition;
|
|
28
|
+
private _applyDots;
|
|
29
|
+
/** The number of pages. */
|
|
30
|
+
get nPages(): number;
|
|
31
|
+
/** The current page index. Setting it scrolls to that page. */
|
|
32
|
+
get position(): number;
|
|
33
|
+
set position(value: number);
|
|
34
|
+
/**
|
|
35
|
+
* The per-page width in DIPs used for scroll-offset math. Set this to the
|
|
36
|
+
* carousel's on-screen width so `scrollToPage` lands cleanly. Re-applies to
|
|
37
|
+
* all existing pages.
|
|
38
|
+
*/
|
|
39
|
+
get pageWidth(): number;
|
|
40
|
+
set pageWidth(value: number);
|
|
41
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { GridLayout, View } from '@nativescript/core';
|
|
2
|
+
/** Adwaita's `AdwClamp` default `maximum-size`, in DIPs. */
|
|
3
|
+
export declare const DEFAULT_CLAMP_MAX_SIZE = 600;
|
|
4
|
+
export declare class AdwClamp extends GridLayout {
|
|
5
|
+
private _maximumSize;
|
|
6
|
+
private _child;
|
|
7
|
+
constructor();
|
|
8
|
+
/** Set (or replace) the clamped, centered child. Pass `null` to clear it. */
|
|
9
|
+
setChild(view: View | null): void;
|
|
10
|
+
/** The currently-clamped child, or `null`. */
|
|
11
|
+
get child(): View | null;
|
|
12
|
+
/** The maximum width the child is capped to, in DIPs. */
|
|
13
|
+
get maximumSize(): number;
|
|
14
|
+
set maximumSize(value: number);
|
|
15
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Label, type EventData } from '@nativescript/core';
|
|
2
|
+
import { AdwActionRow } from './adw-action-row.js';
|
|
3
|
+
import { AdwIcon } from './adw-icon.js';
|
|
4
|
+
/** One selectable option in an {@link AdwComboRow}. */
|
|
5
|
+
export interface AdwComboOption {
|
|
6
|
+
/** Display label shown in the row + chooser. */
|
|
7
|
+
label: string;
|
|
8
|
+
/** Underlying value returned by {@link AdwComboRow.selectedValue}. */
|
|
9
|
+
value: string;
|
|
10
|
+
}
|
|
11
|
+
/** Event name emitted when {@link AdwComboRow.selectedIndex} changes. Mirrors GObject `notify::selected`. */
|
|
12
|
+
export declare const NOTIFY_SELECTED = "notify::selected";
|
|
13
|
+
/** Payload of the `notify::selected` event. */
|
|
14
|
+
export interface NotifySelectedEventData extends EventData {
|
|
15
|
+
/** The newly-selected index. */
|
|
16
|
+
selected: number;
|
|
17
|
+
/** The newly-selected option's `value`. */
|
|
18
|
+
value: string;
|
|
19
|
+
}
|
|
20
|
+
export declare class AdwComboRow extends AdwActionRow {
|
|
21
|
+
/** The dim inline value label (selected option). */
|
|
22
|
+
protected readonly _valueLabel: Label;
|
|
23
|
+
/** The down-chevron — a real Adwaita `pan-down-symbolic` icon. */
|
|
24
|
+
protected readonly _chevron: AdwIcon;
|
|
25
|
+
private _options;
|
|
26
|
+
private _selectedIndex;
|
|
27
|
+
constructor();
|
|
28
|
+
/** Open the native action chooser and apply the picked option. */
|
|
29
|
+
private _openChooser;
|
|
30
|
+
/** Refresh the inline value label from the current selection. */
|
|
31
|
+
private _syncValueLabel;
|
|
32
|
+
private _emitSelected;
|
|
33
|
+
/** The selectable options. Updates the inline value label. */
|
|
34
|
+
get options(): AdwComboOption[];
|
|
35
|
+
set options(value: AdwComboOption[]);
|
|
36
|
+
/** The selected option index. Updates the inline value label. */
|
|
37
|
+
get selectedIndex(): number;
|
|
38
|
+
set selectedIndex(value: number);
|
|
39
|
+
/** The selected option's `value`, or `''` when out of range. */
|
|
40
|
+
get selectedValue(): string;
|
|
41
|
+
set selectedValue(value: string);
|
|
42
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { TextField, type EventData } from '@nativescript/core';
|
|
2
|
+
import { AdwActionRow } from './adw-action-row.js';
|
|
3
|
+
/** Event name emitted when {@link AdwEntryRow.text} changes. Mirrors GObject `notify::text`. */
|
|
4
|
+
export declare const NOTIFY_TEXT = "notify::text";
|
|
5
|
+
/** Payload of the `notify::text` event. */
|
|
6
|
+
export interface NotifyTextEventData extends EventData {
|
|
7
|
+
/** The new text value. */
|
|
8
|
+
text: string;
|
|
9
|
+
}
|
|
10
|
+
export declare class AdwEntryRow extends AdwActionRow {
|
|
11
|
+
/** The TextField stacked below the title in column 0. */
|
|
12
|
+
protected readonly _field: TextField;
|
|
13
|
+
constructor();
|
|
14
|
+
/** The editable text. Two-way bound to the suffix `TextField.text`. */
|
|
15
|
+
get text(): string;
|
|
16
|
+
set text(value: string);
|
|
17
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Button, ItemSpec, StackLayout, View, type EventData } from '@nativescript/core';
|
|
2
|
+
import { AdwActionRow } from './adw-action-row.js';
|
|
3
|
+
/** Event name emitted when {@link AdwExpanderRow.expanded} changes. Mirrors GObject `notify::expanded`. */
|
|
4
|
+
export declare const NOTIFY_EXPANDED = "notify::expanded";
|
|
5
|
+
/** Payload of the `notify::expanded` event. */
|
|
6
|
+
export interface NotifyExpandedEventData extends EventData {
|
|
7
|
+
/** The new expanded state. */
|
|
8
|
+
expanded: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare class AdwExpanderRow extends AdwActionRow {
|
|
11
|
+
/** The disclosure toggle button (suffix). */
|
|
12
|
+
protected readonly _toggle: Button;
|
|
13
|
+
/** The container of revealed child rows (second grid row). */
|
|
14
|
+
protected readonly _disclosure: StackLayout;
|
|
15
|
+
private _expanded;
|
|
16
|
+
constructor();
|
|
17
|
+
/** Append a child row (or any view) to the disclosure container. */
|
|
18
|
+
addRow(viewOrSpec: View | ItemSpec): void;
|
|
19
|
+
/** Remove a previously-added child row from the disclosure container. */
|
|
20
|
+
removeRow(view: View): void;
|
|
21
|
+
/** Whether the disclosure is revealed. */
|
|
22
|
+
get expanded(): boolean;
|
|
23
|
+
set expanded(value: boolean);
|
|
24
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { GridLayout, StackLayout, View } from '@nativescript/core';
|
|
2
|
+
export declare class AdwHeaderBar extends GridLayout {
|
|
3
|
+
/** The start (left) slot — a horizontal stack. */
|
|
4
|
+
protected readonly _startBox: StackLayout;
|
|
5
|
+
/** The end (right) slot — a horizontal stack. */
|
|
6
|
+
protected readonly _endBox: StackLayout;
|
|
7
|
+
/** The centered title widget (default {@link AdwWindowTitle}). */
|
|
8
|
+
private _titleWidget;
|
|
9
|
+
private _flat;
|
|
10
|
+
constructor();
|
|
11
|
+
/** The header title — forwarded to the default {@link AdwWindowTitle}. */
|
|
12
|
+
get title(): string;
|
|
13
|
+
set title(value: string);
|
|
14
|
+
/** The header subtitle — forwarded to the default {@link AdwWindowTitle}. */
|
|
15
|
+
get subtitle(): string;
|
|
16
|
+
set subtitle(value: string);
|
|
17
|
+
/**
|
|
18
|
+
* Whether the header bar is flat (no background fill / no bottom separator),
|
|
19
|
+
* matching `Adw.HeaderBar`'s `.flat` style. Toggling swaps the `flat` class.
|
|
20
|
+
*/
|
|
21
|
+
get flat(): boolean;
|
|
22
|
+
set flat(value: boolean);
|
|
23
|
+
/** Append a widget to the start (left) slot. */
|
|
24
|
+
packStart(view: View): void;
|
|
25
|
+
/** Append a widget to the end (right) slot. */
|
|
26
|
+
packEnd(view: View): void;
|
|
27
|
+
/** Replace the centered title widget with a custom one (e.g. a URL entry). */
|
|
28
|
+
setTitleWidget(view: View): void;
|
|
29
|
+
/** The centered title widget. */
|
|
30
|
+
get titleWidget(): View;
|
|
31
|
+
/** The start (left) slot container. */
|
|
32
|
+
get startBox(): StackLayout;
|
|
33
|
+
/** The end (right) slot container. */
|
|
34
|
+
get endBox(): StackLayout;
|
|
35
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Image } from '@nativescript/core';
|
|
2
|
+
/** Default decorative-icon size, in DIPs — the Adwaita 16px symbolic grid. */
|
|
3
|
+
export declare const DEFAULT_ADW_ICON_SIZE = 16;
|
|
4
|
+
export declare class AdwIcon extends Image {
|
|
5
|
+
private _iconSvg;
|
|
6
|
+
private _iconColor;
|
|
7
|
+
private _iconSize;
|
|
8
|
+
constructor();
|
|
9
|
+
private _render;
|
|
10
|
+
/** The Adwaita symbolic SVG string to render (e.g. `panDownSymbolic`). */
|
|
11
|
+
get icon(): string;
|
|
12
|
+
set icon(svg: string);
|
|
13
|
+
/** The icon fill colour (hex). Re-renders. Light/dark callers set this per theme. */
|
|
14
|
+
get iconColor(): string;
|
|
15
|
+
set iconColor(value: string);
|
|
16
|
+
/** The icon size in DIPs (default 16). Re-renders + resizes the image box. */
|
|
17
|
+
get iconSize(): number;
|
|
18
|
+
set iconSize(value: number);
|
|
19
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { GridLayout, Image } from '@nativescript/core';
|
|
2
|
+
/** Default symbolic-icon size, in DIPs — the Adwaita 16px icon grid. */
|
|
3
|
+
export declare const DEFAULT_ICON_BUTTON_ICON_SIZE = 16;
|
|
4
|
+
export declare class AdwImageButton extends GridLayout {
|
|
5
|
+
/** The centered icon image. */
|
|
6
|
+
protected readonly _image: Image;
|
|
7
|
+
private _iconSvg;
|
|
8
|
+
private _iconColor;
|
|
9
|
+
private _iconSize;
|
|
10
|
+
constructor();
|
|
11
|
+
/** Re-render the icon bitmap from the current svg / colour / size. */
|
|
12
|
+
private _render;
|
|
13
|
+
/** The Adwaita symbolic SVG string to render (e.g. `goPreviousSymbolic`). */
|
|
14
|
+
get icon(): string;
|
|
15
|
+
set icon(svg: string);
|
|
16
|
+
/** The icon fill colour (hex). Re-renders. Light/dark callers set this per theme. */
|
|
17
|
+
get iconColor(): string;
|
|
18
|
+
set iconColor(value: string);
|
|
19
|
+
/** The icon size in DIPs (default 16). Re-renders + resizes the image box. */
|
|
20
|
+
get iconSize(): number;
|
|
21
|
+
set iconSize(value: number);
|
|
22
|
+
/** The underlying icon {@link Image} (e.g. to tweak alignment). */
|
|
23
|
+
get image(): Image;
|
|
24
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AdwSplitViewBase } from './split-view-base.js';
|
|
2
|
+
export declare class AdwNavigationSplitView extends AdwSplitViewBase {
|
|
3
|
+
constructor();
|
|
4
|
+
protected _applyLayout(): void;
|
|
5
|
+
/** Animate the collapsed master⇄detail swap; instant off-screen/off-device. */
|
|
6
|
+
protected _transitionSidebar(): void;
|
|
7
|
+
/** Collapse the pane that slid out (unless a reverse swap raced in). */
|
|
8
|
+
private _settleAfterSwap;
|
|
9
|
+
/** Full-width of a collapsed pane (post-layout), or a fallback before measure. */
|
|
10
|
+
private _paneWidth;
|
|
11
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { GridLayout, View, type EventData } from '@nativescript/core';
|
|
2
|
+
/** Event name emitted when the visible page changes. Mirrors GObject `notify::visible-page`. */
|
|
3
|
+
export declare const NOTIFY_VISIBLE_PAGE = "notify::visible-page";
|
|
4
|
+
/** Payload of the `notify::visible-page` event. */
|
|
5
|
+
export interface NotifyVisiblePageEventData extends EventData {
|
|
6
|
+
/** The newly-visible page's tag, or `null`. */
|
|
7
|
+
tag: string | null;
|
|
8
|
+
/** The current navigation stack depth. */
|
|
9
|
+
depth: number;
|
|
10
|
+
}
|
|
11
|
+
export declare class AdwNavigationView extends GridLayout {
|
|
12
|
+
/** All registered pages (by tag), addressable by `push(tag)`. */
|
|
13
|
+
private readonly _pages;
|
|
14
|
+
/** The live navigation stack (last entry = visible). */
|
|
15
|
+
private readonly _stack;
|
|
16
|
+
constructor();
|
|
17
|
+
/**
|
|
18
|
+
* Register a page (optionally with a tag for `push(tag)`). The FIRST page added
|
|
19
|
+
* is auto-pushed so the view is never empty, matching `Adw.NavigationView`.
|
|
20
|
+
*/
|
|
21
|
+
add(view: View, tag?: string | null): void;
|
|
22
|
+
/** Push a page (a previously-registered tag, or a fresh view) onto the stack. */
|
|
23
|
+
push(pageOrTag: View | string): void;
|
|
24
|
+
/** Pop the top page. Returns `true` if a page was popped (stack keeps ≥1). */
|
|
25
|
+
pop(): boolean;
|
|
26
|
+
private _applyVisible;
|
|
27
|
+
/** The currently-visible page view, or `null`. */
|
|
28
|
+
get visiblePage(): View | null;
|
|
29
|
+
/** The currently-visible page tag, or `null`. */
|
|
30
|
+
get visiblePageTag(): string | null;
|
|
31
|
+
/** The current navigation stack depth. */
|
|
32
|
+
get depth(): number;
|
|
33
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { AdwSplitViewBase } from './split-view-base.js';
|
|
2
|
+
export declare class AdwOverlaySplitView extends AdwSplitViewBase {
|
|
3
|
+
/** Dimmed backdrop drawn between content and the overlaid sidebar; tapping it
|
|
4
|
+
* closes the sidebar (Adwaita's click-outside-to-dismiss). Created lazily. */
|
|
5
|
+
private _scrim;
|
|
6
|
+
constructor();
|
|
7
|
+
protected _applyLayout(): void;
|
|
8
|
+
/** Animate a collapsed show/hide toggle; fall back to instant off-screen/off-device. */
|
|
9
|
+
protected _transitionSidebar(): void;
|
|
10
|
+
/** Lazily create the tap-to-dismiss scrim. */
|
|
11
|
+
private _ensureScrim;
|
|
12
|
+
/** Re-establish paint order: content < scrim < sidebar (NS paints in add order).
|
|
13
|
+
* Removing + re-adding the scrim/sidebar keeps them above the content no matter
|
|
14
|
+
* what order setContent/setSidebar/collapsed ran in. */
|
|
15
|
+
private _raiseOverlayChildren;
|
|
16
|
+
/** Detach the scrim (side-by-side mode has no overlay). */
|
|
17
|
+
private _detachScrim;
|
|
18
|
+
/** Structural setup shared by the animated path (columns, order, scrim, class)
|
|
19
|
+
* — deliberately leaves translateX/opacity/visibility to the animation. */
|
|
20
|
+
private _prepareCollapsedStructure;
|
|
21
|
+
/** Slide the sidebar in from its edge and fade the scrim up. */
|
|
22
|
+
private _animateOpen;
|
|
23
|
+
/** Slide the sidebar back out and fade the scrim down, then collapse both. */
|
|
24
|
+
private _animateClose;
|
|
25
|
+
/** Off-screen sidebar offset: slides past the edge it's anchored to. */
|
|
26
|
+
private _hiddenOffset;
|
|
27
|
+
private _stripOverlay;
|
|
28
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { GridLayout, Label, StackLayout, View } from '@nativescript/core';
|
|
2
|
+
/** Event name emitted when the dialog is closed. */
|
|
3
|
+
export declare const CLOSED = "closed";
|
|
4
|
+
export declare class AdwPreferencesDialog extends GridLayout {
|
|
5
|
+
protected readonly _card: GridLayout;
|
|
6
|
+
protected readonly _headerBox: GridLayout;
|
|
7
|
+
protected readonly _titleLabel: Label;
|
|
8
|
+
protected readonly _body: StackLayout;
|
|
9
|
+
constructor();
|
|
10
|
+
/** The dialog title. */
|
|
11
|
+
get title(): string;
|
|
12
|
+
set title(value: string);
|
|
13
|
+
/** Add an `AdwPreferencesPage` (or any view) to the dialog body. */
|
|
14
|
+
add(view: View): void;
|
|
15
|
+
/** Remove a previously-added page from the body. */
|
|
16
|
+
remove(view: View): void;
|
|
17
|
+
/** Reveal the preferences overlay. */
|
|
18
|
+
present(): void;
|
|
19
|
+
/** Hide the preferences overlay and emit `closed`. */
|
|
20
|
+
close(): void;
|
|
21
|
+
/** Whether the dialog is currently shown. */
|
|
22
|
+
get open(): boolean;
|
|
23
|
+
set open(value: boolean);
|
|
24
|
+
/** The scrollable body that hosts the preferences pages. */
|
|
25
|
+
get body(): StackLayout;
|
|
26
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { StackLayout, Label, View } from '@nativescript/core';
|
|
2
|
+
export declare class AdwPreferencesGroup extends StackLayout {
|
|
3
|
+
/** The group header label (created lazily — only in the tree when a title is set). */
|
|
4
|
+
protected readonly _titleLabel: Label;
|
|
5
|
+
private _hasTitle;
|
|
6
|
+
/** The boxed-list container that actually holds the rows. */
|
|
7
|
+
protected readonly _listbox: StackLayout;
|
|
8
|
+
constructor();
|
|
9
|
+
/**
|
|
10
|
+
* The group title (dim, uppercase header above the boxed list). Setting a
|
|
11
|
+
* non-empty value inserts the header label above the list; setting empty
|
|
12
|
+
* removes it — so a titleless group has no blank header, matching
|
|
13
|
+
* `Adw.PreferencesGroup`.
|
|
14
|
+
*/
|
|
15
|
+
get title(): string;
|
|
16
|
+
set title(value: string);
|
|
17
|
+
/** Append a row (or any view) to the boxed list. */
|
|
18
|
+
addRow(view: View): void;
|
|
19
|
+
/** Remove a previously-added row from the boxed list. */
|
|
20
|
+
removeRow(view: View): void;
|
|
21
|
+
/** The boxed-list container (column of rows). */
|
|
22
|
+
get listbox(): StackLayout;
|
|
23
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ScrollView, StackLayout, View } from '@nativescript/core';
|
|
2
|
+
export declare class AdwPreferencesPage extends ScrollView {
|
|
3
|
+
/** The vertical stack that actually holds the groups. */
|
|
4
|
+
protected readonly _content: StackLayout;
|
|
5
|
+
constructor();
|
|
6
|
+
/** Append a preferences group (or any view) to the page. */
|
|
7
|
+
addGroup(view: View): void;
|
|
8
|
+
/** Remove a previously-added group from the page. */
|
|
9
|
+
removeGroup(view: View): void;
|
|
10
|
+
/** The vertical content stack holding the groups. */
|
|
11
|
+
get groups(): StackLayout;
|
|
12
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ScrollView, StackLayout, type EventData } from '@nativescript/core';
|
|
2
|
+
/** Event name emitted when {@link AdwSidebar.selected} changes. Mirrors GObject `notify::selected`. */
|
|
3
|
+
export declare const NOTIFY_SELECTED = "notify::selected";
|
|
4
|
+
/** Payload of the `notify::selected` event. */
|
|
5
|
+
export interface NotifySidebarSelectedEventData extends EventData {
|
|
6
|
+
/** The newly-selected item index. */
|
|
7
|
+
selected: number;
|
|
8
|
+
/** The newly-selected item's label. */
|
|
9
|
+
title: string;
|
|
10
|
+
}
|
|
11
|
+
export declare class AdwSidebar extends ScrollView {
|
|
12
|
+
/** The vertical list container. */
|
|
13
|
+
protected readonly _list: StackLayout;
|
|
14
|
+
private readonly _rows;
|
|
15
|
+
private _items;
|
|
16
|
+
private _selected;
|
|
17
|
+
constructor();
|
|
18
|
+
/** Set the navigation item labels. Rebuilds the tappable rows. */
|
|
19
|
+
setItems(items: string[]): void;
|
|
20
|
+
private _applySelection;
|
|
21
|
+
/** The navigation item labels. */
|
|
22
|
+
get items(): string[];
|
|
23
|
+
set items(value: string[]);
|
|
24
|
+
/** The selected item index. Highlights the row + emits `notify::selected`. */
|
|
25
|
+
get selected(): number;
|
|
26
|
+
set selected(value: number);
|
|
27
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Label, Slider, StackLayout, type EventData } from '@nativescript/core';
|
|
2
|
+
/** Event name emitted when {@link AdwSliderRow.value} changes. Mirrors GObject `notify::value`. */
|
|
3
|
+
export declare const NOTIFY_SLIDER_VALUE = "notify::value";
|
|
4
|
+
/** Payload of the `notify::value` event. */
|
|
5
|
+
export interface NotifySliderValueEventData extends EventData {
|
|
6
|
+
/** The new numeric value (already clamped to `[min, max]` and snapped to `step`). */
|
|
7
|
+
value: number;
|
|
8
|
+
}
|
|
9
|
+
export declare class AdwSliderRow extends StackLayout {
|
|
10
|
+
/** The title label (header, left). */
|
|
11
|
+
protected readonly _titleLabel: Label;
|
|
12
|
+
/** The live value label (header, right, dim). */
|
|
13
|
+
protected readonly _valueLabel: Label;
|
|
14
|
+
/** The horizontal slider. */
|
|
15
|
+
protected readonly _slider: Slider;
|
|
16
|
+
private _value;
|
|
17
|
+
private _min;
|
|
18
|
+
private _max;
|
|
19
|
+
private _step;
|
|
20
|
+
/** Guards the slider's `valueChange` while we programmatically set its value. */
|
|
21
|
+
private _suppress;
|
|
22
|
+
constructor();
|
|
23
|
+
/** Clamp to `[min, max]` then snap to the nearest `step` from `min`. */
|
|
24
|
+
private _snap;
|
|
25
|
+
/** Push the current value to the slider + label without emitting. */
|
|
26
|
+
private _sync;
|
|
27
|
+
/** The group title shown in the header (left). */
|
|
28
|
+
get title(): string;
|
|
29
|
+
set title(value: string);
|
|
30
|
+
/** The current numeric value (always within `[min, max]`, snapped to `step`). */
|
|
31
|
+
get value(): number;
|
|
32
|
+
set value(v: number);
|
|
33
|
+
/** Lower bound. Re-clamps the current value if it now falls below. */
|
|
34
|
+
get min(): number;
|
|
35
|
+
set min(v: number);
|
|
36
|
+
/** Upper bound. Re-clamps the current value if it now falls above. */
|
|
37
|
+
get max(): number;
|
|
38
|
+
set max(v: number);
|
|
39
|
+
/** Snap granularity applied as the slider is dragged. */
|
|
40
|
+
get step(): number;
|
|
41
|
+
set step(v: number);
|
|
42
|
+
/** The underlying {@link Slider} (e.g. to tweak styling). */
|
|
43
|
+
get slider(): Slider;
|
|
44
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Button, Label, type EventData } from '@nativescript/core';
|
|
2
|
+
import { AdwActionRow } from './adw-action-row.js';
|
|
3
|
+
/** Event name emitted when {@link AdwSpinRow.value} changes. Mirrors GObject `notify::value`. */
|
|
4
|
+
export declare const NOTIFY_VALUE = "notify::value";
|
|
5
|
+
/** Payload of the `notify::value` event. */
|
|
6
|
+
export interface NotifyValueEventData extends EventData {
|
|
7
|
+
/** The new numeric value (already clamped to `[min, max]`). */
|
|
8
|
+
value: number;
|
|
9
|
+
}
|
|
10
|
+
export declare class AdwSpinRow extends AdwActionRow {
|
|
11
|
+
/** The `−` decrement button. */
|
|
12
|
+
protected readonly _minusButton: Button;
|
|
13
|
+
/** The `+` increment button. */
|
|
14
|
+
protected readonly _plusButton: Button;
|
|
15
|
+
/** The value display between the buttons. */
|
|
16
|
+
protected readonly _valueLabel: Label;
|
|
17
|
+
private _value;
|
|
18
|
+
private _min;
|
|
19
|
+
private _max;
|
|
20
|
+
private _step;
|
|
21
|
+
constructor();
|
|
22
|
+
/** Apply a delta, clamp to `[min, max]`, update the label and emit `notify::value`. */
|
|
23
|
+
private _bump;
|
|
24
|
+
private _clamp;
|
|
25
|
+
/** The current numeric value (always within `[min, max]`). */
|
|
26
|
+
get value(): number;
|
|
27
|
+
set value(v: number);
|
|
28
|
+
/** Lower bound. Re-clamps the current value if it now falls below. */
|
|
29
|
+
get min(): number;
|
|
30
|
+
set min(v: number);
|
|
31
|
+
/** Upper bound. Re-clamps the current value if it now falls above. */
|
|
32
|
+
get max(): number;
|
|
33
|
+
set max(v: number);
|
|
34
|
+
/** Increment/decrement step applied per button press. */
|
|
35
|
+
get step(): number;
|
|
36
|
+
set step(v: number);
|
|
37
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ActivityIndicator } from '@nativescript/core';
|
|
2
|
+
/** Default spinner diameter in DIPs. */
|
|
3
|
+
export declare const DEFAULT_SPINNER_SIZE = 32;
|
|
4
|
+
export declare class AdwSpinner extends ActivityIndicator {
|
|
5
|
+
private _size;
|
|
6
|
+
constructor();
|
|
7
|
+
private _applySize;
|
|
8
|
+
/** Whether the spinner is animating. Two-way bound to the indicator's `busy`. */
|
|
9
|
+
get spinning(): boolean;
|
|
10
|
+
set spinning(value: boolean);
|
|
11
|
+
/** The spinner diameter in DIPs. */
|
|
12
|
+
get size(): number;
|
|
13
|
+
set size(value: number);
|
|
14
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Button, GridLayout, type EventData } from '@nativescript/core';
|
|
2
|
+
/** Event name emitted when the main action part is tapped. Mirrors `Adw.SplitButton::clicked`. */
|
|
3
|
+
export declare const CLICKED = "clicked";
|
|
4
|
+
/** Event name emitted when a dropdown menu item is chosen. */
|
|
5
|
+
export declare const MENU_TAPPED = "menuTapped";
|
|
6
|
+
/** Payload of the {@link MENU_TAPPED} event. */
|
|
7
|
+
export interface MenuTappedEventData extends EventData {
|
|
8
|
+
/** The chosen menu item label. */
|
|
9
|
+
item: string;
|
|
10
|
+
/** The chosen item's index in {@link AdwSplitButton.menu}. */
|
|
11
|
+
index: number;
|
|
12
|
+
}
|
|
13
|
+
export declare class AdwSplitButton extends GridLayout {
|
|
14
|
+
/** The main action button (column 0). */
|
|
15
|
+
protected readonly _actionButton: Button;
|
|
16
|
+
/** The dropdown-arrow button (column 1). */
|
|
17
|
+
protected readonly _dropdownButton: Button;
|
|
18
|
+
private _menu;
|
|
19
|
+
constructor();
|
|
20
|
+
private _openMenu;
|
|
21
|
+
/** The main action button's label. */
|
|
22
|
+
get label(): string;
|
|
23
|
+
set label(value: string);
|
|
24
|
+
/** The dropdown menu items (opened as a native `action()` sheet on arrow tap). */
|
|
25
|
+
get menu(): string[];
|
|
26
|
+
set menu(value: string[]);
|
|
27
|
+
/** The main action button (for composing a custom content widget). */
|
|
28
|
+
get actionButton(): Button;
|
|
29
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { GridLayout, Label, StackLayout, View } from '@nativescript/core';
|
|
2
|
+
export declare class AdwStatusPage extends GridLayout {
|
|
3
|
+
/** The centered vertical stack. */
|
|
4
|
+
protected readonly _stack: StackLayout;
|
|
5
|
+
/** The large icon glyph label (lazily in the tree — only when set). */
|
|
6
|
+
protected readonly _iconLabel: Label;
|
|
7
|
+
/** The bold title label. */
|
|
8
|
+
protected readonly _titleLabel: Label;
|
|
9
|
+
/** The dim description label (lazily in the tree — only when set). */
|
|
10
|
+
protected readonly _descriptionLabel: Label;
|
|
11
|
+
private _hasIcon;
|
|
12
|
+
private _hasDescription;
|
|
13
|
+
private _child;
|
|
14
|
+
constructor();
|
|
15
|
+
/**
|
|
16
|
+
* A large glyph shown above the title (emoji or font glyph). Setting a
|
|
17
|
+
* non-empty value inserts the icon label at the top of the stack; empty
|
|
18
|
+
* removes it. (`Adw.StatusPage` uses a themed icon; the NS subset has no
|
|
19
|
+
* icon-theme lookup, so a glyph label stands in.)
|
|
20
|
+
*/
|
|
21
|
+
get iconText(): string;
|
|
22
|
+
set iconText(value: string);
|
|
23
|
+
/** The page title (bold, centered). */
|
|
24
|
+
get title(): string;
|
|
25
|
+
set title(value: string);
|
|
26
|
+
/**
|
|
27
|
+
* The dim description below the title. Setting a non-empty value adds it;
|
|
28
|
+
* empty removes it — so a descriptionless page has no blank gap.
|
|
29
|
+
*/
|
|
30
|
+
get description(): string;
|
|
31
|
+
set description(value: string);
|
|
32
|
+
/** Set (or replace) the optional child widget below the description. */
|
|
33
|
+
setChild(view: View | null): void;
|
|
34
|
+
/** The currently-installed child, or `null`. */
|
|
35
|
+
get child(): View | null;
|
|
36
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Switch, type EventData } from '@nativescript/core';
|
|
2
|
+
import { AdwActionRow } from './adw-action-row.js';
|
|
3
|
+
/** Event name emitted when {@link AdwSwitchRow.active} changes. Mirrors GObject `notify::active`. */
|
|
4
|
+
export declare const NOTIFY_ACTIVE = "notify::active";
|
|
5
|
+
/** Payload of the `notify::active` event. */
|
|
6
|
+
export interface NotifyActiveEventData extends EventData {
|
|
7
|
+
/** The new `active` state. */
|
|
8
|
+
active: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare class AdwSwitchRow extends AdwActionRow {
|
|
11
|
+
/** The suffix Switch control. */
|
|
12
|
+
protected readonly _switch: Switch;
|
|
13
|
+
constructor();
|
|
14
|
+
/** Whether the switch is on. Two-way bound to the suffix `Switch.checked`. */
|
|
15
|
+
get active(): boolean;
|
|
16
|
+
set active(value: boolean);
|
|
17
|
+
}
|