react-native-windows 0.75.3 → 0.76.0-preview.1
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 +6 -4
- package/Directory.Build.props +4 -0
- package/Directory.Build.targets +5 -0
- package/Libraries/Alert/Alert.js +3 -0
- package/Libraries/Alert/Alert.windows.js +3 -0
- package/Libraries/Animated/AnimatedEvent.js +1 -1
- package/Libraries/Animated/AnimatedImplementation.js +7 -7
- package/Libraries/Animated/NativeAnimatedAllowlist.js +111 -0
- package/Libraries/Animated/animations/Animation.js +11 -1
- package/Libraries/Animated/animations/DecayAnimation.js +1 -1
- package/Libraries/Animated/animations/SpringAnimation.js +1 -1
- package/Libraries/Animated/animations/TimingAnimation.js +2 -1
- package/Libraries/Animated/components/AnimatedScrollView.js +3 -2
- package/Libraries/Animated/createAnimatedComponent.js +10 -9
- package/Libraries/Animated/nodes/AnimatedColor.js +1 -1
- package/Libraries/Animated/nodes/AnimatedInterpolation.js +3 -2
- package/Libraries/Animated/nodes/AnimatedNode.js +42 -33
- package/Libraries/Animated/nodes/AnimatedObject.js +56 -50
- package/Libraries/Animated/nodes/AnimatedProps.js +77 -40
- package/Libraries/Animated/nodes/AnimatedStyle.js +103 -59
- package/Libraries/Animated/nodes/AnimatedTracking.js +1 -1
- package/Libraries/Animated/nodes/AnimatedTransform.js +102 -67
- package/Libraries/Animated/nodes/AnimatedValue.js +2 -1
- package/Libraries/Animated/nodes/AnimatedWithChildren.js +21 -22
- package/Libraries/Animated/useAnimatedProps.js +142 -7
- package/Libraries/BatchedBridge/NativeModules.js +2 -0
- package/Libraries/Blob/FileReader.js +1 -1
- package/Libraries/Blob/URL.js +2 -62
- package/Libraries/Blob/URLSearchParams.js +71 -0
- package/Libraries/Components/Button.windows.js +0 -1
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +1 -1
- package/Libraries/Components/Keyboard/KeyboardExt.js.map +1 -1
- package/Libraries/Components/RefreshControl/__mocks__/RefreshControlMock.js +1 -1
- package/Libraries/Components/ScrollView/ScrollView.js +131 -169
- package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +1 -1
- package/Libraries/Components/StatusBar/StatusBar.js +3 -1
- package/Libraries/Components/TextInput/TextInput.d.ts +32 -2
- package/Libraries/Components/TextInput/TextInput.js +230 -94
- package/Libraries/Components/TextInput/TextInput.windows.js +230 -105
- package/Libraries/Components/View/ReactNativeStyleAttributes.js +22 -0
- package/Libraries/Components/View/ReactNativeViewAttributes.js +2 -0
- package/Libraries/Components/View/ReactNativeViewAttributes.windows.js +2 -0
- package/Libraries/Components/View/View.windows.js +32 -30
- package/Libraries/Components/View/ViewAccessibility.d.ts +15 -0
- package/Libraries/Components/View/ViewNativeComponent.js +0 -1
- package/Libraries/Components/View/ViewPropTypes.js +14 -0
- package/Libraries/Components/View/ViewPropTypes.windows.js +14 -0
- package/Libraries/Core/ExceptionsManager.js +2 -0
- package/Libraries/Core/InitializeCore.js +3 -1
- package/Libraries/Core/ReactFiberErrorDialog.js +3 -0
- package/Libraries/Core/ReactNativeVersion.js +4 -4
- package/Libraries/Core/setUpErrorHandling.js +7 -1
- package/Libraries/Core/setUpGlobals.js +1 -0
- package/Libraries/Core/setUpReactRefresh.js +0 -4
- package/Libraries/Image/AssetSourceResolver.js +28 -1
- package/Libraries/Image/AssetSourceResolver.windows.js +28 -1
- package/Libraries/Image/Image.android.js +9 -14
- package/Libraries/Image/Image.ios.js +11 -22
- package/Libraries/Image/Image.windows.js +11 -22
- package/Libraries/Image/ImageBackground.js +1 -8
- package/Libraries/Image/ImageUtils.js +9 -9
- package/Libraries/Image/ImageViewNativeComponent.js +1 -0
- package/Libraries/Inspector/Inspector.js +3 -2
- package/Libraries/Inspector/InspectorPanel.js +16 -10
- package/Libraries/Inspector/NetworkOverlay.js +1 -1
- package/Libraries/Interaction/TaskQueue.js +1 -0
- package/Libraries/Lists/FlatList.js +1 -1
- package/Libraries/Lists/SectionList.js +2 -2
- package/Libraries/Lists/SectionListModern.js +3 -3
- package/Libraries/LogBox/Data/LogBoxData.js +24 -3
- package/Libraries/LogBox/LogBoxNotificationContainer.js +3 -2
- package/Libraries/LogBox/UI/LogBoxInspectorHeader.js +9 -8
- package/Libraries/LogBox/UI/LogBoxInspectorHeader.windows.js +9 -8
- package/Libraries/Modal/Modal.js +0 -1
- package/Libraries/NativeComponent/BaseViewConfig.android.js +8 -0
- package/Libraries/NativeComponent/BaseViewConfig.ios.js +7 -0
- package/Libraries/NativeComponent/BaseViewConfig.windows.js +7 -0
- package/Libraries/NativeComponent/NativeComponentRegistry.js +22 -22
- package/Libraries/NativeComponent/StaticViewConfigValidator.js +0 -21
- package/Libraries/Network/XMLHttpRequest.js +4 -2
- package/Libraries/ReactNative/AppContainer-dev.js +1 -5
- package/Libraries/ReactNative/AppContainer-prod.js +1 -5
- package/Libraries/ReactNative/AppContainer.js +1 -2
- package/Libraries/ReactNative/AppRegistry.d.ts +0 -4
- package/Libraries/ReactNative/AppRegistry.js +1 -7
- package/Libraries/ReactNative/BridgelessUIManager.js +1 -0
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent.js +1 -1
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.js +5 -5
- package/Libraries/ReactNative/RendererImplementation.js +26 -4
- package/Libraries/ReactNative/getNativeComponentAttributes.js +8 -0
- package/Libraries/ReactNative/renderApplication.js +1 -3
- package/Libraries/Renderer/shims/ReactNativeTypes.js +11 -4
- package/Libraries/StyleSheet/StyleSheet.js +1 -1
- package/Libraries/StyleSheet/StyleSheetTypes.d.ts +74 -15
- package/Libraries/StyleSheet/StyleSheetTypes.js +60 -5
- package/Libraries/StyleSheet/processBackgroundImage.js +384 -0
- package/Libraries/StyleSheet/processBoxShadow.js +211 -0
- package/Libraries/StyleSheet/processFilter.js +231 -42
- package/Libraries/Text/Text.js +394 -196
- package/Libraries/Text/Text.windows.js +476 -300
- package/Libraries/Text/TextNativeComponent.js +2 -1
- package/Libraries/TurboModule/TurboModuleRegistry.js +13 -50
- package/Libraries/Types/CodegenTypes.js +3 -1
- package/Libraries/Utilities/Appearance.js +108 -84
- package/Libraries/Utilities/DevLoadingView.js +2 -4
- package/Libraries/Utilities/HMRClient.js +2 -1
- package/Libraries/Utilities/ReactNativeTestTools.js +1 -1
- package/Libraries/Utilities/createPerformanceLogger.js +0 -9
- package/Libraries/Utilities/stringifyViewConfig.js +22 -0
- package/Libraries/Utilities/useColorScheme.js +3 -3
- package/Libraries/WebSocket/WebSocket.js +1 -1
- package/Libraries/promiseRejectionTrackingOptions.js +1 -1
- package/Libraries/vendor/emitter/EventEmitter.js +6 -5
- package/Microsoft.ReactNative/ComponentView.idl +11 -0
- package/Microsoft.ReactNative/Composition.Input.idl +1 -0
- package/Microsoft.ReactNative/CompositionSwitcher.idl +3 -0
- package/Microsoft.ReactNative/Fabric/AbiComponentDescriptor.cpp +9 -9
- package/Microsoft.ReactNative/Fabric/AbiViewComponentDescriptor.cpp +9 -9
- package/Microsoft.ReactNative/Fabric/ComponentView.cpp +7 -9
- package/Microsoft.ReactNative/Fabric/ComponentView.h +5 -6
- package/Microsoft.ReactNative/Fabric/Composition/Composition.Input.cpp +4 -0
- package/Microsoft.ReactNative/Fabric/Composition/Composition.Input.h +1 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionContextHelper.cpp +44 -13
- package/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp +42 -5
- package/Microsoft.ReactNative/Fabric/Composition/CompositionHwndHost.cpp +1 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp +81 -63
- package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.h +2 -3
- package/Microsoft.ReactNative/Fabric/Composition/DebuggingOverlayComponentView.cpp +8 -6
- package/Microsoft.ReactNative/Fabric/Composition/DebuggingOverlayComponentView.h +1 -2
- package/Microsoft.ReactNative/Fabric/Composition/FocusManager.cpp +20 -6
- package/Microsoft.ReactNative/Fabric/Composition/FocusManager.h +13 -6
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.cpp +2 -3
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.h +1 -2
- package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.cpp +72 -54
- package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.h +14 -4
- package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.cpp +26 -8
- package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.h +5 -2
- package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.cpp +18 -7
- package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.h +1 -2
- package/Microsoft.ReactNative/Fabric/Composition/SwitchComponentView.cpp +6 -6
- package/Microsoft.ReactNative/Fabric/Composition/SwitchComponentView.h +1 -2
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp +97 -140
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.h +8 -4
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.cpp +18 -11
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.h +5 -4
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.cpp +0 -13
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.h +0 -3
- package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.cpp +29 -4
- package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.h +2 -0
- package/Microsoft.ReactNative/Fabric/Composition/UnimplementedNativeViewComponentView.cpp +1 -2
- package/Microsoft.ReactNative/Fabric/Composition/UnimplementedNativeViewComponentView.h +1 -2
- package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.cpp +28 -12
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/HostPlatformColor.h +33 -0
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/textlayoutmanager/TextLayoutManager.cpp +26 -9
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/textlayoutmanager/TextLayoutManager.h +10 -4
- package/Microsoft.ReactNative/IReactModuleBuilder.cpp +5 -0
- package/Microsoft.ReactNative/IReactModuleBuilder.h +1 -0
- package/Microsoft.ReactNative/IReactModuleBuilder.idl +9 -0
- package/Microsoft.ReactNative/IReactViewComponentBuilder.idl +8 -1
- package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +2 -0
- package/Microsoft.ReactNative/Modules/AlertModule.cpp +3 -1
- package/Microsoft.ReactNative/Modules/AppearanceModule.cpp +1 -1
- package/Microsoft.ReactNative/Modules/AppearanceModule.h +7 -1
- package/Microsoft.ReactNative/Modules/DevSettingsModule.cpp +3 -3
- package/Microsoft.ReactNative/Modules/DevSettingsModule.h +1 -1
- package/Microsoft.ReactNative/Modules/LinkingManagerModule.cpp +2 -2
- package/Microsoft.ReactNative/Modules/LinkingManagerModule.h +1 -1
- package/Microsoft.ReactNative/Modules/LogBoxModule.cpp +9 -0
- package/Microsoft.ReactNative/Modules/LogBoxModule.h +2 -0
- package/Microsoft.ReactNative/Modules/SampleTurboModule.cpp +121 -0
- package/Microsoft.ReactNative/Modules/SampleTurboModule.h +90 -0
- package/Microsoft.ReactNative/ReactHost/MsoReactContext.cpp +0 -7
- package/Microsoft.ReactNative/ReactHost/MsoReactContext.h +0 -5
- package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.cpp +5 -1
- package/Microsoft.ReactNative/ReactInstanceSettingsBuilder.cpp +59 -0
- package/Microsoft.ReactNative/ReactInstanceSettingsBuilder.h +23 -0
- package/Microsoft.ReactNative/ReactNativeAppBuilder.cpp +179 -0
- package/Microsoft.ReactNative/ReactNativeAppBuilder.h +35 -0
- package/Microsoft.ReactNative/ReactNativeAppBuilder.idl +69 -0
- package/Microsoft.ReactNative/ReactNativeIsland.idl +2 -0
- package/Microsoft.ReactNative/ReactNativeWin32App.cpp +82 -0
- package/Microsoft.ReactNative/ReactNativeWin32App.h +38 -0
- package/Microsoft.ReactNative/TurboModulesProvider.cpp +45 -0
- package/Microsoft.ReactNative/Views/DynamicAutomationPeer.cpp +2 -1
- package/Microsoft.ReactNative/Views/FlyoutViewManager.cpp +25 -16
- package/Microsoft.ReactNative/packages.fabric.lock.json +159 -0
- package/Microsoft.ReactNative/packages.lock.json +11 -12
- package/Microsoft.ReactNative.Cxx/Microsoft.ReactNative.Cxx.vcxitems +3 -4
- package/Microsoft.ReactNative.Cxx/Microsoft.ReactNative.Cxx.vcxitems.filters +3 -0
- package/Microsoft.ReactNative.Cxx/ModuleRegistration.cpp +2 -2
- package/Microsoft.ReactNative.Cxx/ModuleRegistration.h +62 -4
- package/Microsoft.ReactNative.Cxx/NativeModules.h +131 -14
- package/Microsoft.ReactNative.Managed/packages.lock.json +9 -9
- package/Microsoft.ReactNative.Managed.CodeGen/ReactNativeNames.cs +10 -2
- package/PropertySheets/Autolink.props +1 -1
- package/PropertySheets/Bundle.props +1 -1
- package/PropertySheets/Codegen.props +1 -1
- package/PropertySheets/Generated/PackageVersion.g.props +4 -4
- package/PropertySheets/NuGet.LockFile.props +18 -0
- package/README.md +29 -29
- package/ReactCommon/ReactCommon.vcxproj +5 -1
- package/ReactCommon/ReactCommon.vcxproj.filters +11 -2
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/JSExecutor.cpp +2 -7
- package/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/NetworkIOAgent.cpp +441 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/NetworkIOAgent.h +266 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/Utf8.h +56 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/Base.h +3 -1
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/Bridging.h +2 -2
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/CallbackWrapper.h +1 -1
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/Convert.h +172 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/EventEmitter.h +4 -5
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/Function.h +2 -2
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/core/ReactCommon/TurboModule.h +1 -1
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/core/ReactCommon/TurboModuleUtils.h +3 -2
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/scrollview/ScrollViewProps.cpp +9 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/LayoutableShadowNode.cpp +363 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/runtime/JSRuntimeFactory.h +22 -2
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/runtime/ReactInstance.cpp +118 -51
- package/ReactCommon/packages.lock.json +2 -2
- package/Scripts/NuGetRestoreForceEvaluateAllSolutions.ps1 +8 -1
- package/Scripts/Tfs/Layout-MSRN-Headers.ps1 +2 -2
- package/Shared/Modules/WebSocketModule.cpp +1 -2
- package/Shared/Networking/WinRTWebSocketResource.cpp +4 -1
- package/Shared/Shared.vcxitems +38 -2
- package/Shared/Shared.vcxitems.filters +6 -1
- package/Shared/TurboModuleManager.cpp +0 -3
- package/codegen/NativeLinkingManagerSpec.g.h +3 -3
- package/codegen/NativeReactNativeFeatureFlagsSpec.g.h +198 -54
- package/codegen/NativeSampleTurboModuleSpec.g.h +35 -0
- package/codegen/rnwcoreJSI-generated.cpp +245 -101
- package/codegen/rnwcoreJSI.h +847 -548
- package/index.js +3 -1
- package/index.windows.js +3 -1
- package/jest/mockComponent.js +4 -1
- package/jest/mockModal.js +1 -3
- package/jest/mockScrollView.js +1 -1
- package/jest/renderer.js +2 -2
- package/jest/setup.js +16 -13
- package/package.json +26 -25
- package/src/private/animated/NativeAnimatedHelper.js +438 -0
- package/src/private/animated/NativeAnimatedValidation.js +64 -0
- package/src/private/components/HScrollViewNativeComponents.js +56 -0
- package/src/private/components/SafeAreaView_INTERNAL_DO_NOT_USE.js +27 -0
- package/src/private/components/VScrollViewNativeComponents.js +48 -0
- package/src/private/components/useSyncOnScroll.js +48 -0
- package/src/private/featureflags/ReactNativeFeatureFlags.js +166 -16
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +29 -5
- package/src/private/fusebox/FuseboxSessionObserver.js +42 -0
- package/{Libraries/Core → src/private/renderer/errorhandling}/ErrorHandlers.js +14 -4
- package/src/private/setup/setUpDOM.js +28 -0
- package/src/private/setup/setUpIntersectionObserver.js +27 -0
- package/src/private/setup/setUpMutationObserver.js +26 -0
- package/src/private/setup/setUpPerformanceObserver.js +64 -0
- package/src/private/specs/modules/NativeAppearance.js +3 -3
- package/src/private/specs/modules/NativeLinkingManager.js +1 -1
- package/src/private/specs/modules/NativePlatformConstantsWindows.js +7 -0
- package/src/private/specs/modules/NativeSampleTurboModule.js +14 -1
- package/src/private/webapis/dom/nodes/ReadOnlyNode.js +6 -4
- package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver}/IntersectionObserver.js +5 -3
- package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver}/IntersectionObserverEntry.js +3 -3
- package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver}/IntersectionObserverManager.js +14 -17
- package/src/private/{specs/modules → webapis/intersectionobserver/specs}/NativeIntersectionObserver.js +2 -2
- package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver/specs}/__mocks__/NativeIntersectionObserver.js +4 -4
- package/{Libraries/MutationObserver → src/private/webapis/mutationobserver}/MutationObserver.js +5 -3
- package/{Libraries/MutationObserver → src/private/webapis/mutationobserver}/MutationObserverManager.js +24 -15
- package/{Libraries/MutationObserver → src/private/webapis/mutationobserver}/MutationRecord.js +4 -6
- package/src/private/{specs/modules → webapis/mutationobserver/specs}/NativeMutationObserver.js +2 -2
- package/{Libraries/MutationObserver → src/private/webapis/mutationobserver/specs}/__mocks__/NativeMutationObserver.js +5 -5
- package/src/private/webapis/performance/{EventCounts.js → EventTiming.js} +65 -3
- package/src/private/webapis/performance/LongTasks.js +39 -0
- package/src/private/webapis/performance/Performance.js +22 -9
- package/src/private/webapis/performance/PerformanceEntry.js +36 -18
- package/src/private/webapis/performance/PerformanceObserver.js +29 -43
- package/src/private/webapis/performance/RawPerformanceEntry.js +24 -1
- package/src/private/webapis/performance/UserTiming.js +17 -12
- package/src/private/webapis/performance/specs/NativePerformanceObserver.js +1 -1
- package/template/cpp-app/src/AutolinkedNativeModules.g.cpp +1 -1
- package/template/cpp-app/src/AutolinkedNativeModules.g.h +1 -1
- package/template/cs-app/src/AutolinkedNativeModules.g.cs +1 -1
- package/template/index.windows.bundle +1 -1
- package/template/metro.config.js +2 -2
- package/template/shared-app/src/AutolinkedNativeModules.g.props +1 -1
- package/template/shared-app/src/AutolinkedNativeModules.g.targets +1 -1
- package/templates/cpp-app/metro.config.js +2 -2
- package/templates/cpp-app/template.config.js +5 -5
- package/templates/cpp-app/windows/MyApp/AutolinkedNativeModules.g.cpp +1 -1
- package/templates/cpp-app/windows/MyApp/AutolinkedNativeModules.g.h +1 -1
- package/templates/cpp-app/windows/MyApp/MyApp.cpp +2 -0
- package/templates/cpp-app/windows/MyApp/MyApp.vcxproj +1 -1
- package/templates/cpp-lib/example/metro.config.js +2 -2
- package/templates/cpp-lib/template.config.js +3 -3
- package/templates/cpp-lib/windows/MyLib/MyLib.h +3 -3
- package/templates/cpp-lib/windows/MyLib/MyLib.vcxproj +1 -1
- package/types/experimental.d.ts +20 -1
- package/Libraries/Animated/NativeAnimatedHelper.js +0 -615
- package/Libraries/Core/setUpIntersectionObserver.js +0 -16
- package/Libraries/Core/setUpMutationObserver.js +0 -16
- package/Libraries/Core/setUpPerformanceObserver.js +0 -18
- package/Libraries/IntersectionObserver/NativeIntersectionObserver.js +0 -13
- package/Libraries/MutationObserver/NativeMutationObserver.js +0 -13
- package/Libraries/Utilities/verifyComponentAttributeEquivalence.js +0 -135
- package/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/algorithm/CalculateLayout.cpp +0 -2396
- package/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/config/Config.cpp +0 -136
- package/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/config/Config.h +0 -92
- package/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/node/LayoutResults.cpp +0 -48
- package/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/node/LayoutResults.h +0 -122
- package/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/node/Node.cpp +0 -388
- package/src/private/core/setUpDOM.js +0 -18
- package/src/private/webapis/performance/PerformanceEventTiming.js +0 -55
- /package/src/private/{core → styles}/composeStyles.js +0 -0
|
@@ -1,388 +0,0 @@
|
|
|
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
|
-
#include <algorithm>
|
|
9
|
-
#include <cstddef>
|
|
10
|
-
#include <iostream>
|
|
11
|
-
|
|
12
|
-
#include <yoga/debug/AssertFatal.h>
|
|
13
|
-
#include <yoga/debug/Log.h>
|
|
14
|
-
#include <yoga/node/Node.h>
|
|
15
|
-
#include <yoga/numeric/Comparison.h>
|
|
16
|
-
|
|
17
|
-
namespace facebook::yoga {
|
|
18
|
-
|
|
19
|
-
Node::Node() : Node{&Config::getDefault()} {}
|
|
20
|
-
|
|
21
|
-
Node::Node(const yoga::Config* config) : config_{config} {
|
|
22
|
-
yoga::assertFatal(
|
|
23
|
-
config != nullptr, "Attempting to construct Node with null config");
|
|
24
|
-
|
|
25
|
-
if (config->useWebDefaults()) {
|
|
26
|
-
useWebDefaults();
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
Node::Node(Node&& node) noexcept
|
|
31
|
-
: hasNewLayout_(node.hasNewLayout_),
|
|
32
|
-
isReferenceBaseline_(node.isReferenceBaseline_),
|
|
33
|
-
isDirty_(node.isDirty_),
|
|
34
|
-
alwaysFormsContainingBlock_(node.alwaysFormsContainingBlock_),
|
|
35
|
-
nodeType_(node.nodeType_),
|
|
36
|
-
context_(node.context_),
|
|
37
|
-
measureFunc_(node.measureFunc_),
|
|
38
|
-
baselineFunc_(node.baselineFunc_),
|
|
39
|
-
dirtiedFunc_(node.dirtiedFunc_),
|
|
40
|
-
style_(std::move(node.style_)),
|
|
41
|
-
layout_(node.layout_),
|
|
42
|
-
lineIndex_(node.lineIndex_),
|
|
43
|
-
owner_(node.owner_),
|
|
44
|
-
children_(std::move(node.children_)),
|
|
45
|
-
config_(node.config_),
|
|
46
|
-
resolvedDimensions_(node.resolvedDimensions_) {
|
|
47
|
-
for (auto c : children_) {
|
|
48
|
-
c->setOwner(this);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
YGSize Node::measure(
|
|
53
|
-
float availableWidth,
|
|
54
|
-
MeasureMode widthMode,
|
|
55
|
-
float availableHeight,
|
|
56
|
-
MeasureMode heightMode) {
|
|
57
|
-
const auto size = measureFunc_(
|
|
58
|
-
this,
|
|
59
|
-
availableWidth,
|
|
60
|
-
unscopedEnum(widthMode),
|
|
61
|
-
availableHeight,
|
|
62
|
-
unscopedEnum(heightMode));
|
|
63
|
-
|
|
64
|
-
if (yoga::isUndefined(size.height) || size.height < 0 ||
|
|
65
|
-
yoga::isUndefined(size.width) || size.width < 0) {
|
|
66
|
-
yoga::log(
|
|
67
|
-
this,
|
|
68
|
-
LogLevel::Warn,
|
|
69
|
-
"Measure function returned an invalid dimension to Yoga: [width=%f, height=%f]",
|
|
70
|
-
size.width,
|
|
71
|
-
size.height);
|
|
72
|
-
return {
|
|
73
|
-
.width = maxOrDefined(0.0f, size.width),
|
|
74
|
-
.height = maxOrDefined(0.0f, size.height)};
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
return size;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
float Node::baseline(float width, float height) const {
|
|
81
|
-
return baselineFunc_(this, width, height);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
float Node::dimensionWithMargin(
|
|
85
|
-
const FlexDirection axis,
|
|
86
|
-
const float widthSize) {
|
|
87
|
-
return getLayout().measuredDimension(dimension(axis)) +
|
|
88
|
-
style_.computeMarginForAxis(axis, widthSize);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
bool Node::isLayoutDimensionDefined(const FlexDirection axis) {
|
|
92
|
-
const float value = getLayout().measuredDimension(dimension(axis));
|
|
93
|
-
return yoga::isDefined(value) && value >= 0.0f;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
// Setters
|
|
97
|
-
|
|
98
|
-
void Node::setMeasureFunc(YGMeasureFunc measureFunc) {
|
|
99
|
-
if (measureFunc == nullptr) {
|
|
100
|
-
// TODO: t18095186 Move nodeType to opt-in function and mark appropriate
|
|
101
|
-
// places in Litho
|
|
102
|
-
setNodeType(NodeType::Default);
|
|
103
|
-
} else {
|
|
104
|
-
yoga::assertFatalWithNode(
|
|
105
|
-
this,
|
|
106
|
-
children_.empty(),
|
|
107
|
-
"Cannot set measure function: Nodes with measure functions cannot have "
|
|
108
|
-
"children.");
|
|
109
|
-
// TODO: t18095186 Move nodeType to opt-in function and mark appropriate
|
|
110
|
-
// places in Litho
|
|
111
|
-
setNodeType(NodeType::Text);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
measureFunc_ = measureFunc;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
void Node::replaceChild(Node* child, size_t index) {
|
|
118
|
-
children_[index] = child;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
void Node::replaceChild(Node* oldChild, Node* newChild) {
|
|
122
|
-
std::replace(children_.begin(), children_.end(), oldChild, newChild);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
void Node::insertChild(Node* child, size_t index) {
|
|
126
|
-
children_.insert(children_.begin() + static_cast<ptrdiff_t>(index), child);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
void Node::setConfig(yoga::Config* config) {
|
|
130
|
-
yoga::assertFatal(
|
|
131
|
-
config != nullptr, "Attempting to set a null config on a Node");
|
|
132
|
-
yoga::assertFatalWithConfig(
|
|
133
|
-
config,
|
|
134
|
-
config->useWebDefaults() == config_->useWebDefaults(),
|
|
135
|
-
"UseWebDefaults may not be changed after constructing a Node");
|
|
136
|
-
|
|
137
|
-
if (yoga::configUpdateInvalidatesLayout(*config_, *config)) {
|
|
138
|
-
markDirtyAndPropagate();
|
|
139
|
-
layout_.configVersion = 0; // [Windows #13409]
|
|
140
|
-
} else { // [Windows #13409]
|
|
141
|
-
// If the config is functionally the same, then align the configVersion so
|
|
142
|
-
// that we can reuse the layout cache
|
|
143
|
-
layout_.configVersion = config->getVersion(); // [Windows #13409]
|
|
144
|
-
}
|
|
145
|
-
config_ = config;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
void Node::setDirty(bool isDirty) {
|
|
149
|
-
if (static_cast<int>(isDirty) == isDirty_) {
|
|
150
|
-
return;
|
|
151
|
-
}
|
|
152
|
-
isDirty_ = isDirty;
|
|
153
|
-
if (isDirty && (dirtiedFunc_ != nullptr)) {
|
|
154
|
-
dirtiedFunc_(this);
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
bool Node::removeChild(Node* child) {
|
|
159
|
-
auto p = std::find(children_.begin(), children_.end(), child);
|
|
160
|
-
if (p != children_.end()) {
|
|
161
|
-
children_.erase(p);
|
|
162
|
-
return true;
|
|
163
|
-
}
|
|
164
|
-
return false;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
void Node::removeChild(size_t index) {
|
|
168
|
-
children_.erase(children_.begin() + static_cast<ptrdiff_t>(index));
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
void Node::setLayoutDirection(Direction direction) {
|
|
172
|
-
layout_.setDirection(direction);
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
void Node::setLayoutMargin(float margin, PhysicalEdge edge) {
|
|
176
|
-
layout_.setMargin(edge, margin);
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
void Node::setLayoutBorder(float border, PhysicalEdge edge) {
|
|
180
|
-
layout_.setBorder(edge, border);
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
void Node::setLayoutPadding(float padding, PhysicalEdge edge) {
|
|
184
|
-
layout_.setPadding(edge, padding);
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
void Node::setLayoutLastOwnerDirection(Direction direction) {
|
|
188
|
-
layout_.lastOwnerDirection = direction;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
void Node::setLayoutComputedFlexBasis(const FloatOptional computedFlexBasis) {
|
|
192
|
-
layout_.computedFlexBasis = computedFlexBasis;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
void Node::setLayoutPosition(float position, PhysicalEdge edge) {
|
|
196
|
-
layout_.setPosition(edge, position);
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
void Node::setLayoutComputedFlexBasisGeneration(
|
|
200
|
-
uint32_t computedFlexBasisGeneration) {
|
|
201
|
-
layout_.computedFlexBasisGeneration = computedFlexBasisGeneration;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
void Node::setLayoutMeasuredDimension(
|
|
205
|
-
float measuredDimension,
|
|
206
|
-
Dimension dimension) {
|
|
207
|
-
layout_.setMeasuredDimension(dimension, measuredDimension);
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
void Node::setLayoutHadOverflow(bool hadOverflow) {
|
|
211
|
-
layout_.setHadOverflow(hadOverflow);
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
void Node::setLayoutDimension(float LengthValue, Dimension dimension) {
|
|
215
|
-
layout_.setDimension(dimension, LengthValue);
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
// If both left and right are defined, then use left. Otherwise return +left or
|
|
219
|
-
// -right depending on which is defined. Ignore statically positioned nodes as
|
|
220
|
-
// insets do not apply to them.
|
|
221
|
-
float Node::relativePosition(
|
|
222
|
-
FlexDirection axis,
|
|
223
|
-
Direction direction,
|
|
224
|
-
float axisSize) const {
|
|
225
|
-
if (style_.positionType() == PositionType::Static) {
|
|
226
|
-
return 0;
|
|
227
|
-
}
|
|
228
|
-
if (style_.isInlineStartPositionDefined(axis, direction)) {
|
|
229
|
-
return style_.computeInlineStartPosition(axis, direction, axisSize);
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
return -1 * style_.computeInlineEndPosition(axis, direction, axisSize);
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
void Node::setPosition(
|
|
236
|
-
const Direction direction,
|
|
237
|
-
const float ownerWidth,
|
|
238
|
-
const float ownerHeight) {
|
|
239
|
-
/* Root nodes should be always layouted as LTR, so we don't return negative
|
|
240
|
-
* values. */
|
|
241
|
-
const Direction directionRespectingRoot =
|
|
242
|
-
owner_ != nullptr ? direction : Direction::LTR;
|
|
243
|
-
const FlexDirection mainAxis =
|
|
244
|
-
yoga::resolveDirection(style_.flexDirection(), directionRespectingRoot);
|
|
245
|
-
const FlexDirection crossAxis =
|
|
246
|
-
yoga::resolveCrossDirection(mainAxis, directionRespectingRoot);
|
|
247
|
-
|
|
248
|
-
// In the case of position static these are just 0. See:
|
|
249
|
-
// https://www.w3.org/TR/css-position-3/#valdef-position-static
|
|
250
|
-
const float relativePositionMain = relativePosition(
|
|
251
|
-
mainAxis,
|
|
252
|
-
directionRespectingRoot,
|
|
253
|
-
isRow(mainAxis) ? ownerWidth : ownerHeight);
|
|
254
|
-
const float relativePositionCross = relativePosition(
|
|
255
|
-
crossAxis,
|
|
256
|
-
directionRespectingRoot,
|
|
257
|
-
isRow(mainAxis) ? ownerHeight : ownerWidth);
|
|
258
|
-
|
|
259
|
-
const auto mainAxisLeadingEdge = inlineStartEdge(mainAxis, direction);
|
|
260
|
-
const auto mainAxisTrailingEdge = inlineEndEdge(mainAxis, direction);
|
|
261
|
-
const auto crossAxisLeadingEdge = inlineStartEdge(crossAxis, direction);
|
|
262
|
-
const auto crossAxisTrailingEdge = inlineEndEdge(crossAxis, direction);
|
|
263
|
-
|
|
264
|
-
setLayoutPosition(
|
|
265
|
-
(style_.computeInlineStartMargin(mainAxis, direction, ownerWidth) +
|
|
266
|
-
relativePositionMain),
|
|
267
|
-
mainAxisLeadingEdge);
|
|
268
|
-
setLayoutPosition(
|
|
269
|
-
(style_.computeInlineEndMargin(mainAxis, direction, ownerWidth) +
|
|
270
|
-
relativePositionMain),
|
|
271
|
-
mainAxisTrailingEdge);
|
|
272
|
-
setLayoutPosition(
|
|
273
|
-
(style_.computeInlineStartMargin(crossAxis, direction, ownerWidth) +
|
|
274
|
-
relativePositionCross),
|
|
275
|
-
crossAxisLeadingEdge);
|
|
276
|
-
setLayoutPosition(
|
|
277
|
-
(style_.computeInlineEndMargin(crossAxis, direction, ownerWidth) +
|
|
278
|
-
relativePositionCross),
|
|
279
|
-
crossAxisTrailingEdge);
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
Style::Length Node::resolveFlexBasisPtr() const {
|
|
283
|
-
Style::Length flexBasis = style_.flexBasis();
|
|
284
|
-
if (flexBasis.unit() != Unit::Auto && flexBasis.unit() != Unit::Undefined) {
|
|
285
|
-
return flexBasis;
|
|
286
|
-
}
|
|
287
|
-
if (style_.flex().isDefined() && style_.flex().unwrap() > 0.0f) {
|
|
288
|
-
return config_->useWebDefaults() ? value::ofAuto() : value::points(0);
|
|
289
|
-
}
|
|
290
|
-
return value::ofAuto();
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
void Node::resolveDimension() {
|
|
294
|
-
for (auto dim : {Dimension::Width, Dimension::Height}) {
|
|
295
|
-
if (style_.maxDimension(dim).isDefined() &&
|
|
296
|
-
yoga::inexactEquals(
|
|
297
|
-
style_.maxDimension(dim), style_.minDimension(dim))) {
|
|
298
|
-
resolvedDimensions_[yoga::to_underlying(dim)] = style_.maxDimension(dim);
|
|
299
|
-
} else {
|
|
300
|
-
resolvedDimensions_[yoga::to_underlying(dim)] = style_.dimension(dim);
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
Direction Node::resolveDirection(const Direction ownerDirection) {
|
|
306
|
-
if (style_.direction() == Direction::Inherit) {
|
|
307
|
-
return ownerDirection != Direction::Inherit ? ownerDirection
|
|
308
|
-
: Direction::LTR;
|
|
309
|
-
} else {
|
|
310
|
-
return style_.direction();
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
void Node::clearChildren() {
|
|
315
|
-
children_.clear();
|
|
316
|
-
children_.shrink_to_fit();
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
// Other Methods
|
|
320
|
-
|
|
321
|
-
void Node::cloneChildrenIfNeeded() {
|
|
322
|
-
size_t i = 0;
|
|
323
|
-
for (Node*& child : children_) {
|
|
324
|
-
if (child->getOwner() != this) {
|
|
325
|
-
child = resolveRef(config_->cloneNode(child, this, i));
|
|
326
|
-
child->setOwner(this);
|
|
327
|
-
}
|
|
328
|
-
i += 1;
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
void Node::markDirtyAndPropagate() {
|
|
333
|
-
if (!isDirty_) {
|
|
334
|
-
setDirty(true);
|
|
335
|
-
setLayoutComputedFlexBasis(FloatOptional());
|
|
336
|
-
if (owner_ != nullptr) {
|
|
337
|
-
owner_->markDirtyAndPropagate();
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
float Node::resolveFlexGrow() const {
|
|
343
|
-
// Root nodes flexGrow should always be 0
|
|
344
|
-
if (owner_ == nullptr) {
|
|
345
|
-
return 0.0;
|
|
346
|
-
}
|
|
347
|
-
if (style_.flexGrow().isDefined()) {
|
|
348
|
-
return style_.flexGrow().unwrap();
|
|
349
|
-
}
|
|
350
|
-
if (style_.flex().isDefined() && style_.flex().unwrap() > 0.0f) {
|
|
351
|
-
return style_.flex().unwrap();
|
|
352
|
-
}
|
|
353
|
-
return Style::DefaultFlexGrow;
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
float Node::resolveFlexShrink() const {
|
|
357
|
-
if (owner_ == nullptr) {
|
|
358
|
-
return 0.0;
|
|
359
|
-
}
|
|
360
|
-
if (style_.flexShrink().isDefined()) {
|
|
361
|
-
return style_.flexShrink().unwrap();
|
|
362
|
-
}
|
|
363
|
-
if (!config_->useWebDefaults() && style_.flex().isDefined() &&
|
|
364
|
-
style_.flex().unwrap() < 0.0f) {
|
|
365
|
-
return -style_.flex().unwrap();
|
|
366
|
-
}
|
|
367
|
-
return config_->useWebDefaults() ? Style::WebDefaultFlexShrink
|
|
368
|
-
: Style::DefaultFlexShrink;
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
bool Node::isNodeFlexible() {
|
|
372
|
-
return (
|
|
373
|
-
(style_.positionType() != PositionType::Absolute) &&
|
|
374
|
-
(resolveFlexGrow() != 0 || resolveFlexShrink() != 0));
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
void Node::reset() {
|
|
378
|
-
yoga::assertFatalWithNode(
|
|
379
|
-
this,
|
|
380
|
-
children_.empty(),
|
|
381
|
-
"Cannot reset a node which still has children attached");
|
|
382
|
-
yoga::assertFatalWithNode(
|
|
383
|
-
this, owner_ == nullptr, "Cannot reset a node still attached to a owner");
|
|
384
|
-
|
|
385
|
-
*this = Node{getConfig()};
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
} // namespace facebook::yoga
|
|
@@ -1,18 +0,0 @@
|
|
|
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 strict
|
|
8
|
-
* @format
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
import DOMRect from '../webapis/dom/geometry/DOMRect';
|
|
12
|
-
import DOMRectReadOnly from '../webapis/dom/geometry/DOMRectReadOnly';
|
|
13
|
-
|
|
14
|
-
// $FlowExpectedError[cannot-write] The global isn't writable anywhere but here, where we define it
|
|
15
|
-
global.DOMRect = DOMRect;
|
|
16
|
-
|
|
17
|
-
// $FlowExpectedError[cannot-write] The global isn't writable anywhere but here, where we define it
|
|
18
|
-
global.DOMRectReadOnly = DOMRectReadOnly;
|
|
@@ -1,55 +0,0 @@
|
|
|
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
|
-
* @format
|
|
8
|
-
* @flow strict
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
import type {HighResTimeStamp, PerformanceEntryJSON} from './PerformanceEntry';
|
|
12
|
-
|
|
13
|
-
import {PerformanceEntry} from './PerformanceEntry';
|
|
14
|
-
|
|
15
|
-
export type PerformanceEventTimingJSON = {
|
|
16
|
-
...PerformanceEntryJSON,
|
|
17
|
-
processingStart: HighResTimeStamp,
|
|
18
|
-
processingEnd: HighResTimeStamp,
|
|
19
|
-
interactionId: number,
|
|
20
|
-
...
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export default class PerformanceEventTiming extends PerformanceEntry {
|
|
24
|
-
processingStart: HighResTimeStamp;
|
|
25
|
-
processingEnd: HighResTimeStamp;
|
|
26
|
-
interactionId: number;
|
|
27
|
-
|
|
28
|
-
constructor(init: {
|
|
29
|
-
name: string,
|
|
30
|
-
startTime?: HighResTimeStamp,
|
|
31
|
-
duration?: HighResTimeStamp,
|
|
32
|
-
processingStart?: HighResTimeStamp,
|
|
33
|
-
processingEnd?: HighResTimeStamp,
|
|
34
|
-
interactionId?: number,
|
|
35
|
-
}) {
|
|
36
|
-
super({
|
|
37
|
-
name: init.name,
|
|
38
|
-
entryType: 'event',
|
|
39
|
-
startTime: init.startTime ?? 0,
|
|
40
|
-
duration: init.duration ?? 0,
|
|
41
|
-
});
|
|
42
|
-
this.processingStart = init.processingStart ?? 0;
|
|
43
|
-
this.processingEnd = init.processingEnd ?? 0;
|
|
44
|
-
this.interactionId = init.interactionId ?? 0;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
toJSON(): PerformanceEventTimingJSON {
|
|
48
|
-
return {
|
|
49
|
-
...super.toJSON(),
|
|
50
|
-
processingStart: this.processingStart,
|
|
51
|
-
processingEnd: this.processingEnd,
|
|
52
|
-
interactionId: this.interactionId,
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
}
|
|
File without changes
|