@gjsify/adwaita-core 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.
Files changed (66) hide show
  1. package/lib/esm/accent.js +1 -0
  2. package/lib/esm/conformance/accent.js +1 -0
  3. package/lib/esm/conformance/index.js +1 -1
  4. package/lib/esm/conformance/shortcut-label.js +1 -0
  5. package/lib/esm/index.js +1 -1
  6. package/lib/esm/shortcut-label.js +1 -0
  7. package/lib/types/about-dialog.d.ts +92 -98
  8. package/lib/types/accent.d.ts +36 -0
  9. package/lib/types/accent.spec.d.ts +2 -0
  10. package/lib/types/action-row.d.ts +95 -125
  11. package/lib/types/avatar.d.ts +30 -37
  12. package/lib/types/banner.d.ts +25 -53
  13. package/lib/types/breakpoint.d.ts +6 -7
  14. package/lib/types/button-content.d.ts +41 -80
  15. package/lib/types/carousel.d.ts +175 -252
  16. package/lib/types/checks.d.ts +13 -30
  17. package/lib/types/chrome.d.ts +90 -136
  18. package/lib/types/color-scheme.d.ts +5 -6
  19. package/lib/types/conformance/about-dialog.d.ts +64 -91
  20. package/lib/types/conformance/accent.d.ts +20 -0
  21. package/lib/types/conformance/action-row.d.ts +26 -46
  22. package/lib/types/conformance/avatar.d.ts +8 -10
  23. package/lib/types/conformance/banner.d.ts +17 -37
  24. package/lib/types/conformance/button-content.d.ts +24 -46
  25. package/lib/types/conformance/carousel.d.ts +35 -75
  26. package/lib/types/conformance/checks.d.ts +0 -4
  27. package/lib/types/conformance/chrome.d.ts +28 -36
  28. package/lib/types/conformance/data-grid.d.ts +28 -47
  29. package/lib/types/conformance/dialog.d.ts +4 -9
  30. package/lib/types/conformance/entry-row.d.ts +20 -39
  31. package/lib/types/conformance/index.d.ts +4 -0
  32. package/lib/types/conformance/navigation-view.d.ts +0 -4
  33. package/lib/types/conformance/popover.d.ts +4 -9
  34. package/lib/types/conformance/preferences.d.ts +15 -28
  35. package/lib/types/conformance/rows.d.ts +5 -12
  36. package/lib/types/conformance/shortcut-label.d.ts +34 -0
  37. package/lib/types/conformance/sidebar.d.ts +28 -49
  38. package/lib/types/conformance/spinner.d.ts +21 -27
  39. package/lib/types/conformance/split-button.d.ts +21 -43
  40. package/lib/types/conformance/split-view.d.ts +29 -36
  41. package/lib/types/conformance/tab-view.d.ts +32 -73
  42. package/lib/types/conformance/view-stack.d.ts +0 -12
  43. package/lib/types/conformance/view-switcher.d.ts +46 -114
  44. package/lib/types/conformance/wrap-box.d.ts +40 -63
  45. package/lib/types/data-grid.d.ts +38 -48
  46. package/lib/types/dialog.d.ts +39 -51
  47. package/lib/types/easing.d.ts +6 -12
  48. package/lib/types/entry-row.d.ts +94 -123
  49. package/lib/types/glib.d.ts +17 -25
  50. package/lib/types/index.d.ts +4 -0
  51. package/lib/types/length-unit.d.ts +7 -12
  52. package/lib/types/navigation-view.d.ts +62 -68
  53. package/lib/types/popover.d.ts +39 -66
  54. package/lib/types/preferences.d.ts +83 -100
  55. package/lib/types/rows.d.ts +45 -63
  56. package/lib/types/shortcut-label.d.ts +79 -0
  57. package/lib/types/shortcut-label.spec.d.ts +2 -0
  58. package/lib/types/sidebar.d.ts +95 -121
  59. package/lib/types/spinner.d.ts +39 -61
  60. package/lib/types/split-button.d.ts +78 -134
  61. package/lib/types/split-view.d.ts +74 -89
  62. package/lib/types/tab-view.d.ts +174 -256
  63. package/lib/types/view-stack.d.ts +87 -129
  64. package/lib/types/view-switcher.d.ts +126 -211
  65. package/lib/types/wrap-box.d.ts +62 -123
  66. package/package.json +3 -3
@@ -1,21 +1,16 @@
1
- /** How long the empty↔filled title transition runs — adw-entry-row.c:18. */
1
+ /** How long the empty↔filled title transition runs — adw-entry-row.c. */
2
2
  export declare const EMPTY_ANIMATION_DURATION_MS = 150;
