@gjsify/adwaita-core 0.31.0 → 0.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/esm/about-dialog.js +3 -0
- package/lib/esm/action-row.js +1 -0
- package/lib/esm/avatar.js +1 -0
- package/lib/esm/banner.js +1 -0
- package/lib/esm/button-content.js +1 -0
- package/lib/esm/carousel.js +1 -0
- package/lib/esm/checks.js +1 -0
- package/lib/esm/chrome.js +1 -0
- package/lib/esm/conformance/about-dialog.js +6 -0
- package/lib/esm/conformance/action-row.js +1 -0
- package/lib/esm/conformance/avatar.js +1 -0
- package/lib/esm/conformance/banner.js +1 -0
- package/lib/esm/conformance/button-content.js +1 -0
- package/lib/esm/conformance/carousel.js +1 -0
- package/lib/esm/conformance/checks.js +1 -0
- package/lib/esm/conformance/chrome.js +1 -0
- package/lib/esm/conformance/data-grid.js +1 -0
- package/lib/esm/conformance/dialog.js +1 -0
- package/lib/esm/conformance/entry-row.js +1 -0
- package/lib/esm/conformance/index.js +1 -0
- package/lib/esm/conformance/navigation-view.js +1 -0
- package/lib/esm/conformance/popover.js +1 -0
- package/lib/esm/conformance/preferences.js +1 -0
- package/lib/esm/conformance/rows.js +1 -0
- package/lib/esm/conformance/sidebar.js +1 -0
- package/lib/esm/conformance/split-button.js +1 -0
- package/lib/esm/conformance/split-view.js +1 -0
- package/lib/esm/conformance/tab-view.js +1 -0
- package/lib/esm/conformance/view-stack.js +1 -0
- package/lib/esm/conformance/view-switcher.js +1 -0
- package/lib/esm/conformance/wrap-box.js +1 -0
- package/lib/esm/data-grid.js +1 -0
- package/lib/esm/dialog.js +1 -1
- package/lib/esm/entry-row.js +1 -0
- package/lib/esm/glib.js +1 -0
- package/lib/esm/index.js +1 -1
- package/lib/esm/navigation-view.js +1 -0
- package/lib/esm/popover.js +1 -0
- package/lib/esm/preferences.js +1 -0
- package/lib/esm/rows.js +1 -1
- package/lib/esm/sidebar.js +1 -0
- package/lib/esm/split-button.js +1 -0
- package/lib/esm/split-view.js +1 -0
- package/lib/esm/tab-view.js +1 -0
- package/lib/esm/view-stack.js +1 -0
- package/lib/esm/view-switcher.js +1 -0
- package/lib/types/about-dialog.d.ts +391 -0
- package/lib/types/about-dialog.spec.d.ts +2 -0
- package/lib/types/action-row.d.ts +270 -0
- package/lib/types/action-row.spec.d.ts +2 -0
- package/lib/types/avatar.d.ts +112 -0
- package/lib/types/avatar.spec.d.ts +2 -0
- package/lib/types/banner.d.ts +104 -0
- package/lib/types/banner.spec.d.ts +2 -0
- package/lib/types/button-content.d.ts +141 -0
- package/lib/types/button-content.spec.d.ts +2 -0
- package/lib/types/carousel.d.ts +535 -0
- package/lib/types/carousel.spec.d.ts +2 -0
- package/lib/types/checks.d.ts +63 -0
- package/lib/types/checks.spec.d.ts +2 -0
- package/lib/types/chrome.d.ts +355 -0
- package/lib/types/chrome.spec.d.ts +2 -0
- package/lib/types/conformance/about-dialog.d.ts +300 -0
- package/lib/types/conformance/action-row.d.ts +186 -0
- package/lib/types/conformance/avatar.d.ts +61 -0
- package/lib/types/conformance/banner.d.ts +91 -0
- package/lib/types/conformance/button-content.d.ts +110 -0
- package/lib/types/conformance/carousel.d.ts +284 -0
- package/lib/types/conformance/checks.d.ts +29 -0
- package/lib/types/conformance/chrome.d.ts +195 -0
- package/lib/types/conformance/data-grid.d.ts +134 -0
- package/lib/types/conformance/dialog.d.ts +97 -0
- package/lib/types/conformance/entry-row.d.ts +185 -0
- package/lib/types/conformance/index.d.ts +44 -0
- package/lib/types/conformance/navigation-view.d.ts +235 -0
- package/lib/types/conformance/popover.d.ts +56 -0
- package/lib/types/conformance/preferences.d.ts +170 -0
- package/lib/types/conformance/rows.d.ts +51 -0
- package/lib/types/conformance/sidebar.d.ts +182 -0
- package/lib/types/conformance/split-button.d.ts +189 -0
- package/lib/types/conformance/split-view.d.ts +290 -0
- package/lib/types/conformance/tab-view.d.ts +441 -0
- package/lib/types/conformance/view-stack.d.ts +121 -0
- package/lib/types/conformance/view-switcher.d.ts +443 -0
- package/lib/types/conformance/wrap-box.d.ts +134 -0
- package/lib/types/data-grid.d.ts +140 -0
- package/lib/types/data-grid.spec.d.ts +2 -0
- package/lib/types/dialog.d.ts +144 -0
- package/lib/types/entry-row.d.ts +308 -0
- package/lib/types/entry-row.spec.d.ts +2 -0
- package/lib/types/glib.d.ts +49 -0
- package/lib/types/index.d.ts +43 -4
- package/lib/types/navigation-view.d.ts +343 -0
- package/lib/types/navigation-view.spec.d.ts +2 -0
- package/lib/types/popover.d.ts +155 -0
- package/lib/types/popover.spec.d.ts +2 -0
- package/lib/types/preferences.d.ts +349 -0
- package/lib/types/preferences.spec.d.ts +2 -0
- package/lib/types/rows.d.ts +49 -2
- package/lib/types/sidebar.d.ts +308 -0
- package/lib/types/sidebar.spec.d.ts +2 -0
- package/lib/types/split-button.d.ts +316 -0
- package/lib/types/split-button.spec.d.ts +2 -0
- package/lib/types/split-view.d.ts +714 -0
- package/lib/types/split-view.spec.d.ts +2 -0
- package/lib/types/tab-view.d.ts +616 -0
- package/lib/types/tab-view.spec.d.ts +2 -0
- package/lib/types/view-stack.d.ts +266 -0
- package/lib/types/view-stack.spec.d.ts +2 -0
- package/lib/types/view-switcher.d.ts +521 -0
- package/lib/types/view-switcher.spec.d.ts +2 -0
- package/package.json +8 -4
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import type { BottomSheetCloseOutcome, BottomSheetCloseSource, BottomSheetTeardownCallback } from '../dialog.js';
|
|
2
|
+
/** One `resolveBottomSheetClose` expectation. */
|
|
3
|
+
export interface BottomSheetCloseVector {
|
|
4
|
+
/** Which affordance asked to close. */
|
|
5
|
+
source: BottomSheetCloseSource;
|
|
6
|
+
/** `AdwBottomSheet:open` at the time of the request. */
|
|
7
|
+
open: boolean;
|
|
8
|
+
/** `AdwBottomSheet:can-close` at the time of the request. */
|
|
9
|
+
canClose: boolean;
|
|
10
|
+
/** What the C source does with it. */
|
|
11
|
+
outcome: BottomSheetCloseOutcome;
|
|
12
|
+
/** Why this row exists — the rule or corner it pins down. */
|
|
13
|
+
rule: string;
|
|
14
|
+
/** The C function + lines it is derived from. */
|
|
15
|
+
derivedFrom: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The full decision table — every `(source, open, canClose)` combination that is
|
|
19
|
+
* distinguishable, so a renderer cannot pass by implementing three of the four
|
|
20
|
+
* paths and aliasing the fourth.
|
|
21
|
+
*/
|
|
22
|
+
export declare const BOTTOM_SHEET_CLOSE_VECTORS: ReadonlyArray<BottomSheetCloseVector>;
|
|
23
|
+
/** One step of a {@link BottomSheetPresentationVector}, in the order it is applied. */
|
|
24
|
+
export type BottomSheetPresentationStep =
|
|
25
|
+
/** The programmatic path — `adw_bottom_sheet_set_open`, ignores `can-close`. */
|
|
26
|
+
{
|
|
27
|
+
readonly kind: 'setOpen';
|
|
28
|
+
readonly open: boolean;
|
|
29
|
+
}
|
|
30
|
+
/** `adw_bottom_sheet_set_can_close`. */
|
|
31
|
+
| {
|
|
32
|
+
readonly kind: 'setCanClose';
|
|
33
|
+
readonly canClose: boolean;
|
|
34
|
+
}
|
|
35
|
+
/** The interactive path — runs the {@link BOTTOM_SHEET_CLOSE_VECTORS} gate. */
|
|
36
|
+
| {
|
|
37
|
+
readonly kind: 'requestClose';
|
|
38
|
+
readonly source: BottomSheetCloseSource;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* One end-to-end presentation expectation.
|
|
42
|
+
*
|
|
43
|
+
* Every field except `callbacks`/`hasBeenOpen` is observable from a RENDERER too
|
|
44
|
+
* — `notifications` is the `notify::open` event stream, `outcomes` is what the
|
|
45
|
+
* widget's `requestClose()` returns — so the same row drives the core suite, the
|
|
46
|
+
* browser suite and the NativeScript suite. `callbacks` and `hasBeenOpen` are
|
|
47
|
+
* the core-only seam `AdwDialog` consumes.
|
|
48
|
+
*/
|
|
49
|
+
export interface BottomSheetPresentationVector {
|
|
50
|
+
/** Applied in order, through the surface every implementation exposes. */
|
|
51
|
+
steps: readonly BottomSheetPresentationStep[];
|
|
52
|
+
/** The outcome of each `requestClose` step, in order (other steps contribute nothing). */
|
|
53
|
+
outcomes: readonly BottomSheetCloseOutcome[];
|
|
54
|
+
/** Every `notify::open` payload, in order. A spurious notification makes this longer. */
|
|
55
|
+
notifications: readonly boolean[];
|
|
56
|
+
/** The `closing`/`closed` callback log — core-only (`adw_bottom_sheet_set_callbacks`). */
|
|
57
|
+
callbacks: readonly BottomSheetTeardownCallback[];
|
|
58
|
+
/** `open` after the last step. */
|
|
59
|
+
open: boolean;
|
|
60
|
+
/** `has_been_open` after the last step. */
|
|
61
|
+
hasBeenOpen: boolean;
|
|
62
|
+
/** Why this row exists. */
|
|
63
|
+
rule: string;
|
|
64
|
+
/** The C function + lines it is derived from. */
|
|
65
|
+
derivedFrom: string;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* The three-method surface a {@link BottomSheetPresentationVector} is replayed
|
|
69
|
+
* against. Core implements it directly; each renderer implements it by driving
|
|
70
|
+
* its REAL widget (an attribute write, a property set, a `requestClose()` call),
|
|
71
|
+
* so the same script exercises the same behaviour on every side.
|
|
72
|
+
*/
|
|
73
|
+
export interface BottomSheetPresentationAdapter {
|
|
74
|
+
/** The programmatic path (`AdwBottomSheet:open`). */
|
|
75
|
+
setOpen(open: boolean): void;
|
|
76
|
+
/** `AdwBottomSheet:can-close`. */
|
|
77
|
+
setCanClose(canClose: boolean): void;
|
|
78
|
+
/** The interactive path — returns what the gate decided. */
|
|
79
|
+
requestClose(source: BottomSheetCloseSource): BottomSheetCloseOutcome;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Replay a vector's steps against `adapter`, collecting the outcome of each
|
|
83
|
+
* `requestClose` step in order. Shared by all three suites so no side can drift
|
|
84
|
+
* in HOW it replays a row.
|
|
85
|
+
*/
|
|
86
|
+
export declare function runBottomSheetSteps(adapter: BottomSheetPresentationAdapter, steps: readonly BottomSheetPresentationStep[]): BottomSheetCloseOutcome[];
|
|
87
|
+
/**
|
|
88
|
+
* `adw_bottom_sheet_set_open`'s state machine as scripts: the idempotent guard,
|
|
89
|
+
* the never-been-open teardown replay, and which paths notify.
|
|
90
|
+
*
|
|
91
|
+
* The `notifications` column is the one that caught a live bug: the browser port
|
|
92
|
+
* emitted `notify::open` whenever the open ATTRIBUTE VALUE changed rather than
|
|
93
|
+
* when the open STATE changed, so `setAttribute('open','')` followed by
|
|
94
|
+
* `setAttribute('open','false')` fired a second notification carrying an
|
|
95
|
+
* unchanged payload.
|
|
96
|
+
*/
|
|
97
|
+
export declare const BOTTOM_SHEET_PRESENTATION_VECTORS: ReadonlyArray<BottomSheetPresentationVector>;
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import type { EntryRowActivation, EntryRowRenderState, PasswordEntryRowRenderState } from '../entry-row.js';
|
|
2
|
+
/** One `entryTextLength` expectation. */
|
|
3
|
+
export interface EntryTextLengthVector {
|
|
4
|
+
/** The entry contents. */
|
|
5
|
+
text: string;
|
|
6
|
+
/** `adw_entry_row_get_text_length` — "The current number of characters". */
|
|
7
|
+
length: number;
|
|
8
|
+
/** Why this row exists. */
|
|
9
|
+
rule: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* `adw_entry_row_get_text_length` (adw-entry-row.c:1304-1318), whose property is
|
|
13
|
+
* declared `0, G_MAXUINT16, 0` (C:666-669).
|
|
14
|
+
*
|
|
15
|
+
* The astral rows are the point: `'🔒é'.length` is 3 in JS because JS counts
|
|
16
|
+
* UTF-16 units, and GTK counts characters. A port that gets this wrong also
|
|
17
|
+
* truncates surrogate pairs in half at `max-length`.
|
|
18
|
+
*/
|
|
19
|
+
export declare const ENTRY_TEXT_LENGTH_VECTORS: ReadonlyArray<EntryTextLengthVector>;
|
|
20
|
+
/** One `clampEntryText` / `setMaxLength` expectation. */
|
|
21
|
+
export interface EntryMaxLengthVector {
|
|
22
|
+
/** The text handed to the entry. */
|
|
23
|
+
text: string;
|
|
24
|
+
/** `Adw.EntryRow:max-length` — `0` = unlimited. */
|
|
25
|
+
maxLength: number;
|
|
26
|
+
/** What the entry ends up holding. */
|
|
27
|
+
clamped: string;
|
|
28
|
+
/** {@link EntryTextLengthVector.length} of {@link clamped}. */
|
|
29
|
+
length: number;
|
|
30
|
+
/** Why this row exists. */
|
|
31
|
+
rule: string;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* `adw_entry_row_set_max_length` (adw-entry-row.c:1329-1343) read together with
|
|
35
|
+
* 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
|
+
* (C:674, :678-682).
|
|
38
|
+
*/
|
|
39
|
+
export declare const ENTRY_MAX_LENGTH_VECTORS: ReadonlyArray<EntryMaxLengthVector>;
|
|
40
|
+
/**
|
|
41
|
+
* One mutation in an entry-row scenario. A renderer maps each `op` onto its own
|
|
42
|
+
* platform gesture (focus/blur the field, type into it, toggle the property).
|
|
43
|
+
*/
|
|
44
|
+
export type EntryRowStep = {
|
|
45
|
+
op: 'setText';
|
|
46
|
+
value: string;
|
|
47
|
+
} | {
|
|
48
|
+
op: 'setEditing';
|
|
49
|
+
value: boolean;
|
|
50
|
+
} | {
|
|
51
|
+
op: 'setEditable';
|
|
52
|
+
value: boolean;
|
|
53
|
+
} | {
|
|
54
|
+
op: 'setMaxLength';
|
|
55
|
+
value: number;
|
|
56
|
+
} | {
|
|
57
|
+
op: 'setShowApplyButton';
|
|
58
|
+
value: boolean;
|
|
59
|
+
} | {
|
|
60
|
+
op: 'setShowIndicator';
|
|
61
|
+
value: boolean;
|
|
62
|
+
} | {
|
|
63
|
+
op: 'setActivatesDefault';
|
|
64
|
+
value: boolean;
|
|
65
|
+
} | {
|
|
66
|
+
op: 'apply';
|
|
67
|
+
};
|
|
68
|
+
/** One `update_empty` truth-table row: a scenario and the FULL snapshot it lands on. */
|
|
69
|
+
export interface EntryRowStateVector {
|
|
70
|
+
/** Human-readable scenario name (used as the test title). */
|
|
71
|
+
name: string;
|
|
72
|
+
/** Applied in order to a freshly-constructed entry row. */
|
|
73
|
+
steps: ReadonlyArray<EntryRowStep>;
|
|
74
|
+
/** Every output of the derivation afterwards. */
|
|
75
|
+
expected: EntryRowRenderState;
|
|
76
|
+
/** The C rule this row pins down. */
|
|
77
|
+
rule: string;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* `update_empty` (adw-entry-row.c:147-161) plus the `text_changed` latch
|
|
81
|
+
* (C:170-172) and its two reset paths (the apply click C:237, the property
|
|
82
|
+
* turned off C:989-992).
|
|
83
|
+
*
|
|
84
|
+
* Defaults of a fresh row: no text, unlimited length, not editing, EDITABLE,
|
|
85
|
+
* no apply button, no indicator — plus the indicator and apply button starting
|
|
86
|
+
* child-invisible (`adw_entry_row_init`, C:764-765).
|
|
87
|
+
*/
|
|
88
|
+
export declare const ENTRY_ROW_STATE_VECTORS: ReadonlyArray<EntryRowStateVector>;
|
|
89
|
+
/** One `text_activated_cb` expectation. */
|
|
90
|
+
export interface EntryRowActivationVector {
|
|
91
|
+
/** Human-readable scenario name. */
|
|
92
|
+
name: string;
|
|
93
|
+
/** Applied in order to a freshly-constructed entry row before pressing Enter. */
|
|
94
|
+
steps: ReadonlyArray<EntryRowStep>;
|
|
95
|
+
/** What Enter resolves to — exactly ONE signal. */
|
|
96
|
+
activation: EntryRowActivation;
|
|
97
|
+
/** The latch afterwards (`apply` clears it; `entry-activated` leaves state alone). */
|
|
98
|
+
textChangedAfter: boolean;
|
|
99
|
+
/** The C rule this row pins down. */
|
|
100
|
+
rule: string;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* `text_activated_cb` (adw-entry-row.c:243-266): the apply path when the apply
|
|
104
|
+
* button is child-visible, otherwise activate-the-default (C:253-254) followed
|
|
105
|
+
* by `entry-activated` (C:256) — in that order.
|
|
106
|
+
*/
|
|
107
|
+
export declare const ENTRY_ROW_ACTIVATION_VECTORS: ReadonlyArray<EntryRowActivationVector>;
|
|
108
|
+
/** One setter-guard expectation: what each step returns, and how many re-derivations the sequence causes. */
|
|
109
|
+
export interface EntryRowGuardVector {
|
|
110
|
+
/** Human-readable scenario name. */
|
|
111
|
+
name: string;
|
|
112
|
+
/** Applied in order to a freshly-constructed entry row. */
|
|
113
|
+
steps: ReadonlyArray<EntryRowStep>;
|
|
114
|
+
/** Per step: the setter's return value, or `null` for the `void` `setShowIndicator`. */
|
|
115
|
+
returns: ReadonlyArray<boolean | null>;
|
|
116
|
+
/** How many times subscribers are notified across the whole sequence. */
|
|
117
|
+
notifications: number;
|
|
118
|
+
/** The C rule this row pins down. */
|
|
119
|
+
rule: string;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* The guards are NOT uniform, and the asymmetry is the point: every public
|
|
123
|
+
* setter early-outs on an unchanged value (C:984, :1198, :1247, :1339), while
|
|
124
|
+
* the private `adw_entry_row_set_show_indicator` (C:1281-1296) deliberately has
|
|
125
|
+
* NO equality check and re-derives unconditionally.
|
|
126
|
+
*/
|
|
127
|
+
export declare const ENTRY_ROW_GUARD_VECTORS: ReadonlyArray<EntryRowGuardVector>;
|
|
128
|
+
/** One mutation in a password-entry-row scenario. */
|
|
129
|
+
export type PasswordEntryRowStep = {
|
|
130
|
+
op: 'setRevealed';
|
|
131
|
+
value: boolean;
|
|
132
|
+
} | {
|
|
133
|
+
op: 'togglePeek';
|
|
134
|
+
} | {
|
|
135
|
+
op: 'setCapsLockOn';
|
|
136
|
+
value: boolean;
|
|
137
|
+
}
|
|
138
|
+
/** A step applied to the COMPOSED entry row (e.g. focusing the field). */
|
|
139
|
+
| {
|
|
140
|
+
op: 'entry';
|
|
141
|
+
step: EntryRowStep;
|
|
142
|
+
};
|
|
143
|
+
/** One password-entry-row expectation: the peek/caps-lock snapshot plus what it did to the parent row. */
|
|
144
|
+
export interface PasswordEntryRowVector {
|
|
145
|
+
/** Human-readable scenario name. */
|
|
146
|
+
name: string;
|
|
147
|
+
/** Applied in order to a freshly-constructed password entry row. */
|
|
148
|
+
steps: ReadonlyArray<PasswordEntryRowStep>;
|
|
149
|
+
/** Every output of the password derivation afterwards. */
|
|
150
|
+
expected: PasswordEntryRowRenderState;
|
|
151
|
+
/** `indicatorVisible` on the composed entry row — the caps-lock warning the user actually sees. */
|
|
152
|
+
entryIndicatorVisible: boolean;
|
|
153
|
+
/** The C rule this row pins down. */
|
|
154
|
+
rule: string;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* `notify_visibility_cb` (adw-password-entry-row.c:62-81) + `update_caps_lock`
|
|
158
|
+
* (C:52-60), and the two rules that make the caps-lock warning more than a
|
|
159
|
+
* boolean: it is suppressed while PEEKING (C:58, `!gtk_text_get_visibility`) and
|
|
160
|
+
* suppressed while UNFOCUSED (adw-entry-row.c:151, `editing && show_indicator`).
|
|
161
|
+
*/
|
|
162
|
+
export declare const PASSWORD_ENTRY_ROW_VECTORS: ReadonlyArray<PasswordEntryRowVector>;
|
|
163
|
+
/** One peek-notification expectation — how often a reveal change is observable. */
|
|
164
|
+
export interface PasswordRevealGuardVector {
|
|
165
|
+
/** Human-readable scenario name. */
|
|
166
|
+
name: string;
|
|
167
|
+
/** Reveal-only steps applied to a freshly-constructed password entry row. */
|
|
168
|
+
steps: ReadonlyArray<{
|
|
169
|
+
op: 'setRevealed';
|
|
170
|
+
value: boolean;
|
|
171
|
+
} | {
|
|
172
|
+
op: 'togglePeek';
|
|
173
|
+
}>;
|
|
174
|
+
/** How many reveal notifications the sequence produces. */
|
|
175
|
+
notifications: number;
|
|
176
|
+
/** The C rule this row pins down. */
|
|
177
|
+
rule: string;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* The peek guard. Every settable property in this family early-outs on an
|
|
181
|
+
* unchanged value (adw-entry-row.c:984, :1198, :1247), so a redundant set is
|
|
182
|
+
* silent by house rule — which is what makes the web port's unguarded
|
|
183
|
+
* `notify::revealed` on a same-value `setAttribute` a defect.
|
|
184
|
+
*/
|
|
185
|
+
export declare const PASSWORD_REVEAL_GUARD_VECTORS: ReadonlyArray<PasswordRevealGuardVector>;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export { ABOUT_DIALOG_CREDITS_LEGAL_VECTORS, ABOUT_DIALOG_DETAILS_VECTORS, ABOUT_DIALOG_HEADER_VECTORS, ABOUT_DIALOG_LABEL_VECTORS, ABOUT_DIALOG_SUPPORT_VECTORS, CREDITS_SECTIONS_VECTORS, CREDIT_PERSON_VECTORS, LEGAL_SECTION_VECTORS, LICENSE_INFO_VECTORS, LICENSE_SETTER_VECTORS, LICENSE_SPDX_VECTORS, LICENSE_TEXT_VECTORS, TRANSLATOR_CREDITS_VECTORS, } from './about-dialog.js';
|
|
2
|
+
export type { AboutDialogCreditsLegalVector, AboutDialogDetailsVector, AboutDialogHeaderVector, AboutDialogLabelVector, AboutDialogSupportVector, CreditPersonVector, CreditsSectionsVector, LegalSectionVector, LicenseInfoVector, LicenseSetterStep, LicenseSetterVector, LicenseSpdxVector, LicenseTextVector, TranslatorCreditsVector, } from './about-dialog.js';
|
|
3
|
+
export { AVATAR_COLOR_VECTORS, AVATAR_FONT_SIZE_VECTORS, AVATAR_INITIALS_VECTORS, AVATAR_MODE_VECTORS, } from './avatar.js';
|
|
4
|
+
export type { AvatarColorVector, AvatarFontSizeVector, AvatarInitialsVector, AvatarModeVector } from './avatar.js';
|
|
5
|
+
export { ACTION_ROW_ACTIVATION_VECTORS, BUTTON_ROW_ACTIVATABLE_VECTORS, BUTTON_ROW_ICON_VECTORS, LABEL_VISIBILITY_VECTORS, SWITCH_ROW_NOTIFY_VECTORS, WINDOW_TITLE_VECTORS, } from './action-row.js';
|
|
6
|
+
export type { ActionRowActivationVector, ActionRowStep, ButtonRowActivatableVector, ButtonRowIconVector, LabelVisibilityVector, SwitchRowNotifyVector, SwitchRowStep, WindowTitleStep, WindowTitleVector, } from './action-row.js';
|
|
7
|
+
export { BANNER_BUTTON_STYLE_PARSE_VECTORS, BANNER_BUTTON_STYLE_VECTORS, BANNER_BUTTON_TEXT_VECTORS, BANNER_BUTTON_VISIBLE_VECTORS, BANNER_DEFAULT_VECTORS, } from './banner.js';
|
|
8
|
+
export type { BannerButtonStyleParseVector, BannerButtonStyleVector, BannerButtonTextVector, BannerButtonVisibleVector, BannerDefaultVector, } from './banner.js';
|
|
9
|
+
export { BUTTON_CONTENT_DEFAULT_VECTORS, BUTTON_CONTENT_ELLIPSIZE_VECTORS, BUTTON_CONTENT_ICON_VECTORS, BUTTON_CONTENT_LABEL_VECTORS, BUTTON_CONTENT_STYLE_TARGET_VECTORS, BUTTON_CONTENT_TEXT_VECTORS, } from './button-content.js';
|
|
10
|
+
export type { ButtonContentDefaultVector, ButtonContentEllipsizeVector, ButtonContentIconVector, ButtonContentLabelVector, ButtonContentStyleTargetVector, ButtonContentTextVector, } from './button-content.js';
|
|
11
|
+
export { RADIO_GROUP_VECTORS } from './checks.js';
|
|
12
|
+
export type { RadioGroupStep, RadioGroupVector } from './checks.js';
|
|
13
|
+
export { COMBO_SELECTION_VECTORS } from './rows.js';
|
|
14
|
+
export type { ComboSelectionStep, ComboSelectionVector } from './rows.js';
|
|
15
|
+
export { VIEW_STACK_ICON_NAME_VECTORS, VIEW_STACK_PAGE_VECTORS, VIEW_STACK_VECTORS } from './view-stack.js';
|
|
16
|
+
export type { ViewStackIconNameVector, ViewStackPageDescriptorVector, ViewStackVector, ViewStackVectorChange, ViewStackVectorOp, ViewStackVectorPage, } from './view-stack.js';
|
|
17
|
+
export { NAVIGATION_VIEW_VECTORS, collectNavigationState, navigationEventLog, runNavigationSteps, } from './navigation-view.js';
|
|
18
|
+
export type { ExpectedNavigationChange, ExpectedPageState, NavigationEventRecord, NavigationExpectation, NavigationPageId, NavigationStateCheck, NavigationStep, NavigationStepOutcome, NavigationVector, NavigationVectorAdapter, } from './navigation-view.js';
|
|
19
|
+
export { SIDEBAR_ACTIVATION_VECTORS, SIDEBAR_CLAMP_VECTORS, SIDEBAR_FILTER_VECTORS, SIDEBAR_ITEMS_CHANGED_VECTORS, SIDEBAR_ITEM_FLAG_VECTORS, SIDEBAR_MODEL_VECTORS, SIDEBAR_MODE_VECTORS, } from './sidebar.js';
|
|
20
|
+
export type { SidebarActivationVector, SidebarClampVector, SidebarFilterVector, SidebarItemFlagsVector, SidebarItemsChangedVector, SidebarModeVector, SidebarModelVector, } from './sidebar.js';
|
|
21
|
+
export { ENTRY_MAX_LENGTH_VECTORS, ENTRY_ROW_ACTIVATION_VECTORS, ENTRY_ROW_GUARD_VECTORS, ENTRY_ROW_STATE_VECTORS, ENTRY_TEXT_LENGTH_VECTORS, PASSWORD_ENTRY_ROW_VECTORS, PASSWORD_REVEAL_GUARD_VECTORS, } from './entry-row.js';
|
|
22
|
+
export type { EntryMaxLengthVector, EntryRowActivationVector, EntryRowGuardVector, EntryRowStateVector, EntryRowStep, EntryTextLengthVector, PasswordEntryRowStep, PasswordEntryRowVector, PasswordRevealGuardVector, } from './entry-row.js';
|
|
23
|
+
export { ADW_LENGTH_UNIT_VECTORS, GLIB_CLAMP_VECTORS, NATURAL_SIDEBAR_WIDTH_VECTORS, NAVIGATION_ACTION_VECTORS, NAVIGATION_SPLIT_VIEW_LAYOUT_VECTORS, NAVIGATION_STACK_VECTORS, OVERLAY_COLLAPSE_VECTORS, OVERLAY_SPLIT_VIEW_LAYOUT_VECTORS, OVERLAY_SWIPE_AREA_VECTORS, OVERLAY_SWIPE_CANCEL_VECTORS, OVERLAY_SWIPE_RELEASE_VECTORS, OVERLAY_SWIPE_SNAP_POINT_VECTORS, OVERLAY_SWIPE_START_VECTORS, SIDEBAR_BOUNDS_VECTORS, SIDEBAR_WIDTH_VECTORS, SPLIT_VIEW_MEASURE_VECTORS, TAGS_CONFLICT_VECTORS, } from './split-view.js';
|
|
24
|
+
export type { AdwLengthUnitVector, GlibClampVector, NaturalSidebarWidthVector, NavigationActionVector, NavigationLayoutVector, NavigationStackVector, OverlayCollapseVector, OverlayLayoutVector, OverlaySplitViewSnapshot, SidebarBoundsVector, SidebarWidthVector, SplitViewMeasureVector, SwipeAreaVector, SwipeCancelVector, SwipeReleaseVector, SwipeSnapPointVector, SwipeStartVector, TagsConflictVector, } from './split-view.js';
|
|
25
|
+
export { MENU_BUTTON_DIRECTION_VECTORS, SPLIT_BUTTON_CONTENT_VECTORS, SPLIT_BUTTON_DIRECTION_VECTORS, SPLIT_BUTTON_DROPDOWN_VECTORS, SPLIT_BUTTON_MENU_ACTIVATION_VECTORS, SPLIT_BUTTON_MENU_PARSE_VECTORS, SPLIT_BUTTON_ROOT_STATE_VECTORS, SPLIT_BUTTON_STYLE_CLASS_VECTORS, SPLIT_BUTTON_TOOLTIP_VECTORS, } from './split-button.js';
|
|
26
|
+
export type { SplitButtonContentStep, SplitButtonContentVector, SplitButtonDirectionVector, SplitButtonDropdownVector, SplitButtonMenuActivationVector, SplitButtonMenuParseVector, SplitButtonRootStateVector, SplitButtonStyleClassVector, SplitButtonTooltipVector, } from './split-button.js';
|
|
27
|
+
export { INLINE_TOGGLE_VECTORS, INLINE_TOOLTIP_VECTORS, VIEW_SWITCHER_BADGE_VECTORS, VIEW_SWITCHER_BAR_REVEAL_VECTORS, VIEW_SWITCHER_BAR_VECTORS, VIEW_SWITCHER_BUTTON_VECTORS, VIEW_SWITCHER_BUTTON_VISIBILITY_VECTORS, VIEW_SWITCHER_DRAG_VECTORS, VIEW_SWITCHER_ICON_VECTORS, VIEW_SWITCHER_MNEMONIC_VECTORS, VIEW_SWITCHER_REBUILD_VECTORS, VIEW_SWITCHER_SELECTION_VECTORS, createViewSwitcherClock, } from './view-switcher.js';
|
|
28
|
+
export type { ExpectedInlineToggle, ExpectedViewSwitcherButton, InlineToggleVector, InlineTooltipVector, MnemonicVector, ViewSwitcherBadgeVector, ViewSwitcherBarRevealVector, ViewSwitcherBarSnapshot, ViewSwitcherBarStep, ViewSwitcherBarVector, ViewSwitcherButtonVector, ViewSwitcherButtonVisibilityVector, ViewSwitcherClock, ViewSwitcherDragStep, ViewSwitcherDragVector, ViewSwitcherIconVector, ViewSwitcherRebuildVector, ViewSwitcherSelectionVector, ViewSwitcherVectorChange, ViewSwitcherVectorOp, ViewSwitcherVectorPage, } from './view-switcher.js';
|
|
29
|
+
export { TABS_REVEALED_VECTORS, TAB_CLOSE_VISIBLE_VECTORS, TAB_DESCENDANT_VECTORS, TAB_ICON_STATE_VECTORS, TAB_PAGE_DESCRIPTOR_VECTORS, TAB_SUCCESSOR_VECTORS, TAB_TOOLTIP_VECTORS, TAB_VIEW_VECTORS, applyTabViewOp, seedTabViewPages, tabViewClosing, tabViewOrder, } from './tab-view.js';
|
|
30
|
+
export type { TabCloseVisibleVector, TabDescendantVector, TabIconStateVector, TabPageDescriptorVector, TabSuccessorVector, TabTooltipVector, TabViewVector, TabViewVectorHandler, TabViewVectorOp, TabViewVectorPage, TabViewVectorPagesChange, TabViewVectorSelection, TabViewVectorTarget, TabsRevealedVector, } from './tab-view.js';
|
|
31
|
+
export { CAROUSEL_CLAMP_VECTORS, CAROUSEL_NAVIGATE_VECTORS, CAROUSEL_PAGE_AT_POSITION_VECTORS, CAROUSEL_PAGE_LIST_VECTORS, CAROUSEL_PROPERTY_DEFAULT_VECTORS, CAROUSEL_RANGE_VECTORS, CAROUSEL_REORDER_SHIFT_VECTORS, CAROUSEL_REVEAL_VECTORS, CAROUSEL_SIZES_FROM_SNAP_POINTS_VECTORS, CAROUSEL_SNAP_POINT_VECTORS, CAROUSEL_WHEEL_LOCKOUT_VECTORS, CAROUSEL_WHEEL_VECTORS, } from './carousel.js';
|
|
32
|
+
export type { CarouselClampVector, CarouselNavigateVector, CarouselPageAtPositionVector, CarouselPageListVector, CarouselPageOp, CarouselPropertyDefaultVector, CarouselRangeVector, CarouselReorderShiftVector, CarouselRevealOp, CarouselRevealVector, CarouselSizesFromSnapPointsVector, CarouselSnapPointVector, CarouselStateSnapshot, CarouselWheelLockoutStep, CarouselWheelLockoutVector, CarouselWheelVector, } from './carousel.js';
|
|
33
|
+
export { DATA_GRID_CELL_TEXT_VECTORS, DATA_GRID_COLUMN_CLASS_VECTORS, DATA_GRID_COLUMN_NORMALIZE_VECTORS, DATA_GRID_INTERACTIVE_VECTORS, DATA_GRID_TRACK_VECTORS, DATA_GRID_VARIANT_VECTORS, } from './data-grid.js';
|
|
34
|
+
export type { DataGridCellTextVector, DataGridColumnClassVector, DataGridColumnNormalizeVector, DataGridInteractiveVector, DataGridTrackVector, DataGridVariantVector, } from './data-grid.js';
|
|
35
|
+
export { CASE_FOLD_VECTORS, MAKE_COMPARABLE_VECTORS, PREFERENCES_GROUP_HEADER_VECTORS, PREFERENCES_SEARCH_PAGES, PREFERENCES_SEARCH_VECTORS, ROW_MATCH_VECTORS, SEARCH_CORPUS_VECTORS, SEARCH_ROW_SUBTITLE_VECTORS, STRIP_MARKUP_VECTORS, STRIP_MNEMONIC_VECTORS, } from './preferences.js';
|
|
36
|
+
export type { CaseFoldVector, MakeComparableVector, PreferencesGroupHeaderVector, PreferencesSearchExpectation, PreferencesSearchVector, RowMatchVector, SearchCorpusVector, SearchRowSubtitleVector, StripMarkupVector, StripMnemonicVector, } from './preferences.js';
|
|
37
|
+
export { CLAMP_ALLOCATE_VECTORS, CLAMP_CHILD_SIZE_VECTORS, CLAMP_PROPERTY_VECTORS, CLAMP_SIZE_FROM_CHILD_VECTORS, CLAMP_THRESHOLD_VECTORS, SPINNER_GEOMETRY_VECTORS, SPINNER_SIZE_VECTORS, TOOLBAR_VIEW_ALLOCATE_VECTORS, TOOLBAR_VIEW_CLASS_VECTORS, TOOLBAR_VIEW_CONTENT_FOR_SIZE_VECTORS, TOOLBAR_VIEW_MEASURE_VECTORS, } from './chrome.js';
|
|
38
|
+
export type { ClampAllocateVector, ClampChildSizeVector, ClampPropertyVector, ClampSizeFromChildVector, ClampThresholdsVector, SpinnerGeometryVector, SpinnerSizeVector, ToolbarViewAllocateVector, ToolbarViewClassVector, ToolbarViewContentForSizeVector, ToolbarViewMeasureVector, } from './chrome.js';
|
|
39
|
+
export { BOTTOM_SHEET_CLOSE_VECTORS, BOTTOM_SHEET_PRESENTATION_VECTORS, runBottomSheetSteps } from './dialog.js';
|
|
40
|
+
export type { BottomSheetCloseVector, BottomSheetPresentationAdapter, BottomSheetPresentationStep, BottomSheetPresentationVector, } from './dialog.js';
|
|
41
|
+
export { POPOVER_KEY_VECTORS, POPOVER_SURFACE_VECTORS } from './popover.js';
|
|
42
|
+
export type { PopoverKeyVector, PopoverSurfaceVariant, PopoverSurfaceVector } from './popover.js';
|
|
43
|
+
export { ADW_WRAP_BOX_DEFAULT_ALIGN, ADW_WRAP_BOX_DEFAULT_JUSTIFY, ADW_WRAP_BOX_DEFAULT_JUSTIFY_LAST_LINE, ADW_WRAP_BOX_DEFAULT_SPACING, WRAP_BOX_LINE_VECTORS, WRAP_BOX_SPACING_NOTIFY_VECTORS, WRAP_BOX_SPACING_VECTORS, } from './wrap-box.js';
|
|
44
|
+
export type { WrapBoxJustify, WrapBoxLineLayout, WrapBoxLineVector, WrapBoxSpacingNotifyVector, WrapBoxSpacingVector, } from './wrap-box.js';
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
import type { AdwNavigationPageProps, NavigationChangeReason, NavigationDiagnostic, NavigationShortcutResult } from '../navigation-view.js';
|
|
2
|
+
/** An opaque page label. A driver maps it to whatever page handle its renderer uses. */
|
|
3
|
+
export type NavigationPageId = string;
|
|
4
|
+
/** One mutation in a vector script. Mirrors the `NavigationViewState` surface 1:1. */
|
|
5
|
+
export type NavigationStep = {
|
|
6
|
+
op: 'add';
|
|
7
|
+
page: NavigationPageId;
|
|
8
|
+
props?: AdwNavigationPageProps;
|
|
9
|
+
expect?: boolean;
|
|
10
|
+
} | {
|
|
11
|
+
op: 'remove';
|
|
12
|
+
page: NavigationPageId;
|
|
13
|
+
expect?: boolean;
|
|
14
|
+
} | {
|
|
15
|
+
op: 'push';
|
|
16
|
+
page: NavigationPageId;
|
|
17
|
+
props?: AdwNavigationPageProps;
|
|
18
|
+
expect?: boolean;
|
|
19
|
+
} | {
|
|
20
|
+
op: 'pushByTag';
|
|
21
|
+
tag: string;
|
|
22
|
+
expect?: boolean;
|
|
23
|
+
} | {
|
|
24
|
+
op: 'pop';
|
|
25
|
+
expect?: boolean;
|
|
26
|
+
} | {
|
|
27
|
+
op: 'popToPage';
|
|
28
|
+
page: NavigationPageId;
|
|
29
|
+
expect?: boolean;
|
|
30
|
+
} | {
|
|
31
|
+
op: 'popToTag';
|
|
32
|
+
tag: string;
|
|
33
|
+
expect?: boolean;
|
|
34
|
+
} | {
|
|
35
|
+
op: 'replace';
|
|
36
|
+
pages: readonly (NavigationPageId | null)[];
|
|
37
|
+
/** Registration properties for pages the view has not seen yet. */
|
|
38
|
+
props?: Readonly<Record<NavigationPageId, AdwNavigationPageProps>>;
|
|
39
|
+
} | {
|
|
40
|
+
op: 'replaceWithTags';
|
|
41
|
+
tags: readonly string[];
|
|
42
|
+
} | {
|
|
43
|
+
op: 'setTag';
|
|
44
|
+
page: NavigationPageId;
|
|
45
|
+
tag: string | null;
|
|
46
|
+
expect?: boolean;
|
|
47
|
+
} | {
|
|
48
|
+
op: 'setTitle';
|
|
49
|
+
page: NavigationPageId;
|
|
50
|
+
title: string;
|
|
51
|
+
expect?: boolean;
|
|
52
|
+
} | {
|
|
53
|
+
op: 'setCanPop';
|
|
54
|
+
page: NavigationPageId;
|
|
55
|
+
canPop: boolean;
|
|
56
|
+
expect?: boolean;
|
|
57
|
+
} | {
|
|
58
|
+
op: 'setAnimateTransitions';
|
|
59
|
+
value: boolean;
|
|
60
|
+
} | {
|
|
61
|
+
op: 'setPopOnEscape';
|
|
62
|
+
value: boolean;
|
|
63
|
+
} | {
|
|
64
|
+
op: 'popFromShortcut';
|
|
65
|
+
expect?: NavigationShortcutResult;
|
|
66
|
+
} | {
|
|
67
|
+
op: 'popFromEscape';
|
|
68
|
+
expect?: NavigationShortcutResult;
|
|
69
|
+
} | {
|
|
70
|
+
op: 'finishTransition';
|
|
71
|
+
expect?: readonly NavigationPageId[];
|
|
72
|
+
};
|
|
73
|
+
/** One emitted `NavigationStackChange`, with page handles written as ids. */
|
|
74
|
+
export interface ExpectedNavigationChange {
|
|
75
|
+
reason: NavigationChangeReason;
|
|
76
|
+
stack: readonly NavigationPageId[];
|
|
77
|
+
visiblePage: NavigationPageId | null;
|
|
78
|
+
visiblePageTag: string | null;
|
|
79
|
+
previousVisiblePage: NavigationPageId | null;
|
|
80
|
+
popped: readonly NavigationPageId[];
|
|
81
|
+
removed: readonly NavigationPageId[];
|
|
82
|
+
removeAfterTransition: NavigationPageId | null;
|
|
83
|
+
animate: boolean;
|
|
84
|
+
pop: boolean;
|
|
85
|
+
tagNotify: boolean;
|
|
86
|
+
}
|
|
87
|
+
/** Per-page state a row may pin down. */
|
|
88
|
+
export interface ExpectedPageState {
|
|
89
|
+
page: NavigationPageId;
|
|
90
|
+
/** Whether the view still knows the page at all. */
|
|
91
|
+
registered?: boolean;
|
|
92
|
+
tag?: string | null;
|
|
93
|
+
title?: string;
|
|
94
|
+
canPop?: boolean;
|
|
95
|
+
/** Core-only: whether the page is DYNAMIC (destroyed when popped). */
|
|
96
|
+
removeOnPop?: boolean;
|
|
97
|
+
}
|
|
98
|
+
/** What must hold once a script has run. Every field is optional. */
|
|
99
|
+
export interface NavigationExpectation {
|
|
100
|
+
/** The navigation stack, bottom-first. */
|
|
101
|
+
stack?: readonly NavigationPageId[];
|
|
102
|
+
/** Every registered page, in registration order. */
|
|
103
|
+
pages?: readonly NavigationPageId[];
|
|
104
|
+
visiblePage?: NavigationPageId | null;
|
|
105
|
+
visiblePageTag?: string | null;
|
|
106
|
+
depth?: number;
|
|
107
|
+
animateTransitions?: boolean;
|
|
108
|
+
popOnEscape?: boolean;
|
|
109
|
+
/** `AdwBackButton` visibility. */
|
|
110
|
+
canGoBack?: boolean;
|
|
111
|
+
/** `AdwBackButton`'s tooltip, `null` when there is no back button. */
|
|
112
|
+
backButtonTooltip?: string | null;
|
|
113
|
+
/** `find_page(tag)` results, as `[tag, page-or-null]` pairs (`''` is a legal tag). */
|
|
114
|
+
findPage?: readonly (readonly [string, NavigationPageId | null])[];
|
|
115
|
+
/** `get_previous_page(page)` results, as `[page, previous-or-null]` pairs. */
|
|
116
|
+
previousPage?: readonly (readonly [NavigationPageId, NavigationPageId | null])[];
|
|
117
|
+
pageState?: readonly ExpectedPageState[];
|
|
118
|
+
/** Every diagnostic the script must have produced, in order. */
|
|
119
|
+
diagnostics?: readonly NavigationDiagnostic[];
|
|
120
|
+
/** Every change the script must have emitted, in order. */
|
|
121
|
+
changes?: readonly ExpectedNavigationChange[];
|
|
122
|
+
}
|
|
123
|
+
/** One conformance row. */
|
|
124
|
+
export interface NavigationVector {
|
|
125
|
+
/** Stable name — also the test title. */
|
|
126
|
+
name: string;
|
|
127
|
+
/** What rule the row pins down. */
|
|
128
|
+
rule: string;
|
|
129
|
+
/** The mutations to run, in order. */
|
|
130
|
+
steps: readonly NavigationStep[];
|
|
131
|
+
/** What must hold afterwards. */
|
|
132
|
+
expect: NavigationExpectation;
|
|
133
|
+
/** The C function + line the row is derived from. */
|
|
134
|
+
derivedFrom: string;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* The navigation-view conformance table.
|
|
138
|
+
*
|
|
139
|
+
* Grouped by the C entry point each row exercises: registry (`add`/`remove`/
|
|
140
|
+
* `find_page`), stack (`push`/`pop`/`pop_to_*`/`replace`), page properties
|
|
141
|
+
* (`set_tag`/`set_title`/`set_can_pop`), the transition lifecycle, and the
|
|
142
|
+
* `AdwBackButton` + shortcut derivations that live in `adw-back-button.c` and
|
|
143
|
+
* `pop_shortcut_cb`.
|
|
144
|
+
*/
|
|
145
|
+
export declare const NAVIGATION_VIEW_VECTORS: ReadonlyArray<NavigationVector>;
|
|
146
|
+
/** Everything a suite must be able to do to its widget to run a vector. */
|
|
147
|
+
export interface NavigationVectorAdapter<P> {
|
|
148
|
+
/** The handle for `id`, created on first mention and stable afterwards. */
|
|
149
|
+
page(id: NavigationPageId): P;
|
|
150
|
+
/** The id of a handle — `null` for `null`/`undefined`. */
|
|
151
|
+
idOf(page: P | null | undefined): NavigationPageId | null;
|
|
152
|
+
/**
|
|
153
|
+
* Whether this target actually DEFERS the destroy of the outgoing page to
|
|
154
|
+
* {@link finishTransition}. Only the core does; both renderers settle at once
|
|
155
|
+
* (their transition is CSS, or nothing at all), so their `finishTransition`
|
|
156
|
+
* has nothing left to hand back. The step still RUNS everywhere — it is what
|
|
157
|
+
* makes the final state comparable — but its return value is asserted only
|
|
158
|
+
* where deferral is real.
|
|
159
|
+
*/
|
|
160
|
+
defersTransition: boolean;
|
|
161
|
+
add(page: P, props?: AdwNavigationPageProps): boolean;
|
|
162
|
+
remove(page: P): boolean;
|
|
163
|
+
push(page: P, props?: AdwNavigationPageProps): boolean;
|
|
164
|
+
pushByTag(tag: string): boolean;
|
|
165
|
+
pop(): boolean;
|
|
166
|
+
popToPage(page: P): boolean;
|
|
167
|
+
popToTag(tag: string): boolean;
|
|
168
|
+
replace(pages: readonly (P | null)[], props?: (page: P) => AdwNavigationPageProps | undefined): void;
|
|
169
|
+
replaceWithTags(tags: readonly string[]): void;
|
|
170
|
+
setTag(page: P, tag: string | null): boolean;
|
|
171
|
+
setTitle(page: P, title: string): boolean;
|
|
172
|
+
setCanPop(page: P, canPop: boolean): boolean;
|
|
173
|
+
setAnimateTransitions(value: boolean): void;
|
|
174
|
+
setPopOnEscape(value: boolean): void;
|
|
175
|
+
popFromShortcut(): NavigationShortcutResult;
|
|
176
|
+
popFromEscape(): NavigationShortcutResult;
|
|
177
|
+
finishTransition(): readonly P[];
|
|
178
|
+
stack(): readonly P[];
|
|
179
|
+
pages(): readonly P[];
|
|
180
|
+
visiblePage(): P | null;
|
|
181
|
+
visiblePageTag(): string | null;
|
|
182
|
+
depth(): number;
|
|
183
|
+
animateTransitions(): boolean;
|
|
184
|
+
popOnEscape(): boolean;
|
|
185
|
+
canGoBack(): boolean;
|
|
186
|
+
backButtonTooltip(): string | null;
|
|
187
|
+
findPage(tag: string): P | null;
|
|
188
|
+
getPreviousPage(page: P): P | null;
|
|
189
|
+
/**
|
|
190
|
+
* Per-page state. A renderer omits the fields it cannot report — `removeOnPop`
|
|
191
|
+
* is core-only, and the rows that pin it down are therefore checked by the core
|
|
192
|
+
* suite alone. Its renderer-visible consequence (the page disappearing from
|
|
193
|
+
* {@link pages}) is asserted everywhere.
|
|
194
|
+
*/
|
|
195
|
+
pageState(page: P): Partial<Omit<ExpectedPageState, 'page'>>;
|
|
196
|
+
}
|
|
197
|
+
/** What one executed step produced, ready to be compared. */
|
|
198
|
+
export interface NavigationStepOutcome {
|
|
199
|
+
/** Position in the script, for a readable failure. */
|
|
200
|
+
index: number;
|
|
201
|
+
step: NavigationStep;
|
|
202
|
+
/** The mutator's return value, with page handles reduced to ids. */
|
|
203
|
+
result: unknown;
|
|
204
|
+
/** What the row demands, or `undefined` when it does not care. */
|
|
205
|
+
expected: unknown;
|
|
206
|
+
}
|
|
207
|
+
/** Run a vector's script against `adapter`, returning one outcome per step. */
|
|
208
|
+
export declare function runNavigationSteps<P>(steps: readonly NavigationStep[], adapter: NavigationVectorAdapter<P>): NavigationStepOutcome[];
|
|
209
|
+
/** One state comparison a row asked for. */
|
|
210
|
+
export interface NavigationStateCheck {
|
|
211
|
+
/** What is being compared, for the failure message. */
|
|
212
|
+
label: string;
|
|
213
|
+
actual: unknown;
|
|
214
|
+
expected: unknown;
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Reduce a row's {@link NavigationExpectation} to the comparisons `adapter` can
|
|
218
|
+
* actually make, so every suite asserts the same fields in the same way.
|
|
219
|
+
*/
|
|
220
|
+
export declare function collectNavigationState<P>(expect: NavigationExpectation, adapter: NavigationVectorAdapter<P>): NavigationStateCheck[];
|
|
221
|
+
/** A GObject-style signal a renderer re-emits, reduced to what a suite can observe. */
|
|
222
|
+
export interface NavigationEventRecord {
|
|
223
|
+
/** The `AdwNavigationView` signal name, or the `visible-page` property notification. */
|
|
224
|
+
type: 'pushed' | 'popped' | 'replaced' | 'notify::visible-page';
|
|
225
|
+
/** The page the signal is about — `null` for `replaced` and for an emptied view. */
|
|
226
|
+
page: NavigationPageId | null;
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* The signal sequence a row's {@link NavigationExpectation.changes} must produce,
|
|
230
|
+
* so the renderer suites can assert their event log without re-deriving the
|
|
231
|
+
* mapping: `'add'`/`'push'` → `::pushed`, `'pop'` → one `::popped` per popped page
|
|
232
|
+
* (top-first), `'replace'` → `::replaced`, and `visible-page` notifies exactly when
|
|
233
|
+
* the visible page actually changed (switch_page:925).
|
|
234
|
+
*/
|
|
235
|
+
export declare function navigationEventLog(changes: readonly ExpectedNavigationChange[]): NavigationEventRecord[];
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { PopoverKeyContext, PopoverKeyResolution } from '../popover.js';
|
|
2
|
+
/** Which popover surface a {@link PopoverSurfaceVector} describes. */
|
|
3
|
+
export type PopoverSurfaceVariant =
|
|
4
|
+
/** A bare popover — `popover > contents`. */
|
|
5
|
+
'plain'
|
|
6
|
+
/** A menu popover — `popover.menu > contents` + its item box. */
|
|
7
|
+
| 'menu'
|
|
8
|
+
/** One menu row — `modelbutton`. */
|
|
9
|
+
| 'menu-item';
|
|
10
|
+
/** One popover surface expectation, derived from the vendored stylesheet. */
|
|
11
|
+
export interface PopoverSurfaceVector {
|
|
12
|
+
/** The surface under test. */
|
|
13
|
+
variant: PopoverSurfaceVariant;
|
|
14
|
+
/** Inner inset in px — where the whitespace around the content actually comes from. */
|
|
15
|
+
padding: number;
|
|
16
|
+
/** Corner radius in px. */
|
|
17
|
+
borderRadius: number;
|
|
18
|
+
/**
|
|
19
|
+
* The `box-shadow` layers' GEOMETRY, in the spelling `getComputedStyle`
|
|
20
|
+
* returns (`0px`, not `0`) so a renderer can substring-match the computed
|
|
21
|
+
* value without re-implementing colour serialisation. Empty when the node
|
|
22
|
+
* casts no shadow.
|
|
23
|
+
*
|
|
24
|
+
* The COUNT is the load-bearing part: the split button shipped two layers
|
|
25
|
+
* where libadwaita has three.
|
|
26
|
+
*/
|
|
27
|
+
shadow: readonly string[];
|
|
28
|
+
/** The libadwaita selector that WINS the cascade for these values. */
|
|
29
|
+
selector: string;
|
|
30
|
+
/** Where it is vendored, with lines. */
|
|
31
|
+
source: string;
|
|
32
|
+
/** Why this row exists. */
|
|
33
|
+
rule: string;
|
|
34
|
+
}
|
|
35
|
+
/** Popover surface metrics (_popovers.scss:13-21, _menus.scss:58-66, :134-138). */
|
|
36
|
+
export declare const POPOVER_SURFACE_VECTORS: ReadonlyArray<PopoverSurfaceVector>;
|
|
37
|
+
/** One `resolvePopoverKey` expectation. */
|
|
38
|
+
export interface PopoverKeyVector {
|
|
39
|
+
/** `KeyboardEvent.key`. */
|
|
40
|
+
key: string;
|
|
41
|
+
/** The list state it is resolved against. */
|
|
42
|
+
context: PopoverKeyContext;
|
|
43
|
+
/** What the renderer must do. */
|
|
44
|
+
expected: PopoverKeyResolution;
|
|
45
|
+
/** Why this row exists. */
|
|
46
|
+
rule: string;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* `resolvePopoverKey` — the wrap arithmetic `adw-menu-button.ts` and
|
|
50
|
+
* `adw-drop-down.ts` each carried a copy of, reconciled.
|
|
51
|
+
*
|
|
52
|
+
* The rows that matter are the ones where the copies were WRONG rather than
|
|
53
|
+
* merely duplicated: ArrowUp from an unfocused list (both computed `n - 2`), and
|
|
54
|
+
* Home/End while a search entry owns the caret (the drop-down stole both).
|
|
55
|
+
*/
|
|
56
|
+
export declare const POPOVER_KEY_VECTORS: ReadonlyArray<PopoverKeyVector>;
|