@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,25 +1,17 @@
1
1
  /**
2
- * The three states a check or radio can be in.
3
- *
4
- * `indeterminate` is not "checked plus a flag": it paints its own glyph, and it
5
- * maps to a distinct a11y value (`aria-checked="mixed"`), so a renderer that
6
- * models the pair as two booleans has to re-derive the precedence every time it
7
- * needs to answer "what does this look like / sound like right now".
2
+ * The three states a check or radio can be in. `indeterminate` paints its own
3
+ * glyph and maps to `aria-checked="mixed"`, so it is a state and not a flag.
8
4
  */
9
5
  export type AdwCheckState = 'unchecked' | 'checked' | 'indeterminate';
10
6
  /**
11
7
  * Collapse the `checked` / `indeterminate` pair into the one state that paints.
12
- *
13
- * Indeterminate WINS, including over checked — see the module header for the
14
- * cascade reading that settles it (_checks.scss:79-81 re-declares the glyph
15
- * after both `:checked` rules, at equal specificity).
8
+ * Indeterminate wins over checked — _checks.scss re-declares the glyph
9
+ * after both `:checked` rules, at equal specificity.
16
10
  */
17
11
  export declare function resolveCheckState(checked: boolean, indeterminate: boolean): AdwCheckState;
18
12
  /** Payload of a {@link RadioGroupState} change — both halves of one exclusive move. */
