react-native-macos 0.66.31 → 0.66.34
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/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +22 -12
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/React/Base/RCTVersion.m +1 -1
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/package.json +1 -1
- package/template/package.json +1 -1
|
@@ -77,9 +77,8 @@ const AccessibilityInfo = {
|
|
|
77
77
|
* See https://reactnative.dev/docs/accessibilityinfo.html#isBoldTextEnabled
|
|
78
78
|
*/
|
|
79
79
|
isBoldTextEnabled(): Promise<boolean> {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
} else {
|
|
80
|
+
// [TODO(macOS GH#774) - rework logic to return Promise.resolve(false) on macOS
|
|
81
|
+
if (Platform.OS === 'ios') {
|
|
83
82
|
return new Promise((resolve, reject) => {
|
|
84
83
|
if (NativeAccessibilityManagerApple != null) {
|
|
85
84
|
NativeAccessibilityManagerApple.getCurrentBoldTextState(
|
|
@@ -90,7 +89,10 @@ const AccessibilityInfo = {
|
|
|
90
89
|
reject(null);
|
|
91
90
|
}
|
|
92
91
|
});
|
|
92
|
+
} else {
|
|
93
|
+
return Promise.resolve(false);
|
|
93
94
|
}
|
|
95
|
+
// ]TODO(macOS GH#774)
|
|
94
96
|
},
|
|
95
97
|
|
|
96
98
|
/**
|
|
@@ -102,9 +104,8 @@ const AccessibilityInfo = {
|
|
|
102
104
|
* See https://reactnative.dev/docs/accessibilityinfo.html#isGrayscaleEnabled
|
|
103
105
|
*/
|
|
104
106
|
isGrayscaleEnabled(): Promise<boolean> {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
} else {
|
|
107
|
+
// [TODO(macOS GH#774) - rework logic to return Promise.resolve(false) on macOS
|
|
108
|
+
if (Platform.OS === 'ios') {
|
|
108
109
|
return new Promise((resolve, reject) => {
|
|
109
110
|
if (NativeAccessibilityManagerApple != null) {
|
|
110
111
|
NativeAccessibilityManagerApple.getCurrentGrayscaleState(
|
|
@@ -115,12 +116,16 @@ const AccessibilityInfo = {
|
|
|
115
116
|
reject(null);
|
|
116
117
|
}
|
|
117
118
|
});
|
|
119
|
+
} else {
|
|
120
|
+
return Promise.resolve(false);
|
|
118
121
|
}
|
|
122
|
+
// ]TODO(macOS GH#774)
|
|
119
123
|
},
|
|
120
124
|
|
|
121
125
|
/**
|
|
122
126
|
* macOS only
|
|
123
127
|
*/
|
|
128
|
+
// [TODO(macOS GH#774)
|
|
124
129
|
isHighContrastEnabled: function(): Promise<boolean> {
|
|
125
130
|
if (Platform.OS === 'macos') {
|
|
126
131
|
return new Promise((resolve, reject) => {
|
|
@@ -137,6 +142,7 @@ const AccessibilityInfo = {
|
|
|
137
142
|
return Promise.resolve(false);
|
|
138
143
|
}
|
|
139
144
|
},
|
|
145
|
+
// ]TODO(macOS GH#774)
|
|
140
146
|
|
|
141
147
|
/**
|
|
142
148
|
* Query whether inverted colors are currently enabled.
|
|
@@ -147,9 +153,8 @@ const AccessibilityInfo = {
|
|
|
147
153
|
* See https://reactnative.dev/docs/accessibilityinfo.html#isInvertColorsEnabled
|
|
148
154
|
*/
|
|
149
155
|
isInvertColorsEnabled(): Promise<boolean> {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
} else {
|
|
156
|
+
// [TODO(macOS GH#774) - rework logic to return Promise.resolve(false) on macOS
|
|
157
|
+
if (Platform.OS === 'ios') {
|
|
153
158
|
return new Promise((resolve, reject) => {
|
|
154
159
|
if (NativeAccessibilityManagerApple != null) {
|
|
155
160
|
NativeAccessibilityManagerApple.getCurrentInvertColorsState(
|
|
@@ -160,7 +165,10 @@ const AccessibilityInfo = {
|
|
|
160
165
|
reject(null);
|
|
161
166
|
}
|
|
162
167
|
});
|
|
168
|
+
} else {
|
|
169
|
+
return Promise.resolve(false);
|
|
163
170
|
}
|
|
171
|
+
// ]TODO(macOS GH#774)
|
|
164
172
|
},
|
|
165
173
|
|
|
166
174
|
/**
|
|
@@ -201,9 +209,8 @@ const AccessibilityInfo = {
|
|
|
201
209
|
* See https://reactnative.dev/docs/accessibilityinfo.html#isReduceTransparencyEnabled
|
|
202
210
|
*/
|
|
203
211
|
isReduceTransparencyEnabled(): Promise<boolean> {
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
} else {
|
|
212
|
+
// [TODO(macOS GH#774) - rework logic to return Promise.resolve(false) on macOS
|
|
213
|
+
if (Platform.OS === 'ios') {
|
|
207
214
|
return new Promise((resolve, reject) => {
|
|
208
215
|
if (NativeAccessibilityManagerApple != null) {
|
|
209
216
|
NativeAccessibilityManagerApple.getCurrentReduceTransparencyState(
|
|
@@ -214,7 +221,10 @@ const AccessibilityInfo = {
|
|
|
214
221
|
reject(null);
|
|
215
222
|
}
|
|
216
223
|
});
|
|
224
|
+
} else {
|
|
225
|
+
return Promise.resolve(false);
|
|
217
226
|
}
|
|
227
|
+
// ]TODO(macOS GH#774)
|
|
218
228
|
},
|
|
219
229
|
|
|
220
230
|
/**
|
package/React/Base/RCTVersion.m
CHANGED
package/package.json
CHANGED