@gjsify/adwaita-core 0.32.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.
Files changed (40) hide show
  1. package/lib/esm/chrome.js +1 -1
  2. package/lib/esm/conformance/index.js +1 -1
  3. package/lib/esm/conformance/rows.js +1 -1
  4. package/lib/esm/conformance/spinner.js +1 -0
  5. package/lib/esm/conformance/wrap-box.js +1 -1
  6. package/lib/esm/easing.js +1 -0
  7. package/lib/esm/index.js +1 -1
  8. package/lib/esm/length-unit.js +1 -0
  9. package/lib/esm/rows.js +1 -1
  10. package/lib/esm/spinner.js +1 -0
  11. package/lib/esm/split-view.js +1 -1
  12. package/lib/esm/view-stack.js +1 -1
  13. package/lib/esm/view-switcher.js +1 -1
  14. package/lib/esm/wrap-box.js +1 -0
  15. package/lib/types/conformance/about-dialog.d.ts +17 -3
  16. package/lib/types/conformance/carousel.d.ts +19 -5
  17. package/lib/types/conformance/chrome.d.ts +18 -6
  18. package/lib/types/conformance/data-grid.d.ts +2 -0
  19. package/lib/types/conformance/entry-row.d.ts +2 -0
  20. package/lib/types/conformance/index.d.ts +6 -4
  21. package/lib/types/conformance/popover.d.ts +2 -0
  22. package/lib/types/conformance/preferences.d.ts +16 -2
  23. package/lib/types/conformance/rows.d.ts +23 -0
  24. package/lib/types/conformance/spinner.d.ts +66 -0
  25. package/lib/types/conformance/split-button.d.ts +4 -0
  26. package/lib/types/conformance/split-view.d.ts +14 -3
  27. package/lib/types/conformance/tab-view.d.ts +9 -1
  28. package/lib/types/conformance/wrap-box.d.ts +104 -53
  29. package/lib/types/easing.d.ts +21 -0
  30. package/lib/types/index.d.ts +10 -3
  31. package/lib/types/length-unit.d.ts +24 -0
  32. package/lib/types/rows.d.ts +47 -6
  33. package/lib/types/spinner.d.ts +117 -0
  34. package/lib/types/spinner.spec.d.ts +2 -0
  35. package/lib/types/split-view.d.ts +1 -12
  36. package/lib/types/view-stack.d.ts +12 -0
  37. package/lib/types/view-switcher.d.ts +9 -6
  38. package/lib/types/wrap-box.d.ts +200 -0
  39. package/lib/types/wrap-box.spec.d.ts +2 -0
  40. package/package.json +3 -3
