@gjsify/adwaita-core 0.30.0 → 0.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/lib/esm/about-dialog.js +3 -0
  2. package/lib/esm/action-row.js +1 -0
  3. package/lib/esm/avatar.js +1 -0
  4. package/lib/esm/banner.js +1 -0
  5. package/lib/esm/button-content.js +1 -0
  6. package/lib/esm/carousel.js +1 -0
  7. package/lib/esm/checks.js +1 -0
  8. package/lib/esm/chrome.js +1 -0
  9. package/lib/esm/conformance/about-dialog.js +6 -0
  10. package/lib/esm/conformance/action-row.js +1 -0
  11. package/lib/esm/conformance/avatar.js +1 -0
  12. package/lib/esm/conformance/banner.js +1 -0
  13. package/lib/esm/conformance/button-content.js +1 -0
  14. package/lib/esm/conformance/carousel.js +1 -0
  15. package/lib/esm/conformance/checks.js +1 -0
  16. package/lib/esm/conformance/chrome.js +1 -0
  17. package/lib/esm/conformance/data-grid.js +1 -0
  18. package/lib/esm/conformance/dialog.js +1 -0
  19. package/lib/esm/conformance/entry-row.js +1 -0
  20. package/lib/esm/conformance/index.js +1 -0
  21. package/lib/esm/conformance/navigation-view.js +1 -0
  22. package/lib/esm/conformance/popover.js +1 -0
  23. package/lib/esm/conformance/preferences.js +1 -0
  24. package/lib/esm/conformance/rows.js +1 -0
  25. package/lib/esm/conformance/sidebar.js +1 -0
  26. package/lib/esm/conformance/split-button.js +1 -0
  27. package/lib/esm/conformance/split-view.js +1 -0
  28. package/lib/esm/conformance/tab-view.js +1 -0
  29. package/lib/esm/conformance/view-stack.js +1 -0
  30. package/lib/esm/conformance/view-switcher.js +1 -0
  31. package/lib/esm/conformance/wrap-box.js +1 -0
  32. package/lib/esm/data-grid.js +1 -0
  33. package/lib/esm/dialog.js +1 -1
  34. package/lib/esm/entry-row.js +1 -0
  35. package/lib/esm/glib.js +1 -0
  36. package/lib/esm/index.js +1 -1
  37. package/lib/esm/navigation-view.js +1 -0
  38. package/lib/esm/popover.js +1 -0
  39. package/lib/esm/preferences.js +1 -0
  40. package/lib/esm/rows.js +1 -1
  41. package/lib/esm/sidebar.js +1 -0
  42. package/lib/esm/split-button.js +1 -0
  43. package/lib/esm/split-view.js +1 -0
  44. package/lib/esm/tab-view.js +1 -0
  45. package/lib/esm/view-stack.js +1 -0
  46. package/lib/esm/view-switcher.js +1 -0
  47. package/lib/types/about-dialog.d.ts +391 -0
  48. package/lib/types/about-dialog.spec.d.ts +2 -0
  49. package/lib/types/action-row.d.ts +270 -0
  50. package/lib/types/action-row.spec.d.ts +2 -0
  51. package/lib/types/avatar.d.ts +112 -0
  52. package/lib/types/avatar.spec.d.ts +2 -0
  53. package/lib/types/banner.d.ts +104 -0
  54. package/lib/types/banner.spec.d.ts +2 -0
  55. package/lib/types/button-content.d.ts +141 -0
  56. package/lib/types/button-content.spec.d.ts +2 -0
  57. package/lib/types/carousel.d.ts +535 -0
  58. package/lib/types/carousel.spec.d.ts +2 -0
  59. package/lib/types/checks.d.ts +63 -0
  60. package/lib/types/checks.spec.d.ts +2 -0
  61. package/lib/types/chrome.d.ts +355 -0
  62. package/lib/types/chrome.spec.d.ts +2 -0
  63. package/lib/types/conformance/about-dialog.d.ts +300 -0
  64. package/lib/types/conformance/action-row.d.ts +186 -0
  65. package/lib/types/conformance/avatar.d.ts +61 -0
  66. package/lib/types/conformance/banner.d.ts +91 -0
  67. package/lib/types/conformance/button-content.d.ts +110 -0
  68. package/lib/types/conformance/carousel.d.ts +284 -0
  69. package/lib/types/conformance/checks.d.ts +29 -0
  70. package/lib/types/conformance/chrome.d.ts +195 -0
  71. package/lib/types/conformance/data-grid.d.ts +134 -0
  72. package/lib/types/conformance/dialog.d.ts +97 -0
  73. package/lib/types/conformance/entry-row.d.ts +185 -0
  74. package/lib/types/conformance/index.d.ts +44 -0
  75. package/lib/types/conformance/navigation-view.d.ts +235 -0
  76. package/lib/types/conformance/popover.d.ts +56 -0
  77. package/lib/types/conformance/preferences.d.ts +170 -0
  78. package/lib/types/conformance/rows.d.ts +51 -0
  79. package/lib/types/conformance/sidebar.d.ts +182 -0
  80. package/lib/types/conformance/split-button.d.ts +189 -0
  81. package/lib/types/conformance/split-view.d.ts +290 -0
  82. package/lib/types/conformance/tab-view.d.ts +441 -0
  83. package/lib/types/conformance/view-stack.d.ts +121 -0
  84. package/lib/types/conformance/view-switcher.d.ts +443 -0
  85. package/lib/types/conformance/wrap-box.d.ts +134 -0
  86. package/lib/types/data-grid.d.ts +140 -0
  87. package/lib/types/data-grid.spec.d.ts +2 -0
  88. package/lib/types/dialog.d.ts +144 -0
  89. package/lib/types/entry-row.d.ts +308 -0
  90. package/lib/types/entry-row.spec.d.ts +2 -0
  91. package/lib/types/glib.d.ts +49 -0
  92. package/lib/types/index.d.ts +43 -4
  93. package/lib/types/navigation-view.d.ts +343 -0
  94. package/lib/types/navigation-view.spec.d.ts +2 -0
  95. package/lib/types/popover.d.ts +155 -0
  96. package/lib/types/popover.spec.d.ts +2 -0
  97. package/lib/types/preferences.d.ts +349 -0
  98. package/lib/types/preferences.spec.d.ts +2 -0
  99. package/lib/types/rows.d.ts +49 -2
  100. package/lib/types/sidebar.d.ts +308 -0
  101. package/lib/types/sidebar.spec.d.ts +2 -0
  102. package/lib/types/split-button.d.ts +316 -0
  103. package/lib/types/split-button.spec.d.ts +2 -0
  104. package/lib/types/split-view.d.ts +714 -0
  105. package/lib/types/split-view.spec.d.ts +2 -0
  106. package/lib/types/tab-view.d.ts +616 -0
  107. package/lib/types/tab-view.spec.d.ts +2 -0
  108. package/lib/types/view-stack.d.ts +266 -0
  109. package/lib/types/view-stack.spec.d.ts +2 -0
  110. package/lib/types/view-switcher.d.ts +521 -0
  111. package/lib/types/view-switcher.spec.d.ts +2 -0
  112. package/package.json +8 -4