3
3
  /**
4
- * Gap between the shrunken title and the text baseline, in px —
5
- * adw-entry-row.c:19 (`TITLE_SPACING`), used in the vertical measure (C:318,320)
6
- * and in both the title offset and the baseline shift (C:384,407).
7
- *
8
- * Exported as DATA rather than applied here: the two renderers currently
9
- * hardcode `1px` (web `_entry_row.scss`) and `2` (NS `theme/adwaita.css`), and
10
- * neither knew it was meant to be the same number as the other's.
4
+ * Gap between the shrunken title and the text baseline, in px — `TITLE_SPACING`, used in
5
+ * the vertical measure and in both the title offset and the baseline shift. Exported as
6
+ * DATA rather than applied here, so the renderers' stylesheets stop hardcoding a private
7
+ * number each.
11
8
  */
12
9
  export declare const ENTRY_ROW_TITLE_SPACING = 3;
13
10
  /**
14
- * Upper bound of `Adw.EntryRow:max-length` / `:text-length`.
15
- *
16
- * `text-length` is declared `0, G_MAXUINT16, 0` (adw-entry-row.c:666-669) and
17
- * `max-length` runs `0..GTK_ENTRY_BUFFER_MAX_SIZE` (C:678-682) — the same 16-bit
18
- * ceiling. `0` means unlimited, so this is only the clamp for an absurd input.
11
+ * Upper bound of `Adw.EntryRow:max-length` / `:text-length`. `text-length` is declared
12
+ * `0, G_MAXUINT16, 0` and `max-length` runs `0..GTK_ENTRY_BUFFER_MAX_SIZE` — the same
13
+ * 16-bit ceiling. `0` means unlimited, so this is only the clamp for an absurd input.
19
14
  */
20
15
  export declare const ENTRY_ROW_MAX_LENGTH_LIMIT = 65535;
21
16
  /** Icon name of the trailing pencil — adw-entry-row.ui (`edit_icon`). */
@@ -24,42 +19,37 @@ export declare const ENTRY_ROW_EDIT_ICON_NAME = "adw-entry-edit-symbolic";
24
19
  export declare const ENTRY_ROW_APPLY_ICON_NAME = "adw-entry-apply-symbolic";
25
20
  /** Tooltip of the apply button — adw-entry-row.ui. */
26
21
  export declare const ENTRY_ROW_APPLY_TOOLTIP = "Apply";
27
- /** Peek-button icon while the password is masked — adw-password-entry-row.c:74. */
22
+ /** Peek-button icon while the password is masked — adw-password-entry-row.c. */
28
23
  export declare const PASSWORD_REVEAL_ICON_NAME = "view-reveal-symbolic";
29
- /** Peek-button icon while the password is revealed — adw-password-entry-row.c:69. */
24
+ /** Peek-button icon while the password is revealed — adw-password-entry-row.c. */
30
25
  export declare const PASSWORD_CONCEAL_ICON_NAME = "view-conceal-symbolic";
31
- /** Peek-button tooltip while the password is masked — adw-password-entry-row.c:76. */
26
+ /** Peek-button tooltip while the password is masked — adw-password-entry-row.c. */
32
27
  export declare const PASSWORD_REVEAL_LABEL = "Show Password";
33
- /** Peek-button tooltip while the password is revealed — adw-password-entry-row.c:71. */
28
+ /** Peek-button tooltip while the password is revealed — adw-password-entry-row.c. */
34
29
  export declare const PASSWORD_CONCEAL_LABEL = "Hide Password";
35
- /** Caps-lock indicator icon — adw-password-entry-row.c:169. */
30
+ /** Caps-lock indicator icon — adw-password-entry-row.c. */
36
31
  export declare const CAPS_LOCK_ICON_NAME = "caps-lock-symbolic";
37
- /** Caps-lock indicator tooltip — adw-password-entry-row.c:171. */
32
+ /** Caps-lock indicator tooltip — adw-password-entry-row.c. */
38
33
  export declare const CAPS_LOCK_TOOLTIP = "Caps Lock is on";
39
34
  /**
40
- * The number of CHARACTERS in `text`, i.e. what `adw_entry_row_get_text_length`
41
- * reports ("The current number of characters in @self", adw-entry-row.c:1304).
35
+ * The number of CHARACTERS in `text`, i.e. what `adw_entry_row_get_text_length` reports.
42
36
  *
43
- * Code points, never UTF-16 units: a port that reaches for `.length` reports 3
44
- * for `'🔒é'` where GTK reports 2, and then truncates a surrogate pair in half.
45
- * This one function is why `max-length` and `text-length` cannot be left to the
46
- * renderers.
37
+ * Code points, never UTF-16 units: `.length` reports 3 for `'🔒é'` where GTK reports 2, and
38
+ * then truncates a surrogate pair in half. This is why `max-length` and `text-length`
39
+ * cannot be left to the renderers.
47
40
  */
48
41
  export declare function entryTextLength(text: string): number;
49
42
  /**
50
43
  * Truncate `text` to `maxLength` CHARACTERS, with `0` meaning unlimited —
51
- * `Adw.EntryRow:max-length` is documented as "Maximum number of characters for
52
- * the entry" and both its default and its range floor are `0`
53
- * (adw-entry-row.c:674 + :678-682).
54
- *
55
- * Split out of {@link EntryRowState} so a renderer can also apply it on an
56
- * IME/paste path before the state sees the value.
44
+ * `Adw.EntryRow:max-length` is "Maximum number of characters for the entry" and both its
45
+ * default and its range floor are `0`. Split out of {@link EntryRowState} so a renderer can
46
+ * also apply it on an IME/paste path before the state sees the value.
57
47
  */
