@fluentui-react-native/focus-zone 0.10.25 → 0.10.27
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/CHANGELOG.json +32 -2
- package/CHANGELOG.md +18 -2
- package/macos/RCTFocusZone.m +13 -3
- package/package.json +2 -2
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,37 @@
|
|
|
2
2
|
"name": "@fluentui-react-native/focus-zone",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Fri, 21 Oct 2022 13:07:13 GMT",
|
|
6
|
+
"tag": "@fluentui-react-native/focus-zone_v0.10.27",
|
|
7
|
+
"version": "0.10.27",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "beachball",
|
|
12
|
+
"package": "@fluentui-react-native/focus-zone",
|
|
13
|
+
"comment": "Bump @fluentui-react-native/interactive-hooks to v0.19.2",
|
|
14
|
+
"commit": "5a21fe82f7540f64ec4fe8937cf5f86f11d1c9df"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"date": "Thu, 20 Oct 2022 19:21:06 GMT",
|
|
21
|
+
"tag": "@fluentui-react-native/focus-zone_v0.10.26",
|
|
22
|
+
"version": "0.10.26",
|
|
23
|
+
"comments": {
|
|
24
|
+
"patch": [
|
|
25
|
+
{
|
|
26
|
+
"author": "sanajmi@microsoft.com",
|
|
27
|
+
"package": "@fluentui-react-native/focus-zone",
|
|
28
|
+
"commit": "9e827dde137238cae829145564cbc880bbdc5a90",
|
|
29
|
+
"comment": "FocusZone (macOS): Fix RTL bug"
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"date": "Thu, 20 Oct 2022 18:30:02 GMT",
|
|
6
36
|
"tag": "@fluentui-react-native/focus-zone_v0.10.25",
|
|
7
37
|
"version": "0.10.25",
|
|
8
38
|
"comments": {
|
|
@@ -17,7 +47,7 @@
|
|
|
17
47
|
"author": "beachball",
|
|
18
48
|
"package": "@fluentui-react-native/focus-zone",
|
|
19
49
|
"comment": "Bump @fluentui-react-native/interactive-hooks to v0.19.1",
|
|
20
|
-
"commit": "
|
|
50
|
+
"commit": "9e827dde137238cae829145564cbc880bbdc5a90"
|
|
21
51
|
}
|
|
22
52
|
]
|
|
23
53
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,28 @@
|
|
|
1
1
|
# Change Log - @fluentui-react-native/focus-zone
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Fri, 21 Oct 2022 13:07:13 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 0.10.27
|
|
8
|
+
|
|
9
|
+
Fri, 21 Oct 2022 13:07:13 GMT
|
|
10
|
+
|
|
11
|
+
### Patches
|
|
12
|
+
|
|
13
|
+
- Bump @fluentui-react-native/interactive-hooks to v0.19.2
|
|
14
|
+
|
|
15
|
+
## 0.10.26
|
|
16
|
+
|
|
17
|
+
Thu, 20 Oct 2022 19:21:06 GMT
|
|
18
|
+
|
|
19
|
+
### Patches
|
|
20
|
+
|
|
21
|
+
- FocusZone (macOS): Fix RTL bug (sanajmi@microsoft.com)
|
|
22
|
+
|
|
7
23
|
## 0.10.25
|
|
8
24
|
|
|
9
|
-
Thu, 20 Oct 2022 18:
|
|
25
|
+
Thu, 20 Oct 2022 18:30:02 GMT
|
|
10
26
|
|
|
11
27
|
### Patches
|
|
12
28
|
|
package/macos/RCTFocusZone.m
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#import "KeyCodes.h"
|
|
2
2
|
#import "RCTFocusZone.h"
|
|
3
|
+
#import "RCTi18nUtil.h"
|
|
3
4
|
|
|
4
5
|
typedef enum {
|
|
5
6
|
FocusZoneActionNone,
|
|
@@ -25,9 +26,18 @@ static inline CGFloat GetDistanceBetweenPoints(NSPoint point1, NSPoint point2)
|
|
|
25
26
|
return sqrt(delta.x * delta.x + delta.y * delta.y);
|
|
26
27
|
}
|
|
27
28
|
|
|
28
|
-
static inline CGFloat
|
|
29
|
+
static inline CGFloat GetDistanceBetweenRects(NSRect rect1, NSRect rect2)
|
|
29
30
|
{
|
|
30
|
-
|
|
31
|
+
// Get the top left corner of the rect, top right in RTL
|
|
32
|
+
bool isRTL = [[RCTI18nUtil sharedInstance] isRTL];
|
|
33
|
+
|
|
34
|
+
CGFloat rect1Offset = isRTL ? rect1.size.width : 0;
|
|
35
|
+
CGFloat rect2Offset = isRTL ? rect2.size.width : 0;
|
|
36
|
+
|
|
37
|
+
NSPoint rect1Corner = NSMakePoint(rect1.origin.x + rect1Offset , rect1.origin.y);
|
|
38
|
+
NSPoint rect2Corner = NSMakePoint(rect2.origin.x + rect2Offset , rect2.origin.y);
|
|
39
|
+
|
|
40
|
+
return GetDistanceBetweenPoints(rect1Corner, rect2Corner);
|
|
31
41
|
}
|
|
32
42
|
|
|
33
43
|
static inline CGFloat GetMinDistanceBetweenRectVerticesAndPoint(NSRect rect, NSPoint point)
|
|
@@ -270,7 +280,7 @@ static BOOL ShouldSkipFocusZone(NSView *view)
|
|
|
270
280
|
|
|
271
281
|
if (!skip)
|
|
272
282
|
{
|
|
273
|
-
CGFloat distance =
|
|
283
|
+
CGFloat distance = GetDistanceBetweenRects(firstResponderRect, candidateRect);
|
|
274
284
|
|
|
275
285
|
// If there are other candidate views inside the same ScrollView as the firstResponder,
|
|
276
286
|
// prefer those views over other views outside the scrollview, even if they are closer.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui-react-native/focus-zone",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.27",
|
|
4
4
|
"description": "A cross-platform FocusZone component using the Fluent Design System",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@fluentui-react-native/component-cache": "^1.4.2",
|
|
26
|
-
"@fluentui-react-native/interactive-hooks": ">=0.19.
|
|
26
|
+
"@fluentui-react-native/interactive-hooks": ">=0.19.2 <1.0.0",
|
|
27
27
|
"@uifabricshared/foundation-composable": ">=0.11.1 <1.0.0",
|
|
28
28
|
"@uifabricshared/foundation-settings": ">=0.12.1 <1.0.0"
|
|
29
29
|
},
|