@gjsify/adwaita-web 0.35.0 → 0.37.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.
Files changed (146) hide show
  1. package/dist/adwaita-web.css +433 -33
  2. package/dist/adwaita-web.css.map +1 -1
  3. package/lib/types/adw-shortcut-label.spec.d.ts +2 -0
  4. package/lib/types/breakpoints.d.ts +10 -12
  5. package/lib/types/elements/adw-about-dialog.d.ts +19 -36
  6. package/lib/types/elements/adw-action-row.d.ts +9 -12
  7. package/lib/types/elements/adw-alert-dialog.d.ts +0 -12
  8. package/lib/types/elements/adw-avatar.d.ts +1 -0
  9. package/lib/types/elements/adw-bottom-sheet.d.ts +7 -12
  10. package/lib/types/elements/adw-button-content.d.ts +3 -4
  11. package/lib/types/elements/adw-button-row.d.ts +1 -1
  12. package/lib/types/elements/adw-carousel.d.ts +28 -49
  13. package/lib/types/elements/adw-checks.d.ts +2 -8
  14. package/lib/types/elements/adw-combo-row.d.ts +6 -6
  15. package/lib/types/elements/adw-data-grid.d.ts +5 -10
  16. package/lib/types/elements/adw-drop-down.d.ts +3 -11
  17. package/lib/types/elements/adw-entry-row.d.ts +20 -23
  18. package/lib/types/elements/adw-icon.d.ts +2 -4
  19. package/lib/types/elements/adw-inline-view-switcher.d.ts +18 -31
  20. package/lib/types/elements/adw-navigation-split-view.d.ts +7 -12
  21. package/lib/types/elements/adw-navigation-view.d.ts +2 -10
  22. package/lib/types/elements/adw-overlay-split-view.d.ts +28 -52
  23. package/lib/types/elements/adw-password-entry-row.d.ts +4 -5
  24. package/lib/types/elements/adw-popover.d.ts +2 -7
  25. package/lib/types/elements/adw-preferences-dialog.d.ts +21 -34
  26. package/lib/types/elements/adw-preferences-group.d.ts +12 -14
  27. package/lib/types/elements/adw-progress-bar.d.ts +3 -4
  28. package/lib/types/elements/adw-shortcut-label.d.ts +20 -0
  29. package/lib/types/elements/adw-sidebar.d.ts +5 -10
  30. package/lib/types/elements/adw-spinner.d.ts +3 -5
  31. package/lib/types/elements/adw-split-button.d.ts +6 -16
  32. package/lib/types/elements/adw-switch-row.d.ts +3 -3
  33. package/lib/types/elements/adw-tab-view.d.ts +16 -26
  34. package/lib/types/elements/adw-toast-overlay.d.ts +8 -13
  35. package/lib/types/elements/adw-view-stack.d.ts +7 -17
  36. package/lib/types/elements/adw-view-switcher-bar.d.ts +4 -8
  37. package/lib/types/elements/adw-view-switcher.d.ts +18 -38
  38. package/lib/types/elements/adw-wrap-box.d.ts +7 -17
  39. package/lib/types/elements/view-switcher-dom.d.ts +10 -13
  40. package/lib/types/index.d.ts +1 -0
  41. package/lib/types/source-view/hex.d.ts +7 -13
  42. package/lib/types/style-classes.spec.d.ts +11 -0
  43. package/lib/types/styles.generated.d.ts +1 -1
  44. package/package.json +6 -6
  45. package/scss/_about_dialog.scss +3 -2
  46. package/scss/_action_row.scss +33 -0
  47. package/scss/_avatar.scss +12 -0
  48. package/scss/_button.scss +44 -22
  49. package/scss/_card.scss +11 -8
  50. package/scss/_checks.scss +2 -4
  51. package/scss/_dialog.scss +3 -2
  52. package/scss/_headerbar.scss +23 -0
  53. package/scss/_popover.scss +8 -4
  54. package/scss/_preferences.scss +7 -7
  55. package/scss/_progress_bar.scss +9 -6
  56. package/scss/_reset.scss +1 -1
  57. package/scss/_shortcut_label.scss +80 -0
  58. package/scss/_sidebar.scss +57 -0
  59. package/scss/_status_page.scss +20 -0
  60. package/scss/_style_classes.scss +407 -0
  61. package/scss/_switch.scss +4 -3
  62. package/scss/_variables.scss +25 -0
  63. package/scss/adwaita-skin.scss +12 -0
  64. package/src/adw-about-dialog.spec.ts +34 -49
  65. package/src/adw-action-rows.spec.ts +25 -33
  66. package/src/adw-avatar.spec.ts +51 -20
  67. package/src/adw-banner.spec.ts +5 -8
  68. package/src/adw-button-content.spec.ts +9 -12
  69. package/src/adw-button-row.spec.ts +2 -4
  70. package/src/adw-carousel.spec.ts +40 -53
  71. package/src/adw-checks.spec.ts +36 -47
  72. package/src/adw-drop-down.spec.ts +25 -32
  73. package/src/adw-header-bar.spec.ts +5 -7
  74. package/src/adw-icon.spec.ts +23 -32
  75. package/src/adw-progress-bar.spec.ts +10 -12
  76. package/src/adw-row-state.spec.ts +9 -10
  77. package/src/adw-shortcut-label.spec.ts +112 -0
  78. package/src/adw-sidebar.spec.ts +17 -24
  79. package/src/adw-switch.spec.ts +11 -17
  80. package/src/adw-tab-view.spec.ts +7 -10
  81. package/src/adw-toast-overlay.spec.ts +7 -11
  82. package/src/adw-view-switcher-bar.spec.ts +10 -14
  83. package/src/adw-wrap-box.spec.ts +25 -36
  84. package/src/bottom-sheet.spec.ts +30 -36
  85. package/src/breakpoints.ts +15 -18
  86. package/src/chrome.spec.ts +13 -21
  87. package/src/elements/adw-about-dialog.ts +71 -114
  88. package/src/elements/adw-action-row.ts +22 -37
  89. package/src/elements/adw-alert-dialog.ts +25 -50
  90. package/src/elements/adw-avatar.ts +40 -15
  91. package/src/elements/adw-banner.ts +14 -18
  92. package/src/elements/adw-bottom-sheet.ts +31 -52
  93. package/src/elements/adw-button-content.ts +30 -37
  94. package/src/elements/adw-button-row.ts +14 -24
  95. package/src/elements/adw-carousel.ts +87 -148
  96. package/src/elements/adw-checks.ts +43 -56
  97. package/src/elements/adw-clamp.ts +8 -9
  98. package/src/elements/adw-combo-row.ts +17 -25
  99. package/src/elements/adw-data-grid.ts +26 -38
  100. package/src/elements/adw-dialog.ts +25 -56
  101. package/src/elements/adw-drop-down.ts +31 -51
  102. package/src/elements/adw-entry-row.ts +39 -46
  103. package/src/elements/adw-expander-row.ts +30 -53
  104. package/src/elements/adw-icon.ts +30 -53
  105. package/src/elements/adw-inline-view-switcher.ts +38 -67
  106. package/src/elements/adw-menu-button.ts +28 -58
  107. package/src/elements/adw-navigation-split-view.ts +35 -47
  108. package/src/elements/adw-navigation-view.ts +12 -28
  109. package/src/elements/adw-overlay-split-view.ts +100 -175
  110. package/src/elements/adw-password-entry-row.ts +18 -28
  111. package/src/elements/adw-popover.ts +28 -44
  112. package/src/elements/adw-preferences-dialog.ts +41 -66
  113. package/src/elements/adw-preferences-group.ts +33 -46
  114. package/src/elements/adw-progress-bar.ts +27 -47
  115. package/src/elements/adw-shortcut-label.ts +138 -0
  116. package/src/elements/adw-sidebar.ts +31 -39
  117. package/src/elements/adw-spin-row.ts +7 -14
  118. package/src/elements/adw-spinner.ts +31 -43
  119. package/src/elements/adw-split-button.ts +45 -75
  120. package/src/elements/adw-switch-row.ts +29 -46
  121. package/src/elements/adw-switch.ts +28 -47
  122. package/src/elements/adw-tab-view.ts +62 -103
  123. package/src/elements/adw-toast-overlay.ts +28 -35
  124. package/src/elements/adw-toggle-group.ts +9 -16
  125. package/src/elements/adw-view-stack.ts +32 -51
  126. package/src/elements/adw-view-switcher-bar.ts +26 -50
  127. package/src/elements/adw-view-switcher.ts +60 -110
  128. package/src/elements/adw-window-title.ts +4 -4
  129. package/src/elements/adw-wrap-box.ts +33 -59
  130. package/src/elements/view-switcher-dom.ts +15 -22
  131. package/src/entry-rows.spec.ts +18 -24
  132. package/src/index.ts +13 -15
  133. package/src/navigation-view.spec.ts +7 -10
  134. package/src/preferences-search.ts +11 -15
  135. package/src/preferences.spec.ts +13 -15
  136. package/src/source-view/adw-source-view.ts +6 -19
  137. package/src/source-view/hex.ts +7 -13
  138. package/src/split-button.spec.ts +32 -44
  139. package/src/split-views.spec.ts +83 -149
  140. package/src/style-classes.spec.ts +181 -0
  141. package/src/style-isolation.spec.ts +3 -6
  142. package/src/styles.generated.ts +1 -1
  143. package/src/tab-view.spec.ts +26 -35
  144. package/src/test.browser.mts +4 -0
  145. package/src/view-stack.spec.ts +23 -34
  146. 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
