@gjsify/adwaita-core 0.30.0 → 0.32.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 (112) hide show
  1. package/lib/esm/about-dialog.js +3 -0
  2. package/lib/esm/action-row.js +1 -0
  3. package/lib/esm/avatar.js +1 -0
  4. package/lib/esm/banner.js +1 -0
  5. package/lib/esm/button-content.js +1 -0
  6. package/lib/esm/carousel.js +1 -0
  7. package/lib/esm/checks.js +1 -0
  8. package/lib/esm/chrome.js +1 -0
  9. package/lib/esm/conformance/about-dialog.js +6 -0
  10. package/lib/esm/conformance/action-row.js +1 -0
  11. package/lib/esm/conformance/avatar.js +1 -0
  12. package/lib/esm/conformance/banner.js +1 -0
  13. package/lib/esm/conformance/button-content.js +1 -0
  14. package/lib/esm/conformance/carousel.js +1 -0
  15. package/lib/esm/conformance/checks.js +1 -0
  16. package/lib/esm/conformance/chrome.js +1 -0
  17. package/lib/esm/conformance/data-grid.js +1 -0
  18. package/lib/esm/conformance/dialog.js +1 -0
  19. package/lib/esm/conformance/entry-row.js +1 -0
  20. package/lib/esm/conformance/index.js +1 -0
  21. package/lib/esm/conformance/navigation-view.js +1 -0
  22. package/lib/esm/conformance/popover.js +1 -0
  23. package/lib/esm/conformance/preferences.js +1 -0
  24. package/lib/esm/conformance/rows.js +1 -0
  25. package/lib/esm/conformance/sidebar.js +1 -0
  26. package/lib/esm/conformance/split-button.js +1 -0
  27. package/lib/esm/conformance/split-view.js +1 -0
  28. package/lib/esm/conformance/tab-view.js +1 -0
  29. package/lib/esm/conformance/view-stack.js +1 -0
  30. package/lib/esm/conformance/view-switcher.js +1 -0
  31. package/lib/esm/conformance/wrap-box.js +1 -0
  32. package/lib/esm/data-grid.js +1 -0
  33. package/lib/esm/dialog.js +1 -1
  34. package/lib/esm/entry-row.js +1 -0
  35. package/lib/esm/glib.js +1 -0
  36. package/lib/esm/index.js +1 -1
  37. package/lib/esm/navigation-view.js +1 -0
  38. package/lib/esm/popover.js +1 -0
  39. package/lib/esm/preferences.js +1 -0
  40. package/lib/esm/rows.js +1 -1
  41. package/lib/esm/sidebar.js +1 -0
  42. package/lib/esm/split-button.js +1 -0
  43. package/lib/esm/split-view.js +1 -0
  44. package/lib/esm/tab-view.js +1 -0
  45. package/lib/esm/view-stack.js +1 -0
  46. package/lib/esm/view-switcher.js +1 -0
  47. package/lib/types/about-dialog.d.ts +391 -0
  48. package/lib/types/about-dialog.spec.d.ts +2 -0
  49. package/lib/types/action-row.d.ts +270 -0
  50. package/lib/types/action-row.spec.d.ts +2 -0
  51. package/lib/types/avatar.d.ts +112 -0
  52. package/lib/types/avatar.spec.d.ts +2 -0
  53. package/lib/types/banner.d.ts +104 -0
  54. package/lib/types/banner.spec.d.ts +2 -0
  55. package/lib/types/button-content.d.ts +141 -0
  56. package/lib/types/button-content.spec.d.ts +2 -0
  57. package/lib/types/carousel.d.ts +535 -0
  58. package/lib/types/carousel.spec.d.ts +2 -0
  59. package/lib/types/checks.d.ts +63 -0
  60. package/lib/types/checks.spec.d.ts +2 -0
  61. package/lib/types/chrome.d.ts +355 -0
  62. package/lib/types/chrome.spec.d.ts +2 -0
  63. package/lib/types/conformance/about-dialog.d.ts +300 -0
  64. package/lib/types/conformance/action-row.d.ts +186 -0
  65. package/lib/types/conformance/avatar.d.ts +61 -0
  66. package/lib/types/conformance/banner.d.ts +91 -0
  67. package/lib/types/conformance/button-content.d.ts +110 -0
  68. package/lib/types/conformance/carousel.d.ts +284 -0
  69. package/lib/types/conformance/checks.d.ts +29 -0
  70. package/lib/types/conformance/chrome.d.ts +195 -0
  71. package/lib/types/conformance/data-grid.d.ts +134 -0
  72. package/lib/types/conformance/dialog.d.ts +97 -0
  73. package/lib/types/conformance/entry-row.d.ts +185 -0
  74. package/lib/types/conformance/index.d.ts +44 -0
  75. package/lib/types/conformance/navigation-view.d.ts +235 -0
  76. package/lib/types/conformance/popover.d.ts +56 -0
  77. package/lib/types/conformance/preferences.d.ts +170 -0
  78. package/lib/types/conformance/rows.d.ts +51 -0
  79. package/lib/types/conformance/sidebar.d.ts +182 -0
  80. package/lib/types/conformance/split-button.d.ts +189 -0
  81. package/lib/types/conformance/split-view.d.ts +290 -0
  82. package/lib/types/conformance/tab-view.d.ts +441 -0
  83. package/lib/types/conformance/view-stack.d.ts +121 -0
  84. package/lib/types/conformance/view-switcher.d.ts +443 -0
  85. package/lib/types/conformance/wrap-box.d.ts +134 -0
  86. package/lib/types/data-grid.d.ts +140 -0
  87. package/lib/types/data-grid.spec.d.ts +2 -0
  88. package/lib/types/dialog.d.ts +144 -0
  89. package/lib/types/entry-row.d.ts +308 -0
  90. package/lib/types/entry-row.spec.d.ts +2 -0
  91. package/lib/types/glib.d.ts +49 -0
  92. package/lib/types/index.d.ts +43 -4
  93. package/lib/types/navigation-view.d.ts +343 -0
  94. package/lib/types/navigation-view.spec.d.ts +2 -0
  95. package/lib/types/popover.d.ts +155 -0
  96. package/lib/types/popover.spec.d.ts +2 -0
  97. package/lib/types/preferences.d.ts +349 -0
  98. package/lib/types/preferences.spec.d.ts +2 -0
  99. package/lib/types/rows.d.ts +49 -2
  100. package/lib/types/sidebar.d.ts +308 -0
  101. package/lib/types/sidebar.spec.d.ts +2 -0
  102. package/lib/types/split-button.d.ts +316 -0
  103. package/lib/types/split-button.spec.d.ts +2 -0
  104. package/lib/types/split-view.d.ts +714 -0
  105. package/lib/types/split-view.spec.d.ts +2 -0
  106. package/lib/types/tab-view.d.ts +616 -0
  107. package/lib/types/tab-view.spec.d.ts +2 -0
  108. package/lib/types/view-stack.d.ts +266 -0
  109. package/lib/types/view-stack.spec.d.ts +2 -0
  110. package/lib/types/view-switcher.d.ts +521 -0
  111. package/lib/types/view-switcher.spec.d.ts +2 -0
  112. package/package.json +8 -4
