@gjsify/adwaita-nativescript 0.36.0 → 0.37.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/types/widgets/adw-action-row.d.ts +27 -43
- package/lib/types/widgets/adw-data-grid.d.ts +4 -10
- package/lib/types/widgets/adw-entry-row.d.ts +20 -29
- package/lib/types/widgets/button-content.d.ts +12 -21
- package/lib/types/widgets/carousel-state.d.ts +15 -18
- package/lib/types/widgets/chrome.d.ts +22 -47
- package/lib/types/widgets/data-grid-model.d.ts +25 -36
- package/lib/types/widgets/navigation-stack.d.ts +2 -13
- package/lib/types/widgets/preferences-group-state.d.ts +7 -13
- package/lib/types/widgets/preferences-search.d.ts +5 -5
- package/lib/types/widgets/row-state.d.ts +17 -33
- package/lib/types/widgets/sidebar-model.d.ts +5 -7
- package/lib/types/widgets/split-button.d.ts +17 -34
- package/lib/types/widgets/split-view-base.d.ts +17 -24
- package/lib/types/widgets/split-view-state.d.ts +48 -76
- package/lib/types/widgets/split-view-width.d.ts +21 -32
- package/lib/types/widgets/status-page-content.d.ts +9 -14
- package/lib/types/widgets/tab-view-state.d.ts +18 -34
- package/lib/types/widgets/view-switcher-base.d.ts +11 -30
- package/lib/types/widgets/view-switcher-model.d.ts +17 -34
- package/lib/types/widgets/wrap-box-layout.d.ts +22 -37
- package/package.json +7 -7
|
@@ -1,36 +1,25 @@
|
|
|
1
1
|
import { normalizeWrapBoxSpacing, type AdwWrapBoxJustify, type AdwWrapBoxOrientation, type AdwWrapBoxPackDirection, type AdwWrapPolicy } from '@gjsify/adwaita-core';
|
|
2
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
|
-
*/
|
|
3
|
+
/** `Adw.WrapBox:child-spacing` / `:line-spacing` default, in DIPs. Both are 0 in C. */
|
|
11
4
|
export declare const DEFAULT_WRAP_BOX_SPACING = 0;
|
|
12
5
|
/**
|
|
13
6
|
* Whether writing `next` over `current` is a change the widget must act on.
|
|
14
7
|
*
|
|
15
|
-
* The comparison happens AFTER the clamp
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* whether every child's margin is rewritten.
|
|
8
|
+
* The comparison happens AFTER the clamp, so a negative value written over a
|
|
9
|
+
* spacing of 0 is an early return: it neither reaches the layout nor notifies. Here
|
|
10
|
+
* the same predicate decides whether every child's margin is rewritten.
|
|
19
11
|
*/
|
|
20
12
|
export declare function wrapBoxSpacingChanges(current: number, next: unknown): boolean;
|
|
21
13
|
/**
|
|
22
14
|
* The uniform margin that gives a `FlexboxLayout` child its share of the gaps.
|
|
23
15
|
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
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.
|
|
16
|
+
* Half the spacing on each facing edge adds up to the whole gap between any two
|
|
17
|
+
* neighbours. The margin string is NS's `top right bottom left` shorthand.
|
|
28
18
|
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
* subset can be trusted with.
|
|
19
|
+
* Knowingly looser than libadwaita: the halves on the OUTER edges are an inset
|
|
20
|
+
* `Adw.WrapBox` does not have. Invisible at the default spacing of 0 and bounded by
|
|
21
|
+
* half a gap otherwise; the alternative is negative margins on the container, which
|
|
22
|
+
* the NS CSS subset cannot be trusted with.
|
|
34
23
|
*/
|
|
35
24
|
export declare function wrapBoxChildMargin(childSpacing: number, lineSpacing: number): string;
|
|
36
25
|
/** The `FlexboxLayout` knobs a wrap box's properties resolve to. */
|
|
@@ -63,14 +52,12 @@ export interface WrapBoxFlexInput {
|
|
|
63
52
|
* The CONTAINER half of the decision, resolved onto `FlexboxLayout`.
|
|
64
53
|
*
|
|
65
54
|
* The line DECISION is `resolveWrapBoxLine` in `@gjsify/adwaita-core`, held to
|
|
66
|
-
* `WRAP_BOX_LINE_VECTORS
|
|
67
|
-
* has, exactly as the browser element maps it onto CSS.
|
|
55
|
+
* `WRAP_BOX_LINE_VECTORS`; this function only maps its answer onto the knobs NS has.
|
|
68
56
|
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
* through {@link wrapBoxChildFlex}.
|
|
57
|
+
* `FlexboxLayout` has ONE `justifyContent` for every line, so it can only carry the
|
|
58
|
+
* COMPLETE-line rule. NativeScript offers no `:only-child` selector and no generated
|
|
59
|
+
* content, so the final-line rule has no container-level expression at all; the
|
|
60
|
+
* single-child case is reached through {@link wrapBoxChildFlex}.
|
|
74
61
|
*/
|
|
75
62
|
export declare function wrapBoxFlexStyle(input: WrapBoxFlexInput): WrapBoxFlexStyle;
|
|
76
63
|
/** What one child of the box gets set on it. */
|
|
@@ -83,15 +70,13 @@ export interface WrapBoxChildFlex {
|
|
|
83
70
|
/**
|
|
84
71
|
* The PER-CHILD half of the decision, which the container knobs cannot carry.
|
|
85
72
|
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
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).
|
|
73
|
+
* A box with exactly ONE child has one line, that line is the LAST one, and its
|
|
74
|
+
* child is alone on it — so it is governed by `justify-last-line`, and `spread`
|
|
75
|
+
* STRETCHES it rather than spreading anything (C guards the keep-at-minimum branch
|
|
76
|
+
* with `n_children > 1`).
|
|
92
77
|
*
|
|
93
|
-
* `childCount` is the box's own child count,
|
|
94
|
-
*
|
|
95
|
-
*
|
|
78
|
+
* `childCount` is the box's own child count, the most a renderer knows without a
|
|
79
|
+
* layout pass: 1 is the lone-child-on-the-final-line case exactly, anything more
|
|
80
|
+
* means at least one complete line.
|
|
96
81
|
*/
|
|
97
82
|
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.37.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.37.0",
|
|
51
|
+
"@gjsify/adwaita-fonts": "^0.37.0",
|
|
52
|
+
"@gjsify/adwaita-icons": "^0.37.0",
|
|
53
|
+
"@gjsify/native-platform": "^0.37.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.37.0",
|
|
65
|
+
"@gjsify/unit": "^0.37.0",
|
|
66
66
|
"@types/node": "^25.9.2",
|
|
67
67
|
"typescript": "^6.0.3"
|
|
68
68
|
},
|