Skip to content

Commit bb0dd2a

Browse files
authored
Bump a bunch of dependencies (#4033)
* Fix critical * A round of patches * Final updates * A few more updates * Fix link * Fix automation? * More fixes?
1 parent d3097bc commit bb0dd2a

File tree

6 files changed

+963
-1027
lines changed

6 files changed

+963
-1027
lines changed

.yarnrc.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ catalog:
2323
"@rnx-kit/tsconfig": ^2.1.1
2424
"@types/jasmine": 5.1.13
2525
"@types/node": ^22.19.7
26-
"@wdio/appium-service": ^9.23.0
27-
"@wdio/cli": ^9.23.0
26+
"@wdio/appium-service": ^9.24.0
27+
"@wdio/cli": ^9.24.0
2828
"@wdio/globals": ^9.23.0
29-
"@wdio/jasmine-framework": ^9.23.0
29+
"@wdio/jasmine-framework": ^9.24.0
3030
"@wdio/json-reporter": ^9.20.0
31-
"@wdio/local-runner": ^9.23.0
31+
"@wdio/local-runner": ^9.24.0
3232
"@wdio/logger": ^9.18.0
33-
"@wdio/runner": ^9.23.0
34-
"@wdio/spec-reporter": ^9.20.0
33+
"@wdio/runner": ^9.24.0
34+
"@wdio/spec-reporter": ^9.24.0
3535
appium: ^3.1.2
3636
appium-mac2-driver: ^3.2.13
3737
appium-uiautomator2-driver: ^6.7.8
@@ -43,7 +43,7 @@ catalog:
4343
lage: ^2.14.19
4444
oxc-resolver: ^11.17.0
4545
rimraf: ^6.1.2
46-
webdriverio: ^9.23.0
46+
webdriverio: ^9.24.0
4747

4848
catalogs:
4949
0.73:

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@
5757
"zx": "^8.2.4"
5858
},
5959
"resolutions": {
60-
"expect-webdriverio": "patch:expect-webdriverio@npm%3A5.6.1#~/.yarn/patches/expect-webdriverio-npm-5.6.1-69666d39e9.patch"
60+
"axios": "^1.13.5",
61+
"expect-webdriverio": "patch:expect-webdriverio@npm%3A5.6.1#~/.yarn/patches/expect-webdriverio-npm-5.6.1-69666d39e9.patch",
62+
"unicorn-magic": "^0.4.0"
6163
},
6264
"engines": {
6365
"node": ">=22.12"

packages/experimental/NativeFontMetrics/ios/FRNFontMetrics.m

Lines changed: 101 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -1,136 +1,143 @@
11
#import "FRNFontMetrics.h"
22

33
static NSDictionary<NSString *, NSNumber *> *FRNRecognizedTextStyles() {
4-
static NSDictionary<NSString *, NSNumber *> *styles;
5-
static dispatch_once_t onceToken;
6-
dispatch_once(&onceToken, ^{
7-
styles = @{
8-
@"caption1": @(FRNTextStyleCaption1),
9-
@"caption2": @(FRNTextStyleCaption2),
10-
@"footnote": @(FRNTextStyleFootnote),
11-
@"subheadline": @(FRNTextStyleSubheadline),
12-
@"callout": @(FRNTextStyleCallout),
13-
@"body": @(FRNTextStyleBody),
14-
@"headline": @(FRNTextStyleHeadline),
15-
@"title3": @(FRNTextStyleTitle3),
16-
@"title2": @(FRNTextStyleTitle2),
17-
@"title1": @(FRNTextStyleTitle1),
18-
@"largeTitle": @(FRNTextStyleLargeTitle),
19-
};
20-
});
21-
return styles;
4+
static NSDictionary<NSString *, NSNumber *> *styles;
5+
static dispatch_once_t onceToken;
6+
dispatch_once(&onceToken, ^{
7+
styles = @{
8+
@"caption1" : @(FRNTextStyleCaption1),
9+
@"caption2" : @(FRNTextStyleCaption2),
10+
@"footnote" : @(FRNTextStyleFootnote),
11+
@"subheadline" : @(FRNTextStyleSubheadline),
12+
@"callout" : @(FRNTextStyleCallout),
13+
@"body" : @(FRNTextStyleBody),
14+
@"headline" : @(FRNTextStyleHeadline),
15+
@"title3" : @(FRNTextStyleTitle3),
16+
@"title2" : @(FRNTextStyleTitle2),
17+
@"title1" : @(FRNTextStyleTitle1),
18+
@"largeTitle" : @(FRNTextStyleLargeTitle),
19+
};
20+
});
21+
return styles;
2222
}
2323

2424
@implementation RCTConvert (FRNTextStyle)
2525

26-
RCT_ENUM_CONVERTER(FRNTextStyle, FRNRecognizedTextStyles(), FRNTextStyleUndefined, integerValue)
26+
RCT_ENUM_CONVERTER(FRNTextStyle, FRNRecognizedTextStyles(),
27+
FRNTextStyleUndefined, integerValue)
2728

2829
@end
2930

3031
NS_ASSUME_NONNULL_BEGIN
3132

3233
UIFontMetrics *FRNUIFontMetricsForTextStyle(FRNTextStyle textStyle) {
33-
static NSDictionary<NSNumber *, UIFontTextStyle> *mapping;
34-
static dispatch_once_t onceToken;
35-
dispatch_once(&onceToken, ^{
36-
mapping = @{
37-
@(FRNTextStyleCaption2): UIFontTextStyleCaption2,
38-
@(FRNTextStyleCaption1): UIFontTextStyleCaption1,
39-
@(FRNTextStyleFootnote): UIFontTextStyleFootnote,
40-
@(FRNTextStyleSubheadline): UIFontTextStyleSubheadline,
41-
@(FRNTextStyleCallout): UIFontTextStyleCallout,
42-
@(FRNTextStyleBody): UIFontTextStyleBody,
43-
@(FRNTextStyleHeadline): UIFontTextStyleHeadline,
44-
@(FRNTextStyleTitle3): UIFontTextStyleTitle3,
45-
@(FRNTextStyleTitle2): UIFontTextStyleTitle2,
46-
@(FRNTextStyleTitle1): UIFontTextStyleTitle1,
47-
@(FRNTextStyleLargeTitle): UIFontTextStyleLargeTitle,
48-
};
49-
});
50-
51-
UIFontTextStyle uiFontTextStyle = mapping[@(textStyle)] ?: UIFontTextStyleBody; // Default to body if we don't recognize the specified ramp
52-
return [UIFontMetrics metricsForTextStyle:uiFontTextStyle];
34+
static NSDictionary<NSNumber *, UIFontTextStyle> *mapping;
35+
static dispatch_once_t onceToken;
36+
dispatch_once(&onceToken, ^{
37+
mapping = @{
38+
@(FRNTextStyleCaption2) : UIFontTextStyleCaption2,
39+
@(FRNTextStyleCaption1) : UIFontTextStyleCaption1,
40+
@(FRNTextStyleFootnote) : UIFontTextStyleFootnote,
41+
@(FRNTextStyleSubheadline) : UIFontTextStyleSubheadline,
42+
@(FRNTextStyleCallout) : UIFontTextStyleCallout,
43+
@(FRNTextStyleBody) : UIFontTextStyleBody,
44+
@(FRNTextStyleHeadline) : UIFontTextStyleHeadline,
45+
@(FRNTextStyleTitle3) : UIFontTextStyleTitle3,
46+
@(FRNTextStyleTitle2) : UIFontTextStyleTitle2,
47+
@(FRNTextStyleTitle1) : UIFontTextStyleTitle1,
48+
@(FRNTextStyleLargeTitle) : UIFontTextStyleLargeTitle,
49+
};
50+
});
51+
52+
UIFontTextStyle uiFontTextStyle =
53+
mapping[@(textStyle)]
54+
?: UIFontTextStyleBody; // Default to body if we don't recognize the
55+
// specified ramp
56+
return [UIFontMetrics metricsForTextStyle:uiFontTextStyle];
5357
}
5458

5559
CGFloat FRNBaseSizeForTextStyle(FRNTextStyle textStyle) {
56-
static NSDictionary<NSNumber *, NSNumber *> *mapping;
57-
static dispatch_once_t onceToken;
58-
dispatch_once(&onceToken, ^{
59-
// Values taken from https://developer.apple.com/design/human-interface-guidelines/foundations/typography/#specifications
60-
mapping = @{
61-
@(FRNTextStyleCaption2): @11,
62-
@(FRNTextStyleCaption1): @12,
63-
@(FRNTextStyleFootnote): @13,
64-
@(FRNTextStyleSubheadline): @15,
65-
@(FRNTextStyleCallout): @16,
66-
@(FRNTextStyleBody): @17,
67-
@(FRNTextStyleHeadline): @17,
68-
@(FRNTextStyleTitle3): @20,
69-
@(FRNTextStyleTitle2): @22,
70-
@(FRNTextStyleTitle1): @28,
71-
@(FRNTextStyleLargeTitle): @34,
72-
};
73-
});
74-
75-
NSNumber *baseSize = mapping[@(textStyle)] ?: @17; // Default to body size if we don't recognize the specified ramp
76-
return CGFLOAT_IS_DOUBLE ? [baseSize doubleValue] : [baseSize floatValue];
60+
static NSDictionary<NSNumber *, NSNumber *> *mapping;
61+
static dispatch_once_t onceToken;
62+
dispatch_once(&onceToken, ^{
63+
// Values taken from
64+
// https://developer.apple.com/design/human-interface-guidelines/typography/#Specifications
65+
mapping = @{
66+
@(FRNTextStyleCaption2) : @11,
67+
@(FRNTextStyleCaption1) : @12,
68+
@(FRNTextStyleFootnote) : @13,
69+
@(FRNTextStyleSubheadline) : @15,
70+
@(FRNTextStyleCallout) : @16,
71+
@(FRNTextStyleBody) : @17,
72+
@(FRNTextStyleHeadline) : @17,
73+
@(FRNTextStyleTitle3) : @20,
74+
@(FRNTextStyleTitle2) : @22,
75+
@(FRNTextStyleTitle1) : @28,
76+
@(FRNTextStyleLargeTitle) : @34,
77+
};
78+
});
79+
80+
NSNumber *baseSize =
81+
mapping[@(textStyle)] ?: @17; // Default to body size if we don't
82+
// recognize the specified ramp
83+
return CGFLOAT_IS_DOUBLE ? [baseSize doubleValue] : [baseSize floatValue];
7784
}
7885

7986
@implementation FRNFontMetrics {
80-
BOOL _hasListeners;
87+
BOOL _hasListeners;
8188
}
8289

83-
+ (BOOL)requiresMainQueueSetup
84-
{
85-
return YES;
90+
+ (BOOL)requiresMainQueueSetup {
91+
return YES;
8692
}
8793

88-
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(currentScaleFactors)
89-
{
90-
NSMutableDictionary *result = [NSMutableDictionary new];
91-
[FRNRecognizedTextStyles() enumerateKeysAndObjectsUsingBlock:^(NSString * styleString, __unused NSNumber * boxedTextStyle, __unused BOOL * stop) {
94+
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(currentScaleFactors) {
95+
NSMutableDictionary *result = [NSMutableDictionary new];
96+
[FRNRecognizedTextStyles()
97+
enumerateKeysAndObjectsUsingBlock:^(NSString *styleString,
98+
__unused NSNumber *boxedTextStyle,
99+
__unused BOOL *stop) {
92100
result[styleString] = [self scaleFactorForStyle:styleString];
93-
}];
94-
return result;
101+
}];
102+
return result;
95103
}
96104

97-
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(scaleFactorForStyle:(NSString *)styleString)
98-
{
99-
FRNTextStyle style = [RCTConvert FRNTextStyle:styleString];
100-
UIFontMetrics *fontMetrics = FRNUIFontMetricsForTextStyle(style);
101-
CGFloat baseSize = FRNBaseSizeForTextStyle(style);
102-
CGFloat scaleFactor = [fontMetrics scaledValueForValue:baseSize] / baseSize;
103-
return @(scaleFactor);
105+
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(scaleFactorForStyle
106+
: (NSString *)styleString) {
107+
FRNTextStyle style = [RCTConvert FRNTextStyle:styleString];
108+
UIFontMetrics *fontMetrics = FRNUIFontMetricsForTextStyle(style);
109+
CGFloat baseSize = FRNBaseSizeForTextStyle(style);
110+
CGFloat scaleFactor = [fontMetrics scaledValueForValue:baseSize] / baseSize;
111+
return @(scaleFactor);
104112
}
105113

106114
#pragma mark - RCTEventEmitter
107115

108-
- (NSArray<NSString *> *_Nullable)supportedEvents
109-
{
110-
return @[ @"onFontMetricsChanged" ];
116+
- (NSArray<NSString *> *_Nullable)supportedEvents {
117+
return @[ @"onFontMetricsChanged" ];
111118
}
112119

113-
- (void)startObserving
114-
{
115-
_hasListeners = YES;
116-
[[NSNotificationCenter defaultCenter] addObserver:self
117-
selector:@selector(onFontMetricsChanged:)
118-
name:UIContentSizeCategoryDidChangeNotification
119-
object:nil];
120+
- (void)startObserving {
121+
_hasListeners = YES;
122+
[[NSNotificationCenter defaultCenter]
123+
addObserver:self
124+
selector:@selector(onFontMetricsChanged:)
125+
name:UIContentSizeCategoryDidChangeNotification
126+
object:nil];
120127
}
121128

122-
- (void)stopObserving
123-
{
124-
_hasListeners = NO;
125-
[[NSNotificationCenter defaultCenter] removeObserver:self];
129+
- (void)stopObserving {
130+
_hasListeners = NO;
131+
[[NSNotificationCenter defaultCenter] removeObserver:self];
126132
}
127133

128134
#pragma mark - Event processing
129135

130136
- (void)onFontMetricsChanged:(NSNotification *)notification {
131-
if (_hasListeners) {
132-
[self sendEventWithName:@"onFontMetricsChanged" body:@{@"newScaleFactors": [self currentScaleFactors]}];
133-
}
137+
if (_hasListeners) {
138+
[self sendEventWithName:@"onFontMetricsChanged"
139+
body:@{@"newScaleFactors" : [self currentScaleFactors]}];
140+
}
134141
}
135142

136143
RCT_EXPORT_MODULE();

packages/theming/apple-theme/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ Some heuristics followed in this theme:
99
- For most tokens, we default to prefer the apple system colors, using the FluentUI Apple Palette where it makes sense. These mappings are subject to change as we increment on the design.
1010
- On apple platforms, there tends to not be a "hover" state for components such as Button, so those tokens are mapped to be identical to the rest state (normal state) tokens.
1111
- Similarly, there is not a "checked" state for most components, so those tokens are mapped to the rest state tokens.
12-
- The typography is designed to match the variants provided by the [Apple HIG](https://developer.apple.com/design/human-interface-guidelines/foundations/typography/) for regular and "emphasized". As such, the "Semibold" variants do not always map to the semibold weight, but whatever weight the Apple HIG specifies.
12+
- The typography is designed to match the variants provided by the [Apple HIG](https://developer.apple.com/design/human-interface-guidelines/typography/) for regular and "emphasized". As such, the "Semibold" variants do not always map to the semibold weight, but whatever weight the Apple HIG specifies.

packages/theming/apple-theme/src/appleTypography.macos.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { FontSize, FontSizes, FontWeightValue, Typography, Variants } from
22

33
/**
44
* The Typography is designed to match the styles defined in the Apple HIG:
5-
* https://developer.apple.com/design/human-interface-guidelines/macos/visual-design/typography/
5+
* https://developer.apple.com/design/human-interface-guidelines/typography
66
* These mappings and variants are subject to change as we moved to a unified cross platform Fluent typography ramp
77
* Github #598 also tracks pulling these values from a Native Module rather than hardcoding the numbers in JS.
88
*/

0 commit comments

Comments
 (0)