58
48
  export declare function clampEntryText(text: string, maxLength: number): string;
59
49
  /**
60
50
  * The complete render snapshot of an entry row: the five outputs of
61
- * `update_empty` (adw-entry-row.c:149-154), the animation endpoint it drives
62
- * (C:158-161), and the inputs a renderer echoes into CSS classes.
51
+ * `update_empty`, the animation endpoint it drives
52
+ *, and the inputs a renderer echoes into CSS classes.
63
53
  *
64
54
  * ONE object rather than per-flag notifications so a renderer applies the whole
65
55
  * derivation in a single pass and can never apply half of it.
@@ -69,28 +59,28 @@ export interface EntryRowRenderState {
69
59
  text: string;
70
60
  /** {@link entryTextLength} of {@link text} — `Adw.EntryRow:text-length`. */
71
61
  textLength: number;
72
- /** `empty && !(focused && editable) && !text_changed` — C:154. Drives the placeholder title. */
62
+ /** `empty && !(focused && editable) && !text_changed`. Drives the placeholder title. */
73
63
  empty: boolean;
74
- /** Whether the embedded entry has focus — C:181. Renderers mirror it as the `focused` state class (C:183-186). */
64
+ /** Whether the embedded entry has focus. Renderers mirror it as the `focused` state class. */
75
65
  editing: boolean;
76
66
  /** Whether the embedded entry accepts edits (`GtkEditable:editable`). */
77
67
  editable: boolean;
78
- /** The pending-apply latch — C:170-172. */
68
+ /** The pending-apply latch. */
79
69
  textChanged: boolean;
80
- /** `!text_changed && (!editing || !editable)` — C:149. */
70
+ /** `!text_changed && (!editing || !editable)`. */
81
71
  editIconVisible: boolean;
82
- /** `editable` — C:150. The pencil stays VISIBLE but goes insensitive on a read-only row. */
72
+ /** `editable`. The pencil stays VISIBLE but goes insensitive on a read-only row. */
83
73
  editIconSensitive: boolean;
84
- /** `editing && show_indicator` — C:151. */
74
+ /** `editing && show_indicator`. */
85
75
  indicatorVisible: boolean;
86
- /** `text_changed` — C:152. */
76
+ /** `text_changed`. */
87
77
  applyButtonVisible: boolean;
88
78
  /**
89
- * Where the empty↔filled transition is headed: `0` while {@link empty}, `1`
90
- * otherwise — C:160-161. The renderer animates its OWN progress toward this
91
- * over {@link EMPTY_ANIMATION_DURATION_MS}, starting from wherever the
92
- * progress currently is (C:158-159 sets `value_from` to the live value), so
93
- * an interrupted transition resumes instead of restarting.
79
+ * Where the empty↔filled transition is headed: `0` while {@link empty}, `1` otherwise.
80
+ * The renderer animates its OWN progress toward this over
81
+ * {@link EMPTY_ANIMATION_DURATION_MS}, starting from wherever the progress currently is
82
+ * — the C sets `value_from` to the live value — so an interrupted transition resumes
83
+ * instead of restarting.
94
84
  */
95
85
  emptyTarget: 0 | 1;
96
86
  }