@@ -0,0 +1,284 @@
1
+ import type { CarouselDirection, CarouselOrientation, CarouselScrollSource } from '../carousel.js';
2
+ /** One `carouselSnapPoints` expectation. */
3
+ export interface CarouselSnapPointVector {
4
+ /** Per-page reveal sizes: 0 while a page animates in, 1 once settled. */
5
+ sizes: readonly number[];
6
+ /** `snapPoint[i] = (Σ_{j≤i} size[j]) − 1`. */
7
+ snapPoints: readonly number[];
8
+ /** Why this row exists. */
9
+ rule: string;
10
+ }
11
+ /** `adw_carousel_size_allocate`'s accumulation (adw-carousel.c:777-789). */
12
+ export declare const CAROUSEL_SNAP_POINT_VECTORS: ReadonlyArray<CarouselSnapPointVector>;
13
+ /** One `carouselSizesFromSnapPoints` expectation. */
14
+ export interface CarouselSizesFromSnapPointsVector {
15
+ /** Snap points as `AdwSwipeable` hands them to an indicator. */
16
+ snapPoints: readonly number[];
17
+ /** `sizes[0] = points[0] + 1`, `sizes[i] = points[i] − points[i−1]`. */
18
+ sizes: readonly number[];
19
+ /** Why this row exists. */
20
+ rule: string;
21
+ }
22
+ /**
23
+ * The inverse both indicators reconstruct sizes with
24
+ * (adw-carousel-indicator-dots.c:189-191, :248-250) — the only channel through
25
+ * which an indicator can learn per-page reveal state.
26
+ */
27
+ export declare const CAROUSEL_SIZES_FROM_SNAP_POINTS_VECTORS: ReadonlyArray<CarouselSizesFromSnapPointsVector>;
28
+ /** One `carouselRange` expectation. */
29
+ export interface CarouselRangeVector {
30
+ /** The snap points the range is derived from. */
31
+ snapPoints: readonly number[];
32
+ /** Pending `position_shift`, which C folds into the bound (:219). */
33
+ positionShift: number;
34
+ /** Always 0. */
35
+ lower: number;
36
+ /** `MAX (0, positionShift + last snap point)`. */
37
+ upper: number;
38
+ /** Why this row exists. */
39
+ rule: string;
40
+ }
41
+ /** `get_range` (adw-carousel.c:207-220). */
42
+ export declare const CAROUSEL_RANGE_VECTORS: ReadonlyArray<CarouselRangeVector>;
43
+ /** One `carouselClampPosition` expectation. */
44
+ export interface CarouselClampVector {
45
+ /** The proposed position. */
46
+ position: number;
47
+ /** The snap points defining the range. */
48
+ snapPoints: readonly number[];
49
+ /** `CLAMP (position, lower, upper)`. */
50
+ clamped: number;
51
+ /** Why this row exists. */
52
+ rule: string;
53
+ }
54
+ /** `set_position`'s guard (adw-carousel.c:269). */
55
+ export declare const CAROUSEL_CLAMP_VECTORS: ReadonlyArray<CarouselClampVector>;
56
+ /** One `carouselPageAtPosition` expectation. */
57
+ export interface CarouselPageAtPositionVector {
58
+ /** The scroll position to resolve. */
59
+ position: number;
60
+ /** The snap points of the pages that count. */
61
+ snapPoints: readonly number[];
62
+ /** The page index, `-1` when there are no pages. */
63
+ page: number;
64
+ /** Why this row exists. */
65
+ rule: string;
66
+ }
67
+ /**
68
+ * `get_page_at_position` → `get_closest_child_at` (adw-carousel.c:222-239,
69
+ * :180-205). The `.5` rows are the regression pins: C's comparison is a strict
70
+ * `>`, so an equidistant LATER page never replaces the earlier one, while both
71
+ * ports used `Math.round`, which rounds .5 up.
72
+ */
73
+ export declare const CAROUSEL_PAGE_AT_POSITION_VECTORS: ReadonlyArray<CarouselPageAtPositionVector>;
74
+ /** One `carouselNavigateTarget` expectation. */
75
+ export interface CarouselNavigateVector {
76
+ /** Current scroll position. */
77
+ position: number;
78
+ /** Number of pages. */
79
+ nPages: number;
80
+ /** Which way the key moves. */
81
+ direction: CarouselDirection;
82
+ /** The target page, `null` when C returns FALSE. */
83
+ target: number | null;
84
+ /** Why this row exists. */
85
+ rule: string;
86
+ }
87
+ /**
88
+ * `navigate_to_direction` (adw-carousel.c:475-508).
89
+ *
90
+ * The rounding here is C's `round()` — half AWAY FROM ZERO — and it is
91
+ * deliberately not the half-down tie-break of
92
+ * {@link CAROUSEL_PAGE_AT_POSITION_VECTORS}: at position 0.5 the carousel shows
93
+ * page 0 but an arrow key steps from page 1. libadwaita is internally
94
+ * inconsistent there and that is ground truth, not a defect to iron out.
95
+ */
96
+ export declare const CAROUSEL_NAVIGATE_VECTORS: ReadonlyArray<CarouselNavigateVector>;
97
+ /** One `carouselWheelStep` expectation. */
98
+ export interface CarouselWheelVector {
99
+ /** Horizontal delta. */
100
+ deltaX: number;
101
+ /** Vertical delta. */
102
+ deltaY: number;
103
+ /** The carousel's orientation. */
104
+ orientation: CarouselOrientation;
105
+ /** The `GdkInputSource` class of the event. */
106
+ source: CarouselScrollSource;
107
+ /** Pages to step; `0` means the event propagates. */
108
+ step: -1 | 0 | 1;
109
+ /** Why this row exists. */
110
+ rule: string;
111
+ }
112
+ /** `scroll_cb`'s axis/source rules (adw-carousel.c:537-559). */
113
+ export declare const CAROUSEL_WHEEL_VECTORS: ReadonlyArray<CarouselWheelVector>;
114
+ /** One step of a wheel-lockout script. */
115
+ export interface CarouselWheelLockoutStep {
116
+ /** The value the injected `now()` returns for this event, in ms. */
117
+ at: number;
118
+ /** Vertical delta of the event (all lockout rows use a mouse wheel). */
119
+ deltaY: number;
120
+ /** What `handleWheel` must return. */
121
+ step: -1 | 0 | 1;
122
+ /** The position afterwards. */
123
+ position: number;
124
+ }
125
+ /** One end-to-end wheel-lockout expectation. */
126
+ export interface CarouselWheelLockoutVector {
127
+ /** How many settled pages the carousel starts with. */
128
+ pages: number;
129
+ /** The events, in order, each with the clock reading it arrives at. */
130
+ steps: readonly CarouselWheelLockoutStep[];
131
+ /** Why this row exists. */
132
+ rule: string;
133
+ }
134
+ /**
135
+ * `SCROLL_TIMEOUT_DURATION` (adw-carousel.c:22) and the `scroll_timeout_id` gate
136
+ * (:526, :571-574) — a wheel notch arms a 150 ms lockout during which further
137
+ * notches propagate instead of paging.
138
+ *
139
+ * The web port replaced this with a non-decaying delta accumulator, so +30 then
140
+ * −30 cancelled out where libadwaita pages twice, and a slow wheel never
141
+ * reached the threshold at all.
142
+ */
143
+ export declare const CAROUSEL_WHEEL_LOCKOUT_VECTORS: ReadonlyArray<CarouselWheelLockoutVector>;
144
+ /** One `carouselReorderShift` expectation. */
145
+ export interface CarouselReorderShiftVector {
146
+ /** Snap point of the page the carousel is closest to. */
147
+ closestPoint: number;
148
+ /** Snap point the moved page had. */
149
+ oldPoint: number;
150
+ /** Snap point it lands on. */
151
+ newPoint: number;
152
+ /** The moved page's reveal size. */
153
+ size: number;
154
+ /** How far `position` must move so the visible page does not jump. */
155
+ shift: number;
156
+ /** Why this row exists. */
157
+ rule: string;
158
+ }
159
+ /** The three branches of `adw_carousel_reorder`'s compensation (adw-carousel.c:1488-1495). */
160
+ export declare const CAROUSEL_REORDER_SHIFT_VECTORS: ReadonlyArray<CarouselReorderShiftVector>;
161
+ /**
162
+ * One operation in a page-list script.
163
+ *
164
+ * `insert` and `remove` mean "and finish the reveal immediately", which is what
165
+ * a carousel with the default `reveal-duration` of 0 (adw-carousel.c:1206) does
166
+ * and what both renderers' page APIs do. The mid-animation states are pinned
167
+ * separately by {@link CAROUSEL_REVEAL_VECTORS}.
168
+ */
169
+ export type CarouselPageOp = {
170
+ readonly kind: 'insert';
171
+ readonly id: string;
172
+ readonly position?: number;
173
+ } | {
174
+ readonly kind: 'remove';
175
+ readonly id: string;
176
+ } | {
177
+ readonly kind: 'reorder';
178
+ readonly id: string;
179
+ readonly position: number;
180
+ } | {
181
+ readonly kind: 'scrollTo';
182
+ readonly index: number;
183
+ } | {
184
+ readonly kind: 'setPosition';
185
+ readonly position: number;
186
+ } | {
187
+ readonly kind: 'settle';
188
+ };
189
+ /** The observable state a script must land in. */
190
+ export interface CarouselStateSnapshot {
191
+ /** Page ids in order, excluding any whose removal is still animating. */
192
+ ids: readonly string[];
193
+ /** `adw_carousel_get_n_pages` — the same exclusion. */
194
+ nPages: number;
195
+ /** Reveal sizes of every TRACKED child, including ones being removed. */
196
+ sizes: readonly number[];
197
+ /** Snap points of every tracked child. */
198
+ snapPoints: readonly number[];
199
+ /** The clamped fractional position. */
200
+ position: number;
201
+ /** The current page index, `-1` when empty. */
202
+ page: number;
203
+ }
204
+ /** One end-to-end page-list expectation. */
205
+ export interface CarouselPageListVector {
206
+ /** Pages the carousel starts with, all settled at size 1. */
207
+ pages: readonly string[];
208
+ /** The script, applied in order. */
209
+ ops: readonly CarouselPageOp[];
210
+ /** What each op returned (`settle` reports `true`). */
211
+ opResults: readonly boolean[];
212
+ /** The `page-changed` indices emitted while the script ran, in order. */
213
+ pageChanged: readonly number[];
214
+ /** The state afterwards. */
215
+ expected: CarouselStateSnapshot;
216
+ /** Why this row exists. */
217
+ rule: string;
218
+ }
219
+ /**
220
+ * Insert / remove / reorder ordering and the position compensation, on a
221
+ * carousel whose reveals complete instantly — the shape both renderers expose.
222
+ *
223
+ * The whole family is new to both ports: the web port snapshotted its children
224
+ * once in `connectedCallback` and never looked again, and the NS port had
225
+ * `addPage` and nothing else.
226
+ */
227
+ export declare const CAROUSEL_PAGE_LIST_VECTORS: ReadonlyArray<CarouselPageListVector>;
228
+ /** One operation in a reveal script — the mid-animation half of the state machine. */
229
+ export type CarouselRevealOp = {
230
+ readonly kind: 'insert';
231
+ readonly id: string;
232
+ readonly position?: number;
233
+ } | {
234
+ readonly kind: 'reveal';
235
+ readonly id: string;
236
+ } | {
237
+ readonly kind: 'size';
238
+ readonly id: string;
239
+ readonly size: number;
240
+ } | {
241
+ readonly kind: 'remove';
242
+ readonly id: string;
243
+ } | {
244
+ readonly kind: 'setPosition';
245
+ readonly position: number;
246
+ };
247
+ /** One end-to-end reveal expectation. */
248
+ export interface CarouselRevealVector {
249
+ /** Pages the carousel starts with, all settled at size 1. */
250
+ pages: readonly string[];
251
+ /** The script, applied in order. */
252
+ ops: readonly CarouselRevealOp[];
253
+ /** The state afterwards. */
254
+ expected: CarouselStateSnapshot;
255
+ /** Why this row exists. */
256
+ rule: string;
257
+ }
258
+ /**
259
+ * The reveal lifecycle: a page enters at size 0 and grows, leaves `n-pages`
260
+ * before its geometry, and drags the position along whenever it sits at or
261
+ * before the page on screen.
262
+ *
263
+ * Neither port has any of this — both treat the page list as fixed — so every
264
+ * row is new behaviour rather than a regression pin.
265
+ */
266
+ export declare const CAROUSEL_REVEAL_VECTORS: ReadonlyArray<CarouselRevealVector>;
267
+ /** One property-default expectation. */
268
+ export interface CarouselPropertyDefaultVector {
269
+ /** The `CarouselState` accessor. */
270
+ property: 'orientation' | 'interactive' | 'allowScrollWheel' | 'allowLongSwipes' | 'spacing' | 'revealDuration';
271
+ /** What a freshly constructed carousel reports. */
272
+ value: string | number | boolean;
273
+ /** Why this row exists. */
274
+ rule: string;
275
+ }
276
+ /**
277
+ * The `AdwCarousel` property defaults. Two of them are regression pins:
278
+ * `allow-scroll-wheel` is TRUE, which the web port inverted by reading a bare
279
+ * attribute presence (so a plain `<adw-carousel>` ignored the wheel entirely
280
+ * while its own header comment claimed the opposite), and `allow-long-swipes` is
281
+ * FALSE, which the web port carried as a property whose two ternary branches
282
+ * were identical.
283
+ */
284
+ export declare const CAROUSEL_PROPERTY_DEFAULT_VECTORS: ReadonlyArray<CarouselPropertyDefaultVector>;
@@ -0,0 +1,29 @@
1
+ import type { RadioGroupChange } from '../checks.js';
2
+ /**
3
+ * One mutation in a radio scenario. DATA, not a closure: the browser suite
4
+ * replays these as clicks on real elements rather than as method calls.
5
+ */
6
+ export interface RadioGroupStep {
7
+ op: 'select';
8
+ /** The group name — what `name` scopes in HTML, and what the state keys on. */
9
+ name: string;
10
+ /** The member's value. */
11
+ value: string;
12
+ }
13
+ /** One radio-group scenario. */
14
+ export interface RadioGroupVector {
15
+ /** Short scenario name. */
16
+ name: string;
17
+ /** The members that exist, as `[group, value]` pairs — what the renderer mounts. */
18
+ members: ReadonlyArray<readonly [string, string]>;
19
+ /** The mutations, applied in order to a fresh state. */
20
+ steps: readonly RadioGroupStep[];
21
+ /** `selected(group)` afterwards, one entry per group in {@link members}. */
22
+ selected: ReadonlyArray<readonly [string, string | null]>;
23
+ /** Every change the state emits, in order. This IS the renderer's repaint feed. */
24
+ emitted: ReadonlyArray<RadioGroupChange>;
25
+ /** Why this row exists — the rule or edge case it pins down. */
26
+ rule: string;
27
+ }
28
+ /** `RadioGroupState.select` and the exclusivity it publishes. */
29
+ export declare const RADIO_GROUP_VECTORS: ReadonlyArray<RadioGroupVector>;
@@ -0,0 +1,195 @@
1
+ import type { AdwClampSizeClass, ClampParams, ToolbarViewAllocateInput, ToolbarViewClassInput, ToolbarViewContentForSizeInput, ToolbarViewMeasureInput } from '../chrome.js';
2
+ /** One `clampThresholds` expectation. */
3
+ export interface ClampThresholdsVector {
4
+ /** The clamp properties plus the child's measured min/nat. */
5
+ params: ClampParams;
6
+ /** `MAX (MIN (tightening_threshold, maximum_size), min)`. */
7
+ lower: number;
8
+ /** `MAX (lower, maximum_size)`. */
9
+ max: number;
10
+ /** `lower + 3 * (max - lower)`. */
11
+ upper: number;
12
+ /** Why this row exists. */
13
+ rule: string;
14
+ }
15
+ /** `lower`/`max`/`upper` (adw-clamp-layout.c:173-176, :210-213). */
16
+ export declare const CLAMP_THRESHOLD_VECTORS: ReadonlyArray<ClampThresholdsVector>;
17
+ /** One `clampChildSize` expectation. */
18
+ export interface ClampChildSizeVector {
19
+ /** The available size (`for_size`); `-1` is GTK's "unconstrained". */
20
+ forSize: number;
21
+ /** The clamp properties plus the child's measured min/nat. */
22
+ params: ClampParams;
23
+ /** What the child is allocated. */
24
+ childSize: number;
25
+ /** Why this row exists. */
26
+ rule: string;
27
+ }
28
+ /** `child_size_from_clamp` (adw-clamp-layout.c:193-232). */
29
+ export declare const CLAMP_CHILD_SIZE_VECTORS: ReadonlyArray<ClampChildSizeVector>;
30
+ /** One `clampSizeFromChild` expectation. */
31
+ export interface ClampSizeFromChildVector {
32
+ /** The child's size. */
33
+ childSize: number;
34
+ /** The clamp properties plus the child's measured min/nat. */
35
+ params: ClampParams;
36
+ /** The size the clamp itself reports for it. */
37
+ clampSize: number;
38
+ /** Why this row exists. */
39
+ rule: string;
40
+ }
41
+ /** `clamp_size_from_child` (adw-clamp-layout.c:156-191) — the inverse ease. */
42
+ export declare const CLAMP_SIZE_FROM_CHILD_VECTORS: ReadonlyArray<ClampSizeFromChildVector>;
43
+ /** One `clampAllocate` expectation. */
44
+ export interface ClampAllocateVector {
45
+ /** The size the clamp itself was allocated. */
46
+ availableSize: number;
47
+ /** The clamp properties plus the child's measured min/nat. */
48
+ params: ClampParams;
49
+ /** The size the child is allocated. */
50
+ childSize: number;
51
+ /** `ceil(max)`. */
52
+ childMaximum: number;
53
+ /** `ceil(lower)`. */
54
+ lowerThreshold: number;
55
+ /** The style class the CHILD carries. */
56
+ sizeClass: AdwClampSizeClass;
57
+ /** The centring offset. */
58
+ offset: number;
59
+ /** Why this row exists. */
60
+ rule: string;
61
+ }
62
+ /** `adw_clamp_layout_allocate` (adw-clamp-layout.c:317-386). */
63
+ export declare const CLAMP_ALLOCATE_VECTORS: ReadonlyArray<ClampAllocateVector>;
64
+ /** One `normalizeClampSize` expectation. */
65
+ export interface ClampPropertyVector {
66
+ /** The raw attribute value or property assignment. */
67
+ value: number | string | null | undefined;
68
+ /** The default the property falls back to. */
69
+ fallback: number;
70
+ /** The value that reaches the layout. */
71
+ size: number;
72
+ /** Why this row exists. */
73
+ rule: string;
74
+ }
75
+ /**
76
+ * `maximum-size` / `tightening-threshold` as `g_param_spec_int (…, 0, G_MAXINT, …)`
77
+ * (adw-clamp-layout.c:413-416, :448-451).
78
+ *
79
+ * The three interesting rows are the three the ports disagreed on: `"0"` (valid,
80
+ * and NOT the default), a non-numeric value (never reaches the layout, so the
81
+ * DEFAULT applies — the browser port kept whatever cap was already set), and a
82
+ * negative (out of range, clamped to the range floor).
83
+ */
84
+ export declare const CLAMP_PROPERTY_VECTORS: ReadonlyArray<ClampPropertyVector>;
85
+ /** One `toolbarViewAllocate` expectation. */
86
+ export interface ToolbarViewAllocateVector {
87
+ /** The measured sizes going in. */
88
+ input: ToolbarViewAllocateInput;
89
+ /** `Adw.ToolbarView:top-bar-height`. */
90
+ topBarHeight: number;
91
+ /** `Adw.ToolbarView:bottom-bar-height`. */
92
+ bottomBarHeight: number;
93
+ /** The content's allocated height. */
94
+ contentHeight: number;
95
+ /** The content's offset from the top edge. */
96
+ contentOffset: number;
97
+ /** Why this row exists. */
98
+ rule: string;
99
+ }
100
+ /** `adw_toolbar_view_size_allocate` (adw-toolbar-view.c:357-406). */
101
+ export declare const TOOLBAR_VIEW_ALLOCATE_VECTORS: ReadonlyArray<ToolbarViewAllocateVector>;
102
+ /** One `toolbarViewMeasure` expectation. */
103
+ export interface ToolbarViewMeasureVector {
104
+ /** The measured sizes going in. */
105
+ input: ToolbarViewMeasureInput;
106
+ /** The view's minimum along the measured axis. */
107
+ minimum: number;
108
+ /** The view's natural along the measured axis. */
109
+ natural: number;
110
+ /** Why this row exists. */
111
+ rule: string;
112
+ }
113
+ /** `adw_toolbar_view_measure` (adw-toolbar-view.c:266-354). */
114
+ export declare const TOOLBAR_VIEW_MEASURE_VECTORS: ReadonlyArray<ToolbarViewMeasureVector>;
115
+ /** One `toolbarViewContentForSize` expectation. */
116
+ export interface ToolbarViewContentForSizeVector {
117
+ /** The `for_size` the view was measured at. */
118
+ forSize: number;
119
+ /** The bar heights and extend flags. */
120
+ input: ToolbarViewContentForSizeInput;
121
+ /** `for_size` for the content's minimum. */
122
+ forSizeMin: number;
123
+ /** `for_size` for the content's natural. */
124
+ forSizeNat: number;
125
+ /** Why this row exists. */
126
+ rule: string;
127
+ }
128
+ /** `adw_toolbar_view_measure`'s height-for-width branch (adw-toolbar-view.c:292-316). */
129
+ export declare const TOOLBAR_VIEW_CONTENT_FOR_SIZE_VECTORS: ReadonlyArray<ToolbarViewContentForSizeVector>;
130
+ /** One `toolbarViewClasses` expectation. */
131
+ export interface ToolbarViewClassVector {
132
+ /** The styles, extend flags and ALLOCATED bar heights. */
133
+ input: ToolbarViewClassInput;
134
+ /** Classes on the view node. */
135
+ view: readonly string[];
136
+ /** Classes on the top-bar box. */
137
+ topBar: readonly string[];
138
+ /** Classes on the bottom-bar box. */
139
+ bottomBar: readonly string[];
140
+ /** Why this row exists. */
141
+ rule: string;
142
+ }
143
+ /** `update_undershoots` (adw-toolbar-view.c:215-232) + the style setters (:1011-1024, :1097-1110). */
144
+ export declare const TOOLBAR_VIEW_CLASS_VECTORS: ReadonlyArray<ToolbarViewClassVector>;
145
+ /** One `spinnerGeometry` expectation. */
146
+ export interface SpinnerGeometryVector {
147
+ /** Allocated box width. */
148
+ width: number;
149
+ /** Allocated box height. */
150
+ height: number;
151
+ /** `MIN (floorf (MIN (w, h) / 2), MAX_RADIUS)`. */
152
+ radius: number;
153
+ /** `2 * radius`. */
154
+ diameter: number;
155
+ /** `diameter / 8`. */
156
+ lineWidth: number;
157
+ /** `roundf (width / 2)`. */
158
+ centerX: number;
159
+ /** `roundf (height / 2)`. */
160
+ centerY: number;
161
+ /**
162
+ * What the browser element drew before this landed — `max(2, round(size / 12))`
163
+ * — or `null` for a non-square box, which that element had no notion of.
164
+ */
165
+ legacyWebLineWidth: number | null;
166
+ /** Why this row exists. */
167
+ rule: string;
168
+ }
169
+ /**
170
+ * `adw_spinner_paintable_snapshot_with_weight` (adw-spinner-paintable.c:342-352)
171
+ * + `calculate_line_width` (:314-321) at the default weight 400.
172
+ *
173
+ * `legacyWebLineWidth` stays in the table on purpose: it is the formula the
174
+ * browser element shipped, and it is wrong at every size above 16 — 2px where
175
+ * Adwaita strokes 3px at 24, 4px against 6px at 48, 5px against 8px at 64.
176
+ */
177
+ export declare const SPINNER_GEOMETRY_VECTORS: ReadonlyArray<SpinnerGeometryVector>;
178
+ /** One `resolveSpinnerSize` expectation. */
179
+ export interface SpinnerSizeVector {
180
+ /** The raw attribute value or property assignment. */
181
+ value: number | string | null | undefined;
182
+ /** The box the spinner is given. */
183
+ size: number;
184
+ /** Why this row exists. */
185
+ rule: string;
186
+ }
187
+ /**
188
+ * `adw_spinner_measure` (adw-spinner.c:70-84) — minimum AND natural are both
189
+ * `MIN_SIZE`, and GTK never allocates below a widget's minimum.
190
+ *
191
+ * The rows without a usable value all land on 16, which is the measured natural
192
+ * size — NOT the 24 the browser element invented nor the 32 the NativeScript
193
+ * widget invented.
194
+ */
195
+ export declare const SPINNER_SIZE_VECTORS: ReadonlyArray<SpinnerSizeVector>;
@@ -0,0 +1,134 @@
1
+ import type { AdwDataGridColumn, AdwDataGridRowVariant, DataGridTrack } from '../data-grid.js';
2
+ /** One track-derivation expectation. */
3
+ export interface DataGridTrackVector {
4
+ /** What the row is about. */
5
+ name: string;
6
+ /** The column descriptors handed to `dataGridTracks`. */
7
+ columns: ReadonlyArray<AdwDataGridColumn>;
8
+ /** The renderer-neutral tracks derived from them. */
9
+ tracks: ReadonlyArray<DataGridTrack>;
10
+ /** The browser mapping — a `grid-template-columns` value. */
11
+ template: string;
12
+ /** Why this row exists. */
13
+ rule: string;
14
+ }
15
+ /**
16
+ * `dataGridTracks` + `dataGridTrackTemplate`.
17
+ *
18
+ * The rule that needs the most rows is the implicit one: with NO `width` and NO
19
+ * `flex` anywhere, the FIRST column absorbs the slack and the rest size to
20
+ * content. It is global, so a single declared size anywhere in the list turns it
21
+ * off for every column — the pair of two-column rows below is the whole
22
+ * difference between "label column stretches, figures hug the right edge" and
23
+ * "every column hugs its content".
24
+ */
25
+ export declare const DATA_GRID_TRACK_VECTORS: ReadonlyArray<DataGridTrackVector>;
26
+ /** One cell-class expectation. */
27
+ export interface DataGridColumnClassVector {
28
+ /** What the row is about. */
29
+ name: string;
30
+ /** The column descriptor. */
31
+ column: AdwDataGridColumn;
32
+ /** The effective alignment. */
33
+ align: string;
34
+ /** The full class list, in order. */
35
+ classes: ReadonlyArray<string>;
36
+ /** Why this row exists. */
37
+ rule: string;
38
+ }
39
+ /**
40
+ * `dataGridColumnAlign` + `dataGridColumnClasses`.
41
+ *
42
+ * `numeric` and `mono` are libadwaita's own label classes
43
+ * (`_labels.scss:81-88`): `.numeric` is `font-variant-numeric: tabular-nums`,
44
+ * `.monospace` additionally the monospace family. They are opt-ins that stack,
45
+ * and `numeric` additionally moves the default alignment to the right edge —
46
+ * which is the entire difference between this widget and a boxed list.
47
+ *
48
+ * `align` is deliberately unvalidated (the last row): a value outside the union
49
+ * produces a class no stylesheet claims, and the cell keeps the base rule's
50
+ * alignment. The variant table below IS validated, because a bogus variant would
51
+ * pick an emphasis rather than merely fail to move text.
52
+ */
53
+ export declare const DATA_GRID_COLUMN_CLASS_VECTORS: ReadonlyArray<DataGridColumnClassVector>;
54
+ /** One variant-normalisation expectation. */
55
+ export interface DataGridVariantVector {
56
+ /** The raw `variant` value off the row object. */
57
+ input: unknown;
58
+ /** What it normalises to. */
59
+ variant: AdwDataGridRowVariant;
60
+ /** Why this row exists. */
61
+ rule: string;
62
+ }
63
+ /**
64
+ * `normalizeDataGridVariant`.
65
+ *
66
+ * Unlike the alignment, this one IS clamped: the variant picks a row's EMPHASIS
67
+ * — a spanning bold section title, a hairline rule above a subtotal, a double
68
+ * rule above the total — so an unrecognised value must fall back to the plain
69
+ * data row rather than to no rule at all.
70
+ */
71
+ export declare const DATA_GRID_VARIANT_VECTORS: ReadonlyArray<DataGridVariantVector>;
72
+ /** One cell-text expectation. */
73
+ export interface DataGridCellTextVector {
74
+ /** The raw value under the column's key. */
75
+ input: string | number | boolean | undefined | null;
76
+ /** What the cell paints. */
77
+ text: string;
78
+ /** Why this row exists. */
79
+ rule: string;
80
+ }
81
+ /**
82
+ * `dataGridCellText`.
83
+ *
84
+ * The grid formats NOTHING — a cell value is a pre-formatted string, because
85
+ * only the app knows the locale, the currency and the rounding. So the rule is
86
+ * only about the two empties, and the rows that matter are `0` and `false`: a
87
+ * truthiness test would blank both, and a blanked `0` in a statement column is a
88
+ * missing figure, not a zero one.
89
+ */
90
+ export declare const DATA_GRID_CELL_TEXT_VECTORS: ReadonlyArray<DataGridCellTextVector>;
91
+ /** One activation expectation. */
92
+ export interface DataGridInteractiveVector {
93
+ /** The row's normalised variant. */
94
+ variant: AdwDataGridRowVariant;
95
+ /** The row's own `interactive` value, as it arrives (JSON can hold anything). */
96
+ rowFlag: unknown;
97
+ /** The grid-level `interactive` flag. */
98
+ gridInteractive: boolean;
99
+ /** Whether the row activates. */
100
+ interactive: boolean;
101
+ /** Why this row exists. */
102
+ rule: string;
103
+ }
104
+ /**
105
+ * `dataGridRowInteractive`.
106
+ *
107
+ * Two independent rules, and both have a failure mode worth a row. Only a
108
+ * `normal` row can ever activate: a section header, a subtotal and a total are
109
+ * structure, and offering a detail view for a computed line leads nowhere. And
110
+ * the per-row flag overrides the grid-level one in BOTH directions, which is the
111
+ * part a single `||` or `&&` gets wrong.
112
+ */
113
+ export declare const DATA_GRID_INTERACTIVE_VECTORS: ReadonlyArray<DataGridInteractiveVector>;
114
+ /** One column-normalisation expectation. */
115
+ export interface DataGridColumnNormalizeVector {
116
+ /** What the row is about. */
117
+ name: string;
118
+ /** The raw value — a parsed JSON attribute, so genuinely anything. */
119
+ input: unknown;
120
+ /** The normalised descriptors. */
121
+ columns: ReadonlyArray<AdwDataGridColumn>;
122
+ /** Why this row exists. */
123
+ rule: string;
124
+ }
125
+ /**
126
+ * `normalizeDataGridColumns`.
127
+ *
128
+ * The input is a parsed JSON attribute, so every field has to survive a value of
129
+ * the wrong type. Two policies run side by side and the rows say which is which:
130
+ * an entry WITHOUT a `key` is dropped (there is nothing to read from a row), and
131
+ * a field of the wrong type is coerced (`key`, `label`, `width`) or discarded
132
+ * (`flex`, `monospace`, `numeric`) rather than taking the whole entry down.
133
+ */
134
+ export declare const DATA_GRID_COLUMN_NORMALIZE_VECTORS: ReadonlyArray<DataGridColumnNormalizeVector>;