react-native-windows 0.0.0-canary.652 → 0.0.0-canary.653
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/.flowconfig +1 -1
- package/Libraries/Animated/NativeAnimatedHelper.js +1 -3
- package/Libraries/Animated/NativeAnimatedModule.js +5 -1
- package/Libraries/Animated/NativeAnimatedTurboModule.js +6 -3
- package/Libraries/Animated/shouldUseTurboAnimatedModule.js +17 -0
- package/Libraries/Components/TextInput/TextInput.windows.js +6 -0
- package/Libraries/Components/View/View.windows.js +15 -6
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/DOM/Nodes/ReadOnlyCharacterData.js +1 -1
- package/Libraries/Inspector/NetworkOverlay.js +1 -1
- package/Libraries/LogBox/UI/AnsiHighlight.js +1 -1
- package/Libraries/LogBox/UI/LogBoxMessage.js +4 -7
- package/Libraries/ReactNative/AppRegistry.d.ts +0 -5
- package/Libraries/Utilities/PolyfillFunctions.js +1 -1
- package/Microsoft.ReactNative/Fabric/ImageRequest.cpp +4 -14
- package/Microsoft.ReactNative/Modules/NativeUIManager.cpp +1 -1
- package/Microsoft.ReactNative/Views/ControlViewManager.cpp +3 -6
- package/Microsoft.ReactNative/Views/ViewViewManager.cpp +3 -10
- package/Mso/compilerAdapters/compilerFeatures.h +1 -1
- package/PropertySheets/Generated/PackageVersion.g.props +2 -2
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/Bridging.h +20 -0
- package/ReactCommon/Yoga.cpp +4 -11
- package/package.json +4 -4
package/.flowconfig
CHANGED
|
@@ -28,9 +28,7 @@ import invariant from 'invariant';
|
|
|
28
28
|
|
|
29
29
|
// TODO T69437152 @petetheheat - Delete this fork when Fabric ships to 100%.
|
|
30
30
|
const NativeAnimatedModule =
|
|
31
|
-
|
|
32
|
-
? NativeAnimatedTurboModule
|
|
33
|
-
: NativeAnimatedNonTurboModule;
|
|
31
|
+
NativeAnimatedNonTurboModule ?? NativeAnimatedTurboModule;
|
|
34
32
|
|
|
35
33
|
let __nativeAnimatedNodeTagCount = 1; /* used for animated nodes */
|
|
36
34
|
let __nativeAnimationIdCount = 1; /* used for started animations */
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
import type {TurboModule} from '../TurboModule/RCTExport';
|
|
12
12
|
|
|
13
13
|
import * as TurboModuleRegistry from '../TurboModule/TurboModuleRegistry';
|
|
14
|
+
import shouldUseTurboAnimatedModule from './shouldUseTurboAnimatedModule';
|
|
14
15
|
|
|
15
16
|
type EndResult = {finished: boolean, ...};
|
|
16
17
|
type EndCallback = (result: EndResult) => void;
|
|
@@ -70,4 +71,7 @@ export interface Spec extends TurboModule {
|
|
|
70
71
|
+queueAndExecuteBatchedOperations?: (operationsAndArgs: Array<any>) => void;
|
|
71
72
|
}
|
|
72
73
|
|
|
73
|
-
|
|
74
|
+
const NativeModule: ?Spec = !shouldUseTurboAnimatedModule()
|
|
75
|
+
? TurboModuleRegistry.get<Spec>('NativeAnimatedModule')
|
|
76
|
+
: null;
|
|
77
|
+
export default NativeModule;
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
import type {TurboModule} from '../TurboModule/RCTExport';
|
|
12
12
|
|
|
13
13
|
import * as TurboModuleRegistry from '../TurboModule/TurboModuleRegistry';
|
|
14
|
+
import shouldUseTurboAnimatedModule from './shouldUseTurboAnimatedModule';
|
|
14
15
|
|
|
15
16
|
type EndResult = {finished: boolean, ...};
|
|
16
17
|
type EndCallback = (result: EndResult) => void;
|
|
@@ -70,6 +71,8 @@ export interface Spec extends TurboModule {
|
|
|
70
71
|
+queueAndExecuteBatchedOperations?: (operationsAndArgs: Array<any>) => void;
|
|
71
72
|
}
|
|
72
73
|
|
|
73
|
-
|
|
74
|
-
'NativeAnimatedTurboModule'
|
|
75
|
-
|
|
74
|
+
const NativeModule: ?Spec = shouldUseTurboAnimatedModule()
|
|
75
|
+
? TurboModuleRegistry.get<Spec>('NativeAnimatedTurboModule')
|
|
76
|
+
: null;
|
|
77
|
+
|
|
78
|
+
export default NativeModule;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
* @flow
|
|
8
|
+
* @format
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import Platform from '../Utilities/Platform';
|
|
12
|
+
|
|
13
|
+
function shouldUseTurboAnimatedModule(): boolean {
|
|
14
|
+
return Platform.OS === 'ios' && global.RN$Bridgeless === true;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export default shouldUseTurboAnimatedModule;
|
|
@@ -1513,6 +1513,12 @@ function InternalTextInput(props: Props): React.Node {
|
|
|
1513
1513
|
};
|
|
1514
1514
|
}
|
|
1515
1515
|
|
|
1516
|
+
if (focusable && !accessible) {
|
|
1517
|
+
console.warn(
|
|
1518
|
+
'All focusable views should report proper accessiblity information. TextInputs marked as focusable should always be accessible.',
|
|
1519
|
+
);
|
|
1520
|
+
}
|
|
1521
|
+
|
|
1516
1522
|
// $FlowFixMe[underconstrained-implicit-instantiation]
|
|
1517
1523
|
let style = flattenStyle(props.style);
|
|
1518
1524
|
|
|
@@ -183,6 +183,19 @@ const View: React.AbstractComponent<
|
|
|
183
183
|
return updatedChildren;
|
|
184
184
|
}
|
|
185
185
|
};
|
|
186
|
+
|
|
187
|
+
const _focusable = tabIndex !== undefined ? !tabIndex : focusable;
|
|
188
|
+
const _accessible =
|
|
189
|
+
importantForAccessibility === 'no-hide-descendants'
|
|
190
|
+
? false
|
|
191
|
+
: otherProps.accessible;
|
|
192
|
+
|
|
193
|
+
if (_focusable === true && _accessible === false) {
|
|
194
|
+
console.warn(
|
|
195
|
+
'All focusable views should report proper accessiblity information. Views marked as focusable should always be accessible.',
|
|
196
|
+
);
|
|
197
|
+
}
|
|
198
|
+
|
|
186
199
|
// Windows]
|
|
187
200
|
|
|
188
201
|
return (
|
|
@@ -205,7 +218,7 @@ const View: React.AbstractComponent<
|
|
|
205
218
|
: ariaLive ?? accessibilityLiveRegion
|
|
206
219
|
}
|
|
207
220
|
accessibilityLabel={ariaLabel ?? accessibilityLabel}
|
|
208
|
-
focusable={
|
|
221
|
+
focusable={_focusable}
|
|
209
222
|
disabled={disabled}
|
|
210
223
|
accessibilityState={_accessibilityState}
|
|
211
224
|
accessibilityRole={
|
|
@@ -230,11 +243,7 @@ const View: React.AbstractComponent<
|
|
|
230
243
|
onKeyUp={_keyUp}
|
|
231
244
|
onKeyUpCapture={_keyUpCapture}
|
|
232
245
|
// [Windows
|
|
233
|
-
accessible={
|
|
234
|
-
importantForAccessibility === 'no-hide-descendants'
|
|
235
|
-
? false
|
|
236
|
-
: otherProps.accessible
|
|
237
|
-
}
|
|
246
|
+
accessible={_accessible}
|
|
238
247
|
children={
|
|
239
248
|
importantForAccessibility === 'no-hide-descendants'
|
|
240
249
|
? childrenWithImportantForAccessibility(otherProps.children)
|
|
@@ -67,6 +67,6 @@ export default class ReadOnlyCharacterData extends ReadOnlyNode {
|
|
|
67
67
|
);
|
|
68
68
|
}
|
|
69
69
|
let adjustedCount = count < 0 || count > data.length ? data.length : count;
|
|
70
|
-
return data.
|
|
70
|
+
return data.slice(offset, offset + adjustedCount);
|
|
71
71
|
}
|
|
72
72
|
}
|
|
@@ -73,7 +73,7 @@ export default function Ansi({
|
|
|
73
73
|
return content.replace(/\| $/, ' ');
|
|
74
74
|
} else if (key === 2 && commonWhitespaceLength < Infinity) {
|
|
75
75
|
// Remove common whitespace at the beginning of the line
|
|
76
|
-
return content.
|
|
76
|
+
return content.slice(commonWhitespaceLength);
|
|
77
77
|
} else {
|
|
78
78
|
return content;
|
|
79
79
|
}
|
|
@@ -138,17 +138,14 @@ function LogBoxMessage(props: Props): React.Node {
|
|
|
138
138
|
const key = String(index);
|
|
139
139
|
|
|
140
140
|
if (substitution.offset > prevOffset) {
|
|
141
|
-
const prevPart = content.
|
|
142
|
-
prevOffset,
|
|
143
|
-
substitution.offset - prevOffset,
|
|
144
|
-
);
|
|
141
|
+
const prevPart = content.slice(prevOffset, substitution.offset);
|
|
145
142
|
|
|
146
143
|
createUnderLength(key, prevPart);
|
|
147
144
|
}
|
|
148
145
|
|
|
149
|
-
const substitutionPart = content.
|
|
146
|
+
const substitutionPart = content.slice(
|
|
150
147
|
substitution.offset,
|
|
151
|
-
substitution.length,
|
|
148
|
+
substitution.offset + substitution.length,
|
|
152
149
|
);
|
|
153
150
|
|
|
154
151
|
createUnderLength(key + '.5', substitutionPart, substitutionStyle);
|
|
@@ -156,7 +153,7 @@ function LogBoxMessage(props: Props): React.Node {
|
|
|
156
153
|
}, 0);
|
|
157
154
|
|
|
158
155
|
if (lastOffset < content.length) {
|
|
159
|
-
const lastPart = content.
|
|
156
|
+
const lastPart = content.slice(lastOffset);
|
|
160
157
|
createUnderLength('-1', lastPart);
|
|
161
158
|
}
|
|
162
159
|
|
|
@@ -85,11 +85,6 @@ export namespace AppRegistry {
|
|
|
85
85
|
displayMode?: number,
|
|
86
86
|
): void;
|
|
87
87
|
|
|
88
|
-
export function registerHeadlessTask(
|
|
89
|
-
appKey: string,
|
|
90
|
-
task: TaskProvider,
|
|
91
|
-
): void;
|
|
92
|
-
|
|
93
88
|
export function getRunnable(appKey: string): Runnable | undefined;
|
|
94
89
|
|
|
95
90
|
export function getRegistry(): {sections: string[]; runnables: Runnable[]};
|
|
@@ -32,7 +32,7 @@ function polyfillObjectProperty<T>(
|
|
|
32
32
|
): void {
|
|
33
33
|
const descriptor = Object.getOwnPropertyDescriptor<$FlowFixMe>(object, name);
|
|
34
34
|
if (__DEV__ && descriptor) {
|
|
35
|
-
const backupName = `original${name[0].toUpperCase()}${name.
|
|
35
|
+
const backupName = `original${name[0].toUpperCase()}${name.slice(1)}`;
|
|
36
36
|
Object.defineProperty(object, backupName, descriptor);
|
|
37
37
|
}
|
|
38
38
|
|
|
@@ -12,27 +12,17 @@ ImageRequest::ImageRequest(ImageSource imageSource, std::shared_ptr<const ImageT
|
|
|
12
12
|
coordinator_ = std::make_shared<ImageResponseObserverCoordinator>();
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
coordinator_(std::move(other.coordinator_)) {
|
|
19
|
-
other.coordinator_ = nullptr;
|
|
20
|
-
other.cancelRequest_ = nullptr;
|
|
21
|
-
other.telemetry_ = nullptr;
|
|
22
|
-
other.imageSource_ = {};
|
|
15
|
+
// cspell:disable-next-line
|
|
16
|
+
void ImageRequest::setCancelationFunction(std::function<void(void)> cancellationFunction) {
|
|
17
|
+
cancelRequest_ = cancellationFunction;
|
|
23
18
|
}
|
|
24
19
|
|
|
25
|
-
ImageRequest
|
|
20
|
+
void ImageRequest::cancel() const {
|
|
26
21
|
if (cancelRequest_) {
|
|
27
22
|
cancelRequest_();
|
|
28
23
|
}
|
|
29
24
|
}
|
|
30
25
|
|
|
31
|
-
// cspell:disable-next-line
|
|
32
|
-
void ImageRequest::setCancelationFunction(std::function<void(void)> cancellationFunction) {
|
|
33
|
-
cancelRequest_ = cancellationFunction;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
26
|
const ImageSource &ImageRequest::getImageSource() const {
|
|
37
27
|
return imageSource_;
|
|
38
28
|
}
|
|
@@ -154,7 +154,7 @@ NativeUIManager::NativeUIManager(winrt::Microsoft::ReactNative::ReactContext con
|
|
|
154
154
|
if (React::implementation::QuirkSettings::GetUseWebFlexBasisBehavior(m_context.Properties()))
|
|
155
155
|
YGConfigSetExperimentalFeatureEnabled(m_yogaConfig, YGExperimentalFeatureWebFlexBasis, true);
|
|
156
156
|
if (React::implementation::QuirkSettings::GetMatchAndroidAndIOSStretchBehavior(m_context.Properties()))
|
|
157
|
-
|
|
157
|
+
YGConfigSetErrata(m_yogaConfig, YGErrataStretchFlexBasis);
|
|
158
158
|
|
|
159
159
|
#if defined(_DEBUG)
|
|
160
160
|
YGConfigSetLogger(m_yogaConfig, &YogaLog);
|
|
@@ -125,12 +125,9 @@ void ControlViewManager::SetLayoutProps(
|
|
|
125
125
|
|
|
126
126
|
void ControlViewManager::OnPropertiesUpdated(ShadowNodeBase *node) {
|
|
127
127
|
auto control(node->GetView().as<xaml::Controls::Control>());
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
const auto isTabStop = !node->IsDisable() && (node->IsAccessible() && node->IsFocusable());
|
|
132
|
-
const auto accessibilityView =
|
|
133
|
-
isTabStop ? xaml::Automation::Peers::AccessibilityView::Content : xaml::Automation::Peers::AccessibilityView::Raw;
|
|
128
|
+
const auto isTabStop = !node->IsDisable() && node->IsFocusable();
|
|
129
|
+
const auto accessibilityView = node->IsAccessible() ? xaml::Automation::Peers::AccessibilityView::Content
|
|
130
|
+
: xaml::Automation::Peers::AccessibilityView::Raw;
|
|
134
131
|
control.IsTabStop(isTabStop);
|
|
135
132
|
xaml::Automation::AutomationProperties::SetAccessibilityView(control, accessibilityView);
|
|
136
133
|
}
|
|
@@ -590,20 +590,13 @@ void ViewViewManager::TryUpdateView(
|
|
|
590
590
|
}
|
|
591
591
|
|
|
592
592
|
void ViewViewManager::SyncFocusableAndAccessible(ViewShadowNode *pViewShadowNode, bool useControl) {
|
|
593
|
-
// If developer specifies either the accessible and focusable prop to be false
|
|
594
|
-
// remove accessibility and keyboard focus for component. Exception is made
|
|
595
|
-
// for case where a View with undefined onPress is specified, where
|
|
596
|
-
// component gains accessibility focus when either the accessible and focusable prop are true.
|
|
597
593
|
if (useControl) {
|
|
598
594
|
const auto isFocusable = pViewShadowNode->IsFocusable();
|
|
599
595
|
const auto isAccessible = pViewShadowNode->IsAccessible();
|
|
600
|
-
const auto isPressable = pViewShadowNode->OnClick();
|
|
601
596
|
const auto isDisabled = pViewShadowNode->IsDisable();
|
|
602
|
-
const auto isTabStop =
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
const auto accessibilityView = isTabStop ? xaml::Automation::Peers::AccessibilityView::Content
|
|
606
|
-
: xaml::Automation::Peers::AccessibilityView::Raw;
|
|
597
|
+
const auto isTabStop = !isDisabled && isFocusable;
|
|
598
|
+
const auto accessibilityView = isAccessible ? xaml::Automation::Peers::AccessibilityView::Content
|
|
599
|
+
: xaml::Automation::Peers::AccessibilityView::Raw;
|
|
607
600
|
pViewShadowNode->GetControl().IsTabStop(isTabStop);
|
|
608
601
|
xaml::Automation::AutomationProperties::SetAccessibilityView(pViewShadowNode->GetControl(), accessibilityView);
|
|
609
602
|
}
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
|
|
21
21
|
// Check if compiler supports UUID
|
|
22
22
|
#ifndef COMPILER_SUPPORTS_UUID
|
|
23
|
-
#if defined(__clang__) || defined(__GNUC__)
|
|
23
|
+
#if (defined(__APPLE__) && defined(__clang__)) || defined(__GNUC__)
|
|
24
24
|
#define COMPILER_SUPPORTS_UUID 0
|
|
25
25
|
#elif defined(_MSC_VER)
|
|
26
26
|
#define COMPILER_SUPPORTS_UUID 1
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
-->
|
|
11
11
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
12
12
|
<PropertyGroup>
|
|
13
|
-
<ReactNativeWindowsVersion>0.0.0-canary.
|
|
13
|
+
<ReactNativeWindowsVersion>0.0.0-canary.653</ReactNativeWindowsVersion>
|
|
14
14
|
<ReactNativeWindowsMajor>0</ReactNativeWindowsMajor>
|
|
15
15
|
<ReactNativeWindowsMinor>0</ReactNativeWindowsMinor>
|
|
16
16
|
<ReactNativeWindowsPatch>0</ReactNativeWindowsPatch>
|
|
17
17
|
<ReactNativeWindowsCanary>true</ReactNativeWindowsCanary>
|
|
18
|
-
<ReactNativeWindowsCommitId>
|
|
18
|
+
<ReactNativeWindowsCommitId>47eeb713077963b7e41a80265d16bbeee568d674</ReactNativeWindowsCommitId>
|
|
19
19
|
</PropertyGroup>
|
|
20
20
|
</Project>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <react/bridging/AString.h>
|
|
11
|
+
#include <react/bridging/Array.h>
|
|
12
|
+
#include <react/bridging/Bool.h>
|
|
13
|
+
#include <react/bridging/Class.h>
|
|
14
|
+
// #include <react/bridging/Dynamic.h> // Line causes Error C1083 Cannot open include file: 'double-conversion/double-conversion.h' #11644
|
|
15
|
+
#include <react/bridging/Error.h>
|
|
16
|
+
#include <react/bridging/Function.h>
|
|
17
|
+
#include <react/bridging/Number.h>
|
|
18
|
+
#include <react/bridging/Object.h>
|
|
19
|
+
#include <react/bridging/Promise.h>
|
|
20
|
+
#include <react/bridging/Value.h>
|
package/ReactCommon/Yoga.cpp
CHANGED
|
@@ -11,22 +11,15 @@
|
|
|
11
11
|
#include <algorithm>
|
|
12
12
|
#include <atomic>
|
|
13
13
|
#include <memory>
|
|
14
|
+
|
|
15
|
+
#include <yoga/Yoga.h>
|
|
16
|
+
|
|
17
|
+
#include "log.h"
|
|
14
18
|
#include "Utils.h"
|
|
15
19
|
#include "YGNode.h"
|
|
16
20
|
#include "YGNodePrint.h"
|
|
17
21
|
#include "Yoga-internal.h"
|
|
18
22
|
#include "event/event.h"
|
|
19
|
-
#include "log.h"
|
|
20
|
-
#ifdef _MSC_VER
|
|
21
|
-
#include <float.h>
|
|
22
|
-
|
|
23
|
-
/* define fmaxf if < VC12 */
|
|
24
|
-
#if _MSC_VER < 1800
|
|
25
|
-
__forceinline const float fmaxf(const float a, const float b) {
|
|
26
|
-
return (a > b) ? a : b;
|
|
27
|
-
}
|
|
28
|
-
#endif
|
|
29
|
-
#endif
|
|
30
23
|
|
|
31
24
|
using namespace facebook::yoga;
|
|
32
25
|
using detail::Log;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-windows",
|
|
3
|
-
"version": "0.0.0-canary.
|
|
3
|
+
"version": "0.0.0-canary.653",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -73,20 +73,20 @@
|
|
|
73
73
|
"@types/react": "^18.0.18",
|
|
74
74
|
"eslint": "^8.19.0",
|
|
75
75
|
"eslint-plugin-prettier": "^4.2.1",
|
|
76
|
-
"flow-bin": "^0.
|
|
76
|
+
"flow-bin": "^0.205.1",
|
|
77
77
|
"jscodeshift": "^0.14.0",
|
|
78
78
|
"just-scripts": "^1.3.3",
|
|
79
79
|
"metro-config": "0.76.2",
|
|
80
80
|
"prettier": "^2.4.1",
|
|
81
81
|
"react": "18.2.0",
|
|
82
|
-
"react-native": "0.0.0-
|
|
82
|
+
"react-native": "0.0.0-20230505-2109-9b69263a1",
|
|
83
83
|
"react-native-platform-override": "^1.9.7",
|
|
84
84
|
"react-refresh": "^0.4.0",
|
|
85
85
|
"typescript": "^4.9.5"
|
|
86
86
|
},
|
|
87
87
|
"peerDependencies": {
|
|
88
88
|
"react": "18.2.0",
|
|
89
|
-
"react-native": "0.0.0-
|
|
89
|
+
"react-native": "0.0.0-20230505-2109-9b69263a1"
|
|
90
90
|
},
|
|
91
91
|
"beachball": {
|
|
92
92
|
"defaultNpmTag": "canary",
|