@gjsify/adwaita-core 0.36.0 → 0.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/esm/conformance/index.js +1 -1
- package/lib/esm/conformance/shortcut-label.js +1 -0
- package/lib/esm/index.js +1 -1
- package/lib/esm/shortcut-label.js +1 -0
- package/lib/types/about-dialog.d.ts +92 -98
- package/lib/types/action-row.d.ts +95 -125
- package/lib/types/avatar.d.ts +30 -37
- package/lib/types/banner.d.ts +25 -53
- package/lib/types/breakpoint.d.ts +6 -7
- package/lib/types/button-content.d.ts +41 -80
- package/lib/types/carousel.d.ts +175 -252
- package/lib/types/checks.d.ts +13 -30
- package/lib/types/chrome.d.ts +90 -136
- package/lib/types/color-scheme.d.ts +5 -6
- package/lib/types/conformance/about-dialog.d.ts +64 -91
- package/lib/types/conformance/action-row.d.ts +26 -46
- package/lib/types/conformance/avatar.d.ts +8 -10
- package/lib/types/conformance/banner.d.ts +17 -37
- package/lib/types/conformance/button-content.d.ts +24 -46
- package/lib/types/conformance/carousel.d.ts +35 -75
- package/lib/types/conformance/checks.d.ts +0 -4
- package/lib/types/conformance/chrome.d.ts +28 -36
- package/lib/types/conformance/data-grid.d.ts +28 -47
- package/lib/types/conformance/dialog.d.ts +4 -9
- package/lib/types/conformance/entry-row.d.ts +20 -39
- package/lib/types/conformance/index.d.ts +2 -0
- package/lib/types/conformance/navigation-view.d.ts +0 -4
- package/lib/types/conformance/popover.d.ts +4 -9
- package/lib/types/conformance/preferences.d.ts +15 -28
- package/lib/types/conformance/rows.d.ts +5 -12
- package/lib/types/conformance/shortcut-label.d.ts +34 -0
- package/lib/types/conformance/sidebar.d.ts +28 -49
- package/lib/types/conformance/spinner.d.ts +21 -27
- package/lib/types/conformance/split-button.d.ts +21 -43
- package/lib/types/conformance/split-view.d.ts +29 -36
- package/lib/types/conformance/tab-view.d.ts +32 -73
- package/lib/types/conformance/view-stack.d.ts +0 -12
- package/lib/types/conformance/view-switcher.d.ts +46 -114
- package/lib/types/conformance/wrap-box.d.ts +40 -63
- package/lib/types/data-grid.d.ts +38 -48
- package/lib/types/dialog.d.ts +39 -51
- package/lib/types/easing.d.ts +6 -12
- package/lib/types/entry-row.d.ts +94 -123
- package/lib/types/glib.d.ts +17 -25
- package/lib/types/index.d.ts +2 -0
- package/lib/types/length-unit.d.ts +7 -12
- package/lib/types/navigation-view.d.ts +62 -68
- package/lib/types/popover.d.ts +39 -66
- package/lib/types/preferences.d.ts +83 -100
- package/lib/types/rows.d.ts +45 -63
- package/lib/types/shortcut-label.d.ts +79 -0
- package/lib/types/shortcut-label.spec.d.ts +2 -0
- package/lib/types/sidebar.d.ts +95 -121
- package/lib/types/spinner.d.ts +39 -61
- package/lib/types/split-button.d.ts +78 -134
- package/lib/types/split-view.d.ts +74 -89
- package/lib/types/tab-view.d.ts +174 -256
- package/lib/types/view-stack.d.ts +87 -129
- package/lib/types/view-switcher.d.ts +126 -211
- package/lib/types/wrap-box.d.ts +62 -123
- package/package.json +3 -3
|
@@ -9,10 +9,11 @@ export interface ClampThresholdsVector {
|
|
|
9
9
|
max: number;
|
|
10
10
|
/** `lower + 3 * (max - lower)`. */
|
|
11
11
|
upper: number;
|
|
12
|
-
/** Why this row exists. */
|
|
13
12
|
rule: string;
|
|
14
13
|
}
|
|
15
|
-
/**
|
|
14
|
+
/**
|
|
15
|
+
* `lower`/`max`/`upper`.
|
|
16
|
+
*
|
|
16
17
|
* CORE-ONLY: an internal step of a pipeline whose COMPOSED result is renderer-driven — driving it separately would assert the same thing twice (CLAMP_ALLOCATE_VECTORS)
|
|
17
18
|
*/
|
|
18
19
|
export declare const CLAMP_THRESHOLD_VECTORS: ReadonlyArray<ClampThresholdsVector>;
|
|
@@ -24,10 +25,11 @@ export interface ClampChildSizeVector {
|
|
|
24
25
|
params: ClampParams;
|
|
25
26
|
/** What the child is allocated. */
|
|
26
27
|
childSize: number;
|
|
27
|
-
/** Why this row exists. */
|
|
28
28
|
rule: string;
|
|
29
29
|
}
|
|
30
|
-
/**
|
|
30
|
+
/**
|
|
31
|
+
* `child_size_from_clamp`.
|
|
32
|
+
*
|
|
31
33
|
* CORE-ONLY: an internal step of a pipeline whose COMPOSED result is renderer-driven — driving it separately would assert the same thing twice (CLAMP_ALLOCATE_VECTORS)
|
|
32
34
|
*/
|
|
33
35
|
export declare const CLAMP_CHILD_SIZE_VECTORS: ReadonlyArray<ClampChildSizeVector>;
|
|
@@ -39,10 +41,11 @@ export interface ClampSizeFromChildVector {
|
|
|
39
41
|
params: ClampParams;
|
|
40
42
|
/** The size the clamp itself reports for it. */
|
|
41
43
|
clampSize: number;
|
|
42
|
-
/** Why this row exists. */
|
|
43
44
|
rule: string;
|
|
44
45
|
}
|
|
45
|
-
/**
|
|
46
|
+
/**
|
|
47
|
+
* `clamp_size_from_child` — the inverse ease.
|
|
48
|
+
*
|
|
46
49
|
* CORE-ONLY: an internal step of a pipeline whose COMPOSED result is renderer-driven — driving it separately would assert the same thing twice (CLAMP_ALLOCATE_VECTORS)
|
|
47
50
|
*/
|
|
48
51
|
export declare const CLAMP_SIZE_FROM_CHILD_VECTORS: ReadonlyArray<ClampSizeFromChildVector>;
|
|
@@ -60,37 +63,30 @@ export interface ClampAllocateVector {
|
|
|
60
63
|
lowerThreshold: number;
|
|
61
64
|
/** The style class the CHILD carries. */
|
|
62
65
|
sizeClass: AdwClampSizeClass;
|
|
63
|
-
/** The centring offset. */
|
|
64
66
|
offset: number;
|
|
65
|
-
/** Why this row exists. */
|
|
66
67
|
rule: string;
|
|
67
68
|
}
|
|
68
|
-
/** `adw_clamp_layout_allocate
|
|
69
|
+
/** `adw_clamp_layout_allocate`. */
|
|
69
70
|
export declare const CLAMP_ALLOCATE_VECTORS: ReadonlyArray<ClampAllocateVector>;
|
|
70
71
|
/** One `normalizeClampSize` expectation. */
|
|
71
72
|
export interface ClampPropertyVector {
|
|
72
73
|
/** The raw attribute value or property assignment. */
|
|
73
74
|
value: number | string | null | undefined;
|
|
74
|
-
/** The default the property falls back to. */
|
|
75
75
|
fallback: number;
|
|
76
76
|
/** The value that reaches the layout. */
|
|
77
77
|
size: number;
|
|
78
|
-
/** Why this row exists. */
|
|
79
78
|
rule: string;
|
|
80
79
|
}
|
|
81
80
|
/**
|
|
82
|
-
* `maximum-size` / `tightening-threshold` as `g_param_spec_int (…, 0, G_MAXINT, …)
|
|
83
|
-
* (adw-clamp-layout.c:413-416, :448-451).
|
|
81
|
+
* `maximum-size` / `tightening-threshold` as `g_param_spec_int (…, 0, G_MAXINT, …)`.
|
|
84
82
|
*
|
|
85
|
-
* The three interesting rows
|
|
86
|
-
*
|
|
87
|
-
* DEFAULT applies — the browser port kept whatever cap was already set), and a
|
|
83
|
+
* The three interesting rows: `"0"` (valid, and NOT the default), a non-numeric value
|
|
84
|
+
* (never reaches the layout, so the DEFAULT applies rather than the cap already set), and a
|
|
88
85
|
* negative (out of range, clamped to the range floor).
|
|
89
86
|
*/
|
|
90
87
|
export declare const CLAMP_PROPERTY_VECTORS: ReadonlyArray<ClampPropertyVector>;
|
|
91
88
|
/** One `toolbarViewAllocate` expectation. */
|
|
92
89
|
export interface ToolbarViewAllocateVector {
|
|
93
|
-
/** The measured sizes going in. */
|
|
94
90
|
input: ToolbarViewAllocateInput;
|
|
95
91
|
/** `Adw.ToolbarView:top-bar-height`. */
|
|
96
92
|
topBarHeight: number;
|
|
@@ -100,25 +96,26 @@ export interface ToolbarViewAllocateVector {
|
|
|
100
96
|
contentHeight: number;
|
|
101
97
|
/** The content's offset from the top edge. */
|
|
102
98
|
contentOffset: number;
|
|
103
|
-
/** Why this row exists. */
|
|
104
99
|
rule: string;
|
|
105
100
|
}
|
|
106
|
-
/**
|
|
101
|
+
/**
|
|
102
|
+
* `adw_toolbar_view_size_allocate`.
|
|
103
|
+
*
|
|
107
104
|
* CORE-ONLY: both renderers let the BROWSER and NativeScript lay the bars out rather than allocating by hand, so there is no allocation of theirs to compare — the rule they DO apply is TOOLBAR_VIEW_CLASS_VECTORS, which both drive. This reason used to live in the two `adw-toolbar-view.ts` files and nowhere a reader of this table would look
|
|
108
105
|
*/
|
|
109
106
|
export declare const TOOLBAR_VIEW_ALLOCATE_VECTORS: ReadonlyArray<ToolbarViewAllocateVector>;
|
|
110
107
|
/** One `toolbarViewMeasure` expectation. */
|
|
111
108
|
export interface ToolbarViewMeasureVector {
|
|
112
|
-
/** The measured sizes going in. */
|
|
113
109
|
input: ToolbarViewMeasureInput;
|
|
114
110
|
/** The view's minimum along the measured axis. */
|
|
115
111
|
minimum: number;
|
|
116
112
|
/** The view's natural along the measured axis. */
|
|
117
113
|
natural: number;
|
|
118
|
-
/** Why this row exists. */
|
|
119
114
|
rule: string;
|
|
120
115
|
}
|
|
121
|
-
/**
|
|
116
|
+
/**
|
|
117
|
+
* `adw_toolbar_view_measure`.
|
|
118
|
+
*
|
|
122
119
|
* CORE-ONLY: same as TOOLBAR_VIEW_ALLOCATE_VECTORS — neither renderer measures the bars itself
|
|
123
120
|
*/
|
|
124
121
|
export declare const TOOLBAR_VIEW_MEASURE_VECTORS: ReadonlyArray<ToolbarViewMeasureVector>;
|
|
@@ -126,16 +123,16 @@ export declare const TOOLBAR_VIEW_MEASURE_VECTORS: ReadonlyArray<ToolbarViewMeas
|
|
|
126
123
|
export interface ToolbarViewContentForSizeVector {
|
|
127
124
|
/** The `for_size` the view was measured at. */
|
|
128
125
|
forSize: number;
|
|
129
|
-
/** The bar heights and extend flags. */
|
|
130
126
|
input: ToolbarViewContentForSizeInput;
|
|
131
127
|
/** `for_size` for the content's minimum. */
|
|
132
128
|
forSizeMin: number;
|
|
133
129
|
/** `for_size` for the content's natural. */
|
|
134
130
|
forSizeNat: number;
|
|
135
|
-
/** Why this row exists. */
|
|
136
131
|
rule: string;
|
|
137
132
|
}
|
|
138
|
-
/**
|
|
133
|
+
/**
|
|
134
|
+
* `adw_toolbar_view_measure`'s height-for-width branch.
|
|
135
|
+
*
|
|
139
136
|
* CORE-ONLY: same as TOOLBAR_VIEW_ALLOCATE_VECTORS — neither renderer measures the bars itself
|
|
140
137
|
*/
|
|
141
138
|
export declare const TOOLBAR_VIEW_CONTENT_FOR_SIZE_VECTORS: ReadonlyArray<ToolbarViewContentForSizeVector>;
|
|
@@ -149,16 +146,13 @@ export interface ToolbarViewClassVector {
|
|
|
149
146
|
topBar: readonly string[];
|
|
150
147
|
/** Classes on the bottom-bar box. */
|
|
151
148
|
bottomBar: readonly string[];
|
|
152
|
-
/** Why this row exists. */
|
|
153
149
|
rule: string;
|
|
154
150
|
}
|
|
155
|
-
/** `update_undershoots`
|
|
151
|
+
/** `update_undershoots` + the style setters. */
|
|
156
152
|
export declare const TOOLBAR_VIEW_CLASS_VECTORS: ReadonlyArray<ToolbarViewClassVector>;
|
|
157
153
|
/** One `spinnerGeometry` expectation. */
|
|
158
154
|
export interface SpinnerGeometryVector {
|
|
159
|
-
/** Allocated box width. */
|
|
160
155
|
width: number;
|
|
161
|
-
/** Allocated box height. */
|
|
162
156
|
height: number;
|
|
163
157
|
/** `MIN (floorf (MIN (w, h) / 2), MAX_RADIUS)`. */
|
|
164
158
|
radius: number;
|
|
@@ -171,16 +165,15 @@ export interface SpinnerGeometryVector {
|
|
|
171
165
|
/** `roundf (height / 2)`. */
|
|
172
166
|
centerY: number;
|
|
173
167
|
/**
|
|
174
|
-
*
|
|
175
|
-
*
|
|
168
|
+
* The pre-lift browser formula `max(2, round(size / 12))`, or `null` for a
|
|
169
|
+
* non-square box, which that element had no notion of.
|
|
176
170
|
*/
|
|
177
171
|
legacyWebLineWidth: number | null;
|
|
178
|
-
/** Why this row exists. */
|
|
179
172
|
rule: string;
|
|
180
173
|
}
|
|
181
174
|
/**
|
|
182
|
-
* `adw_spinner_paintable_snapshot_with_weight`
|
|
183
|
-
* + `calculate_line_width`
|
|
175
|
+
* `adw_spinner_paintable_snapshot_with_weight`
|
|
176
|
+
* + `calculate_line_width` at the default weight 400.
|
|
184
177
|
*
|
|
185
178
|
* `legacyWebLineWidth` stays in the table on purpose: it is the formula the
|
|
186
179
|
* browser element shipped, and it is wrong at every size above 16 — 2px where
|
|
@@ -193,11 +186,10 @@ export interface SpinnerSizeVector {
|
|
|
193
186
|
value: number | string | null | undefined;
|
|
194
187
|
/** The box the spinner is given. */
|
|
195
188
|
size: number;
|
|
196
|
-
/** Why this row exists. */
|
|
197
189
|
rule: string;
|
|
198
190
|
}
|
|
199
191
|
/**
|
|
200
|
-
* `adw_spinner_measure`
|
|
192
|
+
* `adw_spinner_measure` — minimum AND natural are both
|
|
201
193
|
* `MIN_SIZE`, and GTK never allocates below a widget's minimum.
|
|
202
194
|
*
|
|
203
195
|
* The rows without a usable value all land on 16, which is the measured natural
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { AdwDataGridColumn, AdwDataGridRowVariant, DataGridTrack } from '../data-grid.js';
|
|
2
2
|
/** One track-derivation expectation. */
|
|
3
3
|
export interface DataGridTrackVector {
|
|
4
|
-
/** What the row is about. */
|
|
5
4
|
name: string;
|
|
6
5
|
/** The column descriptors handed to `dataGridTracks`. */
|
|
7
6
|
columns: ReadonlyArray<AdwDataGridColumn>;
|
|
@@ -9,64 +8,55 @@ export interface DataGridTrackVector {
|
|
|
9
8
|
tracks: ReadonlyArray<DataGridTrack>;
|
|
10
9
|
/** The browser mapping — a `grid-template-columns` value. */
|
|
11
10
|
template: string;
|
|
12
|
-
/** Why this row exists. */
|
|
13
11
|
rule: string;
|
|
14
12
|
}
|
|
15
13
|
/**
|
|
16
14
|
* `dataGridTracks` + `dataGridTrackTemplate`.
|
|
17
15
|
*
|
|
18
|
-
* The rule
|
|
16
|
+
* The rule needing the most rows is the implicit one: with NO `width` and NO
|
|
19
17
|
* `flex` anywhere, the FIRST column absorbs the slack and the rest size to
|
|
20
|
-
* content. It is global, so
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* "every column hugs its content".
|
|
18
|
+
* content. It is global, so one declared size anywhere turns it off for every
|
|
19
|
+
* column — the difference between "label column stretches, figures hug the right
|
|
20
|
+
* edge" and "every column hugs its content".
|
|
24
21
|
*/
|
|
25
22
|
export declare const DATA_GRID_TRACK_VECTORS: ReadonlyArray<DataGridTrackVector>;
|
|
26
23
|
/** One cell-class expectation. */
|
|
27
24
|
export interface DataGridColumnClassVector {
|
|
28
|
-
/** What the row is about. */
|
|
29
25
|
name: string;
|
|
30
|
-
/** The column descriptor. */
|
|
31
26
|
column: AdwDataGridColumn;
|
|
32
|
-
/** The effective alignment. */
|
|
33
27
|
align: string;
|
|
34
28
|
/** The full class list, in order. */
|
|
35
29
|
classes: ReadonlyArray<string>;
|
|
36
|
-
/** Why this row exists. */
|
|
37
30
|
rule: string;
|
|
38
31
|
}
|
|
39
32
|
/**
|
|
40
33
|
* `dataGridColumnAlign` + `dataGridColumnClasses`.
|
|
41
34
|
*
|
|
42
|
-
* `numeric` and `mono` are libadwaita's own label classes
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
* which is the entire difference between this widget and a boxed list.
|
|
35
|
+
* `numeric` and `mono` are libadwaita's own label classes (`_labels.scss`):
|
|
36
|
+
* `.numeric` is `font-variant-numeric: tabular-nums`, `.monospace` additionally
|
|
37
|
+
* the monospace family. They stack, and `numeric` also moves the default
|
|
38
|
+
* alignment to the right edge.
|
|
47
39
|
*
|
|
48
40
|
* `align` is deliberately unvalidated (the last row): a value outside the union
|
|
49
|
-
* produces a class no stylesheet claims
|
|
50
|
-
*
|
|
51
|
-
*
|
|
41
|
+
* produces a class no stylesheet claims and the cell keeps the base alignment.
|
|
42
|
+
* The variant table below IS validated, a bogus variant picking an emphasis
|
|
43
|
+
* rather than merely failing to move text.
|
|
52
44
|
*/
|
|
53
45
|
export declare const DATA_GRID_COLUMN_CLASS_VECTORS: ReadonlyArray<DataGridColumnClassVector>;
|
|
54
46
|
/** One variant-normalisation expectation. */
|
|
55
47
|
export interface DataGridVariantVector {
|
|
56
48
|
/** The raw `variant` value off the row object. */
|
|
57
49
|
input: unknown;
|
|
58
|
-
/** What it normalises to. */
|
|
59
50
|
variant: AdwDataGridRowVariant;
|
|
60
|
-
/** Why this row exists. */
|
|
61
51
|
rule: string;
|
|
62
52
|
}
|
|
63
53
|
/**
|
|
64
54
|
* `normalizeDataGridVariant`.
|
|
65
55
|
*
|
|
66
|
-
* Unlike the alignment, this one IS clamped: the variant picks a row's EMPHASIS
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
56
|
+
* Unlike the alignment, this one IS clamped: the variant picks a row's EMPHASIS —
|
|
57
|
+
* a spanning bold section title, a hairline above a subtotal, a double rule above
|
|
58
|
+
* the total — so an unrecognised value falls back to the plain data row rather
|
|
59
|
+
* than to no rule at all.
|
|
70
60
|
*/
|
|
71
61
|
export declare const DATA_GRID_VARIANT_VECTORS: ReadonlyArray<DataGridVariantVector>;
|
|
72
62
|
/** One cell-text expectation. */
|
|
@@ -75,61 +65,52 @@ export interface DataGridCellTextVector {
|
|
|
75
65
|
input: string | number | boolean | undefined | null;
|
|
76
66
|
/** What the cell paints. */
|
|
77
67
|
text: string;
|
|
78
|
-
/** Why this row exists. */
|
|
79
68
|
rule: string;
|
|
80
69
|
}
|
|
81
70
|
/**
|
|
82
71
|
* `dataGridCellText`.
|
|
83
72
|
*
|
|
84
|
-
* The grid formats NOTHING — a cell value is a pre-formatted string,
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
* missing figure, not a zero one.
|
|
73
|
+
* The grid formats NOTHING — a cell value is a pre-formatted string, only the app
|
|
74
|
+
* knowing the locale, currency and rounding. So the rule is only about the two
|
|
75
|
+
* empties, and the rows that matter are `0` and `false`: a truthiness test blanks
|
|
76
|
+
* both, and a blanked `0` in a statement column is a missing figure, not a zero.
|
|
89
77
|
*/
|
|
90
78
|
export declare const DATA_GRID_CELL_TEXT_VECTORS: ReadonlyArray<DataGridCellTextVector>;
|
|
91
79
|
/** One activation expectation. */
|
|
92
80
|
export interface DataGridInteractiveVector {
|
|
93
|
-
/** The row's normalised variant. */
|
|
94
81
|
variant: AdwDataGridRowVariant;
|
|
95
82
|
/** The row's own `interactive` value, as it arrives (JSON can hold anything). */
|
|
96
83
|
rowFlag: unknown;
|
|
97
84
|
/** The grid-level `interactive` flag. */
|
|
98
85
|
gridInteractive: boolean;
|
|
99
|
-
/** Whether the row activates. */
|
|
100
86
|
interactive: boolean;
|
|
101
|
-
/** Why this row exists. */
|
|
102
87
|
rule: string;
|
|
103
88
|
}
|
|
104
89
|
/**
|
|
105
90
|
* `dataGridRowInteractive`.
|
|
106
91
|
*
|
|
107
|
-
* Two independent rules,
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
* part a single `||` or `&&` gets wrong.
|
|
92
|
+
* Two independent rules, each with a failure mode worth a row. Only a `normal`
|
|
93
|
+
* row can activate — a header, subtotal and total are structure, and a detail
|
|
94
|
+
* view for a computed line leads nowhere. And the per-row flag overrides the
|
|
95
|
+
* grid-level one in BOTH directions, which a single `||` or `&&` gets wrong.
|
|
112
96
|
*/
|
|
113
97
|
export declare const DATA_GRID_INTERACTIVE_VECTORS: ReadonlyArray<DataGridInteractiveVector>;
|
|
114
98
|
/** One column-normalisation expectation. */
|
|
115
99
|
export interface DataGridColumnNormalizeVector {
|
|
116
|
-
/** What the row is about. */
|
|
117
100
|
name: string;
|
|
118
101
|
/** The raw value — a parsed JSON attribute, so genuinely anything. */
|
|
119
102
|
input: unknown;
|
|
120
|
-
/** The normalised descriptors. */
|
|
121
103
|
columns: ReadonlyArray<AdwDataGridColumn>;
|
|
122
|
-
/** Why this row exists. */
|
|
123
104
|
rule: string;
|
|
124
105
|
}
|
|
125
106
|
/**
|
|
126
107
|
* `normalizeDataGridColumns`.
|
|
127
108
|
*
|
|
128
|
-
* The input is a parsed JSON attribute, so every field
|
|
129
|
-
* the wrong type. Two policies run side by side
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
*
|
|
109
|
+
* The input is a parsed JSON attribute, so every field must survive a value of
|
|
110
|
+
* the wrong type. Two policies run side by side: an entry WITHOUT a `key` is
|
|
111
|
+
* dropped (nothing to read from a row), and a field of the wrong type is coerced
|
|
112
|
+
* (`key`, `label`, `width`) or discarded (`flex`, `monospace`, `numeric`) rather
|
|
113
|
+
* than taking the whole entry down.
|
|
133
114
|
*
|
|
134
115
|
* CORE-ONLY: an internal step of a pipeline whose COMPOSED result is renderer-driven — driving it separately would assert the same thing twice (DATA_GRID_TRACK_VECTORS)
|
|
135
116
|
*/
|
|
@@ -9,9 +9,7 @@ export interface BottomSheetCloseVector {
|
|
|
9
9
|
canClose: boolean;
|
|
10
10
|
/** What the C source does with it. */
|
|
11
11
|
outcome: BottomSheetCloseOutcome;
|
|
12
|
-
/** Why this row exists — the rule or corner it pins down. */
|
|
13
12
|
rule: string;
|
|
14
|
-
/** The C function + lines it is derived from. */
|
|
15
13
|
derivedFrom: string;
|
|
16
14
|
}
|
|
17
15
|
/**
|
|
@@ -59,9 +57,7 @@ export interface BottomSheetPresentationVector {
|
|
|
59
57
|
open: boolean;
|
|
60
58
|
/** `has_been_open` after the last step. */
|
|
61
59
|
hasBeenOpen: boolean;
|
|
62
|
-
/** Why this row exists. */
|
|
63
60
|
rule: string;
|
|
64
|
-
/** The C function + lines it is derived from. */
|
|
65
61
|
derivedFrom: string;
|
|
66
62
|
}
|
|
67
63
|
/**
|
|
@@ -88,10 +84,9 @@ export declare function runBottomSheetSteps(adapter: BottomSheetPresentationAdap
|
|
|
88
84
|
* `adw_bottom_sheet_set_open`'s state machine as scripts: the idempotent guard,
|
|
89
85
|
* the never-been-open teardown replay, and which paths notify.
|
|
90
86
|
*
|
|
91
|
-
* The `notifications` column
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
* unchanged payload.
|
|
87
|
+
* The `notifications` column caught a live bug: emitting `notify::open` whenever the open
|
|
88
|
+
* ATTRIBUTE VALUE changes rather than when the open STATE changes makes
|
|
89
|
+
* `setAttribute('open','')` then `setAttribute('open','false')` fire a second notification
|
|
90
|
+
* carrying an unchanged payload.
|
|
96
91
|
*/
|
|
97
92
|
export declare const BOTTOM_SHEET_PRESENTATION_VECTORS: ReadonlyArray<BottomSheetPresentationVector>;
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
import type { EntryRowActivation, EntryRowRenderState, PasswordEntryRowRenderState } from '../entry-row.js';
|
|
2
2
|
/** One `entryTextLength` expectation. */
|
|
3
3
|
export interface EntryTextLengthVector {
|
|
4
|
-
/** The entry contents. */
|
|
5
4
|
text: string;
|
|
6
5
|
/** `adw_entry_row_get_text_length` — "The current number of characters". */
|
|
7
6
|
length: number;
|
|
8
|
-
/** Why this row exists. */
|
|
9
7
|
rule: string;
|
|
10
8
|
}
|
|
11
9
|
/**
|
|
12
|
-
* `adw_entry_row_get_text_length
|
|
13
|
-
* declared `0, G_MAXUINT16, 0` (C:666-669).
|
|
10
|
+
* `adw_entry_row_get_text_length`, whose property is declared `0, G_MAXUINT16, 0`.
|
|
14
11
|
*
|
|
15
12
|
* The astral rows are the point: `'🔒é'.length` is 3 in JS because JS counts
|
|
16
13
|
* UTF-16 units, and GTK counts characters. A port that gets this wrong also
|
|
@@ -27,14 +24,13 @@ export interface EntryMaxLengthVector {
|
|
|
27
24
|
clamped: string;
|
|
28
25
|
/** {@link EntryTextLengthVector.length} of {@link clamped}. */
|
|
29
26
|
length: number;
|
|
30
|
-
/** Why this row exists. */
|
|
31
27
|
rule: string;
|
|
32
28
|
}
|
|
33
29
|
/**
|
|
34
|
-
* `adw_entry_row_set_max_length`
|
|
30
|
+
* `adw_entry_row_set_max_length` read together with
|
|
35
31
|
* the property doc "Maximum number of characters for the entry" and its
|
|
36
|
-
* `0..GTK_ENTRY_BUFFER_MAX_SIZE` range with `0` as both default and floor
|
|
37
|
-
*
|
|
32
|
+
* `0..GTK_ENTRY_BUFFER_MAX_SIZE` range with `0` as both default and floor.
|
|
33
|
+
*
|
|
38
34
|
*/
|
|
39
35
|
export declare const ENTRY_MAX_LENGTH_VECTORS: ReadonlyArray<EntryMaxLengthVector>;
|
|
40
36
|
/**
|
|
@@ -67,28 +63,22 @@ export type EntryRowStep = {
|
|
|
67
63
|
};
|
|
68
64
|
/** One `update_empty` truth-table row: a scenario and the FULL snapshot it lands on. */
|
|
69
65
|
export interface EntryRowStateVector {
|
|
70
|
-
/** Human-readable scenario name (used as the test title). */
|
|
71
66
|
name: string;
|
|
72
|
-
/** Applied in order to a freshly-constructed entry row. */
|
|
73
67
|
steps: ReadonlyArray<EntryRowStep>;
|
|
74
|
-
/** Every output of the derivation afterwards. */
|
|
75
68
|
expected: EntryRowRenderState;
|
|
76
|
-
/** The C rule this row pins down. */
|
|
77
69
|
rule: string;
|
|
78
70
|
}
|
|
79
71
|
/**
|
|
80
|
-
* `update_empty`
|
|
81
|
-
*
|
|
82
|
-
* turned off C:989-992).
|
|
72
|
+
* `update_empty` plus the `text_changed` latch and its two reset paths (the apply click, the
|
|
73
|
+
* property turned off).
|
|
83
74
|
*
|
|
84
75
|
* Defaults of a fresh row: no text, unlimited length, not editing, EDITABLE,
|
|
85
76
|
* no apply button, no indicator — plus the indicator and apply button starting
|
|
86
|
-
* child-invisible (`adw_entry_row_init
|
|
77
|
+
* child-invisible (`adw_entry_row_init`).
|
|
87
78
|
*/
|
|
88
79
|
export declare const ENTRY_ROW_STATE_VECTORS: ReadonlyArray<EntryRowStateVector>;
|
|
89
80
|
/** One `text_activated_cb` expectation. */
|
|
90
81
|
export interface EntryRowActivationVector {
|
|
91
|
-
/** Human-readable scenario name. */
|
|
92
82
|
name: string;
|
|
93
83
|
/** Applied in order to a freshly-constructed entry row before pressing Enter. */
|
|
94
84
|
steps: ReadonlyArray<EntryRowStep>;
|
|
@@ -96,35 +86,31 @@ export interface EntryRowActivationVector {
|
|
|
96
86
|
activation: EntryRowActivation;
|
|
97
87
|
/** The latch afterwards (`apply` clears it; `entry-activated` leaves state alone). */
|
|
98
88
|
textChangedAfter: boolean;
|
|
99
|
-
/** The C rule this row pins down. */
|
|
100
89
|
rule: string;
|
|
101
90
|
}
|
|
102
91
|
/**
|
|
103
|
-
* `text_activated_cb
|
|
104
|
-
* button is child-visible, otherwise activate-the-default
|
|
105
|
-
* by `entry-activated`
|
|
92
|
+
* `text_activated_cb`: the apply path when the apply
|
|
93
|
+
* button is child-visible, otherwise activate-the-default followed
|
|
94
|
+
* by `entry-activated` — in that order.
|
|
106
95
|
*/
|
|
107
96
|
export declare const ENTRY_ROW_ACTIVATION_VECTORS: ReadonlyArray<EntryRowActivationVector>;
|
|
108
97
|
/** One setter-guard expectation: what each step returns, and how many re-derivations the sequence causes. */
|
|
109
98
|
export interface EntryRowGuardVector {
|
|
110
|
-
/** Human-readable scenario name. */
|
|
111
99
|
name: string;
|
|
112
|
-
/** Applied in order to a freshly-constructed entry row. */
|
|
113
100
|
steps: ReadonlyArray<EntryRowStep>;
|
|
114
101
|
/** Per step: the setter's return value, or `null` for the `void` `setShowIndicator`. */
|
|
115
102
|
returns: ReadonlyArray<boolean | null>;
|
|
116
103
|
/** How many times subscribers are notified across the whole sequence. */
|
|
117
104
|
notifications: number;
|
|
118
|
-
/** The C rule this row pins down. */
|
|
119
105
|
rule: string;
|
|
120
106
|
}
|
|
121
107
|
/**
|
|
122
108
|
* The guards are NOT uniform, and the asymmetry is the point: every public
|
|
123
|
-
* setter early-outs on an unchanged value
|
|
124
|
-
* the private `adw_entry_row_set_show_indicator`
|
|
109
|
+
* setter early-outs on an unchanged value, while
|
|
110
|
+
* the private `adw_entry_row_set_show_indicator` deliberately has
|
|
125
111
|
* NO equality check and re-derives unconditionally.
|
|
126
112
|
*
|
|
127
|
-
* CORE-ONLY: GAP — the browser element
|
|
113
|
+
* CORE-ONLY: GAP — the browser element exposes these as attributes and void methods, so a setter's boolean return is not observable through the DOM surface. Tracked in #1072
|
|
128
114
|
*/
|
|
129
115
|
export declare const ENTRY_ROW_GUARD_VECTORS: ReadonlyArray<EntryRowGuardVector>;
|
|
130
116
|
/** One mutation in a password-entry-row scenario. */
|
|
@@ -144,7 +130,6 @@ export type PasswordEntryRowStep = {
|
|
|
144
130
|
};
|
|
145
131
|
/** One password-entry-row expectation: the peek/caps-lock snapshot plus what it did to the parent row. */
|
|
146
132
|
export interface PasswordEntryRowVector {
|
|
147
|
-
/** Human-readable scenario name. */
|
|
148
133
|
name: string;
|
|
149
134
|
/** Applied in order to a freshly-constructed password entry row. */
|
|
150
135
|
steps: ReadonlyArray<PasswordEntryRowStep>;
|
|
@@ -152,19 +137,17 @@ export interface PasswordEntryRowVector {
|
|
|
152
137
|
expected: PasswordEntryRowRenderState;
|
|
153
138
|
/** `indicatorVisible` on the composed entry row — the caps-lock warning the user actually sees. */
|
|
154
139
|
entryIndicatorVisible: boolean;
|
|
155
|
-
/** The C rule this row pins down. */
|
|
156
140
|
rule: string;
|
|
157
141
|
}
|
|
158
142
|
/**
|
|
159
|
-
* `notify_visibility_cb`
|
|
160
|
-
*
|
|
161
|
-
* boolean: it is suppressed while PEEKING (
|
|
162
|
-
*
|
|
143
|
+
* `notify_visibility_cb` + `update_caps_lock`,
|
|
144
|
+
* and the two rules that make the caps-lock warning more than a
|
|
145
|
+
* boolean: it is suppressed while PEEKING (`!gtk_text_get_visibility`) and while UNFOCUSED
|
|
146
|
+
* (`editing && show_indicator`).
|
|
163
147
|
*/
|
|
164
148
|
export declare const PASSWORD_ENTRY_ROW_VECTORS: ReadonlyArray<PasswordEntryRowVector>;
|
|
165
149
|
/** One peek-notification expectation — how often a reveal change is observable. */
|
|
166
150
|
export interface PasswordRevealGuardVector {
|
|
167
|
-
/** Human-readable scenario name. */
|
|
168
151
|
name: string;
|
|
169
152
|
/** Reveal-only steps applied to a freshly-constructed password entry row. */
|
|
170
153
|
steps: ReadonlyArray<{
|
|
@@ -175,13 +158,11 @@ export interface PasswordRevealGuardVector {
|
|
|
175
158
|
}>;
|
|
176
159
|
/** How many reveal notifications the sequence produces. */
|
|
177
160
|
notifications: number;
|
|
178
|
-
/** The C rule this row pins down. */
|
|
179
161
|
rule: string;
|
|
180
162
|
}
|
|
181
163
|
/**
|
|
182
|
-
* The peek guard. Every settable property in this family early-outs on an
|
|
183
|
-
*
|
|
184
|
-
*
|
|
185
|
-
* `notify::revealed` on a same-value `setAttribute` a defect.
|
|
164
|
+
* The peek guard. Every settable property in this family early-outs on an unchanged value,
|
|
165
|
+
* so a redundant set is silent — an unguarded `notify::revealed` on a same-value
|
|
166
|
+
* `setAttribute` is a defect.
|
|
186
167
|
*/
|
|
187
168
|
export declare const PASSWORD_REVEAL_GUARD_VECTORS: ReadonlyArray<PasswordRevealGuardVector>;
|
|
@@ -40,6 +40,8 @@ export { BOTTOM_SHEET_CLOSE_VECTORS, BOTTOM_SHEET_PRESENTATION_VECTORS, runBotto
|
|
|
40
40
|
export type { BottomSheetCloseVector, BottomSheetPresentationAdapter, BottomSheetPresentationStep, BottomSheetPresentationVector, } from './dialog.js';
|
|
41
41
|
export { POPOVER_KEY_VECTORS, POPOVER_SURFACE_VECTORS } from './popover.js';
|
|
42
42
|
export type { PopoverKeyVector, PopoverSurfaceVariant, PopoverSurfaceVector } from './popover.js';
|
|
43
|
+
export { formatShortcutLabelNodes, SHORTCUT_LABEL_VECTORS } from './shortcut-label.js';
|
|
44
|
+
export type { ShortcutLabelVector } from './shortcut-label.js';
|
|
43
45
|
export { SPINNER_ARC_ENVELOPE, SPINNER_ARC_PHASE_VECTORS, SPINNER_ARC_TOLERANCE, SPINNER_CONSTANT_VECTORS, } from './spinner.js';
|
|
44
46
|
export type { SpinnerArcShapeVector, SpinnerConstantVector } from './spinner.js';
|
|
45
47
|
export { WRAP_BOX_CHILD_ORDER_VECTORS, WRAP_BOX_LENGTH_VECTORS, WRAP_BOX_LINE_VECTORS, WRAP_BOX_NATURAL_LENGTH_VECTORS, WRAP_BOX_NOTIFY_PROPERTIES, WRAP_BOX_POLICY_VECTORS, WRAP_BOX_SPACING_NOTIFY_VECTORS, WRAP_BOX_SPACING_VECTORS, } from './wrap-box.js';
|
|
@@ -124,13 +124,9 @@ export interface NavigationExpectation {
|
|
|
124
124
|
export interface NavigationVector {
|
|
125
125
|
/** Stable name — also the test title. */
|
|
126
126
|
name: string;
|
|
127
|
-
/** What rule the row pins down. */
|
|
128
127
|
rule: string;
|
|
129
|
-
/** The mutations to run, in order. */
|
|
130
128
|
steps: readonly NavigationStep[];
|
|
131
|
-
/** What must hold afterwards. */
|
|
132
129
|
expect: NavigationExpectation;
|
|
133
|
-
/** The C function + line the row is derived from. */
|
|
134
130
|
derivedFrom: string;
|
|
135
131
|
}
|
|
136
132
|
/**
|
|
@@ -9,7 +9,6 @@ export type PopoverSurfaceVariant =
|
|
|
9
9
|
| 'menu-item';
|
|
10
10
|
/** One popover surface expectation, derived from the vendored stylesheet. */
|
|
11
11
|
export interface PopoverSurfaceVector {
|
|
12
|
-
/** The surface under test. */
|
|
13
12
|
variant: PopoverSurfaceVariant;
|
|
14
13
|
/** Inner inset in px — where the whitespace around the content actually comes from. */
|
|
15
14
|
padding: number;
|
|
@@ -29,29 +28,25 @@ export interface PopoverSurfaceVector {
|
|
|
29
28
|
selector: string;
|
|
30
29
|
/** Where it is vendored, with lines. */
|
|
31
30
|
source: string;
|
|
32
|
-
/** Why this row exists. */
|
|
33
31
|
rule: string;
|
|
34
32
|
}
|
|
35
|
-
/** Popover surface metrics (_popovers.scss:13-21, _menus.scss:58-66
|
|
33
|
+
/** Popover surface metrics (_popovers.scss:13-21, _menus.scss:58-66). */
|
|
36
34
|
export declare const POPOVER_SURFACE_VECTORS: ReadonlyArray<PopoverSurfaceVector>;
|
|
37
35
|
/** One `resolvePopoverKey` expectation. */
|
|
38
36
|
export interface PopoverKeyVector {
|
|
39
37
|
/** `KeyboardEvent.key`. */
|
|
40
38
|
key: string;
|
|
41
|
-
/** The list state it is resolved against. */
|
|
42
39
|
context: PopoverKeyContext;
|
|
43
|
-
/** What the renderer must do. */
|
|
44
40
|
expected: PopoverKeyResolution;
|
|
45
|
-
/** Why this row exists. */
|
|
46
41
|
rule: string;
|
|
47
42
|
}
|
|
48
43
|
/**
|
|
49
44
|
* `resolvePopoverKey` — the wrap arithmetic `adw-menu-button.ts` and
|
|
50
45
|
* `adw-drop-down.ts` each carried a copy of, reconciled.
|
|
51
46
|
*
|
|
52
|
-
* The rows that matter are the ones
|
|
53
|
-
*
|
|
54
|
-
*
|
|
47
|
+
* The rows that matter are the ones the two copies got WRONG rather than merely
|
|
48
|
+
* duplicated: ArrowUp from an unfocused list (both computed `n - 2`), and Home/End while a
|
|
49
|
+
* search entry owns the caret (the drop-down stole both).
|
|
55
50
|
*
|
|
56
51
|
* CORE-ONLY: GAP — `adw-popover` calls `resolvePopoverKey` on keydown but publishes no readable outcome for a spec to compare. Tracked in #1072
|
|
57
52
|
*/
|