@digia-engage/core 2.0.2 → 2.0.3
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.
|
@@ -28,9 +28,7 @@ Pod::Spec.new do |s|
|
|
|
28
28
|
s.dependency 'React-Core'
|
|
29
29
|
|
|
30
30
|
# ── Digia Engage iOS SDK ──────────────────────────────────────────────────
|
|
31
|
-
|
|
32
|
-
# CocoaPods: host app Podfile must declare the git source (see README).
|
|
33
|
-
s.dependency 'DigiaEngage'
|
|
31
|
+
s.dependency 'DigiaEngage','~> 2.1.0'
|
|
34
32
|
|
|
35
33
|
# ── New Architecture (Fabric / TurboModules) support ─────────────────────
|
|
36
34
|
install_modules_dependencies(s)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import SwiftUI
|
|
2
|
-
import React
|
|
3
1
|
import DigiaEngage
|
|
2
|
+
import React
|
|
3
|
+
import SwiftUI
|
|
4
4
|
|
|
5
5
|
@objc(DigiaSlotView)
|
|
6
6
|
final class DigiaSlotViewManager: RCTViewManager {
|
|
@@ -81,7 +81,9 @@ final class DigiaSlotUIView: UIView {
|
|
|
81
81
|
|
|
82
82
|
/// Forward hit-testing to SwiftUI view hierarchy even outside self.bounds.
|
|
83
83
|
override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? {
|
|
84
|
-
guard let hcView = hostingController?.view, isUserInteractionEnabled, !isHidden,
|
|
84
|
+
guard let hcView = hostingController?.view, isUserInteractionEnabled, !isHidden,
|
|
85
|
+
alpha > 0.01
|
|
86
|
+
else {
|
|
85
87
|
return super.hitTest(point, with: event)
|
|
86
88
|
}
|
|
87
89
|
let converted = convert(point, to: hcView)
|
|
@@ -166,11 +168,12 @@ final class DigiaSlotUIView: UIView {
|
|
|
166
168
|
if intrinsic.isFinite, intrinsic > 0, intrinsic != UIView.noIntrinsicMetric {
|
|
167
169
|
height = intrinsic
|
|
168
170
|
} else {
|
|
169
|
-
height =
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
171
|
+
height =
|
|
172
|
+
hc.view.systemLayoutSizeFitting(
|
|
173
|
+
CGSize(width: width, height: UIView.layoutFittingCompressedSize.height),
|
|
174
|
+
withHorizontalFittingPriority: .required,
|
|
175
|
+
verticalFittingPriority: .fittingSizeLevel
|
|
176
|
+
).height
|
|
174
177
|
}
|
|
175
178
|
|
|
176
179
|
if abs(height - lastReportedHeight) < 0.5 { return }
|
|
@@ -230,7 +233,8 @@ private final class SlotHostingController<Content: View>: UIHostingController<Co
|
|
|
230
233
|
private final class RCTTouchDelegateProxy: NSObject, UIGestureRecognizerDelegate {
|
|
231
234
|
|
|
232
235
|
private static let hostingViews = NSHashTable<UIView>.weakObjects()
|
|
233
|
-
private static let proxies = NSMapTable<UIGestureRecognizer, RCTTouchDelegateProxy
|
|
236
|
+
private static let proxies = NSMapTable<UIGestureRecognizer, RCTTouchDelegateProxy>
|
|
237
|
+
.weakToStrongObjects()
|
|
234
238
|
|
|
235
239
|
static func registerHostingView(_ view: UIView) {
|
|
236
240
|
hostingViews.add(view)
|
package/package.json
CHANGED