@@ -101,11 +91,9 @@ export interface EntryRowRenderState {
101
91
  */
102
92
  export type EntryRowStateListener = (state: EntryRowRenderState) => void;
103
93
  /**
104
- * What <kbd>Enter</kbd> resolves to. A discriminated union because
105
- * `text_activated_cb` (adw-entry-row.c:243-266) emits exactly ONE of the two
106
- * signals, never both; `activateDefault` carries the ordering requirement that
107
- * the default widget is activated BEFORE `entry-activated` is emitted (the
108
- * `gtk_widget_activate_default` call is C:254, the `g_signal_emit` is C:256).
94
+ * What <kbd>Enter</kbd> resolves to. A discriminated union because `text_activated_cb`
95
+ * emits exactly ONE of the two signals, never both; `activateDefault` carries the ordering
96
+ * requirement that the default widget is activated BEFORE `entry-activated` is emitted.
109
97
  */
110
98
  export type EntryRowActivation = {
111
99
  signal: 'apply';
@@ -119,11 +107,10 @@ export type EntryRowActivation = {
119
107
  * max-length truncation, and the two-way <kbd>Enter</kbd> dispatch.
120
108
  *
121
109
  * The setter guards are NOT uniform, and that is faithful rather than sloppy:
122
- * {@link setShowApplyButton} early-outs on an unchanged value and retracts a
123
- * pending latch when turned off (C:982-995), while {@link setShowIndicator}
124
- * deliberately has NO equality guard and always re-derives (C:1281-1296) — it is
125
- * the private `adw-entry-row-private.h` hook the password row drives, not a
126
- * public property, which is why it returns `void`.
110
+ * {@link setShowApplyButton} early-outs on an unchanged value and retracts a pending latch
111
+ * when turned off, while {@link setShowIndicator} deliberately has NO equality guard and
112
+ * always re-derives — it is the private `adw-entry-row-private.h` hook the password row
113
+ * drives, not a public property, which is why it returns `void`.
127
114
  */
128
115
  export declare class EntryRowState {
129
116
  private _text;
@@ -144,37 +131,35 @@ export declare class EntryRowState {
144
131
  /** The entry contents. */
145
132
  get text(): string;
146
133
  /**
147
- * Set the contents (truncated to {@link maxLength}) and run the latch +
148
- * derivation, exactly as the buffer's `changed` signal does — C:166-174.
149
- *
150
- * Idempotent on an identical value. GTK routes this through GtkEntryBuffer,
151
- * whose emission for a same-value set is a GtkText internal this checkout
152
- * has no source for (`refs/gtk` is empty), so the headless contract is the
153
- * house convention — and it is what a renderer's `input`/`textChange` event
154
- * produces anyway, since neither platform fires one without a real edit.
134
+ * Set the contents (truncated to {@link maxLength}) and run the latch + derivation,
135
+ * exactly as the buffer's `changed` signal does. Returns whether the text changed.
155
136
  *
156
- * Returns whether the text changed.
137
+ * Idempotent on an identical value. GTK routes this through GtkEntryBuffer, whose
138
+ * emission for a same-value set is a GtkText internal this checkout has no source for
139
+ * (`refs/gtk` is empty), so the headless contract is the house convention — and it is
140
+ * what a renderer's `input`/`textChange` event produces anyway, since neither platform
141
+ * fires one without a real edit.
157
142
  */
158
143
  setText(text: string): boolean;
159
- /** `text_changed_cb` — latch iff the apply button is armed AND we are editing (C:170-171), then re-derive (C:173). */
144
+ /** `text_changed_cb` — latch iff the apply button is armed AND we are editing, then re-derive. */
160
145
  private _latchAndUpdate;
161
- /** {@link entryTextLength} of the contents — `Adw.EntryRow:text-length` (C:1308-1318). */
146
+ /** {@link entryTextLength} of the contents — `Adw.EntryRow:text-length`. */
162
147
  get textLength(): number;
163
- /** Maximum number of CHARACTERS, `0` = unlimited (C:674, :678-682). */
148
+ /** Maximum number of CHARACTERS, `0` = unlimited. */
164
149
  get maxLength(): number;
165
150
  /**
166
- * Set the maximum length, clamped into `[0, ENTRY_ROW_MAX_LENGTH_LIMIT]`
167
- * (C:678-682). Over-long contents are truncated immediately, which runs the
168
- * same latch + derivation a buffer edit does.
151
+ * Set the maximum length, clamped into `[0, ENTRY_ROW_MAX_LENGTH_LIMIT]`. Over-long
152
+ * contents are truncated immediately, which runs the same latch + derivation a buffer
153
+ * edit does.
169
154
  *
170
- * Returns whether the property changed. Upstream emits NO `notify` here
171
- * (there is no `g_object_notify_by_pspec` in C:1329-1343) — pinned by a
172
- * vector so a port does not "helpfully" add one.
155
+ * Returns whether the property changed. Upstream emits NO `notify` here — its setter has
156
+ * no `g_object_notify_by_pspec` at all — and a vector pins that so a port does not
157
+ * "helpfully" add one.
173
158
  */
174
159
  setMaxLength(maxLength: number): boolean;
175
- /** Whether the embedded entry has focus — `priv->editing` (C:181). */
160
+ /** Whether the embedded entry has focus — `priv->editing`. */
176
161
  get editing(): boolean;
177
- /** Feed the focus state in and re-derive — `text_state_flags_changed_cb` (C:176-189). Returns whether it changed. */
162
+ /** Feed the focus state in and re-derive — `text_state_flags_changed_cb`. Returns whether it changed. */
178
163
  setEditing(editing: boolean): boolean;
179
164
  /** Whether the embedded entry accepts edits (`GtkEditable:editable`). */
180
165
  get editable(): boolean;
@@ -183,9 +168,8 @@ export declare class EntryRowState {
183
168
  /** Whether typing reveals an apply button — `Adw.EntryRow:show-apply-button`. */
184
169
  get showApplyButton(): boolean;
185
170
  /**
186
- * Arm/disarm the apply button (C:982-995). Turning it OFF retracts a pending
187
- * apply (C:989-992); turning it ON changes no derived output, which is why
188
- * the C re-derives only in the retract branch.
171
+ * Arm/disarm the apply button. Turning it OFF retracts a pending apply; turning it ON
172
+ * changes no derived output, which is why the C re-derives only in the retract branch.
189
173
  *
190
174
  * Returns whether the property changed — the caller's cue to re-emit
191
175
  * `notify::show-apply-button`.
@@ -193,65 +177,56 @@ export declare class EntryRowState {
193
177
  setShowApplyButton(show: boolean): boolean;
194
178
  /**
195
179
  * The private indicator hook — `adw_entry_row_set_show_indicator`
196
- * (adw-entry-row-private.h, C:1281-1296). `void` and UNGUARDED on purpose:
197
- * the C assigns and calls `update_empty` unconditionally, with no equality
198
- * check, so a redundant call still re-derives and still notifies.
199
- *
200
- * `Adw.PasswordEntryRow` is the only caller upstream; a renderer reaches it
201
- * through {@link PasswordEntryRowState}.
180
+ * (adw-entry-row-private.h). `void` and UNGUARDED on purpose: the C assigns and calls
181
+ * `update_empty` unconditionally, with no equality check, so a redundant call still
182
+ * re-derives and still notifies. `Adw.PasswordEntryRow` is the only caller upstream; a
183
+ * renderer reaches it through {@link PasswordEntryRowState}.
202
184
  */
203
185
  setShowIndicator(show: boolean): void;
204
186
  /** Whether <kbd>Enter</kbd> may activate the default widget — `Adw.EntryRow:activates-default`. */
205
187
  get activatesDefault(): boolean;
206
188
  /**
207
- * Set `activates-default` (C:1238-1253). Returns whether it changed — the
208
- * caller's cue to re-emit `notify::activates-default`.
209
- *
210
- * The C compares the raw `gboolean` because GValue already normalised it;
211
- * a JS caller has no such guarantee, so coerce first.
189
+ * Set `activates-default`. Returns whether it changed — the caller's cue to re-emit
190
+ * `notify::activates-default`. The C compares the raw `gboolean` because GValue already
191
+ * normalised it; a JS caller has no such guarantee, so coerce first.
212
192
  */
213
193
  setActivatesDefault(value: boolean): boolean;
214
- /** The pending-apply latch (C:170-172) — `true` while the apply button is showing. */
194
+ /** The pending-apply latch — `true` while the apply button is showing. */
215
195
  get textChanged(): boolean;
216
196
  /**
217
- * Clear the latch and re-derive — `apply_button_clicked_cb` (C:237-238). The
218
- * renderer emits `apply` right after (C:240); focus handling (C:234-235) is
197
+ * Clear the latch and re-derive — `apply_button_clicked_cb`. The
198
+ * renderer emits `apply` right after; focus handling is
219
199
  * a platform concern and stays there.
220
200
  */
221
201
  apply(): void;
222
202
  /**
223
- * <kbd>Enter</kbd> — `text_activated_cb` (C:243-266). Dispatches to the
224
- * apply path when the apply button is showing (C:248-249), otherwise reports
225
- * `entry-activated` plus whether the default widget must be activated FIRST
226
- * (C:253-256).
227
- *
228
- * The `GtkActionable` action fired afterwards (C:258-264) has no headless
203
+ * <kbd>Enter</kbd> — `text_activated_cb`. Dispatches to the apply path when the apply
204
+ * button is showing, otherwise reports `entry-activated` plus whether the default widget
205
+ * must be activated FIRST. The `GtkActionable` action fired afterwards has no headless
229
206
  * equivalent and stays with the renderer.
230
207
  */
231
208
  activate(): EntryRowActivation;
232
209
  }
233
210
  /**
234
211
  * The render snapshot of a password entry row: `notify_visibility_cb`'s icon +
235
- * tooltip pair (adw-password-entry-row.c:62-81) plus the caps-lock inputs, as
212
+ * tooltip pair plus the caps-lock inputs, as
236
213
  * data.
237
214
  *
238
- * The icon names and English strings are the literals from the C source, so the
239
- * two renderers stop inventing their own spellings (`revealed` vs `peeking`,
240
- * `view-reveal` vs `viewRevealSymbolic`) and a renderer can map ONE canonical
241
- * name onto whatever asset it actually ships.
215
+ * The icon names and English strings are the literals from the C source, so a renderer maps
216
+ * ONE canonical name onto whatever asset it actually ships instead of inventing a spelling.
242
217
  */
243
218
  export interface PasswordEntryRowRenderState {
244
219
  /** Whether the contents are shown in clear text (`GtkText:visibility`). */
245
220
  revealed: boolean;
246
221
  /** Whether the keyboard reports Caps Lock engaged (`gdk_device_get_caps_lock_state`). */
247
222
  capsLockOn: boolean;
248
- /** Icon the peek button shows — C:68,73. */
223
+ /** Icon the peek button shows. */
249
224
  peekIconName: typeof PASSWORD_REVEAL_ICON_NAME | typeof PASSWORD_CONCEAL_ICON_NAME;
250
- /** Tooltip/accessible label of the peek button — C:71,76. */
225
+ /** Tooltip/accessible label of the peek button. */
251
226
  peekLabel: typeof PASSWORD_REVEAL_LABEL | typeof PASSWORD_CONCEAL_LABEL;
252
- /** Icon of the caps-lock indicator — C:169. Constant, exposed so a renderer reads one object. */
227
+ /** Icon of the caps-lock indicator. Constant, exposed so a renderer reads one object. */
253
228
  indicatorIconName: typeof CAPS_LOCK_ICON_NAME;
254
- /** Tooltip of the caps-lock indicator — C:171. */
229
+ /** Tooltip of the caps-lock indicator. */
255
230
  indicatorTooltip: typeof CAPS_LOCK_TOOLTIP;
256
231
  }
257
232
  /** Per-instance subscriber for {@link PasswordEntryRowState}. */
@@ -265,12 +240,11 @@ export type PasswordEntryRowStateListener = (state: PasswordEntryRowRenderState)
265
240
  * `adw_entry_row_set_show_indicator` hook, not a protected field. Composition
266
241
  * also keeps `EntryRowState` usable on its own for a plain entry row.
267
242
  *
268
- * Every reveal/caps-lock change recomputes `!revealed && capsLockOn` and pushes
269
- * it into the entry (C:57-59) — which is why peeking makes the caps-lock warning
270
- * disappear. The second suppression is the entry's own (`editing && show_indicator`,
271
- * C:151): the warning only shows while the entry has focus. Focus changes
272
- * therefore need no push from here — they re-derive on the entry side, which is
273
- * what `notify_has_focus_cb` (C:83-88) achieves by re-running `update_caps_lock`.
243
+ * Every reveal/caps-lock change recomputes `!revealed && capsLockOn` and pushes it into the
244
+ * entry — which is why peeking makes the caps-lock warning disappear. The second suppression
245
+ * is the entry's own (`editing && show_indicator`): the warning only shows while the entry
246
+ * has focus, so focus changes need no push from here — they re-derive on the entry side,
247
+ * which is what `notify_has_focus_cb` achieves by re-running `update_caps_lock`.
274
248
  */
275
249
  export declare class PasswordEntryRowState {
276
250
  private readonly _entry;
@@ -281,28 +255,25 @@ export declare class PasswordEntryRowState {
281
255
  /** Subscribe to peek/caps-lock changes. Returns an unsubscribe function. */
282
256
  subscribe(listener: PasswordEntryRowStateListener): () => void;
283
257
  private _emit;
284
- /** The current render snapshot — `notify_visibility_cb`'s derivation (C:62-81). */
258
+ /** The current render snapshot — `notify_visibility_cb`'s derivation. */
285
259
  get state(): PasswordEntryRowRenderState;
286
260
  /** Whether the contents are shown in clear text. */
287
261
  get revealed(): boolean;
288
262
  /**
289
- * Set the peek state. Early-outs on an unchanged value — every settable
290
- * property in this family does (C:984, :1198, :1247), which is why the web
291
- * port's unguarded `notify::revealed` on a redundant `setAttribute` is a
292
- * defect and not a style choice.
293
- *
294
- * Returns whether it changed.
263
+ * Set the peek state. Early-outs on an unchanged value — every settable property in this
264
+ * family does, so an unguarded `notify::revealed` on a redundant `setAttribute` is a
265
+ * defect, not a style choice. Returns whether it changed.
295
266
  */
296
267
  setRevealed(revealed: boolean): boolean;
297
- /** Flip masked↔revealed — `show_text_clicked_cb` (C:94-96). Returns whether it changed. */
268
+ /** Flip masked↔revealed — `show_text_clicked_cb`. Returns whether it changed. */
298
269
  togglePeek(): boolean;
299
270
  /** Whether Caps Lock is engaged. */
300
271
  get capsLockOn(): boolean;
301
272
  /**
302
273
  * Feed the keyboard's caps-lock state in — the `notify::caps-lock-state`
303
- * handler (C:111-115). Returns whether it changed.
274
+ * handler. Returns whether it changed.
304
275
  */
305
276
  setCapsLockOn(on: boolean): boolean;
306
- /** `update_caps_lock` — C:57-59. */
277
+ /** `update_caps_lock`. */
307
278
  private _pushIndicator;
308
279
  }
@@ -2,48 +2,40 @@
2
2
  * GLib's `g_strstrip` — trim ASCII whitespace from both ends, and ONLY ASCII
3
3
  * whitespace.
4
4
  *
5
- * NOT `String.prototype.trim()`, which also eats U+00A0 NBSP, U+FEFF and the
6
- * Unicode space separators. Two widgets already depend on the difference:
7
- * `Adw.Avatar` derives its initials from the stripped name, so a name that
8
- * starts with U+00A0 keeps the NBSP as its initial in GTK, where a
9
- * `trim()`-based port yields the first LETTER instead; and
10
- * `Adw.AboutDialog`'s `parse_person` (adw-about-dialog.c:533) strips the credit
11
- * name the same way, so an NBSP-padded contributor name keeps its padding.
5
+ * NOT `String.prototype.trim()`, which also eats U+00A0 NBSP, U+FEFF and the Unicode
6
+ * space separators. Two widgets depend on the difference: `Adw.Avatar` derives its
7
+ * initials from the stripped name, so a name starting with U+00A0 keeps the NBSP as its
8
+ * initial in GTK where a `trim()`-based port yields the first LETTER; and
9
+ * `Adw.AboutDialog`'s `parse_person` strips credit names the same way.
12
10
  */
13
11
  export declare function gStrStrip(value: string): string;
14
12
  /**
15
- * libadwaita's `string_is_not_empty` template closure — the predicate EVERY
13
+ * libadwaita's `string_is_not_empty` template closure — the predicate every
16
14
  * Adwaita label binds its `visible` property to.
17
15
  *
18
- * `return string && string[0];` — verbatim in six widgets that each declare
19
- * their own private copy (`adw-action-row.c:112-117`, `adw-button-row.c:92-97`,
20
- * `adw-sidebar.c`, `adw-shortcut-row.c`, `adw-status-page.c`,
21
- * `adw-toast-widget.c`), bound from the matching `.ui`
22
- * (`adw-action-row.ui:49-53` for the title, `:71-75` for the subtitle).
16
+ * `return string && string[0];` — declared privately, verbatim, in six widgets
17
+ * (`adw-action-row.c`, `adw-button-row.c`, `adw-sidebar.c`, `adw-shortcut-row.c`,
18
+ * `adw-status-page.c`, `adw-toast-widget.c`) and bound from the matching `.ui`.
23
19
  *
24
- * Two properties of it are load-bearing and are what a hand-rolled copy gets
25
- * wrong: only the EXACT empty string (and NULL) is false — one space is a
26
- * visible label, because the C never trims — and the rule applies to the TITLE
27
- * as much as to the subtitle. Every port so far hid an empty subtitle and left
28
- * an empty title occupying a line.
20
+ * Two traps: only the EXACT empty string (and NULL) is false — one space is a visible
21
+ * label, because the C never trims — and the rule governs the TITLE as much as the
22
+ * subtitle.
29
23
  */
30
24
  export declare function stringIsNotEmpty(value: string | null | undefined): boolean;
31
25
  /**
32
26
  * GLib's `CLAMP`, which tests the HIGH bound FIRST:
33
27
  * `x > high ? high : (x < low ? low : x)`.
34
28
  *
35
- * NOT interchangeable with `Math.min(high, Math.max(low, x))` — the two disagree
36
- * whenever the bounds are inverted, and Adwaita reaches inverted bounds for
37
- * real: a split view's sidebar caps invert whenever the content minimum exceeds
38
- * what is left of the width.
29
+ * NOT interchangeable with `Math.min(high, Math.max(low, x))` — the two disagree on
30
+ * inverted bounds, which Adwaita reaches for real: a split view's sidebar caps invert
31
+ * whenever the content minimum exceeds what is left of the width.
39
32
  */
40
33
  export declare function glibClamp(x: number, low: number, high: number): number;
41
34
  /**
42
35
  * Drop GTK mnemonic markers from a label (`gtk_label_new_with_mnemonic`).
43
36
  *
44
37
  * A single `_` marks the character after it and is itself removed; `__` is an
45
- * escaped literal underscore. A renderer with no accelerator layer wants the
46
- * plain text, which is what this returns — GTK would underline the marked
47
- * character instead.
38
+ * escaped literal underscore. GTK underlines the marked character; a renderer with
39
+ * no accelerator layer wants this plain text instead.
48
40
  */
49
41
  export declare function stripMnemonic(text: string): string;
@@ -12,6 +12,8 @@ export { RadioGroupState, resolveCheckState } from './checks.js';
12
12
  export type { AdwCheckState, RadioGroupChange, RadioGroupListener } from './checks.js';
13
13
  export { AdwBreakpoint, evaluateBreakpointCondition, parseBreakpointCondition } from './breakpoint.js';
14
14
  export type { AdwBreakpointHandlers, BreakpointBound, BreakpointConditionGroup, BreakpointConditionLeaf, BreakpointConditionNode, BreakpointDimension, BreakpointSize, } from './breakpoint.js';
15
+ export { ADW_ACCENT_BG_COLORS, ADW_ACCENT_COLOR_NAMES, ADW_DEFAULT_ACCENT_COLOR, adwaitaAccent, adwaitaAccentBgColor, adwaitaAccentColor, adwaitaStandaloneColor, isAdwAccentColorName, onAdwaitaAccentChanged, setAdwaitaAccent, } from './accent.js';
16
+ export type { AdwAccentColorName } from './accent.js';
15
17
  export { DEFAULT_ICON_COLOR, DEFAULT_ICON_COLOR_DARK, adwaitaColorScheme, isThemeIconColor, onAdwaitaColorSchemeChanged, setAdwaitaColorScheme, themeIconColor, toggleAdwaitaColorScheme, } from './color-scheme.js';
16
18
  export type { AdwColorScheme } from './color-scheme.js';
17
19
  export { ADW_DATA_GRID_ROW_VARIANTS, DATA_GRID_CELL_CLASS, DATA_GRID_ROW_CLASS, dataGridCellText, dataGridColumnAlign, dataGridColumnClasses, dataGridRowInteractive, dataGridTrackTemplate, dataGridTracks, normalizeDataGridColumns, normalizeDataGridVariant, } from './data-grid.js';
@@ -34,6 +36,8 @@ export type { EntryRowActivation, EntryRowRenderState, EntryRowStateListener, Pa
34
36
  export { adwLerp, easeInOutSine, easeOutCubic, inverseLerp } from './easing.js';
35
37
  export { ADW_SPINNER_CYCLES_PER_LOOP, ADW_SPINNER_CYCLE_LENGTH, ADW_SPINNER_CONTRACT_DISTANCE, ADW_SPINNER_EXTEND_DISTANCE, ADW_SPINNER_IDLE_DISTANCE, ADW_SPINNER_MAX_ARC_LENGTH, ADW_SPINNER_MIN_ARC_LENGTH, ADW_SPINNER_N_CYCLES, ADW_SPINNER_OVERLAP_DISTANCE, ADW_SPINNER_SPIN_DURATION_MS, ADW_SPINNER_START_ANGLE, ADW_SPINNER_STILL_PROGRESS, ADW_SPINNER_TRACK_OPACITY, normalizeSpinnerAngle, spinnerArc, spinnerArcEnd, spinnerArcStart, spinnerProgressAt, } from './spinner.js';
36
38
  export type { SpinnerArc } from './spinner.js';
39
+ export { parseAccelerator, parseShortcutLabel, shortcutKeycaps } from './shortcut-label.js';
40
+ export type { ShortcutKeycap, ShortcutLabelNode, ShortcutLabelOptions, ShortcutLabelParse } from './shortcut-label.js';
37
41
  export { ADW_LENGTH_UNITS, DEFAULT_DPI, adwLengthToPx, normalizeLengthUnit } from './length-unit.js';
38
42
  export type { AdwLengthUnit } from './length-unit.js';
39
43
  export { ADW_SWIPE_BORDER, DEFAULT_MAX_SIDEBAR_WIDTH, DEFAULT_MIN_SIDEBAR_WIDTH, DEFAULT_SIDEBAR_WIDTH_FRACTION, DEFAULT_SIDEBAR_WIDTH_UNIT, INSTANT_SPLIT_VIEW_ANIMATOR, NAVIGATION_SPLIT_VIEW_CRITICALS, NavigationSplitViewState, OverlaySplitViewState, isSidebarAtVisualStart, layoutNavigationSplitView, layoutOverlaySplitView, measureSplitViewHorizontal, resolveNaturalSidebarWidth, resolveNavigationAction, resolveNavigationSidebarWidth, resolveNavigationStack, resolveOverlaySidebarWidth, resolveSidebarBounds, resolveSwipeArea, resolveSwipeRelease, resolveSwipeSnapPoints, resolveSwipeStart, swipeCancelProgress, tagsConflict, } from './split-view.js';
@@ -5,20 +5,15 @@ export declare const ADW_LENGTH_UNITS: readonly AdwLengthUnit[];
5
5
  /** The dpi `adw_length_unit_to_px` falls back to when `gtk-xft-dpi` is unset. */
6
6
  export declare const DEFAULT_DPI = 96;
7
7
  /**
8
- * `adw_length_unit_to_px` (adw-length-unit.c:57-82) — convert `value` to pixels.
9
- *
10
- * `pt` and `sp` both scale with the text-scale factor, which GTK reads from
11
- * `gtk-xft-dpi`; a renderer that has no such setting passes the default 96, where
12
- * `sp` is a pixel passthrough and `pt` is the familiar 4/3 ratio.
8
+ * `adw_length_unit_to_px` — convert `value` to pixels. `pt` and `sp` both scale with the
9
+ * text-scale factor, which GTK reads from `gtk-xft-dpi`; a renderer with no such setting
10
+ * passes the default 96, where `sp` is a pixel passthrough and `pt` the 4/3 ratio.
13
11
  */
14
12
  export declare function adwLengthToPx(unit: AdwLengthUnit, value: number, dpi?: number): number;
15
13
  /**
16
- * An authored unit → the enum value, or the caller's default.
17
- *
18
- * A GObject enum property REJECTS an out-of-range value and keeps what it had;
19
- * a renderer reading an HTML attribute or an XML layout has no such gate, so the
20
- * unusable value has to land somewhere deliberate. `fallback` is the property's
21
- * own default, which differs between the widgets that use this vocabulary — the
22
- * split views default to `sp`, the wrap box to `px`.
14
+ * An authored unit → the enum value, or the caller's default. A GObject enum property
15
+ * rejects an out-of-range value and keeps what it had; a renderer reading an HTML
16
+ * attribute or an XML layout has no such gate, so `fallback` is the property's own
17
+ * default — `sp` for the split views, `px` for the wrap box.
23
18
  */
24
19
  export declare function normalizeLengthUnit(value: unknown, fallback: AdwLengthUnit): AdwLengthUnit;