craft-native 0.0.390 → 0.0.392

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/dist/cli.js CHANGED
@@ -3047,7 +3047,7 @@ function pinCraftNativeDependency(packagePath, craftVersion) {
3047
3047
  `);
3048
3048
  }
3049
3049
  // package.json
3050
- var version = "0.0.390";
3050
+ var version = "0.0.392";
3051
3051
 
3052
3052
  // bin/cli.ts
3053
3053
  var spawnedFrom = process6.env[CRAFT_CLI_SPAWN_MARKER];
package/dist/index.cjs CHANGED
@@ -375,7 +375,7 @@ function craftBinaryNotFoundMessage(triedPath) {
375
375
  `);
376
376
  }
377
377
  // package.json
378
- var version = "0.0.390";
378
+ var version = "0.0.392";
379
379
 
380
380
  // src/sdk-version.ts
381
381
  var SDK_VERSION = version;
package/dist/index.js CHANGED
@@ -117,7 +117,7 @@ function craftBinaryNotFoundMessage(triedPath) {
117
117
  `);
118
118
  }
119
119
  // package.json
120
- var version = "0.0.390";
120
+ var version = "0.0.392";
121
121
 
122
122
  // src/sdk-version.ts
123
123
  var SDK_VERSION = version;
@@ -1,6 +1,13 @@
1
1
  import Foundation
2
2
  import SwiftUI
3
3
  import UIKit
4
+
5
+ /// Includes deceleration, which runs in default mode after tracking ends.
6
+ func craftHybridHasActiveScroll(in view: UIView) -> Bool {
7
+ if let scroll = view as? UIScrollView,
8
+ scroll.isTracking || scroll.isDragging || scroll.isDecelerating { return true }
9
+ return view.subviews.contains { craftHybridHasActiveScroll(in: $0) }
10
+ }
4
11
  import WebKit
5
12
  import Combine
6
13
 
@@ -1261,9 +1268,14 @@ final class CraftHybridController: UITabBarController, UITabBarControllerDelegat
1261
1268
  item.accessibilityLabel = tab.accessibilityLabel ?? tab.displayTitle
1262
1269
  }
1263
1270
  if let committed = stacks[currentTab], controllers.contains(where: { $0 === committed }), selectedViewController !== committed {
1264
- UIView.performWithoutAnimation {
1265
- selectedViewController = committed
1266
- view.layoutIfNeeded()
1271
+ // UIKit owns the Liquid Glass selection pill. Suppressing this
1272
+ // transaction made a completed page swipe snap its indicator.
1273
+ // Keep native selection animation and honour Reduce Motion.
1274
+ let duration = UIAccessibility.isReduceMotionEnabled ? 0 : 0.22
1275
+ UIView.animate(withDuration: duration, delay: 0,
1276
+ options: [.beginFromCurrentState, .allowUserInteraction]) {
1277
+ self.selectedViewController = committed
1278
+ self.tabBar.layoutIfNeeded()
1267
1279
  }
1268
1280
  }
1269
1281
  tabBar.tintColor = chrome.tint ?? config.tintColor.flatMap { UIColor(hex: $0) } ?? view.tintColor
@@ -1950,6 +1962,7 @@ final class CraftHybridController: UITabBarController, UITabBarControllerDelegat
1950
1962
  guard self.currentTab == owner, self.view.window != nil else { return }
1951
1963
  let quietFor = neighbour ? 0.3 : 1.0
1952
1964
  guard self.activeTabSwipeTarget == nil, !self.tabSwipeSettling,
1965
+ !craftHybridHasActiveScroll(in: self.view),
1953
1966
  !self.stacks.values.contains(where: { $0.transitionCoordinator != nil }),
1954
1967
  CACurrentMediaTime() - self.lastNavigation >= quietFor else {
1955
1968
  self.prepareAdjacentNativeTabs()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "craft-native",
3
- "version": "0.0.390",
3
+ "version": "0.0.392",
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>",