@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,7 +1,6 @@
|
|
|
1
1
|
import type { AdwArrowIcon, AdwMenuEntry, SplitButtonContentMode, SplitButtonDirection, SplitButtonHalfState, SplitButtonProperty, SplitButtonStyleClass } from '../split-button.js';
|
|
2
2
|
/** One mutation in a {@link SplitButtonContentVector} sequence, with its outcome. */
|
|
3
3
|
export interface SplitButtonContentStep {
|
|
4
|
-
/** Which slot is being set. */
|
|
5
4
|
op: 'label' | 'icon-name' | 'child';
|
|
6
5
|
/**
|
|
7
6
|
* The value passed. For `label`/`icon-name` the string itself; for `child` a
|
|
@@ -13,7 +12,6 @@ export interface SplitButtonContentStep {
|
|
|
13
12
|
changed: boolean;
|
|
14
13
|
/** The `notify::*` properties C emits for this one call, in emission order. */
|
|
15
14
|
notified: readonly SplitButtonProperty[];
|
|
16
|
-
/** The content mode after the step. */
|
|
17
15
|
mode: SplitButtonContentMode;
|
|
18
16
|
/** `get_label()` after the step. */
|
|
19
17
|
label: string | null;
|
|
@@ -21,31 +19,26 @@ export interface SplitButtonContentStep {
|
|
|
21
19
|
iconName: string | null;
|
|
22
20
|
/** The root style classes after the step. */
|
|
23
21
|
styleClasses: readonly SplitButtonStyleClass[];
|
|
24
|
-
/** Why this step exists — the rule or edge case it pins down. */
|
|
25
22
|
rule: string;
|
|
26
23
|
}
|
|
27
24
|
/** A scripted sequence of content mutations applied to a FRESH state. */
|
|
28
25
|
export interface SplitButtonContentVector {
|
|
29
26
|
/** Which upstream test (or derivation) this sequence transcribes. */
|
|
30
27
|
name: string;
|
|
31
|
-
/** The mutations, in order. */
|
|
32
28
|
steps: readonly SplitButtonContentStep[];
|
|
33
29
|
}
|
|
34
30
|
/**
|
|
35
|
-
* The content machine
|
|
31
|
+
* The content machine.
|
|
36
32
|
*
|
|
37
|
-
* Two things
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
* tests/test-split-button.c:155-157) and the C guard tests that pointer, not
|
|
44
|
-
* whether the app ever set a child.
|
|
33
|
+
* Two things are easy to get wrong and are asserted explicitly. The `notified` ORDER: C
|
|
34
|
+
* freezes, notifies the slots it is about to CLEAR, sets the new one, notifies it, then
|
|
35
|
+
* thaws — so one `set_label()` can emit three notifications. And `child` is notified far
|
|
36
|
+
* more often than a reader expects, because `adw_split_button_get_child()` returns
|
|
37
|
+
* GtkButton's INTERNAL label/image widget in label/icon mode (the upstream suite says so)
|
|
38
|
+
* and the C guard tests that pointer, not whether the app ever set a child.
|
|
45
39
|
*
|
|
46
|
-
* A driver that cannot express a step — a DOM element has no `child` slot —
|
|
47
|
-
*
|
|
48
|
-
* the interesting rows come first.
|
|
40
|
+
* A driver that cannot express a step — a DOM element has no `child` slot — asserts the
|
|
41
|
+
* sequence up to that step and stops; every sequence puts the interesting rows first.
|
|
49
42
|
*/
|
|
50
43
|
export declare const SPLIT_BUTTON_CONTENT_VECTORS: ReadonlyArray<SplitButtonContentVector>;
|
|
51
44
|
/** One `update_style_classes` expectation. */
|
|
@@ -56,11 +49,10 @@ export interface SplitButtonStyleClassVector {
|
|
|
56
49
|
iconName: string | null;
|
|
57
50
|
/** The classes on the `splitbutton` node. */
|
|
58
51
|
classes: readonly SplitButtonStyleClass[];
|
|
59
|
-
/** Why this row exists. */
|
|
60
52
|
rule: string;
|
|
61
53
|
}
|
|
62
54
|
/**
|
|
63
|
-
* `update_style_classes
|
|
55
|
+
* `update_style_classes`. Both branches read the
|
|
64
56
|
* FIRST CHARACTER, which is why `''` and `' '` land on opposite sides.
|
|
65
57
|
*/
|
|
66
58
|
export declare const SPLIT_BUTTON_STYLE_CLASS_VECTORS: ReadonlyArray<SplitButtonStyleClassVector>;
|
|
@@ -68,40 +60,35 @@ export declare const SPLIT_BUTTON_STYLE_CLASS_VECTORS: ReadonlyArray<SplitButton
|
|
|
68
60
|
export interface SplitButtonTooltipVector {
|
|
69
61
|
/** The value passed to `adw_split_button_set_dropdown_tooltip`. */
|
|
70
62
|
tooltip: string;
|
|
71
|
-
/** What the dropdown actually shows. */
|
|
72
63
|
text: string;
|
|
73
64
|
/** Whether it is Pango MARKUP (`set_tooltip_markup`) rather than plain text. */
|
|
74
65
|
markup: boolean;
|
|
75
|
-
/** Why this row exists. */
|
|
76
66
|
rule: string;
|
|
77
67
|
}
|
|
78
68
|
/**
|
|
79
|
-
* The tooltip fallback
|
|
69
|
+
* The tooltip fallback in `adw_split_button_set_dropdown_tooltip`, plus its initial value.
|
|
80
70
|
*
|
|
81
|
-
* `has_dropdown_tooltip = tooltip && *tooltip`. The empty branch is the
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
* the NativeScript port had neither tooltip nor accessible name.
|
|
71
|
+
* `has_dropdown_tooltip = tooltip && *tooltip`. The empty branch is the trap: `''` is not
|
|
72
|
+
* nullish, so a nullish-coalescing fallback leaves `dropdown-tooltip=""` with NO accessible
|
|
73
|
+
* name at all instead of the translated `More Options`.
|
|
85
74
|
*/
|
|
86
75
|
export declare const SPLIT_BUTTON_TOOLTIP_VECTORS: ReadonlyArray<SplitButtonTooltipVector>;
|
|
87
76
|
/** One direction expectation. */
|
|
88
77
|
export interface SplitButtonDirectionVector {
|
|
89
78
|
/** The `GtkArrowType`. */
|
|
90
79
|
direction: SplitButtonDirection;
|
|
91
|
-
/** The symbolic icon the arrow node draws. */
|
|
92
80
|
arrowIcon: AdwArrowIcon;
|
|
93
|
-
/** Where the popup is placed. */
|
|
94
81
|
popupDirection: SplitButtonDirection;
|
|
95
82
|
/** Why this row exists — naming the selector that WINS, not the one that loses. */
|
|
96
83
|
rule: string;
|
|
97
84
|
}
|
|
98
85
|
/**
|
|
99
86
|
* Direction → glyph for the dropdown half of a SPLIT BUTTON, and → popup
|
|
100
|
-
* placement
|
|
87
|
+
* placement.
|
|
101
88
|
*
|
|
102
89
|
* `none` is the row that matters, and it is the row that was WRONG here until the
|
|
103
90
|
* override was found: the four shared directions come from `menubutton arrow`
|
|
104
|
-
* (_buttons.scss
|
|
91
|
+
* (`_buttons.scss`), but `.none` is re-declared inside `splitbutton { … }`
|
|
105
92
|
* at :621-623, and that selector wins. See the header of `./index.ts` — "cite the
|
|
106
93
|
* winning selector" — for what this table cost.
|
|
107
94
|
*/
|
|
@@ -123,17 +110,14 @@ export interface SplitButtonRootStateVector {
|
|
|
123
110
|
action: SplitButtonHalfState;
|
|
124
111
|
/** State flags of the dropdown (arrow) half. */
|
|
125
112
|
dropdown: SplitButtonHalfState;
|
|
126
|
-
/** Whether the root reads ACTIVE. */
|
|
127
113
|
active: boolean;
|
|
128
|
-
/** Whether the root reads CHECKED. */
|
|
129
114
|
checked: boolean;
|
|
130
|
-
/** Why this row exists. */
|
|
131
115
|
rule: string;
|
|
132
116
|
}
|
|
133
117
|
/**
|
|
134
|
-
* `update_state`
|
|
118
|
+
* `update_state` — an OR-fold of both halves onto
|
|
135
119
|
* the root, which is what `splitbutton.flat:active/:checked` styles
|
|
136
|
-
* (_buttons.scss
|
|
120
|
+
* (`_buttons.scss`).
|
|
137
121
|
*
|
|
138
122
|
* CORE-ONLY: GAP — two of its three axes are hardcoded in the renderer, so there is nothing to vary. Tracked in #1072
|
|
139
123
|
*/
|
|
@@ -142,9 +126,7 @@ export declare const SPLIT_BUTTON_ROOT_STATE_VECTORS: ReadonlyArray<SplitButtonR
|
|
|
142
126
|
export interface SplitButtonMenuParseVector {
|
|
143
127
|
/** The raw `menu` attribute (or `null` when absent). */
|
|
144
128
|
json: string | null;
|
|
145
|
-
/** The entries it yields. */
|
|
146
129
|
entries: readonly AdwMenuEntry[];
|
|
147
|
-
/** Why this row exists. */
|
|
148
130
|
rule: string;
|
|
149
131
|
}
|
|
150
132
|
/**
|
|
@@ -154,18 +136,15 @@ export interface SplitButtonMenuParseVector {
|
|
|
154
136
|
export declare const SPLIT_BUTTON_MENU_PARSE_VECTORS: ReadonlyArray<SplitButtonMenuParseVector>;
|
|
155
137
|
/** One activate-by-position expectation. */
|
|
156
138
|
export interface SplitButtonMenuActivationVector {
|
|
157
|
-
/** The menu model. */
|
|
158
139
|
entries: readonly AdwMenuEntry[];
|
|
159
|
-
/** The position activated. */
|
|
160
140
|
index: number;
|
|
161
141
|
/** The entry that must be dispatched, or `null`. */
|
|
162
142
|
activated: AdwMenuEntry | null;
|
|
163
|
-
/** Why this row exists. */
|
|
164
143
|
rule: string;
|
|
165
144
|
}
|
|
166
145
|
/**
|
|
167
146
|
* Activation is BY POSITION, never by label lookup: a `GMenuModel` addresses its
|
|
168
|
-
* items by index and each carries its own detailed action
|
|
147
|
+
* items by index and each carries its own detailed action.
|
|
169
148
|
*/
|
|
170
149
|
export declare const SPLIT_BUTTON_MENU_ACTIVATION_VECTORS: ReadonlyArray<SplitButtonMenuActivationVector>;
|
|
171
150
|
/**
|
|
@@ -182,12 +161,11 @@ export interface SplitButtonDropdownVector {
|
|
|
182
161
|
enabled: boolean;
|
|
183
162
|
/** Whether the menu can be popped up at all. */
|
|
184
163
|
canOpen: boolean;
|
|
185
|
-
/** Why this row exists. */
|
|
186
164
|
rule: string;
|
|
187
165
|
}
|
|
188
166
|
/**
|
|
189
|
-
* "If the menu model is `NULL`, the dropdown is disabled"
|
|
190
|
-
* and the same for the popover
|
|
167
|
+
* "If the menu model is `NULL`, the dropdown is disabled",
|
|
168
|
+
* and the same for the popover. An empty entry list is the renderers'
|
|
191
169
|
* only spelling of "no menu", so it collapses onto the `NULL` case.
|
|
192
170
|
*/
|
|
193
171
|
export declare const SPLIT_BUTTON_DROPDOWN_VECTORS: ReadonlyArray<SplitButtonDropdownVector>;
|
|
@@ -6,12 +6,12 @@ export interface AdwLengthUnitVector {
|
|
|
6
6
|
value: number;
|
|
7
7
|
/** The `gtk-xft-dpi` in play. */
|
|
8
8
|
dpi: number;
|
|
9
|
-
/** The resulting pixel length. */
|
|
10
9
|
px: number;
|
|
11
|
-
/** Why this row exists. */
|
|
12
10
|
rule: string;
|
|
13
11
|
}
|
|
14
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* `adw_length_unit_to_px`.
|
|
14
|
+
*
|
|
15
15
|
* CORE-ONLY: an internal step of a pipeline whose COMPOSED result is renderer-driven — driving it separately would assert the same thing twice (SIDEBAR_BOUNDS_VECTORS, which both renderers drive)
|
|
16
16
|
*/
|
|
17
17
|
export declare const ADW_LENGTH_UNIT_VECTORS: ReadonlyArray<AdwLengthUnitVector>;
|
|
@@ -20,7 +20,6 @@ export interface GlibClampVector {
|
|
|
20
20
|
x: number;
|
|
21
21
|
low: number;
|
|
22
22
|
high: number;
|
|
23
|
-
/** What GLib's CLAMP returns. */
|
|
24
23
|
clamped: number;
|
|
25
24
|
rule: string;
|
|
26
25
|
}
|
|
@@ -46,9 +45,8 @@ export interface SidebarBoundsVector {
|
|
|
46
45
|
rule: string;
|
|
47
46
|
}
|
|
48
47
|
/**
|
|
49
|
-
* The `MAX (…, adw_length_unit_to_px (…))` pair both widgets open with
|
|
50
|
-
* allocate
|
|
51
|
-
* adw-overlay-split-view.c:452-460, measure flavour at :251-256 / :545-550.
|
|
48
|
+
* The `MAX (…, adw_length_unit_to_px (…))` pair both widgets open with, in both the
|
|
49
|
+
* allocate and the measure flavour.
|
|
52
50
|
*/
|
|
53
51
|
export declare const SIDEBAR_BOUNDS_VECTORS: ReadonlyArray<SidebarBoundsVector>;
|
|
54
52
|
/** One allocated-sidebar-width expectation. */
|
|
@@ -63,13 +61,12 @@ export interface SidebarWidthVector {
|
|
|
63
61
|
sidebarChildMin: number;
|
|
64
62
|
/** Overlay only: collapsed ignores the fraction and clamps the VIEW width. */
|
|
65
63
|
collapsed: boolean;
|
|
66
|
-
/** The allocated sidebar width. */
|
|
67
64
|
width: number;
|
|
68
65
|
rule: string;
|
|
69
66
|
}
|
|
70
67
|
/**
|
|
71
|
-
* `allocate_uncollapsed`
|
|
72
|
-
* `get_sidebar_width` + `allocate_uncollapsed
|
|
68
|
+
* `allocate_uncollapsed` versus
|
|
69
|
+
* `get_sidebar_width` + `allocate_uncollapsed`.
|
|
73
70
|
*
|
|
74
71
|
* The 300px pair is the reason this table keys on `widget`: identical input, 180 in
|
|
75
72
|
* the navigation split view and 100 in the overlay, because one caps the BOUND and
|
|
@@ -86,8 +83,7 @@ export interface NaturalSidebarWidthVector {
|
|
|
86
83
|
rule: string;
|
|
87
84
|
}
|
|
88
85
|
/**
|
|
89
|
-
* `measure_uncollapsed`'s sidebar estimate
|
|
90
|
-
* adw-overlay-split-view.c:554-556) — the sidebar's OWN natural width is ignored.
|
|
86
|
+
* `measure_uncollapsed`'s sidebar estimate — the sidebar's OWN natural width is ignored.
|
|
91
87
|
*
|
|
92
88
|
* CORE-ONLY: an internal step of a pipeline whose COMPOSED result is renderer-driven — driving it separately would assert the same thing twice (SIDEBAR_WIDTH_VECTORS)
|
|
93
89
|
*/
|
|
@@ -105,11 +101,10 @@ export interface SplitViewMeasureVector {
|
|
|
105
101
|
rule: string;
|
|
106
102
|
}
|
|
107
103
|
/**
|
|
108
|
-
* `measure_uncollapsed
|
|
109
|
-
* adw-navigation-split-view.c:264-267 is the same rule at progress 1).
|
|
104
|
+
* `measure_uncollapsed`; the navigation variant is the same rule at progress 1.
|
|
110
105
|
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
106
|
+
* Without this container minimum the content pane shrinks to nothing instead of the window
|
|
107
|
+
* refusing to get narrower.
|
|
113
108
|
*
|
|
114
109
|
* CORE-ONLY: the container minimum lands as `min-width: min-content` on the content pane, which is CSS’s own spelling of the same rule — there is no computed number of ours to compare. Asserted in the renderer as "the pane is not crushable" instead
|
|
115
110
|
*/
|
|
@@ -124,7 +119,7 @@ export interface NavigationLayoutVector {
|
|
|
124
119
|
content: SplitViewPaneRect;
|
|
125
120
|
rule: string;
|
|
126
121
|
}
|
|
127
|
-
/** `allocate_uncollapsed
|
|
122
|
+
/** `allocate_uncollapsed`. */
|
|
128
123
|
export declare const NAVIGATION_SPLIT_VIEW_LAYOUT_VECTORS: ReadonlyArray<NavigationLayoutVector>;
|
|
129
124
|
/** One `layoutOverlaySplitView` expectation. */
|
|
130
125
|
export interface OverlayLayoutVector {
|
|
@@ -139,11 +134,10 @@ export interface OverlayLayoutVector {
|
|
|
139
134
|
rule: string;
|
|
140
135
|
}
|
|
141
136
|
/**
|
|
142
|
-
* `allocate_uncollapsed`
|
|
143
|
-
*
|
|
137
|
+
* `allocate_uncollapsed` and `allocate_collapsed`,
|
|
138
|
+
* plus `update_shield` and the snapshot gate.
|
|
144
139
|
*
|
|
145
|
-
* `shadowProgress` is inverted relative to the reveal — 1 means NO shadow
|
|
146
|
-
* (adw-shadow-helper.c:234-249).
|
|
140
|
+
* `shadowProgress` is inverted relative to the reveal — 1 means NO shadow.
|
|
147
141
|
*/
|
|
148
142
|
export declare const OVERLAY_SPLIT_VIEW_LAYOUT_VECTORS: ReadonlyArray<OverlayLayoutVector>;
|
|
149
143
|
/** One `tagsConflict` expectation. */
|
|
@@ -153,7 +147,9 @@ export interface TagsConflictVector {
|
|
|
153
147
|
conflict: boolean;
|
|
154
148
|
rule: string;
|
|
155
149
|
}
|
|
156
|
-
/**
|
|
150
|
+
/**
|
|
151
|
+
* `tags_equal`.
|
|
152
|
+
*
|
|
157
153
|
* CORE-ONLY: an internal step of a pipeline whose COMPOSED result is renderer-driven — driving it separately would assert the same thing twice (the tag guard, driven through NAVIGATION_ACTION_VECTORS and the refusal tests in both renderer suites)
|
|
158
154
|
*/
|
|
159
155
|
export declare const TAGS_CONFLICT_VECTORS: ReadonlyArray<TagsConflictVector>;
|
|
@@ -169,7 +165,7 @@ export interface NavigationStackVector {
|
|
|
169
165
|
rule: string;
|
|
170
166
|
}
|
|
171
167
|
/**
|
|
172
|
-
* `update_navigation_stack
|
|
168
|
+
* `update_navigation_stack`.
|
|
173
169
|
*
|
|
174
170
|
* The lone-child rows are the ones both renderers fail: their CSS / `visibility`
|
|
175
171
|
* tables key on `show-content` alone, so a collapsed split view holding only a
|
|
@@ -193,8 +189,8 @@ export interface NavigationActionVector {
|
|
|
193
189
|
rule: string;
|
|
194
190
|
}
|
|
195
191
|
/**
|
|
196
|
-
* `navigation_push_cb`
|
|
197
|
-
*
|
|
192
|
+
* `navigation_push_cb` and `navigation_pop_cb`
|
|
193
|
+
* — documented as working even when NOT collapsed.
|
|
198
194
|
*/
|
|
199
195
|
export declare const NAVIGATION_ACTION_VECTORS: ReadonlyArray<NavigationActionVector>;
|
|
200
196
|
/** The observable state of an `OverlaySplitViewState`. */
|
|
@@ -208,25 +204,22 @@ export interface OverlaySplitViewSnapshot {
|
|
|
208
204
|
}
|
|
209
205
|
/** One collapse-coupling expectation. */
|
|
210
206
|
export interface OverlayCollapseVector {
|
|
211
|
-
/** Constructor options. */
|
|
212
207
|
initial: {
|
|
213
208
|
collapsed?: boolean;
|
|
214
209
|
showSidebar?: boolean;
|
|
215
210
|
pinSidebar?: boolean;
|
|
216
211
|
};
|
|
217
|
-
/** State right after construction. */
|
|
218
212
|
before: OverlaySplitViewSnapshot;
|
|
219
213
|
/** The `collapsed` value to set. */
|
|
220
214
|
setCollapsed: boolean;
|
|
221
|
-
/** State after the change. */
|
|
222
215
|
after: OverlaySplitViewSnapshot;
|
|
223
216
|
/** Which `notify::*` properties fire, in order. */
|
|
224
217
|
notifications: ReadonlyArray<'show-sidebar' | 'collapsed'>;
|
|
225
218
|
rule: string;
|
|
226
219
|
}
|
|
227
220
|
/**
|
|
228
|
-
* `adw_overlay_split_view_init`
|
|
229
|
-
* the can-focus pair
|
|
221
|
+
* `adw_overlay_split_view_init` + `set_collapsed` +
|
|
222
|
+
* the can-focus pair.
|
|
230
223
|
*
|
|
231
224
|
* `if (!self->pin_sidebar) set_show_sidebar (self, !self->collapsed, FALSE, 0);` is
|
|
232
225
|
* the single rule BOTH storybooks re-implemented by hand because neither widget
|
|
@@ -243,7 +236,7 @@ export interface SwipeSnapPointVector {
|
|
|
243
236
|
snapPoints: number[];
|
|
244
237
|
rule: string;
|
|
245
238
|
}
|
|
246
|
-
/** `adw_overlay_split_view_get_snap_points
|
|
239
|
+
/** `adw_overlay_split_view_get_snap_points`. */
|
|
247
240
|
export declare const OVERLAY_SWIPE_SNAP_POINT_VECTORS: ReadonlyArray<SwipeSnapPointVector>;
|
|
248
241
|
/** One `resolveSwipeStart` expectation. */
|
|
249
242
|
export interface SwipeStartVector {
|
|
@@ -255,7 +248,7 @@ export interface SwipeStartVector {
|
|
|
255
248
|
detected: boolean;
|
|
256
249
|
rule: string;
|
|
257
250
|
}
|
|
258
|
-
/** `prepare_cb
|
|
251
|
+
/** `prepare_cb`. */
|
|
259
252
|
export declare const OVERLAY_SWIPE_START_VECTORS: ReadonlyArray<SwipeStartVector>;
|
|
260
253
|
/** One `resolveSwipeRelease` expectation. */
|
|
261
254
|
export interface SwipeReleaseVector {
|
|
@@ -267,7 +260,7 @@ export interface SwipeReleaseVector {
|
|
|
267
260
|
showSidebarAfter: boolean;
|
|
268
261
|
rule: string;
|
|
269
262
|
}
|
|
270
|
-
/** `end_swipe_cb
|
|
263
|
+
/** `end_swipe_cb`. */
|
|
271
264
|
export declare const OVERLAY_SWIPE_RELEASE_VECTORS: ReadonlyArray<SwipeReleaseVector>;
|
|
272
265
|
/** One `swipeCancelProgress` expectation. */
|
|
273
266
|
export interface SwipeCancelVector {
|
|
@@ -275,7 +268,7 @@ export interface SwipeCancelVector {
|
|
|
275
268
|
cancelProgress: number;
|
|
276
269
|
rule: string;
|
|
277
270
|
}
|
|
278
|
-
/** `adw_overlay_split_view_get_cancel_progress
|
|
271
|
+
/** `adw_overlay_split_view_get_cancel_progress`. */
|
|
279
272
|
export declare const OVERLAY_SWIPE_CANCEL_VECTORS: ReadonlyArray<SwipeCancelVector>;
|
|
280
273
|
/** One `resolveSwipeArea` expectation. */
|
|
281
274
|
export interface SwipeAreaVector {
|
|
@@ -295,7 +288,7 @@ export interface SwipeAreaVector {
|
|
|
295
288
|
rule: string;
|
|
296
289
|
}
|
|
297
290
|
/**
|
|
298
|
-
* `adw_overlay_split_view_get_swipe_area
|
|
299
|
-
* `ADW_SWIPE_BORDER` is 32
|
|
291
|
+
* `adw_overlay_split_view_get_swipe_area`;
|
|
292
|
+
* `ADW_SWIPE_BORDER` is 32.
|
|
300
293
|
*/
|
|
301
294
|
export declare const OVERLAY_SWIPE_AREA_VECTORS: ReadonlyArray<SwipeAreaVector>;
|
|
@@ -109,11 +109,8 @@ export interface TabViewVectorSelection {
|
|
|
109
109
|
}
|
|
110
110
|
/** One expected page-list notification. */
|
|
111
111
|
export interface TabViewVectorPagesChange {
|
|
112
|
-
/** Which kind of change. */
|
|
113
112
|
kind: 'attached' | 'detached' | 'reordered' | 'pinned' | 'updated';
|
|
114
|
-
/** The page it happened to. */
|
|
115
113
|
id: string;
|
|
116
|
-
/** Its index after the change. */
|
|
117
114
|
position: number;
|
|
118
115
|
/** Its index before the change, `-1` for `'attached'`. */
|
|
119
116
|
previousPosition: number;
|
|
@@ -122,18 +119,15 @@ export interface TabViewVectorPagesChange {
|
|
|
122
119
|
* How the `close-page` handler behaves for the whole row.
|
|
123
120
|
*
|
|
124
121
|
* `'default'` reproduces libadwaita's own default handler, `close_page_cb`'s
|
|
125
|
-
* `close_page_finish (self, page, !adw_tab_page_get_pinned (page))
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
* `'defer'` holds every page in the closing state so `closePageFinish` decides.
|
|
122
|
+
* `close_page_finish (self, page, !adw_tab_page_get_pinned (page))`; the suites wrap it
|
|
123
|
+
* in a RECORDER so the close-attempt order is observable, and the core suite also
|
|
124
|
+
* replays the row with NO handler to prove the built-in default agrees. `'defer'` holds
|
|
125
|
+
* every page in the closing state so `closePageFinish` decides.
|
|
130
126
|
*/
|
|
131
127
|
export type TabViewVectorHandler = 'default' | 'defer';
|
|
132
128
|
/** One end-to-end tab-view expectation. */
|
|
133
129
|
export interface TabViewVector {
|
|
134
|
-
/** What this row pins down. */
|
|
135
130
|
rule: string;
|
|
136
|
-
/** The C function + lines it is derived from. */
|
|
137
131
|
derivedFrom: string;
|
|
138
132
|
/** The pages, seeded in this order (pinned ones via appendPinnedPage, parented ones via addPage). */
|
|
139
133
|
pages: readonly TabViewVectorPage[];
|
|
@@ -141,7 +135,6 @@ export interface TabViewVector {
|
|
|
141
135
|
handler?: TabViewVectorHandler;
|
|
142
136
|
/** Selection changes emitted WHILE the pages are seeded (the auto-select), in order. */
|
|
143
137
|
setupChanges: readonly TabViewVectorSelection[];
|
|
144
|
-
/** Operations applied after the pages exist. */
|
|
145
138
|
ops: readonly TabViewVectorOp[];
|
|
146
139
|
/**
|
|
147
140
|
* Return value of each op, in order — `null` for the ops that return nothing.
|
|
@@ -157,7 +150,6 @@ export interface TabViewVector {
|
|
|
157
150
|
closeAttempts?: readonly string[];
|
|
158
151
|
/** Final page order. */
|
|
159
152
|
order: readonly string[];
|
|
160
|
-
/** Final pinned-prefix length. */
|
|
161
153
|
nPinnedPages: number;
|
|
162
154
|
/** Final selected id, `null` for none. */
|
|
163
155
|
selectedId: string | null;
|
|
@@ -171,19 +163,17 @@ export interface TabViewVector {
|
|
|
171
163
|
/**
|
|
172
164
|
* `Adw.TabView`'s selection, close protocol, partition and ordering, end to end.
|
|
173
165
|
*
|
|
174
|
-
* Read the `rule` of a row before changing it: most
|
|
175
|
-
*
|
|
166
|
+
* Read the `rule` of a row before changing it: most encode behaviour neither renderer had,
|
|
167
|
+
* and several encode behaviour a port had backwards.
|
|
176
168
|
*/
|
|
177
169
|
export declare const TAB_VIEW_VECTORS: ReadonlyArray<TabViewVector>;
|
|
178
170
|
/**
|
|
179
171
|
* The surface a vector driver needs.
|
|
180
172
|
*
|
|
181
|
-
* Deliberately STRUCTURAL and named exactly as `TabViewState` names things, so
|
|
182
|
-
*
|
|
183
|
-
* translation layer
|
|
184
|
-
*
|
|
185
|
-
* the `<adw-tab-view>` element itself. A renderer that cannot be passed here has
|
|
186
|
-
* stopped being a thin adapter, which is the thing these vectors exist to catch.
|
|
173
|
+
* Deliberately STRUCTURAL and named exactly as `TabViewState` names things, so all
|
|
174
|
+
* three suites hand their subject straight to {@link applyTabViewOp} with no
|
|
175
|
+
* translation layer. A renderer that cannot be passed here has stopped being a
|
|
176
|
+
* thin adapter, which is the thing these vectors exist to catch.
|
|
187
177
|
*/
|
|
188
178
|
export interface TabViewVectorTarget {
|
|
189
179
|
/** The ordered pages — only the three fields a vector reads. */
|
|
@@ -192,7 +182,6 @@ export interface TabViewVectorTarget {
|
|
|
192
182
|
readonly title: string;
|
|
193
183
|
readonly pinned: boolean;
|
|
194
184
|
}[];
|
|
195
|
-
/** Length of the pinned prefix. */
|
|
196
185
|
readonly nPinnedPages: number;
|
|
197
186
|
/** Selected page id, `null` when the view is empty. */
|
|
198
187
|
readonly selectedId: string | null;
|
|
@@ -251,14 +240,14 @@ export interface TabViewVectorTarget {
|
|
|
251
240
|
setPageTitle(id: string, title: string | null): boolean;
|
|
252
241
|
}
|
|
253
242
|
/**
|
|
254
|
-
* Seed a vector's pages, choosing the insertion call each page's declaration
|
|
255
|
-
*
|
|
256
|
-
*
|
|
257
|
-
*
|
|
243
|
+
* Seed a vector's pages, choosing the insertion call each page's declaration implies: a
|
|
244
|
+
* pinned page through `appendPinnedPage` (so the pinned prefix builds up in declaration
|
|
245
|
+
* order), a parented one through `addPage` (so the position is DERIVED, which is itself
|
|
246
|
+
* under test), everything else through `appendPage`.
|
|
258
247
|
*
|
|
259
|
-
* Every vector's declared order is also the order this produces
|
|
260
|
-
*
|
|
261
|
-
*
|
|
248
|
+
* Every vector's declared order is also the order this produces, asserted right after
|
|
249
|
+
* seeding — which turns the fixtures into a test of `adw_tab_view_add_page`'s position
|
|
250
|
+
* derivation.
|
|
262
251
|
*/
|
|
263
252
|
export declare function seedTabViewPages(target: TabViewVectorTarget, pages: readonly TabViewVectorPage[]): void;
|
|
264
253
|
/**
|
|
@@ -272,21 +261,17 @@ export declare function tabViewOrder(target: TabViewVectorTarget): string[];
|
|
|
272
261
|
export declare function tabViewClosing(target: TabViewVectorTarget): string[];
|
|
273
262
|
/** One `successorAfterClose` expectation — the close-successor kernel on its own. */
|
|
274
263
|
export interface TabSuccessorVector {
|
|
275
|
-
/** What this row pins down. */
|
|
276
264
|
rule: string;
|
|
277
265
|
/** The C lines it is derived from. */
|
|
278
266
|
derivedFrom: string;
|
|
279
|
-
/** The page list. */
|
|
280
267
|
pages: readonly TabViewVectorPage[];
|
|
281
|
-
/** The page being closed. */
|
|
282
268
|
closingId: string;
|
|
283
|
-
/** The currently-selected id. */
|
|
284
269
|
selectedId: string | null;
|
|
285
270
|
/** Who ends up selected — `null` when the view empties. */
|
|
286
271
|
successorId: string | null;
|
|
287
272
|
}
|
|
288
273
|
/**
|
|
289
|
-
* `select_previous_page`
|
|
274
|
+
* `select_previous_page` with no view around it.
|
|
290
275
|
*
|
|
291
276
|
* These are the same rules the end-to-end rows exercise, stated as pure inputs
|
|
292
277
|
* so a failure names the RULE rather than the script that reached it.
|
|
@@ -296,18 +281,15 @@ export interface TabSuccessorVector {
|
|
|
296
281
|
export declare const TAB_SUCCESSOR_VECTORS: ReadonlyArray<TabSuccessorVector>;
|
|
297
282
|
/** One `isDescendantOfPage` expectation. */
|
|
298
283
|
export interface TabDescendantVector {
|
|
299
|
-
/** What this row pins down. */
|
|
300
284
|
rule: string;
|
|
301
|
-
/** The page list. */
|
|
302
285
|
pages: readonly TabViewVectorPage[];
|
|
303
|
-
/** The candidate descendant. */
|
|
304
286
|
pageId: string | null;
|
|
305
|
-
/** The candidate ancestor. */
|
|
306
287
|
parentId: string;
|
|
307
|
-
/** Whether the walk reaches the ancestor. */
|
|
308
288
|
descendant: boolean;
|
|
309
289
|
}
|
|
310
|
-
/**
|
|
290
|
+
/**
|
|
291
|
+
* `is_descendant_of`.
|
|
292
|
+
*
|
|
311
293
|
* CORE-ONLY: an internal step of a pipeline whose COMPOSED result is renderer-driven — driving it separately would assert the same thing twice (TAB_VIEW_VECTORS)
|
|
312
294
|
*/
|
|
313
295
|
export declare const TAB_DESCENDANT_VECTORS: ReadonlyArray<TabDescendantVector>;
|
|
@@ -321,36 +303,28 @@ export interface TabsRevealedVector {
|
|
|
321
303
|
nPinnedPages: number;
|
|
322
304
|
/** `adw_tab_view_get_is_transferring_page`. */
|
|
323
305
|
isTransferringPage: boolean;
|
|
324
|
-
/** Whether the bar shows its tabs. */
|
|
325
306
|
revealed: boolean;
|
|
326
|
-
/** What this row pins down. */
|
|
327
307
|
rule: string;
|
|
328
308
|
}
|
|
329
309
|
/**
|
|
330
|
-
* `update_autohide_cb
|
|
310
|
+
* `update_autohide_cb`, verbatim:
|
|
331
311
|
* `!autohide || n_tabs > 1 || n_pinned_tabs >= 1 || is_transferring_page`.
|
|
332
312
|
*/
|
|
333
313
|
export declare const TABS_REVEALED_VECTORS: ReadonlyArray<TabsRevealedVector>;
|
|
334
314
|
/** One `tabCloseVisible` expectation. */
|
|
335
315
|
export interface TabCloseVisibleVector {
|
|
336
|
-
/** Pointer is over the tab. */
|
|
337
316
|
hovering: boolean;
|
|
338
317
|
/** The tab is not clipped by the bar's scroll region. */
|
|
339
318
|
fullyVisible: boolean;
|
|
340
|
-
/** The tab is selected. */
|
|
341
319
|
selected: boolean;
|
|
342
|
-
/** The tab is being dragged. */
|
|
343
320
|
dragging: boolean;
|
|
344
|
-
/** The tab is pinned. */
|
|
345
321
|
pinned: boolean;
|
|
346
|
-
/** Whether the close button shows. */
|
|
347
322
|
visible: boolean;
|
|
348
|
-
/** What this row pins down. */
|
|
349
323
|
rule: string;
|
|
350
324
|
}
|
|
351
325
|
/**
|
|
352
|
-
* `update_state`'s `show_close`
|
|
353
|
-
* construction
|
|
326
|
+
* `update_state`'s `show_close` plus the pinned gate applied at
|
|
327
|
+
* construction. Each port shipped a different single term of
|
|
354
328
|
* this — web showed it always, NS only on the selected tab.
|
|
355
329
|
*/
|
|
356
330
|
export declare const TAB_CLOSE_VISIBLE_VECTORS: ReadonlyArray<TabCloseVisibleVector>;
|
|
@@ -360,26 +334,20 @@ export interface TabTooltipVector {
|
|
|
360
334
|
tooltip: string;
|
|
361
335
|
/** `AdwTabPage:title`. */
|
|
362
336
|
title: string;
|
|
363
|
-
/** What the tab shows. */
|
|
364
337
|
text: string;
|
|
365
338
|
/** Whether that text is Pango markup rather than plain text. */
|
|
366
339
|
markup: boolean;
|
|
367
|
-
/** What this row pins down. */
|
|
368
340
|
rule: string;
|
|
369
341
|
}
|
|
370
342
|
/**
|
|
371
|
-
* `update_tooltip
|
|
343
|
+
* `update_tooltip`: a non-empty tooltip wins and is set as
|
|
372
344
|
* MARKUP; an empty one falls back to the title, set as TEXT.
|
|
373
345
|
*
|
|
374
|
-
*
|
|
375
|
-
*
|
|
376
|
-
*
|
|
377
|
-
*
|
|
378
|
-
*
|
|
379
|
-
* these rows today and neither is held to them. Both surfaces are readable from
|
|
380
|
-
* their own suites, so wiring them is a loop, not new capability.
|
|
381
|
-
*
|
|
382
|
-
* CORE-ONLY: an internal step of a pipeline whose COMPOSED result is renderer-driven — driving it separately would assert the same thing twice (TAB_VIEW_VECTORS — both ports consume the derivation, which this header once denied)
|
|
346
|
+
* CORE-ONLY: GAP, not a reason. Both renderers consume the derivation — the
|
|
347
|
+
* browser sets `tab.title = tabTooltip(page)` (`elements/adw-tab-view.ts`),
|
|
348
|
+
* NativeScript re-exports it as `tabTooltipText` (`widgets/tab-view-state.ts`) —
|
|
349
|
+
* and neither is held to these rows. Both surfaces are readable from their own
|
|
350
|
+
* suites, so wiring them is a loop, not new capability.
|
|
383
351
|
*/
|
|
384
352
|
export declare const TAB_TOOLTIP_VECTORS: ReadonlyArray<TabTooltipVector>;
|
|
385
353
|
/** One `tabIconState` expectation. */
|
|
@@ -396,24 +364,17 @@ export interface TabIconStateVector {
|
|
|
396
364
|
defaultIcon: string | null;
|
|
397
365
|
/** The icon actually painted, `null` for none. */
|
|
398
366
|
resolvedIcon: string | null;
|
|
399
|
-
/** Whether a spinner replaces the icon image. */
|
|
400
367
|
spinner: boolean;
|
|
401
|
-
/** Whether the icon slot shows. */
|
|
402
368
|
iconVisible: boolean;
|
|
403
|
-
/** Whether the indicator slot shows. */
|
|
404
369
|
indicatorVisible: boolean;
|
|
405
|
-
/** What this row pins down. */
|
|
406
370
|
rule: string;
|
|
407
371
|
}
|
|
408
|
-
/** `update_icons
|
|
372
|
+
/** `update_icons`. */
|
|
409
373
|
export declare const TAB_ICON_STATE_VECTORS: ReadonlyArray<TabIconStateVector>;
|
|
410
374
|
/** One page-descriptor normalization expectation. */
|
|
411
375
|
export interface TabPageDescriptorVector {
|
|
412
|
-
/** What this row pins down. */
|
|
413
376
|
rule: string;
|
|
414
|
-
/** The C property it is derived from. */
|
|
415
377
|
derivedFrom: string;
|
|
416
|
-
/** The declared page. */
|
|
417
378
|
spec: {
|
|
418
379
|
id: string;
|
|
419
380
|
title?: string | null;
|
|
@@ -423,11 +384,9 @@ export interface TabPageDescriptorVector {
|
|
|
423
384
|
loading?: boolean;
|
|
424
385
|
needsAttention?: boolean;
|
|
425
386
|
};
|
|
426
|
-
/** Resolved `title`. */
|
|
427
387
|
title: string;
|
|
428
388
|
/** Resolved `tooltip`. */
|
|
429
389
|
tooltip: string;
|
|
430
|
-
/** Resolved `icon`. */
|
|
431
390
|
icon: string | null;
|
|
432
391
|
/** Resolved `indicatorIcon`. */
|
|
433
392
|
indicatorIcon: string | null;
|
|
@@ -440,7 +399,7 @@ export interface TabPageDescriptorVector {
|
|
|
440
399
|
* What a declared page resolves to.
|
|
441
400
|
*
|
|
442
401
|
* The `null → ''` coercions are `g_set_str (&self->title, title ? title : "")`
|
|
443
|
-
*
|
|
402
|
+
* and its tooltip twin. The icon fields do NOT
|
|
444
403
|
* coerce: "no icon" is a state `tabIconState` branches on, so `null` has to
|
|
445
404
|
* survive.
|
|
446
405
|
*
|