@gjsify/adwaita-nativescript 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/index.js +1 -1
- package/lib/esm/widgets/adw-action-row.js +1 -1
- package/lib/esm/widgets/adw-avatar.js +1 -1
- package/lib/esm/widgets/adw-banner.js +1 -1
- package/lib/esm/widgets/adw-bottom-sheet.js +1 -1
- package/lib/esm/widgets/adw-button-content.js +1 -1
- package/lib/esm/widgets/adw-button-row.js +1 -1
- package/lib/esm/widgets/adw-carousel.js +1 -1
- package/lib/esm/widgets/adw-clamp.js +1 -1
- package/lib/esm/widgets/adw-combo-row.js +1 -1
- package/lib/esm/widgets/adw-data-grid.js +1 -0
- package/lib/esm/widgets/adw-drop-down.js +1 -0
- package/lib/esm/widgets/adw-entry-row.js +1 -1
- package/lib/esm/widgets/adw-entry.js +1 -0
- package/lib/esm/widgets/adw-expander-row.js +1 -1
- package/lib/esm/widgets/adw-header-bar.js +1 -1
- package/lib/esm/widgets/adw-inline-view-switcher.js +1 -1
- package/lib/esm/widgets/adw-navigation-split-view.js +1 -1
- package/lib/esm/widgets/adw-navigation-view.js +1 -1
- package/lib/esm/widgets/adw-overlay-split-view.js +1 -1
- package/lib/esm/widgets/adw-password-entry-row.js +1 -1
- package/lib/esm/widgets/adw-preferences-dialog.js +1 -1
- package/lib/esm/widgets/adw-preferences-group.js +1 -1
- package/lib/esm/widgets/adw-preferences-page.js +1 -1
- package/lib/esm/widgets/adw-sidebar.js +1 -1
- package/lib/esm/widgets/adw-spin-row.js +1 -1
- package/lib/esm/widgets/adw-spinner.js +1 -1
- package/lib/esm/widgets/adw-split-button.js +1 -1
- package/lib/esm/widgets/adw-status-page.js +1 -1
- package/lib/esm/widgets/adw-switch-row.js +1 -1
- package/lib/esm/widgets/adw-tab-view.js +1 -1
- package/lib/esm/widgets/adw-toolbar-view.js +1 -1
- package/lib/esm/widgets/adw-view-stack.js +1 -1
- package/lib/esm/widgets/adw-view-switcher-bar.js +1 -1
- package/lib/esm/widgets/adw-window-title.js +1 -1
- package/lib/esm/widgets/adw-wrap-box.js +1 -1
- package/lib/esm/widgets/avatar-color.js +1 -0
- package/lib/esm/widgets/bottom-sheet-state.js +1 -0
- package/lib/esm/widgets/button-content.js +1 -0
- package/lib/esm/widgets/carousel-state.js +1 -0
- package/lib/esm/widgets/chrome.js +1 -0
- package/lib/esm/widgets/data-grid-model.js +1 -0
- package/lib/esm/widgets/entry-row-view.js +1 -0
- package/lib/esm/widgets/icon-path.js +2 -2
- package/lib/esm/widgets/icons.ios.js +1 -0
- package/lib/esm/widgets/index.js +1 -1
- package/lib/esm/widgets/navigation-stack.js +1 -0
- package/lib/esm/widgets/preferences-group-state.js +1 -0
- package/lib/esm/widgets/preferences-search.js +1 -0
- package/lib/esm/widgets/row-state.js +1 -0
- package/lib/esm/widgets/sidebar-model.js +1 -0
- package/lib/esm/widgets/split-button.js +1 -0
- package/lib/esm/widgets/split-view-base.js +1 -1
- package/lib/esm/widgets/split-view-state.js +1 -0
- package/lib/esm/widgets/split-view-width.js +1 -0
- package/lib/esm/widgets/status-page-content.js +1 -0
- package/lib/esm/widgets/svg-path.js +2 -0
- package/lib/esm/widgets/tab-view-state.js +1 -0
- package/lib/esm/widgets/view-stack-state.js +1 -0
- package/lib/esm/widgets/view-switcher-base.js +1 -1
- package/lib/esm/widgets/view-switcher-model.js +1 -0
- package/lib/esm/widgets/wrap-box-layout.js +1 -0
- package/lib/types/banner.spec.d.ts +2 -0
- package/lib/types/bottom-sheet.spec.d.ts +2 -0
- package/lib/types/button-content.spec.d.ts +2 -0
- package/lib/types/carousel.spec.d.ts +1 -0
- package/lib/types/chrome.spec.d.ts +2 -0
- package/lib/types/data-grid.spec.d.ts +2 -0
- package/lib/types/drop-down.spec.d.ts +2 -0
- package/lib/types/entry-rows.spec.d.ts +2 -0
- package/lib/types/entry.spec.d.ts +2 -0
- package/lib/types/index.d.ts +2 -2
- package/lib/types/navigation-view.spec.d.ts +2 -0
- package/lib/types/preferences.spec.d.ts +2 -0
- package/lib/types/row-state.spec.d.ts +2 -0
- package/lib/types/sidebar.spec.d.ts +1 -0
- package/lib/types/split-button.spec.d.ts +1 -0
- package/lib/types/split-view-state.spec.d.ts +2 -0
- package/lib/types/split-view-width.spec.d.ts +2 -0
- package/lib/types/status-page.spec.d.ts +2 -0
- package/lib/types/svg-path.spec.d.ts +2 -0
- package/lib/types/tab-view.spec.d.ts +2 -0
- package/lib/types/view-stack.spec.d.ts +2 -0
- package/lib/types/view-switcher.spec.d.ts +1 -0
- package/lib/types/widgets/adw-action-row.d.ts +63 -7
- package/lib/types/widgets/adw-avatar.d.ts +2 -7
- package/lib/types/widgets/adw-banner.d.ts +26 -7
- package/lib/types/widgets/adw-bottom-sheet.d.ts +29 -11
- package/lib/types/widgets/adw-button-content.d.ts +41 -6
- package/lib/types/widgets/adw-button-row.d.ts +31 -9
- package/lib/types/widgets/adw-carousel.d.ts +70 -15
- package/lib/types/widgets/adw-clamp.d.ts +21 -4
- package/lib/types/widgets/adw-combo-row.d.ts +9 -0
- package/lib/types/widgets/adw-data-grid.d.ts +73 -0
- package/lib/types/widgets/adw-drop-down.d.ts +45 -0
- package/lib/types/widgets/adw-entry-row.d.ts +98 -2
- package/lib/types/widgets/adw-entry.d.ts +43 -0
- package/lib/types/widgets/adw-expander-row.d.ts +3 -0
- package/lib/types/widgets/adw-header-bar.d.ts +11 -2
- package/lib/types/widgets/adw-inline-view-switcher.d.ts +26 -0
- package/lib/types/widgets/adw-navigation-split-view.d.ts +23 -1
- package/lib/types/widgets/adw-navigation-view.d.ts +71 -16
- package/lib/types/widgets/adw-overlay-split-view.d.ts +29 -2
- package/lib/types/widgets/adw-password-entry-row.d.ts +33 -3
- package/lib/types/widgets/adw-preferences-dialog.d.ts +18 -0
- package/lib/types/widgets/adw-preferences-group.d.ts +56 -8
- package/lib/types/widgets/adw-preferences-page.d.ts +32 -1
- package/lib/types/widgets/adw-sidebar.d.ts +49 -7
- package/lib/types/widgets/adw-spinner.d.ts +22 -6
- package/lib/types/widgets/adw-split-button.d.ts +48 -13
- package/lib/types/widgets/adw-status-page.d.ts +5 -10
- package/lib/types/widgets/adw-switch-row.d.ts +21 -1
- package/lib/types/widgets/adw-tab-view.d.ts +129 -15
- package/lib/types/widgets/adw-toolbar-view.d.ts +39 -0
- package/lib/types/widgets/adw-view-stack.d.ts +30 -27
- package/lib/types/widgets/adw-view-switcher-bar.d.ts +22 -10
- package/lib/types/widgets/adw-window-title.d.ts +12 -8
- package/lib/types/widgets/adw-wrap-box.d.ts +93 -7
- package/lib/types/widgets/avatar-color.d.ts +14 -0
- package/lib/types/widgets/bottom-sheet-state.d.ts +73 -0
- package/lib/types/widgets/button-content.d.ts +43 -0
- package/lib/types/widgets/carousel-state.d.ts +85 -0
- package/lib/types/widgets/chrome.d.ts +161 -0
- package/lib/types/widgets/data-grid-model.d.ts +104 -0
- package/lib/types/widgets/entry-row-view.d.ts +88 -0
- package/lib/types/widgets/icon-path.d.ts +20 -0
- package/lib/types/widgets/icons.ios.d.ts +13 -0
- package/lib/types/widgets/index.d.ts +20 -5
- package/lib/types/widgets/navigation-stack.d.ts +153 -0
- package/lib/types/widgets/preferences-group-state.d.ts +52 -0
- package/lib/types/widgets/preferences-search.d.ts +68 -0
- package/lib/types/widgets/row-state.d.ts +71 -0
- package/lib/types/widgets/sidebar-model.d.ts +18 -0
- package/lib/types/widgets/split-button.d.ts +55 -0
- package/lib/types/widgets/split-view-base.d.ts +72 -12
- package/lib/types/widgets/split-view-state.d.ts +228 -0
- package/lib/types/widgets/split-view-width.d.ts +76 -0
- package/lib/types/widgets/status-page-content.d.ts +23 -0
- package/lib/types/widgets/svg-path.d.ts +28 -0
- package/lib/types/widgets/tab-view-state.d.ts +74 -0
- package/lib/types/widgets/view-stack-state.d.ts +35 -0
- package/lib/types/widgets/view-switcher-base.d.ts +75 -33
- package/lib/types/widgets/view-switcher-model.d.ts +114 -0
- package/lib/types/widgets/wrap-box-layout.d.ts +97 -0
- package/lib/types/wrap-box.spec.d.ts +2 -0
- package/package.json +7 -7
- package/src/theme/adwaita.css +413 -8
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import type { View } from '@nativescript/core';
|
|
2
|
+
import { ViewSwitcherBarState, ViewSwitcherState } from '@gjsify/adwaita-core';
|
|
3
|
+
import type { AdwViewSwitcherPageInit, ViewSwitcherStateChange } from '@gjsify/adwaita-core';
|
|
4
|
+
/**
|
|
5
|
+
* One page registered with a view switcher.
|
|
6
|
+
*
|
|
7
|
+
* Mirrors `AdwViewStackPage`'s properties with their C defaults. `title` and
|
|
8
|
+
* `icon` are NULLABLE on purpose: a page with neither renders no button at all
|
|
9
|
+
* (adw-view-switcher.c:178), and once an absent title has been flattened to `''`
|
|
10
|
+
* that rule is no longer expressible — which is why the old shape, with a
|
|
11
|
+
* required `title: string`, could not implement it.
|
|
12
|
+
*
|
|
13
|
+
* `icon` is an Adwaita symbolic SVG DOCUMENT here, not a GTK icon name: `AdwIcon`
|
|
14
|
+
* rasterises the path data natively. The core treats the field as an opaque
|
|
15
|
+
* handle and only ever interprets "absent or empty"; {@link nsIconSvg} resolves
|
|
16
|
+
* the fallback sentinel it hands back.
|
|
17
|
+
*/
|
|
18
|
+
export interface AdwViewPage {
|
|
19
|
+
/**
|
|
20
|
+
* The switcher button label. ABSENT means the page has none — which is C's
|
|
21
|
+
* NULL, and the state the button-visibility rule turns on. Spelled as an
|
|
22
|
+
* optional `string` rather than `string | null` so the existing consumers
|
|
23
|
+
* that pass a plain `string` keep type-checking unchanged.
|
|
24
|
+
*/
|
|
25
|
+
title?: string;
|
|
26
|
+
/** The page content view, shown when this page is selected. */
|
|
27
|
+
content: View;
|
|
28
|
+
/** Adwaita symbolic SVG shown on the switcher button; absent means none. */
|
|
29
|
+
icon?: string;
|
|
30
|
+
/** Stable id used by `visible-child-name`; defaults to the page's position. */
|
|
31
|
+
name?: string;
|
|
32
|
+
/** `AdwViewStackPage:visible` — default `true`. */
|
|
33
|
+
visible?: boolean;
|
|
34
|
+
/** `AdwViewStackPage:use-underline` — an `_` in the title marks a mnemonic. */
|
|
35
|
+
useUnderline?: boolean;
|
|
36
|
+
/** `AdwViewStackPage:badge-number` — default `0`. */
|
|
37
|
+
badgeNumber?: number;
|
|
38
|
+
/** `AdwViewStackPage:needs-attention` — default `false`. */
|
|
39
|
+
needsAttention?: boolean;
|
|
40
|
+
}
|
|
41
|
+
/** The two `View.visibility` values a stacked page ever takes. */
|
|
42
|
+
export type NsPageVisibility = 'visible' | 'collapse';
|
|
43
|
+
/** The selection + page model a switcher delegates to. */
|
|
44
|
+
export declare function createViewSwitcherState(): ViewSwitcherState;
|
|
45
|
+
/** The reveal state machine an `AdwViewSwitcherBar` delegates to. */
|
|
46
|
+
export declare function createViewSwitcherBarState(): ViewSwitcherBarState;
|
|
47
|
+
/**
|
|
48
|
+
* Project one NS page onto the core's page init.
|
|
49
|
+
*
|
|
50
|
+
* A page without an explicit `name` gets its POSITION as the name — the NS API
|
|
51
|
+
* has always been positional (`setViews` takes an array), and a stable id is
|
|
52
|
+
* what the name-preserving rebuild needs to keep the selected page selected.
|
|
53
|
+
*/
|
|
54
|
+
export declare function viewSwitcherPageSpec(page: AdwViewPage, index: number): AdwViewSwitcherPageInit;
|
|
55
|
+
/** {@link viewSwitcherPageSpec} over a whole page list. */
|
|
56
|
+
export declare function viewSwitcherPageSpecs(pages: readonly AdwViewPage[]): AdwViewSwitcherPageInit[];
|
|
57
|
+
/**
|
|
58
|
+
* Resolve the core's icon slot to something `AdwIcon` can rasterise.
|
|
59
|
+
*
|
|
60
|
+
* The core substitutes the NAME `image-missing` for an absent icon
|
|
61
|
+
* (adw-view-switcher-button.c:405). On the browser side that name becomes a CSS
|
|
62
|
+
* mask class; here it has to become the actual symbolic document, so the
|
|
63
|
+
* sentinel is swapped for the vendored `image-missing-symbolic` SVG. Anything
|
|
64
|
+
* else is already an SVG and passes through.
|
|
65
|
+
*/
|
|
66
|
+
export declare function nsIconSvg(iconName: string): string;
|
|
67
|
+
/**
|
|
68
|
+
* The `visibility` each page's content view must carry for the current
|
|
69
|
+
* selection, in page order. Exactly one entry is `'visible'` — none when nothing
|
|
70
|
+
* is selected, which is a real state here (an empty switcher, or every page
|
|
71
|
+
* hidden).
|
|
72
|
+
*/
|
|
73
|
+
export declare function pageVisibilities(pages: readonly AdwViewPage[], selected: number): NsPageVisibility[];
|
|
74
|
+
/** Push {@link pageVisibilities} onto the real content views. */
|
|
75
|
+
export declare function applyViewSwitcherVisibility(pages: readonly AdwViewPage[], selected: number): void;
|
|
76
|
+
/** Which switcher is asking — the two apply different visibility rules. */
|
|
77
|
+
export type ViewSwitcherKind = 'switcher' | 'inline';
|
|
78
|
+
/**
|
|
79
|
+
* Whether a page gets a button/toggle at all.
|
|
80
|
+
*
|
|
81
|
+
* The two switchers genuinely differ, and the difference is easy to miss because
|
|
82
|
+
* only one of them is documented where you would look:
|
|
83
|
+
*
|
|
84
|
+
* - `AdwViewSwitcher` needs a title or an icon ON TOP OF `visible` —
|
|
85
|
+
* `gtk_widget_set_visible (button, visible && (title != NULL || icon_name !=
|
|
86
|
+
* NULL))` (adw-view-switcher.c:178).
|
|
87
|
+
* - `AdwInlineViewSwitcher` does not. `populate_group` gates on `visible` alone
|
|
88
|
+
* (adw-inline-view-switcher.c:370-378), so a page with neither still gets an
|
|
89
|
+
* empty toggle.
|
|
90
|
+
*
|
|
91
|
+
* The inline widget inherited the stricter rule and silently dropped toggles
|
|
92
|
+
* libadwaita draws. `@gjsify/adwaita-core` had spelled this out in
|
|
93
|
+
* `buildInlineToggles`' doc and pinned it in `INLINE_TOGGLE_VECTORS` the whole
|
|
94
|
+
* time — the rule just lived in a class that `extends GridLayout`, which no
|
|
95
|
+
* spec can import, so nothing could reach it to check. That is why it is here
|
|
96
|
+
* and not there.
|
|
97
|
+
*/
|
|
98
|
+
export declare function switcherButtonVisible(kind: ViewSwitcherKind, modelVisible: boolean, pageVisible: boolean): boolean;
|
|
99
|
+
/** The data half of the `notify::selected` event (minus NS's `eventName`/`object`). */
|
|
100
|
+
export interface ViewSwitcherNotifyPayload {
|
|
101
|
+
/** The newly-selected page index, `-1` when nothing is selected. */
|
|
102
|
+
selected: number;
|
|
103
|
+
/** Its name, `''` when nothing is selected. */
|
|
104
|
+
name: string;
|
|
105
|
+
/** Its painted label, `''` when nothing is selected. */
|
|
106
|
+
title: string;
|
|
107
|
+
/** `false` for an auto-pick (a rebuild, a visibility flip), `true` for a tap. */
|
|
108
|
+
interactive: boolean;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Project a core change onto the event payload. A function rather than a spread
|
|
112
|
+
* so no live model object escapes into an event a consumer might hold on to.
|
|
113
|
+
*/
|
|
114
|
+
export declare function viewSwitcherNotifyPayload(change: ViewSwitcherStateChange): ViewSwitcherNotifyPayload;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { normalizeWrapBoxSpacing, type AdwWrapBoxJustify, type AdwWrapBoxOrientation, type AdwWrapBoxPackDirection, type AdwWrapPolicy } from '@gjsify/adwaita-core';
|
|
2
|
+
export { normalizeWrapBoxSpacing };
|
|
3
|
+
/**
|
|
4
|
+
* `Adw.WrapBox:child-spacing` / `:line-spacing` default, in DIPs.
|
|
5
|
+
*
|
|
6
|
+
* Both are `g_param_spec_int (…, 0, G_MAXINT, 0, …)` — adw-wrap-box.c:285-287
|
|
7
|
+
* and :393-395. The port used to default both to 6, so identical markup was
|
|
8
|
+
* looser on a phone than in the browser and an EMPTY wrap box was already 12
|
|
9
|
+
* DIPs tall.
|
|
10
|
+
*/
|
|
11
|
+
export declare const DEFAULT_WRAP_BOX_SPACING = 0;
|
|
12
|
+
/**
|
|
13
|
+
* Whether writing `next` over `current` is a change the widget must act on.
|
|
14
|
+
*
|
|
15
|
+
* The comparison happens AFTER the clamp (adw-wrap-box.c:592-593, :930-931), so
|
|
16
|
+
* a negative value written over a spacing of 0 is an early return: it neither
|
|
17
|
+
* reaches the layout nor notifies. On this port the same predicate decides
|
|
18
|
+
* whether every child's margin is rewritten.
|
|
19
|
+
*/
|
|
20
|
+
export declare function wrapBoxSpacingChanges(current: number, next: unknown): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* The uniform margin that gives a `FlexboxLayout` child its share of the gaps.
|
|
23
|
+
*
|
|
24
|
+
* NativeScript has no gap property on any layout — `Style` carries no
|
|
25
|
+
* `columnGap`/`rowGap` — so the inter-item spacing has to come out of the
|
|
26
|
+
* children: half of it on each facing edge adds up to the whole gap between any
|
|
27
|
+
* two neighbours. The margin string is NS's `top right bottom left` shorthand.
|
|
28
|
+
*
|
|
29
|
+
* This is the one place the port is knowingly looser than libadwaita: the halves
|
|
30
|
+
* on the OUTER edges are an inset `Adw.WrapBox` does not have. It is invisible
|
|
31
|
+
* at the default spacing of 0 and bounded by half a gap otherwise, where the
|
|
32
|
+
* alternative — negative margins on the container — is not something the NS CSS
|
|
33
|
+
* subset can be trusted with.
|
|
34
|
+
*/
|
|
35
|
+
export declare function wrapBoxChildMargin(childSpacing: number, lineSpacing: number): string;
|
|
36
|
+
/** The `FlexboxLayout` knobs a wrap box's properties resolve to. */
|
|
37
|
+
export interface WrapBoxFlexStyle {
|
|
38
|
+
/** `FlexboxLayout:flexDirection` — the main axis, reversed for `end-to-start`. */
|
|
39
|
+
flexDirection: 'row' | 'row-reverse' | 'column' | 'column-reverse';
|
|
40
|
+
/** `FlexboxLayout:flexWrap` — always wrapping; reversed by `wrap-reverse`. */
|
|
41
|
+
flexWrap: 'wrap' | 'wrap-reverse';
|
|
42
|
+
/** `FlexboxLayout:justifyContent` — where a COMPLETE line's leftover goes. */
|
|
43
|
+
justifyContent: 'flex-start' | 'center' | 'flex-end' | 'space-between';
|
|
44
|
+
/** `FlexboxLayout:alignContent` — `line-homogeneous` stretches the lines. */
|
|
45
|
+
alignContent: 'stretch' | 'flex-start';
|
|
46
|
+
/** `FlexboxLayout.setFlexGrow` for a child on a complete line. */
|
|
47
|
+
childFlexGrow: number;
|
|
48
|
+
/** `FlexboxLayout.setFlexShrink` for every child — `wrap-policy`. */
|
|
49
|
+
childFlexShrink: number;
|
|
50
|
+
}
|
|
51
|
+
/** The widget properties the two resolvers read. */
|
|
52
|
+
export interface WrapBoxFlexInput {
|
|
53
|
+
orientation: AdwWrapBoxOrientation;
|
|
54
|
+
packDirection: AdwWrapBoxPackDirection;
|
|
55
|
+
wrapReverse: boolean;
|
|
56
|
+
justify: AdwWrapBoxJustify;
|
|
57
|
+
justifyLastLine: boolean;
|
|
58
|
+
align: number;
|
|
59
|
+
lineHomogeneous: boolean;
|
|
60
|
+
wrapPolicy: AdwWrapPolicy;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* The CONTAINER half of the decision, resolved onto `FlexboxLayout`.
|
|
64
|
+
*
|
|
65
|
+
* The line DECISION is `resolveWrapBoxLine` in `@gjsify/adwaita-core`, held to
|
|
66
|
+
* `WRAP_BOX_LINE_VECTORS` — this function only maps its answer onto the knobs NS
|
|
67
|
+
* has, exactly as the browser element maps it onto CSS.
|
|
68
|
+
*
|
|
69
|
+
* Like a flex container, `FlexboxLayout` has ONE `justifyContent` for every
|
|
70
|
+
* line, so it can only carry the COMPLETE-line rule. NativeScript offers no
|
|
71
|
+
* `:only-child` selector and no generated content, so the final-line rule has no
|
|
72
|
+
* container-level expression at all; what it CAN reach is the single-child case,
|
|
73
|
+
* through {@link wrapBoxChildFlex}.
|
|
74
|
+
*/
|
|
75
|
+
export declare function wrapBoxFlexStyle(input: WrapBoxFlexInput): WrapBoxFlexStyle;
|
|
76
|
+
/** What one child of the box gets set on it. */
|
|
77
|
+
export interface WrapBoxChildFlex {
|
|
78
|
+
/** `FlexboxLayout.setFlexGrow` — whether this child absorbs the line's leftover. */
|
|
79
|
+
flexGrow: number;
|
|
80
|
+
/** `FlexboxLayout.setFlexShrink` — `wrap-policy`, the same for every child. */
|
|
81
|
+
flexShrink: number;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* The PER-CHILD half of the decision, which the container knobs cannot carry.
|
|
85
|
+
*
|
|
86
|
+
* Two of libadwaita's rules are facts about a child rather than about the box,
|
|
87
|
+
* and a single `justifyContent` has nowhere to put either. A box with exactly
|
|
88
|
+
* ONE child has one line, that line is the LAST one, and its child is alone on
|
|
89
|
+
* it — so it is governed by `justify-last-line`, and `spread` STRETCHES it
|
|
90
|
+
* rather than spreading anything (`n_children > 1` guards the keep-at-minimum
|
|
91
|
+
* branch, adw-wrap-layout.c:338; adw-wrap-box.c:349-352 says so outright).
|
|
92
|
+
*
|
|
93
|
+
* `childCount` is the box's own child count, which is the most a renderer knows
|
|
94
|
+
* without a layout pass: 1 means the lone-child-on-the-final-line case exactly,
|
|
95
|
+
* anything more means at least one complete line.
|
|
96
|
+
*/
|
|
97
|
+
export declare function wrapBoxChildFlex(input: WrapBoxFlexInput, childCount: number): WrapBoxChildFlex;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/adwaita-nativescript",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.33.0",
|
|
4
4
|
"description": "Native Adwaita widgets for the NativeScript runtime — real NativeScript components (StackLayout/GridLayout/Switch/Label) styled like Libadwaita, not a webview",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "lib/esm/index.js",
|
|
@@ -47,10 +47,10 @@
|
|
|
47
47
|
"design-system"
|
|
48
48
|
],
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@gjsify/adwaita-core": "^0.
|
|
51
|
-
"@gjsify/adwaita-fonts": "^0.
|
|
52
|
-
"@gjsify/adwaita-icons": "^0.
|
|
53
|
-
"@gjsify/native-platform": "^0.
|
|
50
|
+
"@gjsify/adwaita-core": "^0.33.0",
|
|
51
|
+
"@gjsify/adwaita-fonts": "^0.33.0",
|
|
52
|
+
"@gjsify/adwaita-icons": "^0.33.0",
|
|
53
|
+
"@gjsify/native-platform": "^0.33.0"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"@nativescript/core": "*"
|
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
|
-
"@gjsify/cli": "^0.
|
|
65
|
-
"@gjsify/unit": "^0.
|
|
64
|
+
"@gjsify/cli": "^0.33.0",
|
|
65
|
+
"@gjsify/unit": "^0.33.0",
|
|
66
66
|
"@types/node": "^25.9.2",
|
|
67
67
|
"typescript": "^6.0.3"
|
|
68
68
|
},
|