@gjsify/adwaita-core 0.31.0 → 0.33.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/spinner.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/easing.js +1 -0
- 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/length-unit.js +1 -0
- 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/spinner.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/esm/wrap-box.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 +314 -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 +298 -0
- package/lib/types/conformance/checks.d.ts +29 -0
- package/lib/types/conformance/chrome.d.ts +207 -0
- package/lib/types/conformance/data-grid.d.ts +136 -0
- package/lib/types/conformance/dialog.d.ts +97 -0
- package/lib/types/conformance/entry-row.d.ts +187 -0
- package/lib/types/conformance/index.d.ts +46 -0
- package/lib/types/conformance/navigation-view.d.ts +235 -0
- package/lib/types/conformance/popover.d.ts +58 -0
- package/lib/types/conformance/preferences.d.ts +184 -0
- package/lib/types/conformance/rows.d.ts +74 -0
- package/lib/types/conformance/sidebar.d.ts +182 -0
- package/lib/types/conformance/spinner.d.ts +66 -0
- package/lib/types/conformance/split-button.d.ts +193 -0
- package/lib/types/conformance/split-view.d.ts +301 -0
- package/lib/types/conformance/tab-view.d.ts +449 -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 +185 -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/easing.d.ts +21 -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 +50 -4
- package/lib/types/length-unit.d.ts +24 -0
- 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 +96 -8
- package/lib/types/sidebar.d.ts +308 -0
- package/lib/types/sidebar.spec.d.ts +2 -0
- package/lib/types/spinner.d.ts +117 -0
- package/lib/types/spinner.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 +703 -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 +278 -0
- package/lib/types/view-stack.spec.d.ts +2 -0
- package/lib/types/view-switcher.d.ts +524 -0
- package/lib/types/view-switcher.spec.d.ts +2 -0
- package/lib/types/wrap-box.d.ts +200 -0
- package/lib/types/wrap-box.spec.d.ts +2 -0
- package/package.json +8 -4
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
/** One `string_is_not_empty` expectation. */
|
|
2
|
+
export interface LabelVisibilityVector {
|
|
3
|
+
/** The label's text — `null` stands for "property unset / attribute absent". */
|
|
4
|
+
text: string | null;
|
|
5
|
+
/** Whether the bound label is visible. */
|
|
6
|
+
visible: boolean;
|
|
7
|
+
/** Why this row exists — the rule or edge case it pins down. */
|
|
8
|
+
rule: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* `string_is_not_empty` (adw-action-row.c:112-117 ≡ adw-button-row.c:92-97,
|
|
12
|
+
* inlined at adw-window-title.c:208 and :249).
|
|
13
|
+
*
|
|
14
|
+
* Applies to the TITLE and to the subtitle alike — the bindings are two copies
|
|
15
|
+
* of the same closure (adw-action-row.ui:49-53 and :71-75). The title half is
|
|
16
|
+
* what every port dropped: a row with `title=""` kept a zero-height but
|
|
17
|
+
* line-height-consuming label, and `<adw-window-title>` reserved a title line in
|
|
18
|
+
* every header bar that only had a subtitle.
|
|
19
|
+
*
|
|
20
|
+
* `' '` is the canary row. The C never trims — `string && string[0]` reads ONE
|
|
21
|
+
* byte — so a single space is a VISIBLE label. A port reaching for
|
|
22
|
+
* `value.trim().length` passes every other row here and fails this one.
|
|
23
|
+
*/
|
|
24
|
+
export declare const LABEL_VISIBILITY_VECTORS: ReadonlyArray<LabelVisibilityVector>;
|
|
25
|
+
/** One step of an {@link ActionRowActivationVector}. */
|
|
26
|
+
export type ActionRowStep =
|
|
27
|
+
/** `adw_action_row_set_activatable_widget` — `widget` is an opaque id, `null` clears. */
|
|
28
|
+
{
|
|
29
|
+
op: 'set-activatable-widget';
|
|
30
|
+
widget: string | null;
|
|
31
|
+
sensitive?: boolean;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* The bound widget's `GtkWidget:sensitive` was WRITTEN with this value —
|
|
35
|
+
* not necessarily changed. A write of the value it already holds is a
|
|
36
|
+
* deliberate case: `gtk_widget_set_sensitive` early-returns on it, so
|
|
37
|
+
* `notify::sensitive` never fires and the GBinding propagates nothing.
|
|
38
|
+
*/
|
|
39
|
+
| {
|
|
40
|
+
op: 'set-widget-sensitive';
|
|
41
|
+
sensitive: boolean;
|
|
42
|
+
}
|
|
43
|
+
/** A direct write to `GtkListBoxRow:activatable`. */
|
|
44
|
+
| {
|
|
45
|
+
op: 'set-activatable';
|
|
46
|
+
activatable: boolean;
|
|
47
|
+
};
|
|
48
|
+
/** One `activatable-widget` ↔ `activatable` expectation. */
|
|
49
|
+
export interface ActionRowActivationVector {
|
|
50
|
+
/** What the scenario is called. */
|
|
51
|
+
name: string;
|
|
52
|
+
/** The steps to run against a fresh row, in order. */
|
|
53
|
+
steps: readonly ActionRowStep[];
|
|
54
|
+
/** `GtkListBoxRow:activatable` afterwards. */
|
|
55
|
+
activatable: boolean;
|
|
56
|
+
/** `AdwActionRow:activatable-widget` afterwards, by id. */
|
|
57
|
+
activatableWidget: string | null;
|
|
58
|
+
/** Why this row exists. */
|
|
59
|
+
rule: string;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* `adw_action_row_set_activatable_widget` (adw-action-row.c:696-741).
|
|
63
|
+
*
|
|
64
|
+
* The two rows that decide whether a port read the C or guessed it:
|
|
65
|
+
* `insensitive-widget-does-not-activate` (the binding is `sensitive` →
|
|
66
|
+
* `activatable` with `G_BINDING_SYNC_CREATE`, C:729-732 — NOT a constant TRUE),
|
|
67
|
+
* and `unsetting-keeps-activatable` (clearing only unbinds, C:709, so the flag
|
|
68
|
+
* stays where the binding last left it — stated outright at C:28-30).
|
|
69
|
+
*/
|
|
70
|
+
export declare const ACTION_ROW_ACTIVATION_VECTORS: ReadonlyArray<ActionRowActivationVector>;
|
|
71
|
+
/** One step of a {@link SwitchRowNotifyVector}. */
|
|
72
|
+
export type SwitchRowStep =
|
|
73
|
+
/** `adw_switch_row_set_active` — a PROGRAMMATIC set. */
|
|
74
|
+
{
|
|
75
|
+
op: 'set-active';
|
|
76
|
+
active: boolean;
|
|
77
|
+
}
|
|
78
|
+
/** The row itself was activated (clicked / <kbd>Enter</kbd>). */
|
|
79
|
+
| {
|
|
80
|
+
op: 'activate-row';
|
|
81
|
+
};
|
|
82
|
+
/** One `notify::active` expectation. */
|
|
83
|
+
export interface SwitchRowNotifyVector {
|
|
84
|
+
/** What the scenario is called. */
|
|
85
|
+
name: string;
|
|
86
|
+
/** The steps to run against a fresh row, in order. */
|
|
87
|
+
steps: readonly SwitchRowStep[];
|
|
88
|
+
/** `Adw.SwitchRow:active` afterwards. */
|
|
89
|
+
active: boolean;
|
|
90
|
+
/** The `active` value carried by each `notify::active`, in emission order. */
|
|
91
|
+
emitted: readonly boolean[];
|
|
92
|
+
/** Why this row exists. */
|
|
93
|
+
rule: string;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* `adw_switch_row_set_active` (C:216-228) → `slider_notify_active_cb` (C:66-77).
|
|
97
|
+
*
|
|
98
|
+
* `programmatic-set-notifies` is the row the two renderers answered differently:
|
|
99
|
+
* the notify is emitted by the SLIDER's own `notify::active`, which fires
|
|
100
|
+
* whatever wrote it, so there is no programmatic-vs-interactive split to model.
|
|
101
|
+
* `activate-row-toggles` is the row NEITHER had: `adw_switch_row_init` points
|
|
102
|
+
* the activatable-widget at the slider (C:160-162) and the class docs spell out
|
|
103
|
+
* the result (C:23-27).
|
|
104
|
+
*/
|
|
105
|
+
export declare const SWITCH_ROW_NOTIFY_VECTORS: ReadonlyArray<SwitchRowNotifyVector>;
|
|
106
|
+
/** One `Adw.ButtonRow` icon expectation. */
|
|
107
|
+
export interface ButtonRowIconVector {
|
|
108
|
+
/** `AdwButtonRow:start-icon-name`. */
|
|
109
|
+
startIconName: string | null;
|
|
110
|
+
/** `AdwButtonRow:end-icon-name`. */
|
|
111
|
+
endIconName: string | null;
|
|
112
|
+
/** Whether the leading `image.icon.start` shows (adw-button-row.ui:20-24). */
|
|
113
|
+
startIconVisible: boolean;
|
|
114
|
+
/** Whether the trailing `image.icon.end` shows (adw-button-row.ui:55-59). */
|
|
115
|
+
endIconVisible: boolean;
|
|
116
|
+
/** Why this row exists. */
|
|
117
|
+
rule: string;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* The two icons of `Adw.ButtonRow` (C:201-223), each bound through the same
|
|
121
|
+
* `string_is_not_empty` closure as the title.
|
|
122
|
+
*
|
|
123
|
+
* `end-icon-name` has existed since 1.6 and was missing from BOTH renderers, so
|
|
124
|
+
* every row with a trailing chevron had to be faked with a suffix widget the
|
|
125
|
+
* widget does not have.
|
|
126
|
+
*/
|
|
127
|
+
export declare const BUTTON_ROW_ICON_VECTORS: ReadonlyArray<ButtonRowIconVector>;
|
|
128
|
+
/** One "is this row activatable" expectation. */
|
|
129
|
+
export interface ButtonRowActivatableVector {
|
|
130
|
+
/** The `activatable` markup/property a caller supplies, if any. */
|
|
131
|
+
declared: string | null;
|
|
132
|
+
/** Whether the row activates. Always `true`. */
|
|
133
|
+
activatable: boolean;
|
|
134
|
+
/** Why this row exists. */
|
|
135
|
+
rule: string;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* `Adw.ButtonRow` is always activatable — `adw-button-row.ui:5` sets it TRUE in
|
|
139
|
+
* the template, `adw-button-row.c:31` documents it in one line, and the class
|
|
140
|
+
* exposes no property, no setter and no getter for it (the whole public surface
|
|
141
|
+
* is C:270-352: `new`, and the two icon-name pairs).
|
|
142
|
+
*
|
|
143
|
+
* The vector exists because the browser renderer had invented an
|
|
144
|
+
* `activatable="false"` opt-out — and `adw-button-row.spec.ts` PINNED the
|
|
145
|
+
* invention with a passing test, which is worse than not testing it: it made the
|
|
146
|
+
* divergence look like a decision. A row that reads its own attribute is a row
|
|
147
|
+
* that has to be told to ignore it.
|
|
148
|
+
*/
|
|
149
|
+
export declare const BUTTON_ROW_ACTIVATABLE_VECTORS: ReadonlyArray<ButtonRowActivatableVector>;
|
|
150
|
+
/** One step of a {@link WindowTitleVector}. */
|
|
151
|
+
export type WindowTitleStep = {
|
|
152
|
+
op: 'set-title';
|
|
153
|
+
value: string | null;
|
|
154
|
+
} | {
|
|
155
|
+
op: 'set-subtitle';
|
|
156
|
+
value: string | null;
|
|
157
|
+
};
|
|
158
|
+
/** One `Adw.WindowTitle` expectation. */
|
|
159
|
+
export interface WindowTitleVector {
|
|
160
|
+
/** What the scenario is called. */
|
|
161
|
+
name: string;
|
|
162
|
+
/** The steps to run against a fresh window title, in order. */
|
|
163
|
+
steps: readonly WindowTitleStep[];
|
|
164
|
+
/** The title text afterwards. */
|
|
165
|
+
title: string;
|
|
166
|
+
/** Whether the title label is visible (C:207-208). */
|
|
167
|
+
titleVisible: boolean;
|
|
168
|
+
/** The subtitle text afterwards. */
|
|
169
|
+
subtitle: string;
|
|
170
|
+
/** Whether the subtitle label is visible (C:248-249). */
|
|
171
|
+
subtitleVisible: boolean;
|
|
172
|
+
/** Which property each `notify::*` named, in emission order. */
|
|
173
|
+
notified: readonly ('title' | 'subtitle')[];
|
|
174
|
+
/** Why this row exists. */
|
|
175
|
+
rule: string;
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* `adw_window_title_set_title` / `_set_subtitle` (C:197-211, C:238-252).
|
|
179
|
+
*
|
|
180
|
+
* `null-over-empty-is-silent` is the one DIVERGENCE in this file, and it is
|
|
181
|
+
* deliberate: libadwaita would notify there, because its guard compares a
|
|
182
|
+
* never-NULL `gtk_label_get_label` against a possibly-NULL argument and
|
|
183
|
+
* `g_strcmp0 ("", NULL)` is 1. `WindowTitleState` (`../action-row.ts`) carries
|
|
184
|
+
* the reasoning for why the port normalises before comparing.
|
|
185
|
+
*/
|
|
186
|
+
export declare const WINDOW_TITLE_VECTORS: ReadonlyArray<WindowTitleVector>;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/** One `avatarInitials` expectation. */
|
|
2
|
+
export interface AvatarInitialsVector {
|
|
3
|
+
/** The `Adw.Avatar:text` value. */
|
|
4
|
+
text: string;
|
|
5
|
+
/** What `extract_initials_from_text` produces for it. */
|
|
6
|
+
initials: string;
|
|
7
|
+
/** Why this row exists — the rule or edge case it pins down. */
|
|
8
|
+
rule: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* `extract_initials_from_text` (adw-avatar.c:85) — the first character, plus the
|
|
12
|
+
* character after the LAST ASCII space when there is one.
|
|
13
|
+
*/
|
|
14
|
+
export declare const AVATAR_INITIALS_VECTORS: ReadonlyArray<AvatarInitialsVector>;
|
|
15
|
+
/** One colour-derivation expectation. */
|
|
16
|
+
export interface AvatarColorVector {
|
|
17
|
+
/** The `Adw.Avatar:text` value. */
|
|
18
|
+
text: string;
|
|
19
|
+
/** `g_str_hash(text)` as `guint32` — verified against the real GLib symbol. */
|
|
20
|
+
hash: number;
|
|
21
|
+
/** `set_class_color`'s `(g_str_hash (text) % 14) + 1`, i.e. the `color{n}` CSS class. */
|
|
22
|
+
colorClass: number;
|
|
23
|
+
}
|
|
24
|
+
/** One `avatarMaxFontSize` expectation. */
|
|
25
|
+
export interface AvatarFontSizeVector {
|
|
26
|
+
/** `Adw.Avatar:size`, the circle diameter. */
|
|
27
|
+
size: number;
|
|
28
|
+
/** `sqr_size - padding` for that diameter, rounded to 2dp for the table. */
|
|
29
|
+
maxFontSize: number;
|
|
30
|
+
/** What the browser renderer's old heuristic asked for, before this landed. */
|
|
31
|
+
legacyWebGuess: number;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* `update_font_size`'s cap (adw-avatar.c:221-227) — the inscribed square
|
|
35
|
+
* `size / 1.4142` less `max(size * 0.4 - 5, 0)`.
|
|
36
|
+
*
|
|
37
|
+
* `legacyWebGuess` is kept in the table on purpose: it is `size * (size < 32 ?
|
|
38
|
+
* 0.5 : 0.4)`, which OVERFLOWS the cap at 28, 30, 31 and every size from 64 up
|
|
39
|
+
* (the initials spilled out of the circle), and is not even monotonic — it asked
|
|
40
|
+
* for 16px at size 31 and 13px at size 32.
|
|
41
|
+
*/
|
|
42
|
+
export declare const AVATAR_FONT_SIZE_VECTORS: ReadonlyArray<AvatarFontSizeVector>;
|
|
43
|
+
/** One `avatarMode` expectation. */
|
|
44
|
+
export interface AvatarModeVector {
|
|
45
|
+
hasCustomImage: boolean;
|
|
46
|
+
showInitials: boolean;
|
|
47
|
+
text: string;
|
|
48
|
+
mode: 'image' | 'initials' | 'icon';
|
|
49
|
+
rule: string;
|
|
50
|
+
}
|
|
51
|
+
/** `update_visibility` (adw-avatar.c:117). */
|
|
52
|
+
export declare const AVATAR_MODE_VECTORS: ReadonlyArray<AvatarModeVector>;
|
|
53
|
+
/**
|
|
54
|
+
* `g_str_hash` + `set_class_color` (adw-avatar.c:143).
|
|
55
|
+
*
|
|
56
|
+
* The non-ASCII rows are the ones that matter: GLib hashes the UTF-8 bytes as
|
|
57
|
+
* `signed char`, so a port reading UTF-16 code units picks a different colour
|
|
58
|
+
* for every accented name. `"Jörg Schröder"` is the canary — it landed on
|
|
59
|
+
* `color6` before this table existed, where GTK paints `color14`.
|
|
60
|
+
*/
|
|
61
|
+
export declare const AVATAR_COLOR_VECTORS: ReadonlyArray<AvatarColorVector>;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/** One property-default expectation. */
|
|
2
|
+
export interface BannerDefaultVector {
|
|
3
|
+
/** The `Adw.Banner` property name, as GObject spells it. */
|
|
4
|
+
property: 'title' | 'button-label' | 'revealed' | 'use-markup' | 'button-style';
|
|
5
|
+
/** The `GParamSpec` default. */
|
|
6
|
+
value: string | boolean;
|
|
7
|
+
/** Why this row exists — the rule or edge case it pins down. */
|
|
8
|
+
rule: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* The five `GParamSpec` defaults (adw-banner.c:391-459).
|
|
12
|
+
*
|
|
13
|
+
* `revealed: false` and `useMarkup: true` are the two that were wrong in the
|
|
14
|
+
* ports. `@gjsify/adwaita-nativescript` initialised `_revealed = true` and its
|
|
15
|
+
* constructor never wrote `visibility`, so a banner showed itself on a device
|
|
16
|
+
* and stayed hidden in the browser; both ports made `use-markup` opt-in, and the
|
|
17
|
+
* browser element's comment claimed that WAS the C default.
|
|
18
|
+
*/
|
|
19
|
+
export declare const BANNER_DEFAULT_VECTORS: ReadonlyArray<BannerDefaultVector>;
|
|
20
|
+
/** One button-visibility expectation. */
|
|
21
|
+
export interface BannerButtonVisibleVector {
|
|
22
|
+
/** The `button-label` value, or `null` for the `NULL` the C setter accepts. */
|
|
23
|
+
label: string | null;
|
|
24
|
+
/** Whether `gtk_widget_set_visible` is handed a true value (:663). */
|
|
25
|
+
visible: boolean;
|
|
26
|
+
/** Why this row exists. */
|
|
27
|
+
rule: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* `adw_banner_set_button_label` (:663) — `gtk_widget_set_visible (button, label
|
|
31
|
+
* && label[0])`.
|
|
32
|
+
*
|
|
33
|
+
* A FIRST-CHARACTER test. The whitespace rows are the ones that matter: a
|
|
34
|
+
* renderer that trimmed before testing would hide a button GTK draws.
|
|
35
|
+
*/
|
|
36
|
+
export declare const BANNER_BUTTON_VISIBLE_VECTORS: ReadonlyArray<BannerButtonVisibleVector>;
|
|
37
|
+
/** One button-label text expectation. */
|
|
38
|
+
export interface BannerButtonTextVector {
|
|
39
|
+
/** The `button-label` value. */
|
|
40
|
+
label: string;
|
|
41
|
+
/** What a renderer without an accelerator layer paints. */
|
|
42
|
+
text: string;
|
|
43
|
+
/** Why this row exists. */
|
|
44
|
+
rule: string;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* The banner button's text after mnemonic resolution.
|
|
48
|
+
*
|
|
49
|
+
* The template pins the BUTTON to `use-underline=True` (adw-banner.ui:33) with
|
|
50
|
+
* no property to turn it off, and pins the TITLE label to `use-underline=False`
|
|
51
|
+
* (adw-banner.ui:20). So the same underscore is an accelerator marker in the
|
|
52
|
+
* button and a literal in the title — which is why there is no title
|
|
53
|
+
* counterpart to this table. Neither port stripped anything.
|
|
54
|
+
*/
|
|
55
|
+
export declare const BANNER_BUTTON_TEXT_VECTORS: ReadonlyArray<BannerButtonTextVector>;
|
|
56
|
+
/** One `button-style` → style-class expectation. */
|
|
57
|
+
export interface BannerButtonStyleVector {
|
|
58
|
+
/** The `AdwBannerButtonStyle` nick. */
|
|
59
|
+
style: 'default' | 'suggested';
|
|
60
|
+
/** The classes on the button node (:764-774). */
|
|
61
|
+
classes: readonly string[];
|
|
62
|
+
/** Why this row exists. */
|
|
63
|
+
rule: string;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* `adw_banner_set_button_style`'s switch (:764-774) — the property adds or
|
|
67
|
+
* removes exactly one class and touches nothing else.
|
|
68
|
+
*
|
|
69
|
+
* Present in this vendored source since 1.7 (:34) and in NEITHER renderer, so a
|
|
70
|
+
* banner asking for a suggested action button got a grey one in both.
|
|
71
|
+
*/
|
|
72
|
+
export declare const BANNER_BUTTON_STYLE_VECTORS: ReadonlyArray<BannerButtonStyleVector>;
|
|
73
|
+
/** One `button-style` attribute-parsing expectation. */
|
|
74
|
+
export interface BannerButtonStyleParseVector {
|
|
75
|
+
/** The renderer-level string — an HTML attribute, an XML property. */
|
|
76
|
+
input: string | null;
|
|
77
|
+
/** The `AdwBannerButtonStyle` it resolves to. */
|
|
78
|
+
style: 'default' | 'suggested';
|
|
79
|
+
/** Why this row exists. */
|
|
80
|
+
rule: string;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Turning a renderer-supplied STRING into the enum.
|
|
84
|
+
*
|
|
85
|
+
* Not a C behaviour and cannot be: `adw_banner_set_button_style` range-guards an
|
|
86
|
+
* `AdwBannerButtonStyle` it has already been handed (:756-757), so an
|
|
87
|
+
* unrepresentable string never reaches it. Falling back to the property default
|
|
88
|
+
* is what `g_object_set` does with an invalid nick, and it is the only answer
|
|
89
|
+
* that keeps the two renderers agreeing on the same markup.
|
|
90
|
+
*/
|
|
91
|
+
export declare const BANNER_BUTTON_STYLE_PARSE_VECTORS: ReadonlyArray<BannerButtonStyleParseVector>;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/** One property-default expectation. */
|
|
2
|
+
export interface ButtonContentDefaultVector {
|
|
3
|
+
/** The `AdwButtonContent` property name, as GObject spells it. */
|
|
4
|
+
property: 'icon-name' | 'label' | 'use-underline' | 'can-shrink';
|
|
5
|
+
/** The `GParamSpec` default. */
|
|
6
|
+
value: string | boolean;
|
|
7
|
+
/** Why this row exists. */
|
|
8
|
+
rule: string;
|
|
9
|
+
}
|
|
10
|
+
/** The four `GParamSpec` defaults (adw-button-content.c:229-272). */
|
|
11
|
+
export declare const BUTTON_CONTENT_DEFAULT_VECTORS: ReadonlyArray<ButtonContentDefaultVector>;
|
|
12
|
+
/** One icon-name resolution expectation. */
|
|
13
|
+
export interface ButtonContentIconVector {
|
|
14
|
+
/** The `icon-name` value. */
|
|
15
|
+
iconName: string;
|
|
16
|
+
/** The name the `GtkImage` is actually set from (:355-358). */
|
|
17
|
+
resolved: string;
|
|
18
|
+
/** Whether the resolved name is the empty-slot fallback rather than an app value. */
|
|
19
|
+
isFallback: boolean;
|
|
20
|
+
/** Why this row exists. */
|
|
21
|
+
rule: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* `adw_button_content_set_icon_name` (:355-358).
|
|
25
|
+
*
|
|
26
|
+
* THE DOCS AND THE CODE DISAGREE AND THIS TABLE FOLLOWS THE CODE. Both doc
|
|
27
|
+
* comments say an empty `icon-name` means the icon "is not shown" (:228 on the
|
|
28
|
+
* property, :343 on the setter). Nothing in the widget hides it:
|
|
29
|
+
* `gtk_widget_set_visible` is called on the LABEL only (:300, :398), `init` sets
|
|
30
|
+
* the image to `image-missing` while `icon_name` is still `""` (:284, :294), and
|
|
31
|
+
* the setter re-applies that fallback for every empty value (:355-356). So a
|
|
32
|
+
* default-constructed `AdwButtonContent` draws the broken-image glyph, and both
|
|
33
|
+
* ports — which followed the prose and hid the icon — are the ones that diverge.
|
|
34
|
+
* Encoding the prose would have pinned their guess under the word "conformance".
|
|
35
|
+
*/
|
|
36
|
+
export declare const BUTTON_CONTENT_ICON_VECTORS: ReadonlyArray<ButtonContentIconVector>;
|
|
37
|
+
/** One label-slot expectation. */
|
|
38
|
+
export interface ButtonContentLabelVector {
|
|
39
|
+
/** The `label` value. */
|
|
40
|
+
label: string;
|
|
41
|
+
/** Whether the label node is in the tree (:398). */
|
|
42
|
+
visible: boolean;
|
|
43
|
+
/** Whether the icon takes the box's free space (:399). */
|
|
44
|
+
iconExpands: boolean;
|
|
45
|
+
/** Why this row exists. */
|
|
46
|
+
rule: string;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* `adw_button_content_set_label` (:398-399) — the two calls it makes, both keyed
|
|
50
|
+
* on `label[0]` and therefore exact complements.
|
|
51
|
+
*/
|
|
52
|
+
export declare const BUTTON_CONTENT_LABEL_VECTORS: ReadonlyArray<ButtonContentLabelVector>;
|
|
53
|
+
/** One label-text expectation. */
|
|
54
|
+
export interface ButtonContentTextVector {
|
|
55
|
+
/** The `label` value. */
|
|
56
|
+
label: string;
|
|
57
|
+
/** The `use-underline` value. */
|
|
58
|
+
useUnderline: boolean;
|
|
59
|
+
/** What a renderer without an accelerator layer paints. */
|
|
60
|
+
text: string;
|
|
61
|
+
/** Why this row exists. */
|
|
62
|
+
rule: string;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* `adw_button_content_set_use_underline` (:442) applied to the label.
|
|
66
|
+
*
|
|
67
|
+
* Absent from both ports, and it is the property the class docs single out —
|
|
68
|
+
* "handles … connecting the mnemonic to the button automatically" (:42-43). The
|
|
69
|
+
* default is FALSE (:253-256), so an underscore in an unconfigured button
|
|
70
|
+
* content is a LITERAL, unlike the banner's action button.
|
|
71
|
+
*/
|
|
72
|
+
export declare const BUTTON_CONTENT_TEXT_VECTORS: ReadonlyArray<ButtonContentTextVector>;
|
|
73
|
+
/** One `can-shrink` expectation. */
|
|
74
|
+
export interface ButtonContentEllipsizeVector {
|
|
75
|
+
/** The `can-shrink` value. */
|
|
76
|
+
canShrink: boolean;
|
|
77
|
+
/** The label's `PangoEllipsizeMode` (:489-491). */
|
|
78
|
+
ellipsize: 'none' | 'end';
|
|
79
|
+
/** Why this row exists. */
|
|
80
|
+
rule: string;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* `adw_button_content_set_can_shrink` (:489-491), which the getter reads back as
|
|
84
|
+
* `ellipsize != PANGO_ELLIPSIZE_NONE` (:462).
|
|
85
|
+
*
|
|
86
|
+
* The browser port had this; the NativeScript port had no such property, so the
|
|
87
|
+
* shared story's `canShrink` control did nothing there.
|
|
88
|
+
*/
|
|
89
|
+
export declare const BUTTON_CONTENT_ELLIPSIZE_VECTORS: ReadonlyArray<ButtonContentEllipsizeVector>;
|
|
90
|
+
/** One style-class targeting expectation. */
|
|
91
|
+
export interface ButtonContentStyleTargetVector {
|
|
92
|
+
/** The ancestor chain, NEAREST first, as `adw_button_content_root` walks it. */
|
|
93
|
+
ancestors: ReadonlyArray<'button' | 'menu-button' | 'split-button' | 'other'>;
|
|
94
|
+
/** Index into {@link ancestors} that receives `image-text-button`, or `null`. */
|
|
95
|
+
target: number | null;
|
|
96
|
+
/** Why this row exists. */
|
|
97
|
+
rule: string;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* `adw_button_content_root` (:108-116) — nearest `GtkButton`, then ONE
|
|
101
|
+
* substitution: if that button's DIRECT parent is an `AdwSplitButton`, the class
|
|
102
|
+
* moves to the split button (:112-113).
|
|
103
|
+
*
|
|
104
|
+
* Neither renderer applied the class to anything at all, so every row here is a
|
|
105
|
+
* new assertion rather than a pinned behaviour. The split-button row is the one
|
|
106
|
+
* with a CSS consequence beyond padding: the class on the `splitbutton` node
|
|
107
|
+
* selects `splitbutton.image-text-button > button` (_buttons.scss:499-507),
|
|
108
|
+
* which is a different declaration block from the plain-button one.
|
|
109
|
+
*/
|
|
110
|
+
export declare const BUTTON_CONTENT_STYLE_TARGET_VECTORS: ReadonlyArray<ButtonContentStyleTargetVector>;
|