- * (adw-entry-row.c:885-899), which APPENDS into a box, so several suffixes
54
- * coexist and the password row's own peek toggle survives a consumer's.
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
- * (C:864-880). PREPENDS, like the `gtk_box_prepend` it mirrors, so several
60
- * prefixes stack in reverse call order exactly as they do in GTK.
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, C:1281-1296). Private-to-the-library upstream,
66
- * public here because `<adw-password-entry-row>` is a separate custom element
67
- * rather than a C subclass with access to the private header.
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` (C:1263-1273). */
68
+ /** `adw_entry_row_set_indicator_icon_name`. */
71
69
  setIndicatorIconName(iconName: string): void;
72
- /** `adw_entry_row_set_indicator_tooltip` (C:1275-1279). */
70
+ /** `adw_entry_row_set_indicator_tooltip`. */
73
71
  setIndicatorTooltip(tooltip: string): void;
74
- /** Apply the pending edit — the apply button click (C:229-241). */
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` (C:1379-1389). */
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
- * untyped `<child>` to a suffix (C:796-812); `slot="prefix"` is the web
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` (C:201-227): a click landing on the row, the editable area,
89
- * the indicator or either affordance box grabs focus; anything else (a suffix
90
- * control, the apply button) is left alone. The pencil is `can-target=False`
91
- * in the .ui, so a click on it picks the editable area — hence it focuses too.
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` (C:243-266) — exactly one of the two signals. */
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: the three lines every caller would otherwise write.
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
- * It used to be `new ViewSwitcherState({ scheduler: domViewSwitcherScheduler })`
12
- * inline, which left NOWHERE to hand a clock in — so
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
- * Driven by {@link _watchPages}, which is what makes a runtime
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`, which C binds per page (adw-view-switcher.c:184-193).
70
- *
71
- * A `MutationObserver` rather than an `attributeChangedCallback`: this
72
- * element consumes the page elements at connect and `replaceChildren`s them
73
- * out of the tree, so a detached page cannot find its owner. It delivers on
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. One node per VISIBLE page,
82
- * in compacted order — the structural half of `recreate_toggles`. Selection
83
- * alone never lands here: `selection_changed_cb` only sets the active toggle
84
- * (adw-inline-view-switcher.c:434-453), and rebuilding mid-drag would drop
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` (:644-685).
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` (:687-702). */
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
- * telling the truth after a `navigation.push` moved it.
48
- *
49
- * Guarded the way the overlay view's reflection is: writing the attribute
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`, :220-227). */
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 — the C does the same
89
- * in replace_with_tags:3136-3147, and resolving late is what used to lose a
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 single source of truth for the property interplay, shared with the
9
- * NativeScript renderer (ADR 0004). The element owns the attributes and the
10
- * painting; every rule about what `collapsed` + `show-sidebar` + `pin-sidebar`
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 DEAD after construction. `pin-sidebar` was missing, which made the
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
- * document — NOT once per lifetime.
44
- *
45
- * `connectedCallback` returns early on the second connect (the DOM is
46
- * already built), so anything torn down in `disconnectedCallback` used to be
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 it.
60
- *
61
- * Per-attribute rather than a re-read of all of them, because `show-sidebar`
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
- * telling the truth after an auto-hide.
70
- *
71
- * Guarded: writing the attribute re-enters `attributeChangedCallback`, and
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` (:441-466). */
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
- * (:572-610) and `allocate_collapsed` (:653-703), through the core.
97
- *
98
- * The slide used to be `marginRight: -offsetWidth` REGARDLESS of which edge
99
- * the sidebar is on, so an `end` sidebar slid the wrong way; and it was only
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
- * There was no gesture code in either renderer — grep for `pan` in both
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
- * device (adw-password-entry-row.c:111-115). Public because a host that
17
- * knows better than `KeyboardEvent.getModifierState` (a virtual keyboard, a
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` (C:62-81), applied to the DOM. */
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
- * Defaults to `parentElement`, which is the common case: the popover is the
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. Child of <adw-preferences-dialog>. Carries optional
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
- * because the page's identity is load-bearing: `adw_preferences_dialog_add`
9
- * binds title / icon-name / name / use-underline / visible onto the view-stack
10
- * page (adw-preferences-dialog.c:707-711), and `create_search_row_subtitle`
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` (adw-preferences-dialog.c:693-716) — add a
53
- * page at ANY time.
54
- *
55
- * Before this the pages were snapshotted once, in `connectedCallback`; a
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` (:723-745). C logs
63
- * `ADW_CRITICAL_CANNOT_REMOVE_CHILD` and no-ops for a page it does not own;
64
- * returning `false` is the same contract without a console write.
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()` already exists on every element
67
- * and takes no arguments, so overriding it with a different signature makes
68
- * the class un-assignable to `HTMLElement` — which `customElements.define`
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
- * `create_search_row_subtitle`), over this dialog's live page subtree.
77
- *
78
- * The whole pipeline is `@gjsify/adwaita-core`'s, so this dialog and the
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 C does and what
84
- * makes the results list non-empty before the user types.
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` (adw-preferences-group.c:396-411): a row goes
14
- * into the boxed list, a `header-suffix` child into the header.
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
- * both spellings occur: `group.addRow(row)` in code, `group.append(row)` in
18
- * a framework's rendering. Before this, a child appended after connect
19
- * stayed a bare child of the host — outside the card, and invisible to the
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` (:421-440). C logs
25
- * `ADW_CRITICAL_CANNOT_REMOVE_CHILD` and no-ops for a child it does not
26
- * own; returning `false` is the same contract without a console write.
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 — `gtk_widget_observe_children` on the listbox drives
37
- * `update_listbox_visibility` through `items-changed`
38
- * (adw-preferences-group.c:335-339) — and a DOM element needs the observer
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
- * same intent. See the module header: the bouncing block is a CSS animation
31
- * here, so this ENTERS the state and repeat calls are no-ops; GTK's
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
+ }