craft-native 0.0.195 → 0.0.197
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
|
@@ -3424,7 +3424,7 @@ function pinCraftNativeDependency(packagePath, craftVersion) {
|
|
|
3424
3424
|
`);
|
|
3425
3425
|
}
|
|
3426
3426
|
// package.json
|
|
3427
|
-
var version = "0.0.
|
|
3427
|
+
var version = "0.0.197";
|
|
3428
3428
|
|
|
3429
3429
|
// bin/cli.ts
|
|
3430
3430
|
var spawnedFrom = process6.env[CRAFT_CLI_SPAWN_MARKER];
|
package/dist/index.cjs
CHANGED
package/dist/index.js
CHANGED
|
@@ -21,10 +21,6 @@ final class CraftNativeFlatList: UICollectionView, UICollectionViewDelegateFlowL
|
|
|
21
21
|
private(set) var representedIdentity: String?
|
|
22
22
|
private(set) var hostedView: UIView?
|
|
23
23
|
var onRecycle: ((String) -> Void)?
|
|
24
|
-
/// The width (or, sideways, height) the list gives this row, so a row
|
|
25
|
-
/// is measured at the list's width rather than the layout's estimate.
|
|
26
|
-
var fittingExtent: CGFloat?
|
|
27
|
-
|
|
28
24
|
override func prepareForReuse() {
|
|
29
25
|
super.prepareForReuse()
|
|
30
26
|
releaseHostedView()
|
|
@@ -63,6 +59,12 @@ final class CraftNativeFlatList: UICollectionView, UICollectionViewDelegateFlowL
|
|
|
63
59
|
// collection view ancestor.
|
|
64
60
|
var ancestor = superview
|
|
65
61
|
while let view = ancestor, !(view is UICollectionView) { ancestor = view.superview }
|
|
62
|
+
// A reusable cell can be measured during UIKit's invalidation,
|
|
63
|
+
// before layoutSubviews updates visible cells. Derive the extent
|
|
64
|
+
// from the live list bounds on every self-sizing pass.
|
|
65
|
+
let list = ancestor as? CraftNativeFlatList
|
|
66
|
+
let isChrome = representedIdentity.flatMap { list?.itemsByIdentity[$0]?.isChrome } ?? false
|
|
67
|
+
let fittingExtent = list?.itemExtent(isChrome: isChrome)
|
|
66
68
|
if let collectionView = ancestor as? UICollectionView,
|
|
67
69
|
let flowLayout = collectionView.collectionViewLayout as? UICollectionViewFlowLayout,
|
|
68
70
|
flowLayout.scrollDirection == .horizontal {
|
|
@@ -155,7 +157,6 @@ final class CraftNativeFlatList: UICollectionView, UICollectionViewDelegateFlowL
|
|
|
155
157
|
let renderItem = self.renderItem else { return UICollectionViewCell() }
|
|
156
158
|
let view = renderItem(item.node, identity, cell.hostedView)
|
|
157
159
|
cell.onRecycle = self.recycleItem
|
|
158
|
-
cell.fittingExtent = self.itemExtent(isChrome: item.isChrome)
|
|
159
160
|
cell.host(view, identity: identity)
|
|
160
161
|
return cell
|
|
161
162
|
}
|
|
@@ -5534,6 +5534,7 @@ final class CraftNativeScreenController: UIViewController, UIScrollViewDelegate,
|
|
|
5534
5534
|
scale = 1
|
|
5535
5535
|
}
|
|
5536
5536
|
indicator.indicatorScale = scale
|
|
5537
|
+
applyTransform(style["transform"], to: indicator)
|
|
5537
5538
|
indicator.color = color(props["color"]) ?? .tintColor
|
|
5538
5539
|
indicator.hidesWhenStopped = props["hidesWhenStopped"] as? Bool ?? true
|
|
5539
5540
|
if props["animating"] as? Bool == false {
|