19
13
  export interface RadioGroupChange {
20
- /** The group the move happened in. */
21
14
  name: string;
22
- /** The value that is now selected. */
23
15
  selected: string;
24
16
  /** The value that just lost the selection, or `null` when the group was empty. */
25
17
  deselected: string | null;
@@ -29,22 +21,14 @@ export type RadioGroupListener = (change: RadioGroupChange) => void;
29
21
  /**
30
22
  * Which value is selected in each named radio group.
31
23
  *
32
- * ONE registry over MANY groups, keyed by name, because that is the shape the
33
- * renderers need: a radio knows its own group NAME, not its siblings, exactly as
34
- * `<input type="radio" name="…">` does. Two independent groups therefore need
35
- * two names — the registry is as global as its host (one instance per document
36
- * in `@gjsify/adwaita-web`).
37
- *
38
- * {@link select} notifies ONCE per move, carrying the value that gained the
39
- * selection and the one that lost it, so a renderer repaints both members off a
40
- * single event. Re-selecting the value already held is a no-op and notifies
41
- * nothing — a user clicking a checked radio twice must not produce a second
42
- * event, and must never end up with nothing selected (HTML radios cannot be
43
- * unchecked by clicking either).
24
+ * One registry over many groups keyed by name, because a radio knows its own group NAME
25
+ * and not its siblings, exactly as `<input type="radio" name="…">` does. As global as
26
+ * its host — one instance per document in `@gjsify/adwaita-web`.
44
27
  *
45
- * A group nobody has picked in reports `null`. Whether GTK instead activates the
46
- * first member of a group is NOT verifiable here (see the module header), so
47
- * this reports the state it actually has rather than inventing a default.
28
+ * {@link select} notifies once per move carrying both halves, so a renderer repaints the
29
+ * loser too. Re-selecting the held value is a no-op: clicking a checked radio twice must
30
+ * not fire twice, and must never leave the group empty (HTML radios cannot be unchecked
31
+ * by clicking).
48
32
  */
49
33
  export declare class RadioGroupState {
50
34
  private readonly _selected;
@@ -55,9 +39,8 @@ export declare class RadioGroupState {
55
39
  /** The value selected in `name`, or `null` when nothing is selected there. */
56
40
  selected(name: string): string | null;
57
41
  /**
58
- * Select `value` in group `name`, deselecting whatever was selected there.
59
- *
60
- * Returns whether the selection actually moved; a no-op notifies nothing.
42
+ * Select `value` in group `name`, deselecting whatever was selected there. Returns
43
+ * whether the selection actually moved; a no-op notifies nothing.
61
44
  */
62
45
  select(name: string, value: string): boolean;
63
46
  }
@@ -1,11 +1,10 @@
1
1
  /**
2
- * The inputs every clamp computation needs: the two properties plus the child's
3
- * measured minimum and natural size in the clamp's own orientation.
2
+ * The inputs every clamp computation needs: the two properties plus the child's measured
3
+ * minimum and natural size in the clamp's own orientation.
4
4
  *
5
- * Sizes are already-resolved PIXELS. `AdwClampLayout:unit` (default `sp`) scales
6
- * them against the GTK text-scale factor, which is a platform capability rather
7
- * than headless logic — a renderer that has one runs `adwLengthToPx` (exported
8
- * from `./split-view.js`) before calling in.
5
+ * Sizes are already-resolved PIXELS. `AdwClampLayout:unit` (default `sp`) scales them
6
+ * against the GTK text-scale factor, a platform capability rather than headless logic — a
7
+ * renderer that has one runs `adwLengthToPx` (from `./length-unit.js`) before calling in.
9
8
  */
10
9
  export interface ClampParams {
11
10
  /** `maximum-size` — how wide the child may get. Default 600. */
@@ -17,7 +16,7 @@ export interface ClampParams {
17
16
  /** The child's measured natural size in the clamped orientation. */
18
17
  childNat: number;
19
18
  }
20
- /** The libadwaita property defaults (adw-clamp-layout.c:414, :438, :462-464). */
19
+ /** The libadwaita property defaults. */
21
20
  export declare const ADW_CLAMP_DEFAULTS: {
22
21
  readonly maximumSize: number;
23
22
  readonly tighteningThreshold: number;
@@ -32,46 +31,34 @@ export interface ClampThresholds {
32
31
  upper: number;
33
32
  }
34
33
  /**
35
- * `lower`/`max`/`upper` (adw-clamp-layout.c:173-176, :210-213).
36
- *
37
- * Exported because both the measure and the allocate path need them, and
38
- * because the two cases the renderers got wrong live entirely in these three
39
- * lines: a threshold ABOVE the maximum collapses the tightening region
40
- * (`lower === max === upper`), and a child whose own minimum exceeds the maximum
41
- * raises all three to that minimum — which is how `maximum-size="0"` means "give
42
- * the child its minimum", not "give it nothing".
34
+ * `lower`/`max`/`upper`. Exported because both the measure and the allocate path need
35
+ * them, and because the two easily-missed cases live in these three lines: a threshold
36
+ * ABOVE the maximum collapses the tightening region (`lower === max === upper`), and a
37
+ * child whose own minimum exceeds the maximum raises all three to that minimum — which
38
+ * is how `maximum-size="0"` means "give the child its minimum", not "give it nothing".
43
39
  */
44
40
  export declare function clampThresholds(params: ClampParams): ClampThresholds;
45
41
  /**
46
- * `child_size_from_clamp` (adw-clamp-layout.c:193-232) — how much of `forSize`
47
- * the child is allocated.
48
- *
49
- * The result is never larger than `forSize`, which is the whole point and what
50
- * `view.width = maximumSize` in the NativeScript port broke: below `lower` the
51
- * child gets EXACTLY the available size, so a narrow phone gets a narrow child.
52
- * The cap only bites from `upper` upward; between the two the size is eased so
53
- * the transition into the cap is smooth rather than a corner.
42
+ * `child_size_from_clamp` — how much of `forSize` the child is allocated. The result is
43
+ * never larger than `forSize`: below `lower` the child gets EXACTLY the available size,
44
+ * so a narrow phone gets a narrow child. The cap only bites from `upper` upward;
45
+ * between the two the size is eased so the transition into it is smooth.
54
46
  */
55
47
  export declare function clampChildSize(forSize: number, params: ClampParams): number;
56
48
  /**
57
- * `clamp_size_from_child` (adw-clamp-layout.c:156-191) — the INVERSE, used while
58
- * measuring: how much space the clamp itself must report for the child to end up
59
- * at `childSize`.
60
- *
61
- * The inverse of `ease_out_cubic` is `1 + cbrt(t - 1)`, and the rounding goes the
62
- * OTHER way from {@link clampChildSize} (`ceil`, not `floor`) so the reported
63
- * request never lands a pixel short of what the child asked for.
49
+ * `clamp_size_from_child` — the INVERSE, used while measuring: how much space the clamp
50
+ * must report for the child to end up at `childSize`. The inverse of `ease_out_cubic` is
51
+ * `1 + cbrt(t - 1)`, and the rounding goes the OTHER way from {@link clampChildSize}
52
+ * (`ceil`, not `floor`) so the reported request never lands a pixel short.
64
53
  */
65
54
  export declare function clampSizeFromChild(childSize: number, params: ClampParams): number;
66
55
  /** Which of the three size classes `adw_clamp_layout_allocate` stamps on the child. */
67
56
  export type AdwClampSizeClass = 'small' | 'medium' | 'large';
68
57
  /**
69
- * All three size classes, so a renderer can CLEAR the ones that no longer apply.
70
- *
71
- * `adw_clamp_layout_allocate` removes the other two on every pass and removes
72
- * all three from a child it stops laying out (adw-clamp-layout.c:333-336), so
73
- * "which classes does the clamp own" is part of the contract, not a detail each
74
- * renderer gets to restate.
58
+ * All three size classes, so a renderer can CLEAR the ones that no longer apply:
59
+ * `adw_clamp_layout_allocate` removes the other two on every pass and all three from a
60
+ * child it stops laying out, so "which classes does the clamp own" is part of the
61
+ * contract.
75
62
  */
76
63
  export declare const ADW_CLAMP_SIZE_CLASSES: ReadonlyArray<AdwClampSizeClass>;
77
64
  /** Everything one clamp allocation decides. */
@@ -88,34 +75,26 @@ export interface ClampAllocation {
88
75
  offset: number;
89
76
  }
90
77
  /**
91
- * `adw_clamp_layout_allocate` (adw-clamp-layout.c:317-386) — child size, the
92
- * style class the child carries, and the centring offset, in one call.
93
- *
94
- * The class boundaries are INCLUSIVE at both ends and are compared against the
95
- * CEILED thresholds, not the raw doubles; the offset is C integer division, so
96
- * it truncates rather than rounds.
78
+ * `adw_clamp_layout_allocate` — child size, the style class the child carries and the
79
+ * centring offset, in one call. The class boundaries are INCLUSIVE at both ends and are
80
+ * compared against the CEILED thresholds, not the raw doubles; the offset is C integer
81
+ * division, so it truncates rather than rounds.
97
82
  */
98
83
  export declare function clampAllocate(availableSize: number, params: ClampParams): ClampAllocation;
99
84
  /**
100
- * Normalise a `maximum-size` / `tightening-threshold` coming from an attribute
101
- * or a property assignment into the `g_param_spec_int (…, 0, G_MAXINT, …)` range
102
- * both properties declare (adw-clamp-layout.c:413-416, :448-451).
103
- *
104
- * Three inputs used to produce three different results across the three
105
- * implementations, and this is the one answer for all of them:
106
- * - `0` is IN RANGE and means "clamp the child to its own minimum". The web
107
- * port's `attr || '600'` never fired for the string `"0"` and produced
108
- * `max-width: 0`; the NS port's `value > 0` guard silently substituted 600.
109
- * - a value GObject would refuse (`NaN`, a non-numeric attribute) never
110
- * reaches the layout, so the property keeps its DEFAULT. The web port
111
- * assigned `NaNpx`, which the CSSOM drops — leaving whatever cap was set
112
- * before silently in force.
113
- * - a negative is out of range and clamps to the range floor, 0.
85
+ * Normalise a `maximum-size` / `tightening-threshold` from an attribute or a property
86
+ * assignment into the `g_param_spec_int (…, 0, G_MAXINT, …)` range both properties
87
+ * declare:
88
+ * - `0` is IN RANGE and means "clamp the child to its own minimum" — not "no width",
89
+ * and not a missing value to substitute the default for;
90
+ * - a value GObject would refuse (`NaN`, a non-numeric attribute) never reaches the
91
+ * layout, so the property keeps its DEFAULT;
92
+ * - a negative is out of range and clamps to the range floor, 0.
114
93
  */
115
94
  export declare function normalizeClampSize(value: number | string | null | undefined, fallback: number): number;
116
- /** `AdwToolbarStyle` (adw-toolbar-view.c:120-125). */
95
+ /** `AdwToolbarStyle`. */
117
96
  export type AdwToolbarStyle = 'flat' | 'raised' | 'raised-border';
118
- /** The toolbar-view property defaults (adw-toolbar-view.c:572, :608, :731-732). */
97
+ /** The toolbar-view property defaults. */
119
98
  export declare const ADW_TOOLBAR_VIEW_DEFAULTS: {
120
99
  readonly topBarStyle: AdwToolbarStyle;
121
100
  readonly bottomBarStyle: AdwToolbarStyle;
@@ -123,19 +102,15 @@ export declare const ADW_TOOLBAR_VIEW_DEFAULTS: {
123
102
  readonly extendContentToBottomEdge: boolean;
124
103
  };
125
104
  /**
126
- * Read an `AdwToolbarStyle` off an attribute or a property assignment.
127
- *
128
- * Anything outside the enum is the default: C rejects it outright
129
- * (`g_return_if_fail (style <= ADW_TOOLBAR_RAISED_BORDER)`,
130
- * adw-toolbar-view.c:1004) and leaves the property at whatever it was.
105
+ * Read an `AdwToolbarStyle` off an attribute or a property assignment. Anything outside
106
+ * the enum is the default: C rejects it outright
107
+ * (`g_return_if_fail (style <= ADW_TOOLBAR_RAISED_BORDER)`) and leaves the property as it
108
+ * was.
131
109
  */
132
110
  export declare function parseToolbarStyle(value: string | null | undefined): AdwToolbarStyle;
133
111
  /**
134
- * The style classes a bar box carries for `style`
135
- * (adw-toolbar-view.c:1011-1024, :1097-1110).
136
- *
137
- * `raised-border` is `raised` PLUS `border` — the border replaces the shadow in
138
- * the stylesheet, it does not replace the raised background.
112
+ * The style classes a bar box carries for `style`. `raised-border` is `raised` PLUS
113
+ * `border` — the border replaces the shadow in the stylesheet, not the raised background.
139
114
  */
140
115
  export declare function toolbarBarStyleClasses(style: AdwToolbarStyle): string[];
141
116
  /** Everything `update_undershoots` + the two style setters need to decide the classes. */
@@ -167,14 +142,13 @@ export interface ToolbarViewClasses {
167
142
  bottomBar: string[];
168
143
  }
169
144
  /**
170
- * `update_undershoots` (adw-toolbar-view.c:215-232) plus the two per-bar style
171
- * class setters, as one derivation.
145
+ * `update_undershoots` plus the two per-bar style class setters, as one derivation.
172
146
  *
173
- * An undershoot is the scroll-fade under a FLAT bar, so all three conditions
174
- * must hold: the bar is flat (a raised bar has its own shadow), the content does
175
- * NOT extend under it (there is nothing to fade), and the bar was actually
176
- * allocated a height (an absent bar fades nothing). The height being the
177
- * ALLOCATED one — not "is there a bar widget" — is why this reads a number.
147
+ * An undershoot is the scroll-fade under a FLAT bar, so all three conditions must hold:
148
+ * the bar is flat (a raised bar has its own shadow), the content does NOT extend under it
149
+ * (nothing to fade), and the bar was actually allocated a height (an absent bar fades
150
+ * nothing). That the height is the ALLOCATED one, not "is there a bar widget", is why
151
+ * this reads a number.
178
152
  */
179
153
  export declare function toolbarViewClasses(input: ToolbarViewClassInput): ToolbarViewClasses;
180
154
  /** The measured sizes one toolbar-view allocation consumes. */
@@ -208,20 +182,16 @@ export interface ToolbarViewAllocation {
208
182
  contentOffset: number;
209
183
  }
210
184
  /**
211
- * `adw_toolbar_view_size_allocate` (adw-toolbar-view.c:357-406) — the two chained
212
- * GLib CLAMPs that turn measured sizes into the three slot heights.
213
- *
214
- * Read it as: reserve the content's minimum and the bottom bar's minimum, hand
215
- * what is left to the top bar (clamped into its own min…nat), then repeat for the
216
- * bottom bar with the top bar's ACTUAL height. Two consequences a naive
217
- * "stack them" layout does not reproduce:
218
- * - a STRETCHY bar (`nat > min`) grows into spare height and shrinks back
219
- * toward its minimum as the content's minimum claims the space;
220
- * - once the view is squeezed below everything's minimum, GLib's `CLAMP` — which
221
- * tests the HIGH bound first — leaves the BARS at their minimum and lets the
222
- * CONTENT go short. `Math.min(high, Math.max(low, x))` gives the same answer
223
- * here only because both bounds arrive in order; the primitive is
224
- * {@link glibClamp} regardless, since the inputs are caller-supplied.
185
+ * `adw_toolbar_view_size_allocate` — the two chained GLib CLAMPs that turn measured
186
+ * sizes into the three slot heights: reserve the content's minimum and the bottom bar's
187
+ * minimum, hand what is left to the top bar (clamped into its own min…nat), then repeat
188
+ * for the bottom bar with the top bar's ACTUAL height. Two consequences a naive "stack
189
+ * them" layout does not reproduce:
190
+ * - a STRETCHY bar (`nat > min`) grows into spare height and shrinks back toward its
191
+ * minimum as the content's minimum claims the space;
192
+ * - once the view is squeezed below everything's minimum, GLib's `CLAMP` — which tests
193
+ * the HIGH bound first — leaves the BARS at their minimum and lets the CONTENT go
194
+ * short. {@link glibClamp} is used regardless, since the inputs are caller-supplied.
225
195
  */
226
196
  export declare function toolbarViewAllocate(input: ToolbarViewAllocateInput): ToolbarViewAllocation;
227
197
  /** The measured sizes one toolbar-view measure consumes. */
@@ -253,13 +223,11 @@ export interface AdwMeasurement {
253
223
  natural: number;
254
224
  }
255
225
  /**
256
- * `adw_toolbar_view_measure` (adw-toolbar-view.c:266-354) — the four-way vertical
257
- * combination keyed on the two extend flags, plus the horizontal MAX form.
258
- *
259
- * The four branches are not four spellings of the same sum: a bar the content
260
- * extends UNDER contributes via `MAX`, a bar it does not contributes via `+`.
261
- * With both flags set the two bars are summed first and MAXed as a pair, because
262
- * they still cannot overlap each other.
226
+ * `adw_toolbar_view_measure` — the four-way vertical combination keyed on the two extend
227
+ * flags, plus the horizontal MAX form. The branches are not four spellings of the same
228
+ * sum: a bar the content extends UNDER contributes via `MAX`, a bar it does not
229
+ * contributes via `+`. With both flags set the bars are summed first and MAXed as a
230
+ * pair, because they still cannot overlap each other.
263
231
  */
264
232
  export declare function toolbarViewMeasure(input: ToolbarViewMeasureInput): AdwMeasurement;
265
233
  /** The bar heights subtracted before the content is measured horizontally. */
@@ -285,26 +253,22 @@ export interface ToolbarViewContentForSize {
285
253
  forSizeNat: number;
286
254
  }
287
255
  /**
288
- * `adw_toolbar_view_measure`'s height-for-width branch (adw-toolbar-view.c:292-316).
289
- *
290
- * Two different `for_size` values, not one: a STRETCHY bar leaves the content a
291
- * different width at the bar's minimum than at its natural size, so the content's
292
- * minimum and natural have to be measured against different heights. They
293
- * coincide exactly when every bar is rigid, which is why one value looked
294
- * sufficient for as long as nobody had a stretchy bar.
256
+ * `adw_toolbar_view_measure`'s height-for-width branch. Two different `for_size` values,
257
+ * not one: a STRETCHY bar leaves the content a different width at the bar's minimum than
258
+ * at its natural size, so the content's minimum and natural must be measured against
259
+ * different heights. They coincide exactly when every bar is rigid.
295
260
  */
296
261
  export declare function toolbarViewContentForSize(forSize: number, input: ToolbarViewContentForSizeInput): ToolbarViewContentForSize;
297
262
  /**
298
- * `MIN_SIZE` (adw-spinner.c:14) — reported as BOTH the minimum and the natural
299
- * size (adw_spinner_measure, :70-84), so a spinner never grows on its own; it
300
- * only fills an allocation something else made larger.
263
+ * `MIN_SIZE` — reported as BOTH the minimum and the natural size (`adw_spinner_measure`),
264
+ * so a spinner never grows on its own; it only fills an allocation something else made
265
+ * larger.
301
266
  */
302
267
  export declare const ADW_SPINNER_MIN_SIZE = 16;
303
268
  /**
304
- * The largest ring Adwaita ever draws: `2 * MAX_RADIUS`
305
- * (adw-spinner-paintable.c:19). Together with {@link ADW_SPINNER_MIN_SIZE} this
306
- * is the documented "never smaller than 16×16 and never larger than 64×64"
307
- * (adw-spinner.c:27-28).
269
+ * The largest ring Adwaita ever draws: `2 * MAX_RADIUS`. With
270
+ * {@link ADW_SPINNER_MIN_SIZE} this is the documented "never smaller than 16×16 and
271
+ * never larger than 64×64".
308
272
  */
309
273
  export declare const ADW_SPINNER_MAX_SIZE = 64;
310
274
  /** The circle `AdwSpinnerPaintable` strokes into a `width × height` box. */
@@ -321,35 +285,25 @@ export interface SpinnerGeometry {
321
285
  centerY: number;
322
286
  }
323
287
  /**
324
- * `adw_spinner_paintable_snapshot_with_weight` (adw-spinner-paintable.c:342-352)
325
- * plus `calculate_line_width` (:314-321) at the default weight 400, where
326
- * `width_apply_weight` is the identity branch (:303-306).
288
+ * `adw_spinner_paintable_snapshot_with_weight` plus `calculate_line_width` at the default
289
+ * weight 400, where `width_apply_weight` is the identity branch. Three details:
290
+ * - the SHORTER side decides the radius, and it is FLOORED, so a 31px box draws a 30px
291
+ * ring rather than a 31px one;
292
+ * - the radius is capped at 32 while the CENTRE still follows the box, so a 200px
293
+ * allocation shows a 64px ring in the middle, not a 200px one;
294
+ * - the stroke is `diameter / 8` exactly — 3px at 24, 6px at 48, 8px at 64.
327
295
  *
328
- * Three details the renderers had each guessed at:
329
- * - the SHORTER side decides the radius, and it is FLOORED, so a 31px box
330
- * draws a 30px ring rather than a 31px one;
331
- * - the radius is capped at 32 while the CENTRE still follows the box, so a
332
- * 200px allocation shows a 64px ring in the middle, not a 200px one;
333
- * - the stroke is `diameter / 8` exactly — 3px at 24, 6px at 48, 8px at 64.
334
- * The browser port's `max(2, round(size / 12))` drew 2px, 4px and 5px there.
335
- *
336
- * `MIN_RADIUS 8` (adw-spinner-paintable.c:18) is dead in the C source — nothing
337
- * references it — so it is deliberately NOT a floor here. The real floor is the
338
- * widget's measured {@link ADW_SPINNER_MIN_SIZE}.
296
+ * `MIN_RADIUS 8` is dead in the C source — nothing references it — so it is deliberately
297
+ * NOT a floor here. The real floor is the widget's measured
298
+ * {@link ADW_SPINNER_MIN_SIZE}.
339
299
  */
340
300
  export declare function spinnerGeometry(width: number, height: number): SpinnerGeometry;
341
301
  /**
342
- * The box a spinner is actually given for a requested `size`.
343
- *
344
- * `adw_spinner_measure` reports 16 as the minimum, and GTK never allocates a
345
- * widget below its minimum — so a smaller request is not representable, and a
346
- * request GObject would refuse (`NaN`, a non-numeric attribute, an unset one)
347
- * leaves the natural size in force. There is no upper bound HERE: an oversized
348
- * allocation stays oversized and {@link spinnerGeometry} caps the drawn ring,
349
- * which is how the box and the ring can differ (a 200px allocation, a 64px ring).
350
- *
351
- * Replaces the two invented defaults this package shipped — `24` in the browser
352
- * element and `32` in the NativeScript widget — neither of which is in the C
353
- * source.
302
+ * The box a spinner is actually given for a requested `size`. `adw_spinner_measure`
303
+ * reports 16 as the minimum and GTK never allocates below a minimum, so a smaller
304
+ * request is not representable, and a request GObject would refuse (`NaN`, a non-numeric
305
+ * or unset attribute) leaves the natural size in force. No upper bound HERE: an oversized
306
+ * allocation stays oversized and {@link spinnerGeometry} caps the drawn ring, which is
307
+ * how a 200px box can hold a 64px ring.
354
308
  */
355
309
  export declare function resolveSpinnerSize(value: number | string | null | undefined): number;
@@ -8,9 +8,8 @@ export type AdwColorScheme = 'light' | 'dark';
8
8
  export declare function adwaitaColorScheme(): AdwColorScheme;
9
9
  /**
10
10
  * Set the active color scheme. A no-op when unchanged; otherwise notifies every
11
- * subscriber (so theme-aware icons re-render). The renderer should also apply
12
- * its platform half (e.g. the `ns-dark` class on NativeScript, a CSS scope in
13
- * the browser).
11
+ * subscriber (so theme-aware icons re-render). The renderer must also apply its platform
12
+ * half — the `ns-dark` class on NativeScript, a CSS scope in the browser.
14
13
  */
15
14
  export declare function setAdwaitaColorScheme(scheme: AdwColorScheme): void;
16
15
  /** Flip light↔dark and return the new scheme. */
@@ -20,8 +19,8 @@ export declare function themeIconColor(): string;
20
19
  /** Whether `color` is the current scheme-default fill (i.e. not a caller-set explicit colour). */
21
20
  export declare function isThemeIconColor(color: string): boolean;
22
21
  /**
23
- * Subscribe to scheme changes. Returns an unsubscribe function. Widgets should
24
- * subscribe while on screen and unsubscribe when leaving it (e.g. NS `loaded` /
25
- * `unloaded`), so the registry only ever holds live subscribers.
22
+ * Subscribe to scheme changes. Returns an unsubscribe function. Widgets subscribe while
23
+ * on screen and unsubscribe when leaving it (NS `loaded`/`unloaded`), so the registry
24
+ * only ever holds live subscribers.
26
25
  */
27
26
  export declare function onAdwaitaColorSchemeChanged(listener: () => void): () => void;