@fluentui-react-native/focus-zone 0.10.24 → 0.10.25
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 +22 -1
- package/CHANGELOG.md +11 -2
- package/macos/RCTFocusZone.m +3 -8
- package/package.json +2 -2
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,28 @@
|
|
|
2
2
|
"name": "@fluentui-react-native/focus-zone",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Thu, 20 Oct 2022 18:28:41 GMT",
|
|
6
|
+
"tag": "@fluentui-react-native/focus-zone_v0.10.25",
|
|
7
|
+
"version": "0.10.25",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "sanajmi@microsoft.com",
|
|
12
|
+
"package": "@fluentui-react-native/focus-zone",
|
|
13
|
+
"commit": "860fa561d4887cee5f1eb2aa88ce7064620bcae1",
|
|
14
|
+
"comment": "FocusZone (macOS): Calculate distance from origin"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "beachball",
|
|
18
|
+
"package": "@fluentui-react-native/focus-zone",
|
|
19
|
+
"comment": "Bump @fluentui-react-native/interactive-hooks to v0.19.1",
|
|
20
|
+
"commit": "34dd5c82030fc890c2133c9190d17bdcba6e173e"
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"date": "Tue, 18 Oct 2022 04:06:27 GMT",
|
|
6
27
|
"tag": "@fluentui-react-native/focus-zone_v0.10.24",
|
|
7
28
|
"version": "0.10.24",
|
|
8
29
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,21 @@
|
|
|
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 Thu, 20 Oct 2022 18:28:41 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 0.10.25
|
|
8
|
+
|
|
9
|
+
Thu, 20 Oct 2022 18:28:41 GMT
|
|
10
|
+
|
|
11
|
+
### Patches
|
|
12
|
+
|
|
13
|
+
- FocusZone (macOS): Calculate distance from origin (sanajmi@microsoft.com)
|
|
14
|
+
- Bump @fluentui-react-native/interactive-hooks to v0.19.1
|
|
15
|
+
|
|
7
16
|
## 0.10.24
|
|
8
17
|
|
|
9
|
-
Tue, 18 Oct 2022 04:
|
|
18
|
+
Tue, 18 Oct 2022 04:06:27 GMT
|
|
10
19
|
|
|
11
20
|
### Patches
|
|
12
21
|
|
package/macos/RCTFocusZone.m
CHANGED
|
@@ -25,14 +25,9 @@ static inline CGFloat GetDistanceBetweenPoints(NSPoint point1, NSPoint point2)
|
|
|
25
25
|
return sqrt(delta.x * delta.x + delta.y * delta.y);
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
static inline
|
|
28
|
+
static inline CGFloat GetDistanceBetweenOriginsOfRects(NSRect rect1, NSRect rect2)
|
|
29
29
|
{
|
|
30
|
-
return
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
static inline CGFloat GetDistanceBetweenCentersOfRects(NSRect rect1, NSRect rect2)
|
|
34
|
-
{
|
|
35
|
-
return GetDistanceBetweenPoints(GetCenterOfRect(rect1), GetCenterOfRect(rect2));
|
|
30
|
+
return GetDistanceBetweenPoints(rect1.origin, rect2.origin);
|
|
36
31
|
}
|
|
37
32
|
|
|
38
33
|
static inline CGFloat GetMinDistanceBetweenRectVerticesAndPoint(NSRect rect, NSPoint point)
|
|
@@ -275,7 +270,7 @@ static BOOL ShouldSkipFocusZone(NSView *view)
|
|
|
275
270
|
|
|
276
271
|
if (!skip)
|
|
277
272
|
{
|
|
278
|
-
CGFloat distance =
|
|
273
|
+
CGFloat distance = GetDistanceBetweenOriginsOfRects(firstResponderRect, candidateRect);
|
|
279
274
|
|
|
280
275
|
// If there are other candidate views inside the same ScrollView as the firstResponder,
|
|
281
276
|
// 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.25",
|
|
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.1 <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
|
},
|