@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.
- package/lib/esm/accent.js +1 -0
- package/lib/esm/conformance/accent.js +1 -0
- 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/accent.d.ts +36 -0
- package/lib/types/accent.spec.d.ts +2 -0
- 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/accent.d.ts +20 -0
- 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 +4 -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 +4 -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
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/** A page as a vector declares it — the input half of `AdwViewStackPageSpec`. */
|
|
2
2
|
export interface ViewStackVectorPage {
|
|
3
|
-
/** The page name. */
|
|
4
3
|
name: string;
|
|
5
4
|
/** Explicit title; omitted means "fall back to the name". */
|
|
6
5
|
title?: string;
|
|
@@ -37,15 +36,12 @@ export interface ViewStackVectorChange {
|
|
|
37
36
|
}
|
|
38
37
|
/** One end-to-end view-stack expectation. */
|
|
39
38
|
export interface ViewStackVector {
|
|
40
|
-
/** What this row pins down. */
|
|
41
39
|
rule: string;
|
|
42
|
-
/** The C function + lines it is derived from. */
|
|
43
40
|
derivedFrom: string;
|
|
44
41
|
/** The pages, added in this order. */
|
|
45
42
|
pages: readonly ViewStackVectorPage[];
|
|
46
43
|
/** Changes emitted WHILE the pages are added (the auto-pick), in order. */
|
|
47
44
|
setupChanges: readonly ViewStackVectorChange[];
|
|
48
|
-
/** Operations applied after the pages exist. */
|
|
49
45
|
ops: readonly ViewStackVectorOp[];
|
|
50
46
|
/**
|
|
51
47
|
* Return value of each op, in order. Asserted by the core suite only — the
|
|
@@ -61,7 +57,6 @@ export interface ViewStackVector {
|
|
|
61
57
|
visibleName: string;
|
|
62
58
|
/** Final selected title, `''` for none. */
|
|
63
59
|
visibleTitle: string;
|
|
64
|
-
/** Final page count. */
|
|
65
60
|
count: number;
|
|
66
61
|
/** Expected `duplicateNames`, when the row exercises them. */
|
|
67
62
|
duplicateNames?: readonly string[];
|
|
@@ -78,15 +73,10 @@ export interface ViewStackVector {
|
|
|
78
73
|
export declare const VIEW_STACK_VECTORS: ReadonlyArray<ViewStackVector>;
|
|
79
74
|
/** One page-descriptor normalization expectation. */
|
|
80
75
|
export interface ViewStackPageDescriptorVector {
|
|
81
|
-
/** What this row pins down. */
|
|
82
76
|
rule: string;
|
|
83
|
-
/** The C property it is derived from. */
|
|
84
77
|
derivedFrom: string;
|
|
85
|
-
/** The declared page. */
|
|
86
78
|
page: ViewStackVectorPage;
|
|
87
|
-
/** Resolved `title`. */
|
|
88
79
|
title: string;
|
|
89
|
-
/** Resolved `icon`. */
|
|
90
80
|
icon: string;
|
|
91
81
|
/** Resolved `visible`. */
|
|
92
82
|
visible: boolean;
|
|
@@ -101,9 +91,7 @@ export declare const VIEW_STACK_PAGE_VECTORS: ReadonlyArray<ViewStackPageDescrip
|
|
|
101
91
|
export interface ViewStackIconNameVector {
|
|
102
92
|
/** The declared `icon-name`. */
|
|
103
93
|
icon: string | null | undefined;
|
|
104
|
-
/** The normalized result. */
|
|
105
94
|
normalized: string;
|
|
106
|
-
/** What this row pins down. */
|
|
107
95
|
rule: string;
|
|
108
96
|
}
|
|
109
97
|
/**
|
|
@@ -7,7 +7,6 @@ import type { AdwInlineViewSwitcherDisplayMode, AdwViewSwitcherPolicy, ViewSwitc
|
|
|
7
7
|
* both to "do not set the attribute".
|
|
8
8
|
*/
|
|
9
9
|
export interface ViewSwitcherVectorPage {
|
|
10
|
-
/** The page name. */
|
|
11
10
|
name: string;
|
|
12
11
|
/** `AdwViewStackPage:title`; absent means NULL. */
|
|
13
12
|
title?: string | null;
|
|
@@ -24,20 +23,15 @@ export interface ViewSwitcherVectorPage {
|
|
|
24
23
|
}
|
|
25
24
|
/** One `stripMnemonic` expectation. */
|
|
26
25
|
export interface MnemonicVector {
|
|
27
|
-
/** The raw title. */
|
|
28
26
|
label: string;
|
|
29
27
|
/** What `adw_strip_mnemonic` produces. */
|
|
30
28
|
stripped: string;
|
|
31
|
-
/** What this row pins down. */
|
|
32
29
|
rule: string;
|
|
33
30
|
}
|
|
34
31
|
/**
|
|
35
|
-
* `adw_strip_mnemonic`
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
* The escape/parse round trip is entity-NEUTRAL, which is what the `R&D` row
|
|
39
|
-
* pins: a port that only escaped, or only unescaped, would drift on every
|
|
40
|
-
* ampersand.
|
|
32
|
+
* `adw_strip_mnemonic` — `g_markup_escape_text`, then `pango_parse_markup` with `'_'`
|
|
33
|
+
* as the accel marker. The round trip is entity-NEUTRAL, which is what the `R&D` row
|
|
34
|
+
* pins: a port that only escaped, or only unescaped, would drift on every ampersand.
|
|
41
35
|
*/
|
|
42
36
|
export declare const VIEW_SWITCHER_MNEMONIC_VECTORS: ReadonlyArray<MnemonicVector>;
|
|
43
37
|
/** One `viewSwitcherIconName` expectation. */
|
|
@@ -46,17 +40,14 @@ export interface ViewSwitcherIconVector {
|
|
|
46
40
|
iconName: string | null | undefined;
|
|
47
41
|
/** The icon the switcher actually renders. */
|
|
48
42
|
resolved: string;
|
|
49
|
-
/** What this row pins down. */
|
|
50
43
|
rule: string;
|
|
51
44
|
}
|
|
52
45
|
/**
|
|
53
|
-
* The `image-missing` substitution
|
|
54
|
-
*
|
|
55
|
-
* which is why an icons-mode toggle for a page without an icon was a blank box.
|
|
46
|
+
* The `image-missing` substitution for a page with no icon of its own — rendering NO
|
|
47
|
+
* icon leaves an icons-mode toggle as a blank box.
|
|
56
48
|
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
* renderer's job.
|
|
49
|
+
* No `-symbolic` stripping here: C passes the name to `GtkImage` unchanged, and turning
|
|
50
|
+
* a name into a CSS class or an SVG document is the renderer's job.
|
|
60
51
|
*/
|
|
61
52
|
export declare const VIEW_SWITCHER_ICON_VECTORS: ReadonlyArray<ViewSwitcherIconVector>;
|
|
62
53
|
/** One `isViewSwitcherButtonVisible` expectation. */
|
|
@@ -69,17 +60,12 @@ export interface ViewSwitcherButtonVisibilityVector {
|
|
|
69
60
|
iconName: string | null;
|
|
70
61
|
/** Whether `AdwViewSwitcher` shows the button. */
|
|
71
62
|
buttonVisible: boolean;
|
|
72
|
-
/** What this row pins down. */
|
|
73
63
|
rule: string;
|
|
74
64
|
}
|
|
75
65
|
/**
|
|
76
66
|
* `update_button`'s `gtk_widget_set_visible (button, visible && (title != NULL ||
|
|
77
|
-
* icon_name != NULL))`
|
|
78
|
-
*
|
|
79
|
-
* Implemented in NEITHER port: the browser one hid the label and icon spans but
|
|
80
|
-
* always appended a visible `<button>`, the NativeScript one always added the
|
|
81
|
-
* button `StackLayout` with an empty `Label`. Both therefore rendered an empty,
|
|
82
|
-
* clickable, space-consuming tab for a page with no title and no icon.
|
|
67
|
+
* icon_name != NULL))` — a page with neither title nor icon gets no tab at all, not an
|
|
68
|
+
* empty clickable one.
|
|
83
69
|
*/
|
|
84
70
|
export declare const VIEW_SWITCHER_BUTTON_VISIBILITY_VECTORS: ReadonlyArray<ViewSwitcherButtonVisibilityVector>;
|
|
85
71
|
/** One badge-label + indicator-description expectation. */
|
|
@@ -92,17 +78,12 @@ export interface ViewSwitcherBadgeVector {
|
|
|
92
78
|
badgeLabel: string;
|
|
93
79
|
/** `update_description`'s text. */
|
|
94
80
|
description: string;
|
|
95
|
-
/** What this row pins down. */
|
|
96
81
|
rule: string;
|
|
97
82
|
}
|
|
98
83
|
/**
|
|
99
|
-
* `get_badge_label`
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
* The composition ORDER is the subtle part: when both clauses apply the format
|
|
104
|
-
* is `"%s %s", badge_description, needs_attention_description` (:96), so the
|
|
105
|
-
* BADGE comes first.
|
|
84
|
+
* `get_badge_label` and `update_description`. The composition ORDER is the subtle part:
|
|
85
|
+
* with both clauses the format is `"%s %s", badge_description,
|
|
86
|
+
* needs_attention_description` — badge first.
|
|
106
87
|
*/
|
|
107
88
|
export declare const VIEW_SWITCHER_BADGE_VECTORS: ReadonlyArray<ViewSwitcherBadgeVector>;
|
|
108
89
|
/** One `shouldRevealViewSwitcherBar` expectation. */
|
|
@@ -115,14 +96,12 @@ export interface ViewSwitcherBarRevealVector {
|
|
|
115
96
|
}[];
|
|
116
97
|
/** Whether the action bar is actually revealed. */
|
|
117
98
|
revealed: boolean;
|
|
118
|
-
/** What this row pins down. */
|
|
119
99
|
rule: string;
|
|
120
100
|
}
|
|
121
101
|
/**
|
|
122
|
-
* `update_bar_revealed`
|
|
123
|
-
* ports, which
|
|
124
|
-
*
|
|
125
|
-
* empty strip libadwaita keeps collapsed.
|
|
102
|
+
* `update_bar_revealed` — absent from BOTH
|
|
103
|
+
* ports, which reduced `revealed` to a boolean flag and never consulted the page
|
|
104
|
+
* count, so a bar on a one-page stack showed a strip libadwaita keeps collapsed.
|
|
126
105
|
*/
|
|
127
106
|
export declare const VIEW_SWITCHER_BAR_REVEAL_VECTORS: ReadonlyArray<ViewSwitcherBarRevealVector>;
|
|
128
107
|
/** One step of a {@link ViewSwitcherBarVector} script. */
|
|
@@ -144,9 +123,7 @@ export interface ViewSwitcherBarSnapshot {
|
|
|
144
123
|
}
|
|
145
124
|
/** One end-to-end switcher-bar expectation. */
|
|
146
125
|
export interface ViewSwitcherBarVector {
|
|
147
|
-
/** What this row pins down. */
|
|
148
126
|
rule: string;
|
|
149
|
-
/** The C function + lines it is derived from. */
|
|
150
127
|
derivedFrom: string;
|
|
151
128
|
/** The script, applied in order to a fresh bar. */
|
|
152
129
|
steps: readonly ViewSwitcherBarStep[];
|
|
@@ -162,10 +139,9 @@ export interface ViewSwitcherBarVector {
|
|
|
162
139
|
changes: readonly ViewSwitcherBarSnapshot[];
|
|
163
140
|
}
|
|
164
141
|
/**
|
|
165
|
-
* `AdwViewSwitcherBar`'s reveal machine end to end. `update_bar_revealed` is
|
|
166
|
-
*
|
|
167
|
-
*
|
|
168
|
-
* can flip the bar while `reveal` never moves.
|
|
142
|
+
* `AdwViewSwitcherBar`'s reveal machine end to end. `update_bar_revealed` is re-run
|
|
143
|
+
* from `set_reveal`, from `set_stack` and from the pages' `items-changed`, which is why
|
|
144
|
+
* the page set alone can flip the bar while `reveal` never moves.
|
|
169
145
|
*/
|
|
170
146
|
export declare const VIEW_SWITCHER_BAR_VECTORS: ReadonlyArray<ViewSwitcherBarVector>;
|
|
171
147
|
/** One `inlineToggleTooltip` expectation. */
|
|
@@ -174,32 +150,26 @@ export interface InlineTooltipVector {
|
|
|
174
150
|
title: string | null;
|
|
175
151
|
/** `AdwViewStackPage:use-underline`. */
|
|
176
152
|
useUnderline: boolean;
|
|
177
|
-
/** The current display mode. */
|
|
178
153
|
displayMode: AdwInlineViewSwitcherDisplayMode;
|
|
179
154
|
/** The tooltip text, as PLAIN text. */
|
|
180
155
|
tooltip: string;
|
|
181
|
-
/** What this row pins down. */
|
|
182
156
|
rule: string;
|
|
183
157
|
}
|
|
184
158
|
/**
|
|
185
|
-
* `update_tooltip
|
|
186
|
-
*
|
|
187
|
-
*
|
|
159
|
+
* `update_tooltip`. The browser port gated on
|
|
160
|
+
* the mode correctly but used the RAW attribute, so `title="_Files"` produced the
|
|
161
|
+
* tooltip `_Files`; NativeScript has no tooltip at all.
|
|
188
162
|
*/
|
|
189
163
|
export declare const INLINE_TOOLTIP_VECTORS: ReadonlyArray<InlineTooltipVector>;
|
|
190
164
|
/** The derived per-button model a vector expects. */
|
|
191
165
|
export interface ExpectedViewSwitcherButton {
|
|
192
|
-
/** Position in the page list. */
|
|
193
166
|
pageIndex: number;
|
|
194
|
-
/** The page name. */
|
|
195
167
|
name: string;
|
|
196
168
|
/** The text painted on the button. */
|
|
197
169
|
label: string;
|
|
198
170
|
/** The icon name painted on the button, never empty. */
|
|
199
171
|
iconName: string;
|
|
200
|
-
/** Whether the button is shown at all. */
|
|
201
172
|
visible: boolean;
|
|
202
|
-
/** Whether it is the selected one. */
|
|
203
173
|
selected: boolean;
|
|
204
174
|
/** Icon/label arrangement, from the policy. */
|
|
205
175
|
orientation: 'horizontal' | 'vertical';
|
|
@@ -212,11 +182,8 @@ export interface ExpectedViewSwitcherButton {
|
|
|
212
182
|
}
|
|
213
183
|
/** One `buildViewSwitcherButtons` expectation. */
|
|
214
184
|
export interface ViewSwitcherButtonVector {
|
|
215
|
-
/** What this row pins down. */
|
|
216
185
|
rule: string;
|
|
217
|
-
/** The C function + lines it is derived from. */
|
|
218
186
|
derivedFrom: string;
|
|
219
|
-
/** The pages, in order. */
|
|
220
187
|
pages: readonly ViewSwitcherVectorPage[];
|
|
221
188
|
/** The selected PAGE index, `-1` for none. */
|
|
222
189
|
selected: number;
|
|
@@ -227,8 +194,8 @@ export interface ViewSwitcherButtonVector {
|
|
|
227
194
|
}
|
|
228
195
|
/**
|
|
229
196
|
* `AdwViewSwitcher`'s per-button derivation: `populate_switcher` adds a button
|
|
230
|
-
* for EVERY page
|
|
231
|
-
* it shows and whether it is visible
|
|
197
|
+
* for EVERY page and `update_button` decides what
|
|
198
|
+
* it shows and whether it is visible.
|
|
232
199
|
*/
|
|
233
200
|
export declare const VIEW_SWITCHER_BUTTON_VECTORS: ReadonlyArray<ViewSwitcherButtonVector>;
|
|
234
201
|
/** The derived per-toggle model a vector expects. */
|
|
@@ -237,15 +204,12 @@ export interface ExpectedInlineToggle {
|
|
|
237
204
|
toggleIndex: number;
|
|
238
205
|
/** Position in the page list — libadwaita's `child-index`. */
|
|
239
206
|
pageIndex: number;
|
|
240
|
-
/** The page name. */
|
|
241
207
|
name: string;
|
|
242
208
|
/** The text painted on the toggle. */
|
|
243
209
|
label: string;
|
|
244
210
|
/** The icon name painted on the toggle, never empty. */
|
|
245
211
|
iconName: string;
|
|
246
|
-
/** Whether this display mode builds an icon. */
|
|
247
212
|
showIcon: boolean;
|
|
248
|
-
/** Whether this display mode builds a label. */
|
|
249
213
|
showLabel: boolean;
|
|
250
214
|
/** Tooltip text, `''` outside icons mode. */
|
|
251
215
|
tooltip: string;
|
|
@@ -258,11 +222,8 @@ export interface ExpectedInlineToggle {
|
|
|
258
222
|
}
|
|
259
223
|
/** One `buildInlineToggles` + index-mapping expectation. */
|
|
260
224
|
export interface InlineToggleVector {
|
|
261
|
-
/** What this row pins down. */
|
|
262
225
|
rule: string;
|
|
263
|
-
/** The C function + lines it is derived from. */
|
|
264
226
|
derivedFrom: string;
|
|
265
|
-
/** The pages, in order. */
|
|
266
227
|
pages: readonly ViewSwitcherVectorPage[];
|
|
267
228
|
/** `AdwInlineViewSwitcher:display-mode`. */
|
|
268
229
|
displayMode: AdwInlineViewSwitcherDisplayMode;
|
|
@@ -276,12 +237,10 @@ export interface InlineToggleVector {
|
|
|
276
237
|
/**
|
|
277
238
|
* The inline switcher's TWO index spaces, plus what each display mode builds.
|
|
278
239
|
*
|
|
279
|
-
* `populate_group` calls `add_toggle` only for visible pages and passes the PAGE
|
|
280
|
-
*
|
|
281
|
-
*
|
|
282
|
-
*
|
|
283
|
-
* port filtered hidden pages, so the mapping looked like the identity and the
|
|
284
|
-
* `-1` sentinel had no spelling.
|
|
240
|
+
* `populate_group` calls `add_toggle` only for visible pages and passes the PAGE index
|
|
241
|
+
* `i`, which `add_toggle` stashes as `child-index`; `notify_active_cb` reads it back and
|
|
242
|
+
* `selection_changed_cb` walks the other way. Skip the hidden-page filter and the two
|
|
243
|
+
* spaces collapse into the identity, which is where the `-1` sentinel gets lost.
|
|
285
244
|
*/
|
|
286
245
|
export declare const INLINE_TOGGLE_VECTORS: ReadonlyArray<InlineToggleVector>;
|
|
287
246
|
/** One change notification, in the order it is emitted. */
|
|
@@ -309,15 +268,12 @@ export type ViewSwitcherVectorOp = {
|
|
|
309
268
|
};
|
|
310
269
|
/** One end-to-end switcher-selection expectation. */
|
|
311
270
|
export interface ViewSwitcherSelectionVector {
|
|
312
|
-
/** What this row pins down. */
|
|
313
271
|
rule: string;
|
|
314
|
-
/** The C function + lines it is derived from. */
|
|
315
272
|
derivedFrom: string;
|
|
316
273
|
/** The pages, set in this order. */
|
|
317
274
|
pages: readonly ViewSwitcherVectorPage[];
|
|
318
275
|
/** Changes emitted WHILE the pages are set (the auto-pick), in order. */
|
|
319
276
|
setupChanges: readonly ViewSwitcherVectorChange[];
|
|
320
|
-
/** Operations applied after the pages exist. */
|
|
321
277
|
ops: readonly ViewSwitcherVectorOp[];
|
|
322
278
|
/**
|
|
323
279
|
* Return value of each op, in order. Asserted by the core and NativeScript
|
|
@@ -337,27 +293,22 @@ export interface ViewSwitcherSelectionVector {
|
|
|
337
293
|
diagnostics?: readonly string[];
|
|
338
294
|
}
|
|
339
295
|
/**
|
|
340
|
-
* The selection machine a switcher drives, which is the bound stack's — the
|
|
341
|
-
*
|
|
342
|
-
*
|
|
296
|
+
* The selection machine a switcher drives, which is the bound stack's — the switcher
|
|
297
|
+
* owns no selection property of its own; it goes straight to
|
|
298
|
+
* `gtk_selection_model_select_item`.
|
|
343
299
|
*
|
|
344
|
-
* The refusal rows
|
|
345
|
-
*
|
|
346
|
-
*
|
|
347
|
-
* accepted a fractional index and then matched no page at all.
|
|
300
|
+
* The refusal rows pin that a negative, out-of-range or FRACTIONAL index is refused
|
|
301
|
+
* outright: clamping it (`active="-1"` to the first page, `active="99"` to the last)
|
|
302
|
+
* silently selects a page the caller did not ask for.
|
|
348
303
|
*/
|
|
349
304
|
export declare const VIEW_SWITCHER_SELECTION_VECTORS: ReadonlyArray<ViewSwitcherSelectionVector>;
|
|
350
305
|
/** One page-list rebuild expectation. */
|
|
351
306
|
export interface ViewSwitcherRebuildVector {
|
|
352
|
-
/** What this row pins down. */
|
|
353
307
|
rule: string;
|
|
354
|
-
/** The C function + lines it is derived from. */
|
|
355
308
|
derivedFrom: string;
|
|
356
|
-
/** The initial pages. */
|
|
357
309
|
pages: readonly ViewSwitcherVectorPage[];
|
|
358
310
|
/** A page name to select before the rebuild; omitted keeps the auto-pick. */
|
|
359
311
|
select?: string;
|
|
360
|
-
/** The replacement pages. */
|
|
361
312
|
nextPages: readonly ViewSwitcherVectorPage[];
|
|
362
313
|
/** Changes emitted BY the rebuild, in order. */
|
|
363
314
|
changes: readonly ViewSwitcherVectorChange[];
|
|
@@ -367,15 +318,13 @@ export interface ViewSwitcherRebuildVector {
|
|
|
367
318
|
selectedName: string;
|
|
368
319
|
}
|
|
369
320
|
/**
|
|
370
|
-
* What happens to the selection when the page list is replaced wholesale — the
|
|
371
|
-
*
|
|
372
|
-
* the browser side).
|
|
321
|
+
* What happens to the selection when the page list is replaced wholesale — the shape
|
|
322
|
+
* both renderers use (`setViews` on NativeScript, a re-parse on the browser side).
|
|
373
323
|
*
|
|
374
324
|
* libadwaita's selection is a page POINTER compared by identity
|
|
375
|
-
* (`adw_view_stack_pages_is_selected
|
|
376
|
-
*
|
|
377
|
-
*
|
|
378
|
-
* (adw-view-switcher.c:258-263).
|
|
325
|
+
* (`adw_view_stack_pages_is_selected`), so it follows the page across inserts instead of
|
|
326
|
+
* pinning an index; a rebuild that drops the selected page falls through to the
|
|
327
|
+
* first-visible auto-pick.
|
|
379
328
|
*/
|
|
380
329
|
export declare const VIEW_SWITCHER_REBUILD_VECTORS: ReadonlyArray<ViewSwitcherRebuildVector>;
|
|
381
330
|
/** One step of a {@link ViewSwitcherDragVector} script. */
|
|
@@ -391,15 +340,11 @@ export type ViewSwitcherDragStep = {
|
|
|
391
340
|
};
|
|
392
341
|
/** One drag-hover auto-switch expectation. */
|
|
393
342
|
export interface ViewSwitcherDragVector {
|
|
394
|
-
/** What this row pins down. */
|
|
395
343
|
rule: string;
|
|
396
|
-
/** The C function + lines it is derived from. */
|
|
397
344
|
derivedFrom: string;
|
|
398
|
-
/** The pages. */
|
|
399
345
|
pages: readonly ViewSwitcherVectorPage[];
|
|
400
346
|
/** The page index selected before the drag starts. */
|
|
401
347
|
initial: number;
|
|
402
|
-
/** The drag script. */
|
|
403
348
|
steps: readonly ViewSwitcherDragStep[];
|
|
404
349
|
/** Changes emitted by the script, in order. */
|
|
405
350
|
changes: readonly ViewSwitcherVectorChange[];
|
|
@@ -407,13 +352,11 @@ export interface ViewSwitcherDragVector {
|
|
|
407
352
|
selected: number;
|
|
408
353
|
}
|
|
409
354
|
/**
|
|
410
|
-
* `TIMEOUT_EXPAND` — the 500 ms dwell that switches pages mid-drag
|
|
411
|
-
*
|
|
412
|
-
* adw-inline-view-switcher.c:80, :194-236) and present in NEITHER port, which
|
|
413
|
-
* only ever listened for `click`/`tap`.
|
|
355
|
+
* `TIMEOUT_EXPAND` — the 500 ms dwell that switches pages mid-drag, defined identically
|
|
356
|
+
* in `adw-view-switcher-button.c` and `adw-inline-view-switcher.c`.
|
|
414
357
|
*
|
|
415
|
-
* `interactive: true` on the resulting change
|
|
416
|
-
* toggle,
|
|
358
|
+
* `interactive: true` on the resulting change because the C timeout activates the
|
|
359
|
+
* toggle, running the same `on_button_toggled` a click does.
|
|
417
360
|
*/
|
|
418
361
|
export declare const VIEW_SWITCHER_DRAG_VECTORS: ReadonlyArray<ViewSwitcherDragVector>;
|
|
419
362
|
/** A deterministic stand-in for a platform timer, driven by {@link advance}. */
|
|
@@ -424,20 +367,9 @@ export interface ViewSwitcherClock extends ViewSwitcherScheduler {
|
|
|
424
367
|
readonly pending: number;
|
|
425
368
|
}
|
|
426
369
|
/**
|
|
427
|
-
* A fake clock for the drag vectors.
|
|
428
|
-
*
|
|
429
|
-
*
|
|
430
|
-
*
|
|
431
|
-
* logic it is used to exercise.
|
|
432
|
-
*
|
|
433
|
-
* WHO DRIVES THOSE VECTORS: the core suite, and only it. This said "the core,
|
|
434
|
-
* browser and NativeScript suites all" — a claim of coverage that was never
|
|
435
|
-
* true, which is worse than silence, because it reads as a reason to stop
|
|
436
|
-
* looking. The browser elements construct
|
|
437
|
-
* `new ViewSwitcherState({ scheduler: domViewSwitcherScheduler })` inline
|
|
438
|
-
* (`elements/adw-view-switcher.ts`, `elements/adw-inline-view-switcher.ts`), so
|
|
439
|
-
* there is no seam to hand this clock through, and the NativeScript port has no
|
|
440
|
-
* drag surface at all. Wiring the browser side means giving the elements a
|
|
441
|
-
* scheduler seam first.
|
|
370
|
+
* A fake clock for the drag vectors. It schedules and cancels callbacks and nothing
|
|
371
|
+
* else, so it cannot transcribe the logic it is used to exercise. The browser suite
|
|
372
|
+
* injects it through the elements' `scheduler` property; the NativeScript port has no
|
|
373
|
+
* drag surface and drives none of these rows.
|
|
442
374
|
*/
|
|
443
375
|
export declare function createViewSwitcherClock(): ViewSwitcherClock;
|
|
@@ -8,58 +8,51 @@ export interface WrapBoxLineVector {
|
|
|
8
8
|
/** The widget's `align` property, already validated into `[0, 1]`. */
|
|
9
9
|
align: number;
|
|
10
10
|
/**
|
|
11
|
-
* Whether this is the FINAL line — `i == *n_lines - 1
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
11
|
+
* Whether this is the FINAL line — `i == *n_lines - 1`.
|
|
12
|
+
* The final one, NOT merely an incomplete one:
|
|
13
|
+
* a box whose children all fit on one line has that line as its last, so by
|
|
14
|
+
* default `justify` does nothing to it at all.
|
|
15
15
|
*/
|
|
16
16
|
lastLine: boolean;
|
|
17
17
|
/**
|
|
18
18
|
* How many children the line holds. Only `spread` reads it, and only to
|
|
19
|
-
* distinguish 1 from more
|
|
19
|
+
* distinguish 1 from more.
|
|
20
20
|
*/
|
|
21
21
|
childrenInLine: number;
|
|
22
|
-
/** What the renderer must do. */
|
|
23
22
|
layout: WrapBoxLineLayout;
|
|
24
|
-
/** The rule or edge case this row pins down. */
|
|
25
23
|
rule: string;
|
|
26
24
|
}
|
|
27
25
|
/**
|
|
28
|
-
* The line-layout decision, row by row (adw-wrap-layout.c
|
|
29
|
-
* :705-706, :717-725).
|
|
26
|
+
* The line-layout decision, row by row (`adw-wrap-layout.c`).
|
|
30
27
|
*
|
|
31
|
-
* Two
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* `
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* the property documentation states outright (adw-wrap-box.c:349-352).
|
|
28
|
+
* Two counter-intuitive rows are why this is a table and not a sentence.
|
|
29
|
+
* `lastLine` is the FINAL line whether or not it is full, so the single-line case
|
|
30
|
+
* — the common one — is governed by `justify-last-line`, not `justify`. And
|
|
31
|
+
* `spread` with exactly ONE child in the line spreads nothing: `n_children > 1`
|
|
32
|
+
* guards the branch keeping children at `minimum_size`, so a lone child is
|
|
33
|
+
* STRETCHED instead.
|
|
38
34
|
*/
|
|
39
35
|
export declare const WRAP_BOX_LINE_VECTORS: ReadonlyArray<WrapBoxLineVector>;
|
|
40
36
|
/** One `child-spacing` / `line-spacing` normalisation expectation. */
|
|
41
37
|
export interface WrapBoxSpacingVector {
|
|
42
38
|
/**
|
|
43
|
-
* The value handed to the setter
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
* NativeScript port coerced it to 0.
|
|
39
|
+
* The value handed to the setter — a string from an HTML attribute or XML
|
|
40
|
+
* layout, a number from a JS property setter. C only ever sees an `int`, so
|
|
41
|
+
* the string rows are the PORTS' own edge: the browser propagated `NaN` into
|
|
42
|
+
* the style where NativeScript coerced it to 0.
|
|
48
43
|
*/
|
|
49
44
|
value: number | string | null;
|
|
50
45
|
/** The value the widget stores and lays out with. */
|
|
51
46
|
spacing: number;
|
|
52
|
-
/** The rule this row pins down. */
|
|
53
47
|
rule: string;
|
|
54
48
|
}
|
|
55
49
|
/**
|
|
56
50
|
* `adw_wrap_box_set_child_spacing` / `set_line_spacing`
|
|
57
|
-
*
|
|
51
|
+
* — a negative spacing is clamped to 0
|
|
58
52
|
* BEFORE anything else happens, so it never reaches the layout.
|
|
59
53
|
*
|
|
60
|
-
* The property is declared with a minimum of 0
|
|
61
|
-
*
|
|
62
|
-
* reject the value and warn.
|
|
54
|
+
* The property is declared with a minimum of 0 , which is why the clamp exists: without it GObject would reject the
|
|
55
|
+
* value and warn.
|
|
63
56
|
*/
|
|
64
57
|
export declare const WRAP_BOX_SPACING_VECTORS: ReadonlyArray<WrapBoxSpacingVector>;
|
|
65
58
|
/** One "does the setter report a change" expectation. */
|
|
@@ -70,12 +63,11 @@ export interface WrapBoxSpacingNotifyVector {
|
|
|
70
63
|
value: number | string;
|
|
71
64
|
/** Whether the setter reaches `g_object_notify_by_pspec` at all. */
|
|
72
65
|
notifies: boolean;
|
|
73
|
-
/** The rule this row pins down. */
|
|
74
66
|
rule: string;
|
|
75
67
|
}
|
|
76
68
|
/**
|
|
77
|
-
* The early return in `adw_wrap_box_set_child_spacing
|
|
78
|
-
*
|
|
69
|
+
* The early return in `adw_wrap_box_set_child_spacing`:
|
|
70
|
+
* the comparison happens AFTER the clamp,
|
|
79
71
|
* so setting `-5` on a box that already holds 0 changes nothing and notifies
|
|
80
72
|
* nobody. The browser port compared raw attribute strings and fired
|
|
81
73
|
* `notify::child-spacing` for a value libadwaita had normalised away.
|
|
@@ -83,34 +75,29 @@ export interface WrapBoxSpacingNotifyVector {
|
|
|
83
75
|
export declare const WRAP_BOX_SPACING_NOTIFY_VECTORS: ReadonlyArray<WrapBoxSpacingNotifyVector>;
|
|
84
76
|
/**
|
|
85
77
|
* Every `notify::` an `Adw.WrapBox` emits — the thirteen installed pspecs
|
|
86
|
-
*
|
|
78
|
+
* plus the overridden `orientation`.
|
|
87
79
|
*
|
|
88
|
-
* The count is the assertion
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
* could not fire. A roster is the only shape that fails when a property is ADDED
|
|
92
|
-
* without its notification, which is how the first twelve went missing.
|
|
80
|
+
* The count is the assertion: C notifies on all fourteen, and a port that notifies on two
|
|
81
|
+
* of them leaves a consumer bound to a signal that cannot fire. A roster is the only shape
|
|
82
|
+
* that fails when a property is ADDED without its notification.
|
|
93
83
|
*/
|
|
94
84
|
export declare const WRAP_BOX_NOTIFY_PROPERTIES: readonly string[];
|
|
95
85
|
/** One `wrap-policy` → child-shrink expectation. */
|
|
96
86
|
export interface WrapBoxPolicyVector {
|
|
97
87
|
/** The authored value. Anything not in the enum leaves the property at its default. */
|
|
98
88
|
value: unknown;
|
|
99
|
-
/** The stored policy. */
|
|
100
89
|
policy: AdwWrapPolicy;
|
|
101
90
|
/** The `flex-shrink` a child gets — `FlexboxLayout.setFlexShrink` on NativeScript. */
|
|
102
91
|
flexShrink: number;
|
|
103
|
-
/** The rule this row pins down. */
|
|
104
92
|
rule: string;
|
|
105
93
|
}
|
|
106
94
|
/**
|
|
107
|
-
* `Adw.WrapBox:wrap-policy
|
|
95
|
+
* `Adw.WrapBox:wrap-policy`.
|
|
108
96
|
*
|
|
109
|
-
* The default is `natural`,
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
* `flex-shrink` to 1, i.e. to `minimum`, the value libadwaita does NOT default to.
|
|
97
|
+
* The default is `natural`, the RESTRICTIVE one: a line wraps as soon as the next
|
|
98
|
+
* child would not fit at its natural size, where `minimum` squeezes children down
|
|
99
|
+
* first. Both renderers had neither and inherited their flex container's default
|
|
100
|
+
* — and CSS defaults `flex-shrink` to 1, i.e. to `minimum`.
|
|
114
101
|
*/
|
|
115
102
|
export declare const WRAP_BOX_POLICY_VECTORS: ReadonlyArray<WrapBoxPolicyVector>;
|
|
116
103
|
/** One length-unit conversion expectation. */
|
|
@@ -121,65 +108,55 @@ export interface WrapBoxLengthVector {
|
|
|
121
108
|
unit: unknown;
|
|
122
109
|
/** The `gtk-xft-dpi` the renderer reports. */
|
|
123
110
|
dpi: number;
|
|
124
|
-
/** The resolved pixel length. */
|
|
125
111
|
px: number;
|
|
126
|
-
/** The rule this row pins down. */
|
|
127
112
|
rule: string;
|
|
128
113
|
}
|
|
129
114
|
/**
|
|
130
|
-
* `adw_length_unit_to_px` as the three wrap-box length properties reach it
|
|
131
|
-
* (adw-wrap-layout.c:554-565, :798-804).
|
|
115
|
+
* `adw_length_unit_to_px` as the three wrap-box length properties reach it.
|
|
132
116
|
*
|
|
133
117
|
* The wrap box defaults its units to `px` where the split views default to `sp`
|
|
134
|
-
*
|
|
118
|
+
* — the same helper, two different defaults, which is
|
|
135
119
|
* why the fallback is the caller's argument and not the helper's.
|
|
136
120
|
*/
|
|
137
121
|
export declare const WRAP_BOX_LENGTH_VECTORS: ReadonlyArray<WrapBoxLengthVector>;
|
|
138
122
|
/** One `natural-line-length` normalisation expectation. */
|
|
139
123
|
export interface WrapBoxNaturalLengthVector {
|
|
140
|
-
/** The authored value. */
|
|
141
124
|
value: unknown;
|
|
142
125
|
/** The stored length, `-1` when unset. */
|
|
143
126
|
length: number;
|
|
144
|
-
/** The rule this row pins down. */
|
|
145
127
|
rule: string;
|
|
146
128
|
}
|
|
147
129
|
/**
|
|
148
|
-
* `Adw.WrapBox:natural-line-length` — `g_param_spec_int (…, -1, G_MAXINT, -1, …)
|
|
149
|
-
* (adw-wrap-box.c:438-441).
|
|
130
|
+
* `Adw.WrapBox:natural-line-length` — `g_param_spec_int (…, -1, G_MAXINT, -1, …)`.
|
|
150
131
|
*
|
|
151
|
-
* `-1` means UNSET, not "zero length", so it is
|
|
152
|
-
*
|
|
153
|
-
*
|
|
132
|
+
* `-1` means UNSET, not "zero length", so it is where everything out of range
|
|
133
|
+
* lands: a GObject setter would have refused those and left the property where it
|
|
134
|
+
* was born.
|
|
154
135
|
*/
|
|
155
136
|
export declare const WRAP_BOX_NATURAL_LENGTH_VECTORS: ReadonlyArray<WrapBoxNaturalLengthVector>;
|
|
156
137
|
/** One `insert_child_after` / `reorder_child_after` expectation. */
|
|
157
138
|
export interface WrapBoxChildOrderVector {
|
|
158
|
-
/** Which operation is being resolved. */
|
|
159
139
|
op: 'insert-after' | 'reorder-after';
|
|
160
140
|
/** The box's children before the call. */
|
|
161
141
|
children: readonly string[];
|
|
162
|
-
/** The child being placed. */
|
|
163
142
|
child: string;
|
|
164
143
|
/** The sibling to place it after, or `null` for the FIRST position. */
|
|
165
144
|
sibling: string | null;
|
|
166
145
|
/** The children afterwards, or `null` when the call is refused. */
|
|
167
146
|
result: readonly string[] | null;
|
|
168
|
-
/** The rule this row pins down. */
|
|
169
147
|
rule: string;
|
|
170
148
|
}
|
|
171
149
|
/**
|
|
172
|
-
* `adw_wrap_box_insert_child_after`
|
|
173
|
-
* `adw_wrap_box_reorder_child_after
|
|
150
|
+
* `adw_wrap_box_insert_child_after` and
|
|
151
|
+
* `adw_wrap_box_reorder_child_after`, both of which delegate to
|
|
174
152
|
* `gtk_widget_insert_after (child, self, sibling)`.
|
|
175
153
|
*
|
|
176
154
|
* The counter-intuitive rule is the NULL sibling: it inserts at the FIRST
|
|
177
155
|
* position, not the last. Reading it as "append" is the obvious misreading and a
|
|
178
|
-
* silent one — the child lands somewhere plausible.
|
|
179
|
-
* this API, so there was nothing to misread yet, which is the good time to pin it.
|
|
156
|
+
* silent one — the child lands somewhere plausible.
|
|
180
157
|
*
|
|
181
158
|
* The refusals are the C's `g_return_if_fail`s: an insert wants the child
|
|
182
159
|
* unparented, a reorder wants it already a child, the sibling must belong to this
|
|
183
|
-
* box, and `child == sibling` is an explicit early return in both
|
|
160
|
+
* box, and `child == sibling` is an explicit early return in both.
|
|
184
161
|
*/
|
|
185
162
|
export declare const WRAP_BOX_CHILD_ORDER_VECTORS: ReadonlyArray<WrapBoxChildOrderVector>;
|