@@ -123,6 +123,8 @@ export interface EntryRowGuardVector {
123
123
  * setter early-outs on an unchanged value (C:984, :1198, :1247, :1339), while
124
124
  * the private `adw_entry_row_set_show_indicator` (C:1281-1296) deliberately has
125
125
  * NO equality check and re-derives unconditionally.
126
+ *
127
+ * CORE-ONLY: GAP — the browser element discards the setter’s boolean, so the guard has no observable answer. Tracked in #1072
126
128
  */
127
129
  export declare const ENTRY_ROW_GUARD_VECTORS: ReadonlyArray<EntryRowGuardVector>;
128
130
  /** One mutation in a password-entry-row scenario. */
@@ -10,8 +10,8 @@ export { BUTTON_CONTENT_DEFAULT_VECTORS, BUTTON_CONTENT_ELLIPSIZE_VECTORS, BUTTO
10
10
  export type { ButtonContentDefaultVector, ButtonContentEllipsizeVector, ButtonContentIconVector, ButtonContentLabelVector, ButtonContentStyleTargetVector, ButtonContentTextVector, } from './button-content.js';
11
11
  export { RADIO_GROUP_VECTORS } from './checks.js';
12
12
  export type { RadioGroupStep, RadioGroupVector } from './checks.js';
13
- export { COMBO_SELECTION_VECTORS } from './rows.js';
14
- export type { ComboSelectionStep, ComboSelectionVector } from './rows.js';
13
+ export { COMBO_CHOOSER_VECTORS, COMBO_SELECTION_VECTORS } from './rows.js';
14
+ export type { ComboChooserVector, ComboSelectionStep, ComboSelectionVector } from './rows.js';
15
15
  export { VIEW_STACK_ICON_NAME_VECTORS, VIEW_STACK_PAGE_VECTORS, VIEW_STACK_VECTORS } from './view-stack.js';
16
16
  export type { ViewStackIconNameVector, ViewStackPageDescriptorVector, ViewStackVector, ViewStackVectorChange, ViewStackVectorOp, ViewStackVectorPage, } from './view-stack.js';
17
17
  export { NAVIGATION_VIEW_VECTORS, collectNavigationState, navigationEventLog, runNavigationSteps, } from './navigation-view.js';
@@ -40,5 +40,7 @@ export { BOTTOM_SHEET_CLOSE_VECTORS, BOTTOM_SHEET_PRESENTATION_VECTORS, runBotto
40
40
  export type { BottomSheetCloseVector, BottomSheetPresentationAdapter, BottomSheetPresentationStep, BottomSheetPresentationVector, } from './dialog.js';
41
41
  export { POPOVER_KEY_VECTORS, POPOVER_SURFACE_VECTORS } from './popover.js';
42
42
  export type { PopoverKeyVector, PopoverSurfaceVariant, PopoverSurfaceVector } from './popover.js';
43
- export { ADW_WRAP_BOX_DEFAULT_ALIGN, ADW_WRAP_BOX_DEFAULT_JUSTIFY, ADW_WRAP_BOX_DEFAULT_JUSTIFY_LAST_LINE, ADW_WRAP_BOX_DEFAULT_SPACING, WRAP_BOX_LINE_VECTORS, WRAP_BOX_SPACING_NOTIFY_VECTORS, WRAP_BOX_SPACING_VECTORS, } from './wrap-box.js';
44
- export type { WrapBoxJustify, WrapBoxLineLayout, WrapBoxLineVector, WrapBoxSpacingNotifyVector, WrapBoxSpacingVector, } from './wrap-box.js';
43
+ export { SPINNER_ARC_ENVELOPE, SPINNER_ARC_PHASE_VECTORS, SPINNER_ARC_TOLERANCE, SPINNER_CONSTANT_VECTORS, } from './spinner.js';
44
+ export type { SpinnerArcShapeVector, SpinnerConstantVector } from './spinner.js';
45
+ export { WRAP_BOX_CHILD_ORDER_VECTORS, WRAP_BOX_LENGTH_VECTORS, WRAP_BOX_LINE_VECTORS, WRAP_BOX_NATURAL_LENGTH_VECTORS, WRAP_BOX_NOTIFY_PROPERTIES, WRAP_BOX_POLICY_VECTORS, WRAP_BOX_SPACING_NOTIFY_VECTORS, WRAP_BOX_SPACING_VECTORS, } from './wrap-box.js';
46
+ export type { WrapBoxChildOrderVector, WrapBoxLengthVector, WrapBoxLineVector, WrapBoxNaturalLengthVector, WrapBoxPolicyVector, WrapBoxSpacingNotifyVector, WrapBoxSpacingVector, } from './wrap-box.js';
@@ -52,5 +52,7 @@ export interface PopoverKeyVector {
52
52
  * The rows that matter are the ones where the copies were WRONG rather than
53
53
  * merely duplicated: ArrowUp from an unfocused list (both computed `n - 2`), and
54
54
  * Home/End while a search entry owns the caret (the drop-down stole both).
55
+ *
56
+ * CORE-ONLY: GAP — `adw-popover` calls `resolvePopoverKey` on keydown but publishes no readable outcome for a spec to compare. Tracked in #1072
55
57
  */
56
58
  export declare const POPOVER_KEY_VECTORS: ReadonlyArray<PopoverKeyVector>;
@@ -40,6 +40,8 @@ export interface CaseFoldVector {
40
40
  * silently fails to match — in German, Greek and any text with a typographic
41
41
  * ligature. None of it is visible in an ASCII test suite, which is exactly why
42
42
  * the rows are here.
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 (PREFERENCES_SEARCH_VECTORS)
43
45
  */
44
46
  export declare const CASE_FOLD_VECTORS: ReadonlyArray<CaseFoldVector>;
45
47
  /** One `stripMarkup` expectation. */
@@ -58,6 +60,8 @@ export interface StripMarkupVector {
58
60
  * `null` is not an error case to be smoothed over: it is the branch where C
59
61
  * logs a `g_critical` and KEEPS the unparsed string, so every `null` row below
60
62
  * is a row that must stay searchable under its literal spelling.
63
+ *
64
+ * CORE-ONLY: an internal step of a pipeline whose COMPOSED result is renderer-driven — driving it separately would assert the same thing twice (PREFERENCES_SEARCH_VECTORS)
61
65
  */
62
66
  export declare const STRIP_MARKUP_VECTORS: ReadonlyArray<StripMarkupVector>;
63
67
  /** One `stripMnemonic` expectation. */
@@ -72,6 +76,8 @@ export interface StripMnemonicVector {
72
76
  /**
73
77
  * `adw_strip_mnemonic` (adw-widget-utils.c:685-703) — `g_markup_escape_text`
74
78
  * followed by `pango_parse_markup` with `accel_marker = '_'`.
79
+ *
80
+ * CORE-ONLY: an internal step of a pipeline whose COMPOSED result is renderer-driven — driving it separately would assert the same thing twice (PREFERENCES_SEARCH_VECTORS)
75
81
  */
76
82
  export declare const STRIP_MNEMONIC_VECTORS: ReadonlyArray<StripMnemonicVector>;
77
83
  /** One `makeComparable` expectation. */
@@ -91,6 +97,8 @@ export interface MakeComparableVector {
91
97
  * The defaults matter as much as the rows: `use-markup` defaults to TRUE
92
98
  * (adw-preferences-row.c:185-188) and `use-underline` to FALSE (:155-158), so
93
99
  * an ordinary row's title IS markup-parsed and is NOT mnemonic-stripped.
100
+ *
101
+ * CORE-ONLY: an internal step of a pipeline whose COMPOSED result is renderer-driven — driving it separately would assert the same thing twice (PREFERENCES_SEARCH_VECTORS)
94
102
  */
95
103
  export declare const MAKE_COMPARABLE_VECTORS: ReadonlyArray<MakeComparableVector>;
96
104
  /** One `rowMatchesQuery` expectation. */
@@ -104,7 +112,9 @@ export interface RowMatchVector {
104
112
  /** Why this row exists. */
105
113
  rule: string;
106
114
  }
107
- /** `filter_search_results` (adw-preferences-dialog.c:125-153). */
115
+ /** `filter_search_results` (adw-preferences-dialog.c:125-153). *
116
+ * CORE-ONLY: an internal step of a pipeline whose COMPOSED result is renderer-driven — driving it separately would assert the same thing twice (PREFERENCES_SEARCH_VECTORS)
117
+ */
108
118
  export declare const ROW_MATCH_VECTORS: ReadonlyArray<RowMatchVector>;
109
119
  /** One `collectSearchRows` expectation. */
110
120
  export interface SearchCorpusVector {
@@ -124,6 +134,8 @@ export interface SearchCorpusVector {
124
134
  * Dropping any clause is invisible — nothing errors, the search just quietly
125
135
  * indexes the wrong set — which is why these rows are separate from the
126
136
  * end-to-end ones.
137
+ *
138
+ * CORE-ONLY: an internal step of a pipeline whose COMPOSED result is renderer-driven — driving it separately would assert the same thing twice (PREFERENCES_SEARCH_VECTORS)
127
139
  */
128
140
  export declare const SEARCH_CORPUS_VECTORS: ReadonlyArray<SearchCorpusVector>;
129
141
  /** One `createSearchRowSubtitle` expectation. */
@@ -135,7 +147,9 @@ export interface SearchRowSubtitleVector {
135
147
  /** Why this row exists. */
136
148
  rule: string;
137
149
  }
138
- /** `create_search_row_subtitle` (adw-preferences-dialog.c:168-234). */
150
+ /** `create_search_row_subtitle` (adw-preferences-dialog.c:168-234). *
151
+ * CORE-ONLY: an internal step of a pipeline whose COMPOSED result is renderer-driven — driving it separately would assert the same thing twice (PREFERENCES_SEARCH_VECTORS)
152
+ */
139
153
  export declare const SEARCH_ROW_SUBTITLE_VECTORS: ReadonlyArray<SearchRowSubtitleVector>;
140
154
  /**
141
155
  * The page tree both renderer suites materialise into real widgets.
@@ -49,3 +49,26 @@ export interface ComboSelectionVector {
49
49
  * replaced. That first change is in `emitted` for exactly that reason.
50
50
  */
51
51
  export declare const COMBO_SELECTION_VECTORS: ReadonlyArray<ComboSelectionVector>;
52
+ /** One `presentsChooser` expectation. */
53
+ export interface ComboChooserVector {
54
+ /** How many options the model holds. */
55
+ count: number;
56
+ /** Whether the arrow is drawn and the row is activatable. */
57
+ presentsChooser: boolean;
58
+ /** The rule this row pins down. */
59
+ rule: string;
60
+ }
61
+ /**
62
+ * `model_changed` (adw-combo-row.c:187-195) — one predicate, `n_items > 1`,
63
+ * driving BOTH `gtk_widget_set_visible (arrow_box, …)` and
64
+ * `gtk_list_box_row_set_activatable (row, …)`.
65
+ *
66
+ * A row with one option or none has nothing to choose, so it stops presenting
67
+ * itself as a chooser. Neither port did this: a NativeScript `AdwComboRow` with
68
+ * a single option still showed its chevron and opened an `action()` sheet with
69
+ * one entry, and the browser element behaved the same way.
70
+ *
71
+ * `Gtk.DropDown` is deliberately NOT covered — it keeps its arrow at any count,
72
+ * which is why this lives on the combo ROW rather than in the shared chooser.
73
+ */
74
+ export declare const COMBO_CHOOSER_VECTORS: ReadonlyArray<ComboChooserVector>;
@@ -0,0 +1,66 @@
1
+ /** How close two radian values have to be to count as equal. */
2
+ export declare const SPINNER_ARC_TOLERANCE = 1e-9;
3
+ /**
4
+ * The arc lengths actually DRAWN, in radians — measured over one cycle at 200k
5
+ * samples, not read off the constants.
6
+ *
7
+ * The distinction matters and is easy to get wrong: `MAX_ARC_LENGTH` is
8
+ * `pi * 0.9` (162 degrees), and both `get_arc_start` and `get_arc_end` lerp
9
+ * TOWARDS it — but each then subtracts the drift term
10
+ * `angle * MAX_ARC_LENGTH / cycle_length`, which is what makes the figure
11
+ * advance around the circle. The two ends drift together, so the visible arc
12
+ * peaks at **102.8 degrees**, not 162. Reading the constant as the drawn length
13
+ * is the obvious mistake; issue #1066 made it in its own summary table.
14
+ *
15
+ * The MINIMUM is exactly `MIN_ARC_LENGTH`, because the drift is zero at the
16
+ * cycle boundary where the arc is shortest.
17
+ */
18
+ export declare const SPINNER_ARC_ENVELOPE: {
19
+ /** Exactly `MIN_ARC_LENGTH` — 2.7 degrees, at the cycle boundary. */
20
+ readonly min: number;
21
+ /** 102.815... degrees. Asserted to a tolerance, not to the last digit. */
22
+ readonly max: 1.794463;
23
+ /** How far a measured extreme may sit from the value above. */
24
+ readonly tolerance: 0.0001;
25
+ };
26
+ /**
27
+ * `get_arc_start` / `get_arc_end` (adw-spinner-paintable.c:109-145) at the four
28
+ * corners of one cycle, plus the resting pose.
29
+ *
30
+ * The lengths are DERIVED from the C's own constants rather than typed in: the
31
+ * point of the rows is which MOMENT each is, and a hand-copied radian would be a
32
+ * second reading of the same arithmetic the implementation does. What they pin
33
+ * is the shape — that the arc is shortest at the cycle boundary, longest around
34
+ * the extend/contract handover, and never leaves `[MIN_ARC_LENGTH,
35
+ * MAX_ARC_LENGTH]`.
36
+ */
37
+ export interface SpinnerArcShapeVector {
38
+ /** Fraction of one arc cycle, 0..1. */
39
+ phase: number;
40
+ /** What happens here. */
41
+ rule: string;
42
+ }
43
+ /** The moments worth naming in one arc cycle. *
44
+ * CORE-ONLY: the arc is drawn per frame from `spinnerArc`, and a renderer can only show the RESULT — the browser suite asserts the drawn envelope and the round caps, which is the observable half
45
+ */
46
+ export declare const SPINNER_ARC_PHASE_VECTORS: ReadonlyArray<SpinnerArcShapeVector>;
47
+ /** One "is this constant what the C says" expectation. */
48
+ export interface SpinnerConstantVector {
49
+ /** The constant's name in the C. */
50
+ name: string;
51
+ /** Its value, as a multiple of pi where the C writes one. */
52
+ value: number;
53
+ /** Where it is defined and what the ports had instead. */
54
+ rule: string;
55
+ }
56
+ /**
57
+ * The `#define`s at adw-spinner-paintable.c:18-33 and adw-spinner.c:14-15.
58
+ *
59
+ * A constant table looks redundant next to the implementation until you read the
60
+ * `rule` column: five of these seven were WRONG or absent in a shipping port,
61
+ * and a table is what makes "the port picked its own number" fail a test rather
62
+ * than look like a design choice.
63
+ *
64
+ * CORE-ONLY: a table OF constants: what a renderer can show is the geometry they produce, which the browser suite asserts through SPINNER_GEOMETRY/SIZE_VECTORS
65
+ */
66
+ export declare const SPINNER_CONSTANT_VECTORS: ReadonlyArray<SpinnerConstantVector>;
@@ -113,6 +113,8 @@ export declare const SPLIT_BUTTON_DIRECTION_VECTORS: ReadonlyArray<SplitButtonDi
113
113
  * demonstrated OVERRIDE rather than an assertion. Holding both means a reader can
114
114
  * see the two values and the two selectors side by side, and a renderer that
115
115
  * reaches for the wrong one fails a test that names which widget it is drawing.
116
+ *
117
+ * CORE-ONLY: an internal step of a pipeline whose COMPOSED result is renderer-driven — driving it separately would assert the same thing twice (SPLIT_BUTTON_DIRECTION_VECTORS)
116
118
  */
117
119
  export declare const MENU_BUTTON_DIRECTION_VECTORS: ReadonlyArray<SplitButtonDirectionVector>;
118
120
  /** One `update_state` expectation. */
@@ -132,6 +134,8 @@ export interface SplitButtonRootStateVector {
132
134
  * `update_state` (adw-split-button.c:118-143) — an OR-fold of both halves onto
133
135
  * the root, which is what `splitbutton.flat:active/:checked` styles
134
136
  * (_buttons.scss:542-549).
137
+ *
138
+ * CORE-ONLY: GAP — two of its three axes are hardcoded in the renderer, so there is nothing to vary. Tracked in #1072
135
139
  */
136
140
  export declare const SPLIT_BUTTON_ROOT_STATE_VECTORS: ReadonlyArray<SplitButtonRootStateVector>;
137
141
  /** One `parseMenuEntries` expectation. */
@@ -1,4 +1,5 @@
1
- import type { AdwLengthUnit, AdwPackType, AdwTextDirection, NavigationActionResult, NavigationStackPlan, OverlaySplitViewLayout, SidebarWidthSpec, SplitViewPaneRect } from '../split-view.js';
1
+ import type { AdwLengthUnit } from '../length-unit.js';
2
+ import type { AdwPackType, AdwTextDirection, NavigationActionResult, NavigationStackPlan, OverlaySplitViewLayout, SidebarWidthSpec, SplitViewPaneRect } from '../split-view.js';
2
3
  /** One `adwLengthToPx` expectation. */
3
4
  export interface AdwLengthUnitVector {
4
5
  unit: AdwLengthUnit;
@@ -10,7 +11,9 @@ export interface AdwLengthUnitVector {
10
11
  /** Why this row exists. */
11
12
  rule: string;
12
13
  }
13
- /** `adw_length_unit_to_px` (adw-length-unit.c:72-81). */
14
+ /** `adw_length_unit_to_px` (adw-length-unit.c:72-81). *
15
+ * CORE-ONLY: an internal step of a pipeline whose COMPOSED result is renderer-driven — driving it separately would assert the same thing twice (SIDEBAR_BOUNDS_VECTORS, which both renderers drive)
16
+ */
14
17
  export declare const ADW_LENGTH_UNIT_VECTORS: ReadonlyArray<AdwLengthUnitVector>;
15
18
  /** One `glibClamp` expectation. */
16
19
  export interface GlibClampVector {
@@ -27,6 +30,8 @@ export interface GlibClampVector {
27
30
  * The inverted rows are the point: `Math.min(high, Math.max(low, x))` returns
28
31
  * `high` there, and `allocate_uncollapsed` reaches inverted bounds whenever the
29
32
  * content pane's own minimum leaves less room than `min-sidebar-width`.
33
+ *
34
+ * CORE-ONLY: GLib’s CLAMP itself — a primitive with no widget surface; every widget that reaches it does so through a table that IS driven
30
35
  */
31
36
  export declare const GLIB_CLAMP_VECTORS: ReadonlyArray<GlibClampVector>;
32
37
  /** One `resolveSidebarBounds` expectation. */
@@ -83,6 +88,8 @@ export interface NaturalSidebarWidthVector {
83
88
  /**
84
89
  * `measure_uncollapsed`'s sidebar estimate (adw-navigation-split-view.c:260-262,
85
90
  * adw-overlay-split-view.c:554-556) — the sidebar's OWN natural width is ignored.
91
+ *
92
+ * CORE-ONLY: an internal step of a pipeline whose COMPOSED result is renderer-driven — driving it separately would assert the same thing twice (SIDEBAR_WIDTH_VECTORS)
86
93
  */
87
94
  export declare const NATURAL_SIDEBAR_WIDTH_VECTORS: ReadonlyArray<NaturalSidebarWidthVector>;
88
95
  /** One `measureSplitViewHorizontal` expectation. */
@@ -103,6 +110,8 @@ export interface SplitViewMeasureVector {
103
110
  *
104
111
  * This is the container minimum neither renderer had — which is why in both of them
105
112
  * the content pane shrinks to nothing instead of the window refusing to get narrower.
113
+ *
114
+ * CORE-ONLY: the container minimum lands as `min-width: min-content` on the content pane, which is CSS’s own spelling of the same rule — there is no computed number of ours to compare. Asserted in the renderer as "the pane is not crushable" instead
106
115
  */
107
116
  export declare const SPLIT_VIEW_MEASURE_VECTORS: ReadonlyArray<SplitViewMeasureVector>;
108
117
  /** One `layoutNavigationSplitView` expectation. */
@@ -144,7 +153,9 @@ export interface TagsConflictVector {
144
153
  conflict: boolean;
145
154
  rule: string;
146
155
  }
147
- /** `tags_equal` (adw-navigation-split-view.c:413-429). */
156
+ /** `tags_equal` (adw-navigation-split-view.c:413-429). *
157
+ * CORE-ONLY: an internal step of a pipeline whose COMPOSED result is renderer-driven — driving it separately would assert the same thing twice (the tag guard, driven through NAVIGATION_ACTION_VECTORS and the refusal tests in both renderer suites)
158
+ */
148
159
  export declare const TAGS_CONFLICT_VECTORS: ReadonlyArray<TagsConflictVector>;
149
160
  /** One `resolveNavigationStack` expectation. */
150
161
  export interface NavigationStackVector {
@@ -290,6 +290,8 @@ export interface TabSuccessorVector {
290
290
  *
291
291
  * These are the same rules the end-to-end rows exercise, stated as pure inputs
292
292
  * so a failure names the RULE rather than the script that reached it.
293
+ *
294
+ * CORE-ONLY: an internal step of a pipeline whose COMPOSED result is renderer-driven — driving it separately would assert the same thing twice (TAB_VIEW_VECTORS)
293
295
  */
294
296
  export declare const TAB_SUCCESSOR_VECTORS: ReadonlyArray<TabSuccessorVector>;
295
297
  /** One `isDescendantOfPage` expectation. */
@@ -305,7 +307,9 @@ export interface TabDescendantVector {
305
307
  /** Whether the walk reaches the ancestor. */
306
308
  descendant: boolean;
307
309
  }
308
- /** `is_descendant_of` (adw-tab-view.c:1735-1742). */
310
+ /** `is_descendant_of` (adw-tab-view.c:1735-1742). *
311
+ * CORE-ONLY: an internal step of a pipeline whose COMPOSED result is renderer-driven — driving it separately would assert the same thing twice (TAB_VIEW_VECTORS)
312
+ */
309
313
  export declare const TAB_DESCENDANT_VECTORS: ReadonlyArray<TabDescendantVector>;
310
314
  /** One `tabsRevealed` expectation. */
311
315
  export interface TabsRevealedVector {
@@ -374,6 +378,8 @@ export interface TabTooltipVector {
374
378
  * `tabTooltipText` (`widgets/tab-view-state.ts`), so BOTH renderers consume
375
379
  * these rows today and neither is held to them. Both surfaces are readable from
376
380
  * their own suites, so wiring them is a loop, not new capability.
381
+ *
382
+ * CORE-ONLY: an internal step of a pipeline whose COMPOSED result is renderer-driven — driving it separately would assert the same thing twice (TAB_VIEW_VECTORS — both ports consume the derivation, which this header once denied)
377
383
  */
378
384
  export declare const TAB_TOOLTIP_VECTORS: ReadonlyArray<TabTooltipVector>;
379
385
  /** One `tabIconState` expectation. */
@@ -437,5 +443,7 @@ export interface TabPageDescriptorVector {
437
443
  * (adw-tab-view.c:3021) and its tooltip twin (:3064). The icon fields do NOT
438
444
  * coerce: "no icon" is a state `tabIconState` branches on, so `null` has to
439
445
  * survive.
446
+ *
447
+ * CORE-ONLY: GAP — a descriptor normaliser neither element routes its page input through. Tracked in #1072
440
448
  */
441
449
  export declare const TAB_PAGE_DESCRIPTOR_VECTORS: ReadonlyArray<TabPageDescriptorVector>;
@@ -1,59 +1,8 @@
1
- /**
2
- * `Adw.WrapBox:child-spacing` and `:line-spacing` defaults, in px.
3
- *
4
- * Both are `g_param_spec_int (…, 0, G_MAXINT, 0, …)` — adw-wrap-box.c:285-287
5
- * and :393-395. The NativeScript port defaulted BOTH to 6 DIPs, so identical
6
- * markup was looser on a phone than in the browser.
7
- */
8
- export declare const ADW_WRAP_BOX_DEFAULT_SPACING = 0;
9
- /**
10
- * `Adw.WrapBox:align` default (adw-wrap-box.c:335-337).
11
- *
12
- * Declared `g_param_spec_float (…, 0, 1, 0, …)`, so GObject validates an
13
- * out-of-range value back into `[0, 1]` on set.
14
- */
15
- export declare const ADW_WRAP_BOX_DEFAULT_ALIGN = 0;
16
- /** `Adw.WrapBox:justify` default — `ADW_JUSTIFY_NONE` (adw-wrap-box.c:364-366). */
17
- export declare const ADW_WRAP_BOX_DEFAULT_JUSTIFY = "none";
18
- /** `Adw.WrapBox:justify-last-line` default — `FALSE` (adw-wrap-box.c:379-381). */
19
- export declare const ADW_WRAP_BOX_DEFAULT_JUSTIFY_LAST_LINE = false;
20
- /** `AdwJustifyMode` — the three values of `Adw.WrapBox:justify`. */
21
- export type WrapBoxJustify = 'none' | 'fill' | 'spread';
22
- /** What a renderer has to do with a line's leftover space. */
23
- export interface WrapBoxLineLayout {
24
- /**
25
- * The justify mode that governs THIS line, after the last-line gate. It is
26
- * the widget's `justify` for every line except the final one, and for the
27
- * final one only when `justify-last-line` is set
28
- * (adw-wrap-layout.c:397-400, :705-706).
29
- */
30
- justify: WrapBoxJustify;
31
- /**
32
- * Whether the CHILDREN absorb the leftover (`allocated_size` grows to
33
- * `available_size`, adw-wrap-layout.c:336-341). CSS: `flex-grow` on the
34
- * items.
35
- */
36
- growChildren: boolean;
37
- /**
38
- * Whether the GAPS absorb the leftover — children keep `minimum_size` and
39
- * are spread apart by `size_delta` (adw-wrap-layout.c:338-339, :752-757).
40
- * CSS: `justify-content: space-between`.
41
- */
42
- growGaps: boolean;
43
- /**
44
- * The MAIN-axis offset factor applied to the whole line block when nothing
45
- * grows: `widget_offset += roundf (length_delta * align)`
46
- * (adw-wrap-layout.c:717-725). 0 packs the line at the start of the main
47
- * axis, 1 at its end. Meaningless — and reported as 0 — as soon as the line
48
- * is justified, because C only computes `length_delta` inside
49
- * `if (!justify_line)`.
50
- */
51
- align: number;
52
- }
1
+ import type { AdwWrapBoxJustify, AdwWrapPolicy, WrapBoxLineLayout } from '../wrap-box.js';
53
2
  /** One row of the decision table. */
54
3
  export interface WrapBoxLineVector {
55
4
  /** The widget's `justify` property. */
56
- justify: WrapBoxJustify;
5
+ justify: AdwWrapBoxJustify;
57
6
  /** The widget's `justify-last-line` property. */
58
7
  justifyLastLine: boolean;
59
8
  /** The widget's `align` property, already validated into `[0, 1]`. */
@@ -132,3 +81,105 @@ export interface WrapBoxSpacingNotifyVector {
132
81
  * `notify::child-spacing` for a value libadwaita had normalised away.
133
82
  */
134
83
  export declare const WRAP_BOX_SPACING_NOTIFY_VECTORS: ReadonlyArray<WrapBoxSpacingNotifyVector>;
84
+ /**
85
+ * Every `notify::` an `Adw.WrapBox` emits — the thirteen installed pspecs
86
+ * (adw-wrap-box.c:284-495) plus the overridden `orientation` (:497).
87
+ *
88
+ * The count is the assertion. C notifies on all fourteen; the browser port
89
+ * notified on TWO (`child-spacing`, `line-spacing`) and the NativeScript port on
90
+ * none, so a consumer binding to any other property was watching a signal that
91
+ * could not fire. A roster is the only shape that fails when a property is ADDED
92
+ * without its notification, which is how the first twelve went missing.
93
+ */
94
+ export declare const WRAP_BOX_NOTIFY_PROPERTIES: readonly string[];
95
+ /** One `wrap-policy` → child-shrink expectation. */
96
+ export interface WrapBoxPolicyVector {
97
+ /** The authored value. Anything not in the enum leaves the property at its default. */
98
+ value: unknown;
99
+ /** The stored policy. */
100
+ policy: AdwWrapPolicy;
101
+ /** The `flex-shrink` a child gets — `FlexboxLayout.setFlexShrink` on NativeScript. */
102
+ flexShrink: number;
103
+ /** The rule this row pins down. */
104
+ rule: string;
105
+ }
106
+ /**
107
+ * `Adw.WrapBox:wrap-policy` (adw-wrap-box.c:476-495).
108
+ *
109
+ * The default is `natural`, which is the RESTRICTIVE one: a line wraps as soon
110
+ * as the next child would not fit at its natural size. `minimum` packs harder by
111
+ * squeezing children down to their minimum first. Both renderers had neither, so
112
+ * they inherited whatever their flex container defaults to — and CSS defaults
113
+ * `flex-shrink` to 1, i.e. to `minimum`, the value libadwaita does NOT default to.
114
+ */
115
+ export declare const WRAP_BOX_POLICY_VECTORS: ReadonlyArray<WrapBoxPolicyVector>;
116
+ /** One length-unit conversion expectation. */
117
+ export interface WrapBoxLengthVector {
118
+ /** The property value, in `unit`. */
119
+ value: number;
120
+ /** The authored unit. Anything outside the enum falls back to the `px` default. */
121
+ unit: unknown;
122
+ /** The `gtk-xft-dpi` the renderer reports. */
123
+ dpi: number;
124
+ /** The resolved pixel length. */
125
+ px: number;
126
+ /** The rule this row pins down. */
127
+ rule: string;
128
+ }
129
+ /**
130
+ * `adw_length_unit_to_px` as the three wrap-box length properties reach it
131
+ * (adw-wrap-layout.c:554-565, :798-804).
132
+ *
133
+ * The wrap box defaults its units to `px` where the split views default to `sp`
134
+ * (adw-wrap-box.c:300-305) — the same helper, two different defaults, which is
135
+ * why the fallback is the caller's argument and not the helper's.
136
+ */
137
+ export declare const WRAP_BOX_LENGTH_VECTORS: ReadonlyArray<WrapBoxLengthVector>;
138
+ /** One `natural-line-length` normalisation expectation. */
139
+ export interface WrapBoxNaturalLengthVector {
140
+ /** The authored value. */
141
+ value: unknown;
142
+ /** The stored length, `-1` when unset. */
143
+ length: number;
144
+ /** The rule this row pins down. */
145
+ rule: string;
146
+ }
147
+ /**
148
+ * `Adw.WrapBox:natural-line-length` — `g_param_spec_int (…, -1, G_MAXINT, -1, …)`
149
+ * (adw-wrap-box.c:438-441).
150
+ *
151
+ * `-1` means UNSET, not "zero length", so it is the landing place for everything
152
+ * out of range: a GObject setter would have refused those and left the property
153
+ * where it was, and unset is where it was born.
154
+ */
155
+ export declare const WRAP_BOX_NATURAL_LENGTH_VECTORS: ReadonlyArray<WrapBoxNaturalLengthVector>;
156
+ /** One `insert_child_after` / `reorder_child_after` expectation. */
157
+ export interface WrapBoxChildOrderVector {
158
+ /** Which operation is being resolved. */
159
+ op: 'insert-after' | 'reorder-after';
160
+ /** The box's children before the call. */
161
+ children: readonly string[];
162
+ /** The child being placed. */
163
+ child: string;
164
+ /** The sibling to place it after, or `null` for the FIRST position. */
165
+ sibling: string | null;
166
+ /** The children afterwards, or `null` when the call is refused. */
167
+ result: readonly string[] | null;
168
+ /** The rule this row pins down. */
169
+ rule: string;
170
+ }
171
+ /**
172
+ * `adw_wrap_box_insert_child_after` (adw-wrap-box.c:1283-1300) and
173
+ * `adw_wrap_box_reorder_child_after` (:1315-1332), both of which delegate to
174
+ * `gtk_widget_insert_after (child, self, sibling)`.
175
+ *
176
+ * The counter-intuitive rule is the NULL sibling: it inserts at the FIRST
177
+ * position, not the last. Reading it as "append" is the obvious misreading and a
178
+ * silent one — the child lands somewhere plausible. Neither renderer had any of
179
+ * this API, so there was nothing to misread yet, which is the good time to pin it.
180
+ *
181
+ * The refusals are the C's `g_return_if_fail`s: an insert wants the child
182
+ * unparented, a reorder wants it already a child, the sibling must belong to this
183
+ * box, and `child == sibling` is an explicit early return in both (:1297, :1329).
184
+ */
185
+ export declare const WRAP_BOX_CHILD_ORDER_VECTORS: ReadonlyArray<WrapBoxChildOrderVector>;
@@ -0,0 +1,21 @@
1
+ /** `adw_lerp` (adw-animation-util.c:23-27) — `a * (1 - t) + b * t`. */
2
+ export declare function adwLerp(a: number, b: number, t: number): number;
3
+ /**
4
+ * The inverse: where `r` sits between `a` and `b`, as a 0..1 fraction.
5
+ *
6
+ * Not a libadwaita function — C writes the division inline — but it is the same
7
+ * expression at every call site, and naming it is what keeps the two directions
8
+ * from drifting apart.
9
+ */
10
+ export declare function inverseLerp(a: number, b: number, r: number): number;
11
+ /** `ease_out_cubic` (adw-easing.c) — `(t - 1)^3 + 1`. */
12
+ export declare function easeOutCubic(t: number): number;
13
+ /**
14
+ * `ease_in_out_sine` (adw-easing.c:276-281) — `-0.5 * (cos(pi * t) - 1)`, with
15
+ * the duration argument at its only used value, 1.
16
+ *
17
+ * This is the curve the spinner's arc breathes on, at BOTH ends: `get_arc_start`
18
+ * eases the extend phase and `get_arc_end` the contract phase
19
+ * (adw-spinner-paintable.c:121, :141).
20
+ */
21
+ export declare function easeInOutSine(t: number): number;
@@ -20,7 +20,7 @@ export { AdwToast, AdwToastQueue, DEFAULT_TOAST_TIMEOUT } from './toast.js';
20
20
  export type { AdwToastOptions, AdwToastQueueHandlers, AdwToastQueueOptions, ToastScheduler, ToastTimerHandle, } from './toast.js';
21
21
  export { AdwAlertResponses, BottomSheetPresentation, resolveBottomSheetClose } from './dialog.js';
22
22
  export type { AdwAlertResponse, AdwResponseAppearance, AdwResponseOptions, BottomSheetCloseOutcome, BottomSheetCloseSource, BottomSheetCloseState, BottomSheetPresentationListener, BottomSheetPresentationOptions, BottomSheetTeardownCallback, OrderedConfirmResponses, } from './dialog.js';
23
- export { ComboState, ExpanderState, SpinState, ToggleGroupState, normalizeComboOptions } from './rows.js';
23
+ export { ADW_COMBO_NO_SELECTION, ComboState, ExpanderState, SpinState, ToggleGroupState, normalizeComboOptions, } from './rows.js';
24
24
  export type { AdwComboOption, AdwComboOptionInput, ComboStateChange, ComboStateListener, ExpanderStateListener, SpinStateChange, SpinStateListener, ToggleGroupStateChange, ToggleGroupStateListener, } from './rows.js';
25
25
  export { glibClamp, gStrStrip, stringIsNotEmpty } from './glib.js';
26
26
  export { ViewStackState, normalizeIconName, resolvePageTitle } from './view-stack.js';
@@ -31,8 +31,13 @@ export { ADW_SIDEBAR_NO_SELECTION, SidebarState, adjustSidebarSelection, clampSi
31
31
  export type { AdwSidebarItemSpec, AdwSidebarMode, AdwSidebarSectionSpec, SidebarActivation, SidebarFlatItem, SidebarHeaderSpec, SidebarItemFilter, SidebarSelectionChange, SidebarStateListener, } from './sidebar.js';
32
32
  export { CAPS_LOCK_ICON_NAME, CAPS_LOCK_TOOLTIP, EMPTY_ANIMATION_DURATION_MS, ENTRY_ROW_APPLY_ICON_NAME, ENTRY_ROW_APPLY_TOOLTIP, ENTRY_ROW_EDIT_ICON_NAME, ENTRY_ROW_MAX_LENGTH_LIMIT, ENTRY_ROW_TITLE_SPACING, EntryRowState, PASSWORD_CONCEAL_ICON_NAME, PASSWORD_CONCEAL_LABEL, PASSWORD_REVEAL_ICON_NAME, PASSWORD_REVEAL_LABEL, PasswordEntryRowState, clampEntryText, entryTextLength, } from './entry-row.js';
33
33
  export type { EntryRowActivation, EntryRowRenderState, EntryRowStateListener, PasswordEntryRowRenderState, PasswordEntryRowStateListener, } from './entry-row.js';
34
- export { ADW_SWIPE_BORDER, DEFAULT_DPI, DEFAULT_MAX_SIDEBAR_WIDTH, DEFAULT_MIN_SIDEBAR_WIDTH, DEFAULT_SIDEBAR_WIDTH_FRACTION, DEFAULT_SIDEBAR_WIDTH_UNIT, INSTANT_SPLIT_VIEW_ANIMATOR, NAVIGATION_SPLIT_VIEW_CRITICALS, NavigationSplitViewState, OverlaySplitViewState, adwLengthToPx, isSidebarAtVisualStart, layoutNavigationSplitView, layoutOverlaySplitView, measureSplitViewHorizontal, resolveNaturalSidebarWidth, resolveNavigationAction, resolveNavigationSidebarWidth, resolveNavigationStack, resolveOverlaySidebarWidth, resolveSidebarBounds, resolveSwipeArea, resolveSwipeRelease, resolveSwipeSnapPoints, resolveSwipeStart, swipeCancelProgress, tagsConflict, } from './split-view.js';
35
- export type { AdwLengthUnit, AdwPackType, AdwTextDirection, NavigationActionInput, NavigationActionResult, NavigationPageRef, NavigationSplitViewChange, NavigationSplitViewHandlers, NavigationSplitViewLayout, NavigationSplitViewListener, NavigationSplitViewOptions, NavigationSplitViewProperty, NavigationStackPlan, OverlaySplitViewChange, OverlaySplitViewLayout, OverlaySplitViewListener, OverlaySplitViewOptions, OverlaySplitViewProperty, SidebarBounds, SidebarWidthInput, SidebarWidthSpec, SplitViewAnimation, SplitViewAnimationRequest, SplitViewAnimator, SplitViewMeasureInput, SplitViewPane, SplitViewPaneRect, SwipeReleasePlan, } from './split-view.js';
34
+ export { adwLerp, easeInOutSine, easeOutCubic, inverseLerp } from './easing.js';
35
+ export { ADW_SPINNER_CYCLES_PER_LOOP, ADW_SPINNER_CYCLE_LENGTH, ADW_SPINNER_CONTRACT_DISTANCE, ADW_SPINNER_EXTEND_DISTANCE, ADW_SPINNER_IDLE_DISTANCE, ADW_SPINNER_MAX_ARC_LENGTH, ADW_SPINNER_MIN_ARC_LENGTH, ADW_SPINNER_N_CYCLES, ADW_SPINNER_OVERLAP_DISTANCE, ADW_SPINNER_SPIN_DURATION_MS, ADW_SPINNER_START_ANGLE, ADW_SPINNER_STILL_PROGRESS, ADW_SPINNER_TRACK_OPACITY, normalizeSpinnerAngle, spinnerArc, spinnerArcEnd, spinnerArcStart, spinnerProgressAt, } from './spinner.js';
36
+ export type { SpinnerArc } from './spinner.js';
37
+ export { ADW_LENGTH_UNITS, DEFAULT_DPI, adwLengthToPx, normalizeLengthUnit } from './length-unit.js';
38
+ export type { AdwLengthUnit } from './length-unit.js';
39
+ export { ADW_SWIPE_BORDER, DEFAULT_MAX_SIDEBAR_WIDTH, DEFAULT_MIN_SIDEBAR_WIDTH, DEFAULT_SIDEBAR_WIDTH_FRACTION, DEFAULT_SIDEBAR_WIDTH_UNIT, INSTANT_SPLIT_VIEW_ANIMATOR, NAVIGATION_SPLIT_VIEW_CRITICALS, NavigationSplitViewState, OverlaySplitViewState, isSidebarAtVisualStart, layoutNavigationSplitView, layoutOverlaySplitView, measureSplitViewHorizontal, resolveNaturalSidebarWidth, resolveNavigationAction, resolveNavigationSidebarWidth, resolveNavigationStack, resolveOverlaySidebarWidth, resolveSidebarBounds, resolveSwipeArea, resolveSwipeRelease, resolveSwipeSnapPoints, resolveSwipeStart, swipeCancelProgress, tagsConflict, } from './split-view.js';
40
+ export type { AdwPackType, AdwTextDirection, NavigationActionInput, NavigationActionResult, NavigationPageRef, NavigationSplitViewChange, NavigationSplitViewHandlers, NavigationSplitViewLayout, NavigationSplitViewListener, NavigationSplitViewOptions, NavigationSplitViewProperty, NavigationStackPlan, OverlaySplitViewChange, OverlaySplitViewLayout, OverlaySplitViewListener, OverlaySplitViewOptions, OverlaySplitViewProperty, SidebarBounds, SidebarWidthInput, SidebarWidthSpec, SplitViewAnimation, SplitViewAnimationRequest, SplitViewAnimator, SplitViewMeasureInput, SplitViewPane, SplitViewPaneRect, SwipeReleasePlan, } from './split-view.js';
36
41
  export { DEFAULT_DROPDOWN_TOOLTIP, SPLIT_BUTTON_DISABLED_OPACITY, SplitButtonState, isSplitButtonDirection, menuButtonArrowIcon, menuButtonPopupDirection, parseMenuEntries, resolveDropdownTooltip, splitButtonArrowIcon, splitButtonPopupDirection, splitButtonRootState, splitButtonStyleClasses, } from './split-button.js';
37
42
  export type { AdwArrowIcon, AdwMenuEntry, SplitButtonChange, SplitButtonContentMode, SplitButtonDirection, SplitButtonHalfState, SplitButtonListener, SplitButtonProperty, SplitButtonStyleClass, } from './split-button.js';
38
43
  export { DEFAULT_INDICATOR_DESCRIPTION_STRINGS, INLINE_VIEW_SWITCHER_DISPLAY_MODES, VIEW_SWITCHER_BADGE_LIMIT, VIEW_SWITCHER_DRAG_SWITCH_DELAY, VIEW_SWITCHER_FALLBACK_ICON, VIEW_SWITCHER_NO_SELECTION, VIEW_SWITCHER_POLICIES, ViewSwitcherBarState, ViewSwitcherDragSwitch, ViewSwitcherState, buildInlineToggles, buildViewSwitcherButtons, createViewSwitcherPage, inlineToggleTooltip, isInlineViewSwitcherDisplayMode, isViewSwitcherButtonVisible, isViewSwitcherPolicy, pageIndexForToggle, shouldRevealViewSwitcherBar, stripMnemonic, toggleIndexForPage, viewSwitcherBadgeLabel, viewSwitcherButtonOrientation, viewSwitcherIconName, viewSwitcherIndicatorDescription, viewSwitcherLabel, viewSwitcherPageFromStackPage, viewSwitcherPagesFromStack, } from './view-switcher.js';
@@ -47,3 +52,5 @@ export { ADW_CLAMP_DEFAULTS, ADW_CLAMP_SIZE_CLASSES, ADW_SPINNER_MAX_SIZE, ADW_S
47
52
  export type { AdwClampSizeClass, AdwMeasurement, AdwToolbarStyle, ClampAllocation, ClampParams, ClampThresholds, SpinnerGeometry, ToolbarViewAllocateInput, ToolbarViewAllocation, ToolbarViewClassInput, ToolbarViewClasses, ToolbarViewContentForSize, ToolbarViewContentForSizeInput, ToolbarViewMeasureInput, } from './chrome.js';
48
53
  export { POPOVER_ITEM_RADIUS, POPOVER_MENU_PADDING, POPOVER_PADDING, POPOVER_RADIUS, PopoverState, resolvePopoverKey, } from './popover.js';
49
54
  export type { PopoverKeyAction, PopoverKeyContext, PopoverKeyResolution, PopoverStateChange, PopoverStateListener, } from './popover.js';
55
+ export { ADW_WRAP_BOX_DEFAULT_ALIGN, ADW_WRAP_BOX_DEFAULT_JUSTIFY, ADW_WRAP_BOX_DEFAULT_JUSTIFY_LAST_LINE, ADW_WRAP_BOX_DEFAULT_LENGTH_UNIT, ADW_WRAP_BOX_DEFAULT_PACK_DIRECTION, ADW_WRAP_BOX_DEFAULT_SPACING, ADW_WRAP_BOX_DEFAULT_WRAP_POLICY, ADW_WRAP_BOX_JUSTIFY_MODES, ADW_WRAP_BOX_NATURAL_LINE_LENGTH_UNSET, ADW_WRAP_BOX_PACK_DIRECTIONS, ADW_WRAP_POLICIES, normalizeNaturalLineLength, normalizeWrapBoxAlign, normalizeWrapBoxJustify, normalizeWrapBoxLengthUnit, normalizeWrapBoxPackDirection, normalizeWrapBoxSpacing, normalizeWrapPolicy, resolveWrapBoxChildOrder, resolveWrapBoxLine, wrapBoxLengthToPx, wrapPolicyFlexShrink, } from './wrap-box.js';
56
+ export type { AdwWrapBoxJustify, AdwWrapBoxOrientation, AdwWrapBoxPackDirection, AdwWrapPolicy, WrapBoxChildOrderOp, WrapBoxLineLayout, } from './wrap-box.js';
@@ -0,0 +1,24 @@
1
+ /** `AdwLengthUnit` — the unit a scale-aware length is written in. */
2
+ export type AdwLengthUnit = 'px' | 'pt' | 'sp';
3
+ /** The three units, for validating an attribute against the C enum. */
4
+ export declare const ADW_LENGTH_UNITS: readonly AdwLengthUnit[];
5
+ /** The dpi `adw_length_unit_to_px` falls back to when `gtk-xft-dpi` is unset. */
6
+ export declare const DEFAULT_DPI = 96;
7
+ /**
8
+ * `adw_length_unit_to_px` (adw-length-unit.c:57-82) — convert `value` to pixels.
9
+ *
10
+ * `pt` and `sp` both scale with the text-scale factor, which GTK reads from
11
+ * `gtk-xft-dpi`; a renderer that has no such setting passes the default 96, where
12
+ * `sp` is a pixel passthrough and `pt` is the familiar 4/3 ratio.
13
+ */
14
+ export declare function adwLengthToPx(unit: AdwLengthUnit, value: number, dpi?: number): number;
15
+ /**
16
+ * An authored unit → the enum value, or the caller's default.
17
+ *
18
+ * A GObject enum property REJECTS an out-of-range value and keeps what it had;
19
+ * a renderer reading an HTML attribute or an XML layout has no such gate, so the
20
+ * unusable value has to land somewhere deliberate. `fallback` is the property's
21
+ * own default, which differs between the widgets that use this vocabulary — the
22
+ * split views default to `sp`, the wrap box to `px`.
23
+ */
24
+ export declare function normalizeLengthUnit(value: unknown, fallback: AdwLengthUnit): AdwLengthUnit;
@@ -55,9 +55,24 @@ export type AdwComboOptionInput = string | {
55
55
  * reached for.
56
56
  */
57
57
  export declare function normalizeComboOptions(raw: ReadonlyArray<AdwComboOptionInput> | null | undefined): AdwComboOption[];
58
+ /**
59
+ * The "no item is selected" index — the TS mirror of `GTK_INVALID_LIST_POSITION`
60
+ * (`AdwComboRow:selected`'s default and empty value, adw-combo-row.c:593-596,
61
+ * :809-810).
62
+ *
63
+ * libadwaita spells it `G_MAXUINT` because the property is a `guint`; `-1` is the
64
+ * idiomatic TS sentinel and the spelling {@link ADW_SIDEBAR_NO_SELECTION} already
65
+ * uses for the same GTK constant.
66
+ *
67
+ * It exists because an EMPTY model and a model whose first item happens to have
68
+ * an empty label were previously indistinguishable: both reported index 0 with
69
+ * `selectedValue === ''`. A renderer that wants to draw a placeholder had nothing
70
+ * to test.
71
+ */
72
+ export declare const ADW_COMBO_NO_SELECTION = -1;
58
73
  /** Payload of a {@link ComboState} change. */
59
74
  export interface ComboStateChange {
60
- /** The (new) selected index. */
75
+ /** The (new) selected index, or {@link ADW_COMBO_NO_SELECTION}. */
61
76
  selected: number;
62
77
  /** The selected option's `value` (or `''` when out of range). */
63
78
  value: string;
@@ -87,14 +102,40 @@ export declare class ComboState {
87
102
  /** The selectable options. */
88
103
  get options(): AdwComboOption[];
89
104
  /**
90
- * Replace the options. Resets the selection to 0 when the current index no
91
- * longer fits (mirroring `Adw.ComboRow`), then notifies (`interactive: false`)
92
- * so the renderer re-syncs the inline value label (the label may change even at
93
- * the same index).
105
+ * Replace the options, then notify (`interactive: false`) so the renderer
106
+ * re-syncs the inline value label — which may change even at an unchanged
107
+ * index, because the label is read out of the MODEL.
108
+ *
109
+ * Replacing the model re-runs autoselect, so an index the new one does not
110
+ * have falls back to 0 — including the sentinel, which is how a row recovers
111
+ * a selection when its model grows. An EMPTY model has no 0 to fall back to
112
+ * and lands on {@link ADW_COMBO_NO_SELECTION}; that case is the one both
113
+ * ports used to spell as index 0.
114
+ *
115
+ * The check is `hasIndex`, not `selected >= length`: the sentinel is BELOW
116
+ * the range, so the one-sided comparison left a `-1` in place and a model
117
+ * that had been emptied and refilled came back with nothing selected.
94
118
  */
95
119
  setOptions(options: AdwComboOption[]): void;
96
- /** The selected option index (may sit past the options length — {@link selectedValue} then is `''`). */
120
+ /**
121
+ * The selected option index, or {@link ADW_COMBO_NO_SELECTION}.
122
+ *
123
+ * May also sit PAST the options length: {@link setSelectedIndex} is
124
+ * deliberately permissive, mirroring a `guint` property that takes any
125
+ * position. {@link selectedValue} reads `''` in both cases, which is why the
126
+ * sentinel is what distinguishes "nothing selected" from "an empty label".
127
+ */
97
128
  get selectedIndex(): number;
129
+ /**
130
+ * Whether the row presents itself as a CHOOSER — `model_changed`
131
+ * (adw-combo-row.c:187-195) makes the arrow visible and the row activatable
132
+ * on `n_items > 1` and hides both otherwise.
133
+ *
134
+ * One item or none is not a choice, so `Adw.ComboRow` stops looking like one:
135
+ * no chevron, and tapping does nothing. Neither port did this, so a
136
+ * single-option row showed its arrow and opened a chooser with one entry.
137
+ */
138
+ get presentsChooser(): boolean;
98
139
  /** Programmatic index set — notifies `interactive: false`. Returns whether it changed. */
99
140
  setSelectedIndex(index: number): boolean;
100
141
  /** The selected option's `value`, or `''` when out of range. */