craft-native 0.0.232 → 0.0.233

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.
@@ -4563,12 +4563,28 @@ class MainActivity : AppCompatActivity() {
4563
4563
  }
4564
4564
 
4565
4565
  /** Applies a screen-specific background, falling back to the dynamic app colour. */
4566
+ @Suppress("DEPRECATION")
4566
4567
  private fun applyScreenBackground(screen: Screen) {
4567
4568
  val configured = screen.options.opt("backgroundColor")
4568
4569
  ?.takeUnless { it == JSONObject.NULL }
4569
4570
  ?.let { craftNativeOptionalString(it) }
4570
4571
  ?.let { runCatching { craftNativeColor(it) }.getOrNull() }
4571
- screen.view.setBackgroundColor(configured ?: ContextCompat.getColor(this, R.color.background))
4572
+ val background = configured ?: ContextCompat.getColor(this, R.color.background)
4573
+ screen.view.setBackgroundColor(background)
4574
+ // The root also paints the window-inset padding above/below the
4575
+ // screen. Retained screens still receive options and theme updates;
4576
+ // only the visible one may change the colour behind system bars.
4577
+ if (visibleScreen === screen) {
4578
+ root.setBackgroundColor(background)
4579
+ WindowCompat.getInsetsController(window, window.decorView)
4580
+ .isAppearanceLightNavigationBars = Color.luminance(background) >= 0.5f
4581
+ // Android 15+ draws the root behind transparent system bars.
4582
+ // Older releases still paint separate window bar surfaces.
4583
+ if (Build.VERSION.SDK_INT < 35) {
4584
+ window.statusBarColor = background
4585
+ window.navigationBarColor = background
4586
+ }
4587
+ }
4572
4588
  }
4573
4589
 
4574
4590
  /** Refresh controls use a contrasting system tint when no color is authored. */
package/dist/cli.js CHANGED
@@ -3424,7 +3424,7 @@ function pinCraftNativeDependency(packagePath, craftVersion) {
3424
3424
  `);
3425
3425
  }
3426
3426
  // package.json
3427
- var version = "0.0.232";
3427
+ var version = "0.0.233";
3428
3428
 
3429
3429
  // bin/cli.ts
3430
3430
  var spawnedFrom = process6.env[CRAFT_CLI_SPAWN_MARKER];
package/dist/index.cjs CHANGED
@@ -309,7 +309,7 @@ function craftBinaryNotFoundMessage(triedPath) {
309
309
  `);
310
310
  }
311
311
  // package.json
312
- var version = "0.0.232";
312
+ var version = "0.0.233";
313
313
 
314
314
  // src/sdk-version.ts
315
315
  var SDK_VERSION = version;
package/dist/index.js CHANGED
@@ -57,7 +57,7 @@ function craftBinaryNotFoundMessage(triedPath) {
57
57
  `);
58
58
  }
59
59
  // package.json
60
- var version = "0.0.232";
60
+ var version = "0.0.233";
61
61
 
62
62
  // src/sdk-version.ts
63
63
  var SDK_VERSION = version;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "craft-native",
3
- "version": "0.0.232",
3
+ "version": "0.0.233",
4
4
  "type": "module",
5
5
  "description": "Build desktop apps with web languages - TypeScript SDK for Craft",
6
6
  "author": "Chris Breuer <chris@stacksjs.org>",