@gjsify/adwaita-nativescript 0.13.1 → 0.14.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.
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import{GridLayout as e,ItemSpec as t}from"@nativescript/core";const n=600;var AdwClamp=class extends e{_maximumSize=600;_child=null;constructor(){super(),this.className=`adw-clamp`,this.addColumn(new t(1,`star`)),this.addRow(new t(1,`star`))}setChild(t){this._child&&=(this.removeChild(this._child),null),t&&(t.horizontalAlignment=`center`,t.width=this._maximumSize,e.setColumn(t,0),e.setRow(t,0),this.addChild(t),this._child=t)}get child(){return this._child}get maximumSize(){return this._maximumSize}set maximumSize(e){this._maximumSize=Number.isFinite(e)&&e>0?e:600,this._child&&(this._child.width=this._maximumSize)}};export{AdwClamp,n as DEFAULT_CLAMP_MAX_SIZE};
1
+ import"../_virtual/_rolldown/runtime.js";import{GridLayout as e,ItemSpec as t}from"@nativescript/core";const n=600;var AdwClamp=class extends e{_maximumSize=600;_child=null;constructor(){super(),this.className=`adw-clamp`,this.addColumn(new t(1,`star`)),this.addRow(new t(1,`auto`))}setChild(t){this._child&&=(this.removeChild(this._child),null),t&&(t.horizontalAlignment=`center`,t.width=this._maximumSize,e.setColumn(t,0),e.setRow(t,0),this.addChild(t),this._child=t)}get child(){return this._child}get maximumSize(){return this._maximumSize}set maximumSize(e){this._maximumSize=Number.isFinite(e)&&e>0?e:600,this._child&&(this._child.width=this._maximumSize)}};export{AdwClamp,n as DEFAULT_CLAMP_MAX_SIZE};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gjsify/adwaita-nativescript",
3
- "version": "0.13.1",
3
+ "version": "0.14.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,9 +47,9 @@
47
47
  "design-system"
48
48
  ],
49
49
  "dependencies": {
50
- "@gjsify/adwaita-fonts": "^0.13.1",
51
- "@gjsify/adwaita-icons": "^0.13.1",
52
- "@gjsify/native-platform": "^0.13.1"
50
+ "@gjsify/adwaita-fonts": "^0.14.0",
51
+ "@gjsify/adwaita-icons": "^0.14.0",
52
+ "@gjsify/native-platform": "^0.14.0"
53
53
  },
54
54
  "peerDependencies": {
55
55
  "@nativescript/core": "*"
@@ -60,8 +60,8 @@
60
60
  }
61
61
  },
62
62
  "devDependencies": {
63
- "@gjsify/cli": "^0.13.1",
64
- "@gjsify/unit": "^0.13.1",
63
+ "@gjsify/cli": "^0.14.0",
64
+ "@gjsify/unit": "^0.14.0",
65
65
  "@types/node": "^25.9.2",
66
66
  "typescript": "^6.0.3"
67
67
  },
@@ -57,8 +57,12 @@ Page.adw-window {
57
57
  * transparent row lets the card's rounded fill show through (Adwaita rows are
58
58
  * transparent at rest anyway; they tint only on hover/press). */
59
59
  background-color: transparent;
60
- /* Tight Adwaita ~56px rhythm; rows in a boxed list are flush (margin 0). */
61
- padding: 10 16 10 16;
60
+ /* Native Adwaita list-row minimum (libadwaita _lists.scss: 50px) so rows are
61
+ * not cramped vs the desktop; content is vertically centred via the
62
+ * .adw-row-text / -prefix / -suffix `vertical-align`. Boxed-list rows are
63
+ * flush (margin 0). */
64
+ min-height: 50;
65
+ padding: 12 16 12 16;
62
66
  margin: 0;
63
67
  }
64
68
 
@@ -86,6 +90,7 @@ Page.adw-window {
86
90
 
87
91
  .adw-row-text {
88
92
  margin: 0;
93
+ vertical-align: center;
89
94
  }
90
95
 
91
96
  /* Leading symbolic icon (column 0) — Adwaita sets a 12px gap to the title and
@@ -383,6 +388,7 @@ Page.adw-window {
383
388
 
384
389
  .adw-window-title {
385
390
  margin: 0;
391
+ vertical-align: center;
386
392
  }
387
393
 
388
394
  .adw-window-title-title {
@@ -411,6 +417,8 @@ Page.adw-window {
411
417
  /* Non-flat header carries a 1px bottom separator (NS subset has no shadow). */
412
418
  border-bottom-width: 1;
413
419
  border-bottom-color: rgba(0, 0, 0, 0.1);
420
+ /* Native Adwaita header-bar minimum (libadwaita _header-bar.scss: 47px). */
421
+ min-height: 47;
414
422
  padding: 6 8 6 8;
415
423
  }
416
424
 
@@ -422,6 +430,7 @@ Page.adw-window {
422
430
  .adw-header-bar-start,
423
431
  .adw-header-bar-end {
424
432
  margin: 0;
433
+ vertical-align: center;
425
434
  }
426
435
 
427
436
  /* ===== Toolbar view ===== */
@@ -431,13 +440,21 @@ Page.adw-window {
431
440
  }
432
441
 
433
442
  .adw-toolbar-view-top {
434
- background-color: transparent;
443
+ /* Match the header-bar background so the TOP safe-area inset (status bar) is
444
+ * painted in the header colour — the chrome reaches the screen edge but the
445
+ * header content does not slide under the clock. Host app feeds the inset
446
+ * into --safeAreaInsetTop (falls back to 0 when unset). */
447
+ background-color: #ffffff;
448
+ padding-top: var(--safeAreaInsetTop, 0);
435
449
  }
436
450
 
437
451
  .adw-toolbar-view-bottom {
438
452
  background-color: #ffffff;
439
453
  border-top-width: 1;
440
454
  border-top-color: rgba(0, 0, 0, 0.1);
455
+ /* BOTTOM safe-area inset (nav bar / gesture pill) painted in the bottom-bar
456
+ * colour. Host app feeds --safeAreaInsetBottom (falls back to 0). */
457
+ padding-bottom: var(--safeAreaInsetBottom, 0);
441
458
  }
442
459
 
443
460
  /* ===== View stack (page container) ===== */
@@ -505,6 +522,9 @@ Page.adw-window {
505
522
 
506
523
  .adw-status-page {
507
524
  background-color: #fafafb;
525
+ /* Fill the parent so the centered content stack sits in the vertical middle
526
+ * (Adw.StatusPage is a full-page empty state), not hugging the top. */
527
+ height: 100%;
508
528
  }
509
529
 
510
530
  .adw-status-page-content {
@@ -1230,6 +1250,10 @@ Page.ns-dark.adw-window {
1230
1250
  background-color: #222226;
1231
1251
  }
1232
1252
 
1253
+ .ns-dark .adw-toolbar-view-top {
1254
+ background-color: #2e2e32;
1255
+ }
1256
+
1233
1257
  .ns-dark .adw-toolbar-view-bottom {
1234
1258
  background-color: #2e2e32;
1235
1259
  border-top-color: rgba(255, 255, 255, 0.12);