@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,355 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The inputs every clamp computation needs: the two properties plus the child's
|
|
3
|
+
* measured minimum and natural size in the clamp's own orientation.
|
|
4
|
+
*
|
|
5
|
+
* Sizes are already-resolved PIXELS. `AdwClampLayout:unit` (default `sp`) scales
|
|
6
|
+
* them against the GTK text-scale factor, which is a platform capability rather
|
|
7
|
+
* than headless logic — a renderer that has one runs `adwLengthToPx` (exported
|
|
8
|
+
* from `./split-view.js`) before calling in.
|
|
9
|
+
*/
|
|
10
|
+
export interface ClampParams {
|
|
11
|
+
/** `maximum-size` — how wide the child may get. Default 600. */
|
|
12
|
+
maximumSize: number;
|
|
13
|
+
/** `tightening-threshold` — where the eased tightening starts. Default 400. */
|
|
14
|
+
tighteningThreshold: number;
|
|
15
|
+
/** The child's measured minimum in the clamped orientation. */
|
|
16
|
+
childMin: number;
|
|
17
|
+
/** The child's measured natural size in the clamped orientation. */
|
|
18
|
+
childNat: number;
|
|
19
|
+
}
|
|
20
|
+
/** The libadwaita property defaults (adw-clamp-layout.c:414, :438, :462-464). */
|
|
21
|
+
export declare const ADW_CLAMP_DEFAULTS: {
|
|
22
|
+
readonly maximumSize: number;
|
|
23
|
+
readonly tighteningThreshold: number;
|
|
24
|
+
};
|
|
25
|
+
/** The three breakpoints every other clamp computation is written in terms of. */
|
|
26
|
+
export interface ClampThresholds {
|
|
27
|
+
/** Below this the child gets ALL the available size — `MAX(MIN(threshold, maximum), childMin)`. */
|
|
28
|
+
lower: number;
|
|
29
|
+
/** The largest size the child will ever be allocated — `MAX(lower, maximum)`. */
|
|
30
|
+
max: number;
|
|
31
|
+
/** The available size at which the child finally reaches {@link max}. */
|
|
32
|
+
upper: number;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* `lower`/`max`/`upper` (adw-clamp-layout.c:173-176, :210-213).
|
|
36
|
+
*
|
|
37
|
+
* Exported because both the measure and the allocate path need them, and
|
|
38
|
+
* because the two cases the renderers got wrong live entirely in these three
|
|
39
|
+
* lines: a threshold ABOVE the maximum collapses the tightening region
|
|
40
|
+
* (`lower === max === upper`), and a child whose own minimum exceeds the maximum
|
|
41
|
+
* raises all three to that minimum — which is how `maximum-size="0"` means "give
|
|
42
|
+
* the child its minimum", not "give it nothing".
|
|
43
|
+
*/
|
|
44
|
+
export declare function clampThresholds(params: ClampParams): ClampThresholds;
|
|
45
|
+
/**
|
|
46
|
+
* `child_size_from_clamp` (adw-clamp-layout.c:193-232) — how much of `forSize`
|
|
47
|
+
* the child is allocated.
|
|
48
|
+
*
|
|
49
|
+
* The result is never larger than `forSize`, which is the whole point and what
|
|
50
|
+
* `view.width = maximumSize` in the NativeScript port broke: below `lower` the
|
|
51
|
+
* child gets EXACTLY the available size, so a narrow phone gets a narrow child.
|
|
52
|
+
* The cap only bites from `upper` upward; between the two the size is eased so
|
|
53
|
+
* the transition into the cap is smooth rather than a corner.
|
|
54
|
+
*/
|
|
55
|
+
export declare function clampChildSize(forSize: number, params: ClampParams): number;
|
|
56
|
+
/**
|
|
57
|
+
* `clamp_size_from_child` (adw-clamp-layout.c:156-191) — the INVERSE, used while
|
|
58
|
+
* measuring: how much space the clamp itself must report for the child to end up
|
|
59
|
+
* at `childSize`.
|
|
60
|
+
*
|
|
61
|
+
* The inverse of `ease_out_cubic` is `1 + cbrt(t - 1)`, and the rounding goes the
|
|
62
|
+
* OTHER way from {@link clampChildSize} (`ceil`, not `floor`) so the reported
|
|
63
|
+
* request never lands a pixel short of what the child asked for.
|
|
64
|
+
*/
|
|
65
|
+
export declare function clampSizeFromChild(childSize: number, params: ClampParams): number;
|
|
66
|
+
/** Which of the three size classes `adw_clamp_layout_allocate` stamps on the child. */
|
|
67
|
+
export type AdwClampSizeClass = 'small' | 'medium' | 'large';
|
|
68
|
+
/**
|
|
69
|
+
* All three size classes, so a renderer can CLEAR the ones that no longer apply.
|
|
70
|
+
*
|
|
71
|
+
* `adw_clamp_layout_allocate` removes the other two on every pass and removes
|
|
72
|
+
* all three from a child it stops laying out (adw-clamp-layout.c:333-336), so
|
|
73
|
+
* "which classes does the clamp own" is part of the contract, not a detail each
|
|
74
|
+
* renderer gets to restate.
|
|
75
|
+
*/
|
|
76
|
+
export declare const ADW_CLAMP_SIZE_CLASSES: ReadonlyArray<AdwClampSizeClass>;
|
|
77
|
+
/** Everything one clamp allocation decides. */
|
|
78
|
+
export interface ClampAllocation {
|
|
79
|
+
/** The size the child is allocated along the clamped axis. */
|
|
80
|
+
childSize: number;
|
|
81
|
+
/** `ceil(max)` — the cap the `large` class is keyed off. */
|
|
82
|
+
childMaximum: number;
|
|
83
|
+
/** `ceil(lower)` — the threshold the `small` class is keyed off. */
|
|
84
|
+
lowerThreshold: number;
|
|
85
|
+
/** The style class the CHILD must carry. */
|
|
86
|
+
sizeClass: AdwClampSizeClass;
|
|
87
|
+
/** Leading offset that centres the child along the clamped axis. */
|
|
88
|
+
offset: number;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* `adw_clamp_layout_allocate` (adw-clamp-layout.c:317-386) — child size, the
|
|
92
|
+
* style class the child carries, and the centring offset, in one call.
|
|
93
|
+
*
|
|
94
|
+
* The class boundaries are INCLUSIVE at both ends and are compared against the
|
|
95
|
+
* CEILED thresholds, not the raw doubles; the offset is C integer division, so
|
|
96
|
+
* it truncates rather than rounds.
|
|
97
|
+
*/
|
|
98
|
+
export declare function clampAllocate(availableSize: number, params: ClampParams): ClampAllocation;
|
|
99
|
+
/**
|
|
100
|
+
* Normalise a `maximum-size` / `tightening-threshold` coming from an attribute
|
|
101
|
+
* or a property assignment into the `g_param_spec_int (…, 0, G_MAXINT, …)` range
|
|
102
|
+
* both properties declare (adw-clamp-layout.c:413-416, :448-451).
|
|
103
|
+
*
|
|
104
|
+
* Three inputs used to produce three different results across the three
|
|
105
|
+
* implementations, and this is the one answer for all of them:
|
|
106
|
+
* - `0` is IN RANGE and means "clamp the child to its own minimum". The web
|
|
107
|
+
* port's `attr || '600'` never fired for the string `"0"` and produced
|
|
108
|
+
* `max-width: 0`; the NS port's `value > 0` guard silently substituted 600.
|
|
109
|
+
* - a value GObject would refuse (`NaN`, a non-numeric attribute) never
|
|
110
|
+
* reaches the layout, so the property keeps its DEFAULT. The web port
|
|
111
|
+
* assigned `NaNpx`, which the CSSOM drops — leaving whatever cap was set
|
|
112
|
+
* before silently in force.
|
|
113
|
+
* - a negative is out of range and clamps to the range floor, 0.
|
|
114
|
+
*/
|
|
115
|
+
export declare function normalizeClampSize(value: number | string | null | undefined, fallback: number): number;
|
|
116
|
+
/** `AdwToolbarStyle` (adw-toolbar-view.c:120-125). */
|
|
117
|
+
export type AdwToolbarStyle = 'flat' | 'raised' | 'raised-border';
|
|
118
|
+
/** The toolbar-view property defaults (adw-toolbar-view.c:572, :608, :731-732). */
|
|
119
|
+
export declare const ADW_TOOLBAR_VIEW_DEFAULTS: {
|
|
120
|
+
readonly topBarStyle: AdwToolbarStyle;
|
|
121
|
+
readonly bottomBarStyle: AdwToolbarStyle;
|
|
122
|
+
readonly extendContentToTopEdge: boolean;
|
|
123
|
+
readonly extendContentToBottomEdge: boolean;
|
|
124
|
+
};
|
|
125
|
+
/**
|
|
126
|
+
* Read an `AdwToolbarStyle` off an attribute or a property assignment.
|
|
127
|
+
*
|
|
128
|
+
* Anything outside the enum is the default: C rejects it outright
|
|
129
|
+
* (`g_return_if_fail (style <= ADW_TOOLBAR_RAISED_BORDER)`,
|
|
130
|
+
* adw-toolbar-view.c:1004) and leaves the property at whatever it was.
|
|
131
|
+
*/
|
|
132
|
+
export declare function parseToolbarStyle(value: string | null | undefined): AdwToolbarStyle;
|
|
133
|
+
/**
|
|
134
|
+
* The style classes a bar box carries for `style`
|
|
135
|
+
* (adw-toolbar-view.c:1011-1024, :1097-1110).
|
|
136
|
+
*
|
|
137
|
+
* `raised-border` is `raised` PLUS `border` — the border replaces the shadow in
|
|
138
|
+
* the stylesheet, it does not replace the raised background.
|
|
139
|
+
*/
|
|
140
|
+
export declare function toolbarBarStyleClasses(style: AdwToolbarStyle): string[];
|
|
141
|
+
/** Everything `update_undershoots` + the two style setters need to decide the classes. */
|
|
142
|
+
export interface ToolbarViewClassInput {
|
|
143
|
+
/** `top-bar-style`. */
|
|
144
|
+
topBarStyle: AdwToolbarStyle;
|
|
145
|
+
/** `bottom-bar-style`. */
|
|
146
|
+
bottomBarStyle: AdwToolbarStyle;
|
|
147
|
+
/** `extend-content-to-top-edge`. */
|
|
148
|
+
extendContentToTopEdge: boolean;
|
|
149
|
+
/** `extend-content-to-bottom-edge`. */
|
|
150
|
+
extendContentToBottomEdge: boolean;
|
|
151
|
+
/** The ALLOCATED top-bar height, i.e. `Adw.ToolbarView:top-bar-height`. */
|
|
152
|
+
topBarHeight: number;
|
|
153
|
+
/** The ALLOCATED bottom-bar height, i.e. `Adw.ToolbarView:bottom-bar-height`. */
|
|
154
|
+
bottomBarHeight: number;
|
|
155
|
+
}
|
|
156
|
+
/** The classes a toolbar view owns on ITSELF, so a renderer can clear them. */
|
|
157
|
+
export declare const ADW_TOOLBAR_VIEW_CLASSES: ReadonlyArray<string>;
|
|
158
|
+
/** The classes a toolbar view owns on each BAR BOX, so a renderer can clear them. */
|
|
159
|
+
export declare const ADW_TOOLBAR_BAR_CLASSES: ReadonlyArray<string>;
|
|
160
|
+
/** The three class lists a toolbar view distributes over its own node and its two bar boxes. */
|
|
161
|
+
export interface ToolbarViewClasses {
|
|
162
|
+
/** Classes on the VIEW — `undershoot-top` / `undershoot-bottom`. */
|
|
163
|
+
view: string[];
|
|
164
|
+
/** Classes on the top-bar box. */
|
|
165
|
+
topBar: string[];
|
|
166
|
+
/** Classes on the bottom-bar box. */
|
|
167
|
+
bottomBar: string[];
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* `update_undershoots` (adw-toolbar-view.c:215-232) plus the two per-bar style
|
|
171
|
+
* class setters, as one derivation.
|
|
172
|
+
*
|
|
173
|
+
* An undershoot is the scroll-fade under a FLAT bar, so all three conditions
|
|
174
|
+
* must hold: the bar is flat (a raised bar has its own shadow), the content does
|
|
175
|
+
* NOT extend under it (there is nothing to fade), and the bar was actually
|
|
176
|
+
* allocated a height (an absent bar fades nothing). The height being the
|
|
177
|
+
* ALLOCATED one — not "is there a bar widget" — is why this reads a number.
|
|
178
|
+
*/
|
|
179
|
+
export declare function toolbarViewClasses(input: ToolbarViewClassInput): ToolbarViewClasses;
|
|
180
|
+
/** The measured sizes one toolbar-view allocation consumes. */
|
|
181
|
+
export interface ToolbarViewAllocateInput {
|
|
182
|
+
/** The height the view itself was allocated. */
|
|
183
|
+
height: number;
|
|
184
|
+
/** Top bar minimum height. */
|
|
185
|
+
topMin: number;
|
|
186
|
+
/** Top bar natural height. */
|
|
187
|
+
topNat: number;
|
|
188
|
+
/** Bottom bar minimum height. */
|
|
189
|
+
bottomMin: number;
|
|
190
|
+
/** Bottom bar natural height. */
|
|
191
|
+
bottomNat: number;
|
|
192
|
+
/** Content minimum height. `0` when there is no content. */
|
|
193
|
+
contentMin: number;
|
|
194
|
+
/** `extend-content-to-top-edge`. */
|
|
195
|
+
extendContentToTopEdge: boolean;
|
|
196
|
+
/** `extend-content-to-bottom-edge`. */
|
|
197
|
+
extendContentToBottomEdge: boolean;
|
|
198
|
+
}
|
|
199
|
+
/** What one toolbar-view allocation produces. */
|
|
200
|
+
export interface ToolbarViewAllocation {
|
|
201
|
+
/** `Adw.ToolbarView:top-bar-height`. */
|
|
202
|
+
topBarHeight: number;
|
|
203
|
+
/** `Adw.ToolbarView:bottom-bar-height`. */
|
|
204
|
+
bottomBarHeight: number;
|
|
205
|
+
/** The height the content is allocated. */
|
|
206
|
+
contentHeight: number;
|
|
207
|
+
/** The content's vertical offset from the view's top edge. */
|
|
208
|
+
contentOffset: number;
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* `adw_toolbar_view_size_allocate` (adw-toolbar-view.c:357-406) — the two chained
|
|
212
|
+
* GLib CLAMPs that turn measured sizes into the three slot heights.
|
|
213
|
+
*
|
|
214
|
+
* Read it as: reserve the content's minimum and the bottom bar's minimum, hand
|
|
215
|
+
* what is left to the top bar (clamped into its own min…nat), then repeat for the
|
|
216
|
+
* bottom bar with the top bar's ACTUAL height. Two consequences a naive
|
|
217
|
+
* "stack them" layout does not reproduce:
|
|
218
|
+
* - a STRETCHY bar (`nat > min`) grows into spare height and shrinks back
|
|
219
|
+
* toward its minimum as the content's minimum claims the space;
|
|
220
|
+
* - once the view is squeezed below everything's minimum, GLib's `CLAMP` — which
|
|
221
|
+
* tests the HIGH bound first — leaves the BARS at their minimum and lets the
|
|
222
|
+
* CONTENT go short. `Math.min(high, Math.max(low, x))` gives the same answer
|
|
223
|
+
* here only because both bounds arrive in order; the primitive is
|
|
224
|
+
* {@link glibClamp} regardless, since the inputs are caller-supplied.
|
|
225
|
+
*/
|
|
226
|
+
export declare function toolbarViewAllocate(input: ToolbarViewAllocateInput): ToolbarViewAllocation;
|
|
227
|
+
/** The measured sizes one toolbar-view measure consumes. */
|
|
228
|
+
export interface ToolbarViewMeasureInput {
|
|
229
|
+
/** Which axis is being measured. */
|
|
230
|
+
orientation: 'horizontal' | 'vertical';
|
|
231
|
+
/** Top bar minimum along {@link orientation}. */
|
|
232
|
+
topMin: number;
|
|
233
|
+
/** Top bar natural along {@link orientation}. */
|
|
234
|
+
topNat: number;
|
|
235
|
+
/** Bottom bar minimum along {@link orientation}. */
|
|
236
|
+
bottomMin: number;
|
|
237
|
+
/** Bottom bar natural along {@link orientation}. */
|
|
238
|
+
bottomNat: number;
|
|
239
|
+
/** Content minimum along {@link orientation}. `0` when there is no content. */
|
|
240
|
+
contentMin: number;
|
|
241
|
+
/** Content natural along {@link orientation}. `0` when there is no content. */
|
|
242
|
+
contentNat: number;
|
|
243
|
+
/** `extend-content-to-top-edge`. */
|
|
244
|
+
extendContentToTopEdge: boolean;
|
|
245
|
+
/** `extend-content-to-bottom-edge`. */
|
|
246
|
+
extendContentToBottomEdge: boolean;
|
|
247
|
+
}
|
|
248
|
+
/** A GTK measure result. */
|
|
249
|
+
export interface AdwMeasurement {
|
|
250
|
+
/** Minimum size along the measured axis. */
|
|
251
|
+
minimum: number;
|
|
252
|
+
/** Natural size along the measured axis. */
|
|
253
|
+
natural: number;
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* `adw_toolbar_view_measure` (adw-toolbar-view.c:266-354) — the four-way vertical
|
|
257
|
+
* combination keyed on the two extend flags, plus the horizontal MAX form.
|
|
258
|
+
*
|
|
259
|
+
* The four branches are not four spellings of the same sum: a bar the content
|
|
260
|
+
* extends UNDER contributes via `MAX`, a bar it does not contributes via `+`.
|
|
261
|
+
* With both flags set the two bars are summed first and MAXed as a pair, because
|
|
262
|
+
* they still cannot overlap each other.
|
|
263
|
+
*/
|
|
264
|
+
export declare function toolbarViewMeasure(input: ToolbarViewMeasureInput): AdwMeasurement;
|
|
265
|
+
/** The bar heights subtracted before the content is measured horizontally. */
|
|
266
|
+
export interface ToolbarViewContentForSizeInput {
|
|
267
|
+
/** `extend-content-to-top-edge`. */
|
|
268
|
+
extendContentToTopEdge: boolean;
|
|
269
|
+
/** `extend-content-to-bottom-edge`. */
|
|
270
|
+
extendContentToBottomEdge: boolean;
|
|
271
|
+
/** Top bar minimum HEIGHT (always the vertical measurement, whatever axis is being measured). */
|
|
272
|
+
topMinHeight: number;
|
|
273
|
+
/** Top bar natural HEIGHT. */
|
|
274
|
+
topNatHeight: number;
|
|
275
|
+
/** Bottom bar minimum HEIGHT. */
|
|
276
|
+
bottomMinHeight: number;
|
|
277
|
+
/** Bottom bar natural HEIGHT. */
|
|
278
|
+
bottomNatHeight: number;
|
|
279
|
+
}
|
|
280
|
+
/** The two heights the content has to be measured against. */
|
|
281
|
+
export interface ToolbarViewContentForSize {
|
|
282
|
+
/** `for_size` for the content's MINIMUM — bars at their minimum heights. */
|
|
283
|
+
forSizeMin: number;
|
|
284
|
+
/** `for_size` for the content's NATURAL — bars at their natural heights. */
|
|
285
|
+
forSizeNat: number;
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* `adw_toolbar_view_measure`'s height-for-width branch (adw-toolbar-view.c:292-316).
|
|
289
|
+
*
|
|
290
|
+
* Two different `for_size` values, not one: a STRETCHY bar leaves the content a
|
|
291
|
+
* different width at the bar's minimum than at its natural size, so the content's
|
|
292
|
+
* minimum and natural have to be measured against different heights. They
|
|
293
|
+
* coincide exactly when every bar is rigid, which is why one value looked
|
|
294
|
+
* sufficient for as long as nobody had a stretchy bar.
|
|
295
|
+
*/
|
|
296
|
+
export declare function toolbarViewContentForSize(forSize: number, input: ToolbarViewContentForSizeInput): ToolbarViewContentForSize;
|
|
297
|
+
/**
|
|
298
|
+
* `MIN_SIZE` (adw-spinner.c:14) — reported as BOTH the minimum and the natural
|
|
299
|
+
* size (adw_spinner_measure, :70-84), so a spinner never grows on its own; it
|
|
300
|
+
* only fills an allocation something else made larger.
|
|
301
|
+
*/
|
|
302
|
+
export declare const ADW_SPINNER_MIN_SIZE = 16;
|
|
303
|
+
/**
|
|
304
|
+
* The largest ring Adwaita ever draws: `2 * MAX_RADIUS`
|
|
305
|
+
* (adw-spinner-paintable.c:19). Together with {@link ADW_SPINNER_MIN_SIZE} this
|
|
306
|
+
* is the documented "never smaller than 16×16 and never larger than 64×64"
|
|
307
|
+
* (adw-spinner.c:27-28).
|
|
308
|
+
*/
|
|
309
|
+
export declare const ADW_SPINNER_MAX_SIZE = 64;
|
|
310
|
+
/** The circle `AdwSpinnerPaintable` strokes into a `width × height` box. */
|
|
311
|
+
export interface SpinnerGeometry {
|
|
312
|
+
/** Ring radius, capped at `ADW_SPINNER_MAX_SIZE / 2`. */
|
|
313
|
+
radius: number;
|
|
314
|
+
/** Drawn diameter, `2 * radius`. */
|
|
315
|
+
diameter: number;
|
|
316
|
+
/** Stroke width — `diameter / 8`, the documented "2px for 16px". */
|
|
317
|
+
lineWidth: number;
|
|
318
|
+
/** Ring centre X within the box. */
|
|
319
|
+
centerX: number;
|
|
320
|
+
/** Ring centre Y within the box. */
|
|
321
|
+
centerY: number;
|
|
322
|
+
}
|
|
323
|
+
/**
|
|
324
|
+
* `adw_spinner_paintable_snapshot_with_weight` (adw-spinner-paintable.c:342-352)
|
|
325
|
+
* plus `calculate_line_width` (:314-321) at the default weight 400, where
|
|
326
|
+
* `width_apply_weight` is the identity branch (:303-306).
|
|
327
|
+
*
|
|
328
|
+
* Three details the renderers had each guessed at:
|
|
329
|
+
* - the SHORTER side decides the radius, and it is FLOORED, so a 31px box
|
|
330
|
+
* draws a 30px ring rather than a 31px one;
|
|
331
|
+
* - the radius is capped at 32 while the CENTRE still follows the box, so a
|
|
332
|
+
* 200px allocation shows a 64px ring in the middle, not a 200px one;
|
|
333
|
+
* - the stroke is `diameter / 8` exactly — 3px at 24, 6px at 48, 8px at 64.
|
|
334
|
+
* The browser port's `max(2, round(size / 12))` drew 2px, 4px and 5px there.
|
|
335
|
+
*
|
|
336
|
+
* `MIN_RADIUS 8` (adw-spinner-paintable.c:18) is dead in the C source — nothing
|
|
337
|
+
* references it — so it is deliberately NOT a floor here. The real floor is the
|
|
338
|
+
* widget's measured {@link ADW_SPINNER_MIN_SIZE}.
|
|
339
|
+
*/
|
|
340
|
+
export declare function spinnerGeometry(width: number, height: number): SpinnerGeometry;
|
|
341
|
+
/**
|
|
342
|
+
* The box a spinner is actually given for a requested `size`.
|
|
343
|
+
*
|
|
344
|
+
* `adw_spinner_measure` reports 16 as the minimum, and GTK never allocates a
|
|
345
|
+
* widget below its minimum — so a smaller request is not representable, and a
|
|
346
|
+
* request GObject would refuse (`NaN`, a non-numeric attribute, an unset one)
|
|
347
|
+
* leaves the natural size in force. There is no upper bound HERE: an oversized
|
|
348
|
+
* allocation stays oversized and {@link spinnerGeometry} caps the drawn ring,
|
|
349
|
+
* which is how the box and the ring can differ (a 200px allocation, a 64px ring).
|
|
350
|
+
*
|
|
351
|
+
* Replaces the two invented defaults this package shipped — `24` in the browser
|
|
352
|
+
* element and `32` in the NativeScript widget — neither of which is in the C
|
|
353
|
+
* source.
|
|
354
|
+
*/
|
|
355
|
+
export declare function resolveSpinnerSize(value: number | string | null | undefined): number;
|
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
/** One `parse_person` expectation. */
|
|
2
|
+
export interface CreditPersonVector {
|
|
3
|
+
/** The raw credit line, as an app puts it in `developers` etc. */
|
|
4
|
+
input: string;
|
|
5
|
+
/** `*name` after `g_strstrip` (:520, :528, :533). */
|
|
6
|
+
name: string;
|
|
7
|
+
/** `*link` — `null` is "no link", `''` is an EMPTY link and still a link. */
|
|
8
|
+
link: string | null;
|
|
9
|
+
/** `*is_email`, i.e. `*q1 == '<'` (:521). */
|
|
10
|
+
isEmail: boolean;
|
|
11
|
+
/** The URI the row gets (`add_credits_section` :571-580). */
|
|
12
|
+
uri: string | null;
|
|
13
|
+
/** Why this row exists — the rule or edge case it pins down. */
|
|
14
|
+
rule: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* `parse_person` (adw-about-dialog.c:490-534), verified against real GLib.
|
|
18
|
+
*
|
|
19
|
+
* Seven of these rows are the browser renderer's divergences, and each was a
|
|
20
|
+
* plausible-looking simplification: anchoring the angle pair at the end of the
|
|
21
|
+
* string, testing the link for `@`, requiring whitespace before a bare URL,
|
|
22
|
+
* accepting `mailto:` as a scheme, `String.trim()` instead of `g_strstrip`,
|
|
23
|
+
* treating index 0 as falsy, and never reaching the `r1 <= q1 + 1` branch.
|
|
24
|
+
*/
|
|
25
|
+
export declare const CREDIT_PERSON_VECTORS: ReadonlyArray<CreditPersonVector>;
|
|
26
|
+
/** One `translator-credits` split expectation. */
|
|
27
|
+
export interface TranslatorCreditsVector {
|
|
28
|
+
/** The raw `translator-credits` property value. */
|
|
29
|
+
value: string | null;
|
|
30
|
+
/** The names the "Translated by" section is built from. */
|
|
31
|
+
people: ReadonlyArray<string>;
|
|
32
|
+
/** Why this row exists. */
|
|
33
|
+
rule: string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* The sentinel guard + split (adw-about-dialog.c:603-608), with `g_strsplit`'s
|
|
37
|
+
* token behaviour verified against GLib 2.88.
|
|
38
|
+
*
|
|
39
|
+
* The empty-string row is the one a port gets wrong: `g_strsplit ("", "\n", 0)`
|
|
40
|
+
* is a ZERO-length vector, so `add_credits_section` bails at `!*people`
|
|
41
|
+
* (:545-546) and no section is drawn; JS `''.split('\n')` is `['']`, which
|
|
42
|
+
* draws the section with one blank row.
|
|
43
|
+
*
|
|
44
|
+
* CORE-ONLY: an internal step of a pipeline whose COMPOSED result is renderer-driven — driving it separately would assert the same thing twice (ABOUT_DIALOG_CREDITS_LEGAL_VECTORS)
|
|
45
|
+
*/
|
|
46
|
+
export declare const TRANSLATOR_CREDITS_VECTORS: ReadonlyArray<TranslatorCreditsVector>;
|
|
47
|
+
/** One assembled credits-page expectation. */
|
|
48
|
+
export interface CreditsSectionsVector {
|
|
49
|
+
/** The credit properties, as an app sets them. */
|
|
50
|
+
input: {
|
|
51
|
+
developers?: ReadonlyArray<string>;
|
|
52
|
+
designers?: ReadonlyArray<string>;
|
|
53
|
+
artists?: ReadonlyArray<string>;
|
|
54
|
+
documenters?: ReadonlyArray<string>;
|
|
55
|
+
translatorCredits?: string | null;
|
|
56
|
+
creditSections?: ReadonlyArray<{
|
|
57
|
+
title: string | null;
|
|
58
|
+
people: ReadonlyArray<string>;
|
|
59
|
+
}>;
|
|
60
|
+
};
|
|
61
|
+
/** The groups on the Credits page, in order, with each row's title + URI. */
|
|
62
|
+
sections: ReadonlyArray<{
|
|
63
|
+
title: string | null;
|
|
64
|
+
people: ReadonlyArray<{
|
|
65
|
+
name: string;
|
|
66
|
+
uri: string | null;
|
|
67
|
+
}>;
|
|
68
|
+
}>;
|
|
69
|
+
/** Why this row exists. */
|
|
70
|
+
rule: string;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* `update_credits` (:593-627) — which groups exist, in which order.
|
|
74
|
+
*
|
|
75
|
+
* The order is fixed by the five `add_credits_section` calls (:611-619) followed
|
|
76
|
+
* by the app's own sections in insertion order (:621-625). An empty property is
|
|
77
|
+
* not an empty group, it is no group (:545-546).
|
|
78
|
+
*/
|
|
79
|
+
export declare const CREDITS_SECTIONS_VECTORS: ReadonlyArray<CreditsSectionsVector>;
|
|
80
|
+
/** The `update_details` half of the truth table (:1102-1119). */
|
|
81
|
+
export interface AboutDialogDetailsVector {
|
|
82
|
+
/** `website` non-empty. */
|
|
83
|
+
website: boolean;
|
|
84
|
+
/** `comments` non-empty. */
|
|
85
|
+
comments: boolean;
|
|
86
|
+
/** `add_link` was called at least once (:2820). */
|
|
87
|
+
customLinks: boolean;
|
|
88
|
+
/** `release-notes` non-empty (:1020-1021). */
|
|
89
|
+
releaseNotes: boolean;
|
|
90
|
+
/** The seven widgets `update_details` decides. */
|
|
91
|
+
visible: {
|
|
92
|
+
detailsGroup: boolean;
|
|
93
|
+
whatsNewRow: boolean;
|
|
94
|
+
detailsRow: boolean;
|
|
95
|
+
websiteRow: boolean;
|
|
96
|
+
commentsLabel: boolean;
|
|
97
|
+
linksGroup: boolean;
|
|
98
|
+
detailsWebsiteRow: boolean;
|
|
99
|
+
};
|
|
100
|
+
/** Why this row exists. */
|
|
101
|
+
rule: string;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* `update_details` (:1102-1119), exhaustive over (website, comments,
|
|
105
|
+
* custom links) plus the two rows that show what release notes add.
|
|
106
|
+
*
|
|
107
|
+
* The row that matters most is `website only`: it is the ONE combination where
|
|
108
|
+
* the website link stays on the main page and no Details row is offered, and it
|
|
109
|
+
* is the combination a port reproduces incorrectly by folding `website` into
|
|
110
|
+
* its "has details" predicate. `show_details` is `has_comments ||
|
|
111
|
+
* has_custom_links` — website is deliberately not in it (:1108).
|
|
112
|
+
*/
|
|
113
|
+
export declare const ABOUT_DIALOG_DETAILS_VECTORS: ReadonlyArray<AboutDialogDetailsVector>;
|
|
114
|
+
/** The `update_support` half of the truth table (:1121-1133). */
|
|
115
|
+
export interface AboutDialogSupportVector {
|
|
116
|
+
/** `support-url` non-empty. */
|
|
117
|
+
supportUrl: boolean;
|
|
118
|
+
/** `issue-url` non-empty. */
|
|
119
|
+
issueUrl: boolean;
|
|
120
|
+
/** `debug-info` non-empty. */
|
|
121
|
+
debugInfo: boolean;
|
|
122
|
+
/** The four widgets `update_support` decides — all on the MAIN page. */
|
|
123
|
+
visible: {
|
|
124
|
+
supportGroup: boolean;
|
|
125
|
+
supportRow: boolean;
|
|
126
|
+
issueRow: boolean;
|
|
127
|
+
troubleshootingRow: boolean;
|
|
128
|
+
};
|
|
129
|
+
/** Why this row exists. */
|
|
130
|
+
rule: string;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* `update_support` (:1121-1133), exhaustive.
|
|
134
|
+
*
|
|
135
|
+
* Every widget here is a child of `support_group`, which the template puts on
|
|
136
|
+
* the MAIN page (adw-about-dialog.ui:146-186) — the class docs say so outright
|
|
137
|
+
* ("displays the following two links on the main page", :87-90). The browser
|
|
138
|
+
* renderer put Support Questions and Report an Issue on the Details page
|
|
139
|
+
* instead, which hid the issue tracker behind a navigation step AND made the
|
|
140
|
+
* Details page appear for a dialog that has no Details content in GTK terms.
|
|
141
|
+
*/
|
|
142
|
+
export declare const ABOUT_DIALOG_SUPPORT_VECTORS: ReadonlyArray<AboutDialogSupportVector>;
|
|
143
|
+
/** The `update_credits_legal_group` half of the truth table (:480-487). */
|
|
144
|
+
export interface AboutDialogCreditsLegalVector {
|
|
145
|
+
/** `credits_box` has children (:629-630). */
|
|
146
|
+
hasCredits: boolean;
|
|
147
|
+
/** `legal_box` has children (:745-746). */
|
|
148
|
+
hasLegal: boolean;
|
|
149
|
+
/** `add_acknowledgement_section` was called (:3297). */
|
|
150
|
+
hasAcknowledgements: boolean;
|
|
151
|
+
/** The four widgets, all on the main page. */
|
|
152
|
+
visible: {
|
|
153
|
+
creditsLegalGroup: boolean;
|
|
154
|
+
creditsRow: boolean;
|
|
155
|
+
legalRow: boolean;
|
|
156
|
+
acknowledgementsRow: boolean;
|
|
157
|
+
};
|
|
158
|
+
/** Why this row exists. */
|
|
159
|
+
rule: string;
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* `update_credits_legal_group` (:480-487) with the three template bindings
|
|
163
|
+
* (adw-about-dialog.ui:198, :215, :233), exhaustive.
|
|
164
|
+
*
|
|
165
|
+
* Each row's visibility is bound directly to its page's box, so the group is
|
|
166
|
+
* the OR of the three and never appears empty.
|
|
167
|
+
*/
|
|
168
|
+
export declare const ABOUT_DIALOG_CREDITS_LEGAL_VECTORS: ReadonlyArray<AboutDialogCreditsLegalVector>;
|
|
169
|
+
/** One main-page header-field visibility expectation. */
|
|
170
|
+
export interface AboutDialogHeaderVector {
|
|
171
|
+
/** The property being set. */
|
|
172
|
+
property: 'application-icon' | 'application-name' | 'developer-name' | 'version';
|
|
173
|
+
/** Its value. */
|
|
174
|
+
value: string;
|
|
175
|
+
/** Whether the corresponding widget is shown. */
|
|
176
|
+
visible: boolean;
|
|
177
|
+
/** Why this row exists. */
|
|
178
|
+
rule: string;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* The four `x && *x` visibility tests on the main page (:2313-2314, :2376-2377,
|
|
182
|
+
* :2426-2427, :2476).
|
|
183
|
+
*
|
|
184
|
+
* All four are FIRST-CHARACTER tests, so a single space is content. There is no
|
|
185
|
+
* fallback anywhere: an unset application name shows NO label, it does not show
|
|
186
|
+
* the word "Application", and an unset icon shows NO image, not a generic
|
|
187
|
+
* executable glyph. The browser renderer invented both.
|
|
188
|
+
*/
|
|
189
|
+
export declare const ABOUT_DIALOG_HEADER_VECTORS: ReadonlyArray<AboutDialogHeaderVector>;
|
|
190
|
+
/** One template-label expectation. */
|
|
191
|
+
export interface AboutDialogLabelVector {
|
|
192
|
+
/** Which label. */
|
|
193
|
+
label: 'dialogTitle' | 'detailsRow' | 'websiteRow' | 'supportRow' | 'issueRow' | 'troubleshootingRow' | 'creditsRow' | 'legalRow' | 'acknowledgementsRow' | 'whatsNewRow' | 'detailsPage' | 'creditsPage' | 'legalPage';
|
|
194
|
+
/** The template string, mnemonic marker included. */
|
|
195
|
+
text: string;
|
|
196
|
+
/** What a renderer with no accelerator layer paints (`stripMnemonic`). */
|
|
197
|
+
plain: string;
|
|
198
|
+
/** Why this row exists. */
|
|
199
|
+
rule: string;
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* The template labels (adw-about-dialog.ui), with and without their mnemonic
|
|
203
|
+
* markers.
|
|
204
|
+
*
|
|
205
|
+
* `dialogTitle` is the row that catches the invented one: the main navigation
|
|
206
|
+
* page binds its title to `AdwDialog:title`, whose template default is the bare
|
|
207
|
+
* word "About" (.ui:6, :19). The application name is NOT part of it — it appears
|
|
208
|
+
* on its own in the header revealer that fades in on scroll (.ui:29-31). A
|
|
209
|
+
* renderer that titles the page "About <app>" AND labels the dialog "About
|
|
210
|
+
* <app>" says the app's name three times on one screen.
|
|
211
|
+
*
|
|
212
|
+
* CORE-ONLY: a string table the renderers read THROUGH ADW_ABOUT_DIALOG_LABELS; the rendered text is asserted by ABOUT_DIALOG_HEADER/DETAILS_VECTORS
|
|
213
|
+
*/
|
|
214
|
+
export declare const ABOUT_DIALOG_LABEL_VECTORS: ReadonlyArray<AboutDialogLabelVector>;
|
|
215
|
+
/** One `gtk_license_info` row expectation. */
|
|
216
|
+
export interface LicenseInfoVector {
|
|
217
|
+
/** The `GtkLicense` value, i.e. the array index. */
|
|
218
|
+
licenseType: number;
|
|
219
|
+
/** `gtk_license_info[i].spdx_id`. */
|
|
220
|
+
spdxId: string | null;
|
|
221
|
+
/** `gtk_license_info[i].url`. */
|
|
222
|
+
url: string | null;
|
|
223
|
+
/** Why this row exists. */
|
|
224
|
+
rule: string;
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Spot rows from `gtk_license_info` (:215-252) — the ends and the boundaries,
|
|
228
|
+
* not a second copy of the whole table.
|
|
229
|
+
*
|
|
230
|
+
* Index 18 is pinned because `G_STATIC_ASSERT (G_N_ELEMENTS (gtk_license_info)
|
|
231
|
+
* - 1 == GTK_LICENSE_0BSD)` (:253-256) is the C's own check that the table and
|
|
232
|
+
* the enum have not drifted; this is that assertion, ported.
|
|
233
|
+
*
|
|
234
|
+
* CORE-ONLY: an internal step of a pipeline whose COMPOSED result is renderer-driven — driving it separately would assert the same thing twice (ABOUT_DIALOG_CREDITS_LEGAL_VECTORS)
|
|
235
|
+
*/
|
|
236
|
+
export declare const LICENSE_INFO_VECTORS: ReadonlyArray<LicenseInfoVector>;
|
|
237
|
+
/** One SPDX-id lookup expectation. */
|
|
238
|
+
export interface LicenseSpdxVector {
|
|
239
|
+
/** The AppStream `project_license` value. */
|
|
240
|
+
spdxId: string;
|
|
241
|
+
/** The `GtkLicense` it resolves to, or `null` for no match. */
|
|
242
|
+
licenseType: number | null;
|
|
243
|
+
/** Why this row exists. */
|
|
244
|
+
rule: string;
|
|
245
|
+
}
|
|
246
|
+
/** The two lookup loops in `populate_from_appdata` (:1226-1239). *
|
|
247
|
+
* CORE-ONLY: an internal step of a pipeline whose COMPOSED result is renderer-driven — driving it separately would assert the same thing twice (LICENSE_INFO_VECTORS → the legal section)
|
|
248
|
+
*/
|
|
249
|
+
export declare const LICENSE_SPDX_VECTORS: ReadonlyArray<LicenseSpdxVector>;
|
|
250
|
+
/** One `get_license_text` expectation. */
|
|
251
|
+
export interface LicenseTextVector {
|
|
252
|
+
/** The `GtkLicense` value. */
|
|
253
|
+
licenseType: number;
|
|
254
|
+
/** The `license` property. */
|
|
255
|
+
license: string;
|
|
256
|
+
/** What the Legal page shows, `null` meaning "no licence text at all". */
|
|
257
|
+
text: string | null;
|
|
258
|
+
/** Why this row exists. */
|
|
259
|
+
rule: string;
|
|
260
|
+
}
|
|
261
|
+
/** `get_license_text` (:635-651). *
|
|
262
|
+
* CORE-ONLY: an internal step of a pipeline whose COMPOSED result is renderer-driven — driving it separately would assert the same thing twice (ABOUT_DIALOG_CREDITS_LEGAL_VECTORS)
|
|
263
|
+
*/
|
|
264
|
+
export declare const LICENSE_TEXT_VECTORS: ReadonlyArray<LicenseTextVector>;
|
|
265
|
+
/** One licence-setter step. */
|
|
266
|
+
export interface LicenseSetterStep {
|
|
267
|
+
/** Which setter is called. */
|
|
268
|
+
property: 'license' | 'license-type';
|
|
269
|
+
/** The argument. */
|
|
270
|
+
value: string | number;
|
|
271
|
+
}
|
|
272
|
+
/** One licence-setter sequence expectation. */
|
|
273
|
+
export interface LicenseSetterVector {
|
|
274
|
+
/** The calls, in order, starting from the property defaults. */
|
|
275
|
+
steps: ReadonlyArray<LicenseSetterStep>;
|
|
276
|
+
/** `license` afterwards. */
|
|
277
|
+
license: string;
|
|
278
|
+
/** `license-type` afterwards. */
|
|
279
|
+
licenseType: number;
|
|
280
|
+
/** Every `g_object_notify_by_pspec` from every step, concatenated in order. */
|
|
281
|
+
notify: ReadonlyArray<'license' | 'license-type'>;
|
|
282
|
+
/** Why this row exists. */
|
|
283
|
+
rule: string;
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* The two setters (:3396-3416, :3459-3480), which are ONE state machine.
|
|
287
|
+
*
|
|
288
|
+
* Each notifies BOTH properties whenever it does anything (:3414-3415,
|
|
289
|
+
* :3476-3477), because setting either can move the other. The asymmetry in the
|
|
290
|
+
* early-outs is the trap: `set_license` bails on an unchanged STRING before it
|
|
291
|
+
* would have set the type to custom, so re-assigning the same text after a
|
|
292
|
+
* licence-type change does switch the type, while assigning `""` to an already
|
|
293
|
+
* empty licence does not.
|
|
294
|
+
*
|
|
295
|
+
* CORE-ONLY: a property-ordering table with no rendered surface — the RESULT is ABOUT_DIALOG_CREDITS_LEGAL_VECTORS, which both renderers drive
|
|
296
|
+
*/
|
|
297
|
+
export declare const LICENSE_SETTER_VECTORS: ReadonlyArray<LicenseSetterVector>;
|
|
298
|
+
/** One Legal-page visibility expectation. */
|
|
299
|
+
export interface LegalSectionVector {
|
|
300
|
+
/** The `copyright` property. */
|
|
301
|
+
copyright: string;
|
|
302
|
+
/** The `license-type`. */
|
|
303
|
+
licenseType: number;
|
|
304
|
+
/** The `license` text. */
|
|
305
|
+
license: string;
|
|
306
|
+
/** Whether the app's own legal section is drawn at all (:666-671). */
|
|
307
|
+
visible: boolean;
|
|
308
|
+
/** Why this row exists. */
|
|
309
|
+
rule: string;
|
|
310
|
+
}
|
|
311
|
+
/** `append_legal_section`'s early-outs for the default section (:666-671, :740). *
|
|
312
|
+
* CORE-ONLY: an internal step of a pipeline whose COMPOSED result is renderer-driven — driving it separately would assert the same thing twice (ABOUT_DIALOG_CREDITS_LEGAL_VECTORS)
|
|
313
|
+
*/
|
|
314
|
+
export declare const LEGAL_SECTION_VECTORS: ReadonlyArray<LegalSectionVector>;
|