@gjsify/adwaita-web 0.36.0 → 0.38.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/dist/adwaita-web.css +504 -34
- package/dist/adwaita-web.css.map +1 -1
- package/lib/types/accent.d.ts +28 -0
- package/lib/types/adw-accent.spec.d.ts +2 -0
- package/lib/types/adw-shortcut-label.spec.d.ts +2 -0
- package/lib/types/breakpoints.d.ts +10 -12
- package/lib/types/elements/adw-about-dialog.d.ts +19 -36
- package/lib/types/elements/adw-action-row.d.ts +9 -12
- package/lib/types/elements/adw-alert-dialog.d.ts +0 -12
- package/lib/types/elements/adw-avatar.d.ts +1 -0
- package/lib/types/elements/adw-bottom-sheet.d.ts +7 -12
- package/lib/types/elements/adw-button-content.d.ts +3 -4
- package/lib/types/elements/adw-button-row.d.ts +1 -1
- package/lib/types/elements/adw-carousel.d.ts +28 -49
- package/lib/types/elements/adw-checks.d.ts +2 -8
- package/lib/types/elements/adw-combo-row.d.ts +6 -6
- package/lib/types/elements/adw-data-grid.d.ts +5 -10
- package/lib/types/elements/adw-drop-down.d.ts +3 -11
- package/lib/types/elements/adw-entry-row.d.ts +20 -23
- package/lib/types/elements/adw-icon.d.ts +2 -4
- package/lib/types/elements/adw-inline-view-switcher.d.ts +18 -31
- package/lib/types/elements/adw-navigation-split-view.d.ts +7 -12
- package/lib/types/elements/adw-navigation-view.d.ts +2 -10
- package/lib/types/elements/adw-overlay-split-view.d.ts +28 -52
- package/lib/types/elements/adw-password-entry-row.d.ts +4 -5
- package/lib/types/elements/adw-popover.d.ts +2 -7
- package/lib/types/elements/adw-preferences-dialog.d.ts +21 -34
- package/lib/types/elements/adw-preferences-group.d.ts +12 -14
- package/lib/types/elements/adw-progress-bar.d.ts +3 -4
- package/lib/types/elements/adw-shortcut-label.d.ts +20 -0
- package/lib/types/elements/adw-sidebar.d.ts +5 -10
- package/lib/types/elements/adw-spinner.d.ts +3 -5
- package/lib/types/elements/adw-split-button.d.ts +6 -16
- package/lib/types/elements/adw-switch-row.d.ts +3 -3
- package/lib/types/elements/adw-tab-view.d.ts +16 -26
- package/lib/types/elements/adw-toast-overlay.d.ts +8 -13
- package/lib/types/elements/adw-view-stack.d.ts +7 -17
- package/lib/types/elements/adw-view-switcher-bar.d.ts +4 -8
- package/lib/types/elements/adw-view-switcher.d.ts +18 -38
- package/lib/types/elements/adw-wrap-box.d.ts +7 -17
- package/lib/types/elements/view-switcher-dom.d.ts +10 -13
- package/lib/types/index.d.ts +3 -0
- package/lib/types/source-view/hex.d.ts +7 -13
- package/lib/types/style-classes.spec.d.ts +11 -0
- package/lib/types/styles.generated.d.ts +1 -1
- package/package.json +18 -7
- package/scss/_about_dialog.scss +3 -2
- package/scss/_action_row.scss +33 -0
- package/scss/_avatar.scss +12 -0
- package/scss/_button.scss +44 -22
- package/scss/_card.scss +11 -8
- package/scss/_checks.scss +2 -4
- package/scss/_dialog.scss +3 -2
- package/scss/_headerbar.scss +23 -0
- package/scss/_popover.scss +8 -4
- package/scss/_preferences.scss +7 -7
- package/scss/_progress_bar.scss +9 -6
- package/scss/_reset.scss +1 -1
- package/scss/_shortcut_label.scss +80 -0
- package/scss/_sidebar.scss +57 -0
- package/scss/_status_page.scss +20 -0
- package/scss/_style_classes.scss +407 -0
- package/scss/_switch.scss +4 -3
- package/scss/_theme.scss +20 -2
- package/scss/_variables.scss +34 -1
- package/scss/adwaita-skin.scss +12 -0
- package/src/accent.ts +74 -0
- package/src/adw-about-dialog.spec.ts +34 -49
- package/src/adw-accent.spec.ts +105 -0
- package/src/adw-action-rows.spec.ts +25 -33
- package/src/adw-avatar.spec.ts +51 -20
- package/src/adw-banner.spec.ts +5 -8
- package/src/adw-button-content.spec.ts +9 -12
- package/src/adw-button-row.spec.ts +2 -4
- package/src/adw-carousel.spec.ts +40 -53
- package/src/adw-checks.spec.ts +36 -47
- package/src/adw-drop-down.spec.ts +25 -32
- package/src/adw-header-bar.spec.ts +5 -7
- package/src/adw-icon.spec.ts +23 -32
- package/src/adw-progress-bar.spec.ts +10 -12
- package/src/adw-row-state.spec.ts +9 -10
- package/src/adw-shortcut-label.spec.ts +112 -0
- package/src/adw-sidebar.spec.ts +17 -24
- package/src/adw-switch.spec.ts +11 -17
- package/src/adw-tab-view.spec.ts +7 -10
- package/src/adw-toast-overlay.spec.ts +7 -11
- package/src/adw-view-switcher-bar.spec.ts +10 -14
- package/src/adw-wrap-box.spec.ts +25 -36
- package/src/bottom-sheet.spec.ts +30 -36
- package/src/breakpoints.ts +15 -18
- package/src/chrome.spec.ts +13 -21
- package/src/elements/adw-about-dialog.ts +71 -114
- package/src/elements/adw-action-row.ts +22 -37
- package/src/elements/adw-alert-dialog.ts +25 -50
- package/src/elements/adw-avatar.ts +40 -15
- package/src/elements/adw-banner.ts +14 -18
- package/src/elements/adw-bottom-sheet.ts +31 -52
- package/src/elements/adw-button-content.ts +30 -37
- package/src/elements/adw-button-row.ts +14 -24
- package/src/elements/adw-carousel.ts +87 -148
- package/src/elements/adw-checks.ts +43 -56
- package/src/elements/adw-clamp.ts +8 -9
- package/src/elements/adw-combo-row.ts +17 -25
- package/src/elements/adw-data-grid.ts +26 -38
- package/src/elements/adw-dialog.ts +25 -56
- package/src/elements/adw-drop-down.ts +31 -51
- package/src/elements/adw-entry-row.ts +39 -46
- package/src/elements/adw-expander-row.ts +30 -53
- package/src/elements/adw-icon.ts +30 -53
- package/src/elements/adw-inline-view-switcher.ts +38 -67
- package/src/elements/adw-menu-button.ts +28 -58
- package/src/elements/adw-navigation-split-view.ts +35 -47
- package/src/elements/adw-navigation-view.ts +12 -28
- package/src/elements/adw-overlay-split-view.ts +100 -175
- package/src/elements/adw-password-entry-row.ts +18 -28
- package/src/elements/adw-popover.ts +28 -44
- package/src/elements/adw-preferences-dialog.ts +41 -66
- package/src/elements/adw-preferences-group.ts +33 -46
- package/src/elements/adw-progress-bar.ts +27 -47
- package/src/elements/adw-shortcut-label.ts +138 -0
- package/src/elements/adw-sidebar.ts +31 -39
- package/src/elements/adw-spin-row.ts +7 -14
- package/src/elements/adw-spinner.ts +31 -43
- package/src/elements/adw-split-button.ts +45 -75
- package/src/elements/adw-switch-row.ts +29 -46
- package/src/elements/adw-switch.ts +28 -47
- package/src/elements/adw-tab-view.ts +62 -103
- package/src/elements/adw-toast-overlay.ts +28 -35
- package/src/elements/adw-toggle-group.ts +9 -16
- package/src/elements/adw-view-stack.ts +32 -51
- package/src/elements/adw-view-switcher-bar.ts +26 -50
- package/src/elements/adw-view-switcher.ts +60 -110
- package/src/elements/adw-window-title.ts +4 -4
- package/src/elements/adw-wrap-box.ts +33 -59
- package/src/elements/view-switcher-dom.ts +15 -22
- package/src/entry-rows.spec.ts +18 -24
- package/src/index.ts +24 -15
- package/src/navigation-view.spec.ts +7 -10
- package/src/preferences-search.ts +11 -15
- package/src/preferences.spec.ts +13 -15
- package/src/source-view/adw-source-view.ts +6 -19
- package/src/source-view/hex.ts +7 -13
- package/src/split-button.spec.ts +32 -44
- package/src/split-views.spec.ts +83 -149
- package/src/style-classes.spec.ts +181 -0
- package/src/style-isolation.spec.ts +3 -6
- package/src/styles.generated.ts +1 -1
- package/src/tab-view.spec.ts +26 -35
- package/src/test.browser.mts +6 -0
- package/src/view-stack.spec.ts +23 -34
- package/src/view-switcher.spec.ts +56 -84
|
@@ -27,7 +27,6 @@ export declare class AdwEntryRow extends HTMLElement {
|
|
|
27
27
|
* the two SCSS partials are near-identical but each scopes to its own tag.
|
|
28
28
|
*/
|
|
29
29
|
protected get _classPrefix(): string;
|
|
30
|
-
/** The editable text. */
|
|
31
30
|
get text(): string;
|
|
32
31
|
set text(value: string);
|
|
33
32
|
/** `Adw.EntryRow:text-length` — the number of CHARACTERS, not UTF-16 units. */
|
|
@@ -44,54 +43,52 @@ export declare class AdwEntryRow extends HTMLElement {
|
|
|
44
43
|
/** `Adw.EntryRow:activates-default` — Enter may submit the surrounding form. */
|
|
45
44
|
get activatesDefault(): boolean;
|
|
46
45
|
set activatesDefault(value: boolean);
|
|
47
|
-
/** Whether the embedded entry currently has focus. */
|
|
48
46
|
get editing(): boolean;
|
|
49
47
|
connectedCallback(): void;
|
|
50
48
|
attributeChangedCallback(name: string, _old: string | null, value: string | null): void;
|
|
51
49
|
/**
|
|
52
|
-
* Add a widget after the editable area — `adw_entry_row_add_suffix
|
|
53
|
-
*
|
|
54
|
-
*
|
|
50
|
+
* Add a widget after the editable area — `adw_entry_row_add_suffix`, which APPENDS
|
|
51
|
+
* into a box, so several suffixes coexist and the password row's own peek toggle
|
|
52
|
+
* survives a consumer's.
|
|
55
53
|
*/
|
|
56
54
|
addSuffix(node: Node): void;
|
|
57
55
|
/**
|
|
58
|
-
* Add a widget before the editable area — `adw_entry_row_add_prefix
|
|
59
|
-
*
|
|
60
|
-
*
|
|
56
|
+
* Add a widget before the editable area — `adw_entry_row_add_prefix`. PREPENDS, like
|
|
57
|
+
* the `gtk_box_prepend` it mirrors, so several prefixes stack in reverse call order
|
|
58
|
+
* exactly as they do in GTK.
|
|
61
59
|
*/
|
|
62
60
|
addPrefix(node: Node): void;
|
|
63
61
|
/**
|
|
64
62
|
* Drive the trailing indicator — `adw_entry_row_set_show_indicator`
|
|
65
|
-
* (adw-entry-row-private.h
|
|
66
|
-
*
|
|
67
|
-
*
|
|
63
|
+
* (adw-entry-row-private.h). Private-to-the-library upstream, public here because
|
|
64
|
+
* `<adw-password-entry-row>` is a separate custom element rather than a C subclass
|
|
65
|
+
* with access to the private header.
|
|
68
66
|
*/
|
|
69
67
|
setShowIndicator(show: boolean): void;
|
|
70
|
-
/** `adw_entry_row_set_indicator_icon_name
|
|
68
|
+
/** `adw_entry_row_set_indicator_icon_name`. */
|
|
71
69
|
setIndicatorIconName(iconName: string): void;
|
|
72
|
-
/** `adw_entry_row_set_indicator_tooltip
|
|
70
|
+
/** `adw_entry_row_set_indicator_tooltip`. */
|
|
73
71
|
setIndicatorTooltip(tooltip: string): void;
|
|
74
|
-
/** Apply the pending edit — the apply button click
|
|
72
|
+
/** Apply the pending edit — the apply button click. */
|
|
75
73
|
apply(): void;
|
|
76
|
-
/** Focus the entry without selecting — `adw_entry_row_grab_focus_without_selecting
|
|
74
|
+
/** Focus the entry without selecting — `adw_entry_row_grab_focus_without_selecting`. */
|
|
77
75
|
grabFocusWithoutSelecting(): boolean;
|
|
78
76
|
/** Subclass hook: runs after the DOM exists and the state is seeded, before the first render. */
|
|
79
77
|
protected _onConnected(): void;
|
|
80
78
|
private _build;
|
|
81
79
|
/**
|
|
82
|
-
* Re-home the children the author wrote. libadwaita's buildable maps an
|
|
83
|
-
*
|
|
84
|
-
* spelling of its `type="prefix"`.
|
|
80
|
+
* Re-home the children the author wrote. libadwaita's buildable maps an untyped
|
|
81
|
+
* `<child>` to a suffix; `slot="prefix"` is the web spelling of `type="prefix"`.
|
|
85
82
|
*/
|
|
86
83
|
private _adoptAuthored;
|
|
87
84
|
/**
|
|
88
|
-
* `pressed_cb
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
85
|
+
* `pressed_cb`: a click landing on the row, the editable area, the indicator or
|
|
86
|
+
* either affordance box grabs focus; anything else (a suffix control, the apply
|
|
87
|
+
* button) is left alone. The pencil is `can-target=False` in the .ui, so a click on
|
|
88
|
+
* it picks the editable area — hence it focuses too.
|
|
92
89
|
*/
|
|
93
90
|
private _maybeFocus;
|
|
94
|
-
/** `text_activated_cb`
|
|
91
|
+
/** `text_activated_cb` — exactly one of the two signals. */
|
|
95
92
|
private _activate;
|
|
96
93
|
private _renderTitle;
|
|
97
94
|
/** Paint one render snapshot. Overridden (via `super`) by the password row. */
|
|
@@ -17,9 +17,7 @@ export declare class AdwIcon extends HTMLElement {
|
|
|
17
17
|
private _render;
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
|
-
* Build one icon node
|
|
21
|
-
*
|
|
22
|
-
* `extraClasses` are the caller's own positioning/context classes, added
|
|
23
|
-
* alongside the managed `.adw-icon` + mask class rather than replacing them.
|
|
20
|
+
* Build one icon node. `extraClasses` are the caller's own positioning/context
|
|
21
|
+
* classes, added alongside the managed `.adw-icon` + mask class, not replacing them.
|
|
24
22
|
*/
|
|
25
23
|
export declare function createAdwIcon(iconName: string | null, ...extraClasses: string[]): AdwIcon;
|
|
@@ -6,14 +6,10 @@ export declare class AdwViewStackPage extends HTMLElement {
|
|
|
6
6
|
}
|
|
7
7
|
export declare class AdwInlineViewSwitcher extends HTMLElement {
|
|
8
8
|
/**
|
|
9
|
-
* The dwell timer, injectable
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* `VIEW_SWITCHER_DRAG_VECTORS` was driven by the core suite alone, and the
|
|
14
|
-
* conformance header claimed all three suites drove it. `scheduler` is a
|
|
15
|
-
* property so a test can replace it before the element connects; the DOM one
|
|
16
|
-
* is the default, exactly as before.
|
|
9
|
+
* The dwell timer, injectable: a property rather than an inline
|
|
10
|
+
* `new ViewSwitcherState({ scheduler: domViewSwitcherScheduler })`, so a test can
|
|
11
|
+
* replace the clock before the element connects and drive
|
|
12
|
+
* `VIEW_SWITCHER_DRAG_VECTORS` here too. The DOM scheduler is the default.
|
|
17
13
|
*/
|
|
18
14
|
scheduler: ViewSwitcherScheduler;
|
|
19
15
|
private _stateInstance;
|
|
@@ -35,54 +31,45 @@ export declare class AdwInlineViewSwitcher extends HTMLElement {
|
|
|
35
31
|
set active(value: number);
|
|
36
32
|
/**
|
|
37
33
|
* Index of the ACTIVE TOGGLE, `-1` when the visible page has none because it
|
|
38
|
-
* is hidden — the port-safe `GTK_INVALID_LIST_POSITION
|
|
39
|
-
* (adw-inline-view-switcher.c:441-446).
|
|
34
|
+
* is hidden — the port-safe `GTK_INVALID_LIST_POSITION`.
|
|
40
35
|
*/
|
|
41
36
|
get activeToggle(): number;
|
|
42
|
-
/** What the toggles display: 'labels', 'icons' or 'both'. */
|
|
43
37
|
get displayMode(): AdwInlineViewSwitcherDisplayMode;
|
|
44
38
|
set displayMode(value: AdwInlineViewSwitcherDisplayMode);
|
|
45
39
|
/** Name of the visible page, `''` when nothing is selected. */
|
|
46
40
|
get visibleChildName(): string;
|
|
47
41
|
set visibleChildName(name: string | null | undefined);
|
|
48
|
-
/** The resolved page records. */
|
|
49
42
|
get pages(): readonly AdwViewSwitcherPage[];
|
|
50
43
|
/**
|
|
51
44
|
* Show or hide a page. Returns whether the SELECTION moved. Rebuilds the
|
|
52
45
|
* toggle row, because a hidden page has no toggle at all — C reacts to a
|
|
53
|
-
* page's `notify::visible` with `recreate_toggles
|
|
54
|
-
* (adw-inline-view-switcher.c:425, :471-477).
|
|
46
|
+
* page's `notify::visible` with `recreate_toggles`.
|
|
55
47
|
*/
|
|
56
48
|
setPageVisible(name: string, visible: boolean): boolean;
|
|
57
49
|
connectedCallback(): void;
|
|
58
50
|
disconnectedCallback(): void;
|
|
59
51
|
/**
|
|
60
|
-
* Re-read every declared page and push it into the state.
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
* `badge-number` or `icon-name` change reach the toggle — C rebinds on every
|
|
64
|
-
* page `notify` (adw-view-switcher.c:184-193) and this element did not.
|
|
52
|
+
* Re-read every declared page and push it into the state. Driven by
|
|
53
|
+
* {@link _watchPages}, which is what makes a runtime `badge-number` or `icon-name`
|
|
54
|
+
* change reach the toggle, as C's per-page `notify` bindings do.
|
|
65
55
|
*/
|
|
66
56
|
refreshPages(): void;
|
|
67
57
|
/**
|
|
68
58
|
* Watch the declared pages for attribute changes — the DOM's `notify::` on
|
|
69
|
-
* `AdwViewStackPage
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
* a MICROTASK where GTK's notify is synchronous — invisible to a user, and
|
|
75
|
-
* nothing here reads the toggle back inside the setter.
|
|
59
|
+
* `AdwViewStackPage`. A `MutationObserver` rather than an
|
|
60
|
+
* `attributeChangedCallback`, because this element consumes the page elements at
|
|
61
|
+
* connect and `replaceChildren`s them out of the tree, so a detached page cannot
|
|
62
|
+
* find its owner. It delivers on a MICROTASK where GTK's notify is synchronous —
|
|
63
|
+
* invisible to a user, and nothing here reads the toggle back inside the setter.
|
|
76
64
|
*/
|
|
77
65
|
private _watchPages;
|
|
78
66
|
attributeChangedCallback(name: string): void;
|
|
79
67
|
private _readDisplayModeAttr;
|
|
80
68
|
/**
|
|
81
|
-
* Rebuild the toggle row from the derived models
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
* the dwell the drag has already armed.
|
|
69
|
+
* Rebuild the toggle row from the derived models: one node per VISIBLE page, in
|
|
70
|
+
* compacted order — the structural half of `recreate_toggles`. Selection alone never
|
|
71
|
+
* lands here (`selection_changed_cb` only sets the active toggle), because
|
|
72
|
+
* rebuilding mid-drag would drop the dwell the drag has already armed.
|
|
86
73
|
*/
|
|
87
74
|
private _rebuildToggles;
|
|
88
75
|
private _onStateChange;
|
|
@@ -24,12 +24,10 @@ export declare class AdwNavigationSplitView extends HTMLElement {
|
|
|
24
24
|
/** Which side the sidebar is packed on — `start` (default) or `end`. */
|
|
25
25
|
get sidebarPosition(): AdwPackType;
|
|
26
26
|
set sidebarPosition(value: AdwPackType);
|
|
27
|
-
/** The sidebar page's tag of record, or `null`. */
|
|
28
27
|
get sidebarTag(): string | null;
|
|
29
|
-
/** The content page's tag of record, or `null`. */
|
|
30
28
|
get contentTag(): string | null;
|
|
31
29
|
/**
|
|
32
|
-
* `navigation.push` with `tag` — `navigation_push_cb
|
|
30
|
+
* `navigation.push` with `tag` — `navigation_push_cb`.
|
|
33
31
|
*
|
|
34
32
|
* An unmatched tag DELEGATES to the parent before it may become a critical,
|
|
35
33
|
* which is how nested split views forward a push outwards; on this port that
|
|
@@ -37,27 +35,24 @@ export declare class AdwNavigationSplitView extends HTMLElement {
|
|
|
37
35
|
* sets. Returns what the routing decided.
|
|
38
36
|
*/
|
|
39
37
|
push(tag: string): NavigationActionResult;
|
|
40
|
-
/** `navigation.pop` — `navigation_pop_cb
|
|
38
|
+
/** `navigation.pop` — `navigation_pop_cb`. */
|
|
41
39
|
pop(): NavigationActionResult;
|
|
42
40
|
connectedCallback(): void;
|
|
43
41
|
/** `Adw.NavigationPage:tag` off the slotted pane, or `null` when untagged. */
|
|
44
42
|
private _tagOf;
|
|
45
43
|
/**
|
|
46
|
-
* Mirror the state's `showContent` onto the attribute, so the DOM keeps
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
* re-enters `attributeChangedCallback`, which without the flag is a loop.
|
|
44
|
+
* Mirror the state's `showContent` onto the attribute, so the DOM keeps telling the
|
|
45
|
+
* truth after a `navigation.push` moved it. Guarded like the overlay view's
|
|
46
|
+
* reflection: writing the attribute re-enters `attributeChangedCallback`, which
|
|
47
|
+
* without the flag is a loop.
|
|
51
48
|
*/
|
|
52
49
|
private _reflectShowContent;
|
|
53
50
|
disconnectedCallback(): void;
|
|
54
51
|
attributeChangedCallback(name: string): void;
|
|
55
52
|
private _syncWidth;
|
|
56
|
-
/** A pixel attribute, falling back to the widget's own default. */
|
|
57
53
|
private _widthAttr;
|
|
58
|
-
/** The reading direction `start` / `end` resolve against (`get_start_or_end
|
|
54
|
+
/** The reading direction `start` / `end` resolve against (`get_start_or_end`). */
|
|
59
55
|
private get _direction();
|
|
60
56
|
private _syncClasses;
|
|
61
|
-
/** (Re)bind the `breakpoint` condition to `collapsed`. */
|
|
62
57
|
private _syncBreakpoint;
|
|
63
58
|
}
|
|
@@ -11,7 +11,6 @@ export declare class AdwNavigationPage extends HTMLElement {
|
|
|
11
11
|
get canPop(): boolean;
|
|
12
12
|
set canPop(value: boolean);
|
|
13
13
|
attributeChangedCallback(name: string, previous: string | null): void;
|
|
14
|
-
/** Put an attribute back the way it was, without re-entering the sync. */
|
|
15
14
|
revertAttribute(name: string, value: string | null): void;
|
|
16
15
|
}
|
|
17
16
|
export declare class AdwNavigationView extends HTMLElement {
|
|
@@ -21,21 +20,16 @@ export declare class AdwNavigationView extends HTMLElement {
|
|
|
21
20
|
private readonly _diagnose;
|
|
22
21
|
private readonly _state;
|
|
23
22
|
static get observedAttributes(): string[];
|
|
24
|
-
/** Whether push/pop transitions are animated. */
|
|
25
23
|
get animateTransitions(): boolean;
|
|
26
24
|
set animateTransitions(value: boolean);
|
|
27
25
|
/** Whether pressing Escape pops the visible page (Adw.NavigationView:pop-on-escape). */
|
|
28
26
|
get popOnEscape(): boolean;
|
|
29
27
|
set popOnEscape(value: boolean);
|
|
30
|
-
/** The currently-visible page (top of the stack), or null when empty. */
|
|
31
28
|
get visiblePage(): AdwNavigationPage | null;
|
|
32
|
-
/** The tag of the visible page, or null. */
|
|
33
29
|
get visiblePageTag(): string | null;
|
|
34
|
-
/** The number of pages on the navigation stack. */
|
|
35
30
|
get depth(): number;
|
|
36
31
|
/** The navigation stack, bottom-first (Adw.NavigationView:navigation-stack). */
|
|
37
32
|
get navigationStack(): readonly AdwNavigationPage[];
|
|
38
|
-
/** Every page this view knows — static and dynamically pushed. */
|
|
39
33
|
get pages(): readonly AdwNavigationPage[];
|
|
40
34
|
/** Whether the automatic back button is shown (AdwBackButton's visibility rule). */
|
|
41
35
|
get canGoBack(): boolean;
|
|
@@ -85,9 +79,8 @@ export declare class AdwNavigationView extends HTMLElement {
|
|
|
85
79
|
* Replace the whole navigation stack (mirrors AdwNavigationView.replace). The
|
|
86
80
|
* last page becomes visible; the transition is never animated.
|
|
87
81
|
*
|
|
88
|
-
* String entries are resolved BEFORE anything is mutated
|
|
89
|
-
*
|
|
90
|
-
* dynamically-pushed page and blank the view.
|
|
82
|
+
* String entries are resolved BEFORE anything is mutated, as `replace_with_tags`
|
|
83
|
+
* does: resolving late loses a dynamically-pushed page and blanks the view.
|
|
91
84
|
*/
|
|
92
85
|
replace(pages: ReadonlyArray<AdwNavigationPage | string | null>): void;
|
|
93
86
|
/** Replace the stack with the pages carrying `tags` (mirrors AdwNavigationView.replace_with_tags). */
|
|
@@ -103,7 +96,6 @@ export declare class AdwNavigationView extends HTMLElement {
|
|
|
103
96
|
private _render;
|
|
104
97
|
private _attach;
|
|
105
98
|
private _detach;
|
|
106
|
-
/** Inject (or remove) the automatic back button on the visible page. */
|
|
107
99
|
private _syncBackButton;
|
|
108
100
|
private _removeBackButton;
|
|
109
101
|
}
|
|
@@ -5,10 +5,9 @@ export declare class AdwOverlaySplitView extends HTMLElement {
|
|
|
5
5
|
private _backdropEl;
|
|
6
6
|
private _disposeBreakpoint;
|
|
7
7
|
/**
|
|
8
|
-
* The
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* MEAN together lives in core, held to `OVERLAY_COLLAPSE_VECTORS`.
|
|
8
|
+
* The property interplay, shared with the NativeScript renderer (ADR 0004): the
|
|
9
|
+
* element owns the attributes and the painting, core owns what `collapsed` +
|
|
10
|
+
* `show-sidebar` + `pin-sidebar` mean together, held to `OVERLAY_COLLAPSE_VECTORS`.
|
|
12
11
|
*/
|
|
13
12
|
private _state;
|
|
14
13
|
/** Re-entrancy guard for {@link _reflectShowSidebar}. */
|
|
@@ -23,9 +22,7 @@ export declare class AdwOverlaySplitView extends HTMLElement {
|
|
|
23
22
|
/**
|
|
24
23
|
* Every attribute {@link _readAttribute} handles must be listed here — an
|
|
25
24
|
* unobserved attribute never reaches `attributeChangedCallback`, so its branch
|
|
26
|
-
* is
|
|
27
|
-
* property that suppresses the collapse coupling settable only in the markup
|
|
28
|
-
* a parser saw: `view.setAttribute('pin-sidebar', '')` did nothing at all.
|
|
25
|
+
* is dead after construction and the property is settable only in parsed markup.
|
|
29
26
|
*/
|
|
30
27
|
static get observedAttributes(): string[];
|
|
31
28
|
get showSidebar(): boolean;
|
|
@@ -36,18 +33,13 @@ export declare class AdwOverlaySplitView extends HTMLElement {
|
|
|
36
33
|
get maxSidebarWidth(): number;
|
|
37
34
|
get sidebarWidthFraction(): number;
|
|
38
35
|
connectedCallback(): void;
|
|
39
|
-
/** The DOM surgery and the state, which happen once per element lifetime. */
|
|
40
36
|
private _buildOnce;
|
|
41
37
|
/**
|
|
42
|
-
* Everything that must be re-established every time the element enters a
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
* gone for good: moving the view between parents — which is what a slideshow
|
|
48
|
-
* or a client-side route change does — killed the ResizeObserver and left
|
|
49
|
-
* `_measuredWidth` frozen at whatever it last saw, or at 0 if the view had
|
|
50
|
-
* never been visible. That is the other half of the docs-site regression.
|
|
38
|
+
* Everything that must be re-established every time the element enters a document,
|
|
39
|
+
* NOT once per lifetime: `_buildOnce` returns early on the second connect, so
|
|
40
|
+
* anything torn down in `disconnectedCallback` and rebound only there would be gone
|
|
41
|
+
* for good — moving the view between parents (a slideshow, a client-side route
|
|
42
|
+
* change) would kill the ResizeObserver and freeze `_measuredWidth`.
|
|
51
43
|
*/
|
|
52
44
|
private _bindToDocument;
|
|
53
45
|
disconnectedCallback(): void;
|
|
@@ -55,61 +47,45 @@ export declare class AdwOverlaySplitView extends HTMLElement {
|
|
|
55
47
|
private readonly _onKeyDown;
|
|
56
48
|
attributeChangedCallback(_name: string, _old: string | null, _val: string | null): void;
|
|
57
49
|
/**
|
|
58
|
-
* Push ONE attribute into the state, then reflect back what the state made
|
|
59
|
-
* of
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
* is a value the state ALSO owns: collapsing auto-hides an unpinned sidebar,
|
|
63
|
-
* and a blanket re-read would immediately clobber that decision with the
|
|
64
|
-
* stale attribute.
|
|
50
|
+
* Push ONE attribute into the state, then reflect back what the state made of it.
|
|
51
|
+
* Per-attribute rather than a re-read of all of them: `show-sidebar` is a value the
|
|
52
|
+
* state ALSO owns (collapsing auto-hides an unpinned sidebar), so a blanket re-read
|
|
53
|
+
* would clobber that decision with the stale attribute.
|
|
65
54
|
*/
|
|
66
55
|
private _readAttribute;
|
|
67
56
|
/**
|
|
68
|
-
* Mirror the state's `showSidebar` back onto the attribute, so the DOM keeps
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
* without the flag that is an infinite reflection loop rather than a render.
|
|
57
|
+
* Mirror the state's `showSidebar` back onto the attribute, so the DOM keeps telling
|
|
58
|
+
* the truth after an auto-hide. Guarded: writing the attribute re-enters
|
|
59
|
+
* `attributeChangedCallback`, and without the flag that is an infinite reflection
|
|
60
|
+
* loop rather than a render.
|
|
73
61
|
*/
|
|
74
62
|
private _reflectShowSidebar;
|
|
75
|
-
/** (Re)bind the `breakpoint` condition to `collapsed`. */
|
|
76
63
|
private _syncBreakpoint;
|
|
77
64
|
openSidebar(): void;
|
|
78
65
|
hideSidebar(): void;
|
|
79
66
|
toggleSidebar(): void;
|
|
80
67
|
/**
|
|
81
|
-
* The reading direction `start` / `end` are resolved against
|
|
82
|
-
*
|
|
83
|
-
* `get_start_or_end` (adw-overlay-split-view.c:227-234) returns
|
|
84
|
-
* `GTK_PACK_END` under RTL, so a `start` sidebar is drawn on the RIGHT.
|
|
85
|
-
* Neither renderer mirrored any of it; the browser has the direction for
|
|
86
|
-
* free and only had to read it.
|
|
68
|
+
* The reading direction `start` / `end` are resolved against: `get_start_or_end`
|
|
69
|
+
* returns `GTK_PACK_END` under RTL, so a `start` sidebar is drawn on the RIGHT.
|
|
87
70
|
*/
|
|
88
71
|
private get _direction();
|
|
89
|
-
/** The sizing properties as the core takes them. */
|
|
90
72
|
private get _widthSpec();
|
|
91
|
-
/** The sidebar's allocated width in px — `get_sidebar_width
|
|
73
|
+
/** The sidebar's allocated width in px — `get_sidebar_width`. */
|
|
92
74
|
private get _sidebarWidth();
|
|
93
75
|
private _syncClasses;
|
|
94
76
|
/**
|
|
95
|
-
* Place the sidebar for the current progress — `allocate_uncollapsed`
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
* two states, so a swipe had nothing to drive. `layoutOverlaySplitView`
|
|
101
|
-
* returns the pane rect for any progress including the overshoot, which is
|
|
102
|
-
* what makes a continuous gesture expressible at all.
|
|
77
|
+
* Place the sidebar for the current progress — `allocate_uncollapsed` /
|
|
78
|
+
* `allocate_collapsed`, through the core. `layoutOverlaySplitView` returns the pane
|
|
79
|
+
* rect for ANY progress, overshoot included, which is what makes a continuous
|
|
80
|
+
* gesture expressible; the offset also has to follow the edge the sidebar is on, or
|
|
81
|
+
* an `end` sidebar slides the wrong way.
|
|
103
82
|
*/
|
|
104
83
|
private _syncGeometry;
|
|
105
84
|
private _syncSidebarWidth;
|
|
106
85
|
/**
|
|
107
|
-
* The pan gesture the five `OVERLAY_SWIPE_*` tables describe.
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
* split views returned zero — so `showProgress` was only ever 0 or 1 and the
|
|
111
|
-
* tables shipped unexercised. Pointer events give the browser the whole
|
|
112
|
-
* gesture in three handlers; every DECISION in them is core's.
|
|
86
|
+
* The `Adw.Swipeable` pan gesture the five `OVERLAY_SWIPE_*` tables describe.
|
|
87
|
+
* Pointer events give the browser the whole gesture in three handlers; every
|
|
88
|
+
* DECISION in them is core's.
|
|
113
89
|
*/
|
|
114
90
|
private _bindSwipe;
|
|
115
91
|
}
|
|
@@ -12,14 +12,13 @@ export declare class AdwPasswordEntryRow extends AdwEntryRow {
|
|
|
12
12
|
/** Whether Caps Lock is engaged, as last observed from a keyboard event. */
|
|
13
13
|
get capsLockOn(): boolean;
|
|
14
14
|
/**
|
|
15
|
-
* Feed the platform's Caps Lock state in — GDK gets it from the keyboard
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* test) can drive it directly.
|
|
15
|
+
* Feed the platform's Caps Lock state in — GDK gets it from the keyboard device.
|
|
16
|
+
* Public so a host that knows better than `KeyboardEvent.getModifierState` (a virtual
|
|
17
|
+
* keyboard, a test) can drive it directly.
|
|
19
18
|
*/
|
|
20
19
|
setCapsLockOn(on: boolean): void;
|
|
21
20
|
protected _onConnected(): void;
|
|
22
21
|
attributeChangedCallback(name: string, oldValue: string | null, value: string | null): void;
|
|
23
|
-
/** `notify_visibility_cb
|
|
22
|
+
/** `notify_visibility_cb`, applied to the DOM. */
|
|
24
23
|
private _renderPassword;
|
|
25
24
|
}
|
|
@@ -13,23 +13,18 @@ export declare class AdwPopover extends HTMLElement {
|
|
|
13
13
|
private _onDocumentPointerDown;
|
|
14
14
|
private _onDocumentKeyDown;
|
|
15
15
|
static get observedAttributes(): string[];
|
|
16
|
-
/** Whether the popover is showing. */
|
|
17
16
|
get open(): boolean;
|
|
18
17
|
set open(value: boolean);
|
|
19
18
|
/**
|
|
20
|
-
* The element the surface is positioned against and hands focus back to.
|
|
21
|
-
*
|
|
22
|
-
* last child of the widget that owns it.
|
|
19
|
+
* The element the surface is positioned against and hands focus back to. Defaults to
|
|
20
|
+
* `parentElement`: the popover is normally the last child of the widget that owns it.
|
|
23
21
|
*/
|
|
24
22
|
get anchor(): HTMLElement | null;
|
|
25
23
|
set anchor(value: HTMLElement | null);
|
|
26
|
-
/** Which side of the anchor the surface sits on. */
|
|
27
24
|
get position(): AdwPopoverPosition;
|
|
28
25
|
set position(value: AdwPopoverPosition);
|
|
29
|
-
/** Which edge of the anchor the surface lines up with. */
|
|
30
26
|
get align(): AdwPopoverAlign;
|
|
31
27
|
set align(value: AdwPopoverAlign);
|
|
32
|
-
/** The surface's ARIA role. */
|
|
33
28
|
get popoverRole(): AdwPopoverRole;
|
|
34
29
|
/** The navigable rows, in DOM order. Hidden rows are skipped — a filtered list navigates what it shows. */
|
|
35
30
|
get items(): HTMLElement[];
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import type { PreferencesSearchResult, SearchPreferencesOptions } from '@gjsify/adwaita-core';
|
|
2
2
|
/**
|
|
3
|
-
* A single preferences page.
|
|
4
|
-
* `title` / `icon-name` / `name` / `use-underline` attributes and any
|
|
5
|
-
* <adw-preferences-group> content — mirrors Adw.PreferencesPage.
|
|
3
|
+
* A single preferences page (Adw.PreferencesPage), child of <adw-preferences-dialog>.
|
|
6
4
|
*
|
|
7
|
-
* The dialog keeps the page ELEMENT rather than hoisting its children out,
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* page
|
|
11
|
-
* needs the title back the moment a second page is visible.
|
|
5
|
+
* The dialog keeps the page ELEMENT rather than hoisting its children out, because the
|
|
6
|
+
* page's identity is load-bearing: `adw_preferences_dialog_add` binds title / icon-name
|
|
7
|
+
* / name / use-underline / visible onto the view-stack page, and
|
|
8
|
+
* `create_search_row_subtitle` needs the title back the moment a second page is visible.
|
|
12
9
|
*/
|
|
13
10
|
export declare class AdwPreferencesPage extends HTMLElement {
|
|
14
11
|
static get observedAttributes(): string[];
|
|
@@ -21,7 +18,6 @@ export declare class AdwPreferencesPage extends HTMLElement {
|
|
|
21
18
|
/** `AdwPreferencesPage:use-underline` — the title carries a mnemonic. */
|
|
22
19
|
get useUnderline(): boolean;
|
|
23
20
|
set useUnderline(value: boolean);
|
|
24
|
-
/** The page's groups, in document order. */
|
|
25
21
|
get groups(): HTMLElement[];
|
|
26
22
|
}
|
|
27
23
|
export declare class AdwPreferencesDialog extends HTMLElement {
|
|
@@ -33,7 +29,6 @@ export declare class AdwPreferencesDialog extends HTMLElement {
|
|
|
33
29
|
private _pagesEl;
|
|
34
30
|
private _closeBtn;
|
|
35
31
|
static get observedAttributes(): string[];
|
|
36
|
-
/** Whether the dialog is revealed. */
|
|
37
32
|
get open(): boolean;
|
|
38
33
|
set open(value: boolean);
|
|
39
34
|
/** Whether the user can dismiss the dialog (scrim / Escape / close button). */
|
|
@@ -49,39 +44,31 @@ export declare class AdwPreferencesDialog extends HTMLElement {
|
|
|
49
44
|
/** Dismiss the dialog regardless of `can-close` (mirrors Adw.Dialog.force_close). */
|
|
50
45
|
forceClose(): void;
|
|
51
46
|
/**
|
|
52
|
-
* `adw_preferences_dialog_add`
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
* page appended later stayed a sibling of the scrim and rendered OUTSIDE
|
|
57
|
-
* the dialog card. GTK and the NativeScript port both accept a page
|
|
58
|
-
* whenever it arrives.
|
|
47
|
+
* `adw_preferences_dialog_add` — add a page at ANY time. A page that is only
|
|
48
|
+
* snapshotted in `connectedCallback` stays a sibling of the scrim and renders
|
|
49
|
+
* OUTSIDE the dialog card; GTK and the NativeScript port both accept one whenever
|
|
50
|
+
* it arrives.
|
|
59
51
|
*/
|
|
60
52
|
add(page: AdwPreferencesPage): void;
|
|
61
53
|
/**
|
|
62
|
-
* `adw_preferences_dialog_remove
|
|
63
|
-
*
|
|
64
|
-
*
|
|
54
|
+
* `adw_preferences_dialog_remove`. C logs `ADW_CRITICAL_CANNOT_REMOVE_CHILD` and
|
|
55
|
+
* no-ops for a page it does not own; returning `false` is the same contract without
|
|
56
|
+
* a console write.
|
|
65
57
|
*
|
|
66
|
-
* NOT named `remove`: `ChildNode.remove()`
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
* requires.
|
|
58
|
+
* NOT named `remove`: `ChildNode.remove()` exists on every element and takes no
|
|
59
|
+
* arguments, so overriding it with a different signature makes the class
|
|
60
|
+
* un-assignable to `HTMLElement` — which `customElements.define` requires.
|
|
70
61
|
*/
|
|
71
62
|
removePage(page: AdwPreferencesPage): boolean;
|
|
72
|
-
/** The dialog's pages, in add order. */
|
|
73
63
|
get pages(): AdwPreferencesPage[];
|
|
74
64
|
/**
|
|
75
|
-
* The preferences search (`filter_search_results` +
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
* NativeScript one answer identically for the same tree — including the
|
|
80
|
-
* three corpus filters (visible page → visible group → titled visible row)
|
|
81
|
-
* and the case fold that makes `strasse` find `Straße`.
|
|
65
|
+
* The preferences search (`filter_search_results` + `create_search_row_subtitle`),
|
|
66
|
+
* over this dialog's live page subtree. The pipeline is `@gjsify/adwaita-core`'s,
|
|
67
|
+
* including the three corpus filters (visible page → visible group → titled visible
|
|
68
|
+
* row) and the case fold that makes `strasse` find `Straße`.
|
|
82
69
|
*
|
|
83
|
-
* An empty query returns the WHOLE corpus, which is what
|
|
84
|
-
*
|
|
70
|
+
* An empty query returns the WHOLE corpus, as C does, which is what makes the
|
|
71
|
+
* results list non-empty before the user types.
|
|
85
72
|
*/
|
|
86
73
|
search(query: string, options?: SearchPreferencesOptions): PreferencesSearchResult<Element>[];
|
|
87
74
|
connectedCallback(): void;
|
|
@@ -10,20 +10,19 @@ export declare class AdwPreferencesGroup extends HTMLElement {
|
|
|
10
10
|
get description(): string;
|
|
11
11
|
set description(value: string);
|
|
12
12
|
/**
|
|
13
|
-
* `adw_preferences_group_add
|
|
14
|
-
*
|
|
13
|
+
* `adw_preferences_group_add`: a row goes into the boxed list, a `header-suffix`
|
|
14
|
+
* child into the header.
|
|
15
15
|
*
|
|
16
|
-
* Exposed as a method AND wired to a `MutationObserver` on the host, because
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* row count that decides whether the card is painted at all.
|
|
16
|
+
* Exposed as a method AND wired to a `MutationObserver` on the host, because both
|
|
17
|
+
* spellings occur — `group.addRow(row)` in code, `group.append(row)` from a
|
|
18
|
+
* framework's rendering — and a bare child of the host would sit outside the card,
|
|
19
|
+
* invisible to the row count that decides whether the card is painted at all.
|
|
21
20
|
*/
|
|
22
21
|
addRow(child: Node): void;
|
|
23
22
|
/**
|
|
24
|
-
* `adw_preferences_group_remove
|
|
25
|
-
*
|
|
26
|
-
*
|
|
23
|
+
* `adw_preferences_group_remove`. C logs `ADW_CRITICAL_CANNOT_REMOVE_CHILD` and
|
|
24
|
+
* no-ops for a child it does not own; returning `false` is the same contract
|
|
25
|
+
* without a console write.
|
|
27
26
|
*/
|
|
28
27
|
removeRow(child: Node): boolean;
|
|
29
28
|
connectedCallback(): void;
|
|
@@ -33,10 +32,9 @@ export declare class AdwPreferencesGroup extends HTMLElement {
|
|
|
33
32
|
* Adopt children appended to the HOST after the subtree was built, so
|
|
34
33
|
* `group.append(row)` behaves like `adw_preferences_group_add`.
|
|
35
34
|
*
|
|
36
|
-
* C gets this for free
|
|
37
|
-
* `update_listbox_visibility` through `items-changed
|
|
38
|
-
*
|
|
39
|
-
* to have the same rule hold over time rather than only at connect.
|
|
35
|
+
* C gets this for free: `gtk_widget_observe_children` on the listbox drives
|
|
36
|
+
* `update_listbox_visibility` through `items-changed`. A DOM element needs the
|
|
37
|
+
* observer for the same rule to hold over time rather than only at connect.
|
|
40
38
|
*/
|
|
41
39
|
private _observeHost;
|
|
42
40
|
private _renderHeader;
|
|
@@ -26,10 +26,9 @@ export declare class AdwProgressBar extends HTMLElement {
|
|
|
26
26
|
get disabled(): boolean;
|
|
27
27
|
set disabled(value: boolean);
|
|
28
28
|
/**
|
|
29
|
-
* Switch the bar to indeterminate — GtkProgressBar's method name for the
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
* `pulse-step` arithmetic is not verifiable in this tree and is not faked.
|
|
29
|
+
* Switch the bar to indeterminate — GtkProgressBar's method name for the same
|
|
30
|
+
* intent. The bouncing block is a CSS animation here, so this ENTERS the state and
|
|
31
|
+
* repeat calls are no-ops (see the module header).
|
|
33
32
|
*/
|
|
34
33
|
pulse(): void;
|
|
35
34
|
connectedCallback(): void;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare class AdwShortcutLabel extends HTMLElement {
|
|
2
|
+
private _initialized;
|
|
3
|
+
static get observedAttributes(): string[];
|
|
4
|
+
connectedCallback(): void;
|
|
5
|
+
attributeChangedCallback(name: string): void;
|
|
6
|
+
get accelerator(): string;
|
|
7
|
+
set accelerator(value: string);
|
|
8
|
+
get disabledText(): string;
|
|
9
|
+
set disabledText(value: string);
|
|
10
|
+
private _render;
|
|
11
|
+
/**
|
|
12
|
+
* The rendered direction, which is what the sequence arrow follows.
|
|
13
|
+
*
|
|
14
|
+
* `getComputedStyle` is the only thing that sees an inherited `dir` — the
|
|
15
|
+
* attribute alone is set on an ancestor most of the time. A detached element
|
|
16
|
+
* has no computed style to read, so the attribute is the fallback.
|
|
17
|
+
*/
|
|
18
|
+
private _direction;
|
|
19
|
+
private _nodeElement;
|
|
20
|
+
}
|