craft-native 0.0.139 → 0.0.140

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.139";
3306
+ var version = "0.0.140";
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.139";
313
+ var version = "0.0.140";
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.139";
61
+ var version = "0.0.140";
62
62
 
63
63
  // src/sdk-version.ts
64
64
  var SDK_VERSION = version;
@@ -1310,8 +1310,11 @@ private final class CraftNativeGradientLayer: CAGradientLayer {
1310
1310
  layer.follow(view)
1311
1311
  guard existing == nil else { return }
1312
1312
  view.layer.insertSublayer(layer, at: 0)
1313
+ // The layer's bounds, not the view's: UIKit does not promise KVO for
1314
+ // UIView.bounds, and a screen laid out by frame never reported it, so
1315
+ // every gradient stayed zero-sized. CALayer's own bounds always do.
1313
1316
  layer.observations = [
1314
- view.observe(\.bounds) { [weak layer] view, _ in layer?.follow(view) },
1317
+ view.layer.observe(\.bounds) { [weak layer, weak view] _, _ in if let view { layer?.follow(view) } },
1315
1318
  view.layer.observe(\.cornerRadius) { [weak layer, weak view] _, _ in if let view { layer?.follow(view) } },
1316
1319
  ]
1317
1320
  }
@@ -2744,7 +2747,6 @@ final class CraftNativeScreenController: UIViewController, UIScrollViewDelegate,
2744
2747
  return textView
2745
2748
  }
2746
2749
  let field = UITextField()
2747
- field.borderStyle = .roundedRect
2748
2750
  field.addTarget(self, action: #selector(textChanged(_:)), for: .editingChanged)
2749
2751
  field.addTarget(self, action: #selector(textFocused(_:)), for: .editingDidBegin)
2750
2752
  field.addTarget(self, action: #selector(textBlurred(_:)), for: .editingDidEnd)
@@ -3282,6 +3284,12 @@ final class CraftNativeScreenController: UIViewController, UIScrollViewDelegate,
3282
3284
  updateDimension(width, constraint: &node.widthConstraint, anchor: view.widthAnchor)
3283
3285
  updateDimension(height, constraint: &node.heightConstraint, anchor: view.heightAnchor)
3284
3286
  view.backgroundColor = color(style["backgroundColor"]) ?? .clear
3287
+ // A field the style dresses itself (`border-0`, a border or a
3288
+ // background, as a search field inside its own pill is) draws no
3289
+ // system box of its own; a bare one keeps the rounded rectangle.
3290
+ if let field = view as? UITextField {
3291
+ field.borderStyle = style["borderWidth"] != nil || style["backgroundColor"] != nil ? .none : .roundedRect
3292
+ }
3285
3293
  CraftNativeGradientLayer.apply(
3286
3294
  to: view,
3287
3295
  direction: style["gradientDirection"] as? String,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "craft-native",
3
- "version": "0.0.139",
3
+ "version": "0.0.140",
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>",