craft-native 0.0.179 → 0.0.180

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
@@ -3303,7 +3303,7 @@ function pinCraftNativeDependency(packagePath, craftVersion) {
3303
3303
  `);
3304
3304
  }
3305
3305
  // package.json
3306
- var version = "0.0.179";
3306
+ var version = "0.0.180";
3307
3307
 
3308
3308
  // bin/cli.ts
3309
3309
  var spawnedFrom = process6.env[CRAFT_CLI_SPAWN_MARKER];
package/dist/index.cjs CHANGED
@@ -310,7 +310,7 @@ function craftBinaryNotFoundMessage(triedPath) {
310
310
  `);
311
311
  }
312
312
  // package.json
313
- var version = "0.0.179";
313
+ var version = "0.0.180";
314
314
 
315
315
  // src/sdk-version.ts
316
316
  var SDK_VERSION = version;
package/dist/index.js CHANGED
@@ -58,7 +58,7 @@ function craftBinaryNotFoundMessage(triedPath) {
58
58
  `);
59
59
  }
60
60
  // package.json
61
- var version = "0.0.179";
61
+ var version = "0.0.180";
62
62
 
63
63
  // src/sdk-version.ts
64
64
  var SDK_VERSION = version;
@@ -1306,11 +1306,20 @@ private class CraftNativeFlowView: UIStackView {
1306
1306
 
1307
1307
  override func insertArrangedSubview(_ view: UIView, at stackIndex: Int) {
1308
1308
  flowChildren.removeAll { $0 === view }
1309
- flowChildren.insert(view, at: min(max(0, stackIndex), flowChildren.count))
1309
+ let index = min(max(0, stackIndex), flowChildren.count)
1310
+ flowChildren.insert(view, at: index)
1310
1311
  if view.superview !== self {
1311
1312
  view.removeFromSuperview()
1312
1313
  addSubview(view)
1313
1314
  }
1315
+ // Stacking follows the tree, as on the web: a later sibling draws and
1316
+ // takes touches above an earlier one. Appending a child inserted
1317
+ // before its siblings put it on top of all of them, so a ScrollView
1318
+ // re-created under a floating button (absolute, after it) took the
1319
+ // button's taps for whatever lay beneath while the button still drew.
1320
+ if let next = flowChildren[(index + 1)...].first(where: { $0.superview === self }) {
1321
+ insertSubview(view, belowSubview: next)
1322
+ }
1314
1323
  view.translatesAutoresizingMaskIntoConstraints = true
1315
1324
  invalidateMeasurements()
1316
1325
  }
@@ -3963,6 +3972,16 @@ final class CraftNativeScreenController: UIViewController, UIScrollViewDelegate,
3963
3972
  // it follows light, dark and Increase Contrast by itself.
3964
3973
  let surface = Self.floatingSurface(diameter: 44)
3965
3974
  button.addSubview(surface)
3975
+ // Pinned to the button rather than resized with it: the button starts
3976
+ // at zero size, so a 44-point surface that grew with its superview
3977
+ // came out 88 points, a rounded card twice the button's size that
3978
+ // spilled off the bar's edge and covered its neighbour.
3979
+ NSLayoutConstraint.activate([
3980
+ surface.leadingAnchor.constraint(equalTo: button.leadingAnchor),
3981
+ surface.trailingAnchor.constraint(equalTo: button.trailingAnchor),
3982
+ surface.topAnchor.constraint(equalTo: button.topAnchor),
3983
+ surface.bottomAnchor.constraint(equalTo: button.bottomAnchor),
3984
+ ])
3966
3985
  // Glass lifts itself off the content; the material needs the tab
3967
3986
  // bar's shadow to.
3968
3987
  if surface.effect is UIBlurEffect {
@@ -4043,8 +4062,8 @@ final class CraftNativeScreenController: UIViewController, UIScrollViewDelegate,
4043
4062
  effect = UIBlurEffect(style: .systemUltraThinMaterial)
4044
4063
  #endif
4045
4064
  let surface = UIVisualEffectView(effect: effect)
4046
- surface.frame = CGRect(x: 0, y: 0, width: diameter, height: diameter)
4047
- surface.autoresizingMask = [.flexibleWidth, .flexibleHeight]
4065
+ // The caller pins it to its button; it is exactly `diameter` across.
4066
+ surface.translatesAutoresizingMaskIntoConstraints = false
4048
4067
  surface.isUserInteractionEnabled = false
4049
4068
  surface.layer.cornerRadius = diameter / 2
4050
4069
  surface.layer.cornerCurve = .circular
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "craft-native",
3
- "version": "0.0.179",
3
+ "version": "0.0.180",
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>",