@@ -0,0 +1,170 @@
1
+ import type { MakeComparableOptions, PreferencesGroupHeaderInput, PreferencesGroupHeaderState, PreferencesSearchPage, PreferencesSearchRow, SearchRowSubtitleInput } from '../preferences.js';
2
+ /** One `derivePreferencesGroupHeader` expectation. */
3
+ export interface PreferencesGroupHeaderVector {
4
+ /** The group's title / description / suffix / row count. */
5
+ input: PreferencesGroupHeaderInput;
6
+ /** The five states C derives from it. */
7
+ state: PreferencesGroupHeaderState;
8
+ /**
9
+ * Set when the expectation only holds for a renderer that INTERPRETS Pango
10
+ * markup in its labels. Both current renderers paint the string verbatim
11
+ * and pass `useMarkup: false`, so their suites skip these rows rather than
12
+ * assert a rule they deliberately do not implement. Closing the
13
+ * markup-rendering gap is what retires the flag.
14
+ */
15
+ dependsOnMarkup?: boolean;
16
+ /** Why this row exists — the rule or the regression it pins down. */
17
+ rule: string;
18
+ }
19
+ /**
20
+ * `update_title_visibility` / `update_description_visibility` /
21
+ * `update_listbox_visibility` / `is_single_line` / `update_header_visibility`
22
+ * (adw-preferences-group.c:91-156).
23
+ */
24
+ export declare const PREFERENCES_GROUP_HEADER_VECTORS: ReadonlyArray<PreferencesGroupHeaderVector>;
25
+ /** One `defaultCaseFolder` expectation. */
26
+ export interface CaseFoldVector {
27
+ /** The string being folded. */
28
+ text: string;
29
+ /** `g_utf8_casefold(text)` — Unicode FULL case folding. */
30
+ folded: string;
31
+ /** What a bare `toLowerCase()` returns, kept in the table as the trap. */
32
+ naiveLowerCase: string;
33
+ /** Why this row exists. */
34
+ rule: string;
35
+ }
36
+ /**
37
+ * `g_utf8_casefold` (adw-preferences-dialog.c:101, :133).
38
+ *
39
+ * Every row where `folded !== naiveLowerCase` is a query a `toLowerCase()` port
40
+ * silently fails to match — in German, Greek and any text with a typographic
41
+ * ligature. None of it is visible in an ASCII test suite, which is exactly why
42
+ * the rows are here.
43
+ */
44
+ export declare const CASE_FOLD_VECTORS: ReadonlyArray<CaseFoldVector>;
45
+ /** One `stripMarkup` expectation. */
46
+ export interface StripMarkupVector {
47
+ /** The (already folded, in the real pipeline) markup string. */
48
+ markup: string;
49
+ /** The plain text, or `null` when `pango_parse_markup` fails. */
50
+ plain: string | null;
51
+ /** Why this row exists. */
52
+ rule: string;
53
+ }
54
+ /**
55
+ * `pango_parse_markup (…, accel_marker 0, …)` as `make_comparable` calls it
56
+ * (adw-preferences-dialog.c:104-114).
57
+ *
58
+ * `null` is not an error case to be smoothed over: it is the branch where C
59
+ * logs a `g_critical` and KEEPS the unparsed string, so every `null` row below
60
+ * is a row that must stay searchable under its literal spelling.
61
+ */
62
+ export declare const STRIP_MARKUP_VECTORS: ReadonlyArray<StripMarkupVector>;
63
+ /** One `stripMnemonic` expectation. */
64
+ export interface StripMnemonicVector {
65
+ /** The label text with accel markers. */
66
+ text: string;
67
+ /** What `adw_strip_mnemonic` returns. */
68
+ stripped: string;
69
+ /** Why this row exists. */
70
+ rule: string;
71
+ }
72
+ /**
73
+ * `adw_strip_mnemonic` (adw-widget-utils.c:685-703) — `g_markup_escape_text`
74
+ * followed by `pango_parse_markup` with `accel_marker = '_'`.
75
+ */
76
+ export declare const STRIP_MNEMONIC_VECTORS: ReadonlyArray<StripMnemonicVector>;
77
+ /** One `makeComparable` expectation. */
78
+ export interface MakeComparableVector {
79
+ /** The raw title or subtitle. */
80
+ source: string;
81
+ /** The row flags plus the title/subtitle `allowUnderline` distinction. */
82
+ options: MakeComparableOptions;
83
+ /** What the search compares against. */
84
+ comparable: string;
85
+ /** Why this row exists. */
86
+ rule: string;
87
+ }
88
+ /**
89
+ * `make_comparable` (adw-preferences-dialog.c:96-123).
90
+ *
91
+ * The defaults matter as much as the rows: `use-markup` defaults to TRUE
92
+ * (adw-preferences-row.c:185-188) and `use-underline` to FALSE (:155-158), so
93
+ * an ordinary row's title IS markup-parsed and is NOT mnemonic-stripped.
94
+ */
95
+ export declare const MAKE_COMPARABLE_VECTORS: ReadonlyArray<MakeComparableVector>;
96
+ /** One `rowMatchesQuery` expectation. */
97
+ export interface RowMatchVector {
98
+ /** The row being tested. */
99
+ row: PreferencesSearchRow;
100
+ /** What the user typed into the search entry. */
101
+ query: string;
102
+ /** Whether `filter_search_results` keeps the row. */
103
+ matches: boolean;
104
+ /** Why this row exists. */
105
+ rule: string;
106
+ }
107
+ /** `filter_search_results` (adw-preferences-dialog.c:125-153). */
108
+ export declare const ROW_MATCH_VECTORS: ReadonlyArray<RowMatchVector>;
109
+ /** One `collectSearchRows` expectation. */
110
+ export interface SearchCorpusVector {
111
+ /** The page tree being indexed. */
112
+ pages: readonly PreferencesSearchPage[];
113
+ /** The row titles the corpus contains, in order. */
114
+ titles: readonly string[];
115
+ /** Why this row exists. */
116
+ rule: string;
117
+ }
118
+ /**
119
+ * The three-filter chain: `adw_preferences_dialog_init`'s visible-page filter
120
+ * (:632-641) over `adw_preferences_page_get_rows`' `is_visible_group`
121
+ * (adw-preferences-page.c:831-834) over `adw_preferences_group_get_rows`'
122
+ * `row_has_title` (adw-preferences-group.c:736-740).
123
+ *
124
+ * Dropping any clause is invisible — nothing errors, the search just quietly
125
+ * indexes the wrong set — which is why these rows are separate from the
126
+ * end-to-end ones.
127
+ */
128
+ export declare const SEARCH_CORPUS_VECTORS: ReadonlyArray<SearchCorpusVector>;
129
+ /** One `createSearchRowSubtitle` expectation. */
130
+ export interface SearchRowSubtitleVector {
131
+ /** The matched row's ancestors, plus the visible-page count. */
132
+ input: SearchRowSubtitleInput;
133
+ /** The second line of the result row, `null` for none. */
134
+ subtitle: string | null;
135
+ /** Why this row exists. */
136
+ rule: string;
137
+ }
138
+ /** `create_search_row_subtitle` (adw-preferences-dialog.c:168-234). */
139
+ export declare const SEARCH_ROW_SUBTITLE_VECTORS: ReadonlyArray<SearchRowSubtitleVector>;
140
+ /**
141
+ * The page tree both renderer suites materialise into real widgets.
142
+ *
143
+ * Chosen so every clause of the pipeline is exercised by at least one query:
144
+ * two visible pages (so subtitles carry the arrow) plus a hidden third, a hidden
145
+ * group, an untitled row, an action row with a searchable subtitle, an entry row
146
+ * whose subtitle must NOT be searched, a German title for the fold, and a
147
+ * markup title.
148
+ */
149
+ export declare const PREFERENCES_SEARCH_PAGES: ReadonlyArray<PreferencesSearchPage>;
150
+ /** One expected search result, as a renderer can read it off its own result row. */
151
+ export interface PreferencesSearchExpectation {
152
+ /** The result row's title — copied verbatim from the matched row. */
153
+ title: string;
154
+ /** The result row's subtitle. */
155
+ subtitle: string | null;
156
+ }
157
+ /** One end-to-end `searchPreferences` expectation over {@link PREFERENCES_SEARCH_PAGES}. */
158
+ export interface PreferencesSearchVector {
159
+ /** What the user typed. */
160
+ query: string;
161
+ /** The results, in corpus order. */
162
+ results: readonly PreferencesSearchExpectation[];
163
+ /** Why this row exists. */
164
+ rule: string;
165
+ }
166
+ /**
167
+ * The whole pipeline over {@link PREFERENCES_SEARCH_PAGES} — corpus, filter and
168
+ * subtitle at once. This is the table a renderer drives its own widgets with.
169
+ */
170
+ export declare const PREFERENCES_SEARCH_VECTORS: ReadonlyArray<PreferencesSearchVector>;
@@ -0,0 +1,51 @@
1
+ import type { AdwComboOption, ComboStateChange } from '../rows.js';
2
+ /**
3
+ * One mutation in a combo scenario. DATA, not a closure: a renderer suite
4
+ * replays these against a real widget (set the options, pick from the chooser)
5
+ * and compares what the user would see.
6
+ */
7
+ export type ComboSelectionStep = {
8
+ op: 'setOptions';
9
+ options: ReadonlyArray<AdwComboOption>;
10
+ } | {
11
+ op: 'setSelectedIndex';
12
+ index: number;
13
+ } | {
14
+ op: 'setSelectedValue';
15
+ value: string;
16
+ } | {
17
+ op: 'select';
18
+ index: number;
19
+ };
20
+ /** One combo-selection scenario. */
21
+ export interface ComboSelectionVector {
22
+ /** Short scenario name. */
23
+ name: string;
24
+ /** The mutations, applied in order to a fresh state. */
25
+ steps: readonly ComboSelectionStep[];
26
+ /** `selectedIndex` afterwards. */
27
+ selected: number;
28
+ /** `selectedValue` afterwards — `''` when the index sits outside the options. */
29
+ value: string;
30
+ /** `selectedLabel` afterwards — the text the inline value / button shows. */
31
+ label: string;
32
+ /**
33
+ * Every change the state emits, in order. This IS the renderer's feed: the
34
+ * label repaint comes off `label`, and the `notify::selected` re-emit is
35
+ * gated on `interactive`.
36
+ */
37
+ emitted: ReadonlyArray<ComboStateChange>;
38
+ /** Why this row exists — the rule or edge case it pins down. */
39
+ rule: string;
40
+ }
41
+ /**
42
+ * `adw_combo_row_set_selected` (adw-combo-row.c:772-789) and the notify chain it
43
+ * drives (:136-155, :157-185), plus the two port answers the C leaves open (see
44
+ * the module header).
45
+ *
46
+ * Note that EVERY scenario starts with a `setOptions`, which is itself an
47
+ * emission: the model is what the label is read out of, so a renderer that
48
+ * repaints only on a selection change draws a stale value after the list is
49
+ * replaced. That first change is in `emitted` for exactly that reason.
50
+ */
51
+ export declare const COMBO_SELECTION_VECTORS: ReadonlyArray<ComboSelectionVector>;
@@ -0,0 +1,182 @@
1
+ import type { AdwSidebarItemSpec, AdwSidebarSectionSpec, SidebarHeaderSpec } from '../sidebar.js';
2
+ /** One `clampSidebarSelection` expectation. */
3
+ export interface SidebarClampVector {
4
+ /** The index handed to `AdwSidebar:selected`. */
5
+ index: number;
6
+ /** How many items the sidebar has (`n_items`). */
7
+ count: number;
8
+ /** What `selected` reads back as: the index itself, or `-1` for no selection. */
9
+ selected: number;
10
+ /** Why this row exists. */
11
+ rule: string;
12
+ }
13
+ /**
14
+ * `adw_sidebar_set_selected` (adw-sidebar.c:3028-3029):
15
+ * `if (selected >= self->n_items) selected = GTK_INVALID_LIST_POSITION;`
16
+ *
17
+ * The negative rows are not a TS invention — `selected` is a `guint`, so `-7`
18
+ * arrives as `4294967289`, which is `>= n_items`. The fractional/`NaN` rows are
19
+ * the generalisation to values C cannot express: not a valid position is no
20
+ * position. They are the inputs that used to be wrong — the web port truncated
21
+ * `"1.5"` to row 1 and the NativeScript port stored `1.5` verbatim, highlighting
22
+ * no row while reporting a selection.
23
+ */
24
+ export declare const SIDEBAR_CLAMP_VECTORS: ReadonlyArray<SidebarClampVector>;
25
+ /** One `adjustSidebarSelection` expectation — an `items-changed` splice. */
26
+ export interface SidebarItemsChangedVector {
27
+ /** `selected` before the splice. */
28
+ selected: number;
29
+ /** `n_items` before the splice. */
30
+ oldCount: number;
31
+ /** `n_items` after the splice. */
32
+ newCount: number;
33
+ /** Flat index the splice starts at. */
34
+ position: number;
35
+ /** How many items were removed. */
36
+ removed: number;
37
+ /** How many items were added. */
38
+ added: number;
39
+ /** `selected` after `items_changed_cb` has run. */
40
+ expected: number;
41
+ /** Why this row exists. */
42
+ rule: string;
43
+ }
44
+ /**
45
+ * `items_changed_cb` (adw-sidebar.c:2246-2284) — the derivation NEITHER port had.
46
+ *
47
+ * The last row documents libadwaita's unsigned wraparound: with no selection,
48
+ * `selected` is `G_MAXUINT`, so the "splice covers the selection" test can never
49
+ * fire and the shift branch computes `G_MAXUINT + added - removed`, which wraps
50
+ * into range. It is reproduced rather than repaired — a renderer that "fixed" it
51
+ * would stop matching the toolkit it mirrors.
52
+ */
53
+ export declare const SIDEBAR_ITEMS_CHANGED_VECTORS: ReadonlyArray<SidebarItemsChangedVector>;
54
+ /** One flattened-model expectation for a whole section list. */
55
+ export interface SidebarModelVector {
56
+ /** Human-readable name, used as the test title. */
57
+ name: string;
58
+ /** The declared sections. */
59
+ sections: ReadonlyArray<AdwSidebarSectionSpec>;
60
+ /** `n_items` — the size of the selection index space. */
61
+ count: number;
62
+ /** `adw_sidebar_section_get_first_index` per section, in declaration order. */
63
+ sectionFirstIndex: ReadonlyArray<number>;
64
+ /** Every rendered row, in render order. */
65
+ flat: ReadonlyArray<{
66
+ index: number;
67
+ sectionIndex: number;
68
+ sectionItemIndex: number;
69
+ title: string;
70
+ }>;
71
+ /** The headers that get drawn, in render order. */
72
+ headers: ReadonlyArray<SidebarHeaderSpec>;
73
+ /** Why this row exists. */
74
+ rule: string;
75
+ }
76
+ /**
77
+ * The flat index space (`items_changed_cb`'s section walk, adw-sidebar.c:2261-2267
78
+ * + `adw_sidebar_item_get_index`, adw-sidebar-item.c:1040) and the header
79
+ * derivation (`set_header_cb`/`create_header`, adw-sidebar.c:1532-1563, :1483-1530).
80
+ *
81
+ * The empty-leading-section rows are the ones the web port got wrong: it keyed
82
+ * `.first` and the hidden-separator case off the DECLARATION index, so an empty
83
+ * or fully-filtered first section drew a stray separator and cost section 1 the
84
+ * flush-to-top padding `.header.first > .heading` prescribes.
85
+ */
86
+ export declare const SIDEBAR_MODEL_VECTORS: ReadonlyArray<SidebarModelVector>;
87
+ /** One item-label-visibility expectation. */
88
+ export interface SidebarItemFlagsVector {
89
+ /** The declared item. */
90
+ item: AdwSidebarItemSpec;
91
+ /** `string_is_not_empty(title)` (adw-sidebar.c:1411-1412). */
92
+ titleVisible: boolean;
93
+ /** `string_is_not_empty(subtitle)` (adw-sidebar.c:1420-1421). */
94
+ subtitleVisible: boolean;
95
+ /** `notify_icon_cb`'s `icon_name && *icon_name` (adw-sidebar.c:1303). */
96
+ iconVisible: boolean;
97
+ /** Why this row exists. */
98
+ rule: string;
99
+ }
100
+ /**
101
+ * The three `string_is_not_empty` bindings, so renderers stop spelling
102
+ * `x.length === 0` themselves — and so the `'-symbolic'` row pins that icon
103
+ * visibility is decided on the RAW name, before any suffix stripping.
104
+ */
105
+ export declare const SIDEBAR_ITEM_FLAG_VECTORS: ReadonlyArray<SidebarItemFlagsVector>;
106
+ /** One activation (row click) expectation. */
107
+ export interface SidebarActivationVector {
108
+ /** Human-readable name, used as the test title. */
109
+ name: string;
110
+ /** The declared sections. */
111
+ sections: ReadonlyArray<AdwSidebarSectionSpec>;
112
+ /** The selection to establish before clicking, applied through `setSelected`. */
113
+ initialSelected: number;
114
+ /** The flat index that is clicked. */
115
+ activate: number;
116
+ /** Whether a row was actually activated — the `activated` signal. */
117
+ activated: boolean;
118
+ /** Whether `notify::selected` fired. */
119
+ selectionChanged: boolean;
120
+ /** `selected` afterwards. */
121
+ selected: number;
122
+ /** Why this row exists. */
123
+ rule: string;
124
+ }
125
+ /**
126
+ * The selection/activation split: `row-selected` fires only on a real change,
127
+ * `row-activated` fires on EVERY click (adw-sidebar.c:1585-1612), and page mode
128
+ * does the same thing in one callback (`boxed_row_activated_cb`, :1662-1674).
129
+ *
130
+ * The re-click row is the one that matters: it is the documented way to reveal
131
+ * the content pane of a split view (adw-sidebar.c:73-75), and the NativeScript
132
+ * port could not express it at all — its setter early-returned on an unchanged
133
+ * index and it emitted no activation signal.
134
+ */
135
+ export declare const SIDEBAR_ACTIVATION_VECTORS: ReadonlyArray<SidebarActivationVector>;
136
+ /** One filter / empty-state expectation. */
137
+ export interface SidebarFilterVector {
138
+ /** Human-readable name, used as the test title. */
139
+ name: string;
140
+ /** The declared sections. */
141
+ sections: ReadonlyArray<AdwSidebarSectionSpec>;
142
+ /** Item titles the filter keeps; the suites build `(item) => keepTitles.includes(item.title)`. */
143
+ keepTitles: ReadonlyArray<string>;
144
+ /** `n_items` — UNCHANGED by the filter, because the selection counts the unfiltered model. */
145
+ count: number;
146
+ /** Flat indices of the rows that survive the filter, in render order. */
147
+ visibleIndices: ReadonlyArray<number>;
148
+ /** The headers that get drawn once the filter is applied. */
149
+ headers: ReadonlyArray<SidebarHeaderSpec>;
150
+ /** The `.empty` / placeholder state — computed from the FILTERED count. */
151
+ isEmpty: boolean;
152
+ /** Why this row exists. */
153
+ rule: string;
154
+ }
155
+ /**
156
+ * `adw_sidebar_set_filter` (adw-sidebar.c:3127-3139) feeds a `GtkFilterListModel`
157
+ * that only the row list and the placeholder see; the selection index space stays
158
+ * on the unfiltered `items_model` (adw-sidebar.c:2866 vs :2177-2180), and
159
+ * `update_placeholder` counts the filtered one (adw-sidebar.c:1828, :1839-1842).
160
+ *
161
+ * Neither port had a filter or a placeholder at all.
162
+ */
163
+ export declare const SIDEBAR_FILTER_VECTORS: ReadonlyArray<SidebarFilterVector>;
164
+ /** One mode expectation. */
165
+ export interface SidebarModeVector {
166
+ /** The mode being set. */
167
+ mode: 'sidebar' | 'page';
168
+ /** Whether the selection is PAINTED in that mode. */
169
+ selectionVisible: boolean;
170
+ /** Why this row exists. */
171
+ rule: string;
172
+ }
173
+ /**
174
+ * `adw_sidebar_set_mode` (adw-sidebar.c:2960-2981) never touches `selected`:
175
+ * "In this mode, the selection is invisible and only tracked to determine the
176
+ * initially selected item once switched back to sidebar mode" (adw-sidebar.c:2948-2951).
177
+ *
178
+ * The web port painted its `.selected` highlight in BOTH modes; page mode builds
179
+ * plain `AdwActionRow`s in a boxed list (`create_boxed_row`, adw-sidebar.c:1676)
180
+ * and shows no selected row at all.
181
+ */
182
+ export declare const SIDEBAR_MODE_VECTORS: ReadonlyArray<SidebarModeVector>;
@@ -0,0 +1,189 @@
1
+ import type { AdwArrowIcon, AdwMenuEntry, SplitButtonContentMode, SplitButtonDirection, SplitButtonHalfState, SplitButtonProperty, SplitButtonStyleClass } from '../split-button.js';
2
+ /** One mutation in a {@link SplitButtonContentVector} sequence, with its outcome. */
3
+ export interface SplitButtonContentStep {
4
+ /** Which slot is being set. */
5
+ op: 'label' | 'icon-name' | 'child';
6
+ /**
7
+ * The value passed. For `label`/`icon-name` the string itself; for `child` a
8
+ * KEY naming one of three distinct child objects the driver supplies, or
9
+ * `null` to clear the content.
10
+ */
11
+ value: string | null;
12
+ /** Whether the setter reports a change (and therefore notifies at all). */
13
+ changed: boolean;
14
+ /** The `notify::*` properties C emits for this one call, in emission order. */
15
+ notified: readonly SplitButtonProperty[];
16
+ /** The content mode after the step. */
17
+ mode: SplitButtonContentMode;
18
+ /** `get_label()` after the step. */
19
+ label: string | null;
20
+ /** `get_icon_name()` after the step. */
21
+ iconName: string | null;
22
+ /** The root style classes after the step. */
23
+ styleClasses: readonly SplitButtonStyleClass[];
24
+ /** Why this step exists — the rule or edge case it pins down. */
25
+ rule: string;
26
+ }
27
+ /** A scripted sequence of content mutations applied to a FRESH state. */
28
+ export interface SplitButtonContentVector {
29
+ /** Which upstream test (or derivation) this sequence transcribes. */
30
+ name: string;
31
+ /** The mutations, in order. */
32
+ steps: readonly SplitButtonContentStep[];
33
+ }
34
+ /**
35
+ * The content machine (adw-split-button.c:661-682, :749-771, :799-824).
36
+ *
37
+ * Two things in here are easy to get wrong and are asserted explicitly. First,
38
+ * the `notified` ORDER: C freezes, notifies the slots it is about to CLEAR, sets
39
+ * the new one, notifies it, then thaws — so one `set_label()` can emit three
40
+ * notifications. Second, `child` is notified far more often than a reader
41
+ * expects, because `adw_split_button_get_child()` returns GtkButton's INTERNAL
42
+ * label/image widget in label/icon mode (the upstream suite states this at
43
+ * tests/test-split-button.c:155-157) and the C guard tests that pointer, not
44
+ * whether the app ever set a child.
45
+ *
46
+ * A driver that cannot express a step — a DOM element has no `child` slot —
47
+ * asserts the sequence up to that step and stops; every sequence is written so
48
+ * the interesting rows come first.
49
+ */
50
+ export declare const SPLIT_BUTTON_CONTENT_VECTORS: ReadonlyArray<SplitButtonContentVector>;
51
+ /** One `update_style_classes` expectation. */
52
+ export interface SplitButtonStyleClassVector {
53
+ /** `gtk_button_get_label()`. */
54
+ label: string | null;
55
+ /** `gtk_button_get_icon_name()`. */
56
+ iconName: string | null;
57
+ /** The classes on the `splitbutton` node. */
58
+ classes: readonly SplitButtonStyleClass[];
59
+ /** Why this row exists. */
60
+ rule: string;
61
+ }
62
+ /**
63
+ * `update_style_classes` (adw-split-button.c:145-165). Both branches read the
64
+ * FIRST CHARACTER, which is why `''` and `' '` land on opposite sides.
65
+ */
66
+ export declare const SPLIT_BUTTON_STYLE_CLASS_VECTORS: ReadonlyArray<SplitButtonStyleClassVector>;
67
+ /** One `set_dropdown_tooltip` expectation. */
68
+ export interface SplitButtonTooltipVector {
69
+ /** The value passed to `adw_split_button_set_dropdown_tooltip`. */
70
+ tooltip: string;
71
+ /** What the dropdown actually shows. */
72
+ text: string;
73
+ /** Whether it is Pango MARKUP (`set_tooltip_markup`) rather than plain text. */
74
+ markup: boolean;
75
+ /** Why this row exists. */
76
+ rule: string;
77
+ }
78
+ /**
79
+ * The tooltip fallback (adw-split-button.c:1044-1051, initial value :531-532).
80
+ *
81
+ * `has_dropdown_tooltip = tooltip && *tooltip`. The empty branch is the one both
82
+ * renderers got wrong: the browser port hardcoded `Menu` and, because `''` is not
83
+ * nullish, `dropdown-tooltip=""` left the button with NO accessible name at all;
84
+ * the NativeScript port had neither tooltip nor accessible name.
85
+ */
86
+ export declare const SPLIT_BUTTON_TOOLTIP_VECTORS: ReadonlyArray<SplitButtonTooltipVector>;
87
+ /** One direction expectation. */
88
+ export interface SplitButtonDirectionVector {
89
+ /** The `GtkArrowType`. */
90
+ direction: SplitButtonDirection;
91
+ /** The symbolic icon the arrow node draws. */
92
+ arrowIcon: AdwArrowIcon;
93
+ /** Where the popup is placed. */
94
+ popupDirection: SplitButtonDirection;
95
+ /** Why this row exists — naming the selector that WINS, not the one that loses. */
96
+ rule: string;
97
+ }
98
+ /**
99
+ * Direction → glyph for the dropdown half of a SPLIT BUTTON, and → popup
100
+ * placement (adw-split-button.c:415).
101
+ *
102
+ * `none` is the row that matters, and it is the row that was WRONG here until the
103
+ * override was found: the four shared directions come from `menubutton arrow`
104
+ * (_buttons.scss:457-468), but `.none` is re-declared inside `splitbutton { … }`
105
+ * at :621-623, and that selector wins. See the header of `./index.ts` — "cite the
106
+ * winning selector" — for what this table cost.
107
+ */
108
+ export declare const SPLIT_BUTTON_DIRECTION_VECTORS: ReadonlyArray<SplitButtonDirectionVector>;
109
+ /**
110
+ * The same axis for a PLAIN `menubutton`, where nothing overrides `.none`.
111
+ *
112
+ * This table is not decoration: it is what makes the split button's row above a
113
+ * demonstrated OVERRIDE rather than an assertion. Holding both means a reader can
114
+ * see the two values and the two selectors side by side, and a renderer that
115
+ * reaches for the wrong one fails a test that names which widget it is drawing.
116
+ */
117
+ export declare const MENU_BUTTON_DIRECTION_VECTORS: ReadonlyArray<SplitButtonDirectionVector>;
118
+ /** One `update_state` expectation. */
119
+ export interface SplitButtonRootStateVector {
120
+ /** State flags of the action half. */
121
+ action: SplitButtonHalfState;
122
+ /** State flags of the dropdown (arrow) half. */
123
+ dropdown: SplitButtonHalfState;
124
+ /** Whether the root reads ACTIVE. */
125
+ active: boolean;
126
+ /** Whether the root reads CHECKED. */
127
+ checked: boolean;
128
+ /** Why this row exists. */
129
+ rule: string;
130
+ }
131
+ /**
132
+ * `update_state` (adw-split-button.c:118-143) — an OR-fold of both halves onto
133
+ * the root, which is what `splitbutton.flat:active/:checked` styles
134
+ * (_buttons.scss:542-549).
135
+ */
136
+ export declare const SPLIT_BUTTON_ROOT_STATE_VECTORS: ReadonlyArray<SplitButtonRootStateVector>;
137
+ /** One `parseMenuEntries` expectation. */
138
+ export interface SplitButtonMenuParseVector {
139
+ /** The raw `menu` attribute (or `null` when absent). */
140
+ json: string | null;
141
+ /** The entries it yields. */
142
+ entries: readonly AdwMenuEntry[];
143
+ /** Why this row exists. */
144
+ rule: string;
145
+ }
146
+ /**
147
+ * Menu-attribute parsing — the byte-identical helper both browser elements
148
+ * carried. Total: nothing an author can type may prevent the widget upgrading.
149
+ */
150
+ export declare const SPLIT_BUTTON_MENU_PARSE_VECTORS: ReadonlyArray<SplitButtonMenuParseVector>;
151
+ /** One activate-by-position expectation. */
152
+ export interface SplitButtonMenuActivationVector {
153
+ /** The menu model. */
154
+ entries: readonly AdwMenuEntry[];
155
+ /** The position activated. */
156
+ index: number;
157
+ /** The entry that must be dispatched, or `null`. */
158
+ activated: AdwMenuEntry | null;
159
+ /** Why this row exists. */
160
+ rule: string;
161
+ }
162
+ /**
163
+ * Activation is BY POSITION, never by label lookup: a `GMenuModel` addresses its
164
+ * items by index and each carries its own detailed action (adw-split-button.c:385-388).
165
+ */
166
+ export declare const SPLIT_BUTTON_MENU_ACTIVATION_VECTORS: ReadonlyArray<SplitButtonMenuActivationVector>;
167
+ /**
168
+ * One dropdown-sensitivity expectation. A driver installs the popover FIRST (when
169
+ * {@link SplitButtonDropdownVector.popover} is set) and the menu model second, so
170
+ * a row with both also exercises the dissociation.
171
+ */
172
+ export interface SplitButtonDropdownVector {
173
+ /** The menu model to install (empty = none). */
174
+ entries: readonly AdwMenuEntry[];
175
+ /** Whether a popover is installed before it. */
176
+ popover: boolean;
177
+ /** Whether the dropdown half is live. */
178
+ enabled: boolean;
179
+ /** Whether the menu can be popped up at all. */
180
+ canOpen: boolean;
181
+ /** Why this row exists. */
182
+ rule: string;
183
+ }
184
+ /**
185
+ * "If the menu model is `NULL`, the dropdown is disabled" (adw-split-button.c:376-378),
186
+ * and the same for the popover (:394-396). An empty entry list is the renderers'
187
+ * only spelling of "no menu", so it collapses onto the `NULL` case.
188
+ */
189
+ export declare const SPLIT_BUTTON_DROPDOWN_VECTORS: ReadonlyArray<SplitButtonDropdownVector>;