@gjsify/adwaita-web 0.64.0 → 0.64.1-next.241
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/dist/adwaita-web.css +3 -0
- package/dist/adwaita-web.css.map +1 -1
- package/lib/types/elements/adw-action-row.d.ts +3 -0
- package/lib/types/elements/adw-bottom-sheet.d.ts +3 -0
- package/lib/types/elements/adw-navigation-view.d.ts +7 -0
- package/lib/types/elements/adw-switch-row.d.ts +3 -0
- package/lib/types/elements/adw-window-features.d.ts +6 -1
- package/lib/types/elements/gtk-application-window.d.ts +2 -0
- package/lib/types/elements/gtk-window.d.ts +29 -3
- package/lib/types/styles.generated.d.ts +1 -1
- package/package.json +13 -12
- package/scss/_window.scss +7 -0
- package/src/adw-action-rows.spec.ts +20 -0
- package/src/adw-alert-dialog.spec.ts +15 -0
- package/src/adw-application-window.spec.ts +2 -1
- package/src/adw-window.spec.ts +22 -3
- package/src/bottom-sheet.spec.ts +11 -0
- package/src/elements/adw-action-row.ts +4 -0
- package/src/elements/adw-alert-dialog.ts +6 -0
- package/src/elements/adw-application-window.ts +9 -2
- package/src/elements/adw-bottom-sheet.ts +4 -0
- package/src/elements/adw-navigation-view.ts +19 -0
- package/src/elements/adw-switch-row.ts +4 -0
- package/src/elements/adw-window-features.ts +19 -4
- package/src/elements/adw-window.ts +2 -2
- package/src/elements/gtk-application-window.ts +6 -0
- package/src/elements/gtk-window.ts +82 -3
- package/src/gobject-elements.ts +21 -2
- package/src/gtk-window.spec.ts +97 -1
- package/src/navigation-view.spec.ts +26 -0
- package/src/styles.generated.ts +1 -1
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import type { DispatchedSignals } from '../signals.js';
|
|
1
2
|
export declare class AdwActionRow extends HTMLElement {
|
|
3
|
+
/** The GTK signals this element dispatches, each with the DOM event it arrives as (ADR 0093). */
|
|
4
|
+
static readonly signals: DispatchedSignals;
|
|
2
5
|
private _titleEl;
|
|
3
6
|
private _subtitleEl;
|
|
4
7
|
private _suffixEl;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { BottomSheetCloseOutcome, BottomSheetCloseSource, BottomSheetOpenOutcome, BottomSheetOpenSource } from '@gjsify/adwaita-core';
|
|
2
|
+
import type { DispatchedSignals } from '../signals.js';
|
|
2
3
|
/** The persistent content. Child of <adw-bottom-sheet>; consumed at connect time. */
|
|
3
4
|
export declare class AdwBottomSheetContent extends HTMLElement {
|
|
4
5
|
}
|
|
@@ -9,6 +10,8 @@ export declare class AdwBottomSheetSheet extends HTMLElement {
|
|
|
9
10
|
export declare class AdwBottomSheetBottomBar extends HTMLElement {
|
|
10
11
|
}
|
|
11
12
|
export declare class AdwBottomSheet extends HTMLElement {
|
|
13
|
+
/** The GTK signals this element dispatches, each with the DOM event it arrives as (ADR 0093). */
|
|
14
|
+
static readonly signals: DispatchedSignals;
|
|
12
15
|
private _initialized;
|
|
13
16
|
private _contentEl;
|
|
14
17
|
private _dimmingEl;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { DispatchedSignals } from '../signals.js';
|
|
1
2
|
/** A single navigation page. Children of <adw-navigation-view>. */
|
|
2
3
|
export declare class AdwNavigationPage extends HTMLElement {
|
|
3
4
|
/** Set while the owning view writes an attribute back, so the sync cannot recurse. */
|
|
@@ -15,6 +16,8 @@ export declare class AdwNavigationPage extends HTMLElement {
|
|
|
15
16
|
revertAttribute(name: string, value: string | null): void;
|
|
16
17
|
}
|
|
17
18
|
export declare class AdwNavigationView extends HTMLElement {
|
|
19
|
+
/** The GTK signals this element dispatches, each with the DOM event it arrives as (ADR 0093). */
|
|
20
|
+
static readonly signals: DispatchedSignals;
|
|
18
21
|
private _pagesEl;
|
|
19
22
|
private readonly _backButtons;
|
|
20
23
|
private _initialized;
|
|
@@ -28,6 +31,8 @@ export declare class AdwNavigationView extends HTMLElement {
|
|
|
28
31
|
set popOnEscape(value: boolean);
|
|
29
32
|
get visiblePage(): AdwNavigationPage | null;
|
|
30
33
|
get visiblePageTag(): string | null;
|
|
34
|
+
/** `adw_navigation_view_get_visible_page_tag`. */
|
|
35
|
+
get_visible_page_tag(): string | null;
|
|
31
36
|
get depth(): number;
|
|
32
37
|
/** The navigation stack, bottom-first (Adw.NavigationView:navigation-stack). */
|
|
33
38
|
get navigationStack(): readonly AdwNavigationPage[];
|
|
@@ -64,6 +69,8 @@ export declare class AdwNavigationView extends HTMLElement {
|
|
|
64
69
|
* destroyed when it is popped.
|
|
65
70
|
*/
|
|
66
71
|
push(pageOrTag: AdwNavigationPage | string): boolean;
|
|
72
|
+
/** `adw_navigation_view_push_by_tag`, under the name a GJS caller uses. */
|
|
73
|
+
push_by_tag(tag: string): boolean;
|
|
67
74
|
/** Push the page carrying `tag` (mirrors AdwNavigationView.push_by_tag). */
|
|
68
75
|
pushByTag(tag: string): boolean;
|
|
69
76
|
/**
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import type { DispatchedSignals } from '../signals.js';
|
|
1
2
|
import './gtk-switch.js';
|
|
2
3
|
export declare class AdwSwitchRow extends HTMLElement {
|
|
4
|
+
/** The GTK signals this element dispatches, each with the DOM event it arrives as (ADR 0093). */
|
|
5
|
+
static readonly signals: DispatchedSignals;
|
|
3
6
|
private _switchEl;
|
|
4
7
|
private _prefixEl;
|
|
5
8
|
/** The label column — kept for `tooltip-text`, which the browser reads off a PART. */
|
|
@@ -34,6 +34,11 @@ export declare class AdwWindowFeatures {
|
|
|
34
34
|
*/
|
|
35
35
|
bind(): void;
|
|
36
36
|
release(): void;
|
|
37
|
-
/**
|
|
37
|
+
/**
|
|
38
|
+
* The window's size. `Adw.Window` defaults to a 360×200 MINIMUM (a size request, not the
|
|
39
|
+
* size; `width-request`/`height-request` override it). `default-width/height` is only
|
|
40
|
+
* a default: an authored size is the box, and an absent one leaves the box to the
|
|
41
|
+
* stylesheet, which fills the viewport — a page has no window manager to pick a size.
|
|
42
|
+
*/
|
|
38
43
|
applySizeRequest(): void;
|
|
39
44
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ActionLike } from '@gjsify/adwaita-core';
|
|
2
2
|
import type { GtkApplication } from '../application.js';
|
|
3
|
+
import type { DispatchedSignals } from '../signals.js';
|
|
3
4
|
import type { AdwSlot } from '../slotted-children.js';
|
|
4
5
|
import { GtkWindow } from './gtk-window.js';
|
|
5
6
|
export declare class GtkApplicationWindow extends GtkWindow {
|
|
@@ -13,6 +14,7 @@ export declare class GtkApplicationWindow extends GtkWindow {
|
|
|
13
14
|
remove_action: (name: string) => void;
|
|
14
15
|
private _menubar;
|
|
15
16
|
private _menubarObserver;
|
|
17
|
+
static readonly signals: DispatchedSignals;
|
|
16
18
|
static get observedAttributes(): string[];
|
|
17
19
|
/** `Gtk.ApplicationWindow:show-menubar` — whether the window shows a menubar of its own. */
|
|
18
20
|
get showMenubar(): boolean;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { DispatchedSignals } from '../signals.js';
|
|
1
2
|
import { type AdwSlot } from '../slotted-children.js';
|
|
2
3
|
import './gtk-window-controls.js';
|
|
3
4
|
export declare class GtkWindow extends HTMLElement {
|
|
@@ -19,6 +20,25 @@ export declare class GtkWindow extends HTMLElement {
|
|
|
19
20
|
private readonly _syncActive;
|
|
20
21
|
private readonly _onFocusIn;
|
|
21
22
|
private readonly _onFocusOut;
|
|
23
|
+
/**
|
|
24
|
+
* The GObject door (ADR 0096 § 3): `connect` / `disconnect` / `emit` / `notify` / `get_property` /
|
|
25
|
+
* `set_property` over these events, the same ones every element declares in `static signals`.
|
|
26
|
+
* A `close-request` handler that returns true is `preventDefault()`.
|
|
27
|
+
*/
|
|
28
|
+
static readonly signals: DispatchedSignals;
|
|
29
|
+
/** `GObject.Object.connect`: installed per instance by `installElementApi`; refuses an undeclared signal. */
|
|
30
|
+
connect: (signal: string, handler: (emitter: this, ...args: any[]) => unknown) => number;
|
|
31
|
+
/** `GObject.Object.disconnect`: throws for an id that is not connected. */
|
|
32
|
+
disconnect: (id: number) => void;
|
|
33
|
+
/** `GObject.Object.emit`; `close-request` is refused, call `close()`. */
|
|
34
|
+
emit: (signal: string, ...args: unknown[]) => void;
|
|
35
|
+
/** `GObject.Object.notify`. */
|
|
36
|
+
notify: (name: string) => void;
|
|
37
|
+
/** `GObject.Object.get_property`, by GTK's dashed name. */
|
|
38
|
+
get_property: (name: string) => unknown;
|
|
39
|
+
/** `GObject.Object.set_property`; a read-only property throws. */
|
|
40
|
+
set_property: (name: string, value: unknown) => void;
|
|
41
|
+
constructor();
|
|
22
42
|
static get observedAttributes(): string[];
|
|
23
43
|
/**
|
|
24
44
|
* `Gtk.Window:title` — the window's title.
|
|
@@ -121,12 +141,18 @@ export declare class GtkWindow extends HTMLElement {
|
|
|
121
141
|
* the window manager's to grant; a page owns no such surface, so this is only the first half.
|
|
122
142
|
*/
|
|
123
143
|
present(): void;
|
|
124
|
-
/**
|
|
144
|
+
/**
|
|
145
|
+
* `Gtk.Window:is-active` — see the header: the document's focus, while this frame is shown.
|
|
146
|
+
* A PROPERTY, as in GJS and `@girs/gtk-4.0`: GTK 4 has no `gtk_window_is_active`, so
|
|
147
|
+
* `window.is_active` is the value and `window.is_active()` does not exist.
|
|
148
|
+
*/
|
|
125
149
|
get isActive(): boolean;
|
|
126
|
-
|
|
127
|
-
is_active(): boolean;
|
|
150
|
+
get is_active(): boolean;
|
|
128
151
|
/** `Gtk.Window:focus-widget`, read live from the document. */
|
|
129
152
|
get focusWidget(): Element | null;
|
|
153
|
+
/** `Gtk.Window:focus-widget` under its GJS spelling; writing it is `set_focus`. */
|
|
154
|
+
get focus_widget(): Element | null;
|
|
155
|
+
set focus_widget(widget: Element | null);
|
|
130
156
|
/** `gtk_window_get_focus`: the element inside the frame that has focus, or `null`. */
|
|
131
157
|
get_focus(): Element | null;
|
|
132
158
|
/**
|