From 1783250fc6b2cf43a701107fa211774d61ac8b45 Mon Sep 17 00:00:00 2001 From: vineethkuttan <66076509+vineethkuttan@users.noreply.github.com> Date: Wed, 15 Oct 2025 15:33:52 +0530 Subject: [PATCH 01/13] Update @react-native-community/template --- packages/@rnw-scripts/integrate-rn/package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/@rnw-scripts/integrate-rn/package.json b/packages/@rnw-scripts/integrate-rn/package.json index b61aabdc892..e1a86dc41db 100644 --- a/packages/@rnw-scripts/integrate-rn/package.json +++ b/packages/@rnw-scripts/integrate-rn/package.json @@ -19,7 +19,7 @@ "integrate-rn": "./bin.js" }, "dependencies": { - "@react-native-community/template": "0.81.0-nightly-202578-011c586", + "@react-native-community/template": "0.82.0-nightly-2025811-9d3d62a", "@react-native-windows/find-repo-root": "^0.0.0-canary.97", "@react-native-windows/fs": "^0.0.0-canary.68", "@react-native-windows/package-utils": "^0.0.0-canary.94", diff --git a/yarn.lock b/yarn.lock index c42154dddec..2ecbce7f4c8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2070,10 +2070,10 @@ prompts "^2.4.2" semver "^7.5.2" -"@react-native-community/template@0.81.0-nightly-202578-011c586": - version "0.81.0-nightly-202578-011c586" - resolved "https://registry.yarnpkg.com/@react-native-community/template/-/template-0.81.0-nightly-202578-011c586.tgz#84b2873039e596663fb70548f5917e72ce0058cc" - integrity sha512-qBBrakf6b4132m0tyP/eftSkyXeAh6uCv3HgOzSwGQbaBNfsOaHyFP6UC5Cpl5Ak9YwsQJcjGlc7iYqIRUB0lA== +"@react-native-community/template@0.82.0-nightly-2025811-9d3d62a": + version "0.82.0-nightly-2025811-9d3d62a" + resolved "https://registry.yarnpkg.com/@react-native-community/template/-/template-0.82.0-nightly-2025811-9d3d62a.tgz#b128d2f0a81fc1ae2426a610405776bebbb97a4a" + integrity sha512-IG/c4NhNzUjpME9GAIOTTetkvZ3gJgvwuDkgv58cePHbCjDENS5+oyIR/iPNBjZfmF2PG/WVyINDajD9BezXQg== "@react-native-picker/picker@^2.5.1": version "2.11.3" From 7133f21fb85cd571e6923def0b143b41084276f3 Mon Sep 17 00:00:00 2001 From: vineethkuttan <66076509+vineethkuttan@users.noreply.github.com> Date: Thu, 16 Oct 2025 21:41:41 +0530 Subject: [PATCH 02/13] Integrate-rn 0.82.0-nightly-20250806-5936f29d6 --- .../react-native-win32-tester/package.json | 4 +- .../react-native-win32/package.json | 4 +- .../automation-channel/package.json | 2 +- .../@react-native-windows/tester/package.json | 4 +- .../@react-native/monorepo/overrides.json | 3 +- packages/e2e-test-app-fabric/package.json | 2 +- packages/e2e-test-app/package.json | 2 +- packages/integration-test-app/package.json | 4 +- packages/playground/package.json | 4 +- packages/sample-app-fabric/package.json | 4 +- packages/sample-apps/package.json | 4 +- packages/sample-custom-component/package.json | 4 +- .../NativeIntersectionObserverSpec.g.h | 30 +- vnext/codegen/NativePerformanceSpec.g.h | 32 +- .../NativeReactNativeFeatureFlagsSpec.g.h | 298 +++++++++------ .../components/rnwcore/EventEmitters.cpp | 25 ++ .../react/components/rnwcore/EventEmitters.h | 25 ++ .../react/components/rnwcore/Props.cpp | 34 ++ .../codegen/react/components/rnwcore/Props.h | 17 + .../rnwcore/VirtualViewExperimental.g.h | 226 ++++++++++++ vnext/codegen/rnwcoreJSI-generated.cpp | 160 +++++---- vnext/codegen/rnwcoreJSI.h | 209 +++++++---- vnext/package.json | 4 +- yarn.lock | 340 +++++++++++++++++- 24 files changed, 1108 insertions(+), 333 deletions(-) create mode 100644 vnext/codegen/react/components/rnwcore/VirtualViewExperimental.g.h diff --git a/packages/@office-iss/react-native-win32-tester/package.json b/packages/@office-iss/react-native-win32-tester/package.json index cac3cab5aae..ed165d87232 100644 --- a/packages/@office-iss/react-native-win32-tester/package.json +++ b/packages/@office-iss/react-native-win32-tester/package.json @@ -30,11 +30,11 @@ "@types/node": "^22.14.0", "eslint": "^8.19.0", "just-scripts": "^1.3.3", - "react-native": "0.81.0-nightly-20250709-6892dde36", + "react-native": "0.82.0-nightly-20250806-5936f29d6", "react-native-platform-override": "^1.9.59", "typescript": "5.0.4" }, "engines": { "node": ">= 22" } -} \ No newline at end of file +} diff --git a/packages/@office-iss/react-native-win32/package.json b/packages/@office-iss/react-native-win32/package.json index 2f5a44fea52..e0b0d0e245d 100644 --- a/packages/@office-iss/react-native-win32/package.json +++ b/packages/@office-iss/react-native-win32/package.json @@ -88,7 +88,7 @@ "just-scripts": "^1.3.3", "prettier": "2.8.8", "react": "19.1.0", - "react-native": "0.81.0-nightly-20250709-6892dde36", + "react-native": "0.82.0-nightly-20250806-5936f29d6", "react-native-platform-override": "^1.9.59", "typescript": "5.0.4" }, @@ -112,4 +112,4 @@ "engines": { "node": ">= 22" } -} \ No newline at end of file +} diff --git a/packages/@react-native-windows/automation-channel/package.json b/packages/@react-native-windows/automation-channel/package.json index a3070aff45f..87da23be7ef 100644 --- a/packages/@react-native-windows/automation-channel/package.json +++ b/packages/@react-native-windows/automation-channel/package.json @@ -32,7 +32,7 @@ "just-scripts": "^1.3.2", "prettier": "2.8.8", "react": "19.1.0", - "react-native": "0.81.0-nightly-20250709-6892dde36", + "react-native": "0.82.0-nightly-20250806-5936f29d6", "react-native-windows": "^0.0.0-canary.999", "typescript": "5.0.4" }, diff --git a/packages/@react-native-windows/tester/package.json b/packages/@react-native-windows/tester/package.json index c8030706eeb..b440ec94d38 100644 --- a/packages/@react-native-windows/tester/package.json +++ b/packages/@react-native-windows/tester/package.json @@ -33,7 +33,7 @@ "@types/node": "^22.14.0", "eslint": "^8.19.0", "just-scripts": "^1.3.3", - "react-native": "0.81.0-nightly-20250709-6892dde36", + "react-native": "0.82.0-nightly-20250806-5936f29d6", "react-native-platform-override": "^1.9.59", "react-native-windows": "^0.0.0-canary.999", "typescript": "5.0.4" @@ -41,4 +41,4 @@ "engines": { "node": ">= 22" } -} \ No newline at end of file +} diff --git a/packages/@react-native/monorepo/overrides.json b/packages/@react-native/monorepo/overrides.json index cae52fcbf07..0efe6b7508e 100644 --- a/packages/@react-native/monorepo/overrides.json +++ b/packages/@react-native/monorepo/overrides.json @@ -1,10 +1,11 @@ { - "baseVersion": "0.81.0-nightly-20250709-6892dde36", + "baseVersion": "0.82.0-nightly-20250806-5936f29d6", "overrides": [ { "type": "patch", "file": "package.json", "baseFile": "package.json", + "baseVersion": "0.81.0-nightly-20250709-6892dde36", "baseHash": "47d95d17d32c83bc795c3f50fa1ce7a393271b75" } ] diff --git a/packages/e2e-test-app-fabric/package.json b/packages/e2e-test-app-fabric/package.json index 524a1f61b69..9f5c6abcda8 100644 --- a/packages/e2e-test-app-fabric/package.json +++ b/packages/e2e-test-app-fabric/package.json @@ -20,7 +20,7 @@ "@typescript-eslint/eslint-plugin": "^7.1.1", "@typescript-eslint/parser": "^7.1.1", "react": "^19.1.0", - "react-native": "0.81.0-nightly-20250709-6892dde36", + "react-native": "0.82.0-nightly-20250806-5936f29d6", "react-native-windows": "^0.0.0-canary.999" }, "devDependencies": { diff --git a/packages/e2e-test-app/package.json b/packages/e2e-test-app/package.json index 7352c2eefce..253e8fc4982 100644 --- a/packages/e2e-test-app/package.json +++ b/packages/e2e-test-app/package.json @@ -20,7 +20,7 @@ "@typescript-eslint/eslint-plugin": "^7.1.1", "@typescript-eslint/parser": "^7.1.1", "react": "^19.1.0", - "react-native": "0.81.0-nightly-20250709-6892dde36", + "react-native": "0.82.0-nightly-20250806-5936f29d6", "react-native-windows": "^0.0.0-canary.999", "react-native-xaml": "^0.0.80" }, diff --git a/packages/integration-test-app/package.json b/packages/integration-test-app/package.json index 9c7e4268d6f..04227265b5d 100644 --- a/packages/integration-test-app/package.json +++ b/packages/integration-test-app/package.json @@ -17,7 +17,7 @@ "@typescript-eslint/parser": "^7.1.1", "chai": "^4.2.0", "react": "^19.1.0", - "react-native": "0.81.0-nightly-20250709-6892dde36", + "react-native": "0.82.0-nightly-20250806-5936f29d6", "react-native-windows": "^0.0.0-canary.999" }, "devDependencies": { @@ -51,4 +51,4 @@ "engines": { "node": ">= 22" } -} \ No newline at end of file +} diff --git a/packages/playground/package.json b/packages/playground/package.json index 4b832a95801..712d1780e07 100644 --- a/packages/playground/package.json +++ b/packages/playground/package.json @@ -15,7 +15,7 @@ "@typescript-eslint/eslint-plugin": "^7.1.1", "@typescript-eslint/parser": "^7.1.1", "react": "^19.1.0", - "react-native": "0.81.0-nightly-20250709-6892dde36", + "react-native": "0.82.0-nightly-20250806-5936f29d6", "react-native-windows": "^0.0.0-canary.999" }, "devDependencies": { @@ -39,4 +39,4 @@ "engines": { "node": ">= 22" } -} \ No newline at end of file +} diff --git a/packages/sample-app-fabric/package.json b/packages/sample-app-fabric/package.json index 3504b6ad1a3..c176f154fcf 100644 --- a/packages/sample-app-fabric/package.json +++ b/packages/sample-app-fabric/package.json @@ -17,7 +17,7 @@ "@typescript-eslint/parser": "^7.1.1", "@react-native/new-app-screen": "0.81.0-nightly-20250709-6892dde36", "react": "^19.1.0", - "react-native": "0.81.0-nightly-20250709-6892dde36", + "react-native": "0.82.0-nightly-20250806-5936f29d6", "react-native-windows": "^0.0.0-canary.999" }, "devDependencies": { @@ -49,4 +49,4 @@ "engines": { "node": ">=18" } -} \ No newline at end of file +} diff --git a/packages/sample-apps/package.json b/packages/sample-apps/package.json index 595a033dfcb..12c26168a64 100644 --- a/packages/sample-apps/package.json +++ b/packages/sample-apps/package.json @@ -16,7 +16,7 @@ "@typescript-eslint/eslint-plugin": "^7.1.1", "@typescript-eslint/parser": "^7.1.1", "react": "^19.1.0", - "react-native": "0.81.0-nightly-20250709-6892dde36", + "react-native": "0.82.0-nightly-20250806-5936f29d6", "react-native-windows": "^0.0.0-canary.999" }, "devDependencies": { @@ -50,4 +50,4 @@ "engines": { "node": ">= 22" } -} \ No newline at end of file +} diff --git a/packages/sample-custom-component/package.json b/packages/sample-custom-component/package.json index c0305317761..bcb78cceb03 100644 --- a/packages/sample-custom-component/package.json +++ b/packages/sample-custom-component/package.json @@ -22,7 +22,7 @@ "dependencies": { "@types/react": "^19.1.0", "react": "^19.1.0", - "react-native": "0.81.0-nightly-20250709-6892dde36", + "react-native": "0.82.0-nightly-20250806-5936f29d6", "react-native-windows": "^0.0.0-canary.999" }, "devDependencies": { @@ -53,4 +53,4 @@ "engines": { "node": ">=18" } -} \ No newline at end of file +} diff --git a/vnext/codegen/NativeIntersectionObserverSpec.g.h b/vnext/codegen/NativeIntersectionObserverSpec.g.h index d5478418b9c..35b8e136f25 100644 --- a/vnext/codegen/NativeIntersectionObserverSpec.g.h +++ b/vnext/codegen/NativeIntersectionObserverSpec.g.h @@ -59,13 +59,11 @@ inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(IntersectionObserve struct IntersectionObserverSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { static constexpr auto methods = std::tuple{ - Method{0, L"observe"}, - Method{1, L"unobserve"}, - SyncMethod<(IntersectionObserverSpec_NativeIntersectionObserverObserveOptions) noexcept>{2, L"observeV2"}, - Method{3, L"unobserveV2"}, - Method) noexcept>{4, L"connect"}, - Method{5, L"disconnect"}, - SyncMethod() noexcept>{6, L"takeRecords"}, + SyncMethod<(IntersectionObserverSpec_NativeIntersectionObserverObserveOptions) noexcept>{0, L"observeV2"}, + Method{1, L"unobserveV2"}, + Method) noexcept>{2, L"connect"}, + Method{3, L"disconnect"}, + SyncMethod() noexcept>{4, L"takeRecords"}, }; template @@ -74,36 +72,26 @@ struct IntersectionObserverSpec : winrt::Microsoft::ReactNative::TurboModuleSpec REACT_SHOW_METHOD_SPEC_ERRORS( 0, - "observe", - " REACT_METHOD(observe) void observe(IntersectionObserverSpec_NativeIntersectionObserverObserveOptions && options) noexcept { /* implementation */ }\n" - " REACT_METHOD(observe) static void observe(IntersectionObserverSpec_NativeIntersectionObserverObserveOptions && options) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 1, - "unobserve", - " REACT_METHOD(unobserve) void unobserve(double intersectionObserverId, targetShadowNode) noexcept { /* implementation */ }\n" - " REACT_METHOD(unobserve) static void unobserve(double intersectionObserverId, targetShadowNode) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 2, "observeV2", " REACT_SYNC_METHOD(observeV2) observeV2(IntersectionObserverSpec_NativeIntersectionObserverObserveOptions && options) noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(observeV2) static observeV2(IntersectionObserverSpec_NativeIntersectionObserverObserveOptions && options) noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 3, + 1, "unobserveV2", " REACT_METHOD(unobserveV2) void unobserveV2(double intersectionObserverId, token) noexcept { /* implementation */ }\n" " REACT_METHOD(unobserveV2) static void unobserveV2(double intersectionObserverId, token) noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 4, + 2, "connect", " REACT_METHOD(connect) void connect(std::function const & notifyIntersectionObserversCallback) noexcept { /* implementation */ }\n" " REACT_METHOD(connect) static void connect(std::function const & notifyIntersectionObserversCallback) noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 5, + 3, "disconnect", " REACT_METHOD(disconnect) void disconnect() noexcept { /* implementation */ }\n" " REACT_METHOD(disconnect) static void disconnect() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 6, + 4, "takeRecords", " REACT_SYNC_METHOD(takeRecords) std::vector takeRecords() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(takeRecords) static std::vector takeRecords() noexcept { /* implementation */ }\n"); diff --git a/vnext/codegen/NativePerformanceSpec.g.h b/vnext/codegen/NativePerformanceSpec.g.h index 5d058ccdb96..cdf87e9ae60 100644 --- a/vnext/codegen/NativePerformanceSpec.g.h +++ b/vnext/codegen/NativePerformanceSpec.g.h @@ -94,9 +94,9 @@ inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(PerformanceSpec_Rea struct PerformanceSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { static constexpr auto methods = std::tuple{ SyncMethod{0, L"now"}, - SyncMethod{1, L"markWithResult"}, - SyncMethod(std::string, double, double, double, std::string, std::string) noexcept>{2, L"measure"}, - SyncMethod(std::string, double, double, double, std::string, std::string) noexcept>{3, L"measureWithResult"}, + Method{1, L"reportMark"}, + Method{2, L"reportMeasure"}, + SyncMethod(std::string) noexcept>{3, L"getMarkTime"}, Method{4, L"clearMarks"}, Method{5, L"clearMeasures"}, SyncMethod() noexcept>{6, L"getEntries"}, @@ -111,8 +111,7 @@ struct PerformanceSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { Method{15, L"disconnect"}, SyncMethod(, bool) noexcept>{16, L"takeRecords"}, SyncMethod() noexcept>{17, L"getSupportedPerformanceEntryTypes"}, - Method{18, L"setCurrentTimeStampForTesting"}, - Method{19, L"clearEventCountsForTesting"}, + Method{18, L"clearEventCountsForTesting"}, }; template @@ -126,19 +125,19 @@ struct PerformanceSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { " REACT_SYNC_METHOD(now) static double now() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( 1, - "markWithResult", - " REACT_SYNC_METHOD(markWithResult) double markWithResult(std::string name, double startTime) noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(markWithResult) static double markWithResult(std::string name, double startTime) noexcept { /* implementation */ }\n"); + "reportMark", + " REACT_METHOD(reportMark) void reportMark(std::string name, double startTime, entry) noexcept { /* implementation */ }\n" + " REACT_METHOD(reportMark) static void reportMark(std::string name, double startTime, entry) noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( 2, - "measure", - " REACT_SYNC_METHOD(measure) std::vector measure(std::string name, double startTime, double endTime, double duration, std::string startMark, std::string endMark) noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(measure) static std::vector measure(std::string name, double startTime, double endTime, double duration, std::string startMark, std::string endMark) noexcept { /* implementation */ }\n"); + "reportMeasure", + " REACT_METHOD(reportMeasure) void reportMeasure(std::string name, double startTime, double duration, entry) noexcept { /* implementation */ }\n" + " REACT_METHOD(reportMeasure) static void reportMeasure(std::string name, double startTime, double duration, entry) noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( 3, - "measureWithResult", - " REACT_SYNC_METHOD(measureWithResult) std::vector measureWithResult(std::string name, double startTime, double endTime, double duration, std::string startMark, std::string endMark) noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(measureWithResult) static std::vector measureWithResult(std::string name, double startTime, double endTime, double duration, std::string startMark, std::string endMark) noexcept { /* implementation */ }\n"); + "getMarkTime", + " REACT_SYNC_METHOD(getMarkTime) std::optional getMarkTime(std::string name) noexcept { /* implementation */ }\n" + " REACT_SYNC_METHOD(getMarkTime) static std::optional getMarkTime(std::string name) noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( 4, "clearMarks", @@ -211,11 +210,6 @@ struct PerformanceSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { " REACT_SYNC_METHOD(getSupportedPerformanceEntryTypes) static std::vector getSupportedPerformanceEntryTypes() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( 18, - "setCurrentTimeStampForTesting", - " REACT_METHOD(setCurrentTimeStampForTesting) void setCurrentTimeStampForTesting(double timeStamp) noexcept { /* implementation */ }\n" - " REACT_METHOD(setCurrentTimeStampForTesting) static void setCurrentTimeStampForTesting(double timeStamp) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 19, "clearEventCountsForTesting", " REACT_METHOD(clearEventCountsForTesting) void clearEventCountsForTesting() noexcept { /* implementation */ }\n" " REACT_METHOD(clearEventCountsForTesting) static void clearEventCountsForTesting() noexcept { /* implementation */ }\n"); diff --git a/vnext/codegen/NativeReactNativeFeatureFlagsSpec.g.h b/vnext/codegen/NativeReactNativeFeatureFlagsSpec.g.h index a0c80911e2e..acb3577d276 100644 --- a/vnext/codegen/NativeReactNativeFeatureFlagsSpec.g.h +++ b/vnext/codegen/NativeReactNativeFeatureFlagsSpec.g.h @@ -19,63 +19,73 @@ struct ReactNativeFeatureFlagsSpec : winrt::Microsoft::ReactNative::TurboModuleS static constexpr auto methods = std::tuple{ SyncMethod{0, L"commonTestFlag"}, SyncMethod{1, L"commonTestFlagWithoutNativeImplementation"}, - SyncMethod{2, L"animatedShouldSignalBatch"}, + SyncMethod{2, L"cdpInteractionMetricsEnabled"}, SyncMethod{3, L"cxxNativeAnimatedEnabled"}, SyncMethod{4, L"cxxNativeAnimatedRemoveJsSync"}, - SyncMethod{5, L"disableMainQueueSyncDispatchIOS"}, + SyncMethod{5, L"disableFabricCommitInCXXAnimated"}, SyncMethod{6, L"disableMountItemReorderingAndroid"}, - SyncMethod{7, L"disableTextLayoutManagerCacheAndroid"}, - SyncMethod{8, L"enableAccessibilityOrder"}, - SyncMethod{9, L"enableAccumulatedUpdatesInRawPropsAndroid"}, - SyncMethod{10, L"enableAndroidTextMeasurementOptimizations"}, - SyncMethod{11, L"enableBridgelessArchitecture"}, - SyncMethod{12, L"enableCppPropsIteratorSetter"}, - SyncMethod{13, L"enableCustomFocusSearchOnClippedElementsAndroid"}, - SyncMethod{14, L"enableDestroyShadowTreeRevisionAsync"}, - SyncMethod{15, L"enableDoubleMeasurementFixAndroid"}, - SyncMethod{16, L"enableEagerRootViewAttachment"}, - SyncMethod{17, L"enableFabricLogs"}, - SyncMethod{18, L"enableFabricRenderer"}, - SyncMethod{19, L"enableFixForParentTagDuringReparenting"}, - SyncMethod{20, L"enableFontScaleChangesUpdatingLayout"}, - SyncMethod{21, L"enableIOSTextBaselineOffsetPerLine"}, - SyncMethod{22, L"enableIOSViewClipToPaddingBox"}, - SyncMethod{23, L"enableInteropViewManagerClassLookUpOptimizationIOS"}, - SyncMethod{24, L"enableLayoutAnimationsOnAndroid"}, - SyncMethod{25, L"enableLayoutAnimationsOnIOS"}, - SyncMethod{26, L"enableMainQueueCoordinatorOnIOS"}, - SyncMethod{27, L"enableMainQueueModulesOnIOS"}, - SyncMethod{28, L"enableModuleArgumentNSNullConversionIOS"}, - SyncMethod{29, L"enableNativeCSSParsing"}, - SyncMethod{30, L"enableNetworkEventReporting"}, - SyncMethod{31, L"enableNewBackgroundAndBorderDrawables"}, - SyncMethod{32, L"enablePreparedTextLayout"}, - SyncMethod{33, L"enablePropsUpdateReconciliationAndroid"}, - SyncMethod{34, L"enableResourceTimingAPI"}, - SyncMethod{35, L"enableSynchronousStateUpdates"}, - SyncMethod{36, L"enableViewCulling"}, - SyncMethod{37, L"enableViewRecycling"}, - SyncMethod{38, L"enableViewRecyclingForText"}, - SyncMethod{39, L"enableViewRecyclingForView"}, - SyncMethod{40, L"enableVirtualViewDebugFeatures"}, - SyncMethod{41, L"enableVirtualViewRenderState"}, - SyncMethod{42, L"enableVirtualViewWindowFocusDetection"}, - SyncMethod{43, L"fixMappingOfEventPrioritiesBetweenFabricAndReact"}, - SyncMethod{44, L"fuseboxEnabledRelease"}, - SyncMethod{45, L"fuseboxNetworkInspectionEnabled"}, - SyncMethod{46, L"hideOffscreenVirtualViewsOnIOS"}, - SyncMethod{47, L"preparedTextCacheSize"}, - SyncMethod{48, L"traceTurboModulePromiseRejectionsOnAndroid"}, - SyncMethod{49, L"updateRuntimeShadowNodeReferencesOnCommit"}, - SyncMethod{50, L"useAlwaysAvailableJSErrorHandling"}, - SyncMethod{51, L"useFabricInterop"}, - SyncMethod{52, L"useNativeViewConfigsInBridgelessMode"}, - SyncMethod{53, L"useOptimizedEventBatchingOnAndroid"}, - SyncMethod{54, L"useRawPropsJsiValue"}, - SyncMethod{55, L"useShadowNodeStateOnClone"}, - SyncMethod{56, L"useTurboModuleInterop"}, - SyncMethod{57, L"useTurboModules"}, - SyncMethod{58, L"virtualViewPrerenderRatio"}, + SyncMethod{7, L"disableOldAndroidAttachmentMetricsWorkarounds"}, + SyncMethod{8, L"disableTextLayoutManagerCacheAndroid"}, + SyncMethod{9, L"enableAccessibilityOrder"}, + SyncMethod{10, L"enableAccumulatedUpdatesInRawPropsAndroid"}, + SyncMethod{11, L"enableAndroidTextMeasurementOptimizations"}, + SyncMethod{12, L"enableBridgelessArchitecture"}, + SyncMethod{13, L"enableCppPropsIteratorSetter"}, + SyncMethod{14, L"enableCustomFocusSearchOnClippedElementsAndroid"}, + SyncMethod{15, L"enableDestroyShadowTreeRevisionAsync"}, + SyncMethod{16, L"enableDoubleMeasurementFixAndroid"}, + SyncMethod{17, L"enableEagerMainQueueModulesOnIOS"}, + SyncMethod{18, L"enableEagerRootViewAttachment"}, + SyncMethod{19, L"enableFabricLogs"}, + SyncMethod{20, L"enableFabricRenderer"}, + SyncMethod{21, L"enableFixForParentTagDuringReparenting"}, + SyncMethod{22, L"enableFontScaleChangesUpdatingLayout"}, + SyncMethod{23, L"enableIOSTextBaselineOffsetPerLine"}, + SyncMethod{24, L"enableIOSViewClipToPaddingBox"}, + SyncMethod{25, L"enableImagePrefetchingAndroid"}, + SyncMethod{26, L"enableImmediateUpdateModeForContentOffsetChanges"}, + SyncMethod{27, L"enableInteropViewManagerClassLookUpOptimizationIOS"}, + SyncMethod{28, L"enableLayoutAnimationsOnAndroid"}, + SyncMethod{29, L"enableLayoutAnimationsOnIOS"}, + SyncMethod{30, L"enableMainQueueCoordinatorOnIOS"}, + SyncMethod{31, L"enableModuleArgumentNSNullConversionIOS"}, + SyncMethod{32, L"enableNativeCSSParsing"}, + SyncMethod{33, L"enableNetworkEventReporting"}, + SyncMethod{34, L"enableNewBackgroundAndBorderDrawables"}, + SyncMethod{35, L"enablePreparedTextLayout"}, + SyncMethod{36, L"enablePropsUpdateReconciliationAndroid"}, + SyncMethod{37, L"enableResourceTimingAPI"}, + SyncMethod{38, L"enableViewCulling"}, + SyncMethod{39, L"enableViewRecycling"}, + SyncMethod{40, L"enableViewRecyclingForText"}, + SyncMethod{41, L"enableViewRecyclingForView"}, + SyncMethod{42, L"enableVirtualViewDebugFeatures"}, + SyncMethod{43, L"enableVirtualViewRenderState"}, + SyncMethod{44, L"enableVirtualViewWindowFocusDetection"}, + SyncMethod{45, L"fixMappingOfEventPrioritiesBetweenFabricAndReact"}, + SyncMethod{46, L"fuseboxEnabledRelease"}, + SyncMethod{47, L"fuseboxNetworkInspectionEnabled"}, + SyncMethod{48, L"hideOffscreenVirtualViewsOnIOS"}, + SyncMethod{49, L"perfMonitorV2Enabled"}, + SyncMethod{50, L"preparedTextCacheSize"}, + SyncMethod{51, L"preventShadowTreeCommitExhaustion"}, + SyncMethod{52, L"releaseImageDataWhenConsumed"}, + SyncMethod{53, L"shouldPressibilityUseW3CPointerEventsForHover"}, + SyncMethod{54, L"skipActivityIdentityAssertionOnHostPause"}, + SyncMethod{55, L"sweepActiveTouchOnChildNativeGesturesAndroid"}, + SyncMethod{56, L"traceTurboModulePromiseRejectionsOnAndroid"}, + SyncMethod{57, L"updateRuntimeShadowNodeReferencesOnCommit"}, + SyncMethod{58, L"useAlwaysAvailableJSErrorHandling"}, + SyncMethod{59, L"useFabricInterop"}, + SyncMethod{60, L"useNativeEqualsInNativeReadableArrayAndroid"}, + SyncMethod{61, L"useNativeTransformHelperAndroid"}, + SyncMethod{62, L"useNativeViewConfigsInBridgelessMode"}, + SyncMethod{63, L"useOptimizedEventBatchingOnAndroid"}, + SyncMethod{64, L"useRawPropsJsiValue"}, + SyncMethod{65, L"useShadowNodeStateOnClone"}, + SyncMethod{66, L"useTurboModuleInterop"}, + SyncMethod{67, L"useTurboModules"}, + SyncMethod{68, L"virtualViewPrerenderRatio"}, }; template @@ -94,9 +104,9 @@ struct ReactNativeFeatureFlagsSpec : winrt::Microsoft::ReactNative::TurboModuleS " REACT_SYNC_METHOD(commonTestFlagWithoutNativeImplementation) static bool commonTestFlagWithoutNativeImplementation() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( 2, - "animatedShouldSignalBatch", - " REACT_SYNC_METHOD(animatedShouldSignalBatch) bool animatedShouldSignalBatch() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(animatedShouldSignalBatch) static bool animatedShouldSignalBatch() noexcept { /* implementation */ }\n"); + "cdpInteractionMetricsEnabled", + " REACT_SYNC_METHOD(cdpInteractionMetricsEnabled) bool cdpInteractionMetricsEnabled() noexcept { /* implementation */ }\n" + " REACT_SYNC_METHOD(cdpInteractionMetricsEnabled) static bool cdpInteractionMetricsEnabled() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( 3, "cxxNativeAnimatedEnabled", @@ -109,9 +119,9 @@ struct ReactNativeFeatureFlagsSpec : winrt::Microsoft::ReactNative::TurboModuleS " REACT_SYNC_METHOD(cxxNativeAnimatedRemoveJsSync) static bool cxxNativeAnimatedRemoveJsSync() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( 5, - "disableMainQueueSyncDispatchIOS", - " REACT_SYNC_METHOD(disableMainQueueSyncDispatchIOS) bool disableMainQueueSyncDispatchIOS() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(disableMainQueueSyncDispatchIOS) static bool disableMainQueueSyncDispatchIOS() noexcept { /* implementation */ }\n"); + "disableFabricCommitInCXXAnimated", + " REACT_SYNC_METHOD(disableFabricCommitInCXXAnimated) bool disableFabricCommitInCXXAnimated() noexcept { /* implementation */ }\n" + " REACT_SYNC_METHOD(disableFabricCommitInCXXAnimated) static bool disableFabricCommitInCXXAnimated() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( 6, "disableMountItemReorderingAndroid", @@ -119,261 +129,311 @@ struct ReactNativeFeatureFlagsSpec : winrt::Microsoft::ReactNative::TurboModuleS " REACT_SYNC_METHOD(disableMountItemReorderingAndroid) static bool disableMountItemReorderingAndroid() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( 7, + "disableOldAndroidAttachmentMetricsWorkarounds", + " REACT_SYNC_METHOD(disableOldAndroidAttachmentMetricsWorkarounds) bool disableOldAndroidAttachmentMetricsWorkarounds() noexcept { /* implementation */ }\n" + " REACT_SYNC_METHOD(disableOldAndroidAttachmentMetricsWorkarounds) static bool disableOldAndroidAttachmentMetricsWorkarounds() noexcept { /* implementation */ }\n"); + REACT_SHOW_METHOD_SPEC_ERRORS( + 8, "disableTextLayoutManagerCacheAndroid", " REACT_SYNC_METHOD(disableTextLayoutManagerCacheAndroid) bool disableTextLayoutManagerCacheAndroid() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(disableTextLayoutManagerCacheAndroid) static bool disableTextLayoutManagerCacheAndroid() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 8, + 9, "enableAccessibilityOrder", " REACT_SYNC_METHOD(enableAccessibilityOrder) bool enableAccessibilityOrder() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableAccessibilityOrder) static bool enableAccessibilityOrder() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 9, + 10, "enableAccumulatedUpdatesInRawPropsAndroid", " REACT_SYNC_METHOD(enableAccumulatedUpdatesInRawPropsAndroid) bool enableAccumulatedUpdatesInRawPropsAndroid() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableAccumulatedUpdatesInRawPropsAndroid) static bool enableAccumulatedUpdatesInRawPropsAndroid() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 10, + 11, "enableAndroidTextMeasurementOptimizations", " REACT_SYNC_METHOD(enableAndroidTextMeasurementOptimizations) bool enableAndroidTextMeasurementOptimizations() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableAndroidTextMeasurementOptimizations) static bool enableAndroidTextMeasurementOptimizations() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 11, + 12, "enableBridgelessArchitecture", " REACT_SYNC_METHOD(enableBridgelessArchitecture) bool enableBridgelessArchitecture() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableBridgelessArchitecture) static bool enableBridgelessArchitecture() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 12, + 13, "enableCppPropsIteratorSetter", " REACT_SYNC_METHOD(enableCppPropsIteratorSetter) bool enableCppPropsIteratorSetter() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableCppPropsIteratorSetter) static bool enableCppPropsIteratorSetter() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 13, + 14, "enableCustomFocusSearchOnClippedElementsAndroid", " REACT_SYNC_METHOD(enableCustomFocusSearchOnClippedElementsAndroid) bool enableCustomFocusSearchOnClippedElementsAndroid() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableCustomFocusSearchOnClippedElementsAndroid) static bool enableCustomFocusSearchOnClippedElementsAndroid() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 14, + 15, "enableDestroyShadowTreeRevisionAsync", " REACT_SYNC_METHOD(enableDestroyShadowTreeRevisionAsync) bool enableDestroyShadowTreeRevisionAsync() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableDestroyShadowTreeRevisionAsync) static bool enableDestroyShadowTreeRevisionAsync() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 15, + 16, "enableDoubleMeasurementFixAndroid", " REACT_SYNC_METHOD(enableDoubleMeasurementFixAndroid) bool enableDoubleMeasurementFixAndroid() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableDoubleMeasurementFixAndroid) static bool enableDoubleMeasurementFixAndroid() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 16, + 17, + "enableEagerMainQueueModulesOnIOS", + " REACT_SYNC_METHOD(enableEagerMainQueueModulesOnIOS) bool enableEagerMainQueueModulesOnIOS() noexcept { /* implementation */ }\n" + " REACT_SYNC_METHOD(enableEagerMainQueueModulesOnIOS) static bool enableEagerMainQueueModulesOnIOS() noexcept { /* implementation */ }\n"); + REACT_SHOW_METHOD_SPEC_ERRORS( + 18, "enableEagerRootViewAttachment", " REACT_SYNC_METHOD(enableEagerRootViewAttachment) bool enableEagerRootViewAttachment() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableEagerRootViewAttachment) static bool enableEagerRootViewAttachment() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 17, + 19, "enableFabricLogs", " REACT_SYNC_METHOD(enableFabricLogs) bool enableFabricLogs() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableFabricLogs) static bool enableFabricLogs() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 18, + 20, "enableFabricRenderer", " REACT_SYNC_METHOD(enableFabricRenderer) bool enableFabricRenderer() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableFabricRenderer) static bool enableFabricRenderer() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 19, + 21, "enableFixForParentTagDuringReparenting", " REACT_SYNC_METHOD(enableFixForParentTagDuringReparenting) bool enableFixForParentTagDuringReparenting() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableFixForParentTagDuringReparenting) static bool enableFixForParentTagDuringReparenting() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 20, + 22, "enableFontScaleChangesUpdatingLayout", " REACT_SYNC_METHOD(enableFontScaleChangesUpdatingLayout) bool enableFontScaleChangesUpdatingLayout() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableFontScaleChangesUpdatingLayout) static bool enableFontScaleChangesUpdatingLayout() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 21, + 23, "enableIOSTextBaselineOffsetPerLine", " REACT_SYNC_METHOD(enableIOSTextBaselineOffsetPerLine) bool enableIOSTextBaselineOffsetPerLine() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableIOSTextBaselineOffsetPerLine) static bool enableIOSTextBaselineOffsetPerLine() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 22, + 24, "enableIOSViewClipToPaddingBox", " REACT_SYNC_METHOD(enableIOSViewClipToPaddingBox) bool enableIOSViewClipToPaddingBox() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableIOSViewClipToPaddingBox) static bool enableIOSViewClipToPaddingBox() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 23, + 25, + "enableImagePrefetchingAndroid", + " REACT_SYNC_METHOD(enableImagePrefetchingAndroid) bool enableImagePrefetchingAndroid() noexcept { /* implementation */ }\n" + " REACT_SYNC_METHOD(enableImagePrefetchingAndroid) static bool enableImagePrefetchingAndroid() noexcept { /* implementation */ }\n"); + REACT_SHOW_METHOD_SPEC_ERRORS( + 26, + "enableImmediateUpdateModeForContentOffsetChanges", + " REACT_SYNC_METHOD(enableImmediateUpdateModeForContentOffsetChanges) bool enableImmediateUpdateModeForContentOffsetChanges() noexcept { /* implementation */ }\n" + " REACT_SYNC_METHOD(enableImmediateUpdateModeForContentOffsetChanges) static bool enableImmediateUpdateModeForContentOffsetChanges() noexcept { /* implementation */ }\n"); + REACT_SHOW_METHOD_SPEC_ERRORS( + 27, "enableInteropViewManagerClassLookUpOptimizationIOS", " REACT_SYNC_METHOD(enableInteropViewManagerClassLookUpOptimizationIOS) bool enableInteropViewManagerClassLookUpOptimizationIOS() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableInteropViewManagerClassLookUpOptimizationIOS) static bool enableInteropViewManagerClassLookUpOptimizationIOS() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 24, + 28, "enableLayoutAnimationsOnAndroid", " REACT_SYNC_METHOD(enableLayoutAnimationsOnAndroid) bool enableLayoutAnimationsOnAndroid() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableLayoutAnimationsOnAndroid) static bool enableLayoutAnimationsOnAndroid() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 25, + 29, "enableLayoutAnimationsOnIOS", " REACT_SYNC_METHOD(enableLayoutAnimationsOnIOS) bool enableLayoutAnimationsOnIOS() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableLayoutAnimationsOnIOS) static bool enableLayoutAnimationsOnIOS() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 26, + 30, "enableMainQueueCoordinatorOnIOS", " REACT_SYNC_METHOD(enableMainQueueCoordinatorOnIOS) bool enableMainQueueCoordinatorOnIOS() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableMainQueueCoordinatorOnIOS) static bool enableMainQueueCoordinatorOnIOS() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 27, - "enableMainQueueModulesOnIOS", - " REACT_SYNC_METHOD(enableMainQueueModulesOnIOS) bool enableMainQueueModulesOnIOS() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(enableMainQueueModulesOnIOS) static bool enableMainQueueModulesOnIOS() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 28, + 31, "enableModuleArgumentNSNullConversionIOS", " REACT_SYNC_METHOD(enableModuleArgumentNSNullConversionIOS) bool enableModuleArgumentNSNullConversionIOS() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableModuleArgumentNSNullConversionIOS) static bool enableModuleArgumentNSNullConversionIOS() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 29, + 32, "enableNativeCSSParsing", " REACT_SYNC_METHOD(enableNativeCSSParsing) bool enableNativeCSSParsing() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableNativeCSSParsing) static bool enableNativeCSSParsing() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 30, + 33, "enableNetworkEventReporting", " REACT_SYNC_METHOD(enableNetworkEventReporting) bool enableNetworkEventReporting() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableNetworkEventReporting) static bool enableNetworkEventReporting() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 31, + 34, "enableNewBackgroundAndBorderDrawables", " REACT_SYNC_METHOD(enableNewBackgroundAndBorderDrawables) bool enableNewBackgroundAndBorderDrawables() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableNewBackgroundAndBorderDrawables) static bool enableNewBackgroundAndBorderDrawables() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 32, + 35, "enablePreparedTextLayout", " REACT_SYNC_METHOD(enablePreparedTextLayout) bool enablePreparedTextLayout() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enablePreparedTextLayout) static bool enablePreparedTextLayout() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 33, + 36, "enablePropsUpdateReconciliationAndroid", " REACT_SYNC_METHOD(enablePropsUpdateReconciliationAndroid) bool enablePropsUpdateReconciliationAndroid() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enablePropsUpdateReconciliationAndroid) static bool enablePropsUpdateReconciliationAndroid() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 34, + 37, "enableResourceTimingAPI", " REACT_SYNC_METHOD(enableResourceTimingAPI) bool enableResourceTimingAPI() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableResourceTimingAPI) static bool enableResourceTimingAPI() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 35, - "enableSynchronousStateUpdates", - " REACT_SYNC_METHOD(enableSynchronousStateUpdates) bool enableSynchronousStateUpdates() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(enableSynchronousStateUpdates) static bool enableSynchronousStateUpdates() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 36, + 38, "enableViewCulling", " REACT_SYNC_METHOD(enableViewCulling) bool enableViewCulling() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableViewCulling) static bool enableViewCulling() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 37, + 39, "enableViewRecycling", " REACT_SYNC_METHOD(enableViewRecycling) bool enableViewRecycling() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableViewRecycling) static bool enableViewRecycling() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 38, + 40, "enableViewRecyclingForText", " REACT_SYNC_METHOD(enableViewRecyclingForText) bool enableViewRecyclingForText() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableViewRecyclingForText) static bool enableViewRecyclingForText() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 39, + 41, "enableViewRecyclingForView", " REACT_SYNC_METHOD(enableViewRecyclingForView) bool enableViewRecyclingForView() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableViewRecyclingForView) static bool enableViewRecyclingForView() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 40, + 42, "enableVirtualViewDebugFeatures", " REACT_SYNC_METHOD(enableVirtualViewDebugFeatures) bool enableVirtualViewDebugFeatures() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableVirtualViewDebugFeatures) static bool enableVirtualViewDebugFeatures() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 41, + 43, "enableVirtualViewRenderState", " REACT_SYNC_METHOD(enableVirtualViewRenderState) bool enableVirtualViewRenderState() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableVirtualViewRenderState) static bool enableVirtualViewRenderState() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 42, + 44, "enableVirtualViewWindowFocusDetection", " REACT_SYNC_METHOD(enableVirtualViewWindowFocusDetection) bool enableVirtualViewWindowFocusDetection() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableVirtualViewWindowFocusDetection) static bool enableVirtualViewWindowFocusDetection() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 43, + 45, "fixMappingOfEventPrioritiesBetweenFabricAndReact", " REACT_SYNC_METHOD(fixMappingOfEventPrioritiesBetweenFabricAndReact) bool fixMappingOfEventPrioritiesBetweenFabricAndReact() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(fixMappingOfEventPrioritiesBetweenFabricAndReact) static bool fixMappingOfEventPrioritiesBetweenFabricAndReact() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 44, + 46, "fuseboxEnabledRelease", " REACT_SYNC_METHOD(fuseboxEnabledRelease) bool fuseboxEnabledRelease() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(fuseboxEnabledRelease) static bool fuseboxEnabledRelease() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 45, + 47, "fuseboxNetworkInspectionEnabled", " REACT_SYNC_METHOD(fuseboxNetworkInspectionEnabled) bool fuseboxNetworkInspectionEnabled() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(fuseboxNetworkInspectionEnabled) static bool fuseboxNetworkInspectionEnabled() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 46, + 48, "hideOffscreenVirtualViewsOnIOS", " REACT_SYNC_METHOD(hideOffscreenVirtualViewsOnIOS) bool hideOffscreenVirtualViewsOnIOS() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(hideOffscreenVirtualViewsOnIOS) static bool hideOffscreenVirtualViewsOnIOS() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 47, + 49, + "perfMonitorV2Enabled", + " REACT_SYNC_METHOD(perfMonitorV2Enabled) bool perfMonitorV2Enabled() noexcept { /* implementation */ }\n" + " REACT_SYNC_METHOD(perfMonitorV2Enabled) static bool perfMonitorV2Enabled() noexcept { /* implementation */ }\n"); + REACT_SHOW_METHOD_SPEC_ERRORS( + 50, "preparedTextCacheSize", " REACT_SYNC_METHOD(preparedTextCacheSize) double preparedTextCacheSize() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(preparedTextCacheSize) static double preparedTextCacheSize() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 48, + 51, + "preventShadowTreeCommitExhaustion", + " REACT_SYNC_METHOD(preventShadowTreeCommitExhaustion) bool preventShadowTreeCommitExhaustion() noexcept { /* implementation */ }\n" + " REACT_SYNC_METHOD(preventShadowTreeCommitExhaustion) static bool preventShadowTreeCommitExhaustion() noexcept { /* implementation */ }\n"); + REACT_SHOW_METHOD_SPEC_ERRORS( + 52, + "releaseImageDataWhenConsumed", + " REACT_SYNC_METHOD(releaseImageDataWhenConsumed) bool releaseImageDataWhenConsumed() noexcept { /* implementation */ }\n" + " REACT_SYNC_METHOD(releaseImageDataWhenConsumed) static bool releaseImageDataWhenConsumed() noexcept { /* implementation */ }\n"); + REACT_SHOW_METHOD_SPEC_ERRORS( + 53, + "shouldPressibilityUseW3CPointerEventsForHover", + " REACT_SYNC_METHOD(shouldPressibilityUseW3CPointerEventsForHover) bool shouldPressibilityUseW3CPointerEventsForHover() noexcept { /* implementation */ }\n" + " REACT_SYNC_METHOD(shouldPressibilityUseW3CPointerEventsForHover) static bool shouldPressibilityUseW3CPointerEventsForHover() noexcept { /* implementation */ }\n"); + REACT_SHOW_METHOD_SPEC_ERRORS( + 54, + "skipActivityIdentityAssertionOnHostPause", + " REACT_SYNC_METHOD(skipActivityIdentityAssertionOnHostPause) bool skipActivityIdentityAssertionOnHostPause() noexcept { /* implementation */ }\n" + " REACT_SYNC_METHOD(skipActivityIdentityAssertionOnHostPause) static bool skipActivityIdentityAssertionOnHostPause() noexcept { /* implementation */ }\n"); + REACT_SHOW_METHOD_SPEC_ERRORS( + 55, + "sweepActiveTouchOnChildNativeGesturesAndroid", + " REACT_SYNC_METHOD(sweepActiveTouchOnChildNativeGesturesAndroid) bool sweepActiveTouchOnChildNativeGesturesAndroid() noexcept { /* implementation */ }\n" + " REACT_SYNC_METHOD(sweepActiveTouchOnChildNativeGesturesAndroid) static bool sweepActiveTouchOnChildNativeGesturesAndroid() noexcept { /* implementation */ }\n"); + REACT_SHOW_METHOD_SPEC_ERRORS( + 56, "traceTurboModulePromiseRejectionsOnAndroid", " REACT_SYNC_METHOD(traceTurboModulePromiseRejectionsOnAndroid) bool traceTurboModulePromiseRejectionsOnAndroid() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(traceTurboModulePromiseRejectionsOnAndroid) static bool traceTurboModulePromiseRejectionsOnAndroid() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 49, + 57, "updateRuntimeShadowNodeReferencesOnCommit", " REACT_SYNC_METHOD(updateRuntimeShadowNodeReferencesOnCommit) bool updateRuntimeShadowNodeReferencesOnCommit() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(updateRuntimeShadowNodeReferencesOnCommit) static bool updateRuntimeShadowNodeReferencesOnCommit() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 50, + 58, "useAlwaysAvailableJSErrorHandling", " REACT_SYNC_METHOD(useAlwaysAvailableJSErrorHandling) bool useAlwaysAvailableJSErrorHandling() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(useAlwaysAvailableJSErrorHandling) static bool useAlwaysAvailableJSErrorHandling() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 51, + 59, "useFabricInterop", " REACT_SYNC_METHOD(useFabricInterop) bool useFabricInterop() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(useFabricInterop) static bool useFabricInterop() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 52, + 60, + "useNativeEqualsInNativeReadableArrayAndroid", + " REACT_SYNC_METHOD(useNativeEqualsInNativeReadableArrayAndroid) bool useNativeEqualsInNativeReadableArrayAndroid() noexcept { /* implementation */ }\n" + " REACT_SYNC_METHOD(useNativeEqualsInNativeReadableArrayAndroid) static bool useNativeEqualsInNativeReadableArrayAndroid() noexcept { /* implementation */ }\n"); + REACT_SHOW_METHOD_SPEC_ERRORS( + 61, + "useNativeTransformHelperAndroid", + " REACT_SYNC_METHOD(useNativeTransformHelperAndroid) bool useNativeTransformHelperAndroid() noexcept { /* implementation */ }\n" + " REACT_SYNC_METHOD(useNativeTransformHelperAndroid) static bool useNativeTransformHelperAndroid() noexcept { /* implementation */ }\n"); + REACT_SHOW_METHOD_SPEC_ERRORS( + 62, "useNativeViewConfigsInBridgelessMode", " REACT_SYNC_METHOD(useNativeViewConfigsInBridgelessMode) bool useNativeViewConfigsInBridgelessMode() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(useNativeViewConfigsInBridgelessMode) static bool useNativeViewConfigsInBridgelessMode() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 53, + 63, "useOptimizedEventBatchingOnAndroid", " REACT_SYNC_METHOD(useOptimizedEventBatchingOnAndroid) bool useOptimizedEventBatchingOnAndroid() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(useOptimizedEventBatchingOnAndroid) static bool useOptimizedEventBatchingOnAndroid() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 54, + 64, "useRawPropsJsiValue", " REACT_SYNC_METHOD(useRawPropsJsiValue) bool useRawPropsJsiValue() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(useRawPropsJsiValue) static bool useRawPropsJsiValue() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 55, + 65, "useShadowNodeStateOnClone", " REACT_SYNC_METHOD(useShadowNodeStateOnClone) bool useShadowNodeStateOnClone() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(useShadowNodeStateOnClone) static bool useShadowNodeStateOnClone() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 56, + 66, "useTurboModuleInterop", " REACT_SYNC_METHOD(useTurboModuleInterop) bool useTurboModuleInterop() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(useTurboModuleInterop) static bool useTurboModuleInterop() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 57, + 67, "useTurboModules", " REACT_SYNC_METHOD(useTurboModules) bool useTurboModules() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(useTurboModules) static bool useTurboModules() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 58, + 68, "virtualViewPrerenderRatio", " REACT_SYNC_METHOD(virtualViewPrerenderRatio) double virtualViewPrerenderRatio() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(virtualViewPrerenderRatio) static double virtualViewPrerenderRatio() noexcept { /* implementation */ }\n"); diff --git a/vnext/codegen/react/components/rnwcore/EventEmitters.cpp b/vnext/codegen/react/components/rnwcore/EventEmitters.cpp index cb8c8986115..413c7604eec 100644 --- a/vnext/codegen/react/components/rnwcore/EventEmitters.cpp +++ b/vnext/codegen/react/components/rnwcore/EventEmitters.cpp @@ -13,6 +13,31 @@ namespace facebook::react { +void VirtualViewExperimentalEventEmitter::onModeChange(OnModeChange event) const { + dispatchEvent("modeChange", [event=std::move(event)](jsi::Runtime &runtime) { + auto payload = jsi::Object(runtime); + payload.setProperty(runtime, "mode", event.mode); +{ + auto targetRect = jsi::Object(runtime); + targetRect.setProperty(runtime, "x", event.targetRect.x); + targetRect.setProperty(runtime, "y", event.targetRect.y); + targetRect.setProperty(runtime, "width", event.targetRect.width); + targetRect.setProperty(runtime, "height", event.targetRect.height); + payload.setProperty(runtime, "targetRect", targetRect); +} +{ + auto thresholdRect = jsi::Object(runtime); + thresholdRect.setProperty(runtime, "x", event.thresholdRect.x); + thresholdRect.setProperty(runtime, "y", event.thresholdRect.y); + thresholdRect.setProperty(runtime, "width", event.thresholdRect.width); + thresholdRect.setProperty(runtime, "height", event.thresholdRect.height); + payload.setProperty(runtime, "thresholdRect", thresholdRect); +} + return payload; + }); +} + + void VirtualViewEventEmitter::onModeChange(OnModeChange event) const { dispatchEvent("modeChange", [event=std::move(event)](jsi::Runtime &runtime) { auto payload = jsi::Object(runtime); diff --git a/vnext/codegen/react/components/rnwcore/EventEmitters.h b/vnext/codegen/react/components/rnwcore/EventEmitters.h index eeff0c9a2a9..b6abdefc88a 100644 --- a/vnext/codegen/react/components/rnwcore/EventEmitters.h +++ b/vnext/codegen/react/components/rnwcore/EventEmitters.h @@ -13,6 +13,31 @@ namespace facebook::react { +class VirtualViewExperimentalEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + struct OnModeChangeTargetRect { + double x; + double y; + double width; + double height; + }; + + struct OnModeChangeThresholdRect { + double x; + double y; + double width; + double height; + }; + + struct OnModeChange { + int mode; + OnModeChangeTargetRect targetRect; + OnModeChangeThresholdRect thresholdRect; + }; + void onModeChange(OnModeChange value) const; +}; class VirtualViewEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; diff --git a/vnext/codegen/react/components/rnwcore/Props.cpp b/vnext/codegen/react/components/rnwcore/Props.cpp index b5f355391cb..09f2bb860f7 100644 --- a/vnext/codegen/react/components/rnwcore/Props.cpp +++ b/vnext/codegen/react/components/rnwcore/Props.cpp @@ -14,6 +14,40 @@ namespace facebook::react { +VirtualViewExperimentalProps::VirtualViewExperimentalProps( + const PropsParserContext &context, + const VirtualViewExperimentalProps &sourceProps, + const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), + + initialHidden(convertRawProp(context, rawProps, "initialHidden", sourceProps.initialHidden, {false})), + renderState(convertRawProp(context, rawProps, "renderState", sourceProps.renderState, {0})) {} + +#ifdef RN_SERIALIZABLE_STATE +ComponentName VirtualViewExperimentalProps::getDiffPropsImplementationTarget() const { + return "VirtualViewExperimental"; +} + +folly::dynamic VirtualViewExperimentalProps::getDiffProps( + const Props* prevProps) const { + static const auto defaultProps = VirtualViewExperimentalProps(); + const VirtualViewExperimentalProps* oldProps = prevProps == nullptr + ? &defaultProps + : static_cast(prevProps); + if (this == oldProps) { + return folly::dynamic::object(); + } + folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps); + + if (initialHidden != oldProps->initialHidden) { + result["initialHidden"] = initialHidden; + } + + if (renderState != oldProps->renderState) { + result["renderState"] = renderState; + } + return result; +} +#endif VirtualViewProps::VirtualViewProps( const PropsParserContext &context, const VirtualViewProps &sourceProps, diff --git a/vnext/codegen/react/components/rnwcore/Props.h b/vnext/codegen/react/components/rnwcore/Props.h index 726ded89f25..507e1f0460c 100644 --- a/vnext/codegen/react/components/rnwcore/Props.h +++ b/vnext/codegen/react/components/rnwcore/Props.h @@ -17,6 +17,23 @@ namespace facebook::react { +class VirtualViewExperimentalProps final : public ViewProps { + public: + VirtualViewExperimentalProps() = default; + VirtualViewExperimentalProps(const PropsParserContext& context, const VirtualViewExperimentalProps &sourceProps, const RawProps &rawProps); + +#pragma mark - Props + + bool initialHidden{false}; + int renderState{0}; + + #ifdef RN_SERIALIZABLE_STATE + ComponentName getDiffPropsImplementationTarget() const override; + + folly::dynamic getDiffProps(const Props* prevProps) const override; + #endif +}; + class VirtualViewProps final : public ViewProps { public: VirtualViewProps() = default; diff --git a/vnext/codegen/react/components/rnwcore/VirtualViewExperimental.g.h b/vnext/codegen/react/components/rnwcore/VirtualViewExperimental.g.h new file mode 100644 index 00000000000..68e0c7fb24a --- /dev/null +++ b/vnext/codegen/react/components/rnwcore/VirtualViewExperimental.g.h @@ -0,0 +1,226 @@ + +/* + * This file is auto-generated from VirtualViewExperimentalNativeComponent spec file in flow / TypeScript. + */ +// clang-format off +#pragma once + +#include + +#ifdef RNW_NEW_ARCH +#include + +#include +#include +#endif // #ifdef RNW_NEW_ARCH + +#ifdef RNW_NEW_ARCH + +namespace Microsoft::ReactNativeSpecs { + +REACT_STRUCT(VirtualViewExperimentalProps) +struct VirtualViewExperimentalProps : winrt::implements { + VirtualViewExperimentalProps(winrt::Microsoft::ReactNative::ViewProps props, const winrt::Microsoft::ReactNative::IComponentProps& cloneFrom) + : ViewProps(props) + { + if (cloneFrom) { + auto cloneFromProps = cloneFrom.as(); + initialHidden = cloneFromProps->initialHidden; + renderState = cloneFromProps->renderState; + } + } + + void SetProp(uint32_t hash, winrt::hstring propName, winrt::Microsoft::ReactNative::IJSValueReader value) noexcept { + winrt::Microsoft::ReactNative::ReadProp(hash, propName, value, *this); + } + + REACT_FIELD(initialHidden) + std::optional initialHidden{}; + + REACT_FIELD(renderState) + int32_t renderState{}; + + const winrt::Microsoft::ReactNative::ViewProps ViewProps; +}; + +REACT_STRUCT(VirtualViewExperimental_OnModeChange) +struct VirtualViewExperimental_OnModeChange { + REACT_FIELD(mode) + int32_t mode{}; + + REACT_FIELD(targetRect) + VirtualViewExperimentalSpec_onModeChange2 targetRect; + + REACT_FIELD(thresholdRect) + VirtualViewExperimentalSpec_onModeChange3 thresholdRect; +}; + +struct VirtualViewExperimentalEventEmitter { + VirtualViewExperimentalEventEmitter(const winrt::Microsoft::ReactNative::EventEmitter &eventEmitter) + : m_eventEmitter(eventEmitter) {} + + using OnModeChange = VirtualViewExperimental_OnModeChange; + using OnModeChange2 = VirtualViewExperimental_OnModeChange2; + using OnModeChange3 = VirtualViewExperimental_OnModeChange3; + + void onModeChange(OnModeChange &value) const { + m_eventEmitter.DispatchEvent(L"modeChange", [value](const winrt::Microsoft::ReactNative::IJSValueWriter writer) { + winrt::Microsoft::ReactNative::WriteValue(writer, value); + }); + } + + private: + winrt::Microsoft::ReactNative::EventEmitter m_eventEmitter{nullptr}; +}; + +template +struct BaseVirtualViewExperimental { + + virtual void UpdateProps( + const winrt::Microsoft::ReactNative::ComponentView &/*view*/, + const winrt::com_ptr &newProps, + const winrt::com_ptr &/*oldProps*/) noexcept { + m_props = newProps; + } + + // UpdateLayoutMetrics will only be called if this method is overridden + virtual void UpdateLayoutMetrics( + const winrt::Microsoft::ReactNative::ComponentView &/*view*/, + const winrt::Microsoft::ReactNative::LayoutMetrics &/*newLayoutMetrics*/, + const winrt::Microsoft::ReactNative::LayoutMetrics &/*oldLayoutMetrics*/) noexcept { + } + + // UpdateState will only be called if this method is overridden + virtual void UpdateState( + const winrt::Microsoft::ReactNative::ComponentView &/*view*/, + const winrt::Microsoft::ReactNative::IComponentState &/*newState*/) noexcept { + } + + virtual void UpdateEventEmitter(const std::shared_ptr &eventEmitter) noexcept { + m_eventEmitter = eventEmitter; + } + + // MountChildComponentView will only be called if this method is overridden + virtual void MountChildComponentView(const winrt::Microsoft::ReactNative::ComponentView &/*view*/, + const winrt::Microsoft::ReactNative::MountChildComponentViewArgs &/*args*/) noexcept { + } + + // UnmountChildComponentView will only be called if this method is overridden + virtual void UnmountChildComponentView(const winrt::Microsoft::ReactNative::ComponentView &/*view*/, + const winrt::Microsoft::ReactNative::UnmountChildComponentViewArgs &/*args*/) noexcept { + } + + // Initialize will only be called if this method is overridden + virtual void Initialize(const winrt::Microsoft::ReactNative::ComponentView &/*view*/) noexcept { + } + + // CreateVisual will only be called if this method is overridden + virtual winrt::Microsoft::UI::Composition::Visual CreateVisual(const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { + return view.as().Compositor().CreateSpriteVisual(); + } + + // FinalizeUpdate will only be called if this method is overridden + virtual void FinalizeUpdate(const winrt::Microsoft::ReactNative::ComponentView &/*view*/, + winrt::Microsoft::ReactNative::ComponentViewUpdateMask /*mask*/) noexcept { + } + + + + const std::shared_ptr& EventEmitter() const { return m_eventEmitter; } + const winrt::com_ptr& Props() const { return m_props; } + +private: + winrt::com_ptr m_props; + std::shared_ptr m_eventEmitter; +}; + +template +void RegisterVirtualViewExperimentalNativeComponent( + winrt::Microsoft::ReactNative::IReactPackageBuilder const &packageBuilder, + std::function builderCallback) noexcept { + packageBuilder.as().AddViewComponent( + L"VirtualViewExperimental", [builderCallback](winrt::Microsoft::ReactNative::IReactViewComponentBuilder const &builder) noexcept { + auto compBuilder = builder.as(); + + builder.SetCreateProps([](winrt::Microsoft::ReactNative::ViewProps props, + const winrt::Microsoft::ReactNative::IComponentProps& cloneFrom) noexcept { + return winrt::make(props, cloneFrom); + }); + + builder.SetUpdatePropsHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, + const winrt::Microsoft::ReactNative::IComponentProps &newProps, + const winrt::Microsoft::ReactNative::IComponentProps &oldProps) noexcept { + auto userData = view.UserData().as(); + userData->UpdateProps(view, newProps ? newProps.as() : nullptr, oldProps ? oldProps.as() : nullptr); + }); + + compBuilder.SetUpdateLayoutMetricsHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, + const winrt::Microsoft::ReactNative::LayoutMetrics &newLayoutMetrics, + const winrt::Microsoft::ReactNative::LayoutMetrics &oldLayoutMetrics) noexcept { + auto userData = view.UserData().as(); + userData->UpdateLayoutMetrics(view, newLayoutMetrics, oldLayoutMetrics); + }); + + builder.SetUpdateEventEmitterHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, + const winrt::Microsoft::ReactNative::EventEmitter &eventEmitter) noexcept { + auto userData = view.UserData().as(); + userData->UpdateEventEmitter(std::make_shared(eventEmitter)); + }); + + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::FinalizeUpdate != &BaseVirtualViewExperimental::FinalizeUpdate) { + builder.SetFinalizeUpdateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, + winrt::Microsoft::ReactNative::ComponentViewUpdateMask mask) noexcept { + auto userData = view.UserData().as(); + userData->FinalizeUpdate(view, mask); + }); + } + + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UpdateState != &BaseVirtualViewExperimental::UpdateState) { + builder.SetUpdateStateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, + const winrt::Microsoft::ReactNative::IComponentState &newState) noexcept { + auto userData = view.UserData().as(); + userData->UpdateState(view, newState); + }); + } + + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::MountChildComponentView != &BaseVirtualViewExperimental::MountChildComponentView) { + builder.SetMountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, + const winrt::Microsoft::ReactNative::MountChildComponentViewArgs &args) noexcept { + auto userData = view.UserData().as(); + return userData->MountChildComponentView(view, args); + }); + } + + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UnmountChildComponentView != &BaseVirtualViewExperimental::UnmountChildComponentView) { + builder.SetUnmountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, + const winrt::Microsoft::ReactNative::UnmountChildComponentViewArgs &args) noexcept { + auto userData = view.UserData().as(); + return userData->UnmountChildComponentView(view, args); + }); + } + + compBuilder.SetViewComponentViewInitializer([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { + auto userData = winrt::make_self(); + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::Initialize != &BaseVirtualViewExperimental::Initialize) { + userData->Initialize(view); + } + view.UserData(*userData); + }); + + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::CreateVisual != &BaseVirtualViewExperimental::CreateVisual) { + compBuilder.SetCreateVisualHandler([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { + auto userData = view.UserData().as(); + return userData->CreateVisual(view); + }); + } + + // Allow app to further customize the builder + if (builderCallback) { + builderCallback(compBuilder); + } + }); +} + +} // namespace Microsoft::ReactNativeSpecs + +#endif // #ifdef RNW_NEW_ARCH diff --git a/vnext/codegen/rnwcoreJSI-generated.cpp b/vnext/codegen/rnwcoreJSI-generated.cpp index cddc9cff31f..4837960604d 100644 --- a/vnext/codegen/rnwcoreJSI-generated.cpp +++ b/vnext/codegen/rnwcoreJSI-generated.cpp @@ -21,8 +21,8 @@ static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_commonT rt ); } -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_animatedShouldSignalBatch(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->animatedShouldSignalBatch( +static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_cdpInteractionMetricsEnabled(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + return static_cast(&turboModule)->cdpInteractionMetricsEnabled( rt ); } @@ -36,8 +36,8 @@ static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_cxxNati rt ); } -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_disableMainQueueSyncDispatchIOS(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->disableMainQueueSyncDispatchIOS( +static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_disableFabricCommitInCXXAnimated(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + return static_cast(&turboModule)->disableFabricCommitInCXXAnimated( rt ); } @@ -46,6 +46,11 @@ static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_disable rt ); } +static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_disableOldAndroidAttachmentMetricsWorkarounds(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + return static_cast(&turboModule)->disableOldAndroidAttachmentMetricsWorkarounds( + rt + ); +} static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_disableTextLayoutManagerCacheAndroid(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { return static_cast(&turboModule)->disableTextLayoutManagerCacheAndroid( rt @@ -91,6 +96,11 @@ static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableD rt ); } +static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableEagerMainQueueModulesOnIOS(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + return static_cast(&turboModule)->enableEagerMainQueueModulesOnIOS( + rt + ); +} static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableEagerRootViewAttachment(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { return static_cast(&turboModule)->enableEagerRootViewAttachment( rt @@ -126,6 +136,16 @@ static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableI rt ); } +static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableImagePrefetchingAndroid(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + return static_cast(&turboModule)->enableImagePrefetchingAndroid( + rt + ); +} +static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableImmediateUpdateModeForContentOffsetChanges(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + return static_cast(&turboModule)->enableImmediateUpdateModeForContentOffsetChanges( + rt + ); +} static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableInteropViewManagerClassLookUpOptimizationIOS(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { return static_cast(&turboModule)->enableInteropViewManagerClassLookUpOptimizationIOS( rt @@ -146,11 +166,6 @@ static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableM rt ); } -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableMainQueueModulesOnIOS(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->enableMainQueueModulesOnIOS( - rt - ); -} static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableModuleArgumentNSNullConversionIOS(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { return static_cast(&turboModule)->enableModuleArgumentNSNullConversionIOS( rt @@ -186,11 +201,6 @@ static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableR rt ); } -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableSynchronousStateUpdates(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->enableSynchronousStateUpdates( - rt - ); -} static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableViewCulling(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { return static_cast(&turboModule)->enableViewCulling( rt @@ -246,11 +256,41 @@ static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_hideOff rt ); } +static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_perfMonitorV2Enabled(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + return static_cast(&turboModule)->perfMonitorV2Enabled( + rt + ); +} static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_preparedTextCacheSize(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { return static_cast(&turboModule)->preparedTextCacheSize( rt ); } +static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_preventShadowTreeCommitExhaustion(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + return static_cast(&turboModule)->preventShadowTreeCommitExhaustion( + rt + ); +} +static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_releaseImageDataWhenConsumed(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + return static_cast(&turboModule)->releaseImageDataWhenConsumed( + rt + ); +} +static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_shouldPressibilityUseW3CPointerEventsForHover(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + return static_cast(&turboModule)->shouldPressibilityUseW3CPointerEventsForHover( + rt + ); +} +static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_skipActivityIdentityAssertionOnHostPause(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + return static_cast(&turboModule)->skipActivityIdentityAssertionOnHostPause( + rt + ); +} +static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_sweepActiveTouchOnChildNativeGesturesAndroid(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + return static_cast(&turboModule)->sweepActiveTouchOnChildNativeGesturesAndroid( + rt + ); +} static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_traceTurboModulePromiseRejectionsOnAndroid(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { return static_cast(&turboModule)->traceTurboModulePromiseRejectionsOnAndroid( rt @@ -271,6 +311,16 @@ static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useFabr rt ); } +static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useNativeEqualsInNativeReadableArrayAndroid(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + return static_cast(&turboModule)->useNativeEqualsInNativeReadableArrayAndroid( + rt + ); +} +static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useNativeTransformHelperAndroid(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + return static_cast(&turboModule)->useNativeTransformHelperAndroid( + rt + ); +} static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useNativeViewConfigsInBridgelessMode(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { return static_cast(&turboModule)->useNativeViewConfigsInBridgelessMode( rt @@ -311,11 +361,12 @@ NativeReactNativeFeatureFlagsCxxSpecJSI::NativeReactNativeFeatureFlagsCxxSpecJSI : TurboModule("NativeReactNativeFeatureFlagsCxx", jsInvoker) { methodMap_["commonTestFlag"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_commonTestFlag}; methodMap_["commonTestFlagWithoutNativeImplementation"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_commonTestFlagWithoutNativeImplementation}; - methodMap_["animatedShouldSignalBatch"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_animatedShouldSignalBatch}; + methodMap_["cdpInteractionMetricsEnabled"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_cdpInteractionMetricsEnabled}; methodMap_["cxxNativeAnimatedEnabled"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_cxxNativeAnimatedEnabled}; methodMap_["cxxNativeAnimatedRemoveJsSync"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_cxxNativeAnimatedRemoveJsSync}; - methodMap_["disableMainQueueSyncDispatchIOS"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_disableMainQueueSyncDispatchIOS}; + methodMap_["disableFabricCommitInCXXAnimated"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_disableFabricCommitInCXXAnimated}; methodMap_["disableMountItemReorderingAndroid"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_disableMountItemReorderingAndroid}; + methodMap_["disableOldAndroidAttachmentMetricsWorkarounds"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_disableOldAndroidAttachmentMetricsWorkarounds}; methodMap_["disableTextLayoutManagerCacheAndroid"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_disableTextLayoutManagerCacheAndroid}; methodMap_["enableAccessibilityOrder"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableAccessibilityOrder}; methodMap_["enableAccumulatedUpdatesInRawPropsAndroid"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableAccumulatedUpdatesInRawPropsAndroid}; @@ -325,6 +376,7 @@ NativeReactNativeFeatureFlagsCxxSpecJSI::NativeReactNativeFeatureFlagsCxxSpecJSI methodMap_["enableCustomFocusSearchOnClippedElementsAndroid"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableCustomFocusSearchOnClippedElementsAndroid}; methodMap_["enableDestroyShadowTreeRevisionAsync"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableDestroyShadowTreeRevisionAsync}; methodMap_["enableDoubleMeasurementFixAndroid"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableDoubleMeasurementFixAndroid}; + methodMap_["enableEagerMainQueueModulesOnIOS"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableEagerMainQueueModulesOnIOS}; methodMap_["enableEagerRootViewAttachment"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableEagerRootViewAttachment}; methodMap_["enableFabricLogs"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableFabricLogs}; methodMap_["enableFabricRenderer"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableFabricRenderer}; @@ -332,11 +384,12 @@ NativeReactNativeFeatureFlagsCxxSpecJSI::NativeReactNativeFeatureFlagsCxxSpecJSI methodMap_["enableFontScaleChangesUpdatingLayout"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableFontScaleChangesUpdatingLayout}; methodMap_["enableIOSTextBaselineOffsetPerLine"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableIOSTextBaselineOffsetPerLine}; methodMap_["enableIOSViewClipToPaddingBox"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableIOSViewClipToPaddingBox}; + methodMap_["enableImagePrefetchingAndroid"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableImagePrefetchingAndroid}; + methodMap_["enableImmediateUpdateModeForContentOffsetChanges"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableImmediateUpdateModeForContentOffsetChanges}; methodMap_["enableInteropViewManagerClassLookUpOptimizationIOS"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableInteropViewManagerClassLookUpOptimizationIOS}; methodMap_["enableLayoutAnimationsOnAndroid"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableLayoutAnimationsOnAndroid}; methodMap_["enableLayoutAnimationsOnIOS"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableLayoutAnimationsOnIOS}; methodMap_["enableMainQueueCoordinatorOnIOS"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableMainQueueCoordinatorOnIOS}; - methodMap_["enableMainQueueModulesOnIOS"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableMainQueueModulesOnIOS}; methodMap_["enableModuleArgumentNSNullConversionIOS"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableModuleArgumentNSNullConversionIOS}; methodMap_["enableNativeCSSParsing"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableNativeCSSParsing}; methodMap_["enableNetworkEventReporting"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableNetworkEventReporting}; @@ -344,7 +397,6 @@ NativeReactNativeFeatureFlagsCxxSpecJSI::NativeReactNativeFeatureFlagsCxxSpecJSI methodMap_["enablePreparedTextLayout"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enablePreparedTextLayout}; methodMap_["enablePropsUpdateReconciliationAndroid"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enablePropsUpdateReconciliationAndroid}; methodMap_["enableResourceTimingAPI"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableResourceTimingAPI}; - methodMap_["enableSynchronousStateUpdates"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableSynchronousStateUpdates}; methodMap_["enableViewCulling"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableViewCulling}; methodMap_["enableViewRecycling"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableViewRecycling}; methodMap_["enableViewRecyclingForText"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableViewRecyclingForText}; @@ -356,11 +408,19 @@ NativeReactNativeFeatureFlagsCxxSpecJSI::NativeReactNativeFeatureFlagsCxxSpecJSI methodMap_["fuseboxEnabledRelease"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_fuseboxEnabledRelease}; methodMap_["fuseboxNetworkInspectionEnabled"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_fuseboxNetworkInspectionEnabled}; methodMap_["hideOffscreenVirtualViewsOnIOS"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_hideOffscreenVirtualViewsOnIOS}; + methodMap_["perfMonitorV2Enabled"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_perfMonitorV2Enabled}; methodMap_["preparedTextCacheSize"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_preparedTextCacheSize}; + methodMap_["preventShadowTreeCommitExhaustion"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_preventShadowTreeCommitExhaustion}; + methodMap_["releaseImageDataWhenConsumed"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_releaseImageDataWhenConsumed}; + methodMap_["shouldPressibilityUseW3CPointerEventsForHover"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_shouldPressibilityUseW3CPointerEventsForHover}; + methodMap_["skipActivityIdentityAssertionOnHostPause"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_skipActivityIdentityAssertionOnHostPause}; + methodMap_["sweepActiveTouchOnChildNativeGesturesAndroid"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_sweepActiveTouchOnChildNativeGesturesAndroid}; methodMap_["traceTurboModulePromiseRejectionsOnAndroid"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_traceTurboModulePromiseRejectionsOnAndroid}; methodMap_["updateRuntimeShadowNodeReferencesOnCommit"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_updateRuntimeShadowNodeReferencesOnCommit}; methodMap_["useAlwaysAvailableJSErrorHandling"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useAlwaysAvailableJSErrorHandling}; methodMap_["useFabricInterop"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useFabricInterop}; + methodMap_["useNativeEqualsInNativeReadableArrayAndroid"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useNativeEqualsInNativeReadableArrayAndroid}; + methodMap_["useNativeTransformHelperAndroid"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useNativeTransformHelperAndroid}; methodMap_["useNativeViewConfigsInBridgelessMode"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useNativeViewConfigsInBridgelessMode}; methodMap_["useOptimizedEventBatchingOnAndroid"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useOptimizedEventBatchingOnAndroid}; methodMap_["useRawPropsJsiValue"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useRawPropsJsiValue}; @@ -2976,21 +3036,6 @@ NativeIdleCallbacksCxxSpecJSI::NativeIdleCallbacksCxxSpecJSI(std::shared_ptr(&turboModule)->observe( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeIntersectionObserverCxxSpecJSI_unobserve(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->unobserve( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : jsi::Value(rt, args[1]) - ); - return jsi::Value::undefined(); -} static jsi::Value __hostFunction_NativeIntersectionObserverCxxSpecJSI_observeV2(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { return static_cast(&turboModule)->observeV2( rt, @@ -3026,8 +3071,6 @@ static jsi::Value __hostFunction_NativeIntersectionObserverCxxSpecJSI_takeRecord NativeIntersectionObserverCxxSpecJSI::NativeIntersectionObserverCxxSpecJSI(std::shared_ptr jsInvoker) : TurboModule("NativeIntersectionObserverCxx", jsInvoker) { - methodMap_["observe"] = MethodMetadata {1, __hostFunction_NativeIntersectionObserverCxxSpecJSI_observe}; - methodMap_["unobserve"] = MethodMetadata {2, __hostFunction_NativeIntersectionObserverCxxSpecJSI_unobserve}; methodMap_["observeV2"] = MethodMetadata {1, __hostFunction_NativeIntersectionObserverCxxSpecJSI_observeV2}; methodMap_["unobserveV2"] = MethodMetadata {2, __hostFunction_NativeIntersectionObserverCxxSpecJSI_unobserveV2}; methodMap_["connect"] = MethodMetadata {1, __hostFunction_NativeIntersectionObserverCxxSpecJSI_connect}; @@ -3093,34 +3136,31 @@ static jsi::Value __hostFunction_NativePerformanceCxxSpecJSI_now(jsi::Runtime &r rt ); } -static jsi::Value __hostFunction_NativePerformanceCxxSpecJSI_markWithResult(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->markWithResult( +static jsi::Value __hostFunction_NativePerformanceCxxSpecJSI_reportMark(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + static_cast(&turboModule)->reportMark( rt, count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt), - count <= 1 || args[1].isUndefined() ? std::nullopt : std::make_optional(args[1].asNumber()) + count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asNumber(), + count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : jsi::Value(rt, args[2]) ); + return jsi::Value::undefined(); } -static jsi::Value __hostFunction_NativePerformanceCxxSpecJSI_measure(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->measure( +static jsi::Value __hostFunction_NativePerformanceCxxSpecJSI_reportMeasure(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + static_cast(&turboModule)->reportMeasure( rt, count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt), - count <= 1 || args[1].isUndefined() ? std::nullopt : std::make_optional(args[1].asNumber()), - count <= 2 || args[2].isUndefined() ? std::nullopt : std::make_optional(args[2].asNumber()), - count <= 3 || args[3].isUndefined() ? std::nullopt : std::make_optional(args[3].asNumber()), - count <= 4 || args[4].isUndefined() ? std::nullopt : std::make_optional(args[4].asString(rt)), - count <= 5 || args[5].isUndefined() ? std::nullopt : std::make_optional(args[5].asString(rt)) + count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asNumber(), + count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asNumber(), + count <= 3 ? throw jsi::JSError(rt, "Expected argument in position 3 to be passed") : jsi::Value(rt, args[3]) ); + return jsi::Value::undefined(); } -static jsi::Value __hostFunction_NativePerformanceCxxSpecJSI_measureWithResult(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->measureWithResult( +static jsi::Value __hostFunction_NativePerformanceCxxSpecJSI_getMarkTime(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + auto result = static_cast(&turboModule)->getMarkTime( rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asNumber(), - count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asNumber(), - count <= 3 || args[3].isUndefined() ? std::nullopt : std::make_optional(args[3].asNumber()), - count <= 4 || args[4].isUndefined() ? std::nullopt : std::make_optional(args[4].asString(rt)), - count <= 5 || args[5].isUndefined() ? std::nullopt : std::make_optional(args[5].asString(rt)) + count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt) ); + return result ? jsi::Value(std::move(*result)) : jsi::Value::null(); } static jsi::Value __hostFunction_NativePerformanceCxxSpecJSI_clearMarks(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { static_cast(&turboModule)->clearMarks( @@ -3208,13 +3248,6 @@ static jsi::Value __hostFunction_NativePerformanceCxxSpecJSI_getSupportedPerform rt ); } -static jsi::Value __hostFunction_NativePerformanceCxxSpecJSI_setCurrentTimeStampForTesting(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->setCurrentTimeStampForTesting( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber() - ); - return jsi::Value::undefined(); -} static jsi::Value __hostFunction_NativePerformanceCxxSpecJSI_clearEventCountsForTesting(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { static_cast(&turboModule)->clearEventCountsForTesting( rt @@ -3225,9 +3258,9 @@ static jsi::Value __hostFunction_NativePerformanceCxxSpecJSI_clearEventCountsFor NativePerformanceCxxSpecJSI::NativePerformanceCxxSpecJSI(std::shared_ptr jsInvoker) : TurboModule("NativePerformanceCxx", jsInvoker) { methodMap_["now"] = MethodMetadata {0, __hostFunction_NativePerformanceCxxSpecJSI_now}; - methodMap_["markWithResult"] = MethodMetadata {2, __hostFunction_NativePerformanceCxxSpecJSI_markWithResult}; - methodMap_["measure"] = MethodMetadata {6, __hostFunction_NativePerformanceCxxSpecJSI_measure}; - methodMap_["measureWithResult"] = MethodMetadata {6, __hostFunction_NativePerformanceCxxSpecJSI_measureWithResult}; + methodMap_["reportMark"] = MethodMetadata {3, __hostFunction_NativePerformanceCxxSpecJSI_reportMark}; + methodMap_["reportMeasure"] = MethodMetadata {4, __hostFunction_NativePerformanceCxxSpecJSI_reportMeasure}; + methodMap_["getMarkTime"] = MethodMetadata {1, __hostFunction_NativePerformanceCxxSpecJSI_getMarkTime}; methodMap_["clearMarks"] = MethodMetadata {1, __hostFunction_NativePerformanceCxxSpecJSI_clearMarks}; methodMap_["clearMeasures"] = MethodMetadata {1, __hostFunction_NativePerformanceCxxSpecJSI_clearMeasures}; methodMap_["getEntries"] = MethodMetadata {0, __hostFunction_NativePerformanceCxxSpecJSI_getEntries}; @@ -3242,7 +3275,6 @@ NativePerformanceCxxSpecJSI::NativePerformanceCxxSpecJSI(std::shared_ptr( rt, &T::commonTestFlagWithoutNativeImplementation, jsInvoker_, instance_); } - bool animatedShouldSignalBatch(jsi::Runtime &rt) override { + bool cdpInteractionMetricsEnabled(jsi::Runtime &rt) override { static_assert( - bridging::getParameterCount(&T::animatedShouldSignalBatch) == 1, - "Expected animatedShouldSignalBatch(...) to have 1 parameters"); + bridging::getParameterCount(&T::cdpInteractionMetricsEnabled) == 1, + "Expected cdpInteractionMetricsEnabled(...) to have 1 parameters"); return bridging::callFromJs( - rt, &T::animatedShouldSignalBatch, jsInvoker_, instance_); + rt, &T::cdpInteractionMetricsEnabled, jsInvoker_, instance_); } bool cxxNativeAnimatedEnabled(jsi::Runtime &rt) override { static_assert( @@ -149,13 +159,13 @@ class JSI_EXPORT NativeReactNativeFeatureFlagsCxxSpec : public TurboModule { return bridging::callFromJs( rt, &T::cxxNativeAnimatedRemoveJsSync, jsInvoker_, instance_); } - bool disableMainQueueSyncDispatchIOS(jsi::Runtime &rt) override { + bool disableFabricCommitInCXXAnimated(jsi::Runtime &rt) override { static_assert( - bridging::getParameterCount(&T::disableMainQueueSyncDispatchIOS) == 1, - "Expected disableMainQueueSyncDispatchIOS(...) to have 1 parameters"); + bridging::getParameterCount(&T::disableFabricCommitInCXXAnimated) == 1, + "Expected disableFabricCommitInCXXAnimated(...) to have 1 parameters"); return bridging::callFromJs( - rt, &T::disableMainQueueSyncDispatchIOS, jsInvoker_, instance_); + rt, &T::disableFabricCommitInCXXAnimated, jsInvoker_, instance_); } bool disableMountItemReorderingAndroid(jsi::Runtime &rt) override { static_assert( @@ -165,6 +175,14 @@ class JSI_EXPORT NativeReactNativeFeatureFlagsCxxSpec : public TurboModule { return bridging::callFromJs( rt, &T::disableMountItemReorderingAndroid, jsInvoker_, instance_); } + bool disableOldAndroidAttachmentMetricsWorkarounds(jsi::Runtime &rt) override { + static_assert( + bridging::getParameterCount(&T::disableOldAndroidAttachmentMetricsWorkarounds) == 1, + "Expected disableOldAndroidAttachmentMetricsWorkarounds(...) to have 1 parameters"); + + return bridging::callFromJs( + rt, &T::disableOldAndroidAttachmentMetricsWorkarounds, jsInvoker_, instance_); + } bool disableTextLayoutManagerCacheAndroid(jsi::Runtime &rt) override { static_assert( bridging::getParameterCount(&T::disableTextLayoutManagerCacheAndroid) == 1, @@ -237,6 +255,14 @@ class JSI_EXPORT NativeReactNativeFeatureFlagsCxxSpec : public TurboModule { return bridging::callFromJs( rt, &T::enableDoubleMeasurementFixAndroid, jsInvoker_, instance_); } + bool enableEagerMainQueueModulesOnIOS(jsi::Runtime &rt) override { + static_assert( + bridging::getParameterCount(&T::enableEagerMainQueueModulesOnIOS) == 1, + "Expected enableEagerMainQueueModulesOnIOS(...) to have 1 parameters"); + + return bridging::callFromJs( + rt, &T::enableEagerMainQueueModulesOnIOS, jsInvoker_, instance_); + } bool enableEagerRootViewAttachment(jsi::Runtime &rt) override { static_assert( bridging::getParameterCount(&T::enableEagerRootViewAttachment) == 1, @@ -293,6 +319,22 @@ class JSI_EXPORT NativeReactNativeFeatureFlagsCxxSpec : public TurboModule { return bridging::callFromJs( rt, &T::enableIOSViewClipToPaddingBox, jsInvoker_, instance_); } + bool enableImagePrefetchingAndroid(jsi::Runtime &rt) override { + static_assert( + bridging::getParameterCount(&T::enableImagePrefetchingAndroid) == 1, + "Expected enableImagePrefetchingAndroid(...) to have 1 parameters"); + + return bridging::callFromJs( + rt, &T::enableImagePrefetchingAndroid, jsInvoker_, instance_); + } + bool enableImmediateUpdateModeForContentOffsetChanges(jsi::Runtime &rt) override { + static_assert( + bridging::getParameterCount(&T::enableImmediateUpdateModeForContentOffsetChanges) == 1, + "Expected enableImmediateUpdateModeForContentOffsetChanges(...) to have 1 parameters"); + + return bridging::callFromJs( + rt, &T::enableImmediateUpdateModeForContentOffsetChanges, jsInvoker_, instance_); + } bool enableInteropViewManagerClassLookUpOptimizationIOS(jsi::Runtime &rt) override { static_assert( bridging::getParameterCount(&T::enableInteropViewManagerClassLookUpOptimizationIOS) == 1, @@ -325,14 +367,6 @@ class JSI_EXPORT NativeReactNativeFeatureFlagsCxxSpec : public TurboModule { return bridging::callFromJs( rt, &T::enableMainQueueCoordinatorOnIOS, jsInvoker_, instance_); } - bool enableMainQueueModulesOnIOS(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::enableMainQueueModulesOnIOS) == 1, - "Expected enableMainQueueModulesOnIOS(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::enableMainQueueModulesOnIOS, jsInvoker_, instance_); - } bool enableModuleArgumentNSNullConversionIOS(jsi::Runtime &rt) override { static_assert( bridging::getParameterCount(&T::enableModuleArgumentNSNullConversionIOS) == 1, @@ -389,14 +423,6 @@ class JSI_EXPORT NativeReactNativeFeatureFlagsCxxSpec : public TurboModule { return bridging::callFromJs( rt, &T::enableResourceTimingAPI, jsInvoker_, instance_); } - bool enableSynchronousStateUpdates(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::enableSynchronousStateUpdates) == 1, - "Expected enableSynchronousStateUpdates(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::enableSynchronousStateUpdates, jsInvoker_, instance_); - } bool enableViewCulling(jsi::Runtime &rt) override { static_assert( bridging::getParameterCount(&T::enableViewCulling) == 1, @@ -485,6 +511,14 @@ class JSI_EXPORT NativeReactNativeFeatureFlagsCxxSpec : public TurboModule { return bridging::callFromJs( rt, &T::hideOffscreenVirtualViewsOnIOS, jsInvoker_, instance_); } + bool perfMonitorV2Enabled(jsi::Runtime &rt) override { + static_assert( + bridging::getParameterCount(&T::perfMonitorV2Enabled) == 1, + "Expected perfMonitorV2Enabled(...) to have 1 parameters"); + + return bridging::callFromJs( + rt, &T::perfMonitorV2Enabled, jsInvoker_, instance_); + } double preparedTextCacheSize(jsi::Runtime &rt) override { static_assert( bridging::getParameterCount(&T::preparedTextCacheSize) == 1, @@ -493,6 +527,46 @@ class JSI_EXPORT NativeReactNativeFeatureFlagsCxxSpec : public TurboModule { return bridging::callFromJs( rt, &T::preparedTextCacheSize, jsInvoker_, instance_); } + bool preventShadowTreeCommitExhaustion(jsi::Runtime &rt) override { + static_assert( + bridging::getParameterCount(&T::preventShadowTreeCommitExhaustion) == 1, + "Expected preventShadowTreeCommitExhaustion(...) to have 1 parameters"); + + return bridging::callFromJs( + rt, &T::preventShadowTreeCommitExhaustion, jsInvoker_, instance_); + } + bool releaseImageDataWhenConsumed(jsi::Runtime &rt) override { + static_assert( + bridging::getParameterCount(&T::releaseImageDataWhenConsumed) == 1, + "Expected releaseImageDataWhenConsumed(...) to have 1 parameters"); + + return bridging::callFromJs( + rt, &T::releaseImageDataWhenConsumed, jsInvoker_, instance_); + } + bool shouldPressibilityUseW3CPointerEventsForHover(jsi::Runtime &rt) override { + static_assert( + bridging::getParameterCount(&T::shouldPressibilityUseW3CPointerEventsForHover) == 1, + "Expected shouldPressibilityUseW3CPointerEventsForHover(...) to have 1 parameters"); + + return bridging::callFromJs( + rt, &T::shouldPressibilityUseW3CPointerEventsForHover, jsInvoker_, instance_); + } + bool skipActivityIdentityAssertionOnHostPause(jsi::Runtime &rt) override { + static_assert( + bridging::getParameterCount(&T::skipActivityIdentityAssertionOnHostPause) == 1, + "Expected skipActivityIdentityAssertionOnHostPause(...) to have 1 parameters"); + + return bridging::callFromJs( + rt, &T::skipActivityIdentityAssertionOnHostPause, jsInvoker_, instance_); + } + bool sweepActiveTouchOnChildNativeGesturesAndroid(jsi::Runtime &rt) override { + static_assert( + bridging::getParameterCount(&T::sweepActiveTouchOnChildNativeGesturesAndroid) == 1, + "Expected sweepActiveTouchOnChildNativeGesturesAndroid(...) to have 1 parameters"); + + return bridging::callFromJs( + rt, &T::sweepActiveTouchOnChildNativeGesturesAndroid, jsInvoker_, instance_); + } bool traceTurboModulePromiseRejectionsOnAndroid(jsi::Runtime &rt) override { static_assert( bridging::getParameterCount(&T::traceTurboModulePromiseRejectionsOnAndroid) == 1, @@ -525,6 +599,22 @@ class JSI_EXPORT NativeReactNativeFeatureFlagsCxxSpec : public TurboModule { return bridging::callFromJs( rt, &T::useFabricInterop, jsInvoker_, instance_); } + bool useNativeEqualsInNativeReadableArrayAndroid(jsi::Runtime &rt) override { + static_assert( + bridging::getParameterCount(&T::useNativeEqualsInNativeReadableArrayAndroid) == 1, + "Expected useNativeEqualsInNativeReadableArrayAndroid(...) to have 1 parameters"); + + return bridging::callFromJs( + rt, &T::useNativeEqualsInNativeReadableArrayAndroid, jsInvoker_, instance_); + } + bool useNativeTransformHelperAndroid(jsi::Runtime &rt) override { + static_assert( + bridging::getParameterCount(&T::useNativeTransformHelperAndroid) == 1, + "Expected useNativeTransformHelperAndroid(...) to have 1 parameters"); + + return bridging::callFromJs( + rt, &T::useNativeTransformHelperAndroid, jsInvoker_, instance_); + } bool useNativeViewConfigsInBridgelessMode(jsi::Runtime &rt) override { static_assert( bridging::getParameterCount(&T::useNativeViewConfigsInBridgelessMode) == 1, @@ -8358,8 +8448,6 @@ class JSI_EXPORT NativeIntersectionObserverCxxSpecJSI : public TurboModule { NativeIntersectionObserverCxxSpecJSI(std::shared_ptr jsInvoker); public: - virtual void observe(jsi::Runtime &rt, jsi::Object options) = 0; - virtual void unobserve(jsi::Runtime &rt, double intersectionObserverId, jsi::Value targetShadowNode) = 0; virtual jsi::Value observeV2(jsi::Runtime &rt, jsi::Object options) = 0; virtual void unobserveV2(jsi::Runtime &rt, double intersectionObserverId, jsi::Value token) = 0; virtual void connect(jsi::Runtime &rt, jsi::Function notifyIntersectionObserversCallback) = 0; @@ -8395,22 +8483,6 @@ class JSI_EXPORT NativeIntersectionObserverCxxSpec : public TurboModule { } - void observe(jsi::Runtime &rt, jsi::Object options) override { - static_assert( - bridging::getParameterCount(&T::observe) == 2, - "Expected observe(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::observe, jsInvoker_, instance_, std::move(options)); - } - void unobserve(jsi::Runtime &rt, double intersectionObserverId, jsi::Value targetShadowNode) override { - static_assert( - bridging::getParameterCount(&T::unobserve) == 3, - "Expected unobserve(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::unobserve, jsInvoker_, instance_, std::move(intersectionObserverId), std::move(targetShadowNode)); - } jsi::Value observeV2(jsi::Runtime &rt, jsi::Object options) override { static_assert( bridging::getParameterCount(&T::observeV2) == 2, @@ -8950,9 +9022,9 @@ class JSI_EXPORT NativePerformanceCxxSpecJSI : public TurboModule { public: virtual double now(jsi::Runtime &rt) = 0; - virtual double markWithResult(jsi::Runtime &rt, jsi::String name, std::optional startTime) = 0; - virtual jsi::Array measure(jsi::Runtime &rt, jsi::String name, std::optional startTime, std::optional endTime, std::optional duration, std::optional startMark, std::optional endMark) = 0; - virtual jsi::Array measureWithResult(jsi::Runtime &rt, jsi::String name, double startTime, double endTime, std::optional duration, std::optional startMark, std::optional endMark) = 0; + virtual void reportMark(jsi::Runtime &rt, jsi::String name, double startTime, jsi::Value entry) = 0; + virtual void reportMeasure(jsi::Runtime &rt, jsi::String name, double startTime, double duration, jsi::Value entry) = 0; + virtual std::optional getMarkTime(jsi::Runtime &rt, jsi::String name) = 0; virtual void clearMarks(jsi::Runtime &rt, std::optional entryName) = 0; virtual void clearMeasures(jsi::Runtime &rt, std::optional entryName) = 0; virtual jsi::Array getEntries(jsi::Runtime &rt) = 0; @@ -8967,7 +9039,6 @@ class JSI_EXPORT NativePerformanceCxxSpecJSI : public TurboModule { virtual void disconnect(jsi::Runtime &rt, jsi::Value observer) = 0; virtual jsi::Array takeRecords(jsi::Runtime &rt, jsi::Value observer, bool sort) = 0; virtual jsi::Array getSupportedPerformanceEntryTypes(jsi::Runtime &rt) = 0; - virtual void setCurrentTimeStampForTesting(jsi::Runtime &rt, double timeStamp) = 0; virtual void clearEventCountsForTesting(jsi::Runtime &rt) = 0; }; @@ -9007,29 +9078,29 @@ class JSI_EXPORT NativePerformanceCxxSpec : public TurboModule { return bridging::callFromJs( rt, &T::now, jsInvoker_, instance_); } - double markWithResult(jsi::Runtime &rt, jsi::String name, std::optional startTime) override { + void reportMark(jsi::Runtime &rt, jsi::String name, double startTime, jsi::Value entry) override { static_assert( - bridging::getParameterCount(&T::markWithResult) == 3, - "Expected markWithResult(...) to have 3 parameters"); + bridging::getParameterCount(&T::reportMark) == 4, + "Expected reportMark(...) to have 4 parameters"); - return bridging::callFromJs( - rt, &T::markWithResult, jsInvoker_, instance_, std::move(name), std::move(startTime)); + return bridging::callFromJs( + rt, &T::reportMark, jsInvoker_, instance_, std::move(name), std::move(startTime), std::move(entry)); } - jsi::Array measure(jsi::Runtime &rt, jsi::String name, std::optional startTime, std::optional endTime, std::optional duration, std::optional startMark, std::optional endMark) override { + void reportMeasure(jsi::Runtime &rt, jsi::String name, double startTime, double duration, jsi::Value entry) override { static_assert( - bridging::getParameterCount(&T::measure) == 7, - "Expected measure(...) to have 7 parameters"); + bridging::getParameterCount(&T::reportMeasure) == 5, + "Expected reportMeasure(...) to have 5 parameters"); - return bridging::callFromJs( - rt, &T::measure, jsInvoker_, instance_, std::move(name), std::move(startTime), std::move(endTime), std::move(duration), std::move(startMark), std::move(endMark)); + return bridging::callFromJs( + rt, &T::reportMeasure, jsInvoker_, instance_, std::move(name), std::move(startTime), std::move(duration), std::move(entry)); } - jsi::Array measureWithResult(jsi::Runtime &rt, jsi::String name, double startTime, double endTime, std::optional duration, std::optional startMark, std::optional endMark) override { + std::optional getMarkTime(jsi::Runtime &rt, jsi::String name) override { static_assert( - bridging::getParameterCount(&T::measureWithResult) == 7, - "Expected measureWithResult(...) to have 7 parameters"); + bridging::getParameterCount(&T::getMarkTime) == 2, + "Expected getMarkTime(...) to have 2 parameters"); - return bridging::callFromJs( - rt, &T::measureWithResult, jsInvoker_, instance_, std::move(name), std::move(startTime), std::move(endTime), std::move(duration), std::move(startMark), std::move(endMark)); + return bridging::callFromJs>( + rt, &T::getMarkTime, jsInvoker_, instance_, std::move(name)); } void clearMarks(jsi::Runtime &rt, std::optional entryName) override { static_assert( @@ -9143,14 +9214,6 @@ class JSI_EXPORT NativePerformanceCxxSpec : public TurboModule { return bridging::callFromJs( rt, &T::getSupportedPerformanceEntryTypes, jsInvoker_, instance_); } - void setCurrentTimeStampForTesting(jsi::Runtime &rt, double timeStamp) override { - static_assert( - bridging::getParameterCount(&T::setCurrentTimeStampForTesting) == 2, - "Expected setCurrentTimeStampForTesting(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::setCurrentTimeStampForTesting, jsInvoker_, instance_, std::move(timeStamp)); - } void clearEventCountsForTesting(jsi::Runtime &rt) override { static_assert( bridging::getParameterCount(&T::clearEventCountsForTesting) == 1, diff --git a/vnext/package.json b/vnext/package.json index 8cf586d5adf..6c93e635fa3 100644 --- a/vnext/package.json +++ b/vnext/package.json @@ -84,7 +84,7 @@ "just-scripts": "^1.3.3", "prettier": "2.8.8", "react": "19.1.0", - "react-native": "0.81.0-nightly-20250709-6892dde36", + "react-native": "0.82.0-nightly-20250806-5936f29d6", "react-native-platform-override": "^1.9.59", "react-refresh": "^0.14.0", "typescript": "5.0.4" @@ -151,4 +151,4 @@ "engines": { "node": ">= 22" } -} \ No newline at end of file +} diff --git a/yarn.lock b/yarn.lock index 2ecbce7f4c8..90f3ba48802 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2085,6 +2085,11 @@ resolved "https://registry.yarnpkg.com/@react-native/assets-registry/-/assets-registry-0.81.0-nightly-20250709-6892dde36.tgz#25a5f901732ff2a1a5c161a8459f3ff876968d3f" integrity sha512-dTVO+10qEqLZFuxjfnhw17ntjLlEUNxANpXLNuAxKf3Hiaj1xTgLBK3imR+ewSyD/P5sP4s91/IW+zYqEULB7g== +"@react-native/assets-registry@0.82.0-nightly-20250806-5936f29d6": + version "0.82.0-nightly-20250806-5936f29d6" + resolved "https://registry.yarnpkg.com/@react-native/assets-registry/-/assets-registry-0.82.0-nightly-20250806-5936f29d6.tgz#4a119406a1e38f96eb324d3db7808dff63eeda5d" + integrity sha512-cZiSlYnqukLQJFHrDUAkwgYSRJaOlAaqpUe4JquctKzVmcoUlj5k54X3bD565VUnv18uDpM8UUoAVuQh6uwIrA== + "@react-native/assets@1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@react-native/assets/-/assets-1.0.0.tgz#c6f9bf63d274bafc8e970628de24986b30a55c8e" @@ -2230,6 +2235,17 @@ nullthrows "^1.1.1" yargs "^17.6.2" +"@react-native/codegen@0.82.0-nightly-20250806-5936f29d6": + version "0.82.0-nightly-20250806-5936f29d6" + resolved "https://registry.yarnpkg.com/@react-native/codegen/-/codegen-0.82.0-nightly-20250806-5936f29d6.tgz#73ae2fe587b513a8ea11967131213a5f90e32c17" + integrity sha512-IEmkr0V7QxoaRJCwQI0aVKiUkTIHOrm2EYrhvk1LRqp3Bm8hw7ZzplkkTiLD4jxoxCMj2+I+o+TXc5srUqJ7hA== + dependencies: + glob "^7.1.1" + hermes-parser "0.30.0" + invariant "^2.2.4" + nullthrows "^1.1.1" + yargs "^17.6.2" + "@react-native/community-cli-plugin@0.81.0-nightly-20250709-6892dde36": version "0.81.0-nightly-20250709-6892dde36" resolved "https://registry.yarnpkg.com/@react-native/community-cli-plugin/-/community-cli-plugin-0.81.0-nightly-20250709-6892dde36.tgz#ce62c7125724054e7da3731751c44b2883054c97" @@ -2243,11 +2259,29 @@ metro-core "^0.82.5" semver "^7.1.3" +"@react-native/community-cli-plugin@0.82.0-nightly-20250806-5936f29d6": + version "0.82.0-nightly-20250806-5936f29d6" + resolved "https://registry.yarnpkg.com/@react-native/community-cli-plugin/-/community-cli-plugin-0.82.0-nightly-20250806-5936f29d6.tgz#7fb12645abfe56c3f4860e4bee39b197be5810c1" + integrity sha512-XnJUj9o+ZyA97EsE2NYw7Dwd8dJ7itXLGslERs6gohLRDhfunpaRdK4JpSUDdBZCsKxjFC6ixbqysSlEHQnNqA== + dependencies: + "@react-native/dev-middleware" "0.82.0-nightly-20250806-5936f29d6" + debug "^4.4.0" + invariant "^2.2.4" + metro "^0.83.1" + metro-config "^0.83.1" + metro-core "^0.83.1" + semver "^7.1.3" + "@react-native/debugger-frontend@0.81.0-nightly-20250709-6892dde36": version "0.81.0-nightly-20250709-6892dde36" resolved "https://registry.yarnpkg.com/@react-native/debugger-frontend/-/debugger-frontend-0.81.0-nightly-20250709-6892dde36.tgz#f58e9a8baade491b7d639f6150b3b010e7e23edd" integrity sha512-Y2c2wAi5q73sWFLv8c++xJN/Gzl/kHrjmuewS7M1CoimbL8U42O7Wbu67B9WMqoJpyvwEYEerUbuy7NGAUds7g== +"@react-native/debugger-frontend@0.82.0-nightly-20250806-5936f29d6": + version "0.82.0-nightly-20250806-5936f29d6" + resolved "https://registry.yarnpkg.com/@react-native/debugger-frontend/-/debugger-frontend-0.82.0-nightly-20250806-5936f29d6.tgz#bc63b4b7e0f47c6b985619006c0baa764199d033" + integrity sha512-s8BeUUY0Rih/1O2tcq7ToSuPZU89MOd9ULRdetyQl4yYhIXAdUoFqMvOPIfR+vEr9LoiFQII1ln3ebw4NQjJuw== + "@react-native/dev-middleware@0.81.0-nightly-20250709-6892dde36": version "0.81.0-nightly-20250709-6892dde36" resolved "https://registry.yarnpkg.com/@react-native/dev-middleware/-/dev-middleware-0.81.0-nightly-20250709-6892dde36.tgz#753fc9a2b558ea835183134d824cd94723ac9433" @@ -2265,6 +2299,23 @@ serve-static "^1.16.2" ws "^6.2.3" +"@react-native/dev-middleware@0.82.0-nightly-20250806-5936f29d6": + version "0.82.0-nightly-20250806-5936f29d6" + resolved "https://registry.yarnpkg.com/@react-native/dev-middleware/-/dev-middleware-0.82.0-nightly-20250806-5936f29d6.tgz#defd9ebb0fea88a531ca2968ff13a8d60b63611b" + integrity sha512-TOcCq+kQorAxyq/KY5Cgzq9hwseDgCoSD8w6m2qHjBYS3peXvf7/6gM94hJ5hqKNQ3mdLMbcH/EyMuXHMiHnXw== + dependencies: + "@isaacs/ttlcache" "^1.4.1" + "@react-native/debugger-frontend" "0.82.0-nightly-20250806-5936f29d6" + chrome-launcher "^0.15.2" + chromium-edge-launcher "^0.2.0" + connect "^3.6.5" + debug "^4.4.0" + invariant "^2.2.4" + nullthrows "^1.1.1" + open "^7.0.3" + serve-static "^1.16.2" + ws "^6.2.3" + "@react-native/eslint-config@0.79.0-nightly-20250123-d1028885e": version "0.79.0-nightly-20250123-d1028885e" resolved "https://registry.yarnpkg.com/@react-native/eslint-config/-/eslint-config-0.79.0-nightly-20250123-d1028885e.tgz#a4c538e720e9474a7cabdca8d93a266006f53de0" @@ -2293,6 +2344,11 @@ resolved "https://registry.yarnpkg.com/@react-native/gradle-plugin/-/gradle-plugin-0.81.0-nightly-20250709-6892dde36.tgz#e8154919987ef6f997a7f4ba9c9aad0aa9322421" integrity sha512-KUi43W/R9rkRLYkq6A6Bc7XiBxWBuRPxEKo4LTXPVhj6oLz2YKWcjXhuSzIMDkh2KeFhrDdZ7aFNOoj5ua3OVg== +"@react-native/gradle-plugin@0.82.0-nightly-20250806-5936f29d6": + version "0.82.0-nightly-20250806-5936f29d6" + resolved "https://registry.yarnpkg.com/@react-native/gradle-plugin/-/gradle-plugin-0.82.0-nightly-20250806-5936f29d6.tgz#92c30c682a4f1c307507b1f9277a4ba2ae42938a" + integrity sha512-cw8vknHlrrP0cfxhIlOD3uaio2noMhAs457eArPTZTL/XCNamAon4dG5m30m9Tk/HBeJPKJDWGsJTVJN2HngmQ== + "@react-native/js-polyfills@0.80.0-nightly-20250506-3ac16dd6a": version "0.80.0-nightly-20250506-3ac16dd6a" resolved "https://registry.yarnpkg.com/@react-native/js-polyfills/-/js-polyfills-0.80.0-nightly-20250506-3ac16dd6a.tgz#f2c36c596e817f66ad6ff0084f5e0261876252f5" @@ -2303,6 +2359,11 @@ resolved "https://registry.yarnpkg.com/@react-native/js-polyfills/-/js-polyfills-0.81.0-nightly-20250709-6892dde36.tgz#52f97dabb0c87565fa49d704e7f0691ff3f7c465" integrity sha512-Kmge3ec+3L5Dm/heBYodx2OUUqCzf6SIyng2eSP2Nd55/JmrMR5NR86RDh3ApFtXtgxDd9KRwulhva21H2IeTQ== +"@react-native/js-polyfills@0.82.0-nightly-20250806-5936f29d6": + version "0.82.0-nightly-20250806-5936f29d6" + resolved "https://registry.yarnpkg.com/@react-native/js-polyfills/-/js-polyfills-0.82.0-nightly-20250806-5936f29d6.tgz#66b3deaa9fe761bd47d8a70d15bbf7e6005a1b54" + integrity sha512-nlQI7N2SBKKl65EL9/2QqpFRPD59IXqAIR/M02gLwKkz8KP2kecHfG/WUNKQSI4HNauP2jrfAIFi0IAnCmMKqw== + "@react-native/metro-babel-transformer@0.80.0-nightly-20250506-3ac16dd6a": version "0.80.0-nightly-20250506-3ac16dd6a" resolved "https://registry.yarnpkg.com/@react-native/metro-babel-transformer/-/metro-babel-transformer-0.80.0-nightly-20250506-3ac16dd6a.tgz#b15eceae51b4e381d7ef81dec90374eeaae8e682" @@ -2353,6 +2414,11 @@ resolved "https://registry.yarnpkg.com/@react-native/normalize-colors/-/normalize-colors-0.81.0-nightly-20250709-6892dde36.tgz#72138cce819e836ef626abc5fc18dc169e40cef2" integrity sha512-l/haekyBuz9Uy6aRcp2RQssEa81kCPmtm8kET5BpjtFDyPYvWAkMCMoSFVl+ZvWUNobL1jsen1r1xkqgdG1ckw== +"@react-native/normalize-colors@0.82.0-nightly-20250806-5936f29d6": + version "0.82.0-nightly-20250806-5936f29d6" + resolved "https://registry.yarnpkg.com/@react-native/normalize-colors/-/normalize-colors-0.82.0-nightly-20250806-5936f29d6.tgz#4fc975633180730d2189b682ff9f4007956f0ea6" + integrity sha512-BFu6UNAqQu1ncBfUGxwIp5v0HDNQoK8Exr0SZl6BIpuvGARb/Zq8KcB7WURwTcIOa/bHK/4RWmH7QLPWLL7uJg== + "@react-native/popup-menu-android@0.81.0-nightly-20250709-6892dde36": version "0.81.0-nightly-20250709-6892dde36" resolved "https://registry.yarnpkg.com/@react-native/popup-menu-android/-/popup-menu-android-0.81.0-nightly-20250709-6892dde36.tgz#970136c5631d4191db9d46653ea6e683a9eb5e99" @@ -2368,6 +2434,14 @@ invariant "^2.2.4" nullthrows "^1.1.1" +"@react-native/virtualized-lists@0.82.0-nightly-20250806-5936f29d6": + version "0.82.0-nightly-20250806-5936f29d6" + resolved "https://registry.yarnpkg.com/@react-native/virtualized-lists/-/virtualized-lists-0.82.0-nightly-20250806-5936f29d6.tgz#8c8e140fd3e290efe9f36c3fc2de4fc3bc92dd0f" + integrity sha512-7dw6Xe3Hw16yLQZx1MXSjTJJVaKBTHiT58DkxJy6TArsmdhjiEDUpIgI6kaWuijqTLh0wwfPWmEX9YNNsV+QOw== + dependencies: + invariant "^2.2.4" + nullthrows "^1.1.1" + "@rnx-kit/align-deps@^2.5.0": version "2.5.5" resolved "https://registry.yarnpkg.com/@rnx-kit/align-deps/-/align-deps-2.5.5.tgz#708b4fd65941699e1ef33c728d34bc568e648b73" @@ -3953,6 +4027,13 @@ babel-plugin-syntax-hermes-parser@0.29.1: dependencies: hermes-parser "0.29.1" +babel-plugin-syntax-hermes-parser@0.30.0: + version "0.30.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-hermes-parser/-/babel-plugin-syntax-hermes-parser-0.30.0.tgz#c2ce4d6e897ce65ebb482e52a1a6f39726444475" + integrity sha512-NShPDxBhy4v8l32unH4/6czNz69o9kYqDBFRNlbUqssLj8uL9R4EtC8uOBZiGiJPHDd97g2ZOV6z25aGF8HLug== + dependencies: + hermes-parser "0.30.0" + babel-plugin-transform-define@^2.1.4: version "2.1.4" resolved "https://registry.yarnpkg.com/babel-plugin-transform-define/-/babel-plugin-transform-define-2.1.4.tgz#8f7088211176a55a72788d584ceea9f691a021c1" @@ -6713,6 +6794,16 @@ hermes-estree@0.29.1: resolved "https://registry.yarnpkg.com/hermes-estree/-/hermes-estree-0.29.1.tgz#043c7db076e0e8ef8c5f6ed23828d1ba463ebcc5" integrity sha512-jl+x31n4/w+wEqm0I2r4CMimukLbLQEYpisys5oCre611CI5fc9TxhqkBBCJ1edDG4Kza0f7CgNz8xVMLZQOmQ== +hermes-estree@0.30.0: + version "0.30.0" + resolved "https://registry.yarnpkg.com/hermes-estree/-/hermes-estree-0.30.0.tgz#63d1e81365c19de809cf71735bb1e790aefd2aba" + integrity sha512-JOar667dCAyqYfAtGM5vH+6mdolquul4b4ghwZK9x6ySXSpeB+1xUQ+DV1sRx9sHi4SpqHcdB56wA1Ge1tLo8Q== + +hermes-estree@0.32.0: + version "0.32.0" + resolved "https://registry.yarnpkg.com/hermes-estree/-/hermes-estree-0.32.0.tgz#bb7da6613ab8e67e334a1854ea1e209f487d307b" + integrity sha512-KWn3BqnlDOl97Xe1Yviur6NbgIZ+IP+UVSpshlZWkq+EtoHg6/cwiDj/osP9PCEgFE15KBm1O55JRwbMEm5ejQ== + hermes-parser@0.21.1: version "0.21.1" resolved "https://registry.yarnpkg.com/hermes-parser/-/hermes-parser-0.21.1.tgz#b2ab42b6ee1bed8c659ed61a03d3f61a63183ada" @@ -6741,6 +6832,20 @@ hermes-parser@0.29.1: dependencies: hermes-estree "0.29.1" +hermes-parser@0.30.0: + version "0.30.0" + resolved "https://registry.yarnpkg.com/hermes-parser/-/hermes-parser-0.30.0.tgz#e277ce0bf3fa526733e1821696487fcd6e4287eb" + integrity sha512-O7UexGJRjq54TIXRYDLgnjW3rzLSNcYhy/tzENvsZIQWVioCPhLAx/lhcsUaLi9QNEqGiNRpzIDnZOPzm9p0gw== + dependencies: + hermes-estree "0.30.0" + +hermes-parser@0.32.0: + version "0.32.0" + resolved "https://registry.yarnpkg.com/hermes-parser/-/hermes-parser-0.32.0.tgz#7916984ef6fdce62e7415d354cf35392061cd303" + integrity sha512-g4nBOWFpuiTqjR3LZdRxKUkij9iyveWeuks7INEsMX741f3r9xxrOe8TeQfUxtda0eXmiIFiMQzoeSQEno33Hw== + dependencies: + hermes-estree "0.32.0" + hermes-transform@0.29.1: version "0.29.1" resolved "https://registry.yarnpkg.com/hermes-transform/-/hermes-transform-0.29.1.tgz#eefee947d2099411c05397b1649ef11151830c8a" @@ -8601,6 +8706,16 @@ metro-babel-transformer@0.82.5: hermes-parser "0.29.1" nullthrows "^1.1.1" +metro-babel-transformer@0.83.3: + version "0.83.3" + resolved "https://registry.yarnpkg.com/metro-babel-transformer/-/metro-babel-transformer-0.83.3.tgz#d8c134615530c9ee61364526d44ca4bb0c5343ea" + integrity sha512-1vxlvj2yY24ES1O5RsSIvg4a4WeL7PFXgKOHvXTXiW0deLvQr28ExXj6LjwCCDZ4YZLhq6HddLpZnX4dEdSq5g== + dependencies: + "@babel/core" "^7.25.2" + flow-enums-runtime "^0.0.6" + hermes-parser "0.32.0" + nullthrows "^1.1.1" + metro-cache-key@0.82.5: version "0.82.5" resolved "https://registry.yarnpkg.com/metro-cache-key/-/metro-cache-key-0.82.5.tgz#290a0054b28a708266fb91c8028cf94be04f99c9" @@ -8608,6 +8723,13 @@ metro-cache-key@0.82.5: dependencies: flow-enums-runtime "^0.0.6" +metro-cache-key@0.83.3: + version "0.83.3" + resolved "https://registry.yarnpkg.com/metro-cache-key/-/metro-cache-key-0.83.3.tgz#ae6c5d4eb1ad8d06a92bf7294ca730a8d880b573" + integrity sha512-59ZO049jKzSmvBmG/B5bZ6/dztP0ilp0o988nc6dpaDsU05Cl1c/lRf+yx8m9WW/JVgbmfO5MziBU559XjI5Zw== + dependencies: + flow-enums-runtime "^0.0.6" + metro-cache@0.82.5: version "0.82.5" resolved "https://registry.yarnpkg.com/metro-cache/-/metro-cache-0.82.5.tgz#4c8fe58cd5fa30b87db0b2b6a650a771ec6fe162" @@ -8618,6 +8740,16 @@ metro-cache@0.82.5: https-proxy-agent "^7.0.5" metro-core "0.82.5" +metro-cache@0.83.3: + version "0.83.3" + resolved "https://registry.yarnpkg.com/metro-cache/-/metro-cache-0.83.3.tgz#f1245cc48570c47d8944495e61d67f0228f10172" + integrity sha512-3jo65X515mQJvKqK3vWRblxDEcgY55Sk3w4xa6LlfEXgQ9g1WgMh9m4qVZVwgcHoLy0a2HENTPCCX4Pk6s8c8Q== + dependencies: + exponential-backoff "^3.1.1" + flow-enums-runtime "^0.0.6" + https-proxy-agent "^7.0.5" + metro-core "0.83.3" + metro-config@0.82.5, metro-config@^0.82.2, metro-config@^0.82.5: version "0.82.5" resolved "https://registry.yarnpkg.com/metro-config/-/metro-config-0.82.5.tgz#07366f32c3fe6203d630af7df4781900816c7c85" @@ -8632,6 +8764,20 @@ metro-config@0.82.5, metro-config@^0.82.2, metro-config@^0.82.5: metro-core "0.82.5" metro-runtime "0.82.5" +metro-config@0.83.3, metro-config@^0.83.1: + version "0.83.3" + resolved "https://registry.yarnpkg.com/metro-config/-/metro-config-0.83.3.tgz#a30e7a69b5cf8c4ac4c4b68b1b4c33649ae129a2" + integrity sha512-mTel7ipT0yNjKILIan04bkJkuCzUUkm2SeEaTads8VfEecCh+ltXchdq6DovXJqzQAXuR2P9cxZB47Lg4klriA== + dependencies: + connect "^3.6.5" + flow-enums-runtime "^0.0.6" + jest-validate "^29.7.0" + metro "0.83.3" + metro-cache "0.83.3" + metro-core "0.83.3" + metro-runtime "0.83.3" + yaml "^2.6.1" + metro-core@0.82.5, metro-core@^0.82.5: version "0.82.5" resolved "https://registry.yarnpkg.com/metro-core/-/metro-core-0.82.5.tgz#fda1b2f7365e3a09055dd72ba1681f8fc1f6f492" @@ -8641,6 +8787,15 @@ metro-core@0.82.5, metro-core@^0.82.5: lodash.throttle "^4.1.1" metro-resolver "0.82.5" +metro-core@0.83.3, metro-core@^0.83.1: + version "0.83.3" + resolved "https://registry.yarnpkg.com/metro-core/-/metro-core-0.83.3.tgz#007e93f7d1983777da8988dfb103ad897c9835b8" + integrity sha512-M+X59lm7oBmJZamc96usuF1kusd5YimqG/q97g4Ac7slnJ3YiGglW5CsOlicTR5EWf8MQFxxjDoB6ytTqRe8Hw== + dependencies: + flow-enums-runtime "^0.0.6" + lodash.throttle "^4.1.1" + metro-resolver "0.83.3" + metro-file-map@0.82.5: version "0.82.5" resolved "https://registry.yarnpkg.com/metro-file-map/-/metro-file-map-0.82.5.tgz#3e47410a9ce8f6c913480970226a17371c2d2974" @@ -8656,6 +8811,21 @@ metro-file-map@0.82.5: nullthrows "^1.1.1" walker "^1.0.7" +metro-file-map@0.83.3: + version "0.83.3" + resolved "https://registry.yarnpkg.com/metro-file-map/-/metro-file-map-0.83.3.tgz#3d79fbb1d379ab178dd895ce54cb5ecb183d74a2" + integrity sha512-jg5AcyE0Q9Xbbu/4NAwwZkmQn7doJCKGW0SLeSJmzNB9Z24jBe0AL2PHNMy4eu0JiKtNWHz9IiONGZWq7hjVTA== + dependencies: + debug "^4.4.0" + fb-watchman "^2.0.0" + flow-enums-runtime "^0.0.6" + graceful-fs "^4.2.4" + invariant "^2.2.4" + jest-worker "^29.7.0" + micromatch "^4.0.4" + nullthrows "^1.1.1" + walker "^1.0.7" + metro-memory-fs@^0.82.4: version "0.82.5" resolved "https://registry.yarnpkg.com/metro-memory-fs/-/metro-memory-fs-0.82.5.tgz#ae6c4c251cd6dc9cf44540c3b1356cff54db875e" @@ -8671,6 +8841,14 @@ metro-minify-terser@0.82.5: flow-enums-runtime "^0.0.6" terser "^5.15.0" +metro-minify-terser@0.83.3: + version "0.83.3" + resolved "https://registry.yarnpkg.com/metro-minify-terser/-/metro-minify-terser-0.83.3.tgz#c1c70929c86b14c8bf03e6321b4f9310bc8dbe87" + integrity sha512-O2BmfWj6FSfzBLrNCXt/rr2VYZdX5i6444QJU0fFoc7Ljg+Q+iqebwE3K0eTvkI6TRjELsXk1cjU+fXwAR4OjQ== + dependencies: + flow-enums-runtime "^0.0.6" + terser "^5.15.0" + metro-resolver@0.82.5: version "0.82.5" resolved "https://registry.yarnpkg.com/metro-resolver/-/metro-resolver-0.82.5.tgz#cb810038d488a47334df444312b23f0090eca5c3" @@ -8678,6 +8856,13 @@ metro-resolver@0.82.5: dependencies: flow-enums-runtime "^0.0.6" +metro-resolver@0.83.3: + version "0.83.3" + resolved "https://registry.yarnpkg.com/metro-resolver/-/metro-resolver-0.83.3.tgz#06207bdddc280b9335722a8c992aeec017413942" + integrity sha512-0js+zwI5flFxb1ktmR///bxHYg7OLpRpWZlBBruYG8OKYxeMP7SV0xQ/o/hUelrEMdK4LJzqVtHAhBm25LVfAQ== + dependencies: + flow-enums-runtime "^0.0.6" + metro-runtime@0.82.5, metro-runtime@^0.82.2, metro-runtime@^0.82.5: version "0.82.5" resolved "https://registry.yarnpkg.com/metro-runtime/-/metro-runtime-0.82.5.tgz#97840760e4cee49f08948dd918dbeba08dd0d0ec" @@ -8686,7 +8871,15 @@ metro-runtime@0.82.5, metro-runtime@^0.82.2, metro-runtime@^0.82.5: "@babel/runtime" "^7.25.0" flow-enums-runtime "^0.0.6" -metro-source-map@0.82.5, metro-source-map@^0.82.2, metro-source-map@^0.82.5: +metro-runtime@0.83.3, metro-runtime@^0.83.1: + version "0.83.3" + resolved "https://registry.yarnpkg.com/metro-runtime/-/metro-runtime-0.83.3.tgz#ff504df5d93f38b1af396715b327e589ba8d184d" + integrity sha512-JHCJb9ebr9rfJ+LcssFYA2x1qPYuSD/bbePupIGhpMrsla7RCwC/VL3yJ9cSU+nUhU4c9Ixxy8tBta+JbDeZWw== + dependencies: + "@babel/runtime" "^7.25.0" + flow-enums-runtime "^0.0.6" + +metro-source-map@0.82.5, metro-source-map@^0.82.2: version "0.82.5" resolved "https://registry.yarnpkg.com/metro-source-map/-/metro-source-map-0.82.5.tgz#85e2e9672bff6d6cefb3b65b96fcc69f929c69c6" integrity sha512-wH+awTOQJVkbhn2SKyaw+0cd+RVSCZ3sHVgyqJFQXIee/yLs3dZqKjjeKKhhVeudgjXo7aE/vSu/zVfcQEcUfw== @@ -8702,6 +8895,22 @@ metro-source-map@0.82.5, metro-source-map@^0.82.2, metro-source-map@^0.82.5: source-map "^0.5.6" vlq "^1.0.0" +metro-source-map@0.83.3, metro-source-map@^0.83.1: + version "0.83.3" + resolved "https://registry.yarnpkg.com/metro-source-map/-/metro-source-map-0.83.3.tgz#04bb464f7928ea48bcdfd18912c8607cf317c898" + integrity sha512-xkC3qwUBh2psVZgVavo8+r2C9Igkk3DibiOXSAht1aYRRcztEZNFtAMtfSB7sdO2iFMx2Mlyu++cBxz/fhdzQg== + dependencies: + "@babel/traverse" "^7.25.3" + "@babel/traverse--for-generate-function-map" "npm:@babel/traverse@^7.25.3" + "@babel/types" "^7.25.2" + flow-enums-runtime "^0.0.6" + invariant "^2.2.4" + metro-symbolicate "0.83.3" + nullthrows "^1.1.1" + ob1 "0.83.3" + source-map "^0.5.6" + vlq "^1.0.0" + metro-symbolicate@0.82.5: version "0.82.5" resolved "https://registry.yarnpkg.com/metro-symbolicate/-/metro-symbolicate-0.82.5.tgz#b53255cad11f1e6795f319ca4b41857bfe295d65" @@ -8714,6 +8923,18 @@ metro-symbolicate@0.82.5: source-map "^0.5.6" vlq "^1.0.0" +metro-symbolicate@0.83.3: + version "0.83.3" + resolved "https://registry.yarnpkg.com/metro-symbolicate/-/metro-symbolicate-0.83.3.tgz#67af03950f0dfe19a7c059e3983e39a31e95d03a" + integrity sha512-F/YChgKd6KbFK3eUR5HdUsfBqVsanf5lNTwFd4Ca7uuxnHgBC3kR/Hba/RGkenR3pZaGNp5Bu9ZqqP52Wyhomw== + dependencies: + flow-enums-runtime "^0.0.6" + invariant "^2.2.4" + metro-source-map "0.83.3" + nullthrows "^1.1.1" + source-map "^0.5.6" + vlq "^1.0.0" + metro-transform-plugins@0.82.5, metro-transform-plugins@^0.82.4: version "0.82.5" resolved "https://registry.yarnpkg.com/metro-transform-plugins/-/metro-transform-plugins-0.82.5.tgz#678da4d0f9085b2a3fc0b4350062f19cc625c5fc" @@ -8726,6 +8947,18 @@ metro-transform-plugins@0.82.5, metro-transform-plugins@^0.82.4: flow-enums-runtime "^0.0.6" nullthrows "^1.1.1" +metro-transform-plugins@0.83.3: + version "0.83.3" + resolved "https://registry.yarnpkg.com/metro-transform-plugins/-/metro-transform-plugins-0.83.3.tgz#2c59ba841e269363cf3acb13138cb992f0c75013" + integrity sha512-eRGoKJU6jmqOakBMH5kUB7VitEWiNrDzBHpYbkBXW7C5fUGeOd2CyqrosEzbMK5VMiZYyOcNFEphvxk3OXey2A== + dependencies: + "@babel/core" "^7.25.2" + "@babel/generator" "^7.25.0" + "@babel/template" "^7.25.0" + "@babel/traverse" "^7.25.3" + flow-enums-runtime "^0.0.6" + nullthrows "^1.1.1" + metro-transform-worker@0.82.5: version "0.82.5" resolved "https://registry.yarnpkg.com/metro-transform-worker/-/metro-transform-worker-0.82.5.tgz#aabdccf17aaa584ec0fd97b5283e806958fb3418" @@ -8745,6 +8978,25 @@ metro-transform-worker@0.82.5: metro-transform-plugins "0.82.5" nullthrows "^1.1.1" +metro-transform-worker@0.83.3: + version "0.83.3" + resolved "https://registry.yarnpkg.com/metro-transform-worker/-/metro-transform-worker-0.83.3.tgz#ca6ae4a02b0f61b33299e6e56bacaba32dcd607f" + integrity sha512-Ztekew9t/gOIMZX1tvJOgX7KlSLL5kWykl0Iwu2cL2vKMKVALRl1hysyhUw0vjpAvLFx+Kfq9VLjnHIkW32fPA== + dependencies: + "@babel/core" "^7.25.2" + "@babel/generator" "^7.25.0" + "@babel/parser" "^7.25.3" + "@babel/types" "^7.25.2" + flow-enums-runtime "^0.0.6" + metro "0.83.3" + metro-babel-transformer "0.83.3" + metro-cache "0.83.3" + metro-cache-key "0.83.3" + metro-minify-terser "0.83.3" + metro-source-map "0.83.3" + metro-transform-plugins "0.83.3" + nullthrows "^1.1.1" + metro@0.82.5, metro@^0.82.5: version "0.82.5" resolved "https://registry.yarnpkg.com/metro/-/metro-0.82.5.tgz#a27fbc08dd283a14ae58496288c10adaae65f461" @@ -8791,6 +9043,52 @@ metro@0.82.5, metro@^0.82.5: ws "^7.5.10" yargs "^17.6.2" +metro@0.83.3, metro@^0.83.1: + version "0.83.3" + resolved "https://registry.yarnpkg.com/metro/-/metro-0.83.3.tgz#1e7e04c15519af746f8932c7f9c553d92c39e922" + integrity sha512-+rP+/GieOzkt97hSJ0MrPOuAH/jpaS21ZDvL9DJ35QYRDlQcwzcvUlGUf79AnQxq/2NPiS/AULhhM4TKutIt8Q== + dependencies: + "@babel/code-frame" "^7.24.7" + "@babel/core" "^7.25.2" + "@babel/generator" "^7.25.0" + "@babel/parser" "^7.25.3" + "@babel/template" "^7.25.0" + "@babel/traverse" "^7.25.3" + "@babel/types" "^7.25.2" + accepts "^1.3.7" + chalk "^4.0.0" + ci-info "^2.0.0" + connect "^3.6.5" + debug "^4.4.0" + error-stack-parser "^2.0.6" + flow-enums-runtime "^0.0.6" + graceful-fs "^4.2.4" + hermes-parser "0.32.0" + image-size "^1.0.2" + invariant "^2.2.4" + jest-worker "^29.7.0" + jsc-safe-url "^0.2.2" + lodash.throttle "^4.1.1" + metro-babel-transformer "0.83.3" + metro-cache "0.83.3" + metro-cache-key "0.83.3" + metro-config "0.83.3" + metro-core "0.83.3" + metro-file-map "0.83.3" + metro-resolver "0.83.3" + metro-runtime "0.83.3" + metro-source-map "0.83.3" + metro-symbolicate "0.83.3" + metro-transform-plugins "0.83.3" + metro-transform-worker "0.83.3" + mime-types "^2.1.27" + nullthrows "^1.1.1" + serialize-error "^2.1.0" + source-map "^0.5.6" + throat "^5.0.0" + ws "^7.5.10" + yargs "^17.6.2" + micromark-core-commonmark@2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/micromark-core-commonmark/-/micromark-core-commonmark-2.0.2.tgz#6a45bbb139e126b3f8b361a10711ccc7c6e15e93" @@ -9454,6 +9752,13 @@ ob1@0.82.5: dependencies: flow-enums-runtime "^0.0.6" +ob1@0.83.3: + version "0.83.3" + resolved "https://registry.yarnpkg.com/ob1/-/ob1-0.83.3.tgz#2208e20c9070e9beff3ad067f2db458fa6b07014" + integrity sha512-egUxXCDwoWG06NGCS5s5AdcpnumHKJlfd3HH06P3m9TEMwwScfcY35wpQxbm9oHof+dM/lVH9Rfyu1elTVelSA== + dependencies: + flow-enums-runtime "^0.0.6" + object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" @@ -10249,24 +10554,24 @@ react-native-xaml@^0.0.80: dependencies: "@types/react" "^19.0.0" -react-native@0.81.0-nightly-20250709-6892dde36: - version "0.81.0-nightly-20250709-6892dde36" - resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.81.0-nightly-20250709-6892dde36.tgz#bf22886f41bee07677c3adf32986f99fc080cc31" - integrity sha512-HQrBpJF2K7y1M62NkwbDxVEanUSTSxjUC+BIKzamhx6dRObgRhrRX64ukH26pdCUz3kHg0c0mfAugdkeGRwDPA== +react-native@0.82.0-nightly-20250806-5936f29d6: + version "0.82.0-nightly-20250806-5936f29d6" + resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.82.0-nightly-20250806-5936f29d6.tgz#02ea506691e719ea5fd5c54fc6b542efd31410ff" + integrity sha512-xD1UW0H5YYsWn7eOyd3Yr3jV+82iPq9a+wrIMenp1DHU1abzoqR7aol1wHYfWBNjwQ1P7rJZq44nj1lKJZZMkA== dependencies: "@jest/create-cache-key-function" "^29.7.0" - "@react-native/assets-registry" "0.81.0-nightly-20250709-6892dde36" - "@react-native/codegen" "0.81.0-nightly-20250709-6892dde36" - "@react-native/community-cli-plugin" "0.81.0-nightly-20250709-6892dde36" - "@react-native/gradle-plugin" "0.81.0-nightly-20250709-6892dde36" - "@react-native/js-polyfills" "0.81.0-nightly-20250709-6892dde36" - "@react-native/normalize-colors" "0.81.0-nightly-20250709-6892dde36" - "@react-native/virtualized-lists" "0.81.0-nightly-20250709-6892dde36" + "@react-native/assets-registry" "0.82.0-nightly-20250806-5936f29d6" + "@react-native/codegen" "0.82.0-nightly-20250806-5936f29d6" + "@react-native/community-cli-plugin" "0.82.0-nightly-20250806-5936f29d6" + "@react-native/gradle-plugin" "0.82.0-nightly-20250806-5936f29d6" + "@react-native/js-polyfills" "0.82.0-nightly-20250806-5936f29d6" + "@react-native/normalize-colors" "0.82.0-nightly-20250806-5936f29d6" + "@react-native/virtualized-lists" "0.82.0-nightly-20250806-5936f29d6" abort-controller "^3.0.0" anser "^1.4.9" ansi-regex "^5.0.0" babel-jest "^29.7.0" - babel-plugin-syntax-hermes-parser "0.29.1" + babel-plugin-syntax-hermes-parser "0.30.0" base64-js "^1.5.1" commander "^12.0.0" flow-enums-runtime "^0.0.6" @@ -10274,8 +10579,8 @@ react-native@0.81.0-nightly-20250709-6892dde36: invariant "^2.2.4" jest-environment-node "^29.7.0" memoize-one "^5.0.0" - metro-runtime "^0.82.5" - metro-source-map "^0.82.5" + metro-runtime "^0.83.1" + metro-source-map "^0.83.1" nullthrows "^1.1.1" pretty-format "^29.7.0" promise "^8.3.0" @@ -12241,6 +12546,11 @@ yaml@^2.2.1: resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.6.0.tgz#14059ad9d0b1680d0f04d3a60fe00f3a857303c3" integrity sha512-a6ae//JvKDEra2kdi1qzCyrJW/WZCgFi8ydDV+eXExl95t+5R+ijnqHJbz9tmMh8FUjx3iv2fCQ4dclAQlO2UQ== +yaml@^2.6.1: + version "2.8.1" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.8.1.tgz#1870aa02b631f7e8328b93f8bc574fac5d6c4d79" + integrity sha512-lcYcMxX2PO9XMGvAJkJ3OsNMw+/7FKes7/hgerGUYWIoWu5j/+YQqcZr5JnPZWzOsEBgMbSbiSTn/dv/69Mkpw== + yargs-parser@^18.1.2: version "18.1.3" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0" From 64adc846933f24ecd7fd5cecf027c94561506429 Mon Sep 17 00:00:00 2001 From: vineethkuttan <66076509+vineethkuttan@users.noreply.github.com> Date: Thu, 16 Oct 2025 21:48:24 +0530 Subject: [PATCH 03/13] react-native-platform-override upgrade --- .../react-native-win32-tester/overrides.json | 6 +- .../js/components/ListExampleShared.win32.js | 4 +- .../src/js/utils/RNTesterList.win32.js | 12 +- .../react-native-win32/.flowconfig | 8 +- .../react-native-win32/overrides.json | 22 +-- .../AccessibilityInfo.win32.js | 2 +- .../Components/Pressable/Pressable.win32.js | 15 +- .../Components/TextInput/TextInput.win32.js | 7 + .../TouchableNativeFeedback.win32.js | 100 +++++++++++++ .../Libraries/Components/View/View.win32.js | 110 +++++++++++++++ .../Pressability/Pressability.win32.js | 2 +- .../Libraries/Utilities/useMergeRefs.js | 2 +- .../react-native-win32/src-win/index.win32.js | 11 +- .../animated/NativeAnimatedHelper.win32.js | 9 +- .../tester/overrides.json | 18 +-- .../Button/ButtonExample.windows.js | 6 + .../Switch/SwitchExample.windows.js | 18 ++- .../Pressable/PressableExample.windows.js | 18 ++- .../js/examples/Text/TextExample.windows.js | 16 ++- .../Text/TextSharedExamples.windows.js | 101 +++++++++++++ .../Touchable/TouchableExample.windows.js | 17 +-- .../src/js/utils/RNTesterList.windows.js | 12 +- .../@react-native/monorepo/overrides.json | 3 +- packages/@react-native/monorepo/package.json | 52 +++++-- .../TextInput/TextInputExample.ios.js | 6 +- .../js/examples/TextInput/TextInputKeyProp.js | 4 +- .../TextInput/TextInputSharedExamples.js | 22 ++- .../tester/js/utils/RNTesterList.android.js | 12 +- .../tester/js/utils/RNTesterList.ios.js | 12 +- packages/@react-native/tester/overrides.json | 121 ++++++++-------- packages/@react-native/tester/package.json | 15 +- vnext/.flowconfig | 8 +- .../cxxreact/CxxNativeModule.cpp | 3 +- .../cxxreact/NativeToJsBridge.cpp | 3 +- .../cxxreact/TraceSection.h | 8 +- .../jsi/jsi/test/testlib.cpp | 4 +- .../jsinspector-modern/NetworkIOAgent.cpp | 22 ++- .../jsinspector-modern/Utf8.h | 1 + .../core/ReactCommon/TurboModule.h | 4 +- .../react/nativemodule/dom/NativeDOM.cpp | 61 ++++---- .../react/nativemodule/dom/NativeDOM.h | 15 +- .../ComponentDescriptorRegistry.cpp | 2 +- .../components/view/AccessibilityProps.cpp | 6 + .../renderer/core/DynamicEventPayload.cpp | 4 + .../react/runtime/ReactInstance.cpp | 25 ++-- vnext/overrides.json | 69 ++++----- .../AccessibilityInfo.windows.js | 2 +- .../Components/Pressable/Pressable.windows.js | 18 ++- .../Components/Switch/Switch.windows.js | 2 +- .../Components/TextInput/TextInput.windows.js | 7 + .../Touchable/TouchableBounce.windows.js | 2 +- .../Touchable/TouchableHighlight.windows.js | 2 +- .../TouchableNativeFeedback.windows.js | 2 +- .../Touchable/TouchableOpacity.windows.js | 2 +- .../TouchableWithoutFeedback.windows.js | 4 +- .../Libraries/Components/View/View.windows.js | 133 ++++++++++++++---- .../src-win/Libraries/Modal/Modal.windows.js | 2 +- .../Pressability/Pressability.windows.js | 2 +- vnext/src-win/index.windows.js | 11 +- vnext/src-win/jest/setup.js | 11 ++ .../ReactNativeFeatureFlagsBase.js | 19 +++ 61 files changed, 878 insertions(+), 339 deletions(-) diff --git a/packages/@office-iss/react-native-win32-tester/overrides.json b/packages/@office-iss/react-native-win32-tester/overrides.json index a644b8f2f4d..c989749ef5c 100644 --- a/packages/@office-iss/react-native-win32-tester/overrides.json +++ b/packages/@office-iss/react-native-win32-tester/overrides.json @@ -5,13 +5,13 @@ "excludePatterns": [ "src/js/examples-win32/**" ], - "baseVersion": "0.81.0-nightly-20250709-6892dde36", + "baseVersion": "0.82.0-nightly-20250806-5936f29d6", "overrides": [ { "type": "patch", "file": "src/js/components/ListExampleShared.win32.js", "baseFile": "packages/rn-tester/js/components/ListExampleShared.js", - "baseHash": "885ca16a7587f79d6404679ee1b1309d3844afe9" + "baseHash": "5eddedbaff0a785757713beb25750aac98e40fcb" }, { "type": "patch", @@ -42,7 +42,7 @@ "type": "derived", "file": "src/js/utils/RNTesterList.win32.js", "baseFile": "packages/rn-tester/js/utils/RNTesterList.android.js", - "baseHash": "c89e65c8063b338c86ec9db173b05b96c589f69e" + "baseHash": "8cd219abae140e98f9578432954fc9ef62421308" } ] } \ No newline at end of file diff --git a/packages/@office-iss/react-native-win32-tester/src/js/components/ListExampleShared.win32.js b/packages/@office-iss/react-native-win32-tester/src/js/components/ListExampleShared.win32.js index bc4c81c3e0f..efc5ef91680 100644 --- a/packages/@office-iss/react-native-win32-tester/src/js/components/ListExampleShared.win32.js +++ b/packages/@office-iss/react-native-win32-tester/src/js/components/ListExampleShared.win32.js @@ -171,7 +171,7 @@ const LoadingComponent: React.ComponentType<{}> = memo(() => ( )); -class ItemSeparatorComponent extends React.PureComponent<$FlowFixMeProps> { +class ItemSeparatorComponent extends React.PureComponent<$FlowFixMe> { render(): React.Node { const style = this.props.highlighted ? [ @@ -183,7 +183,7 @@ class ItemSeparatorComponent extends React.PureComponent<$FlowFixMeProps> { } } -class Spindicator extends React.PureComponent<$FlowFixMeProps> { +class Spindicator extends React.PureComponent<$FlowFixMe> { render(): React.Node { return ( = [ /*{ @@ -154,12 +153,15 @@ const Components: Array = [ category: 'Basic', module: require('../examples/Performance/PerformanceComparisonExample'), }, +<<<<<<< Upstream +======= /* { key: 'OSSLibraryExample', module: require('../examples/OSSLibraryExample/OSSLibraryExample'), }, */ +>>>>>>> Override ...RNTesterListFbInternal.Components, ]; @@ -374,14 +376,6 @@ const APIs: Array = ([ ...RNTesterListFbInternal.APIs, ]: Array).filter(Boolean); -if (ReactNativeFeatureFlags.shouldEmitW3CPointerEvents()) { - APIs.push({ - key: 'W3C PointerEvents', - category: 'Experimental', - module: require('../examples/Experimental/W3CPointerEventsExample').default, - }); -} - const Playgrounds: Array = [ { key: 'PlaygroundExample', diff --git a/packages/@office-iss/react-native-win32/.flowconfig b/packages/@office-iss/react-native-win32/.flowconfig index 29f567c3166..586091e9924 100644 --- a/packages/@office-iss/react-native-win32/.flowconfig +++ b/packages/@office-iss/react-native-win32/.flowconfig @@ -149,11 +149,7 @@ module.system.haste.module_ref_prefix=m# react.runtime=automatic -suppress_type=$FlowIssue suppress_type=$FlowFixMe -suppress_type=$FlowFixMeProps -suppress_type=$FlowFixMeState -suppress_type=$FlowFixMeEmpty ban_spread_key_props=true @@ -180,4 +176,8 @@ untyped-import untyped-type-import [version] +<<<<<<< Upstream +^0.278.0 +======= ^0.274.2 +>>>>>>> Override diff --git a/packages/@office-iss/react-native-win32/overrides.json b/packages/@office-iss/react-native-win32/overrides.json index 2cbc30d4ff9..0e1a5cb69b8 100644 --- a/packages/@office-iss/react-native-win32/overrides.json +++ b/packages/@office-iss/react-native-win32/overrides.json @@ -7,19 +7,19 @@ "**/__snapshots__/**", "src-win/rntypes/**" ], - "baseVersion": "0.81.0-nightly-20250709-6892dde36", + "baseVersion": "0.82.0-nightly-20250806-5936f29d6", "overrides": [ { "type": "derived", "file": ".flowconfig", "baseFile": ".flowconfig", - "baseHash": "a5a50b87e779ba343919454cb5f7c1e77c2db982" + "baseHash": "373bd1b0dfbd85e02605d9526e7b08b41a67435f" }, { "type": "derived", "file": "src-win/index.win32.js", "baseFile": "packages/react-native/index.js", - "baseHash": "c5d0dfd40d0fb7c197790b1f23f4f8b9ca835047" + "baseHash": "e4e8dc864521ce28adf8cfa2fb29059484206a05" }, { "type": "platform", @@ -41,7 +41,7 @@ "type": "derived", "file": "src-win/Libraries/Components/AccessibilityInfo/AccessibilityInfo.win32.js", "baseFile": "packages/react-native/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js", - "baseHash": "5a43c9cf537c5cb89e7f634e45be708f4b021493" + "baseHash": "692b825d9db6a6da9c3ae9595e4dfb5c202b879d" }, { "type": "copy", @@ -85,7 +85,7 @@ "type": "patch", "file": "src-win/Libraries/Components/Pressable/Pressable.win32.js", "baseFile": "packages/react-native/Libraries/Components/Pressable/Pressable.js", - "baseHash": "5909b509ee835f2b6eb0dbd3e223180efe602f98", + "baseHash": "08a6e1c0dd895af70ea1c8448a3be028d9cd2587", "issue": 6240 }, { @@ -114,7 +114,7 @@ "type": "derived", "file": "src-win/Libraries/Components/TextInput/TextInput.win32.js", "baseFile": "packages/react-native/Libraries/Components/TextInput/TextInput.js", - "baseHash": "b6289ef53abc941f6f0aed50f80d3852b6682215" + "baseHash": "d6f92b47afedf2e31f4066e50c2900477c4d6c31" }, { "type": "patch", @@ -153,7 +153,7 @@ "type": "derived", "file": "src-win/Libraries/Components/Touchable/TouchableNativeFeedback.win32.js", "baseFile": "packages/react-native/Libraries/Components/Touchable/TouchableNativeFeedback.js", - "baseHash": "5608d67cf2684b855fb32403fea01b8c22c66f3b" + "baseHash": "2ded2efb727d7544aa8a0b249dd3f2502bb57129" }, { "type": "platform", @@ -177,7 +177,7 @@ "type": "patch", "file": "src-win/Libraries/Components/View/View.win32.js", "baseFile": "packages/react-native/Libraries/Components/View/View.js", - "baseHash": "83a4fc8e982845619abb121bb860ad63366260c7" + "baseHash": "60eab5df574b43200494005fc3f00d11576d515b" }, { "type": "derived", @@ -365,7 +365,7 @@ "type": "patch", "file": "src-win/Libraries/Pressability/Pressability.win32.js", "baseFile": "packages/react-native/Libraries/Pressability/Pressability.js", - "baseHash": "54f2a508c9378c1d9240ff27a460a8815e2b8ebd", + "baseHash": "a4205b3bea276e65da3ce0aeb6753bc8e7c5ead0", "issue": 6240 }, { @@ -491,13 +491,13 @@ "type": "copy", "file": "src-win/Libraries/Utilities/useMergeRefs.js", "baseFile": "packages/react-native/Libraries/Utilities/useMergeRefs.js", - "baseHash": "4ba42e1b43ef55a1a9e3095336979fa712f4dc8d" + "baseHash": "4ab145e150c82f4f82547122896e02f45103d1a1" }, { "type": "patch", "file": "src-win/src/private/animated/NativeAnimatedHelper.win32.js", "baseFile": "packages/react-native/src/private/animated/NativeAnimatedHelper.js", - "baseHash": "8ed20ecc1b2a1967539fee0d53a47f25432746f4", + "baseHash": "ecb4418a11a56257962be8ca273d3dbfb7d9862c", "issue": 11041 }, { diff --git a/packages/@office-iss/react-native-win32/src-win/Libraries/Components/AccessibilityInfo/AccessibilityInfo.win32.js b/packages/@office-iss/react-native-win32/src-win/Libraries/Components/AccessibilityInfo/AccessibilityInfo.win32.js index dbf81afa5b4..e33ec4d36af 100644 --- a/packages/@office-iss/react-native-win32/src-win/Libraries/Components/AccessibilityInfo/AccessibilityInfo.win32.js +++ b/packages/@office-iss/react-native-win32/src-win/Libraries/Components/AccessibilityInfo/AccessibilityInfo.win32.js @@ -420,7 +420,7 @@ const AccessibilityInfo = { */ addEventListener>( eventName: K, - // $FlowIssue[incompatible-type] - Flow bug with unions and generics (T128099423) + // $FlowFixMe[incompatible-type] - Flow bug with unions and generics (T128099423) handler: (...AccessibilityEventDefinitions[K]) => void, ): EventSubscription { const deviceEventName = EventNames.get(eventName); diff --git a/packages/@office-iss/react-native-win32/src-win/Libraries/Components/Pressable/Pressable.win32.js b/packages/@office-iss/react-native-win32/src-win/Libraries/Components/Pressable/Pressable.win32.js index bee84749615..2439a22fc13 100644 --- a/packages/@office-iss/react-native-win32/src-win/Libraries/Components/Pressable/Pressable.win32.js +++ b/packages/@office-iss/react-native-win32/src-win/Libraries/Components/Pressable/Pressable.win32.js @@ -123,6 +123,12 @@ type PressableBaseProps = $ReadOnly<{ onPressOut?: ?(event: GestureResponderEvent) => mixed, /** +<<<<<<< Upstream + * Whether to prevent any other native components from becoming responder + * while this pressable is responder. + */ + blockNativeResponder?: ?boolean, +======= * Called after the element loses focus. */ onBlur?: ?(event: BlurEvent) => mixed, @@ -161,6 +167,7 @@ type PressableBaseProps = $ReadOnly<{ * Called in the tunneling phase after a key up event is detected. */ onKeyUpCapture?: ?(event: KeyEvent) => void, +>>>>>>> Override /** * Either view styles or a function that receives a boolean reflecting whether @@ -231,6 +238,7 @@ function Pressable({ 'aria-multiselectable': ariaMultiselectable, // Win32 'aria-required': ariaRequired, // Win32 'aria-selected': ariaSelected, + blockNativeResponder, cancelable, children, delayHoverIn, @@ -290,7 +298,7 @@ function Pressable({ }; const accessibilityLiveRegion = - ariaLive === 'off' ? 'none' : ariaLive ?? props.accessibilityLiveRegion; + ariaLive === 'off' ? 'none' : (ariaLive ?? props.accessibilityLiveRegion); const accessibilityLabel = ariaLabel ?? props.accessibilityLabel; const restPropsWithDefaults: React.ElementConfig = { @@ -348,14 +356,19 @@ function Pressable({ onPressOut(event); } }, +<<<<<<< Upstream + blockNativeResponder, +======= // [Windows onKeyDown, onKeyUp, // Windows] +>>>>>>> Override }), [ android_disableSound, android_rippleConfig, + blockNativeResponder, cancelable, delayHoverIn, delayHoverOut, diff --git a/packages/@office-iss/react-native-win32/src-win/Libraries/Components/TextInput/TextInput.win32.js b/packages/@office-iss/react-native-win32/src-win/Libraries/Components/TextInput/TextInput.win32.js index 972f6b7b6b4..0973ada7de3 100644 --- a/packages/@office-iss/react-native-win32/src-win/Libraries/Components/TextInput/TextInput.win32.js +++ b/packages/@office-iss/react-native-win32/src-win/Libraries/Components/TextInput/TextInput.win32.js @@ -1051,9 +1051,16 @@ const TextInput: component( } autoComplete={ Platform.OS === 'android' +<<<<<<< Upstream + ? // $FlowFixMe[invalid-computed-prop] + // $FlowFixMe[prop-missing] + (autoCompleteWebToAutoCompleteAndroidMap[autoComplete] ?? + autoComplete) +======= ? // $FlowFixMe autoCompleteWebToAutoCompleteAndroidMap[autoComplete] ?? autoComplete +>>>>>>> Override : undefined } textContentType={ diff --git a/packages/@office-iss/react-native-win32/src-win/Libraries/Components/Touchable/TouchableNativeFeedback.win32.js b/packages/@office-iss/react-native-win32/src-win/Libraries/Components/Touchable/TouchableNativeFeedback.win32.js index 8940c9bb37c..93de9ea9565 100644 --- a/packages/@office-iss/react-native-win32/src-win/Libraries/Components/Touchable/TouchableNativeFeedback.win32.js +++ b/packages/@office-iss/react-native-win32/src-win/Libraries/Components/Touchable/TouchableNativeFeedback.win32.js @@ -286,6 +286,106 @@ class TouchableNativeFeedback extends React.Component< } } +<<<<<<< Upstream + render(): React.Node { + const element = React.Children.only<$FlowFixMe>(this.props.children); + const children: Array = [element.props.children]; + if (__DEV__) { + if (element.type === View) { + children.push( + , + ); + } + } + + // BACKWARD-COMPATIBILITY: Focus and blur events were never supported before + // adopting `Pressability`, so preserve that behavior. + const {onBlur, onFocus, ...eventHandlersWithoutBlurAndFocus} = + this.state.pressability.getEventHandlers(); + + let _accessibilityState = { + busy: this.props['aria-busy'] ?? this.props.accessibilityState?.busy, + checked: + this.props['aria-checked'] ?? this.props.accessibilityState?.checked, + disabled: + this.props['aria-disabled'] ?? this.props.accessibilityState?.disabled, + expanded: + this.props['aria-expanded'] ?? this.props.accessibilityState?.expanded, + selected: + this.props['aria-selected'] ?? this.props.accessibilityState?.selected, + }; + + _accessibilityState = + this.props.disabled != null + ? { + ..._accessibilityState, + disabled: this.props.disabled, + } + : _accessibilityState; + + const accessibilityValue = { + max: this.props['aria-valuemax'] ?? this.props.accessibilityValue?.max, + min: this.props['aria-valuemin'] ?? this.props.accessibilityValue?.min, + now: this.props['aria-valuenow'] ?? this.props.accessibilityValue?.now, + text: this.props['aria-valuetext'] ?? this.props.accessibilityValue?.text, + }; + + const accessibilityLiveRegion = + this.props['aria-live'] === 'off' + ? 'none' + : (this.props['aria-live'] ?? this.props.accessibilityLiveRegion); + + const accessibilityLabel = + this.props['aria-label'] ?? this.props.accessibilityLabel; + return cloneElement( + element, + { + ...eventHandlersWithoutBlurAndFocus, + ...getBackgroundProp( + this.props.background === undefined + ? TouchableNativeFeedback.SelectableBackground() + : this.props.background, + this.props.useForeground === true, + ), + accessible: this.props.accessible !== false, + accessibilityHint: this.props.accessibilityHint, + accessibilityLanguage: this.props.accessibilityLanguage, + accessibilityLabel: accessibilityLabel, + accessibilityRole: this.props.accessibilityRole, + accessibilityState: _accessibilityState, + accessibilityActions: this.props.accessibilityActions, + onAccessibilityAction: this.props.onAccessibilityAction, + accessibilityValue: accessibilityValue, + importantForAccessibility: + this.props['aria-hidden'] === true + ? 'no-hide-descendants' + : this.props.importantForAccessibility, + accessibilityViewIsModal: + this.props['aria-modal'] ?? this.props.accessibilityViewIsModal, + accessibilityLiveRegion: accessibilityLiveRegion, + accessibilityElementsHidden: + this.props['aria-hidden'] ?? this.props.accessibilityElementsHidden, + hasTVPreferredFocus: this.props.hasTVPreferredFocus, + hitSlop: this.props.hitSlop, + focusable: + this.props.focusable !== false && + this.props.onPress !== undefined && + !this.props.disabled, + nativeID: this.props.id ?? this.props.nativeID, + nextFocusDown: this.props.nextFocusDown, + nextFocusForward: this.props.nextFocusForward, + nextFocusLeft: this.props.nextFocusLeft, + nextFocusRight: this.props.nextFocusRight, + nextFocusUp: this.props.nextFocusUp, + onLayout: this.props.onLayout, + testID: this.props.testID, + }, + ...children, + ); + } + +======= +>>>>>>> Override componentDidUpdate( prevProps: TouchableNativeFeedbackProps, prevState: TouchableNativeFeedbackState, diff --git a/packages/@office-iss/react-native-win32/src-win/Libraries/Components/View/View.win32.js b/packages/@office-iss/react-native-win32/src-win/Libraries/Components/View/View.win32.js index 197d16f00f4..67ecdea37df 100644 --- a/packages/@office-iss/react-native-win32/src-win/Libraries/Components/View/View.win32.js +++ b/packages/@office-iss/react-native-win32/src-win/Libraries/Components/View/View.win32.js @@ -10,7 +10,11 @@ import type {ViewProps} from './ViewPropTypes'; +<<<<<<< Upstream +import TextAncestorContext from '../../Text/TextAncestorContext'; +======= import TextAncestor from '../../Text/TextAncestor'; +>>>>>>> Override import ViewNativeComponent from './ViewNativeComponent'; import * as React from 'react'; import invariant from 'invariant'; // [Windows] @@ -25,6 +29,105 @@ import type {KeyEvent} from '../../Types/CoreEventTypes'; * * @see https://reactnative.dev/docs/view */ +<<<<<<< Upstream +component View( + ref?: React.RefSetter>, + ...props: ViewProps +) { + const hasTextAncestor = use(TextAncestorContext); + + const { + accessibilityState, + accessibilityValue, + 'aria-busy': ariaBusy, + 'aria-checked': ariaChecked, + 'aria-disabled': ariaDisabled, + 'aria-expanded': ariaExpanded, + 'aria-hidden': ariaHidden, + 'aria-label': ariaLabel, + 'aria-labelledby': ariaLabelledBy, + 'aria-live': ariaLive, + 'aria-selected': ariaSelected, + 'aria-valuemax': ariaValueMax, + 'aria-valuemin': ariaValueMin, + 'aria-valuenow': ariaValueNow, + 'aria-valuetext': ariaValueText, + id, + tabIndex, + ...otherProps + } = props; + + // Since we destructured props, we can now treat it as mutable + const processedProps = otherProps as {...ViewProps}; + + const parsedAriaLabelledBy = ariaLabelledBy?.split(/\s*,\s*/g); + if (parsedAriaLabelledBy !== undefined) { + processedProps.accessibilityLabelledBy = parsedAriaLabelledBy; + } + + if (ariaLabel !== undefined) { + processedProps.accessibilityLabel = ariaLabel; + } + + if (ariaLive !== undefined) { + processedProps.accessibilityLiveRegion = + ariaLive === 'off' ? 'none' : ariaLive; + } + + if (ariaHidden !== undefined) { + processedProps.accessibilityElementsHidden = ariaHidden; + if (ariaHidden === true) { + processedProps.importantForAccessibility = 'no-hide-descendants'; + } + } + + if (id !== undefined) { + processedProps.nativeID = id; + } + + if (tabIndex !== undefined) { + processedProps.focusable = !tabIndex; + } + + if ( + accessibilityState != null || + ariaBusy != null || + ariaChecked != null || + ariaDisabled != null || + ariaExpanded != null || + ariaSelected != null + ) { + processedProps.accessibilityState = { + busy: ariaBusy ?? accessibilityState?.busy, + checked: ariaChecked ?? accessibilityState?.checked, + disabled: ariaDisabled ?? accessibilityState?.disabled, + expanded: ariaExpanded ?? accessibilityState?.expanded, + selected: ariaSelected ?? accessibilityState?.selected, + }; + } + + if ( + accessibilityValue != null || + ariaValueMax != null || + ariaValueMin != null || + ariaValueNow != null || + ariaValueText != null + ) { + processedProps.accessibilityValue = { + max: ariaValueMax ?? accessibilityValue?.max, + min: ariaValueMin ?? accessibilityValue?.min, + now: ariaValueNow ?? accessibilityValue?.now, + text: ariaValueText ?? accessibilityValue?.text, + }; + } + + const actualView = + ref == null ? ( + + ) : ( + + ); +======= const View: component( ref?: React.RefSetter>, ...props: ViewProps @@ -210,6 +313,7 @@ const View: component( }); }; // Windows] +>>>>>>> Override return ( // [Windows @@ -279,8 +383,14 @@ const View: component( // Windows] ); +<<<<<<< Upstream + } + return actualView; +} +======= }, ); +>>>>>>> Override View.displayName = 'View'; diff --git a/packages/@office-iss/react-native-win32/src-win/Libraries/Pressability/Pressability.win32.js b/packages/@office-iss/react-native-win32/src-win/Libraries/Pressability/Pressability.win32.js index 395cd18d6fb..12768b498b1 100644 --- a/packages/@office-iss/react-native-win32/src-win/Libraries/Pressability/Pressability.win32.js +++ b/packages/@office-iss/react-native-win32/src-win/Libraries/Pressability/Pressability.win32.js @@ -17,8 +17,8 @@ import type { MouseEvent, } from '../Types/CoreEventTypes'; +import * as ReactNativeFeatureFlags from '../../src/private/featureflags/ReactNativeFeatureFlags'; import SoundManager from '../Components/Sound/SoundManager'; -import ReactNativeFeatureFlags from '../ReactNative/ReactNativeFeatureFlags'; import UIManager from '../ReactNative/UIManager'; import {type RectOrSize, normalizeRect} from '../StyleSheet/Rect'; import {type PointerEvent} from '../Types/CoreEventTypes'; diff --git a/packages/@office-iss/react-native-win32/src-win/Libraries/Utilities/useMergeRefs.js b/packages/@office-iss/react-native-win32/src-win/Libraries/Utilities/useMergeRefs.js index 3c7439a6036..5e6f2957878 100644 --- a/packages/@office-iss/react-native-win32/src-win/Libraries/Utilities/useMergeRefs.js +++ b/packages/@office-iss/react-native-win32/src-win/Libraries/Utilities/useMergeRefs.js @@ -31,7 +31,7 @@ export default function useMergeRefs( return undefined; } else { if (typeof ref === 'function') { - // $FlowIssue[incompatible-type] - Flow does not understand ref cleanup. + // $FlowFixMe[incompatible-type] - Flow does not understand ref cleanup. const cleanup: void | (() => void) = ref(current); return typeof cleanup === 'function' ? cleanup diff --git a/packages/@office-iss/react-native-win32/src-win/index.win32.js b/packages/@office-iss/react-native-win32/src-win/index.win32.js index c2fa64e43ee..020a4e3b7ba 100644 --- a/packages/@office-iss/react-native-win32/src-win/index.win32.js +++ b/packages/@office-iss/react-native-win32/src-win/index.win32.js @@ -173,14 +173,14 @@ module.exports = { /** * @deprecated SafeAreaView has been deprecated and will be removed in a future release. * Please use 'react-native-safe-area-context' instead. - * See https://github.com/th3rdwave/react-native-safe-area-context + * See https://github.com/AppAndFlow/react-native-safe-area-context */ get SafeAreaView(): SafeAreaView { warnOnce( 'safe-area-view-deprecated', 'SafeAreaView has been deprecated and will be removed in a future release. ' + "Please use 'react-native-safe-area-context' instead. " + - 'See https://github.com/th3rdwave/react-native-safe-area-context', + 'See https://github.com/AppAndFlow/react-native-safe-area-context', ); return require('./Libraries/Components/SafeAreaView/SafeAreaView').default; }, @@ -377,7 +377,14 @@ module.exports = { ) => HostComponent { return require('./Libraries/ReactNative/requireNativeComponent').default; }, +<<<<<<< Upstream + get ReactNativeVersion() { + return require('./Libraries/Core/ReactNativeVersion').default; + }, + get RootTagContext() { +======= get RootTagContext(): RootTagContext { +>>>>>>> Override return require('./Libraries/ReactNative/RootTag').RootTagContext; }, get Settings(): Settings { diff --git a/packages/@office-iss/react-native-win32/src-win/src/private/animated/NativeAnimatedHelper.win32.js b/packages/@office-iss/react-native-win32/src-win/src/private/animated/NativeAnimatedHelper.win32.js index ba3a213b948..0b03dd4ab38 100644 --- a/packages/@office-iss/react-native-win32/src-win/src/private/animated/NativeAnimatedHelper.win32.js +++ b/packages/@office-iss/react-native-win32/src-win/src/private/animated/NativeAnimatedHelper.win32.js @@ -58,7 +58,6 @@ let globalEventEmitterGetValueListener: ?EventSubscription = null; let globalEventEmitterAnimationFinishedListener: ?EventSubscription = null; const shouldSignalBatch: boolean = - ReactNativeFeatureFlags.animatedShouldSignalBatch() || ReactNativeFeatureFlags.cxxNativeAnimatedEnabled(); function createNativeOperations(): $NonMaybeType { @@ -141,6 +140,8 @@ const NativeOperations = createNativeOperations(); const API = { getValue: (isSingleOpBatching ? (tag, saveValueCallback) => { + /* $FlowFixMe[constant-condition] Error discovered during Constant + * Condition roll out. See https://fburl.com/workplace/1v97vimq. */ if (saveValueCallback) { eventListenerGetValueCallbacks[tag] = saveValueCallback; } @@ -268,6 +269,8 @@ const API = { startAnimatingNode: (isSingleOpBatching ? (animationId, nodeTag, config, endCallback) => { + /* $FlowFixMe[constant-condition] Error discovered during Constant + * Condition roll out. See https://fburl.com/workplace/1v97vimq. */ if (endCallback) { eventListenerAnimationFinishedCallbacks[animationId] = endCallback; } @@ -353,6 +356,8 @@ function ensureGlobalEventEmitterListeners() { params => { const {tag} = params; const callback = eventListenerGetValueCallbacks[tag]; + /* $FlowFixMe[constant-condition] Error discovered during Constant + * Condition roll out. See https://fburl.com/workplace/1v97vimq. */ if (!callback) { return; } @@ -369,6 +374,8 @@ function ensureGlobalEventEmitterListeners() { for (const animation of animations) { const {animationId} = animation; const callback = eventListenerAnimationFinishedCallbacks[animationId]; + /* $FlowFixMe[constant-condition] Error discovered during Constant + * Condition roll out. See https://fburl.com/workplace/1v97vimq. */ if (callback) { callback(animation); delete eventListenerAnimationFinishedCallbacks[animationId]; diff --git a/packages/@react-native-windows/tester/overrides.json b/packages/@react-native-windows/tester/overrides.json index 2deee1792ac..75603657784 100644 --- a/packages/@react-native-windows/tester/overrides.json +++ b/packages/@react-native-windows/tester/overrides.json @@ -5,13 +5,13 @@ "excludePatterns": [ "src/js/examples-win/**" ], - "baseVersion": "0.81.0-nightly-20250709-6892dde36", + "baseVersion": "0.82.0-nightly-20250806-5936f29d6", "overrides": [ { "type": "copy", "file": "js/examples/ContentURLAndroid/ContentURLAndroid.js", "baseFile": "packages/rn-tester/js/examples/ContentURLAndroid/ContentURLAndroid.js", - "baseHash": "5219751d36d3f2581e075d835424aa2f20c9809f", + "baseHash": "f85a06b7cdb2820871b524a0946f23738aa4eabe", "issue": 14844 }, { @@ -24,13 +24,13 @@ "type": "derived", "file": "src/js/examples-win/Button/ButtonExample.windows.js", "baseFile": "packages/rn-tester/js/examples/Button/ButtonExample.js", - "baseHash": "c44c83e48760fddc1129751debbf3a3ba1ec3fac" + "baseHash": "e50ed3ad268f9a4d34cbb720650c53fad379e0fe" }, { "type": "derived", "file": "src/js/examples-win/Switch/SwitchExample.windows.js", "baseFile": "packages/rn-tester/js/examples/Switch/SwitchExample.js", - "baseHash": "a5314bc9384402a96a8bb5190e5513a785925f90" + "baseHash": "cf59144fe876a5dc4acf703849a95e64fd9416f1" }, { "type": "patch", @@ -104,20 +104,20 @@ "type": "patch", "file": "src/js/examples/Pressable/PressableExample.windows.js", "baseFile": "packages/rn-tester/js/examples/Pressable/PressableExample.js", - "baseHash": "c6dd35fb59d439ee655844b2baa16f1711b70619", + "baseHash": "004cbe16f75b572bd4f4d8f19eab81bc31f710e1", "issue": 6240 }, { "type": "derived", "file": "src/js/examples/Text/TextExample.windows.js", "baseFile": "packages/rn-tester/js/examples/Text/TextExample.android.js", - "baseHash": "55b0983ac2f69f38284e5014d77533eb0e2e9ff6" + "baseHash": "87ac08c76abcb9f2f8d3df8990ed6e02d5d4efd9" }, { "type": "patch", "file": "src/js/examples/Text/TextSharedExamples.windows.js", "baseFile": "packages/rn-tester/js/examples/Text/TextSharedExamples.js", - "baseHash": "af0e1fb5bf6deebad7fc0de41242a27652bafdac", + "baseHash": "2f043ce1ae7f2f82c0a913247da51777dd53979b", "issue": 15125 }, { @@ -131,7 +131,7 @@ "type": "derived", "file": "src/js/examples/Touchable/TouchableExample.windows.js", "baseFile": "packages/rn-tester/js/examples/Touchable/TouchableExample.js", - "baseHash": "453404f69c1754b4a434bc128c745fbca0492433" + "baseHash": "03b4d8b4c97e998cf488bfc889dcdc047378c306" }, { "type": "patch", @@ -156,7 +156,7 @@ "type": "derived", "file": "src/js/utils/RNTesterList.windows.js", "baseFile": "packages/rn-tester/js/utils/RNTesterList.android.js", - "baseHash": "c89e65c8063b338c86ec9db173b05b96c589f69e" + "baseHash": "8cd219abae140e98f9578432954fc9ef62421308" } ] } \ No newline at end of file diff --git a/packages/@react-native-windows/tester/src/js/examples-win/Button/ButtonExample.windows.js b/packages/@react-native-windows/tester/src/js/examples-win/Button/ButtonExample.windows.js index 069de0e10db..7295fac1919 100644 --- a/packages/@react-native-windows/tester/src/js/examples-win/Button/ButtonExample.windows.js +++ b/packages/@react-native-windows/tester/src/js/examples-win/Button/ButtonExample.windows.js @@ -10,6 +10,8 @@ 'use strict'; +import type {RNTesterModuleExample} from '../../types/RNTesterTypes'; + const {RNTesterThemeContext} = require('../../components/RNTesterTheme'); const React = require('react'); const {Alert, Button, StyleSheet, View} = require('react-native'); @@ -231,6 +233,9 @@ exports.examples = [ ); }, }, +<<<<<<< Upstream +] as Array; +======= { title: 'Button with Accessible and Focusable Prop', render: function (): React.Node { @@ -275,6 +280,7 @@ exports.examples = [ }, }, ]; +>>>>>>> Override const styles = StyleSheet.create({ container: { diff --git a/packages/@react-native-windows/tester/src/js/examples-win/Switch/SwitchExample.windows.js b/packages/@react-native-windows/tester/src/js/examples-win/Switch/SwitchExample.windows.js index 9a8009c75c0..09a087bcdc4 100644 --- a/packages/@react-native-windows/tester/src/js/examples-win/Switch/SwitchExample.windows.js +++ b/packages/@react-native-windows/tester/src/js/examples-win/Switch/SwitchExample.windows.js @@ -10,6 +10,8 @@ 'use strict'; +import type {RNTesterModuleExample} from '../../types/RNTesterTypes'; + import RNTesterText from '../../components/RNTesterText'; import React from 'react'; import {Platform, Switch, View} from 'react-native'; @@ -123,7 +125,7 @@ class DisabledSwitchExample extends React.Component< } } -class ColorSwitchExample extends React.Component<{...}, $FlowFixMeState> { +class ColorSwitchExample extends React.Component<{...}, $FlowFixMe> { state: any | {colorFalseSwitchIsOn: boolean, colorTrueSwitchIsOn: boolean} = { colorTrueSwitchIsOn: true, colorFalseSwitchIsOn: false, @@ -158,7 +160,7 @@ class ColorSwitchExample extends React.Component<{...}, $FlowFixMeState> { } } -class EventSwitchExample extends React.Component<{...}, $FlowFixMeState> { +class EventSwitchExample extends React.Component<{...}, $FlowFixMe> { state: any | {eventSwitchIsOn: boolean, eventSwitchRegressionIsOn: boolean} = { eventSwitchIsOn: false, @@ -211,7 +213,7 @@ class EventSwitchExample extends React.Component<{...}, $FlowFixMeState> { } } -class IOSBackgroundColEx extends React.Component<{...}, $FlowFixMeState> { +class IOSBackgroundColEx extends React.Component<{...}, $FlowFixMe> { state: any | {iosBackgroundColor: string} = { iosBackgroundColor: '#ffa500', }; @@ -233,7 +235,7 @@ class IOSBackgroundColEx extends React.Component<{...}, $FlowFixMeState> { } } -class OnChangeExample extends React.Component<{...}, $FlowFixMeState> { +class OnChangeExample extends React.Component<{...}, $FlowFixMe> { render(): React.Node { return ( @@ -250,7 +252,7 @@ class OnChangeExample extends React.Component<{...}, $FlowFixMeState> { class ContainerBackgroundColorStyleExample extends React.Component< {...}, - $FlowFixMeState, + $FlowFixMe, > { render(): React.Node { return ( @@ -388,6 +390,9 @@ exports.examples = [ return ; }, }, +<<<<<<< Upstream +] as Array; +======= { title: 'Switches can have customized accessibility', render(): React.Element { @@ -395,10 +400,9 @@ exports.examples = [ }, }, ]; +>>>>>>> Override if (Platform.OS === 'ios') { - /* $FlowFixMe[incompatible-call] error found during natural inference roll- - * out. See https://fburl.com/workplace/tc9m3tcf */ exports.examples.push({ title: '[iOS Only] Custom background colors can be set', render(): React.MixedElement { diff --git a/packages/@react-native-windows/tester/src/js/examples/Pressable/PressableExample.windows.js b/packages/@react-native-windows/tester/src/js/examples/Pressable/PressableExample.windows.js index 2ac094c01fe..04ec5ea7ea7 100644 --- a/packages/@react-native-windows/tester/src/js/examples/Pressable/PressableExample.windows.js +++ b/packages/@react-native-windows/tester/src/js/examples/Pressable/PressableExample.windows.js @@ -10,6 +10,7 @@ import type {RNTesterModule} from '../../types/RNTesterTypes'; +import * as PressableExampleFbInternal from './PressableExampleFbInternal'; import * as React from 'react'; import { Alert, @@ -23,7 +24,6 @@ import { View, Switch, } from 'react-native'; -import ReactNativeFeatureFlags from 'react-native/Libraries/ReactNative/ReactNativeFeatureFlags'; const {useEffect, useRef, useState} = React; @@ -291,6 +291,8 @@ function PressableDisabled() { ); } +<<<<<<< Upstream +======= function PressableHoverStyle() { const [hovered, setHovered] = useState(false); return ( @@ -457,6 +459,7 @@ function PressWithKeyCapture() { ); } +>>>>>>> Override const styles = StyleSheet.create({ row: { justifyContent: 'center', @@ -752,6 +755,9 @@ const examples = [ return ; }, }, +<<<<<<< Upstream + ...PressableExampleFbInternal.examples, +======= { title: 'Focusability in Pressable', description: @@ -1107,17 +1113,9 @@ const examples = [ }, }, // Windows] +>>>>>>> Override ]; -if (ReactNativeFeatureFlags.shouldPressibilityUseW3CPointerEventsForHover()) { - examples.push({ - title: 'Change style based on Hover', - render(): React.Node { - return ; - }, - }); -} - module.exports = ({ title: 'Pressable', documentationURL: 'https://reactnative.dev/docs/pressable', diff --git a/packages/@react-native-windows/tester/src/js/examples/Text/TextExample.windows.js b/packages/@react-native-windows/tester/src/js/examples/Text/TextExample.windows.js index ccc71639e8b..ddb28ae8c18 100644 --- a/packages/@react-native-windows/tester/src/js/examples/Text/TextExample.windows.js +++ b/packages/@react-native-windows/tester/src/js/examples/Text/TextExample.windows.js @@ -39,7 +39,7 @@ class Entity extends React.Component<{children: React.Node}> { ); } } -class AttributeToggler extends React.Component<{...}, $FlowFixMeState> { +class AttributeToggler extends React.Component<{...}, $FlowFixMe> { state: {fontSize: number, fontWeight: 'bold' | 'normal'} = { fontWeight: 'bold', fontSize: 15, @@ -1921,6 +1921,20 @@ const examples = [ ); }, }, + { + title: 'Disabled', + name: 'disabled', + render: function (): React.Node { + return ( + + + This text has its corresponding text view in the disabled state for + testing purposes. + + + ); + }, + }, ...TextSharedExamples, { title: 'Customized Accessibility', diff --git a/packages/@react-native-windows/tester/src/js/examples/Text/TextSharedExamples.windows.js b/packages/@react-native-windows/tester/src/js/examples/Text/TextSharedExamples.windows.js index fbc10d31a07..f55c7f2b7b9 100644 --- a/packages/@react-native-windows/tester/src/js/examples/Text/TextSharedExamples.windows.js +++ b/packages/@react-native-windows/tester/src/js/examples/Text/TextSharedExamples.windows.js @@ -110,13 +110,114 @@ function NumberOfLinesTextLayoutExample(): React.Node { ); } +<<<<<<< Upstream +component RtlInlineViewExample( + label: string, + testID: string, + children: React.Node, +) { + return ( + + + {label} + + {children} + + ); +} + +component RtlAndInlineViewsExample() { + return ( + + + + مَٰنِ ٱلرَّحِيمِ + + + + + + + Hello + {' '} + World! + + + + + + + مَٰنِ ٱلرَّحِيمِ + + + + + + مَٰنِ ٱلرَّحِيمِ + + + + + + + مَٰنِ ٱلرَّحِيمِ + Hello + + + + + + + Hello + + مَٰنِ ٱلرَّحِيمِ + + + + + ); +} + +export default [ +======= const examples = [ +>>>>>>> Override { title: 'Empty Text', name: 'emptyText', render: EmptyTextExample, }, { +<<<<<<< Upstream + title: 'TextInlineViewsExample', + name: 'inlineViews', + description: + 'Shows how inline views are rendered when text is subject to alignment.', + expect: 'The red box should align correctly with the rest of the text.', + render: TextInlineViewsExample, + }, + { + title: 'RTL and Inline Views', + name: 'rtlInlineViews', + description: 'RTL Script and Layout Direction, Combined with Inline Views', + scrollable: true, + render: RtlAndInlineViewsExample, + }, + { +======= +>>>>>>> Override title: 'numberOfLines with onTextLayout', name: 'numberOfLinesLayout', description: diff --git a/packages/@react-native-windows/tester/src/js/examples/Touchable/TouchableExample.windows.js b/packages/@react-native-windows/tester/src/js/examples/Touchable/TouchableExample.windows.js index 057e7b208cd..07a63f46f40 100644 --- a/packages/@react-native-windows/tester/src/js/examples/Touchable/TouchableExample.windows.js +++ b/packages/@react-native-windows/tester/src/js/examples/Touchable/TouchableExample.windows.js @@ -28,7 +28,7 @@ import { const forceTouchAvailable = (Platform.OS === 'ios' && Platform.constants.forceTouchAvailable) || false; -class TouchableHighlightBox extends React.Component<{...}, $FlowFixMeState> { +class TouchableHighlightBox extends React.Component<{...}, $FlowFixMe> { state: any | {timesPressed: number} = { timesPressed: 0, }; @@ -79,10 +79,7 @@ class TouchableHighlightBox extends React.Component<{...}, $FlowFixMeState> { } } -class TouchableWithoutFeedbackBox extends React.Component< - {...}, - $FlowFixMeState, -> { +class TouchableWithoutFeedbackBox extends React.Component<{...}, $FlowFixMe> { state: any | {timesPressed: number} = { timesPressed: 0, }; @@ -122,7 +119,7 @@ class TouchableWithoutFeedbackBox extends React.Component< } } -class TextOnPressBox extends React.Component<{...}, $FlowFixMeState> { +class TextOnPressBox extends React.Component<{...}, $FlowFixMe> { state: any | {timesPressed: number} = { timesPressed: 0, }; @@ -157,7 +154,7 @@ class TextOnPressBox extends React.Component<{...}, $FlowFixMeState> { } } -class TouchableFeedbackEvents extends React.Component<{...}, $FlowFixMeState> { +class TouchableFeedbackEvents extends React.Component<{...}, $FlowFixMe> { state: any | {eventLog: Array} = { eventLog: [], }; @@ -199,7 +196,7 @@ class TouchableFeedbackEvents extends React.Component<{...}, $FlowFixMeState> { }; } -class TouchableDelayEvents extends React.Component<{...}, $FlowFixMeState> { +class TouchableDelayEvents extends React.Component<{...}, $FlowFixMe> { state: any | {eventLog: Array} = { eventLog: [], }; @@ -240,7 +237,7 @@ class TouchableDelayEvents extends React.Component<{...}, $FlowFixMeState> { }; } -class ForceTouchExample extends React.Component<{...}, $FlowFixMeState> { +class ForceTouchExample extends React.Component<{...}, $FlowFixMe> { state: any | {force: number} = { force: 0, }; @@ -274,7 +271,7 @@ class ForceTouchExample extends React.Component<{...}, $FlowFixMeState> { } } -class TouchableHitSlop extends React.Component<{...}, $FlowFixMeState> { +class TouchableHitSlop extends React.Component<{...}, $FlowFixMe> { state: any | {timesPressed: number} = { timesPressed: 0, }; diff --git a/packages/@react-native-windows/tester/src/js/utils/RNTesterList.windows.js b/packages/@react-native-windows/tester/src/js/utils/RNTesterList.windows.js index 4fb02a1a99b..ff13116b4ea 100644 --- a/packages/@react-native-windows/tester/src/js/utils/RNTesterList.windows.js +++ b/packages/@react-native-windows/tester/src/js/utils/RNTesterList.windows.js @@ -13,7 +13,6 @@ import type {RNTesterModule, RNTesterModuleInfo} from '../types/RNTesterTypes'; import * as RNTesterListFbInternal from './RNTesterListFbInternal'; -import ReactNativeFeatureFlags from 'react-native/Libraries/ReactNative/ReactNativeFeatureFlags'; const Components: Array = [ /*{ @@ -214,12 +213,15 @@ const Components: Array = [ category: 'Basic', module: require('../examples/Performance/PerformanceComparisonExample'), }, +<<<<<<< Upstream +======= /* { key: 'OSSLibraryExample', module: require('../examples/OSSLibraryExample/OSSLibraryExample'), }, */ +>>>>>>> Override ...RNTesterListFbInternal.Components, ]; @@ -467,14 +469,6 @@ const APIs: Array = ([ ...RNTesterListFbInternal.APIs, ]: Array).filter(Boolean); -if (ReactNativeFeatureFlags.shouldEmitW3CPointerEvents()) { - APIs.push({ - key: 'W3C PointerEvents', - category: 'Experimental', - module: require('../examples/Experimental/W3CPointerEventsExample').default, - }); -} - const Playgrounds: Array = [ { key: 'PlaygroundExample', diff --git a/packages/@react-native/monorepo/overrides.json b/packages/@react-native/monorepo/overrides.json index 0efe6b7508e..bbaf3c65c97 100644 --- a/packages/@react-native/monorepo/overrides.json +++ b/packages/@react-native/monorepo/overrides.json @@ -5,8 +5,7 @@ "type": "patch", "file": "package.json", "baseFile": "package.json", - "baseVersion": "0.81.0-nightly-20250709-6892dde36", - "baseHash": "47d95d17d32c83bc795c3f50fa1ce7a393271b75" + "baseHash": "f5ca24e4c03e6f03864b98f1a65ed8f0ab433102" } ] } \ No newline at end of file diff --git a/packages/@react-native/monorepo/package.json b/packages/@react-native/monorepo/package.json index d20c7e8cabc..2617d2533ad 100644 --- a/packages/@react-native/monorepo/package.json +++ b/packages/@react-native/monorepo/package.json @@ -13,9 +13,19 @@ "flow": "flow", "format-check": "prettier --list-different \"./**/*.{js,md,yml,ts,tsx}\"", "format": "npm run prettier && npm run clang-format", +<<<<<<< Upstream + "featureflags": "yarn --cwd packages/react-native featureflags", + "js-api-diff": "node ./scripts/js-api/diff-api-snapshot", + "lint-ci": "./.github/workflow-scripts/analyze_code.sh && yarn shellcheck", + "lint-kotlin-check": "./gradlew ktfmtCheck", + "lint-kotlin": "./gradlew ktfmtFormat", + "lint-markdown": "markdownlint-cli2 2>&1", + "lint": "eslint --max-warnings 0 .", +======= "featureflags": "cd packages/react-native && yarn featureflags", "lint-ci": "./scripts/circleci/analyze_code.sh && yarn shellcheck", "lint-java": "node ./scripts/lint-java.js", +>>>>>>> Override "prettier": "prettier --write \"./**/*.{js,md,yml,ts,tsx}\"", "print-packages": "node ./scripts/monorepo/print", "shellcheck": "./scripts/circleci/analyze_scripts.sh", @@ -23,8 +33,8 @@ "set-version": "node ./scripts/releases/set-version", "test-android": "./gradlew :packages:react-native:ReactAndroid:test", "test-ci": "jest --maxWorkers=2 --ci --reporters=\"default\" --reporters=\"jest-junit\"", - "test-e2e-local-clean": "node ./scripts/release-testing/test-e2e-local-clean.js", - "test-e2e-local": "node ./scripts/release-testing/test-e2e-local.js", + "test-release-local-clean": "node ./scripts/release-testing/test-release-local-clean.js", + "test-release-local": "node ./scripts/release-testing/test-release-local.js", "test-ios": "./scripts/objc-test.sh test", "test-typescript": "tsc -p packages/react-native/types/tsconfig.json", "test-generated-typescript": "tsc -p packages/react-native/types_generated/tsconfig.test.json", @@ -47,14 +57,23 @@ "@babel/preset-env": "^7.25.3", "@babel/preset-flow": "^7.24.7", "@jest/create-cache-key-function": "^29.7.0", +<<<<<<< Upstream + "@microsoft/api-extractor": "^7.52.2", + "@react-native/metro-babel-transformer": "0.82.0-main", + "@react-native/metro-config": "0.82.0-main", + "@tsconfig/node22": "22.0.2", + "@types/react": "^19.1.0", + "@typescript-eslint/parser": "^8.36.0", +======= "@react-native/metro-babel-transformer": "0.81.0-nightly-20250709-6892dde36", "@react-native/metro-config": "0.81.0-nightly-20250709-6892dde36", "@tsconfig/node18": "1.0.1", "@types/react": "^19.0.0", "@typescript-eslint/parser": "^7.1.1", +>>>>>>> Override "ansi-styles": "^4.2.1", "babel-plugin-minify-dead-code-elimination": "^0.5.2", - "babel-plugin-syntax-hermes-parser": "0.29.1", + "babel-plugin-syntax-hermes-parser": "0.30.0", "babel-plugin-transform-define": "^2.1.4", "babel-plugin-transform-flow-enums": "^0.0.2", "clang-format": "^1.8.0", @@ -72,11 +91,20 @@ "eslint-plugin-react-native": "^4.0.0", "eslint-plugin-redundant-undefined": "^0.4.0", "eslint-plugin-relay": "^1.8.3", +<<<<<<< Upstream + "flow-api-translator": "0.30.0", + "flow-bin": "^0.278.0", + "glob": "^7.1.1", + "hermes-eslint": "0.30.0", + "hermes-transform": "0.30.0", + "ini": "^5.0.0", +======= "flow-api-translator": "0.29.1", "flow-bin": "^0.274.2", "glob": "^7.1.1", "hermes-eslint": "0.29.1", "hermes-transform": "0.29.1", +>>>>>>> Override "inquirer": "^7.1.0", "jest": "^29.7.0", "jest-config": "^29.7.0", @@ -85,16 +113,22 @@ "jest-snapshot": "^29.7.0", "markdownlint-cli2": "^0.17.2", "markdownlint-rule-relative-links": "^3.0.0", +<<<<<<< Upstream + "memfs": "^4.7.7", + "metro-babel-register": "^0.83.1", + "metro-transform-plugins": "^0.83.1", +======= "metro-babel-register": "^0.82.4", "metro-memory-fs": "^0.82.4", "metro-transform-plugins": "^0.82.4", +>>>>>>> Override "micromatch": "^4.0.4", "node-fetch": "^2.2.0", "nullthrows": "^1.1.1", - "prettier": "2.8.8", - "prettier-plugin-hermes-parser": "0.29.1", - "react": "19.1.0", - "react-test-renderer": "19.1.0", + "prettier": "3.6.2", + "prettier-plugin-hermes-parser": "0.31.1", + "react": "19.1.1", + "react-test-renderer": "19.1.1", "rimraf": "^3.0.2", "shelljs": "^0.8.5", "signedsource": "^1.0.0", @@ -106,6 +140,8 @@ }, "resolutions": { "eslint-plugin-react-hooks": "6.1.0-canary-12bc60f5-20250613", - "react-is": "19.1.0" + "react-is": "19.1.1", + "on-headers": "1.1.0", + "compression": "1.8.1" } } diff --git a/packages/@react-native/tester/js/examples/TextInput/TextInputExample.ios.js b/packages/@react-native/tester/js/examples/TextInput/TextInputExample.ios.js index 62f9607de9e..1d628ade1f9 100644 --- a/packages/@react-native/tester/js/examples/TextInput/TextInputExample.ios.js +++ b/packages/@react-native/tester/js/examples/TextInput/TextInputExample.ios.js @@ -32,7 +32,7 @@ import { View, } from 'react-native'; -class WithLabel extends React.Component<$FlowFixMeProps> { +class WithLabel extends React.Component<$FlowFixMe> { render(): React.Node { return ( @@ -147,7 +147,7 @@ class TextInputAccessoryViewDefaultDoneButtonExample extends React.Component< } } -class RewriteExampleKana extends React.Component<$FlowFixMeProps, any> { +class RewriteExampleKana extends React.Component<$FlowFixMe, any> { constructor(props: any | void) { super(props); this.state = {text: ''}; @@ -167,7 +167,7 @@ class RewriteExampleKana extends React.Component<$FlowFixMeProps, any> { } } -class SecureEntryExample extends React.Component<$FlowFixMeProps, any> { +class SecureEntryExample extends React.Component<$FlowFixMe, any> { constructor(props: any | void) { super(props); this.state = { diff --git a/packages/@react-native/tester/js/examples/TextInput/TextInputKeyProp.js b/packages/@react-native/tester/js/examples/TextInput/TextInputKeyProp.js index 5d2330c3b57..3e25d843dbd 100644 --- a/packages/@react-native/tester/js/examples/TextInput/TextInputKeyProp.js +++ b/packages/@react-native/tester/js/examples/TextInput/TextInputKeyProp.js @@ -10,6 +10,8 @@ 'use strict'; +import type {RNTesterModuleExample} from '../../types/RNTesterTypes'; + import React, {useEffect, useState} from 'react'; import {TextInput, View} from 'react-native'; @@ -48,4 +50,4 @@ exports.examples = [ return ; }, }, -]; +] as Array; diff --git a/packages/@react-native/tester/js/examples/TextInput/TextInputSharedExamples.js b/packages/@react-native/tester/js/examples/TextInput/TextInputSharedExamples.js index 288b90c1432..14f6c37a9f4 100644 --- a/packages/@react-native/tester/js/examples/TextInput/TextInputSharedExamples.js +++ b/packages/@react-native/tester/js/examples/TextInput/TextInputSharedExamples.js @@ -76,7 +76,7 @@ const styles = StyleSheet.create({ }); class AutoFocusWithSelectOnFocusTextExample extends React.Component< - $FlowFixMeProps, + $FlowFixMe, any, > { constructor(props: any | void) { @@ -108,7 +108,7 @@ class AutoFocusWithSelectOnFocusTextExample extends React.Component< } } -class WithLabel extends React.Component<$FlowFixMeProps> { +class WithLabel extends React.Component<$FlowFixMe> { render(): React.Node { return ( @@ -119,7 +119,7 @@ class WithLabel extends React.Component<$FlowFixMeProps> { } } -class RewriteExample extends React.Component<$FlowFixMeProps, any> { +class RewriteExample extends React.Component<$FlowFixMe, any> { constructor(props: any | void) { super(props); this.state = {text: ''}; @@ -149,10 +149,7 @@ class RewriteExample extends React.Component<$FlowFixMeProps, any> { } } -class RewriteExampleInvalidCharacters extends React.Component< - $FlowFixMeProps, - any, -> { +class RewriteExampleInvalidCharacters extends React.Component<$FlowFixMe, any> { constructor(props: any | void) { super(props); this.state = {text: ''}; @@ -175,7 +172,7 @@ class RewriteExampleInvalidCharacters extends React.Component< } class RewriteInvalidCharactersAndClearExample extends React.Component< - $FlowFixMeProps, + $FlowFixMe, any, > { inputRef: ?React.ElementRef = null; @@ -359,7 +356,7 @@ class SubmitBehaviorExample extends React.Component<{...}> { } } -class TextEventsExample extends React.Component<{...}, $FlowFixMeState> { +class TextEventsExample extends React.Component<{...}, $FlowFixMe> { state: | any | { @@ -427,10 +424,7 @@ class TextEventsExample extends React.Component<{...}, $FlowFixMeState> { } } -class TokenizedTextExample extends React.Component< - $FlowFixMeProps, - $FlowFixMeState, -> { +class TokenizedTextExample extends React.Component<$FlowFixMe, $FlowFixMe> { constructor(props: any | void) { super(props); this.state = {text: 'Hello #World'}; @@ -500,7 +494,7 @@ type SelectionExampleState = { }; class SelectionExample extends React.Component< - $FlowFixMeProps, + $FlowFixMe, SelectionExampleState, > { _textInput: React.ElementRef | null = null; diff --git a/packages/@react-native/tester/js/utils/RNTesterList.android.js b/packages/@react-native/tester/js/utils/RNTesterList.android.js index 52353418c80..33fe6d653e7 100644 --- a/packages/@react-native/tester/js/utils/RNTesterList.android.js +++ b/packages/@react-native/tester/js/utils/RNTesterList.android.js @@ -13,7 +13,6 @@ import type {RNTesterModule, RNTesterModuleInfo} from '../types/RNTesterTypes'; import * as RNTesterListFbInternal from './RNTesterListFbInternal'; -import ReactNativeFeatureFlags from 'react-native/Libraries/ReactNative/ReactNativeFeatureFlags'; const Components: Array = [ { @@ -146,12 +145,15 @@ const Components: Array = [ category: 'Basic', module: require('../examples/Performance/PerformanceComparisonExample'), }, +<<<<<<< Upstream +======= /* { key: 'OSSLibraryExample', module: require('../examples/OSSLibraryExample/OSSLibraryExample'), }, */ +>>>>>>> Override ...RNTesterListFbInternal.Components, ]; @@ -373,14 +375,6 @@ const APIs: Array = ([ ...RNTesterListFbInternal.APIs, ]: Array).filter(Boolean); -if (ReactNativeFeatureFlags.shouldEmitW3CPointerEvents()) { - APIs.push({ - key: 'W3C PointerEvents', - category: 'Experimental', - module: require('../examples/Experimental/W3CPointerEventsExample').default, - }); -} - const Playgrounds: Array = [ { key: 'PlaygroundExample', diff --git a/packages/@react-native/tester/js/utils/RNTesterList.ios.js b/packages/@react-native/tester/js/utils/RNTesterList.ios.js index 9cea3dadee3..7128b669f4e 100644 --- a/packages/@react-native/tester/js/utils/RNTesterList.ios.js +++ b/packages/@react-native/tester/js/utils/RNTesterList.ios.js @@ -11,7 +11,6 @@ import type {RNTesterModule, RNTesterModuleInfo} from '../types/RNTesterTypes'; import * as RNTesterListFbInternal from './RNTesterListFbInternal'; -import ReactNativeFeatureFlags from 'react-native/Libraries/ReactNative/ReactNativeFeatureFlags'; const Components: Array = [ { @@ -154,12 +153,15 @@ const Components: Array = [ category: 'Basic', module: require('../examples/Performance/PerformanceComparisonExample'), }, +<<<<<<< Upstream +======= /* { key: 'OSSLibraryExample', module: require('../examples/OSSLibraryExample/OSSLibraryExample'), }, */ +>>>>>>> Override ...RNTesterListFbInternal.Components, ]; @@ -347,14 +349,6 @@ const APIs: Array = ([ ...RNTesterListFbInternal.APIs, ]: Array).filter(Boolean); -if (ReactNativeFeatureFlags.shouldEmitW3CPointerEvents()) { - APIs.push({ - key: 'W3C PointerEvents', - category: 'Experimental', - module: require('../examples/Experimental/W3CPointerEventsExample').default, - }); -} - const Playgrounds: Array = [ { key: 'PlaygroundExample', diff --git a/packages/@react-native/tester/overrides.json b/packages/@react-native/tester/overrides.json index cd2706e635a..12ea3ca0f85 100644 --- a/packages/@react-native/tester/overrides.json +++ b/packages/@react-native/tester/overrides.json @@ -1,5 +1,5 @@ { - "baseVersion": "0.81.0-nightly-20250709-6892dde36", + "baseVersion": "0.82.0-nightly-20250806-5936f29d6", "overrides": [ { "type": "copy", @@ -12,21 +12,21 @@ "type": "copy", "directory": "js/components", "baseDirectory": "packages/rn-tester/js/components", - "baseHash": "d80fda0dc8694fec30a830c9505ce0d993d4243f", + "baseHash": "27b96c605c41f54f04786b4e31cd1e5d911486b0", "issue": 4054 }, { "type": "copy", "directory": "js/examples/Accessibility", "baseDirectory": "packages/rn-tester/js/examples/Accessibility", - "baseHash": "f3ebe7a63580cff1fcd1b69530221deae674624d", + "baseHash": "2a61ece7865d120ff19ea16b1167e854dea119f1", "issue": 4054 }, { "type": "copy", "directory": "js/examples/ActionSheetIOS", "baseDirectory": "packages/rn-tester/js/examples/ActionSheetIOS", - "baseHash": "5ea321e609eca938c5b2b6e6588ffec9dc9bc140", + "baseHash": "e6eb3978718f0e991b9ecfd4eb9b51d068329b6a", "issue": 4054 }, { @@ -54,14 +54,14 @@ "type": "copy", "directory": "js/examples/AnimatedGratuitousApp", "baseDirectory": "packages/rn-tester/js/examples/AnimatedGratuitousApp", - "baseHash": "919725c39b25ca35d8c9ae97f738efcac5d4619c", + "baseHash": "88f953154a7c68620ee227c1202eea0aa8f558f2", "issue": 4054 }, { "type": "copy", "directory": "js/examples/Appearance", "baseDirectory": "packages/rn-tester/js/examples/Appearance", - "baseHash": "a0ace4d095aed6fcadb33b1036a0dce2faa84935", + "baseHash": "e50957281c2d2c69ac0cf9b7fbba52bfcb4b2acc", "issue": 4054 }, { @@ -82,49 +82,49 @@ "type": "copy", "directory": "js/examples/BoxShadow", "baseDirectory": "packages/rn-tester/js/examples/BoxShadow", - "baseHash": "25008c322d69227afc8ddca0d2583a736bbd5fcf", + "baseHash": "30d7c9a61b97ba9e2fa50ab1fbd2e95bc69bf578", "issue": 4054 }, { "type": "copy", "directory": "js/examples/Button", "baseDirectory": "packages/rn-tester/js/examples/Button", - "baseHash": "b55e8f45a52219192b60c93a74327fea5f12f248", + "baseHash": "9128b96da49cf2265707e7a45885fec6f21b0531", "issue": 4054 }, { "type": "copy", "directory": "js/examples/ContentURLAndroid", "baseDirectory": "packages/rn-tester/js/examples/ContentURLAndroid", - "baseHash": "84432fe42f13d88cf5a683f6352c5448bdab5ff8", + "baseHash": "b68ab3fbff1dd27263c6f79cac4b100387031ba6", "issue": 14844 }, { "type": "copy", "directory": "js/examples/Crash", "baseDirectory": "packages/rn-tester/js/examples/Crash", - "baseHash": "8f253227dc9153838c06e3acefedb19ad71afcf4", + "baseHash": "1885a4fb2fc6fcf385483558bf49160bba22f3da", "issue": 4054 }, { "type": "copy", "directory": "js/examples/Cursor", "baseDirectory": "packages/rn-tester/js/examples/Cursor/", - "baseHash": "4fe0a044c8d36a03f8813c2c979996969cbb8292", + "baseHash": "f3fe5f238ed6a197c211eed37353994d0e4e652d", "issue": 4054 }, { "type": "copy", "directory": "js/examples/DevSettings", "baseDirectory": "packages/rn-tester/js/examples/DevSettings", - "baseHash": "1dfcc11095ad5623f55c70a9583423fef063d020", + "baseHash": "72e5665981d0a3592148eeddd6ea9c4dbe9a2c15", "issue": 4054 }, { "type": "copy", "directory": "js/examples/Dimensions", "baseDirectory": "packages/rn-tester/js/examples/Dimensions", - "baseHash": "17355cfdfc1226357f64195b897685681b3d0d06", + "baseHash": "dd72316571c8d3cb1d099b193570b929dbe3aee8", "issue": 4054 }, { @@ -138,7 +138,7 @@ "type": "copy", "directory": "js/examples/DrawerLayoutAndroid", "baseDirectory": "packages/rn-tester/js/examples/DrawerLayoutAndroid", - "baseHash": "e39c4ae1b1ab170ff0aa9bbdd6dc10ee9572e581", + "baseHash": "631085563b9f193a0b8e55c4b3125cccab3ac315", "issue": 4054 }, { @@ -173,21 +173,21 @@ "type": "copy", "directory": "js/examples/InputAccessoryView", "baseDirectory": "packages/rn-tester/js/examples/InputAccessoryView", - "baseHash": "0e08c62585bf84585a5c5e4750ac60810cfc4abd", + "baseHash": "6024360ecd527038c8f21b3fdf0867b4d9e71d27", "issue": 4054 }, { "type": "copy", "directory": "js/examples/InvalidProps", "baseDirectory": "packages/rn-tester/js/examples/InvalidProps", - "baseHash": "156aa86db7cd0d18359a36639e33f7c1cd2b8a6a", + "baseHash": "848cebed1d4f9f51217033fea4297ea9d0775f17", "issue": 4054 }, { "type": "copy", "directory": "js/examples/JSResponderHandlerExample", "baseDirectory": "packages/rn-tester/js/examples/JSResponderHandlerExample", - "baseHash": "56167eac4a956eda6aaefa320ace8aa232bebe7b", + "baseHash": "94091a151a359db592357af0c7a9c3eb217df518", "issue": 4054 }, { @@ -201,28 +201,28 @@ "type": "copy", "directory": "js/examples/KeyboardAvoidingView", "baseDirectory": "packages/rn-tester/js/examples/KeyboardAvoidingView", - "baseHash": "a62950d3245e6a55daada929fc54faf862c6c449", + "baseHash": "fe61b4f3bedda50f12e876afb55ebceba6127a8b", "issue": 4054 }, { "type": "copy", "directory": "js/examples/Layout", "baseDirectory": "packages/rn-tester/js/examples/Layout", - "baseHash": "2c057a259bc8ab4468b210ba0a1c93f14e592afc", + "baseHash": "36ed6980fcca678f858b65dd8a723dcb3bfcf5cc", "issue": 4054 }, { "type": "copy", "directory": "js/examples/LinearGradient", "baseDirectory": "packages/rn-tester/js/examples/LinearGradient/", - "baseHash": "601ee443dd033a5622d000de87cea51aa4e9119d", + "baseHash": "1f9a8cb4d023214e768ba729b7c97870de8f61ab", "issue": 4054 }, { "type": "copy", "directory": "js/examples/Linking", "baseDirectory": "packages/rn-tester/js/examples/Linking", - "baseHash": "1a9a2785318a4b9e7bb03536776831690883578e", + "baseHash": "6645d446796b252ff1bcd18453791d8529a09bb3", "issue": 4054 }, { @@ -243,34 +243,35 @@ "type": "copy", "directory": "js/examples/NativeAnimation", "baseDirectory": "packages/rn-tester/js/examples/NativeAnimation", - "baseHash": "e6e46a8314710ca508b1235eaaf15454e112100f", + "baseHash": "119f131f626c4baa10d4d28bc2ac4f0686d602ee", "issue": 4054 }, { "type": "copy", "directory": "js/examples/NewAppScreen", "baseDirectory": "packages/rn-tester/js/examples/NewAppScreen", - "baseHash": "69596f54e45e0b9ed384052e7e0d96ed44dc0c6e", + "baseHash": "b3ebeecade38c72789c6d3ad51a86e0e9fc13d1a", "issue": 0 }, { "type": "copy", "directory": "js/examples/NewArchitecture", "baseDirectory": "packages/rn-tester/js/examples/NewArchitecture", - "baseHash": "f2f212445c5a1310b393a64634014a50c38dd03c", + "baseHash": "dff238dab067fed2d3a07f6f3aaac5a698212aa0", "issue": 4054 }, { "type": "copy", "directory": "js/examples/OrientationChange", "baseDirectory": "packages/rn-tester/js/examples/OrientationChange", - "baseHash": "58840892e1b928b2290bafad76efebbf0e7770cb", + "baseHash": "d0ecbb6e4bbbad8b41cfd3f9fecd738ba3571f4d", "issue": 4054 }, { "type": "copy", "directory": "js/examples/OSSLibraryExample", "baseDirectory": "packages/rn-tester/js/examples/OSSLibraryExample", + "baseVersion": "0.81.0-nightly-20250709-6892dde36", "baseHash": "5e81207c1955cdd2c2e3c307785d614f74ff858f", "issue": 4054 }, @@ -278,7 +279,7 @@ "type": "copy", "directory": "js/examples/PanResponder", "baseDirectory": "packages/rn-tester/js/examples/PanResponder", - "baseHash": "6859f5e7f35424e6ddc4aa9c39a76ecb946c7bb3", + "baseHash": "0dcad06c7958cd62119b4bc963947d8653b38ed5", "issue": 4054 }, { @@ -291,21 +292,21 @@ "type": "copy", "directory": "js/examples/PermissionsAndroid", "baseDirectory": "packages/rn-tester/js/examples/PermissionsAndroid", - "baseHash": "6f4d4d32f7cfa7d1c6b7d7f85aacc86a00fd51cf", + "baseHash": "e7525727686b5bf71634f85afe1bb538941aac77", "issue": 4054 }, { "type": "copy", "directory": "js/examples/PixelRatio", "baseDirectory": "packages/rn-tester/js/examples/PixelRatio", - "baseHash": "e724d72c0010fce144a936d606ff2f120ab9bf3e", + "baseHash": "23719718be8a111e40b8e3c2ef363772181c9efb", "issue": 4054 }, { "type": "copy", "directory": "js/examples/PlatformColor", "baseDirectory": "packages/rn-tester/js/examples/PlatformColor", - "baseHash": "1c2389a60e5b5e450a377d33212d6bf102424503", + "baseHash": "d8c828c7f2c41e99de2e8fe9bc89d5e0e8250bb0", "issue": 4054 }, { @@ -319,35 +320,35 @@ "type": "copy", "directory": "js/examples/PointerEvents", "baseDirectory": "packages/rn-tester/js/examples/PointerEvents", - "baseHash": "41cb4045529577e57964802fdb23c429e2bce46b", + "baseHash": "b494881c44a0922313a3d1737cb7bca96231273b", "issue": 4054 }, { "type": "copy", "directory": "js/examples/PopupMenuAndroid", "baseDirectory": "packages/rn-tester/js/examples/PopupMenuAndroid", - "baseHash": "0025a91c9757a0674f324c044ed3694f59741867", + "baseHash": "73ffd4dc81c8eb84fdf259c21e2a186824a7a2b9", "issue": 4054 }, { "type": "copy", "directory": "js/examples/Pressable", "baseDirectory": "packages/rn-tester/js/examples/Pressable", - "baseHash": "c5d2c7e009eaece6ca49b0687c9b855e82426546", + "baseHash": "9724f22987df334f272538451a6db47e8eb89e1a", "issue": 4054 }, { "type": "copy", "directory": "js/examples/RCTRootView", "baseDirectory": "packages/rn-tester/js/examples/RCTRootView", - "baseHash": "77a2dcd006f9548de27a0ff12d7b7fffd41ec74e", + "baseHash": "81cdac461245072989ad47bf38a232f20fdaf26d", "issue": 4054 }, { "type": "copy", "directory": "js/examples/RefreshControl", "baseDirectory": "packages/rn-tester/js/examples/RefreshControl", - "baseHash": "1de0f9e3b09919b5d3e6c19aaae9e03fe34621f3", + "baseHash": "41dc4318a31956bfdc38a677ffce4355af4c9ea9", "issue": 4054 }, { @@ -361,77 +362,77 @@ "type": "copy", "directory": "js/examples/RTL", "baseDirectory": "packages/rn-tester/js/examples/RTL", - "baseHash": "f71c89d778f6df90fd7fe08067749daea5893da5", + "baseHash": "5a7547ab97eed836f60f1b39620079041de23f25", "issue": 4054 }, { "type": "copy", "directory": "js/examples/SafeAreaView", "baseDirectory": "packages/rn-tester/js/examples/SafeAreaView", - "baseHash": "2a360fd4548a4056093e797a79a0751a5c47e7d8", + "baseHash": "61ccb78c5d021374a85c2da7f86aa9a466a90c3f", "issue": 4054 }, { "type": "copy", "directory": "js/examples/ScrollView", "baseDirectory": "packages/rn-tester/js/examples/ScrollView", - "baseHash": "3b2597b4f034b9db684367ba3d48bf3aef4893fb", + "baseHash": "324ee22c1a5d0ba705aed327c257386342674ad5", "issue": 4054 }, { "type": "copy", "directory": "js/examples/SectionList", "baseDirectory": "packages/rn-tester/js/examples/SectionList", - "baseHash": "8bc8ac6cea1513369d65328fb589a78f3f914a00", + "baseHash": "ec593dae67e359f97f56b73cb4ea825e3ab848e2", "issue": 4054 }, { "type": "copy", "directory": "js/examples/SetPropertiesExample", "baseDirectory": "packages/rn-tester/js/examples/SetPropertiesExample", - "baseHash": "6600716b175dc5efefac41ad6667191755a34965", + "baseHash": "4858771a546a200e4bab06959dc9729b5c70dbb9", "issue": 4054 }, { "type": "copy", "directory": "js/examples/Share", "baseDirectory": "packages/rn-tester/js/examples/Share", - "baseHash": "3b16ebdae95ba484745d10f5713f930c349aef4c", + "baseHash": "040ca0acbf3e8b82f25a82d77e30ee99721c2cca", "issue": 4054 }, { "type": "copy", "directory": "js/examples/Snapshot", "baseDirectory": "packages/rn-tester/js/examples/Snapshot", - "baseHash": "14825f13f10d6d0e49a1052879041136427735ca", + "baseHash": "45716296286376f048d145ef61f8c2d858308b4a", "issue": 4054 }, { "type": "copy", "directory": "js/examples/StatusBar", "baseDirectory": "packages/rn-tester/js/examples/StatusBar", - "baseHash": "f221f26adda37c9fa5b0049b231111a6f98bfc0d", + "baseHash": "0f9966b903371a024de277e6587fe8a86c96b006", "issue": 4054 }, { "type": "copy", "directory": "js/examples/SwipeableCardExample", "baseDirectory": "packages/rn-tester/js/examples/SwipeableCardExample", - "baseHash": "d38ac95f729475513331784eb1f557fa9a06f8b1", + "baseHash": "6d1fd140b0ba3e748e78cb34c2a30caeb19a63f3", "issue": 4054 }, { "type": "copy", "directory": "js/examples/Switch", "baseDirectory": "packages/rn-tester/js/examples/Switch", - "baseHash": "80f86685990261b19208331b623277a9fe6fa906", + "baseHash": "1b7682d93faa3a9e8b94be2dcee948fb9586d321", "issue": 4054 }, { "type": "copy", "directory": "js/examples/Text", "baseDirectory": "packages/rn-tester/js/examples/Text", - "baseHash": "8a3a60f413a0d2aa9deb6349ef42fad60488c111", + "baseHash": "a569a3f8074d7300060c5c5ed70f2fb6806f928c", "issue": 4054 }, { @@ -452,7 +453,7 @@ "type": "copy", "file": "js/examples/TextInput/TextInputExample.ios.js", "baseFile": "packages/rn-tester/js/examples/TextInput/TextInputExample.ios.js", - "baseHash": "3ee8cf92c26fd3b2bdf49cd45f91bd4039889176", + "baseHash": "e77130f8ffdd5661c4cb3814e10b3b3dc940d3d0", "issue": 14292 }, { @@ -466,56 +467,56 @@ "type": "copy", "file": "js/examples/TextInput/TextInputKeyProp.js", "baseFile": "packages/rn-tester/js/examples/TextInput/TextInputKeyProp.js", - "baseHash": "8ef6a993c1754a016afb1d4826b33b9bffd64c4f", + "baseHash": "27f94be6a2fa8acf7f47835220e638a7c5bea7de", "issue": 14292 }, { "type": "patch", "file": "js/examples/TextInput/TextInputSharedExamples.js", "baseFile": "packages/rn-tester/js/examples/TextInput/TextInputSharedExamples.js", - "baseHash": "46b59227ca8473ab25f558b2c27d5eab8c6009e4", + "baseHash": "9aa9bb1abe070483e9f2563e3354168121523ae0", "issue": 14291 }, { "type": "copy", "directory": "js/examples/Timer", "baseDirectory": "packages/rn-tester/js/examples/Timer", - "baseHash": "e34b237e56a1909d86a6f17162f3c11ece405d89", + "baseHash": "9f94fd225bd27a5fb093ad513bdb5677a85f3872", "issue": 4054 }, { "type": "copy", "directory": "js/examples/ToastAndroid", "baseDirectory": "packages/rn-tester/js/examples/ToastAndroid", - "baseHash": "82e349fa291f3187dbdac9b74eb15b85405fa064", + "baseHash": "f9be84cfa0da537f5e7963bde61ce206b9b2b63c", "issue": 4054 }, { "type": "copy", "directory": "js/examples/Touchable", "baseDirectory": "packages/rn-tester/js/examples/Touchable", - "baseHash": "52d0d4e3698c0d9a96bb07e75accddb4cb19271a", + "baseHash": "eba111cf46fca7fd70eacb629681a2284231e271", "issue": 4054 }, { "type": "copy", "directory": "js/examples/Transform", "baseDirectory": "packages/rn-tester/js/examples/Transform", - "baseHash": "e9341b7f41df3f22b843a9d74638d8e14c4d1be0", + "baseHash": "70a24883543aea6b2f6423628c9edb7c9ae473df", "issue": 4054 }, { "type": "copy", "directory": "js/examples/TransparentHitTest", "baseDirectory": "packages/rn-tester/js/examples/TransparentHitTest", - "baseHash": "3b28f506de014aae36bb4682a6d02d886b0ef382", + "baseHash": "237bdfa4a41b3c6fa7e9b1985d69bd16425b0aef", "issue": 4054 }, { "type": "copy", "directory": "js/examples/TurboModule", "baseDirectory": "packages/rn-tester/js/examples/TurboModule", - "baseHash": "cd1e1d008f6827d58a128b58cc258fd50c6a2b71", + "baseHash": "68d5c2200118cc6d6b60b50c884edc4ce0d6a5e2", "issue": 4054 }, { @@ -528,7 +529,7 @@ "type": "copy", "directory": "js/examples/Vibration", "baseDirectory": "packages/rn-tester/js/examples/Vibration", - "baseHash": "0cfa593f9c7fc6a80bca9f25930297cdaedc0ddf", + "baseHash": "e92a8f36178e17ed3ff691b8965a7cdb6346a544", "issue": 4054 }, { @@ -542,14 +543,14 @@ "type": "copy", "directory": "js/examples/WebSocket", "baseDirectory": "packages/rn-tester/js/examples/WebSocket", - "baseHash": "d7b4236514fc52773bd2db0f4a0cd92f9c33ecf2", + "baseHash": "c5e1e954c2205d3d25d04115382a43d1a292ecb4", "issue": 4054 }, { "type": "copy", "directory": "js/examples/XHR", "baseDirectory": "packages/rn-tester/js/examples/XHR", - "baseHash": "7e0371f96a68b509a7b2f948db55199a7e4bb341", + "baseHash": "51ff285f97ad22e79fe3e679a933b4949d92f62b", "issue": 4054 }, { @@ -591,14 +592,14 @@ "type": "patch", "file": "js/utils/RNTesterList.android.js", "baseFile": "packages/rn-tester/js/utils/RNTesterList.android.js", - "baseHash": "c89e65c8063b338c86ec9db173b05b96c589f69e", + "baseHash": "8cd219abae140e98f9578432954fc9ef62421308", "issue": 13228 }, { "type": "patch", "file": "js/utils/RNTesterList.ios.js", "baseFile": "packages/rn-tester/js/utils/RNTesterList.ios.js", - "baseHash": "f36a808a9ff9d17b37402193efa5bb580536370d", + "baseHash": "6872f4b3f0d2495a64c33fdd4328272d547f9108", "issue": 13228 }, { @@ -668,7 +669,7 @@ "type": "patch", "file": "package.json", "baseFile": "packages/rn-tester/package.json", - "baseHash": "e847b2b1a87e2db14460c3df73c17e5368ad9d7a", + "baseHash": "0938250f3686e00197ab2c82fc48306c3c46c93c", "issue": 13228 }, { diff --git a/packages/@react-native/tester/package.json b/packages/@react-native/tester/package.json index a68361f580f..1d87793cf3a 100644 --- a/packages/@react-native/tester/package.json +++ b/packages/@react-native/tester/package.json @@ -1,6 +1,10 @@ { "name": "@react-native/tester", +<<<<<<< Upstream + "version": "0.82.0-main", +======= "version": "0.80.0-main", +>>>>>>> Override "private": true, "description": "React Native tester app.", "license": "MIT", @@ -10,7 +14,11 @@ "directory": "packages/rn-tester" }, "engines": { +<<<<<<< Upstream + "node": ">= 20.19.4" +======= "node": ">=22" +>>>>>>> Override }, "scripts": { "start": "npx @react-native-community/cli start", @@ -26,14 +34,19 @@ "e2e-test-ios": "./scripts/maestro-test-ios.sh" }, "dependencies": { +<<<<<<< Upstream + "@react-native/new-app-screen": "0.82.0-main", + "@react-native/popup-menu-android": "0.82.0-main", +======= "@react-native/new-app-screen": "0.81.0-nightly-20250709-6892dde36", "@react-native/popup-menu-android": "0.81.0-nightly-20250709-6892dde36", +>>>>>>> Override "flow-enums-runtime": "^0.0.6", "invariant": "^2.2.4", "nullthrows": "^1.1.1" }, "peerDependencies": { - "react": "19.1.0", + "react": "19.1.1", "react-native": "*" }, "codegenConfig": { diff --git a/vnext/.flowconfig b/vnext/.flowconfig index 59e4b10cfaa..9ff4b9ec589 100644 --- a/vnext/.flowconfig +++ b/vnext/.flowconfig @@ -145,11 +145,7 @@ module.system.haste.module_ref_prefix=m# react.runtime=automatic -suppress_type=$FlowIssue suppress_type=$FlowFixMe -suppress_type=$FlowFixMeProps -suppress_type=$FlowFixMeState -suppress_type=$FlowFixMeEmpty ban_spread_key_props=true sharedmemory.hash_table_pow=21 @@ -175,4 +171,8 @@ untyped-import untyped-type-import [version] +<<<<<<< Upstream +^0.278.0 +======= ^0.274.2 +>>>>>>> Override diff --git a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/CxxNativeModule.cpp b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/CxxNativeModule.cpp index a6ce3c04c8e..a162e73a915 100644 --- a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/CxxNativeModule.cpp +++ b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/CxxNativeModule.cpp @@ -94,6 +94,7 @@ std::vector CxxNativeModule::getMethods() { lazyInit(); std::vector descs; + descs.reserve(methods_.size()); for (auto& method : methods_) { descs.emplace_back(method.name, method.getType()); } @@ -199,7 +200,7 @@ void CxxNativeModule::invoke( TraceSection s( "CxxMethodCallDispatch", "module", moduleName, "method", method.name); try { - method.func(std::move(params), first, second); + method.func(params, first, second); } catch (const facebook::xplat::JsArgumentException& ex) { throw; } catch (std::exception& e) { diff --git a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/NativeToJsBridge.cpp b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/NativeToJsBridge.cpp index 909a20eec1f..93062866e3c 100644 --- a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/NativeToJsBridge.cpp +++ b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/NativeToJsBridge.cpp @@ -26,6 +26,7 @@ #include "TraceSection.h" #include +#include #ifdef WITH_FBSYSTRACE #include @@ -41,7 +42,7 @@ class JsToNativeBridge : public react::ExecutorDelegate { JsToNativeBridge( std::shared_ptr registry, std::shared_ptr callback) - : m_registry(registry), m_callback(callback) {} + : m_registry(std::move(registry)), m_callback(std::move(callback)) {} std::shared_ptr getModuleRegistry() override { return m_registry; diff --git a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/TraceSection.h b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/TraceSection.h index c3e441624d2..58d963fd2b2 100644 --- a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/TraceSection.h +++ b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/TraceSection.h @@ -54,8 +54,8 @@ struct TraceSection { public: template explicit TraceSection( - const __unused char* name, - __unused ConvertsToStringPiece&&... args) { + [[maybe_unused]] const char* name, + [[maybe_unused]] ConvertsToStringPiece&&... args) { TRACE_EVENT_BEGIN("react-native", perfetto::DynamicString{name}, args...); } @@ -82,8 +82,8 @@ struct DummyTraceSection { public: template explicit DummyTraceSection( - const __unused char* name, - __unused ConvertsToStringPiece&&... args) {} + [[maybe_unused]] const char* name, + [[maybe_unused]] ConvertsToStringPiece&&... args) {} }; using TraceSectionUnwrapped = DummyTraceSection; #endif diff --git a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/jsi/jsi/test/testlib.cpp b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/jsi/jsi/test/testlib.cpp index d3f2d620c1a..f22efae8c00 100644 --- a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/jsi/jsi/test/testlib.cpp +++ b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/jsi/jsi/test/testlib.cpp @@ -1853,7 +1853,9 @@ TEST_P(JSITest, CastInterface) { auto randomUuid = facebook::jsi::UUID{0xf2cd96cfu, 0x455eu, 0x42d9u, 0x850au, 0x13e2cde59b8bull}; auto ptr = rd.castInterface(randomUuid); - EXPECT_EQ(ptr, nullptr); + // Use == instead of EXPECT_EQ to avoid ambiguous operator usage due to the + // type of 'ptr'. + EXPECT_TRUE(ptr == nullptr); } INSTANTIATE_TEST_CASE_P( diff --git a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/NetworkIOAgent.cpp b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/NetworkIOAgent.cpp index 744a44d7aee..afba5cea5fb 100644 --- a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/NetworkIOAgent.cpp +++ b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/NetworkIOAgent.cpp @@ -21,6 +21,7 @@ namespace facebook::react::jsinspector_modern { static constexpr long DEFAULT_BYTES_PER_READ = 1048576; // 1MB (Chrome v112 default) +static constexpr unsigned long MAX_BYTES_PER_READ = 10485760; // 10MB // https://github.com/chromium/chromium/blob/128.0.6593.1/content/browser/devtools/devtools_io_context.cc#L71-L73 static constexpr std::array kTextMIMETypePrefixes{ @@ -58,7 +59,7 @@ class Stream : public NetworkRequestListener, Stream(const Stream& other) = delete; Stream& operator=(const Stream& other) = delete; Stream(Stream&& other) = default; - Stream& operator=(Stream&& other) = default; + Stream& operator=(Stream&& other) noexcept = default; /** * Factory method to create a Stream with a callback for the initial result @@ -71,9 +72,9 @@ class Stream : public NetworkRequestListener, */ static std::shared_ptr create( VoidExecutor executor, - StreamInitCallback initCb) { + const StreamInitCallback& initCb) { std::shared_ptr stream{new Stream(initCb)}; - stream->setExecutor(executor); + stream->setExecutor(std::move(executor)); return stream; } @@ -86,8 +87,7 @@ class Stream : public NetworkRequestListener, * with the result of the read, or an error string. */ void read(long maxBytesToRead, const IOReadCallback& callback) { - pendingReadRequests_.emplace_back( - std::make_tuple(maxBytesToRead, callback)); + pendingReadRequests_.emplace_back(maxBytesToRead, callback); processPending(); } @@ -404,9 +404,21 @@ void NetworkIOAgent::handleIoRead(const cdp::PreparsedRequest& req) { "Invalid params: handle is missing or not a string.")); return; } +<<<<<<< Upstream + std::optional size = std::nullopt; +======= std::optional size = std::nullopt; // [Windows #13587] +>>>>>>> Override if ((req.params.count("size") != 0u) && req.params.at("size").isInt()) { size = req.params.at("size").asInt(); + + if (size > MAX_BYTES_PER_READ) { + frontendChannel_(cdp::jsonError( + requestId, + cdp::ErrorCode::InvalidParams, + "Invalid params: size cannot be greater than 10MB.")); + return; + } } auto streamId = req.params.at("handle").asString(); diff --git a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/Utf8.h b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/Utf8.h index 2edec0b1735..1d08d46e489 100644 --- a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/Utf8.h +++ b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/Utf8.h @@ -7,6 +7,7 @@ #pragma once +#include #include namespace facebook::react::jsinspector_modern { diff --git a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/core/ReactCommon/TurboModule.h b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/core/ReactCommon/TurboModule.h index 6555d49ff7f..f9221d83e36 100644 --- a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/core/ReactCommon/TurboModule.h +++ b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/core/ReactCommon/TurboModule.h @@ -114,14 +114,14 @@ class JSI_EXPORT TurboModule : public jsi::HostObject { */ void emitDeviceEvent( const std::string& eventName, - ArgFactory argFactory = nullptr); + ArgFactory&& argFactory = nullptr); // Backwards compatibility version void emitDeviceEvent( jsi::Runtime& /*runtime*/, const std::string& eventName, - ArgFactory argFactory = nullptr) { + ArgFactory&& argFactory = nullptr) { emitDeviceEvent(eventName, std::move(argFactory)); } diff --git a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/dom/NativeDOM.cpp b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/dom/NativeDOM.cpp index b1395fc9228..19fb1add60d 100644 --- a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/dom/NativeDOM.cpp +++ b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/dom/NativeDOM.cpp @@ -30,15 +30,14 @@ inline std::shared_ptr getShadowNode( return Bridging>::fromJs( runtime, shadowNodeValue); } -} // namespace #pragma mark - Private helpers -static UIManager& getUIManagerFromRuntime(facebook::jsi::Runtime& runtime) { +UIManager& getUIManagerFromRuntime(facebook::jsi::Runtime& runtime) { return UIManagerBinding::getBinding(runtime)->getUIManager(); } -static RootShadowNode::Shared getCurrentShadowTreeRevision( +RootShadowNode::Shared getCurrentShadowTreeRevision( facebook::jsi::Runtime& runtime, SurfaceId surfaceId) { auto shadowTreeRevisionProvider = @@ -46,7 +45,7 @@ static RootShadowNode::Shared getCurrentShadowTreeRevision( return shadowTreeRevisionProvider->getCurrentRevision(surfaceId); } -static RootShadowNode::Shared getCurrentShadowTreeRevision( +RootShadowNode::Shared getCurrentShadowTreeRevision( facebook::jsi::Runtime& runtime, jsi::Value& nativeNodeReference) { if (nativeNodeReference.isNumber()) { @@ -58,14 +57,13 @@ static RootShadowNode::Shared getCurrentShadowTreeRevision( runtime, getShadowNode(runtime, nativeNodeReference)->getSurfaceId()); } -static facebook::react::PointerEventsProcessor& -getPointerEventsProcessorFromRuntime(facebook::jsi::Runtime& runtime) { +facebook::react::PointerEventsProcessor& getPointerEventsProcessorFromRuntime( + facebook::jsi::Runtime& runtime) { return facebook::react::UIManagerBinding::getBinding(runtime) ->getPointerEventsProcessor(); } -static std::vector -getArrayOfInstanceHandlesFromShadowNodes( +std::vector getArrayOfInstanceHandlesFromShadowNodes( const std::vector>& nodes, facebook::jsi::Runtime& runtime) { // JSI doesn't support adding elements to an array after creation, @@ -83,10 +81,12 @@ getArrayOfInstanceHandlesFromShadowNodes( return nonNullInstanceHandles; } -static bool isRootShadowNode(const ShadowNode& shadowNode) { +bool isRootShadowNode(const ShadowNode& shadowNode) { return shadowNode.getTraits().check(ShadowNodeTraits::Trait::RootNodeKind); } +} // namespace + #pragma mark - NativeDOM NativeDOM::NativeDOM(std::shared_ptr jsInvoker) @@ -299,7 +299,7 @@ NativeDOM::getScrollSize( } std::string NativeDOM::getTagName( - jsi::Runtime& rt, + jsi::Runtime& /*rt*/, std::shared_ptr shadowNode) { return dom::getTagName(*shadowNode); } @@ -389,44 +389,38 @@ jsi::Value NativeDOM::linkRootNode( void NativeDOM::measure( jsi::Runtime& rt, std::shared_ptr shadowNode, - jsi::Function callback) { + const MeasureOnSuccessCallback& callback) { auto currentRevision = getCurrentShadowTreeRevision(rt, shadowNode->getSurfaceId()); if (currentRevision == nullptr) { - callback.call(rt, {0, 0, 0, 0, 0, 0}); + callback(0, 0, 0, 0, 0, 0); return; } auto measureRect = dom::measure(currentRevision, *shadowNode); - callback.call( - rt, - {jsi::Value{rt, measureRect.x}, - jsi::Value{rt, measureRect.y}, - jsi::Value{rt, measureRect.width}, - jsi::Value{rt, measureRect.height}, - jsi::Value{rt, measureRect.pageX}, - jsi::Value{rt, measureRect.pageY}}); + callback( + measureRect.x, + measureRect.y, + measureRect.width, + measureRect.height, + measureRect.pageX, + measureRect.pageY); } void NativeDOM::measureInWindow( jsi::Runtime& rt, std::shared_ptr shadowNode, - jsi::Function callback) { + const MeasureInWindowOnSuccessCallback& callback) { auto currentRevision = getCurrentShadowTreeRevision(rt, shadowNode->getSurfaceId()); if (currentRevision == nullptr) { - callback.call(rt, {0, 0, 0, 0}); + callback(0, 0, 0, 0); return; } auto rect = dom::measureInWindow(currentRevision, *shadowNode); - callback.call( - rt, - {jsi::Value{rt, rect.x}, - jsi::Value{rt, rect.y}, - jsi::Value{rt, rect.width}, - jsi::Value{rt, rect.height}}); + callback(rect.x, rect.y, rect.width, rect.height); } void NativeDOM::measureLayout( @@ -434,7 +428,7 @@ void NativeDOM::measureLayout( std::shared_ptr shadowNode, std::shared_ptr relativeToShadowNode, jsi::Function onFail, - jsi::Function onSuccess) { + const MeasureLayoutOnSuccessCallback& onSuccess) { auto currentRevision = getCurrentShadowTreeRevision(rt, shadowNode->getSurfaceId()); if (currentRevision == nullptr) { @@ -452,12 +446,7 @@ void NativeDOM::measureLayout( auto rect = maybeRect.value(); - onSuccess.call( - rt, - {jsi::Value{rt, rect.x}, - jsi::Value{rt, rect.y}, - jsi::Value{rt, rect.width}, - jsi::Value{rt, rect.height}}); + onSuccess(rect.x, rect.y, rect.width, rect.height); } // [windows MSVC cant handle backtick character in a preprocessor line @@ -472,4 +461,4 @@ void NativeDOM::setNativeProps( shadowNode, RawProps(rt, updatePayload)); } -} // namespace facebook::react \ No newline at end of file +} // namespace facebook::react diff --git a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/dom/NativeDOM.h b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/dom/NativeDOM.h index 1b77ef01631..75b713b95b4 100644 --- a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/dom/NativeDOM.h +++ b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/dom/NativeDOM.h @@ -23,6 +23,15 @@ namespace facebook::react { +using MeasureOnSuccessCallback = + SyncCallback; + +using MeasureInWindowOnSuccessCallback = + SyncCallback; + +using MeasureLayoutOnSuccessCallback = + SyncCallback; + class NativeDOM : public NativeDOMCxxSpec { public: NativeDOM(std::shared_ptr jsInvoker); @@ -111,19 +120,19 @@ class NativeDOM : public NativeDOMCxxSpec { void measure( jsi::Runtime& rt, std::shared_ptr shadowNode, - jsi::Function callback); + const MeasureOnSuccessCallback& callback); void measureInWindow( jsi::Runtime& rt, std::shared_ptr shadowNode, - jsi::Function callback); + const MeasureInWindowOnSuccessCallback& callback); void measureLayout( jsi::Runtime& rt, std::shared_ptr shadowNode, std::shared_ptr relativeToShadowNode, jsi::Function onFail, - jsi::Function onSuccess); + const MeasureLayoutOnSuccessCallback& onSuccess); // [windows MSVC cant handle backtick character in a preprocessor line #pragma mark - Legacy direct manipulation APIs (for ReactNativeElement). diff --git a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/componentregistry/ComponentDescriptorRegistry.cpp b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/componentregistry/ComponentDescriptorRegistry.cpp index 6e1bb3bce75..876be0826ef 100644 --- a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/componentregistry/ComponentDescriptorRegistry.cpp +++ b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/componentregistry/ComponentDescriptorRegistry.cpp @@ -29,7 +29,7 @@ ComponentDescriptorRegistry::ComponentDescriptorRegistry( contextContainer_(std::move(contextContainer)) {} void ComponentDescriptorRegistry::add( - ComponentDescriptorProvider componentDescriptorProvider) const { + const ComponentDescriptorProvider& componentDescriptorProvider) const { std::unique_lock lock(mutex_); auto componentDescriptor = componentDescriptorProvider.constructor( diff --git a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/AccessibilityProps.cpp b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/AccessibilityProps.cpp index 300c3cc641d..c086fe39384 100644 --- a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/AccessibilityProps.cpp +++ b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/AccessibilityProps.cpp @@ -224,13 +224,19 @@ AccessibilityProps::AccessibilityProps( // it probably can, but this is a fairly rare edge-case that (1) is easy-ish // to work around here, and (2) would require very careful work to address // this case and not regress the more common cases. +<<<<<<< Upstream +======= // [Windows ##14845 +>>>>>>> Override if (ReactNativeFeatureFlags::enableCppPropsIteratorSetter()) { accessibilityRole = sourceProps.accessibilityRole; role = sourceProps.role; accessibilityTraits = sourceProps.accessibilityTraits; } else { +<<<<<<< Upstream +======= // Windows] +>>>>>>> Override auto* accessibilityRoleValue = rawProps.at("accessibilityRole", nullptr, nullptr); auto* roleValue = rawProps.at("role", nullptr, nullptr); diff --git a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/DynamicEventPayload.cpp b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/DynamicEventPayload.cpp index 15bd60a3cf8..929f3cd15c2 100644 --- a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/DynamicEventPayload.cpp +++ b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/DynamicEventPayload.cpp @@ -32,9 +32,13 @@ std::optional DynamicEventPayload::extractValue(const std::vector(dynamic.asInt()); +======= // [Windows ##14797 return static_cast(dynamic.asInt()); // Windows] +>>>>>>> Override } return std::nullopt; } diff --git a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/runtime/ReactInstance.cpp b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/runtime/ReactInstance.cpp index 3e6aab1552a..b9940f113d6 100644 --- a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/runtime/ReactInstance.cpp +++ b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/runtime/ReactInstance.cpp @@ -36,7 +36,9 @@ std::shared_ptr createRuntimeScheduler( RuntimeSchedulerTaskErrorHandler taskErrorHandler) { std::shared_ptr scheduler = std::make_shared( - runtimeExecutor, HighResTimeStamp::now, taskErrorHandler); + std::move(runtimeExecutor), + HighResTimeStamp::now, + std::move(taskErrorHandler)); scheduler->setPerformanceEntryReporter( // FIXME: Move creation of PerformanceEntryReporter to here and // guarantee that its lifetime is the same as the runtime. @@ -54,7 +56,7 @@ ReactInstance::ReactInstance( JsErrorHandler::OnJsError onJsError, jsinspector_modern::HostTarget* parentInspectorTarget) : runtime_(std::move(runtime)), - jsMessageQueueThread_(jsMessageQueueThread), + jsMessageQueueThread_(std::move(jsMessageQueueThread)), timerManager_(std::move(timerManager)), jsErrorHandler_(std::make_shared(std::move(onJsError))), parentInspectorTarget_(parentInspectorTarget) { @@ -93,7 +95,7 @@ ReactInstance::ReactInstance( } }; - if (parentInspectorTarget_) { + if (parentInspectorTarget_ != nullptr) { auto executor = parentInspectorTarget_->executorFromThis(); auto bufferedRuntimeExecutorThatWaitsForInspectorSetup = @@ -154,7 +156,7 @@ ReactInstance::ReactInstance( } void ReactInstance::unregisterFromInspector() { - if (inspectorTarget_) { + if (inspectorTarget_ != nullptr) { assert(runtimeInspectorTarget_); inspectorTarget_->unregisterRuntime(*runtimeInspectorTarget_); @@ -199,7 +201,7 @@ namespace { // Copied from JSIExecutor.cpp // basename_r isn't in all iOS SDKs, so use this simple version instead. std::string simpleBasename(const std::string& path) { - size_t pos = path.rfind("/"); + size_t pos = path.rfind('/'); return (pos != std::string::npos) ? path.substr(pos) : path; } @@ -233,7 +235,7 @@ void ReactInstance::loadScript( beforeLoad(runtime); } TraceSection s("ReactInstance::loadScript"); - bool hasLogger(ReactMarker::logTaggedMarkerBridgelessImpl); + bool hasLogger(ReactMarker::logTaggedMarkerBridgelessImpl != nullptr); if (hasLogger) { ReactMarker::logTaggedMarkerBridgeless( ReactMarker::RUN_JS_BUNDLE_START, scriptName.c_str()); @@ -343,7 +345,7 @@ void ReactInstance::registerSegment( } auto buffer = std::make_shared(std::move(script)); - bool hasLogger(ReactMarker::logTaggedMarkerBridgelessImpl); + bool hasLogger(ReactMarker::logTaggedMarkerBridgelessImpl != nullptr); if (hasLogger) { ReactMarker::logTaggedMarkerBridgeless( ReactMarker::REGISTER_JS_SEGMENT_START, tag.c_str()); @@ -364,7 +366,7 @@ void ReactInstance::registerSegment( namespace { void defineReactInstanceFlags( jsi::Runtime& runtime, - ReactInstance::JSRuntimeFlags options) noexcept { + const ReactInstance::JSRuntimeFlags& options) noexcept { defineReadOnlyGlobal(runtime, "RN$Bridgeless", jsi::Value(true)); if (options.isProfiling) { @@ -389,7 +391,10 @@ bool isTruthy(jsi::Runtime& runtime, const jsi::Value& value) { void ReactInstance::initializeRuntime( JSRuntimeFlags options, BindingsInstallFunc bindingsInstallFunc) noexcept { - runtimeScheduler_->scheduleWork([this, options, bindingsInstallFunc]( + runtimeScheduler_->scheduleWork([this, + options = std::move(options), + bindingsInstallFunc = + std::move(bindingsInstallFunc)]( jsi::Runtime& runtime) { TraceSection s("ReactInstance::initializeRuntime"); @@ -605,7 +610,7 @@ void ReactInstance::handleMemoryPressureJs(int pressureLevel) { TRIM_MEMORY_RUNNING_MODERATE = 5, TRIM_MEMORY_UI_HIDDEN = 20, }; - const char* levelName; + const char* levelName = nullptr; switch (pressureLevel) { case TRIM_MEMORY_BACKGROUND: levelName = "TRIM_MEMORY_BACKGROUND"; diff --git a/vnext/overrides.json b/vnext/overrides.json index b1afa6749c1..74f793feb7d 100644 --- a/vnext/overrides.json +++ b/vnext/overrides.json @@ -8,13 +8,13 @@ "**/__snapshots__/**", "src-win/rntypes/**" ], - "baseVersion": "0.81.0-nightly-20250709-6892dde36", + "baseVersion": "0.82.0-nightly-20250806-5936f29d6", "overrides": [ { "type": "derived", "file": ".flowconfig", "baseFile": ".flowconfig", - "baseHash": "a5a50b87e779ba343919454cb5f7c1e77c2db982" + "baseHash": "373bd1b0dfbd85e02605d9526e7b08b41a67435f" }, { "type": "derived", @@ -58,35 +58,35 @@ "type": "patch", "file": "ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/CxxNativeModule.cpp", "baseFile": "packages/react-native/ReactCommon/cxxreact/CxxNativeModule.cpp", - "baseHash": "049869e49bb156253685974564b0bcea135115a7", + "baseHash": "48f297d1997b800cc4ff8fb3ec810256c38ab569", "issue": 14819 }, { "type": "patch", "file": "ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/NativeToJsBridge.cpp", "baseFile": "packages/react-native/ReactCommon/cxxreact/NativeToJsBridge.cpp", - "baseHash": "79f9b18be17a0ba42d2d01dd28991ce27a75e1bb", + "baseHash": "1e4d9b9053dd74a3bea6719c98d8511de0ff8f73", "issue": 13172 }, { "type": "patch", "file": "ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/TraceSection.h", "baseFile": "packages/react-native/ReactCommon/cxxreact/TraceSection.h", - "baseHash": "0eac478d62ce71a7b81c2a2a15da0927c1b0eff9", + "baseHash": "005ef905a0ae986ef5933ff5c9322004b7b34ec6", "issue": 14819 }, { "type": "patch", "file": "ReactCommon/TEMP_UntilReactCommonUpdate/jsi/jsi/test/testlib.cpp", "baseFile": "packages/react-native/ReactCommon/jsi/jsi/test/testlib.cpp", - "baseHash": "cb7d748b3408859515a1cf4a969c65adf9d8f631", + "baseHash": "80c95f0c0635f68a77e8a61380484389d771bf9e", "issue": 12210 }, { "type": "patch", "file": "ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/NetworkIOAgent.cpp", "baseFile": "packages/react-native/ReactCommon/jsinspector-modern/NetworkIOAgent.cpp", - "baseHash": "d8cf95191866699c484f1ab71201974fbe661239", + "baseHash": "898517c74357e110025445fa0698ca7343b16018", "issue": 13587 }, { @@ -100,7 +100,7 @@ "type": "patch", "file": "ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/Utf8.h", "baseFile": "packages/react-native/ReactCommon/jsinspector-modern/Utf8.h", - "baseHash": "d961f37983356cbc64622db6194cd4b2a9a4e05c", + "baseHash": "1d81aa08f37619a8e9e05c2cf3d76f8f878fb9df", "issue": 13587 }, { @@ -128,7 +128,7 @@ "type": "patch", "file": "ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/core/ReactCommon/TurboModule.h", "baseFile": "packages/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModule.h", - "baseHash": "e82eb139eab8a6e122421416fb724811bfadd6fb", + "baseHash": "a0bc700b3960f771cf6d4e63be30ab45f6ef3683", "issue": 14128 }, { @@ -142,21 +142,21 @@ "type": "patch", "file": "ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/dom/NativeDOM.cpp", "baseFile": "packages/react-native/ReactCommon/react/nativemodule/dom/NativeDOM.cpp", - "baseHash": "3c3c6d95134449d63baefbf8b83d97d87a5a422d", + "baseHash": "1332e88f9147a2724e6386b4141de97cb12eb657", "issue": 14257 }, { "type": "patch", "file": "ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/dom/NativeDOM.h", "baseFile": "packages/react-native/ReactCommon/react/nativemodule/dom/NativeDOM.h", - "baseHash": "0501da7595760e3bc7a61708168650c47c787127", + "baseHash": "575ac864c5dc7b01f3f7c98072015daf40967e15", "issue": 14654 }, { "type": "patch", "file": "ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/componentregistry/ComponentDescriptorRegistry.cpp", "baseFile": "packages/react-native/ReactCommon/react/renderer/componentregistry/ComponentDescriptorRegistry.cpp", - "baseHash": "5157ead9e3526366c1900af19615ba3818975b66", + "baseHash": "de0bf0822d85f7519ba09baa623831bd52a12ea3", "issue": 14204 }, { @@ -183,7 +183,7 @@ "type": "patch", "file": "ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/AccessibilityProps.cpp", "baseFile": "packages/react-native/ReactCommon/react/renderer/components/view/AccessibilityProps.cpp", - "baseHash": "84c725e0fcd477def9d5f6ae0e5bf14fd6e89d5c", + "baseHash": "5c09150a73977c9fe809272288ed25c71288a5b9", "issue": 14845 }, { @@ -196,16 +196,9 @@ "type": "derived", "file": "ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/DynamicEventPayload.cpp", "baseFile": "packages/react-native/ReactCommon/react/renderer/core/DynamicEventPayload.cpp", - "baseHash": "4fa9c00291790a3b7eca1d38aeb5c28bc081143c", + "baseHash": "1c366627baabc46264b0cdf8653a3ade25fab492", "issue": 14797 }, - { - "type": "patch", - "file": "ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/css/CSSHexColor.h", - "baseFile": "packages/react-native/ReactCommon/react/renderer/css/CSSHexColor.h", - "baseHash": "7ff0d621afc16dbee0b2959bb07c78418506b59c", - "issue": 14666 - }, { "type": "patch", "file": "ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/css/CSSTokenizer.h", @@ -217,21 +210,21 @@ "type": "patch", "file": "ReactCommon/TEMP_UntilReactCommonUpdate/react/runtime/ReactInstance.cpp", "baseFile": "packages/react-native/ReactCommon/react/runtime/ReactInstance.cpp", - "baseHash": "afe347f12a7e291a1207f5f1f55facd9c5a83ba8", + "baseHash": "f7a058ced6474e42e0ed805a2875a99c420e8398", "issue": 13172 }, { "type": "copy", "directory": "ReactCopies/IntegrationTests", "baseDirectory": "packages/rn-tester/IntegrationTests", - "baseHash": "aabf033b596a472c9da8b3eb4ab82d2a55acd5da", + "baseHash": "983b3220a3762c84eb268e88f86d0a4ecd743ba7", "issue": 4054 }, { "type": "derived", "file": "src-win/index.windows.js", "baseFile": "packages/react-native/index.js", - "baseHash": "c5d0dfd40d0fb7c197790b1f23f4f8b9ca835047" + "baseHash": "e4e8dc864521ce28adf8cfa2fb29059484206a05" }, { "type": "platform", @@ -277,7 +270,7 @@ "type": "copy", "file": "src-win/jest/setup.js", "baseFile": "packages/react-native/jest/setup.js", - "baseHash": "ecbd0b61c05ec4e048a5850c7bacb8fa1689efdb", + "baseHash": "386dde14a222b487e3ec13a6e33f4a95a1b2a0df", "issue": 14929 }, { @@ -306,7 +299,7 @@ "type": "patch", "file": "src-win/Libraries/Components/AccessibilityInfo/AccessibilityInfo.windows.js", "baseFile": "packages/react-native/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js", - "baseHash": "5a43c9cf537c5cb89e7f634e45be708f4b021493", + "baseHash": "692b825d9db6a6da9c3ae9595e4dfb5c202b879d", "issue": 4578 }, { @@ -377,7 +370,7 @@ "type": "patch", "file": "src-win/Libraries/Components/Pressable/Pressable.windows.js", "baseFile": "packages/react-native/Libraries/Components/Pressable/Pressable.js", - "baseHash": "5909b509ee835f2b6eb0dbd3e223180efe602f98" + "baseHash": "08a6e1c0dd895af70ea1c8448a3be028d9cd2587" }, { "type": "patch", @@ -401,7 +394,7 @@ "type": "derived", "file": "src-win/Libraries/Components/Switch/Switch.windows.js", "baseFile": "packages/react-native/Libraries/Components/Switch/Switch.js", - "baseHash": "38b0a2bd22fdbfb327271411867a382f46db0d61" + "baseHash": "c470803da7ac52c64c0a4745a4b41f1af0949a30" }, { "type": "derived", @@ -413,7 +406,7 @@ "type": "patch", "file": "src-win/Libraries/Components/TextInput/TextInput.windows.js", "baseFile": "packages/react-native/Libraries/Components/TextInput/TextInput.js", - "baseHash": "b6289ef53abc941f6f0aed50f80d3852b6682215" + "baseHash": "d6f92b47afedf2e31f4066e50c2900477c4d6c31" }, { "type": "patch", @@ -437,31 +430,31 @@ "type": "derived", "file": "src-win/Libraries/Components/Touchable/TouchableBounce.windows.js", "baseFile": "packages/react-native/Libraries/Components/Touchable/TouchableBounce.js", - "baseHash": "238611b005166f97d3d3e22dea5f56b3641cf71b" + "baseHash": "26b3622e95229f4943f2d8a3dfa7782b7425646e" }, { "type": "patch", "file": "src-win/Libraries/Components/Touchable/TouchableHighlight.windows.js", "baseFile": "packages/react-native/Libraries/Components/Touchable/TouchableHighlight.js", - "baseHash": "92cf589672dab551b1c544fe5449c4f8bd29d5c7" + "baseHash": "d2b4ee0540944a25d7acb35759318d352eddfa1f" }, { "type": "derived", "file": "src-win/Libraries/Components/Touchable/TouchableNativeFeedback.windows.js", "baseFile": "packages/react-native/Libraries/Components/Touchable/TouchableNativeFeedback.js", - "baseHash": "5608d67cf2684b855fb32403fea01b8c22c66f3b" + "baseHash": "2ded2efb727d7544aa8a0b249dd3f2502bb57129" }, { "type": "patch", "file": "src-win/Libraries/Components/Touchable/TouchableOpacity.windows.js", "baseFile": "packages/react-native/Libraries/Components/Touchable/TouchableOpacity.js", - "baseHash": "4775a668c5c1c201c2338b7496604b3e5a1c98f9" + "baseHash": "f8c26819c8412926a504084fc64117caf9a40466" }, { "type": "patch", "file": "src-win/Libraries/Components/Touchable/TouchableWithoutFeedback.windows.js", "baseFile": "packages/react-native/Libraries/Components/Touchable/TouchableWithoutFeedback.js", - "baseHash": "f22cce74573326eaf0fa2f9bc06710d407f92706" + "baseHash": "e996804498bbd3a5abef487e781fcc08b14f1d07" }, { "type": "patch", @@ -474,7 +467,7 @@ "type": "patch", "file": "src-win/Libraries/Components/View/View.windows.js", "baseFile": "packages/react-native/Libraries/Components/View/View.js", - "baseHash": "83a4fc8e982845619abb121bb860ad63366260c7" + "baseHash": "60eab5df574b43200494005fc3f00d11576d515b" }, { "type": "derived", @@ -565,7 +558,7 @@ "type": "derived", "file": "src-win/Libraries/Modal/Modal.windows.js", "baseFile": "packages/react-native/Libraries/Modal/Modal.js", - "baseHash": "549f5fae51d934cac370682072151bd071ca7beb" + "baseHash": "cc08c1f708f77197412719c393a31f85a83e9196" }, { "type": "derived", @@ -600,7 +593,7 @@ "type": "patch", "file": "src-win/Libraries/Pressability/Pressability.windows.js", "baseFile": "packages/react-native/Libraries/Pressability/Pressability.js", - "baseHash": "54f2a508c9378c1d9240ff27a460a8815e2b8ebd", + "baseHash": "a4205b3bea276e65da3ce0aeb6753bc8e7c5ead0", "issue": 4379 }, { @@ -680,7 +673,7 @@ "type": "patch", "file": "src-win/src/private/featureflags/ReactNativeFeatureFlagsBase.js", "baseFile": "packages/react-native/src/private/featureflags/ReactNativeFeatureFlagsBase.js", - "baseHash": "ed87cf338bea97b7b4aba393fcc457900e3c73d9" + "baseHash": "b3f30f3392ed9acd6918007eba024968f372eb95" }, { "type": "patch", diff --git a/vnext/src-win/Libraries/Components/AccessibilityInfo/AccessibilityInfo.windows.js b/vnext/src-win/Libraries/Components/AccessibilityInfo/AccessibilityInfo.windows.js index 1eef24e33a2..1a35d786dab 100644 --- a/vnext/src-win/Libraries/Components/AccessibilityInfo/AccessibilityInfo.windows.js +++ b/vnext/src-win/Libraries/Components/AccessibilityInfo/AccessibilityInfo.windows.js @@ -407,7 +407,7 @@ const AccessibilityInfo = { */ addEventListener>( eventName: K, - // $FlowIssue[incompatible-type] - Flow bug with unions and generics (T128099423) + // $FlowFixMe[incompatible-type] - Flow bug with unions and generics (T128099423) handler: (...AccessibilityEventDefinitions[K]) => void, ): EventSubscription { const deviceEventName = EventNames.get(eventName); diff --git a/vnext/src-win/Libraries/Components/Pressable/Pressable.windows.js b/vnext/src-win/Libraries/Components/Pressable/Pressable.windows.js index b5aa60f12af..165088336d3 100644 --- a/vnext/src-win/Libraries/Components/Pressable/Pressable.windows.js +++ b/vnext/src-win/Libraries/Components/Pressable/Pressable.windows.js @@ -122,6 +122,12 @@ type PressableBaseProps = $ReadOnly<{ onPressOut?: ?(event: GestureResponderEvent) => mixed, /** +<<<<<<< Upstream + * Whether to prevent any other native components from becoming responder + * while this pressable is responder. + */ + blockNativeResponder?: ?boolean, +======= * Called after the element loses focus. */ onBlur?: ?(event: BlurEvent) => mixed, @@ -160,6 +166,7 @@ type PressableBaseProps = $ReadOnly<{ * Called in the tunneling phase after a key up event is detected. */ onKeyUpCapture?: ?(event: KeyEvent) => void, +>>>>>>> Override /** * Either view styles or a function that receives a boolean reflecting whether @@ -228,9 +235,13 @@ function Pressable({ 'aria-expanded': ariaExpanded, 'aria-label': ariaLabel, 'aria-selected': ariaSelected, +<<<<<<< Upstream + blockNativeResponder, +======= 'aria-readonly': ariaReadOnly, 'aria-multiselectable': ariaMultiselectable, // Windows 'aria-required': ariaRequired, // Windows +>>>>>>> Override cancelable, children, delayHoverIn, @@ -291,7 +302,7 @@ function Pressable({ }; const accessibilityLiveRegion = - ariaLive === 'off' ? 'none' : ariaLive ?? props.accessibilityLiveRegion; + ariaLive === 'off' ? 'none' : (ariaLive ?? props.accessibilityLiveRegion); const accessibilityLabel = ariaLabel ?? props.accessibilityLabel; const restPropsWithDefaults: React.ElementConfig = { @@ -350,14 +361,19 @@ function Pressable({ onPressOut(event); } }, +<<<<<<< Upstream + blockNativeResponder, +======= // [Windows onKeyDown, onKeyUp, // Windows] +>>>>>>> Override }), [ android_disableSound, android_rippleConfig, + blockNativeResponder, cancelable, delayHoverIn, delayHoverOut, diff --git a/vnext/src-win/Libraries/Components/Switch/Switch.windows.js b/vnext/src-win/Libraries/Components/Switch/Switch.windows.js index 322934af9a3..7375db8c974 100644 --- a/vnext/src-win/Libraries/Components/Switch/Switch.windows.js +++ b/vnext/src-win/Libraries/Components/Switch/Switch.windows.js @@ -223,7 +223,7 @@ const Switch: component( native.value != null && native.value !== jsValue; if ( shouldUpdateNativeSwitch && - // $FlowIssue[method-unbinding] + // $FlowFixMe[method-unbinding] nativeSwitchRef.current?.setNativeProps != null ) { if (Platform.OS === 'android') { diff --git a/vnext/src-win/Libraries/Components/TextInput/TextInput.windows.js b/vnext/src-win/Libraries/Components/TextInput/TextInput.windows.js index b43352e8a05..630d7408d4c 100644 --- a/vnext/src-win/Libraries/Components/TextInput/TextInput.windows.js +++ b/vnext/src-win/Libraries/Components/TextInput/TextInput.windows.js @@ -1086,9 +1086,16 @@ const TextInput: component( } autoComplete={ Platform.OS === 'android' +<<<<<<< Upstream + ? // $FlowFixMe[invalid-computed-prop] + // $FlowFixMe[prop-missing] + (autoCompleteWebToAutoCompleteAndroidMap[autoComplete] ?? + autoComplete) +======= ? // $FlowFixMe autoCompleteWebToAutoCompleteAndroidMap[autoComplete] ?? autoComplete +>>>>>>> Override : undefined } textContentType={ diff --git a/vnext/src-win/Libraries/Components/Touchable/TouchableBounce.windows.js b/vnext/src-win/Libraries/Components/Touchable/TouchableBounce.windows.js index b2ba024078f..d99d7b41886 100644 --- a/vnext/src-win/Libraries/Components/Touchable/TouchableBounce.windows.js +++ b/vnext/src-win/Libraries/Components/Touchable/TouchableBounce.windows.js @@ -138,7 +138,7 @@ class TouchableBounce extends React.Component< const accessibilityLiveRegion = this.props['aria-live'] === 'off' ? 'none' - : this.props['aria-live'] ?? this.props.accessibilityLiveRegion; + : (this.props['aria-live'] ?? this.props.accessibilityLiveRegion); const _accessibilityState = { busy: this.props['aria-busy'] ?? this.props.accessibilityState?.busy, checked: diff --git a/vnext/src-win/Libraries/Components/Touchable/TouchableHighlight.windows.js b/vnext/src-win/Libraries/Components/Touchable/TouchableHighlight.windows.js index 420b30258b7..07067516279 100644 --- a/vnext/src-win/Libraries/Components/Touchable/TouchableHighlight.windows.js +++ b/vnext/src-win/Libraries/Components/Touchable/TouchableHighlight.windows.js @@ -345,7 +345,7 @@ class TouchableHighlightImpl extends React.Component< const accessibilityLiveRegion = this.props['aria-live'] === 'off' ? 'none' - : this.props['aria-live'] ?? this.props.accessibilityLiveRegion; + : (this.props['aria-live'] ?? this.props.accessibilityLiveRegion); const accessibilityLabel = this.props['aria-label'] ?? this.props.accessibilityLabel; diff --git a/vnext/src-win/Libraries/Components/Touchable/TouchableNativeFeedback.windows.js b/vnext/src-win/Libraries/Components/Touchable/TouchableNativeFeedback.windows.js index b7ff67e9552..86c2a0a7ec6 100644 --- a/vnext/src-win/Libraries/Components/Touchable/TouchableNativeFeedback.windows.js +++ b/vnext/src-win/Libraries/Components/Touchable/TouchableNativeFeedback.windows.js @@ -339,7 +339,7 @@ class TouchableNativeFeedback extends React.Component< const accessibilityLiveRegion = this.props['aria-live'] === 'off' ? 'none' - : this.props['aria-live'] ?? this.props.accessibilityLiveRegion; + : (this.props['aria-live'] ?? this.props.accessibilityLiveRegion); const accessibilityLabel = this.props['aria-label'] ?? this.props.accessibilityLabel; diff --git a/vnext/src-win/Libraries/Components/Touchable/TouchableOpacity.windows.js b/vnext/src-win/Libraries/Components/Touchable/TouchableOpacity.windows.js index 7939790580d..fd43d571651 100644 --- a/vnext/src-win/Libraries/Components/Touchable/TouchableOpacity.windows.js +++ b/vnext/src-win/Libraries/Components/Touchable/TouchableOpacity.windows.js @@ -308,7 +308,7 @@ class TouchableOpacity extends React.Component< const accessibilityLiveRegion = this.props['aria-live'] === 'off' ? 'none' - : this.props['aria-live'] ?? this.props.accessibilityLiveRegion; + : (this.props['aria-live'] ?? this.props.accessibilityLiveRegion); const accessibilityLabel = this.props['aria-label'] ?? this.props.accessibilityLabel; diff --git a/vnext/src-win/Libraries/Components/Touchable/TouchableWithoutFeedback.windows.js b/vnext/src-win/Libraries/Components/Touchable/TouchableWithoutFeedback.windows.js index 116faa16f63..952ce23fa8a 100644 --- a/vnext/src-win/Libraries/Components/Touchable/TouchableWithoutFeedback.windows.js +++ b/vnext/src-win/Libraries/Components/Touchable/TouchableWithoutFeedback.windows.js @@ -220,7 +220,7 @@ const TouchableWithoutFeedback: React.AbstractComponent< disabled: disabled !== null ? disabled - : ariaDisabled ?? accessibilityState?.disabled, + : (ariaDisabled ?? accessibilityState?.disabled), hitSlop: hitSlop, delayLongPress: delayLongPress, delayPressIn: delayPressIn, @@ -312,7 +312,7 @@ const TouchableWithoutFeedback: React.AbstractComponent< ? 'no-hide-descendants' : props.importantForAccessibility, accessibilityLiveRegion: - ariaLive === 'off' ? 'none' : ariaLive ?? props.accessibilityLiveRegion, + ariaLive === 'off' ? 'none' : (ariaLive ?? props.accessibilityLiveRegion), nativeID: props.id ?? props.nativeID, }; diff --git a/vnext/src-win/Libraries/Components/View/View.windows.js b/vnext/src-win/Libraries/Components/View/View.windows.js index 4330b6603d8..31b8760524b 100644 --- a/vnext/src-win/Libraries/Components/View/View.windows.js +++ b/vnext/src-win/Libraries/Components/View/View.windows.js @@ -10,8 +10,12 @@ import type {ViewProps} from './ViewPropTypes'; +<<<<<<< Upstream +import TextAncestorContext from '../../Text/TextAncestorContext'; +======= import * as ReactNativeFeatureFlags from '../../../src/private/featureflags/ReactNativeFeatureFlags'; import TextAncestor from '../../Text/TextAncestor'; +>>>>>>> Override import ViewNativeComponent from './ViewNativeComponent'; import * as React from 'react'; import {use} from 'react'; @@ -64,7 +68,7 @@ const childrenWithImportantForAccessibility = children => { * * @see https://reactnative.dev/docs/view */ -export default component View( +component View( ref?: React.RefSetter>, ...props: ViewProps ) { @@ -266,6 +270,36 @@ export default component View( ? 'no-hide-descendants' : importantForAccessibility; +<<<<<<< Upstream + const { + accessibilityState, + accessibilityValue, + 'aria-busy': ariaBusy, + 'aria-checked': ariaChecked, + 'aria-disabled': ariaDisabled, + 'aria-expanded': ariaExpanded, + 'aria-hidden': ariaHidden, + 'aria-label': ariaLabel, + 'aria-labelledby': ariaLabelledBy, + 'aria-live': ariaLive, + 'aria-selected': ariaSelected, + 'aria-valuemax': ariaValueMax, + 'aria-valuemin': ariaValueMin, + 'aria-valuenow': ariaValueNow, + 'aria-valuetext': ariaValueText, + id, + tabIndex, + ...otherProps + } = props; + + // Since we destructured props, we can now treat it as mutable + const processedProps = otherProps as {...ViewProps}; + + const parsedAriaLabelledBy = ariaLabelledBy?.split(/\s*,\s*/g); + if (parsedAriaLabelledBy !== undefined) { + processedProps.accessibilityLabelledBy = parsedAriaLabelledBy; + } +======= let actualView; if (ReactNativeFeatureFlags.reduceDefaultPropsInView()) { //Destructured props at function scope, just create processedProps @@ -275,23 +309,29 @@ export default component View( if (parsedAriaLabelledBy !== undefined) { processedProps.accessibilityLabelledBy = parsedAriaLabelledBy; } +>>>>>>> Override - if (ariaLabel !== undefined) { - processedProps.accessibilityLabel = ariaLabel; - } + if (ariaLabel !== undefined) { + processedProps.accessibilityLabel = ariaLabel; + } - if (ariaLive !== undefined) { - processedProps.accessibilityLiveRegion = - ariaLive === 'off' ? 'none' : ariaLive; - } + if (ariaLive !== undefined) { + processedProps.accessibilityLiveRegion = + ariaLive === 'off' ? 'none' : ariaLive; + } - if (ariaHidden !== undefined) { - processedProps.accessibilityElementsHidden = ariaHidden; - if (ariaHidden === true) { - processedProps.importantForAccessibility = 'no-hide-descendants'; - } + if (ariaHidden !== undefined) { + processedProps.accessibilityElementsHidden = ariaHidden; + if (ariaHidden === true) { + processedProps.importantForAccessibility = 'no-hide-descendants'; } + } +<<<<<<< Upstream + if (id !== undefined) { + processedProps.nativeID = id; + } +======= // Windows accessibility properties if (ariaLevel !== undefined) { processedProps.accessibilityLevel = ariaLevel; @@ -340,11 +380,30 @@ export default component View( if (id !== undefined) { processedProps.nativeID = id; } +>>>>>>> Override - if (tabIndex !== undefined) { - processedProps.focusable = !tabIndex; - } + if (tabIndex !== undefined) { + processedProps.focusable = !tabIndex; + } +<<<<<<< Upstream + if ( + accessibilityState != null || + ariaBusy != null || + ariaChecked != null || + ariaDisabled != null || + ariaExpanded != null || + ariaSelected != null + ) { + processedProps.accessibilityState = { + busy: ariaBusy ?? accessibilityState?.busy, + checked: ariaChecked ?? accessibilityState?.checked, + disabled: ariaDisabled ?? accessibilityState?.disabled, + expanded: ariaExpanded ?? accessibilityState?.expanded, + selected: ariaSelected ?? accessibilityState?.selected, + }; + } +======= if ( accessibilityState != null || ariaBusy != null || @@ -368,22 +427,30 @@ export default component View( required: ariaRequired ?? accessibilityState?.required, // Windows }; } +>>>>>>> Override - if ( - accessibilityValue != null || - ariaValueMax != null || - ariaValueMin != null || - ariaValueNow != null || - ariaValueText != null - ) { - processedProps.accessibilityValue = { - max: ariaValueMax ?? accessibilityValue?.max, - min: ariaValueMin ?? accessibilityValue?.min, - now: ariaValueNow ?? accessibilityValue?.now, - text: ariaValueText ?? accessibilityValue?.text, - }; - } + if ( + accessibilityValue != null || + ariaValueMax != null || + ariaValueMin != null || + ariaValueNow != null || + ariaValueText != null + ) { + processedProps.accessibilityValue = { + max: ariaValueMax ?? accessibilityValue?.max, + min: ariaValueMin ?? accessibilityValue?.min, + now: ariaValueNow ?? accessibilityValue?.now, + text: ariaValueText ?? accessibilityValue?.text, + }; + } +<<<<<<< Upstream + const actualView = + ref == null ? ( + + ) : ( + +======= // [Windows key event processing and accessible property if (otherProps.keyDownEvents || otherProps.onKeyDown) { processedProps.onKeyDown = event => { @@ -511,8 +578,8 @@ export default component View( children={otherProps.children} // Windows] /> +>>>>>>> Override ); - } // [Windows - Paper doesn't support Views in Text while Fabric does if (global.RN$Bridgeless !== true) { @@ -583,3 +650,7 @@ export default component View( return actualView; } + +View.displayName = 'View'; + +export default View; diff --git a/vnext/src-win/Libraries/Modal/Modal.windows.js b/vnext/src-win/Libraries/Modal/Modal.windows.js index 9ef3b9f83d1..fbc3dcd8463 100644 --- a/vnext/src-win/Libraries/Modal/Modal.windows.js +++ b/vnext/src-win/Libraries/Modal/Modal.windows.js @@ -301,7 +301,7 @@ class Modal extends React.Component { backgroundColor: this.props.transparent === true ? 'transparent' - : this.props.backdropColor ?? 'white', + : (this.props.backdropColor ?? 'white'), }; let animationType = this.props.animationType || 'none'; diff --git a/vnext/src-win/Libraries/Pressability/Pressability.windows.js b/vnext/src-win/Libraries/Pressability/Pressability.windows.js index c85cc421952..71718c27f9b 100644 --- a/vnext/src-win/Libraries/Pressability/Pressability.windows.js +++ b/vnext/src-win/Libraries/Pressability/Pressability.windows.js @@ -17,8 +17,8 @@ import type { KeyEvent, // [Windows] } from '../Types/CoreEventTypes'; +import * as ReactNativeFeatureFlags from '../../src/private/featureflags/ReactNativeFeatureFlags'; import SoundManager from '../Components/Sound/SoundManager'; -import ReactNativeFeatureFlags from '../ReactNative/ReactNativeFeatureFlags'; import UIManager from '../ReactNative/UIManager'; import {type RectOrSize, normalizeRect} from '../StyleSheet/Rect'; import {type PointerEvent} from '../Types/CoreEventTypes'; diff --git a/vnext/src-win/index.windows.js b/vnext/src-win/index.windows.js index 2c0a5342941..328f97f3268 100644 --- a/vnext/src-win/index.windows.js +++ b/vnext/src-win/index.windows.js @@ -173,14 +173,14 @@ module.exports = { /** * @deprecated SafeAreaView has been deprecated and will be removed in a future release. * Please use 'react-native-safe-area-context' instead. - * See https://github.com/th3rdwave/react-native-safe-area-context + * See https://github.com/AppAndFlow/react-native-safe-area-context */ get SafeAreaView(): SafeAreaView { warnOnce( 'safe-area-view-deprecated', 'SafeAreaView has been deprecated and will be removed in a future release. ' + "Please use 'react-native-safe-area-context' instead. " + - 'See https://github.com/th3rdwave/react-native-safe-area-context', + 'See https://github.com/AppAndFlow/react-native-safe-area-context', ); return require('./Libraries/Components/SafeAreaView/SafeAreaView').default; }, @@ -369,7 +369,14 @@ module.exports = { ) => HostComponent { return require('./Libraries/ReactNative/requireNativeComponent').default; }, +<<<<<<< Upstream + get ReactNativeVersion() { + return require('./Libraries/Core/ReactNativeVersion').default; + }, + get RootTagContext() { +======= get RootTagContext(): RootTagContext { +>>>>>>> Override return require('./Libraries/ReactNative/RootTag').RootTagContext; }, get Settings(): Settings { diff --git a/vnext/src-win/jest/setup.js b/vnext/src-win/jest/setup.js index 9af8d76313d..9cdfe0f7a98 100644 --- a/vnext/src-win/jest/setup.js +++ b/vnext/src-win/jest/setup.js @@ -70,6 +70,17 @@ Object.defineProperties(global, { }, }); +/** + * Prettier v3 uses import (cjs/mjs) file formats that jest-runtime does not + * support. To work around this we need to bypass the jest module system by + * using the orginal node `require` function. + */ +jest.mock('prettier', () => { + // $FlowExpectedError[underconstrained-implicit-instantiation] + const module = jest.requireActual('module'); + return module.prototype.require(require.resolve('prettier')); +}); + // $FlowFixMe[incompatible-call] - `./mocks/AppState` is incomplete. mock('m#../Libraries/AppState/AppState', 'm#./mocks/AppState'); mock('m#../Libraries/BatchedBridge/NativeModules', 'm#./mocks/NativeModules'); diff --git a/vnext/src-win/src/private/featureflags/ReactNativeFeatureFlagsBase.js b/vnext/src-win/src/private/featureflags/ReactNativeFeatureFlagsBase.js index ec4dbc8ddad..ada4facdea9 100644 --- a/vnext/src-win/src/private/featureflags/ReactNativeFeatureFlagsBase.js +++ b/vnext/src-win/src/private/featureflags/ReactNativeFeatureFlagsBase.js @@ -18,6 +18,10 @@ import NativeReactNativeFeatureFlags from './specs/NativeReactNativeFeatureFlags const accessedFeatureFlags: Set = new Set(); let overrides: ?ReactNativeFeatureFlagsJsOnlyOverrides; +// This is a list of functions to clear the cached value for each feature flag +// getter. This is only used in development. +const clearCachedValuesFns: Array<() => void> = []; + export type Getter = () => T; // This defines the types for the overrides object, whose methods also receive @@ -33,6 +37,12 @@ function createGetter( ): Getter { let cachedValue: ?T; + if (__DEV__) { + clearCachedValuesFns.push(() => { + cachedValue = undefined; + }); + } + return () => { if (cachedValue == null) { cachedValue = customValueGetter() ?? defaultValue; @@ -118,3 +128,12 @@ function maybeLogUnavailableNativeModuleError(configName: string): void { ); } } + +export function dangerouslyResetForTesting(): void { + if (__DEV__) { + overrides = null; + accessedFeatureFlags.clear(); + reportedConfigNames.clear(); + clearCachedValuesFns.forEach(fn => fn()); + } +} From 1d7f44c4ad58a3ffa506cdc618c92d0dcebaf238 Mon Sep 17 00:00:00 2001 From: vineethkuttan <66076509+vineethkuttan@users.noreply.github.com> Date: Fri, 17 Oct 2025 07:46:30 +0530 Subject: [PATCH 04/13] resolving conflicts --- .../src/js/utils/RNTesterList.win32.js | 9 - .../Components/Pressable/Pressable.win32.js | 6 - .../Components/TextInput/TextInput.win32.js | 6 - .../TouchableNativeFeedback.win32.js | 100 ----- .../Libraries/Components/View/View.win32.js | 110 ------ .../react-native-win32/src-win/index.win32.js | 6 +- .../Button/ButtonExample.windows.js | 6 +- .../Switch/SwitchExample.windows.js | 6 +- .../Pressable/PressableExample.windows.js | 6 - .../Text/TextSharedExamples.windows.js | 7 - .../src/js/utils/RNTesterList.windows.js | 9 - .../tester/js/utils/RNTesterList.android.js | 9 - .../tester/js/utils/RNTesterList.ios.js | 9 - packages/@react-native/tester/package.json | 13 - .../jsinspector-modern/NetworkIOAgent.cpp | 4 - .../components/view/AccessibilityProps.cpp | 350 ------------------ .../renderer/core/DynamicEventPayload.cpp | 46 --- vnext/overrides.json | 14 - .../Components/Pressable/Pressable.windows.js | 9 - .../Components/TextInput/TextInput.windows.js | 6 - .../Libraries/Components/View/View.windows.js | 72 ---- vnext/src-win/index.windows.js | 6 +- 22 files changed, 4 insertions(+), 805 deletions(-) delete mode 100644 vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/AccessibilityProps.cpp delete mode 100644 vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/DynamicEventPayload.cpp diff --git a/packages/@office-iss/react-native-win32-tester/src/js/utils/RNTesterList.win32.js b/packages/@office-iss/react-native-win32-tester/src/js/utils/RNTesterList.win32.js index a12c98d4cb6..032bd9fe6d5 100644 --- a/packages/@office-iss/react-native-win32-tester/src/js/utils/RNTesterList.win32.js +++ b/packages/@office-iss/react-native-win32-tester/src/js/utils/RNTesterList.win32.js @@ -153,15 +153,6 @@ const Components: Array = [ category: 'Basic', module: require('../examples/Performance/PerformanceComparisonExample'), }, -<<<<<<< Upstream -======= - /* - { - key: 'OSSLibraryExample', - module: require('../examples/OSSLibraryExample/OSSLibraryExample'), - }, - */ ->>>>>>> Override ...RNTesterListFbInternal.Components, ]; diff --git a/packages/@office-iss/react-native-win32/src-win/Libraries/Components/Pressable/Pressable.win32.js b/packages/@office-iss/react-native-win32/src-win/Libraries/Components/Pressable/Pressable.win32.js index 2439a22fc13..454c9982066 100644 --- a/packages/@office-iss/react-native-win32/src-win/Libraries/Components/Pressable/Pressable.win32.js +++ b/packages/@office-iss/react-native-win32/src-win/Libraries/Components/Pressable/Pressable.win32.js @@ -123,12 +123,10 @@ type PressableBaseProps = $ReadOnly<{ onPressOut?: ?(event: GestureResponderEvent) => mixed, /** -<<<<<<< Upstream * Whether to prevent any other native components from becoming responder * while this pressable is responder. */ blockNativeResponder?: ?boolean, -======= * Called after the element loses focus. */ onBlur?: ?(event: BlurEvent) => mixed, @@ -167,7 +165,6 @@ type PressableBaseProps = $ReadOnly<{ * Called in the tunneling phase after a key up event is detected. */ onKeyUpCapture?: ?(event: KeyEvent) => void, ->>>>>>> Override /** * Either view styles or a function that receives a boolean reflecting whether @@ -356,14 +353,11 @@ function Pressable({ onPressOut(event); } }, -<<<<<<< Upstream blockNativeResponder, -======= // [Windows onKeyDown, onKeyUp, // Windows] ->>>>>>> Override }), [ android_disableSound, diff --git a/packages/@office-iss/react-native-win32/src-win/Libraries/Components/TextInput/TextInput.win32.js b/packages/@office-iss/react-native-win32/src-win/Libraries/Components/TextInput/TextInput.win32.js index 0973ada7de3..c9b5275ed0f 100644 --- a/packages/@office-iss/react-native-win32/src-win/Libraries/Components/TextInput/TextInput.win32.js +++ b/packages/@office-iss/react-native-win32/src-win/Libraries/Components/TextInput/TextInput.win32.js @@ -1051,16 +1051,10 @@ const TextInput: component( } autoComplete={ Platform.OS === 'android' -<<<<<<< Upstream ? // $FlowFixMe[invalid-computed-prop] // $FlowFixMe[prop-missing] (autoCompleteWebToAutoCompleteAndroidMap[autoComplete] ?? autoComplete) -======= - ? // $FlowFixMe - autoCompleteWebToAutoCompleteAndroidMap[autoComplete] ?? - autoComplete ->>>>>>> Override : undefined } textContentType={ diff --git a/packages/@office-iss/react-native-win32/src-win/Libraries/Components/Touchable/TouchableNativeFeedback.win32.js b/packages/@office-iss/react-native-win32/src-win/Libraries/Components/Touchable/TouchableNativeFeedback.win32.js index 93de9ea9565..8940c9bb37c 100644 --- a/packages/@office-iss/react-native-win32/src-win/Libraries/Components/Touchable/TouchableNativeFeedback.win32.js +++ b/packages/@office-iss/react-native-win32/src-win/Libraries/Components/Touchable/TouchableNativeFeedback.win32.js @@ -286,106 +286,6 @@ class TouchableNativeFeedback extends React.Component< } } -<<<<<<< Upstream - render(): React.Node { - const element = React.Children.only<$FlowFixMe>(this.props.children); - const children: Array = [element.props.children]; - if (__DEV__) { - if (element.type === View) { - children.push( - , - ); - } - } - - // BACKWARD-COMPATIBILITY: Focus and blur events were never supported before - // adopting `Pressability`, so preserve that behavior. - const {onBlur, onFocus, ...eventHandlersWithoutBlurAndFocus} = - this.state.pressability.getEventHandlers(); - - let _accessibilityState = { - busy: this.props['aria-busy'] ?? this.props.accessibilityState?.busy, - checked: - this.props['aria-checked'] ?? this.props.accessibilityState?.checked, - disabled: - this.props['aria-disabled'] ?? this.props.accessibilityState?.disabled, - expanded: - this.props['aria-expanded'] ?? this.props.accessibilityState?.expanded, - selected: - this.props['aria-selected'] ?? this.props.accessibilityState?.selected, - }; - - _accessibilityState = - this.props.disabled != null - ? { - ..._accessibilityState, - disabled: this.props.disabled, - } - : _accessibilityState; - - const accessibilityValue = { - max: this.props['aria-valuemax'] ?? this.props.accessibilityValue?.max, - min: this.props['aria-valuemin'] ?? this.props.accessibilityValue?.min, - now: this.props['aria-valuenow'] ?? this.props.accessibilityValue?.now, - text: this.props['aria-valuetext'] ?? this.props.accessibilityValue?.text, - }; - - const accessibilityLiveRegion = - this.props['aria-live'] === 'off' - ? 'none' - : (this.props['aria-live'] ?? this.props.accessibilityLiveRegion); - - const accessibilityLabel = - this.props['aria-label'] ?? this.props.accessibilityLabel; - return cloneElement( - element, - { - ...eventHandlersWithoutBlurAndFocus, - ...getBackgroundProp( - this.props.background === undefined - ? TouchableNativeFeedback.SelectableBackground() - : this.props.background, - this.props.useForeground === true, - ), - accessible: this.props.accessible !== false, - accessibilityHint: this.props.accessibilityHint, - accessibilityLanguage: this.props.accessibilityLanguage, - accessibilityLabel: accessibilityLabel, - accessibilityRole: this.props.accessibilityRole, - accessibilityState: _accessibilityState, - accessibilityActions: this.props.accessibilityActions, - onAccessibilityAction: this.props.onAccessibilityAction, - accessibilityValue: accessibilityValue, - importantForAccessibility: - this.props['aria-hidden'] === true - ? 'no-hide-descendants' - : this.props.importantForAccessibility, - accessibilityViewIsModal: - this.props['aria-modal'] ?? this.props.accessibilityViewIsModal, - accessibilityLiveRegion: accessibilityLiveRegion, - accessibilityElementsHidden: - this.props['aria-hidden'] ?? this.props.accessibilityElementsHidden, - hasTVPreferredFocus: this.props.hasTVPreferredFocus, - hitSlop: this.props.hitSlop, - focusable: - this.props.focusable !== false && - this.props.onPress !== undefined && - !this.props.disabled, - nativeID: this.props.id ?? this.props.nativeID, - nextFocusDown: this.props.nextFocusDown, - nextFocusForward: this.props.nextFocusForward, - nextFocusLeft: this.props.nextFocusLeft, - nextFocusRight: this.props.nextFocusRight, - nextFocusUp: this.props.nextFocusUp, - onLayout: this.props.onLayout, - testID: this.props.testID, - }, - ...children, - ); - } - -======= ->>>>>>> Override componentDidUpdate( prevProps: TouchableNativeFeedbackProps, prevState: TouchableNativeFeedbackState, diff --git a/packages/@office-iss/react-native-win32/src-win/Libraries/Components/View/View.win32.js b/packages/@office-iss/react-native-win32/src-win/Libraries/Components/View/View.win32.js index 67ecdea37df..e0ab8a7d297 100644 --- a/packages/@office-iss/react-native-win32/src-win/Libraries/Components/View/View.win32.js +++ b/packages/@office-iss/react-native-win32/src-win/Libraries/Components/View/View.win32.js @@ -10,11 +10,7 @@ import type {ViewProps} from './ViewPropTypes'; -<<<<<<< Upstream import TextAncestorContext from '../../Text/TextAncestorContext'; -======= -import TextAncestor from '../../Text/TextAncestor'; ->>>>>>> Override import ViewNativeComponent from './ViewNativeComponent'; import * as React from 'react'; import invariant from 'invariant'; // [Windows] @@ -29,105 +25,6 @@ import type {KeyEvent} from '../../Types/CoreEventTypes'; * * @see https://reactnative.dev/docs/view */ -<<<<<<< Upstream -component View( - ref?: React.RefSetter>, - ...props: ViewProps -) { - const hasTextAncestor = use(TextAncestorContext); - - const { - accessibilityState, - accessibilityValue, - 'aria-busy': ariaBusy, - 'aria-checked': ariaChecked, - 'aria-disabled': ariaDisabled, - 'aria-expanded': ariaExpanded, - 'aria-hidden': ariaHidden, - 'aria-label': ariaLabel, - 'aria-labelledby': ariaLabelledBy, - 'aria-live': ariaLive, - 'aria-selected': ariaSelected, - 'aria-valuemax': ariaValueMax, - 'aria-valuemin': ariaValueMin, - 'aria-valuenow': ariaValueNow, - 'aria-valuetext': ariaValueText, - id, - tabIndex, - ...otherProps - } = props; - - // Since we destructured props, we can now treat it as mutable - const processedProps = otherProps as {...ViewProps}; - - const parsedAriaLabelledBy = ariaLabelledBy?.split(/\s*,\s*/g); - if (parsedAriaLabelledBy !== undefined) { - processedProps.accessibilityLabelledBy = parsedAriaLabelledBy; - } - - if (ariaLabel !== undefined) { - processedProps.accessibilityLabel = ariaLabel; - } - - if (ariaLive !== undefined) { - processedProps.accessibilityLiveRegion = - ariaLive === 'off' ? 'none' : ariaLive; - } - - if (ariaHidden !== undefined) { - processedProps.accessibilityElementsHidden = ariaHidden; - if (ariaHidden === true) { - processedProps.importantForAccessibility = 'no-hide-descendants'; - } - } - - if (id !== undefined) { - processedProps.nativeID = id; - } - - if (tabIndex !== undefined) { - processedProps.focusable = !tabIndex; - } - - if ( - accessibilityState != null || - ariaBusy != null || - ariaChecked != null || - ariaDisabled != null || - ariaExpanded != null || - ariaSelected != null - ) { - processedProps.accessibilityState = { - busy: ariaBusy ?? accessibilityState?.busy, - checked: ariaChecked ?? accessibilityState?.checked, - disabled: ariaDisabled ?? accessibilityState?.disabled, - expanded: ariaExpanded ?? accessibilityState?.expanded, - selected: ariaSelected ?? accessibilityState?.selected, - }; - } - - if ( - accessibilityValue != null || - ariaValueMax != null || - ariaValueMin != null || - ariaValueNow != null || - ariaValueText != null - ) { - processedProps.accessibilityValue = { - max: ariaValueMax ?? accessibilityValue?.max, - min: ariaValueMin ?? accessibilityValue?.min, - now: ariaValueNow ?? accessibilityValue?.now, - text: ariaValueText ?? accessibilityValue?.text, - }; - } - - const actualView = - ref == null ? ( - - ) : ( - - ); -======= const View: component( ref?: React.RefSetter>, ...props: ViewProps @@ -313,7 +210,6 @@ const View: component( }); }; // Windows] ->>>>>>> Override return ( // [Windows @@ -383,14 +279,8 @@ const View: component( // Windows] ); -<<<<<<< Upstream - } - return actualView; -} -======= }, ); ->>>>>>> Override View.displayName = 'View'; diff --git a/packages/@office-iss/react-native-win32/src-win/index.win32.js b/packages/@office-iss/react-native-win32/src-win/index.win32.js index 020a4e3b7ba..8b5bc823391 100644 --- a/packages/@office-iss/react-native-win32/src-win/index.win32.js +++ b/packages/@office-iss/react-native-win32/src-win/index.win32.js @@ -377,14 +377,10 @@ module.exports = { ) => HostComponent { return require('./Libraries/ReactNative/requireNativeComponent').default; }, -<<<<<<< Upstream - get ReactNativeVersion() { + get ReactNativeVersion(): ReactNativeVersion { return require('./Libraries/Core/ReactNativeVersion').default; }, - get RootTagContext() { -======= get RootTagContext(): RootTagContext { ->>>>>>> Override return require('./Libraries/ReactNative/RootTag').RootTagContext; }, get Settings(): Settings { diff --git a/packages/@react-native-windows/tester/src/js/examples-win/Button/ButtonExample.windows.js b/packages/@react-native-windows/tester/src/js/examples-win/Button/ButtonExample.windows.js index 7295fac1919..7df0f59288c 100644 --- a/packages/@react-native-windows/tester/src/js/examples-win/Button/ButtonExample.windows.js +++ b/packages/@react-native-windows/tester/src/js/examples-win/Button/ButtonExample.windows.js @@ -233,9 +233,6 @@ exports.examples = [ ); }, }, -<<<<<<< Upstream -] as Array; -======= { title: 'Button with Accessible and Focusable Prop', render: function (): React.Node { @@ -279,8 +276,7 @@ exports.examples = [ ); }, }, -]; ->>>>>>> Override +] as Array; const styles = StyleSheet.create({ container: { diff --git a/packages/@react-native-windows/tester/src/js/examples-win/Switch/SwitchExample.windows.js b/packages/@react-native-windows/tester/src/js/examples-win/Switch/SwitchExample.windows.js index 09a087bcdc4..0e8c8812a82 100644 --- a/packages/@react-native-windows/tester/src/js/examples-win/Switch/SwitchExample.windows.js +++ b/packages/@react-native-windows/tester/src/js/examples-win/Switch/SwitchExample.windows.js @@ -390,17 +390,13 @@ exports.examples = [ return ; }, }, -<<<<<<< Upstream -] as Array; -======= { title: 'Switches can have customized accessibility', render(): React.Element { return ; }, }, -]; ->>>>>>> Override +] as Array; if (Platform.OS === 'ios') { exports.examples.push({ diff --git a/packages/@react-native-windows/tester/src/js/examples/Pressable/PressableExample.windows.js b/packages/@react-native-windows/tester/src/js/examples/Pressable/PressableExample.windows.js index 04ec5ea7ea7..5c68dd1481c 100644 --- a/packages/@react-native-windows/tester/src/js/examples/Pressable/PressableExample.windows.js +++ b/packages/@react-native-windows/tester/src/js/examples/Pressable/PressableExample.windows.js @@ -291,8 +291,6 @@ function PressableDisabled() { ); } -<<<<<<< Upstream -======= function PressableHoverStyle() { const [hovered, setHovered] = useState(false); return ( @@ -459,7 +457,6 @@ function PressWithKeyCapture() { ); } ->>>>>>> Override const styles = StyleSheet.create({ row: { justifyContent: 'center', @@ -755,9 +752,7 @@ const examples = [ return ; }, }, -<<<<<<< Upstream ...PressableExampleFbInternal.examples, -======= { title: 'Focusability in Pressable', description: @@ -1113,7 +1108,6 @@ const examples = [ }, }, // Windows] ->>>>>>> Override ]; module.exports = ({ diff --git a/packages/@react-native-windows/tester/src/js/examples/Text/TextSharedExamples.windows.js b/packages/@react-native-windows/tester/src/js/examples/Text/TextSharedExamples.windows.js index f55c7f2b7b9..c1060b77a63 100644 --- a/packages/@react-native-windows/tester/src/js/examples/Text/TextSharedExamples.windows.js +++ b/packages/@react-native-windows/tester/src/js/examples/Text/TextSharedExamples.windows.js @@ -110,7 +110,6 @@ function NumberOfLinesTextLayoutExample(): React.Node { ); } -<<<<<<< Upstream component RtlInlineViewExample( label: string, testID: string, @@ -190,17 +189,13 @@ component RtlAndInlineViewsExample() { ); } -export default [ -======= const examples = [ ->>>>>>> Override { title: 'Empty Text', name: 'emptyText', render: EmptyTextExample, }, { -<<<<<<< Upstream title: 'TextInlineViewsExample', name: 'inlineViews', description: @@ -216,8 +211,6 @@ const examples = [ render: RtlAndInlineViewsExample, }, { -======= ->>>>>>> Override title: 'numberOfLines with onTextLayout', name: 'numberOfLinesLayout', description: diff --git a/packages/@react-native-windows/tester/src/js/utils/RNTesterList.windows.js b/packages/@react-native-windows/tester/src/js/utils/RNTesterList.windows.js index ff13116b4ea..eeb4def892a 100644 --- a/packages/@react-native-windows/tester/src/js/utils/RNTesterList.windows.js +++ b/packages/@react-native-windows/tester/src/js/utils/RNTesterList.windows.js @@ -213,15 +213,6 @@ const Components: Array = [ category: 'Basic', module: require('../examples/Performance/PerformanceComparisonExample'), }, -<<<<<<< Upstream -======= - /* - { - key: 'OSSLibraryExample', - module: require('../examples/OSSLibraryExample/OSSLibraryExample'), - }, - */ ->>>>>>> Override ...RNTesterListFbInternal.Components, ]; diff --git a/packages/@react-native/tester/js/utils/RNTesterList.android.js b/packages/@react-native/tester/js/utils/RNTesterList.android.js index 33fe6d653e7..a91d9309c9d 100644 --- a/packages/@react-native/tester/js/utils/RNTesterList.android.js +++ b/packages/@react-native/tester/js/utils/RNTesterList.android.js @@ -145,15 +145,6 @@ const Components: Array = [ category: 'Basic', module: require('../examples/Performance/PerformanceComparisonExample'), }, -<<<<<<< Upstream -======= - /* - { - key: 'OSSLibraryExample', - module: require('../examples/OSSLibraryExample/OSSLibraryExample'), - }, - */ ->>>>>>> Override ...RNTesterListFbInternal.Components, ]; diff --git a/packages/@react-native/tester/js/utils/RNTesterList.ios.js b/packages/@react-native/tester/js/utils/RNTesterList.ios.js index 7128b669f4e..a84724ee89b 100644 --- a/packages/@react-native/tester/js/utils/RNTesterList.ios.js +++ b/packages/@react-native/tester/js/utils/RNTesterList.ios.js @@ -153,15 +153,6 @@ const Components: Array = [ category: 'Basic', module: require('../examples/Performance/PerformanceComparisonExample'), }, -<<<<<<< Upstream -======= - /* - { - key: 'OSSLibraryExample', - module: require('../examples/OSSLibraryExample/OSSLibraryExample'), - }, - */ ->>>>>>> Override ...RNTesterListFbInternal.Components, ]; diff --git a/packages/@react-native/tester/package.json b/packages/@react-native/tester/package.json index 1d87793cf3a..3af9ae5653f 100644 --- a/packages/@react-native/tester/package.json +++ b/packages/@react-native/tester/package.json @@ -1,10 +1,6 @@ { "name": "@react-native/tester", -<<<<<<< Upstream "version": "0.82.0-main", -======= - "version": "0.80.0-main", ->>>>>>> Override "private": true, "description": "React Native tester app.", "license": "MIT", @@ -14,11 +10,7 @@ "directory": "packages/rn-tester" }, "engines": { -<<<<<<< Upstream - "node": ">= 20.19.4" -======= "node": ">=22" ->>>>>>> Override }, "scripts": { "start": "npx @react-native-community/cli start", @@ -34,13 +26,8 @@ "e2e-test-ios": "./scripts/maestro-test-ios.sh" }, "dependencies": { -<<<<<<< Upstream - "@react-native/new-app-screen": "0.82.0-main", - "@react-native/popup-menu-android": "0.82.0-main", -======= "@react-native/new-app-screen": "0.81.0-nightly-20250709-6892dde36", "@react-native/popup-menu-android": "0.81.0-nightly-20250709-6892dde36", ->>>>>>> Override "flow-enums-runtime": "^0.0.6", "invariant": "^2.2.4", "nullthrows": "^1.1.1" diff --git a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/NetworkIOAgent.cpp b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/NetworkIOAgent.cpp index afba5cea5fb..cba0ba53f97 100644 --- a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/NetworkIOAgent.cpp +++ b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/NetworkIOAgent.cpp @@ -404,11 +404,7 @@ void NetworkIOAgent::handleIoRead(const cdp::PreparsedRequest& req) { "Invalid params: handle is missing or not a string.")); return; } -<<<<<<< Upstream std::optional size = std::nullopt; -======= - std::optional size = std::nullopt; // [Windows #13587] ->>>>>>> Override if ((req.params.count("size") != 0u) && req.params.at("size").isInt()) { size = req.params.at("size").asInt(); diff --git a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/AccessibilityProps.cpp b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/AccessibilityProps.cpp deleted file mode 100644 index c086fe39384..00000000000 --- a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/AccessibilityProps.cpp +++ /dev/null @@ -1,350 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -#include "AccessibilityProps.h" - -#include -#include -#include -#include -#include - -namespace facebook::react { - -AccessibilityProps::AccessibilityProps( - const PropsParserContext& context, - const AccessibilityProps& sourceProps, - const RawProps& rawProps) - : accessible( - ReactNativeFeatureFlags::enableCppPropsIteratorSetter() - ? sourceProps.accessible - : convertRawProp( - context, - rawProps, - "accessible", - sourceProps.accessible, - false)), - accessibilityState( - ReactNativeFeatureFlags::enableCppPropsIteratorSetter() - ? sourceProps.accessibilityState - : convertRawProp( - context, - rawProps, - "accessibilityState", - sourceProps.accessibilityState, - {})), - accessibilityLabel( - ReactNativeFeatureFlags::enableCppPropsIteratorSetter() - ? sourceProps.accessibilityLabel - : convertRawProp( - context, - rawProps, - "accessibilityLabel", - sourceProps.accessibilityLabel, - "")), - accessibilityOrder( - ReactNativeFeatureFlags::enableCppPropsIteratorSetter() - ? sourceProps.accessibilityOrder - : convertRawProp( - context, - rawProps, - "experimental_accessibilityOrder", - sourceProps.accessibilityOrder, - {})), - accessibilityLabelledBy( - ReactNativeFeatureFlags::enableCppPropsIteratorSetter() - ? sourceProps.accessibilityLabelledBy - : convertRawProp( - context, - rawProps, - "accessibilityLabelledBy", - sourceProps.accessibilityLabelledBy, - {})), - accessibilityLiveRegion( - ReactNativeFeatureFlags::enableCppPropsIteratorSetter() - ? sourceProps.accessibilityLiveRegion - : convertRawProp( - context, - rawProps, - "accessibilityLiveRegion", - sourceProps.accessibilityLiveRegion, - AccessibilityLiveRegion::None)), - accessibilityHint( - ReactNativeFeatureFlags::enableCppPropsIteratorSetter() - ? sourceProps.accessibilityHint - : convertRawProp( - context, - rawProps, - "accessibilityHint", - sourceProps.accessibilityHint, - "")), - accessibilityLanguage( - ReactNativeFeatureFlags::enableCppPropsIteratorSetter() - ? sourceProps.accessibilityLanguage - : convertRawProp( - context, - rawProps, - "accessibilityLanguage", - sourceProps.accessibilityLanguage, - "")), - accessibilityLargeContentTitle( - ReactNativeFeatureFlags::enableCppPropsIteratorSetter() - ? sourceProps.accessibilityLargeContentTitle - : convertRawProp( - context, - rawProps, - "accessibilityLargeContentTitle", - sourceProps.accessibilityLargeContentTitle, - "")), - accessibilityValue( - ReactNativeFeatureFlags::enableCppPropsIteratorSetter() - ? sourceProps.accessibilityValue - : convertRawProp( - context, - rawProps, - "accessibilityValue", - sourceProps.accessibilityValue, - {})), - accessibilityActions( - ReactNativeFeatureFlags::enableCppPropsIteratorSetter() - ? sourceProps.accessibilityActions - : convertRawProp( - context, - rawProps, - "accessibilityActions", - sourceProps.accessibilityActions, - {})), - accessibilityShowsLargeContentViewer( - ReactNativeFeatureFlags::enableCppPropsIteratorSetter() - ? sourceProps.accessibilityShowsLargeContentViewer - : convertRawProp( - context, - rawProps, - "accessibilityShowsLargeContentViewer", - sourceProps.accessibilityShowsLargeContentViewer, - false)), - accessibilityViewIsModal( - ReactNativeFeatureFlags::enableCppPropsIteratorSetter() - ? sourceProps.accessibilityViewIsModal - : convertRawProp( - context, - rawProps, - "accessibilityViewIsModal", - sourceProps.accessibilityViewIsModal, - false)), - accessibilityElementsHidden( - ReactNativeFeatureFlags::enableCppPropsIteratorSetter() - ? sourceProps.accessibilityElementsHidden - : convertRawProp( - context, - rawProps, - "accessibilityElementsHidden", - sourceProps.accessibilityElementsHidden, - false)), - accessibilityIgnoresInvertColors( - ReactNativeFeatureFlags::enableCppPropsIteratorSetter() - ? sourceProps.accessibilityIgnoresInvertColors - : convertRawProp( - context, - rawProps, - "accessibilityIgnoresInvertColors", - sourceProps.accessibilityIgnoresInvertColors, - false)), - accessibilityRespondsToUserInteraction( - ReactNativeFeatureFlags::enableCppPropsIteratorSetter() - ? sourceProps.accessibilityRespondsToUserInteraction - : convertRawProp( - context, - rawProps, - "accessibilityRespondsToUserInteraction", - sourceProps.accessibilityRespondsToUserInteraction, - true)), - onAccessibilityTap( - ReactNativeFeatureFlags::enableCppPropsIteratorSetter() - ? sourceProps.onAccessibilityTap - : convertRawProp( - context, - rawProps, - "onAccessibilityTap", - sourceProps.onAccessibilityTap, - {})), - onAccessibilityMagicTap( - ReactNativeFeatureFlags::enableCppPropsIteratorSetter() - ? sourceProps.onAccessibilityMagicTap - : convertRawProp( - context, - rawProps, - "onAccessibilityMagicTap", - sourceProps.onAccessibilityMagicTap, - {})), - onAccessibilityEscape( - ReactNativeFeatureFlags::enableCppPropsIteratorSetter() - ? sourceProps.onAccessibilityEscape - : convertRawProp( - context, - rawProps, - "onAccessibilityEscape", - sourceProps.onAccessibilityEscape, - {})), - onAccessibilityAction( - ReactNativeFeatureFlags::enableCppPropsIteratorSetter() - ? sourceProps.onAccessibilityAction - : convertRawProp( - context, - rawProps, - "onAccessibilityAction", - sourceProps.onAccessibilityAction, - {})), - importantForAccessibility( - ReactNativeFeatureFlags::enableCppPropsIteratorSetter() - ? sourceProps.importantForAccessibility - : convertRawProp( - context, - rawProps, - "importantForAccessibility", - sourceProps.importantForAccessibility, - ImportantForAccessibility::Auto)), - testId( - ReactNativeFeatureFlags::enableCppPropsIteratorSetter() - ? sourceProps.testId - : convertRawProp( - context, - rawProps, - "testID", - sourceProps.testId, - "")) { - // It is a (severe!) perf deoptimization to request props out-of-order. - // Thus, since we need to request the same prop twice here - // (accessibilityRole) we "must" do them subsequently here to prevent - // a regression. It is reasonable to ask if the `at` function can be improved; - // it probably can, but this is a fairly rare edge-case that (1) is easy-ish - // to work around here, and (2) would require very careful work to address - // this case and not regress the more common cases. -<<<<<<< Upstream -======= - // [Windows ##14845 ->>>>>>> Override - if (ReactNativeFeatureFlags::enableCppPropsIteratorSetter()) { - accessibilityRole = sourceProps.accessibilityRole; - role = sourceProps.role; - accessibilityTraits = sourceProps.accessibilityTraits; - } else { -<<<<<<< Upstream -======= - // Windows] ->>>>>>> Override - auto* accessibilityRoleValue = - rawProps.at("accessibilityRole", nullptr, nullptr); - auto* roleValue = rawProps.at("role", nullptr, nullptr); - - auto* precedentRoleValue = - roleValue != nullptr ? roleValue : accessibilityRoleValue; - - if (accessibilityRoleValue == nullptr || - !accessibilityRoleValue->hasValue()) { - accessibilityRole = sourceProps.accessibilityRole; - } else { - fromRawValue(context, *accessibilityRoleValue, accessibilityRole); - } - - if (roleValue == nullptr || !roleValue->hasValue()) { - role = sourceProps.role; - } else { - fromRawValue(context, *roleValue, role); - } - - if (precedentRoleValue == nullptr || !precedentRoleValue->hasValue()) { - accessibilityTraits = sourceProps.accessibilityTraits; - } else { - fromRawValue(context, *precedentRoleValue, accessibilityTraits); - } - } -} - -void AccessibilityProps::setProp( - const PropsParserContext& context, - RawPropsPropNameHash hash, - const char* /*propName*/, - const RawValue& value) { - static auto defaults = AccessibilityProps{}; - - switch (hash) { - RAW_SET_PROP_SWITCH_CASE_BASIC(accessible); - RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityState); - RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityLabel); - RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityOrder); - RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityLabelledBy); - RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityHint); - RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityLanguage); - RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityShowsLargeContentViewer); - RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityLargeContentTitle); - RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityValue); - RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityActions); - RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityViewIsModal); - RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityElementsHidden); - RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityIgnoresInvertColors); - RAW_SET_PROP_SWITCH_CASE_BASIC(onAccessibilityTap); - RAW_SET_PROP_SWITCH_CASE_BASIC(onAccessibilityMagicTap); - RAW_SET_PROP_SWITCH_CASE_BASIC(onAccessibilityEscape); - RAW_SET_PROP_SWITCH_CASE_BASIC(onAccessibilityAction); - RAW_SET_PROP_SWITCH_CASE_BASIC(importantForAccessibility); - RAW_SET_PROP_SWITCH_CASE_BASIC(role); - RAW_SET_PROP_SWITCH_CASE(testId, "testID"); - case CONSTEXPR_RAW_PROPS_KEY_HASH("accessibilityRole"): { - AccessibilityTraits traits = AccessibilityTraits::None; - std::string roleString; - if (value.hasValue()) { - fromRawValue(context, value, traits); - fromRawValue(context, value, roleString); - } - - accessibilityTraits = traits; - accessibilityRole = roleString; - return; - } - } -} - -#pragma mark - DebugStringConvertible - -#if RN_DEBUG_STRING_CONVERTIBLE - -SharedDebugStringConvertibleList AccessibilityProps::getDebugProps() const { - const auto& defaultProps = AccessibilityProps(); - return SharedDebugStringConvertibleList{ - debugStringConvertibleItem("testID", testId, defaultProps.testId), - debugStringConvertibleItem( - "accessibilityRole", - accessibilityRole, - defaultProps.accessibilityRole), - debugStringConvertibleItem( - "accessible", accessible, defaultProps.accessible), - debugStringConvertibleItem( - "accessibilityActions", - accessibilityActions, - defaultProps.accessibilityActions), - debugStringConvertibleItem( - "accessibilityElementsHidden", - accessibilityElementsHidden, - defaultProps.accessibilityElementsHidden), - debugStringConvertibleItem( - "accessibilityHint", - accessibilityHint, - defaultProps.accessibilityHint), - debugStringConvertibleItem( - "accessibilityLabel", - accessibilityLabel, - defaultProps.accessibilityLabel), - debugStringConvertibleItem( - "accessibilityLiveRegion", - accessibilityLiveRegion, - defaultProps.accessibilityLiveRegion), - }; -} -#endif // RN_DEBUG_STRING_CONVERTIBLE - -} // namespace facebook::react diff --git a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/DynamicEventPayload.cpp b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/DynamicEventPayload.cpp deleted file mode 100644 index 929f3cd15c2..00000000000 --- a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/DynamicEventPayload.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -#include "DynamicEventPayload.h" - -#include - -namespace facebook::react { - -DynamicEventPayload::DynamicEventPayload(folly::dynamic &&payload) : payload_(std::move(payload)) {} - -jsi::Value DynamicEventPayload::asJSIValue(jsi::Runtime &runtime) const { - return jsi::valueFromDynamic(runtime, payload_); -} - -EventPayloadType DynamicEventPayload::getType() const { - return EventPayloadType::ValueFactory; -} - -std::optional DynamicEventPayload::extractValue(const std::vector &path) const { - auto dynamic = payload_; - for (auto &key : path) { - auto type = dynamic.type(); - if ((type == folly::dynamic::Type::OBJECT || type == folly::dynamic::Type::ARRAY) && !dynamic.empty()) { - dynamic = folly::dynamic(dynamic[key]); - } - } - if (dynamic.type() == folly::dynamic::Type::DOUBLE) { - return dynamic.asDouble(); - } else if (dynamic.type() == folly::dynamic::Type::INT64) { -<<<<<<< Upstream - return static_cast(dynamic.asInt()); -======= - // [Windows ##14797 - return static_cast(dynamic.asInt()); - // Windows] ->>>>>>> Override - } - return std::nullopt; -} - -} // namespace facebook::react diff --git a/vnext/overrides.json b/vnext/overrides.json index 74f793feb7d..0a0a3973f55 100644 --- a/vnext/overrides.json +++ b/vnext/overrides.json @@ -179,26 +179,12 @@ "baseFile": "packages/react-native/ReactCommon/react/renderer/components/view/AccessibilityPrimitives.h", "baseHash": "6a66bfa6f1a36ac0b1d3c114d0c4d11496c4f82e" }, - { - "type": "patch", - "file": "ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/AccessibilityProps.cpp", - "baseFile": "packages/react-native/ReactCommon/react/renderer/components/view/AccessibilityProps.cpp", - "baseHash": "5c09150a73977c9fe809272288ed25c71288a5b9", - "issue": 14845 - }, { "type": "derived", "file": "ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/accessibilityPropsConversions.h", "baseFile": "packages/react-native/ReactCommon/react/renderer/components/view/accessibilityPropsConversions.h", "baseHash": "4b2822199233e660f36c01df18fbbff7799968cc" }, - { - "type": "derived", - "file": "ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/DynamicEventPayload.cpp", - "baseFile": "packages/react-native/ReactCommon/react/renderer/core/DynamicEventPayload.cpp", - "baseHash": "1c366627baabc46264b0cdf8653a3ade25fab492", - "issue": 14797 - }, { "type": "patch", "file": "ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/css/CSSTokenizer.h", diff --git a/vnext/src-win/Libraries/Components/Pressable/Pressable.windows.js b/vnext/src-win/Libraries/Components/Pressable/Pressable.windows.js index 165088336d3..f813dbd1731 100644 --- a/vnext/src-win/Libraries/Components/Pressable/Pressable.windows.js +++ b/vnext/src-win/Libraries/Components/Pressable/Pressable.windows.js @@ -122,12 +122,10 @@ type PressableBaseProps = $ReadOnly<{ onPressOut?: ?(event: GestureResponderEvent) => mixed, /** -<<<<<<< Upstream * Whether to prevent any other native components from becoming responder * while this pressable is responder. */ blockNativeResponder?: ?boolean, -======= * Called after the element loses focus. */ onBlur?: ?(event: BlurEvent) => mixed, @@ -166,7 +164,6 @@ type PressableBaseProps = $ReadOnly<{ * Called in the tunneling phase after a key up event is detected. */ onKeyUpCapture?: ?(event: KeyEvent) => void, ->>>>>>> Override /** * Either view styles or a function that receives a boolean reflecting whether @@ -235,13 +232,10 @@ function Pressable({ 'aria-expanded': ariaExpanded, 'aria-label': ariaLabel, 'aria-selected': ariaSelected, -<<<<<<< Upstream blockNativeResponder, -======= 'aria-readonly': ariaReadOnly, 'aria-multiselectable': ariaMultiselectable, // Windows 'aria-required': ariaRequired, // Windows ->>>>>>> Override cancelable, children, delayHoverIn, @@ -361,14 +355,11 @@ function Pressable({ onPressOut(event); } }, -<<<<<<< Upstream blockNativeResponder, -======= // [Windows onKeyDown, onKeyUp, // Windows] ->>>>>>> Override }), [ android_disableSound, diff --git a/vnext/src-win/Libraries/Components/TextInput/TextInput.windows.js b/vnext/src-win/Libraries/Components/TextInput/TextInput.windows.js index 630d7408d4c..f3152157853 100644 --- a/vnext/src-win/Libraries/Components/TextInput/TextInput.windows.js +++ b/vnext/src-win/Libraries/Components/TextInput/TextInput.windows.js @@ -1086,16 +1086,10 @@ const TextInput: component( } autoComplete={ Platform.OS === 'android' -<<<<<<< Upstream ? // $FlowFixMe[invalid-computed-prop] // $FlowFixMe[prop-missing] (autoCompleteWebToAutoCompleteAndroidMap[autoComplete] ?? autoComplete) -======= - ? // $FlowFixMe - autoCompleteWebToAutoCompleteAndroidMap[autoComplete] ?? - autoComplete ->>>>>>> Override : undefined } textContentType={ diff --git a/vnext/src-win/Libraries/Components/View/View.windows.js b/vnext/src-win/Libraries/Components/View/View.windows.js index 31b8760524b..c16f001128a 100644 --- a/vnext/src-win/Libraries/Components/View/View.windows.js +++ b/vnext/src-win/Libraries/Components/View/View.windows.js @@ -10,12 +10,7 @@ import type {ViewProps} from './ViewPropTypes'; -<<<<<<< Upstream import TextAncestorContext from '../../Text/TextAncestorContext'; -======= -import * as ReactNativeFeatureFlags from '../../../src/private/featureflags/ReactNativeFeatureFlags'; -import TextAncestor from '../../Text/TextAncestor'; ->>>>>>> Override import ViewNativeComponent from './ViewNativeComponent'; import * as React from 'react'; import {use} from 'react'; @@ -270,38 +265,6 @@ component View( ? 'no-hide-descendants' : importantForAccessibility; -<<<<<<< Upstream - const { - accessibilityState, - accessibilityValue, - 'aria-busy': ariaBusy, - 'aria-checked': ariaChecked, - 'aria-disabled': ariaDisabled, - 'aria-expanded': ariaExpanded, - 'aria-hidden': ariaHidden, - 'aria-label': ariaLabel, - 'aria-labelledby': ariaLabelledBy, - 'aria-live': ariaLive, - 'aria-selected': ariaSelected, - 'aria-valuemax': ariaValueMax, - 'aria-valuemin': ariaValueMin, - 'aria-valuenow': ariaValueNow, - 'aria-valuetext': ariaValueText, - id, - tabIndex, - ...otherProps - } = props; - - // Since we destructured props, we can now treat it as mutable - const processedProps = otherProps as {...ViewProps}; - - const parsedAriaLabelledBy = ariaLabelledBy?.split(/\s*,\s*/g); - if (parsedAriaLabelledBy !== undefined) { - processedProps.accessibilityLabelledBy = parsedAriaLabelledBy; - } -======= - let actualView; - if (ReactNativeFeatureFlags.reduceDefaultPropsInView()) { //Destructured props at function scope, just create processedProps const processedProps = otherProps as {...PropsWithRef}; @@ -309,7 +272,6 @@ component View( if (parsedAriaLabelledBy !== undefined) { processedProps.accessibilityLabelledBy = parsedAriaLabelledBy; } ->>>>>>> Override if (ariaLabel !== undefined) { processedProps.accessibilityLabel = ariaLabel; @@ -327,11 +289,6 @@ component View( } } -<<<<<<< Upstream - if (id !== undefined) { - processedProps.nativeID = id; - } -======= // Windows accessibility properties if (ariaLevel !== undefined) { processedProps.accessibilityLevel = ariaLevel; @@ -380,30 +337,11 @@ component View( if (id !== undefined) { processedProps.nativeID = id; } ->>>>>>> Override if (tabIndex !== undefined) { processedProps.focusable = !tabIndex; } -<<<<<<< Upstream - if ( - accessibilityState != null || - ariaBusy != null || - ariaChecked != null || - ariaDisabled != null || - ariaExpanded != null || - ariaSelected != null - ) { - processedProps.accessibilityState = { - busy: ariaBusy ?? accessibilityState?.busy, - checked: ariaChecked ?? accessibilityState?.checked, - disabled: ariaDisabled ?? accessibilityState?.disabled, - expanded: ariaExpanded ?? accessibilityState?.expanded, - selected: ariaSelected ?? accessibilityState?.selected, - }; - } -======= if ( accessibilityState != null || ariaBusy != null || @@ -427,7 +365,6 @@ component View( required: ariaRequired ?? accessibilityState?.required, // Windows }; } ->>>>>>> Override if ( accessibilityValue != null || @@ -444,13 +381,6 @@ component View( }; } -<<<<<<< Upstream - const actualView = - ref == null ? ( - - ) : ( - -======= // [Windows key event processing and accessible property if (otherProps.keyDownEvents || otherProps.onKeyDown) { processedProps.onKeyDown = event => { @@ -578,7 +508,6 @@ component View( children={otherProps.children} // Windows] /> ->>>>>>> Override ); // [Windows - Paper doesn't support Views in Text while Fabric does @@ -649,7 +578,6 @@ component View( // Windows] return actualView; -} View.displayName = 'View'; diff --git a/vnext/src-win/index.windows.js b/vnext/src-win/index.windows.js index 328f97f3268..6d681d3732b 100644 --- a/vnext/src-win/index.windows.js +++ b/vnext/src-win/index.windows.js @@ -369,14 +369,10 @@ module.exports = { ) => HostComponent { return require('./Libraries/ReactNative/requireNativeComponent').default; }, -<<<<<<< Upstream - get ReactNativeVersion() { + get ReactNativeVersion(): ReactNativeVersion { return require('./Libraries/Core/ReactNativeVersion').default; }, - get RootTagContext() { -======= get RootTagContext(): RootTagContext { ->>>>>>> Override return require('./Libraries/ReactNative/RootTag').RootTagContext; }, get Settings(): Settings { From df580428121877abca1f923713bfaec20fecd594 Mon Sep 17 00:00:00 2001 From: vineethkuttan <66076509+vineethkuttan@users.noreply.github.com> Date: Fri, 17 Oct 2025 08:01:53 +0530 Subject: [PATCH 05/13] Manually Updating RN Nightlty --- .../react-native-win32-tester/package.json | 6 +- .../react-native-win32/package.json | 20 +- .../@react-native-windows/tester/package.json | 8 +- packages/@react-native/monorepo/package.json | 36 +- packages/@react-native/tester/overrides.json | 2 +- packages/@react-native/tester/package.json | 6 +- .../babel-react-native-config/package.json | 4 +- .../metro-dev-config/package.json | 2 +- packages/integration-test-app/package.json | 4 +- packages/playground/package.json | 4 +- packages/sample-app-fabric/package.json | 6 +- packages/sample-apps/package.json | 4 +- packages/sample-custom-component/package.json | 4 +- vnext/package.json | 22 +- yarn.lock | 672 ++++++++++++------ 15 files changed, 506 insertions(+), 294 deletions(-) diff --git a/packages/@office-iss/react-native-win32-tester/package.json b/packages/@office-iss/react-native-win32-tester/package.json index ed165d87232..f79151bec2c 100644 --- a/packages/@office-iss/react-native-win32-tester/package.json +++ b/packages/@office-iss/react-native-win32-tester/package.json @@ -11,7 +11,7 @@ "validate-overrides": "react-native-platform-override validate" }, "dependencies": { - "@react-native/tester": "0.80.0-main", + "@react-native/tester": "0.82.0-main", "@typescript-eslint/eslint-plugin": "^7.1.1", "@typescript-eslint/parser": "^7.1.1", "flow-enums-runtime": "^0.0.6" @@ -19,7 +19,7 @@ "peerDependencies": { "@office-iss/react-native-win32": "^0.0.0-canary.298", "react": "19.1.0", - "react-native": "0.81.0-nightly-20250709-6892dde36" + "react-native": "0.82.0-nightly-20250806-5936f29d6" }, "devDependencies": { "@office-iss/react-native-win32": "^0.0.0-canary.298", @@ -37,4 +37,4 @@ "engines": { "node": ">= 22" } -} +} \ No newline at end of file diff --git a/packages/@office-iss/react-native-win32/package.json b/packages/@office-iss/react-native-win32/package.json index e0b0d0e245d..b38c2a8d94a 100644 --- a/packages/@office-iss/react-native-win32/package.json +++ b/packages/@office-iss/react-native-win32/package.json @@ -30,13 +30,13 @@ "@react-native-community/cli-platform-android": "17.0.0", "@react-native-community/cli-platform-ios": "17.0.0", "@react-native/assets": "1.0.0", - "@react-native/assets-registry": "0.81.0-nightly-20250709-6892dde36", - "@react-native/codegen": "0.81.0-nightly-20250709-6892dde36", - "@react-native/community-cli-plugin": "0.81.0-nightly-20250709-6892dde36", - "@react-native/gradle-plugin": "0.81.0-nightly-20250709-6892dde36", - "@react-native/js-polyfills": "0.81.0-nightly-20250709-6892dde36", - "@react-native/normalize-colors": "0.81.0-nightly-20250709-6892dde36", - "@react-native/virtualized-lists": "0.81.0-nightly-20250709-6892dde36", + "@react-native/assets-registry": "0.82.0-nightly-20250806-5936f29d6", + "@react-native/codegen": "0.82.0-nightly-20250806-5936f29d6", + "@react-native/community-cli-plugin": "0.82.0-nightly-20250806-5936f29d6", + "@react-native/gradle-plugin": "0.82.0-nightly-20250806-5936f29d6", + "@react-native/js-polyfills": "0.82.0-nightly-20250806-5936f29d6", + "@react-native/normalize-colors": "0.82.0-nightly-20250806-5936f29d6", + "@react-native/virtualized-lists": "0.82.0-nightly-20250806-5936f29d6", "abort-controller": "^3.0.0", "anser": "^1.4.9", "ansi-regex": "^5.0.0", @@ -72,7 +72,7 @@ "devDependencies": { "@babel/core": "^7.25.2", "@babel/eslint-parser": "^7.25.1", - "@react-native/metro-config": "0.81.0-nightly-20250709-6892dde36", + "@react-native/metro-config": "0.82.0-nightly-20250806-5936f29d6", "@rnw-scripts/babel-react-native-config": "0.0.0", "@rnw-scripts/eslint-config": "1.2.37", "@rnw-scripts/jest-out-of-tree-snapshot-resolver": "^1.1.41", @@ -95,7 +95,7 @@ "peerDependencies": { "@types/react": "^19.1.0", "react": "^19.1.0", - "react-native": "0.81.0-nightly-20250709-6892dde36" + "react-native": "0.82.0-nightly-20250806-5936f29d6" }, "beachball": { "defaultNpmTag": "canary", @@ -112,4 +112,4 @@ "engines": { "node": ">= 22" } -} +} \ No newline at end of file diff --git a/packages/@react-native-windows/tester/package.json b/packages/@react-native-windows/tester/package.json index b440ec94d38..7452d6b942d 100644 --- a/packages/@react-native-windows/tester/package.json +++ b/packages/@react-native-windows/tester/package.json @@ -19,13 +19,13 @@ "peerDependencies": { "@react-native-picker/picker": "2.11.0", "react": "19.1.0", - "react-native": "0.81.0-nightly-20250709-6892dde36", + "react-native": "0.82.0-nightly-20250806-5936f29d6", "react-native-windows": "^0.0.0-canary.999", "react-native-xaml": "^0.0.80" }, "devDependencies": { - "@react-native/tester": "0.80.0-main", - "@react-native/new-app-screen": "0.81.0-nightly-20250709-6892dde36", + "@react-native/tester": "0.82.0-main", + "@react-native/new-app-screen": "0.82.0-nightly-20250806-5936f29d6", "@rnw-scripts/babel-react-native-config": "0.0.0", "@rnw-scripts/eslint-config": "1.2.37", "@rnw-scripts/just-task": "2.3.56", @@ -41,4 +41,4 @@ "engines": { "node": ">= 22" } -} +} \ No newline at end of file diff --git a/packages/@react-native/monorepo/package.json b/packages/@react-native/monorepo/package.json index 2617d2533ad..6f2d5034b77 100644 --- a/packages/@react-native/monorepo/package.json +++ b/packages/@react-native/monorepo/package.json @@ -13,19 +13,9 @@ "flow": "flow", "format-check": "prettier --list-different \"./**/*.{js,md,yml,ts,tsx}\"", "format": "npm run prettier && npm run clang-format", -<<<<<<< Upstream - "featureflags": "yarn --cwd packages/react-native featureflags", - "js-api-diff": "node ./scripts/js-api/diff-api-snapshot", - "lint-ci": "./.github/workflow-scripts/analyze_code.sh && yarn shellcheck", - "lint-kotlin-check": "./gradlew ktfmtCheck", - "lint-kotlin": "./gradlew ktfmtFormat", - "lint-markdown": "markdownlint-cli2 2>&1", - "lint": "eslint --max-warnings 0 .", -======= "featureflags": "cd packages/react-native && yarn featureflags", "lint-ci": "./scripts/circleci/analyze_code.sh && yarn shellcheck", "lint-java": "node ./scripts/lint-java.js", ->>>>>>> Override "prettier": "prettier --write \"./**/*.{js,md,yml,ts,tsx}\"", "print-packages": "node ./scripts/monorepo/print", "shellcheck": "./scripts/circleci/analyze_scripts.sh", @@ -57,20 +47,12 @@ "@babel/preset-env": "^7.25.3", "@babel/preset-flow": "^7.24.7", "@jest/create-cache-key-function": "^29.7.0", -<<<<<<< Upstream "@microsoft/api-extractor": "^7.52.2", - "@react-native/metro-babel-transformer": "0.82.0-main", - "@react-native/metro-config": "0.82.0-main", + "@react-native/metro-babel-transformer": "0.82.0-nightly-20250806-5936f29d6", + "@react-native/metro-config": "0.82.0-nightly-20250806-5936f29d6", "@tsconfig/node22": "22.0.2", "@types/react": "^19.1.0", "@typescript-eslint/parser": "^8.36.0", -======= - "@react-native/metro-babel-transformer": "0.81.0-nightly-20250709-6892dde36", - "@react-native/metro-config": "0.81.0-nightly-20250709-6892dde36", - "@tsconfig/node18": "1.0.1", - "@types/react": "^19.0.0", - "@typescript-eslint/parser": "^7.1.1", ->>>>>>> Override "ansi-styles": "^4.2.1", "babel-plugin-minify-dead-code-elimination": "^0.5.2", "babel-plugin-syntax-hermes-parser": "0.30.0", @@ -91,20 +73,12 @@ "eslint-plugin-react-native": "^4.0.0", "eslint-plugin-redundant-undefined": "^0.4.0", "eslint-plugin-relay": "^1.8.3", -<<<<<<< Upstream "flow-api-translator": "0.30.0", "flow-bin": "^0.278.0", "glob": "^7.1.1", "hermes-eslint": "0.30.0", "hermes-transform": "0.30.0", "ini": "^5.0.0", -======= - "flow-api-translator": "0.29.1", - "flow-bin": "^0.274.2", - "glob": "^7.1.1", - "hermes-eslint": "0.29.1", - "hermes-transform": "0.29.1", ->>>>>>> Override "inquirer": "^7.1.0", "jest": "^29.7.0", "jest-config": "^29.7.0", @@ -113,15 +87,11 @@ "jest-snapshot": "^29.7.0", "markdownlint-cli2": "^0.17.2", "markdownlint-rule-relative-links": "^3.0.0", -<<<<<<< Upstream "memfs": "^4.7.7", "metro-babel-register": "^0.83.1", "metro-transform-plugins": "^0.83.1", -======= - "metro-babel-register": "^0.82.4", "metro-memory-fs": "^0.82.4", - "metro-transform-plugins": "^0.82.4", ->>>>>>> Override + "metro-transform-plugins": "^0.83.1", "micromatch": "^4.0.4", "node-fetch": "^2.2.0", "nullthrows": "^1.1.1", diff --git a/packages/@react-native/tester/overrides.json b/packages/@react-native/tester/overrides.json index 12ea3ca0f85..538559ae879 100644 --- a/packages/@react-native/tester/overrides.json +++ b/packages/@react-native/tester/overrides.json @@ -271,7 +271,7 @@ "type": "copy", "directory": "js/examples/OSSLibraryExample", "baseDirectory": "packages/rn-tester/js/examples/OSSLibraryExample", - "baseVersion": "0.81.0-nightly-20250709-6892dde36", + "baseVersion": "0.82.0-nightly-20250806-5936f29d6", "baseHash": "5e81207c1955cdd2c2e3c307785d614f74ff858f", "issue": 4054 }, diff --git a/packages/@react-native/tester/package.json b/packages/@react-native/tester/package.json index 3af9ae5653f..ad5e4d8e709 100644 --- a/packages/@react-native/tester/package.json +++ b/packages/@react-native/tester/package.json @@ -26,8 +26,8 @@ "e2e-test-ios": "./scripts/maestro-test-ios.sh" }, "dependencies": { - "@react-native/new-app-screen": "0.81.0-nightly-20250709-6892dde36", - "@react-native/popup-menu-android": "0.81.0-nightly-20250709-6892dde36", + "@react-native/new-app-screen": "0.82.0-nightly-20250806-5936f29d6", + "@react-native/popup-menu-android": "0.82.0-nightly-20250806-5936f29d6", "flow-enums-runtime": "^0.0.6", "invariant": "^2.2.4", "nullthrows": "^1.1.1" @@ -64,4 +64,4 @@ "listr2": "^6.4.1", "rxjs": "npm:@react-native-community/rxjs@6.5.4-custom" } -} +} \ No newline at end of file diff --git a/packages/@rnw-scripts/babel-react-native-config/package.json b/packages/@rnw-scripts/babel-react-native-config/package.json index fad06ee3473..df7cdffd8d4 100644 --- a/packages/@rnw-scripts/babel-react-native-config/package.json +++ b/packages/@rnw-scripts/babel-react-native-config/package.json @@ -11,12 +11,12 @@ }, "dependencies": { "@babel/core": "^7.25.2", - "@react-native/babel-preset": "0.81.0-nightly-20250709-6892dde36", + "@react-native/babel-preset": "0.82.0-nightly-20250806-5936f29d6", "babel-plugin-transform-flow-enums": "^0.0.2" }, "devDependencies": { "@babel/core": "^7.25.2", - "@react-native/babel-preset": "0.81.0-nightly-20250709-6892dde36", + "@react-native/babel-preset": "0.82.0-nightly-20250806-5936f29d6", "eslint": "^8.19.0", "prettier": "2.8.8" }, diff --git a/packages/@rnw-scripts/metro-dev-config/package.json b/packages/@rnw-scripts/metro-dev-config/package.json index 06938bb54e6..b84dcbc6e12 100644 --- a/packages/@rnw-scripts/metro-dev-config/package.json +++ b/packages/@rnw-scripts/metro-dev-config/package.json @@ -17,7 +17,7 @@ "lint:fix": "rnw-scripts lint:fix" }, "dependencies": { - "@react-native/metro-config": "0.81.0-nightly-20250709-6892dde36", + "@react-native/metro-config": "0.82.0-nightly-20250806-5936f29d6", "@rnx-kit/metro-config": "^1.3.5", "@rnx-kit/metro-plugin-duplicates-checker": "^2.1.0", "@rnx-kit/metro-serializer": "^1.0.11", diff --git a/packages/integration-test-app/package.json b/packages/integration-test-app/package.json index 04227265b5d..dbd6d2ca56c 100644 --- a/packages/integration-test-app/package.json +++ b/packages/integration-test-app/package.json @@ -28,7 +28,7 @@ "@babel/traverse": "^7.11.5", "@babel/types": "^7.11.5", "@react-native-community/cli": "17.0.0", - "@react-native/metro-config": "0.81.0-nightly-20250709-6892dde36", + "@react-native/metro-config": "0.82.0-nightly-20250806-5936f29d6", "@rnw-scripts/babel-node-config": "2.3.3", "@rnw-scripts/eslint-config": "^1.2.37", "@rnw-scripts/just-task": "^2.3.56", @@ -51,4 +51,4 @@ "engines": { "node": ">= 22" } -} +} \ No newline at end of file diff --git a/packages/playground/package.json b/packages/playground/package.json index 712d1780e07..9b38e1ee8ef 100644 --- a/packages/playground/package.json +++ b/packages/playground/package.json @@ -22,7 +22,7 @@ "@babel/core": "^7.25.2", "@babel/runtime": "^7.20.0", "@react-native-community/cli": "17.0.0", - "@react-native/metro-config": "0.81.0-nightly-20250709-6892dde36", + "@react-native/metro-config": "0.82.0-nightly-20250806-5936f29d6", "@rnw-scripts/babel-react-native-config": "0.0.0", "@rnw-scripts/eslint-config": "1.2.37", "@rnw-scripts/just-task": "2.3.56", @@ -39,4 +39,4 @@ "engines": { "node": ">= 22" } -} +} \ No newline at end of file diff --git a/packages/sample-app-fabric/package.json b/packages/sample-app-fabric/package.json index c176f154fcf..af4bab3da89 100644 --- a/packages/sample-app-fabric/package.json +++ b/packages/sample-app-fabric/package.json @@ -15,7 +15,7 @@ "@types/react": "^19.1.0", "@typescript-eslint/eslint-plugin": "^7.1.1", "@typescript-eslint/parser": "^7.1.1", - "@react-native/new-app-screen": "0.81.0-nightly-20250709-6892dde36", + "@react-native/new-app-screen": "0.82.0-nightly-20250806-5936f29d6", "react": "^19.1.0", "react-native": "0.82.0-nightly-20250806-5936f29d6", "react-native-windows": "^0.0.0-canary.999" @@ -28,7 +28,7 @@ "@babel/runtime": "^7.20.0", "@jest/globals": "^29.7.0", "@react-native-community/cli": "17.0.0", - "@react-native/metro-config": "0.81.0-nightly-20250709-6892dde36", + "@react-native/metro-config": "0.82.0-nightly-20250806-5936f29d6", "@rnw-scripts/babel-node-config": "2.3.3", "@rnw-scripts/babel-react-native-config": "0.0.0", "@rnw-scripts/eslint-config": "1.2.37", @@ -49,4 +49,4 @@ "engines": { "node": ">=18" } -} +} \ No newline at end of file diff --git a/packages/sample-apps/package.json b/packages/sample-apps/package.json index 12c26168a64..dac8e2b0289 100644 --- a/packages/sample-apps/package.json +++ b/packages/sample-apps/package.json @@ -26,7 +26,7 @@ "@react-native-community/cli": "17.0.0", "@react-native-windows/cli": "0.0.0-canary.277", "@react-native-windows/codegen": "0.0.0-canary.126", - "@react-native/metro-config": "0.81.0-nightly-20250709-6892dde36", + "@react-native/metro-config": "0.82.0-nightly-20250806-5936f29d6", "@rnw-scripts/babel-react-native-config": "0.0.0", "@rnw-scripts/eslint-config": "1.2.37", "@rnw-scripts/just-task": "2.3.56", @@ -50,4 +50,4 @@ "engines": { "node": ">= 22" } -} +} \ No newline at end of file diff --git a/packages/sample-custom-component/package.json b/packages/sample-custom-component/package.json index bcb78cceb03..eba505b4e47 100644 --- a/packages/sample-custom-component/package.json +++ b/packages/sample-custom-component/package.json @@ -32,7 +32,7 @@ "@babel/preset-typescript": "^7.8.3", "@babel/runtime": "^7.20.0", "@react-native-community/cli": "17.0.0", - "@react-native/metro-config": "0.81.0-nightly-20250709-6892dde36", + "@react-native/metro-config": "0.82.0-nightly-20250806-5936f29d6", "@rnw-scripts/babel-node-config": "2.3.3", "@rnw-scripts/babel-react-native-config": "0.0.0", "@rnw-scripts/eslint-config": "1.2.37", @@ -53,4 +53,4 @@ "engines": { "node": ">=18" } -} +} \ No newline at end of file diff --git a/vnext/package.json b/vnext/package.json index 6c93e635fa3..47a86d919c6 100644 --- a/vnext/package.json +++ b/vnext/package.json @@ -28,14 +28,14 @@ "@react-native-community/cli-platform-ios": "17.0.0", "@react-native-windows/cli": "0.0.0-canary.277", "@react-native/assets": "1.0.0", - "@react-native/assets-registry": "0.81.0-nightly-20250709-6892dde36", - "@react-native/codegen": "0.81.0-nightly-20250709-6892dde36", - "@react-native/community-cli-plugin": "0.81.0-nightly-20250709-6892dde36", - "@react-native/gradle-plugin": "0.81.0-nightly-20250709-6892dde36", - "@react-native/js-polyfills": "0.81.0-nightly-20250709-6892dde36", - "@react-native/normalize-colors": "0.81.0-nightly-20250709-6892dde36", - "@react-native/virtualized-lists": "0.81.0-nightly-20250709-6892dde36", - "@react-native/new-app-screen": "0.81.0-nightly-20250709-6892dde36", + "@react-native/assets-registry": "0.82.0-nightly-20250806-5936f29d6", + "@react-native/codegen": "0.82.0-nightly-20250806-5936f29d6", + "@react-native/community-cli-plugin": "0.82.0-nightly-20250806-5936f29d6", + "@react-native/gradle-plugin": "0.82.0-nightly-20250806-5936f29d6", + "@react-native/js-polyfills": "0.82.0-nightly-20250806-5936f29d6", + "@react-native/normalize-colors": "0.82.0-nightly-20250806-5936f29d6", + "@react-native/virtualized-lists": "0.82.0-nightly-20250806-5936f29d6", + "@react-native/new-app-screen": "0.82.0-nightly-20250806-5936f29d6", "abort-controller": "^3.0.0", "anser": "^1.4.9", "ansi-regex": "^5.0.0", @@ -69,7 +69,7 @@ }, "devDependencies": { "@react-native-windows/codegen": "0.0.0-canary.126", - "@react-native/metro-config": "0.81.0-nightly-20250709-6892dde36", + "@react-native/metro-config": "0.82.0-nightly-20250806-5936f29d6", "@rnw-scripts/babel-react-native-config": "0.0.0", "@rnw-scripts/eslint-config": "1.2.37", "@rnw-scripts/jest-out-of-tree-snapshot-resolver": "^1.1.41", @@ -92,7 +92,7 @@ "peerDependencies": { "@types/react": "^19.1.0", "react": "^19.1.0", - "react-native": "0.81.0-nightly-20250709-6892dde36" + "react-native": "0.82.0-nightly-20250806-5936f29d6" }, "beachball": { "defaultNpmTag": "canary", @@ -151,4 +151,4 @@ "engines": { "node": ">= 22" } -} +} \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 90f3ba48802..93bd2f2eac3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1376,6 +1376,18 @@ resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz#4a2868d75d6d6963e423bcf90b7fd1be343409d3" integrity sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA== +"@isaacs/balanced-match@^4.0.1": + version "4.0.1" + resolved "https://registry.yarnpkg.com/@isaacs/balanced-match/-/balanced-match-4.0.1.tgz#3081dadbc3460661b751e7591d7faea5df39dd29" + integrity sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ== + +"@isaacs/brace-expansion@^5.0.0": + version "5.0.0" + resolved "https://registry.yarnpkg.com/@isaacs/brace-expansion/-/brace-expansion-5.0.0.tgz#4b3dabab7d8e75a429414a96bd67bf4c1d13e0f3" + integrity sha512-ZT55BDLV0yv0RBm2czMiZ+SqCGO7AvmOM3G/w2xhVPH+te0aKgFjmBvGlL1dH+ql2tgGO3MVrbb3jCKyvpgnxA== + dependencies: + "@isaacs/balanced-match" "^4.0.1" + "@isaacs/ttlcache@^1.4.1": version "1.4.1" resolved "https://registry.yarnpkg.com/@isaacs/ttlcache/-/ttlcache-1.4.1.tgz#21fb23db34e9b6220c6ba023a0118a2dd3461ea2" @@ -1680,6 +1692,51 @@ "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" +"@jsonjoy.com/base64@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@jsonjoy.com/base64/-/base64-1.1.2.tgz#cf8ea9dcb849b81c95f14fc0aaa151c6b54d2578" + integrity sha512-q6XAnWQDIMA3+FTiOYajoYqySkO+JSat0ytXGSuRdq9uXE7o92gzuQwQM14xaCRlBLGq3v5miDGC4vkVTn54xA== + +"@jsonjoy.com/buffers@^1.0.0", "@jsonjoy.com/buffers@^1.2.0": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@jsonjoy.com/buffers/-/buffers-1.2.1.tgz#8d99c7f67eaf724d3428dfd9826c6455266a5c83" + integrity sha512-12cdlDwX4RUM3QxmUbVJWqZ/mrK6dFQH4Zxq6+r1YXKXYBNgZXndx2qbCJwh3+WWkCSn67IjnlG3XYTvmvYtgA== + +"@jsonjoy.com/codegen@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@jsonjoy.com/codegen/-/codegen-1.0.0.tgz#5c23f796c47675f166d23b948cdb889184b93207" + integrity sha512-E8Oy+08cmCf0EK/NMxpaJZmOxPqM+6iSe2S4nlSBrPZOORoDJILxtbSUEDKQyTamm/BVAhIGllOBNU79/dwf0g== + +"@jsonjoy.com/json-pack@^1.11.0": + version "1.21.0" + resolved "https://registry.yarnpkg.com/@jsonjoy.com/json-pack/-/json-pack-1.21.0.tgz#93f8dd57fe3a3a92132b33d1eb182dcd9e7629fa" + integrity sha512-+AKG+R2cfZMShzrF2uQw34v3zbeDYUqnQ+jg7ORic3BGtfw9p/+N6RJbq/kkV8JmYZaINknaEQ2m0/f693ZPpg== + dependencies: + "@jsonjoy.com/base64" "^1.1.2" + "@jsonjoy.com/buffers" "^1.2.0" + "@jsonjoy.com/codegen" "^1.0.0" + "@jsonjoy.com/json-pointer" "^1.0.2" + "@jsonjoy.com/util" "^1.9.0" + hyperdyperid "^1.2.0" + thingies "^2.5.0" + tree-dump "^1.1.0" + +"@jsonjoy.com/json-pointer@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@jsonjoy.com/json-pointer/-/json-pointer-1.0.2.tgz#049cb530ac24e84cba08590c5e36b431c4843408" + integrity sha512-Fsn6wM2zlDzY1U+v4Nc8bo3bVqgfNTGcn6dMgs6FjrEnt4ZCe60o6ByKRjOGlI2gow0aE/Q41QOigdTqkyK5fg== + dependencies: + "@jsonjoy.com/codegen" "^1.0.0" + "@jsonjoy.com/util" "^1.9.0" + +"@jsonjoy.com/util@^1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@jsonjoy.com/util/-/util-1.9.0.tgz#7ee95586aed0a766b746cd8d8363e336c3c47c46" + integrity sha512-pLuQo+VPRnN8hfPqUTLTHk126wuYdXVxE6aDmjSeV4NCAgyxWbiOIeNJVtID3h1Vzpoi9m4jXezf73I6LgabgQ== + dependencies: + "@jsonjoy.com/buffers" "^1.0.0" + "@jsonjoy.com/codegen" "^1.0.0" + "@kwsites/file-exists@^1.1.1": version "1.1.1" resolved "https://registry.yarnpkg.com/@kwsites/file-exists/-/file-exists-1.1.1.tgz#ad1efcac13e1987d8dbaf235ef3be5b0d96faa99" @@ -1714,6 +1771,34 @@ "@nevware21/ts-async" ">= 0.5.4 < 2.x" "@nevware21/ts-utils" ">= 0.11.8 < 2.x" +"@microsoft/api-extractor-model@7.31.1": + version "7.31.1" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.31.1.tgz#b7667c0e4a842121fdbbf226498c5d4070ba3e33" + integrity sha512-Dhnip5OFKbl85rq/ICHBFGhV4RA5UQSl8AC/P/zoGvs+CBudPkatt5kIhMGiYgVPnUWmfR6fcp38+1AFLYNtUw== + dependencies: + "@microsoft/tsdoc" "~0.15.1" + "@microsoft/tsdoc-config" "~0.17.1" + "@rushstack/node-core-library" "5.17.0" + +"@microsoft/api-extractor@^7.52.2": + version "7.53.1" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.53.1.tgz#896cbee189a0a3e9f302d5061a761d0205592e65" + integrity sha512-bul5eTNxijLdDBqLye74u9494sRmf+9QULtec9Od0uHnifahGeNt8CC4/xCdn7mVyEBrXIQyQ5+sc4Uc0QfBSA== + dependencies: + "@microsoft/api-extractor-model" "7.31.1" + "@microsoft/tsdoc" "~0.15.1" + "@microsoft/tsdoc-config" "~0.17.1" + "@rushstack/node-core-library" "5.17.0" + "@rushstack/rig-package" "0.6.0" + "@rushstack/terminal" "0.19.1" + "@rushstack/ts-command-line" "5.1.1" + lodash "~4.17.15" + minimatch "10.0.3" + resolve "~1.22.1" + semver "~7.5.4" + source-map "~0.6.1" + typescript "5.8.2" + "@microsoft/applicationinsights-core-js@3.3.10": version "3.3.10" resolved "https://registry.yarnpkg.com/@microsoft/applicationinsights-core-js/-/applicationinsights-core-js-3.3.10.tgz#a30ab61c1b33c82226479b9adfbaf3bc4c85cff9" @@ -1747,6 +1832,21 @@ eslint-plugin-react "7.33.0" eslint-plugin-security "1.4.0" +"@microsoft/tsdoc-config@~0.17.1": + version "0.17.1" + resolved "https://registry.yarnpkg.com/@microsoft/tsdoc-config/-/tsdoc-config-0.17.1.tgz#e0f0b50628f4ad7fe121ca616beacfe6a25b9335" + integrity sha512-UtjIFe0C6oYgTnad4q1QP4qXwLhe6tIpNTRStJ2RZEPIkqQPREAwE5spzVxsdn9UaEMUqhh0AqSx3X4nWAKXWw== + dependencies: + "@microsoft/tsdoc" "0.15.1" + ajv "~8.12.0" + jju "~1.4.0" + resolve "~1.22.2" + +"@microsoft/tsdoc@0.15.1", "@microsoft/tsdoc@~0.15.1": + version "0.15.1" + resolved "https://registry.yarnpkg.com/@microsoft/tsdoc/-/tsdoc-0.15.1.tgz#d4f6937353bc4568292654efb0a0e0532adbcba2" + integrity sha512-4aErSrCR/On/e5G2hDP0wjooqDdauzEbIq8hIkIe5pXV0rtWJZvdCEKL0ykZxex+IxIwBp0eGeV48hQN07dXtw== + "@nevware21/ts-async@>= 0.5.4 < 2.x": version "0.5.4" resolved "https://registry.yarnpkg.com/@nevware21/ts-async/-/ts-async-0.5.4.tgz#52f8449dd0b3b16aa317a18b4662f6fb13a135f1" @@ -2080,11 +2180,6 @@ resolved "https://registry.yarnpkg.com/@react-native-picker/picker/-/picker-2.11.3.tgz#60ed5d55de430136dcfa1c8a9d0194ad09d1c58d" integrity sha512-aknxi+6dmNrSk0Bev+cnhsUAwi3Iz7KTj8lSHnGNcU+P9VkCGN6QQDcU0e2gnWLY3zhS3HzV+DBTmzR9ia6kTg== -"@react-native/assets-registry@0.81.0-nightly-20250709-6892dde36": - version "0.81.0-nightly-20250709-6892dde36" - resolved "https://registry.yarnpkg.com/@react-native/assets-registry/-/assets-registry-0.81.0-nightly-20250709-6892dde36.tgz#25a5f901732ff2a1a5c161a8459f3ff876968d3f" - integrity sha512-dTVO+10qEqLZFuxjfnhw17ntjLlEUNxANpXLNuAxKf3Hiaj1xTgLBK3imR+ewSyD/P5sP4s91/IW+zYqEULB7g== - "@react-native/assets-registry@0.82.0-nightly-20250806-5936f29d6": version "0.82.0-nightly-20250806-5936f29d6" resolved "https://registry.yarnpkg.com/@react-native/assets-registry/-/assets-registry-0.82.0-nightly-20250806-5936f29d6.tgz#4a119406a1e38f96eb324d3db7808dff63eeda5d" @@ -2103,13 +2198,13 @@ "@babel/traverse" "^7.25.3" "@react-native/codegen" "0.80.0-nightly-20250506-3ac16dd6a" -"@react-native/babel-plugin-codegen@0.81.0-nightly-20250709-6892dde36": - version "0.81.0-nightly-20250709-6892dde36" - resolved "https://registry.yarnpkg.com/@react-native/babel-plugin-codegen/-/babel-plugin-codegen-0.81.0-nightly-20250709-6892dde36.tgz#3c5c643ac0d73f299e9c5f090462f69a90aec911" - integrity sha512-6UGNwgObieN+mjlKLYJV7THjOzPI9vnyP/vL4WcoLDOgZ+lDCWh4sY8YZLfuzrFVTkXrjp56O+PVAiN4lQrMzw== +"@react-native/babel-plugin-codegen@0.82.0-nightly-20250806-5936f29d6": + version "0.82.0-nightly-20250806-5936f29d6" + resolved "https://registry.yarnpkg.com/@react-native/babel-plugin-codegen/-/babel-plugin-codegen-0.82.0-nightly-20250806-5936f29d6.tgz#3fb677db687b90993337674797abb10dcaf2f334" + integrity sha512-Q3aAKATgTJkDEGQt3NvEyfH4r90iO3ONjJHZtOM6J2+xKd/umn/1EwC4gFvhtA7eEtRekuNXfF9Q3xu1HlKiZQ== dependencies: "@babel/traverse" "^7.25.3" - "@react-native/codegen" "0.81.0-nightly-20250709-6892dde36" + "@react-native/codegen" "0.82.0-nightly-20250806-5936f29d6" "@react-native/babel-preset@0.80.0-nightly-20250506-3ac16dd6a": version "0.80.0-nightly-20250506-3ac16dd6a" @@ -2162,10 +2257,10 @@ babel-plugin-transform-flow-enums "^0.0.2" react-refresh "^0.14.0" -"@react-native/babel-preset@0.81.0-nightly-20250709-6892dde36": - version "0.81.0-nightly-20250709-6892dde36" - resolved "https://registry.yarnpkg.com/@react-native/babel-preset/-/babel-preset-0.81.0-nightly-20250709-6892dde36.tgz#bfa88593a79f408e29c04f92cb9bf9623d314241" - integrity sha512-RElV/9n0tJQ5xhd+Zw6RpOnf/NKvnU48iMMRQ7+oRq7Hbkzds9uZIpreuPb8M5Z5QETWlPFprm1onypvtLbUIg== +"@react-native/babel-preset@0.82.0-nightly-20250806-5936f29d6": + version "0.82.0-nightly-20250806-5936f29d6" + resolved "https://registry.yarnpkg.com/@react-native/babel-preset/-/babel-preset-0.82.0-nightly-20250806-5936f29d6.tgz#05a8cfe6fc9ddb0b7d29bc0d73f999cc24ac61d6" + integrity sha512-9nDG4L4X7eNlOWjvKTiGh+dU3Fsxd5p9Yv0NnSIHMx8DiZqMlpub5iCTRPZdcTzNARrObBicAYWiXKqyeo1DPA== dependencies: "@babel/core" "^7.25.2" "@babel/plugin-proposal-export-default-from" "^7.24.7" @@ -2208,8 +2303,8 @@ "@babel/plugin-transform-typescript" "^7.25.2" "@babel/plugin-transform-unicode-regex" "^7.24.7" "@babel/template" "^7.25.0" - "@react-native/babel-plugin-codegen" "0.81.0-nightly-20250709-6892dde36" - babel-plugin-syntax-hermes-parser "0.29.1" + "@react-native/babel-plugin-codegen" "0.82.0-nightly-20250806-5936f29d6" + babel-plugin-syntax-hermes-parser "0.30.0" babel-plugin-transform-flow-enums "^0.0.2" react-refresh "^0.14.0" @@ -2224,17 +2319,6 @@ nullthrows "^1.1.1" yargs "^17.6.2" -"@react-native/codegen@0.81.0-nightly-20250709-6892dde36": - version "0.81.0-nightly-20250709-6892dde36" - resolved "https://registry.yarnpkg.com/@react-native/codegen/-/codegen-0.81.0-nightly-20250709-6892dde36.tgz#197f25d199347470e6b23f9e51de3fa6af17af3a" - integrity sha512-yx5CHblK45WknySmcx7CrXwY+pc2BN+5epMFqnSu3YblLWsiHu0uld8CqA4wvW9K6/8GWeU14RlQHYZDCSycKw== - dependencies: - glob "^7.1.1" - hermes-parser "0.29.1" - invariant "^2.2.4" - nullthrows "^1.1.1" - yargs "^17.6.2" - "@react-native/codegen@0.82.0-nightly-20250806-5936f29d6": version "0.82.0-nightly-20250806-5936f29d6" resolved "https://registry.yarnpkg.com/@react-native/codegen/-/codegen-0.82.0-nightly-20250806-5936f29d6.tgz#73ae2fe587b513a8ea11967131213a5f90e32c17" @@ -2246,19 +2330,6 @@ nullthrows "^1.1.1" yargs "^17.6.2" -"@react-native/community-cli-plugin@0.81.0-nightly-20250709-6892dde36": - version "0.81.0-nightly-20250709-6892dde36" - resolved "https://registry.yarnpkg.com/@react-native/community-cli-plugin/-/community-cli-plugin-0.81.0-nightly-20250709-6892dde36.tgz#ce62c7125724054e7da3731751c44b2883054c97" - integrity sha512-hf08Jo33ssuLwU2Ys11iF8DZV4faZzTo67/RWDRatduzm3R+AfcNawTQltbtknjH/wQtYiRFASs47N+HQEz9YQ== - dependencies: - "@react-native/dev-middleware" "0.81.0-nightly-20250709-6892dde36" - debug "^4.4.0" - invariant "^2.2.4" - metro "^0.82.5" - metro-config "^0.82.5" - metro-core "^0.82.5" - semver "^7.1.3" - "@react-native/community-cli-plugin@0.82.0-nightly-20250806-5936f29d6": version "0.82.0-nightly-20250806-5936f29d6" resolved "https://registry.yarnpkg.com/@react-native/community-cli-plugin/-/community-cli-plugin-0.82.0-nightly-20250806-5936f29d6.tgz#7fb12645abfe56c3f4860e4bee39b197be5810c1" @@ -2272,33 +2343,11 @@ metro-core "^0.83.1" semver "^7.1.3" -"@react-native/debugger-frontend@0.81.0-nightly-20250709-6892dde36": - version "0.81.0-nightly-20250709-6892dde36" - resolved "https://registry.yarnpkg.com/@react-native/debugger-frontend/-/debugger-frontend-0.81.0-nightly-20250709-6892dde36.tgz#f58e9a8baade491b7d639f6150b3b010e7e23edd" - integrity sha512-Y2c2wAi5q73sWFLv8c++xJN/Gzl/kHrjmuewS7M1CoimbL8U42O7Wbu67B9WMqoJpyvwEYEerUbuy7NGAUds7g== - "@react-native/debugger-frontend@0.82.0-nightly-20250806-5936f29d6": version "0.82.0-nightly-20250806-5936f29d6" resolved "https://registry.yarnpkg.com/@react-native/debugger-frontend/-/debugger-frontend-0.82.0-nightly-20250806-5936f29d6.tgz#bc63b4b7e0f47c6b985619006c0baa764199d033" integrity sha512-s8BeUUY0Rih/1O2tcq7ToSuPZU89MOd9ULRdetyQl4yYhIXAdUoFqMvOPIfR+vEr9LoiFQII1ln3ebw4NQjJuw== -"@react-native/dev-middleware@0.81.0-nightly-20250709-6892dde36": - version "0.81.0-nightly-20250709-6892dde36" - resolved "https://registry.yarnpkg.com/@react-native/dev-middleware/-/dev-middleware-0.81.0-nightly-20250709-6892dde36.tgz#753fc9a2b558ea835183134d824cd94723ac9433" - integrity sha512-Zmjvj2SxuUb+LmfPJKA9Dw1kpgCuk2JBiwALiXtTPekDUo0Y2ffdsahcAr7YS4DwZlDBXCeETWg/PB6e+kRFow== - dependencies: - "@isaacs/ttlcache" "^1.4.1" - "@react-native/debugger-frontend" "0.81.0-nightly-20250709-6892dde36" - chrome-launcher "^0.15.2" - chromium-edge-launcher "^0.2.0" - connect "^3.6.5" - debug "^4.4.0" - invariant "^2.2.4" - nullthrows "^1.1.1" - open "^7.0.3" - serve-static "^1.16.2" - ws "^6.2.3" - "@react-native/dev-middleware@0.82.0-nightly-20250806-5936f29d6": version "0.82.0-nightly-20250806-5936f29d6" resolved "https://registry.yarnpkg.com/@react-native/dev-middleware/-/dev-middleware-0.82.0-nightly-20250806-5936f29d6.tgz#defd9ebb0fea88a531ca2968ff13a8d60b63611b" @@ -2339,11 +2388,6 @@ resolved "https://registry.yarnpkg.com/@react-native/eslint-plugin/-/eslint-plugin-0.79.0-nightly-20250123-d1028885e.tgz#7983608a83b724ab2f31d2e84e67fb5f9a7ad3b1" integrity sha512-vYrjxRh3wvL9MmmmsO52keyONK8O7CqayB1gvgSf/EeptcnnCpd0YdJ06NU54aB3zh6p+k4vkxHliNFqpBTFBg== -"@react-native/gradle-plugin@0.81.0-nightly-20250709-6892dde36": - version "0.81.0-nightly-20250709-6892dde36" - resolved "https://registry.yarnpkg.com/@react-native/gradle-plugin/-/gradle-plugin-0.81.0-nightly-20250709-6892dde36.tgz#e8154919987ef6f997a7f4ba9c9aad0aa9322421" - integrity sha512-KUi43W/R9rkRLYkq6A6Bc7XiBxWBuRPxEKo4LTXPVhj6oLz2YKWcjXhuSzIMDkh2KeFhrDdZ7aFNOoj5ua3OVg== - "@react-native/gradle-plugin@0.82.0-nightly-20250806-5936f29d6": version "0.82.0-nightly-20250806-5936f29d6" resolved "https://registry.yarnpkg.com/@react-native/gradle-plugin/-/gradle-plugin-0.82.0-nightly-20250806-5936f29d6.tgz#92c30c682a4f1c307507b1f9277a4ba2ae42938a" @@ -2354,11 +2398,6 @@ resolved "https://registry.yarnpkg.com/@react-native/js-polyfills/-/js-polyfills-0.80.0-nightly-20250506-3ac16dd6a.tgz#f2c36c596e817f66ad6ff0084f5e0261876252f5" integrity sha512-NGyURPiR5p5vZ8waweCrHNumRS4oKX+vJ+3WXZDlx4F5mfXq6QUcQW4djUjOqUVYxpdfCMw23fKCEeNQIPbu8Q== -"@react-native/js-polyfills@0.81.0-nightly-20250709-6892dde36": - version "0.81.0-nightly-20250709-6892dde36" - resolved "https://registry.yarnpkg.com/@react-native/js-polyfills/-/js-polyfills-0.81.0-nightly-20250709-6892dde36.tgz#52f97dabb0c87565fa49d704e7f0691ff3f7c465" - integrity sha512-Kmge3ec+3L5Dm/heBYodx2OUUqCzf6SIyng2eSP2Nd55/JmrMR5NR86RDh3ApFtXtgxDd9KRwulhva21H2IeTQ== - "@react-native/js-polyfills@0.82.0-nightly-20250806-5936f29d6": version "0.82.0-nightly-20250806-5936f29d6" resolved "https://registry.yarnpkg.com/@react-native/js-polyfills/-/js-polyfills-0.82.0-nightly-20250806-5936f29d6.tgz#66b3deaa9fe761bd47d8a70d15bbf7e6005a1b54" @@ -2374,14 +2413,14 @@ hermes-parser "0.28.1" nullthrows "^1.1.1" -"@react-native/metro-babel-transformer@0.81.0-nightly-20250709-6892dde36": - version "0.81.0-nightly-20250709-6892dde36" - resolved "https://registry.yarnpkg.com/@react-native/metro-babel-transformer/-/metro-babel-transformer-0.81.0-nightly-20250709-6892dde36.tgz#e214594b59d6c4a09e3265773ce6bfc7790ef104" - integrity sha512-iWM0SHgHLw6WYeruNNnaygDewgi7/iPT2NWH6ct8ynyVywE8aODoWAWqEAuRwangQRKJrhulffc34zydarYVgA== +"@react-native/metro-babel-transformer@0.82.0-nightly-20250806-5936f29d6": + version "0.82.0-nightly-20250806-5936f29d6" + resolved "https://registry.yarnpkg.com/@react-native/metro-babel-transformer/-/metro-babel-transformer-0.82.0-nightly-20250806-5936f29d6.tgz#14aa0a23da85782654a696463b19f335d10f0382" + integrity sha512-xo2DcGymId2lKQ1xbHbxgi4xQ63WNPdV8HCRBHSWBB9faYKe53M6Ng4DdBDZMprTp0QzavweaKnJarND4XAJjQ== dependencies: "@babel/core" "^7.25.2" - "@react-native/babel-preset" "0.81.0-nightly-20250709-6892dde36" - hermes-parser "0.29.1" + "@react-native/babel-preset" "0.82.0-nightly-20250806-5936f29d6" + hermes-parser "0.30.0" nullthrows "^1.1.1" "@react-native/metro-config@0.80.0-nightly-20250506-3ac16dd6a": @@ -2394,44 +2433,31 @@ metro-config "^0.82.2" metro-runtime "^0.82.2" -"@react-native/metro-config@0.81.0-nightly-20250709-6892dde36": - version "0.81.0-nightly-20250709-6892dde36" - resolved "https://registry.yarnpkg.com/@react-native/metro-config/-/metro-config-0.81.0-nightly-20250709-6892dde36.tgz#66fb27b4ff8dc25b706eaefe0ff3cce72b38a79a" - integrity sha512-XYQK21qlsIefha9jwHjlAMgZiZSY/2UI2lh3zlMjFoa74tmvojtmOukqqzuu5zoymf5MYdSjh+EjaOm12WP4Xg== +"@react-native/metro-config@0.82.0-nightly-20250806-5936f29d6": + version "0.82.0-nightly-20250806-5936f29d6" + resolved "https://registry.yarnpkg.com/@react-native/metro-config/-/metro-config-0.82.0-nightly-20250806-5936f29d6.tgz#8217df0215e649a09687e644d35e13b9880d5b2c" + integrity sha512-9eamlplJqGkHHKOR1eaQXjTQTu5D+RzKKSAVqACswb/TAj0Kq+8YLhTlQBwS3yQLa9vBB4UGWBtMXJOlfOlfcw== dependencies: - "@react-native/js-polyfills" "0.81.0-nightly-20250709-6892dde36" - "@react-native/metro-babel-transformer" "0.81.0-nightly-20250709-6892dde36" - metro-config "^0.82.5" - metro-runtime "^0.82.5" - -"@react-native/new-app-screen@0.81.0-nightly-20250709-6892dde36": - version "0.81.0-nightly-20250709-6892dde36" - resolved "https://registry.yarnpkg.com/@react-native/new-app-screen/-/new-app-screen-0.81.0-nightly-20250709-6892dde36.tgz#04615db1f00f0335826ce4b25268bab31d88897f" - integrity sha512-TJTquRYgmArO+E3eev5U3F5hvGrUBW1I59JIVi/WPKe0DEPfKoYAfFCotd/SZ36FhDsVWyBHbLANW5o4w0sodg== + "@react-native/js-polyfills" "0.82.0-nightly-20250806-5936f29d6" + "@react-native/metro-babel-transformer" "0.82.0-nightly-20250806-5936f29d6" + metro-config "^0.83.1" + metro-runtime "^0.83.1" -"@react-native/normalize-colors@0.81.0-nightly-20250709-6892dde36": - version "0.81.0-nightly-20250709-6892dde36" - resolved "https://registry.yarnpkg.com/@react-native/normalize-colors/-/normalize-colors-0.81.0-nightly-20250709-6892dde36.tgz#72138cce819e836ef626abc5fc18dc169e40cef2" - integrity sha512-l/haekyBuz9Uy6aRcp2RQssEa81kCPmtm8kET5BpjtFDyPYvWAkMCMoSFVl+ZvWUNobL1jsen1r1xkqgdG1ckw== +"@react-native/new-app-screen@0.82.0-nightly-20250806-5936f29d6": + version "0.82.0-nightly-20250806-5936f29d6" + resolved "https://registry.yarnpkg.com/@react-native/new-app-screen/-/new-app-screen-0.82.0-nightly-20250806-5936f29d6.tgz#81d1562709105544822b4c2113e66f19aae59885" + integrity sha512-hxLavc6FcUA3cOuNp3f+US+Oc1fS6qg7M6qF20QVN9LTZzuN4tZR1fh8dS3D+CJTVjPfxH4Y6/GEZHfRlY+SFA== "@react-native/normalize-colors@0.82.0-nightly-20250806-5936f29d6": version "0.82.0-nightly-20250806-5936f29d6" resolved "https://registry.yarnpkg.com/@react-native/normalize-colors/-/normalize-colors-0.82.0-nightly-20250806-5936f29d6.tgz#4fc975633180730d2189b682ff9f4007956f0ea6" integrity sha512-BFu6UNAqQu1ncBfUGxwIp5v0HDNQoK8Exr0SZl6BIpuvGARb/Zq8KcB7WURwTcIOa/bHK/4RWmH7QLPWLL7uJg== -"@react-native/popup-menu-android@0.81.0-nightly-20250709-6892dde36": - version "0.81.0-nightly-20250709-6892dde36" - resolved "https://registry.yarnpkg.com/@react-native/popup-menu-android/-/popup-menu-android-0.81.0-nightly-20250709-6892dde36.tgz#970136c5631d4191db9d46653ea6e683a9eb5e99" - integrity sha512-gtgeXVWtKeRsn83IgrkBJNb3rTvR/PGGM6pjidksBu+capIMiGwU1V/szM+GT39XiFJD+0kr1nvsMVjylk5etA== - dependencies: - nullthrows "^1.1.1" - -"@react-native/virtualized-lists@0.81.0-nightly-20250709-6892dde36": - version "0.81.0-nightly-20250709-6892dde36" - resolved "https://registry.yarnpkg.com/@react-native/virtualized-lists/-/virtualized-lists-0.81.0-nightly-20250709-6892dde36.tgz#431eafd6618a4e1a49226b259d005795ba6e7e97" - integrity sha512-pTfnQ6I/opGTRXbNfXN6flplWUs6eci7VFBQje4wCVK60mrt7N2Bd272ZKP5fBpTct668XCeQhoB7htRRmEfuw== +"@react-native/popup-menu-android@0.82.0-nightly-20250806-5936f29d6": + version "0.82.0-nightly-20250806-5936f29d6" + resolved "https://registry.yarnpkg.com/@react-native/popup-menu-android/-/popup-menu-android-0.82.0-nightly-20250806-5936f29d6.tgz#36c90c8b6fdde7ef55a38312fc4067b91b58f8d9" + integrity sha512-YTLkAkORHdxZW/1tXMszxAmk8OysToKmHwEf03nd0332ho55p4UCftZ/f8bX1gSfXSZtLINpNJ0adCPbcg6gLA== dependencies: - invariant "^2.2.4" nullthrows "^1.1.1" "@react-native/virtualized-lists@0.82.0-nightly-20250806-5936f29d6": @@ -2607,6 +2633,20 @@ dependencies: "@rnx-kit/tools-node" "^2.0.0" +"@rushstack/node-core-library@5.17.0": + version "5.17.0" + resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-5.17.0.tgz#30b9c7b1fe01f79e6448d0433d163ef4d3b290c9" + integrity sha512-24vt1GbHN6kyIglRMTVpyEiNRRRJK8uZHc1XoGAhmnTDKnrWet8OmOpImMswJIe6gM78eV8cMg1HXwuUHkSSgg== + dependencies: + ajv "~8.13.0" + ajv-draft-04 "~1.0.0" + ajv-formats "~3.0.1" + fs-extra "~11.3.0" + import-lazy "~4.0.0" + jju "~1.4.0" + resolve "~1.22.1" + semver "~7.5.4" + "@rushstack/node-core-library@5.9.0": version "5.9.0" resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-5.9.0.tgz#097213d518b29a9c28b46db9c2cc7968c67168f8" @@ -2628,6 +2668,38 @@ dependencies: "@rushstack/node-core-library" "5.9.0" +"@rushstack/problem-matcher@0.1.1": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@rushstack/problem-matcher/-/problem-matcher-0.1.1.tgz#db9303ef3c47010c8aba5841e8c9511e091159df" + integrity sha512-Fm5XtS7+G8HLcJHCWpES5VmeMyjAKaWeyZU5qPzZC+22mPlJzAsOxymHiWIfuirtPckX3aptWws+K2d0BzniJA== + +"@rushstack/rig-package@0.6.0": + version "0.6.0" + resolved "https://registry.yarnpkg.com/@rushstack/rig-package/-/rig-package-0.6.0.tgz#c80f93fe2c0d9d4977fc925ed9ce9decb75047a5" + integrity sha512-ZQmfzsLE2+Y91GF15c65L/slMRVhF6Hycq04D4TwtdGaUAbIXXg9c5pKA5KFU7M4QMaihoobp9JJYpYcaY3zOw== + dependencies: + resolve "~1.22.1" + strip-json-comments "~3.1.1" + +"@rushstack/terminal@0.19.1": + version "0.19.1" + resolved "https://registry.yarnpkg.com/@rushstack/terminal/-/terminal-0.19.1.tgz#56969818ee6511b4607a230db343cf0602c7389e" + integrity sha512-jsBuSad67IDVMO2yp0hDfs0OdE4z3mDIjIL2pclDT3aEJboeZXE85e1HjuD0F6JoW3XgHvDwoX+WOV+AVTDQeA== + dependencies: + "@rushstack/node-core-library" "5.17.0" + "@rushstack/problem-matcher" "0.1.1" + supports-color "~8.1.1" + +"@rushstack/ts-command-line@5.1.1": + version "5.1.1" + resolved "https://registry.yarnpkg.com/@rushstack/ts-command-line/-/ts-command-line-5.1.1.tgz#b7804bbe425e3baf8edf60bbd446db7ba13f3269" + integrity sha512-HPzFsUcr+wZ3oQI08Ec/E6cuiAVHKzrXZGHhwiwIGygAFiqN5QzX+ff30n70NU2WyE26CykgMwBZZSSyHCJrzA== + dependencies: + "@rushstack/terminal" "0.19.1" + "@types/argparse" "1.0.38" + argparse "~1.0.9" + string-argv "~0.3.1" + "@sideway/address@^4.1.5": version "4.1.5" resolved "https://registry.yarnpkg.com/@sideway/address/-/address-4.1.5.tgz#4bc149a0076623ced99ca8208ba780d65a99b9d5" @@ -2691,10 +2763,15 @@ resolved "https://registry.yarnpkg.com/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz#db4ecfd499a9765ab24002c3b696d02e6d32a12c" integrity sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA== -"@tsconfig/node18@1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@tsconfig/node18/-/node18-1.0.1.tgz#ea5b375a9ead6b09ccbd70c3894ea069829ea1bb" - integrity sha512-sNFeK6X2ATlhlvzyH4kKYQlfHXE2f2/wxtB9ClvYXevWpmwkUT7VaSrjIN9E76Qebz8qP5JOJJ9jD3QoD/Z9TA== +"@tsconfig/node22@22.0.2": + version "22.0.2" + resolved "https://registry.yarnpkg.com/@tsconfig/node22/-/node22-22.0.2.tgz#1e04e2c5cc946dac787d69bb502462a851ae51b6" + integrity sha512-Kmwj4u8sDRDrMYRoN9FDEcXD8UpBSaPQQ24Gz+Gamqfm7xxn+GBR7ge/Z7pK8OXNGyUzbSwJj+TH6B+DS/epyA== + +"@types/argparse@1.0.38": + version "1.0.38" + resolved "https://registry.yarnpkg.com/@types/argparse/-/argparse-1.0.38.tgz#a81fd8606d481f873a3800c6ebae4f1d768a56a9" + integrity sha512-ebDJ9b0e702Yr7pWgB0jzm+CX4Srzz8RcXtLJDJB+BSccqMa36uyH/zUsSYao5+BD1ytv3k3rPYCq4mAE1hsXA== "@types/async@^3.2.5": version "3.2.25" @@ -3166,15 +3243,15 @@ natural-compare "^1.4.0" ts-api-utils "^1.3.0" -"@typescript-eslint/parser@7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-7.2.0.tgz#44356312aea8852a3a82deebdacd52ba614ec07a" - integrity sha512-5FKsVcHTk6TafQKQbuIVkXq58Fnbkd2wDL4LB7AURN7RUOu1utVP+G8+6u3ZhEroW3DF6hyo3ZEXxgKgp4KeCg== +"@typescript-eslint/parser@8.38.0": + version "8.38.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.38.0.tgz#6723a5ea881e1777956b1045cba30be5ea838293" + integrity sha512-Zhy8HCvBUEfBECzIl1PKqF4p11+d0aUJS1GeUiuqK9WmOug8YCmC4h4bjyBvMyAMI9sbRczmrYL5lKg/YMbrcQ== dependencies: - "@typescript-eslint/scope-manager" "7.2.0" - "@typescript-eslint/types" "7.2.0" - "@typescript-eslint/typescript-estree" "7.2.0" - "@typescript-eslint/visitor-keys" "7.2.0" + "@typescript-eslint/scope-manager" "8.38.0" + "@typescript-eslint/types" "8.38.0" + "@typescript-eslint/typescript-estree" "8.38.0" + "@typescript-eslint/visitor-keys" "8.38.0" debug "^4.3.4" "@typescript-eslint/parser@^7.1.1": @@ -3188,6 +3265,35 @@ "@typescript-eslint/visitor-keys" "7.18.0" debug "^4.3.4" +"@typescript-eslint/parser@^8.36.0": + version "8.46.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.46.1.tgz#81751f46800fc6b01ce1a72760cd17f06e7f395b" + integrity sha512-6JSSaBZmsKvEkbRUkf7Zj7dru/8ZCrJxAqArcLaVMee5907JdtEbKGsZ7zNiIm/UAkpGUkaSMZEXShnN2D1HZA== + dependencies: + "@typescript-eslint/scope-manager" "8.46.1" + "@typescript-eslint/types" "8.46.1" + "@typescript-eslint/typescript-estree" "8.46.1" + "@typescript-eslint/visitor-keys" "8.46.1" + debug "^4.3.4" + +"@typescript-eslint/project-service@8.38.0": + version "8.38.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/project-service/-/project-service-8.38.0.tgz#4900771f943163027fd7d2020a062892056b5e2f" + integrity sha512-dbK7Jvqcb8c9QfH01YB6pORpqX1mn5gDZc9n63Ak/+jD67oWXn3Gs0M6vddAN+eDXBCS5EmNWzbSxsn9SzFWWg== + dependencies: + "@typescript-eslint/tsconfig-utils" "^8.38.0" + "@typescript-eslint/types" "^8.38.0" + debug "^4.3.4" + +"@typescript-eslint/project-service@8.46.1": + version "8.46.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/project-service/-/project-service-8.46.1.tgz#07be0e6f27fa90a17d8e5f6996ee02329c9a8c2e" + integrity sha512-FOIaFVMHzRskXr5J4Jp8lFVV0gz5ngv3RHmn+E4HYxSJ3DgDzU7fVI1/M7Ijh1zf6S7HIoaIOtln1H5y8V+9Zg== + dependencies: + "@typescript-eslint/tsconfig-utils" "^8.46.1" + "@typescript-eslint/types" "^8.46.1" + debug "^4.3.4" + "@typescript-eslint/scope-manager@5.62.0": version "5.62.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz#d9457ccc6a0b8d6b37d0eb252a23022478c5460c" @@ -3204,13 +3310,31 @@ "@typescript-eslint/types" "7.18.0" "@typescript-eslint/visitor-keys" "7.18.0" -"@typescript-eslint/scope-manager@7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.2.0.tgz#cfb437b09a84f95a0930a76b066e89e35d94e3da" - integrity sha512-Qh976RbQM/fYtjx9hs4XkayYujB/aPwglw2choHmf3zBjB4qOywWSdt9+KLRdHubGcoSwBnXUH2sR3hkyaERRg== +"@typescript-eslint/scope-manager@8.38.0": + version "8.38.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.38.0.tgz#5a0efcb5c9cf6e4121b58f87972f567c69529226" + integrity sha512-WJw3AVlFFcdT9Ri1xs/lg8LwDqgekWXWhH3iAF+1ZM+QPd7oxQ6jvtW/JPwzAScxitILUIFs0/AnQ/UWHzbATQ== + dependencies: + "@typescript-eslint/types" "8.38.0" + "@typescript-eslint/visitor-keys" "8.38.0" + +"@typescript-eslint/scope-manager@8.46.1": + version "8.46.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.46.1.tgz#590dd2e65e95af646bdaf50adeae9af39e25e8c1" + integrity sha512-weL9Gg3/5F0pVQKiF8eOXFZp8emqWzZsOJuWRUNtHT+UNV2xSJegmpCNQHy37aEQIbToTq7RHKhWvOsmbM680A== dependencies: - "@typescript-eslint/types" "7.2.0" - "@typescript-eslint/visitor-keys" "7.2.0" + "@typescript-eslint/types" "8.46.1" + "@typescript-eslint/visitor-keys" "8.46.1" + +"@typescript-eslint/tsconfig-utils@8.38.0": + version "8.38.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.38.0.tgz#6de4ce224a779601a8df667db56527255c42c4d0" + integrity sha512-Lum9RtSE3EroKk/bYns+sPOodqb2Fv50XOl/gMviMKNvanETUuUcC9ObRbzrJ4VSd2JalPqgSAavwrPiPvnAiQ== + +"@typescript-eslint/tsconfig-utils@8.46.1", "@typescript-eslint/tsconfig-utils@^8.38.0", "@typescript-eslint/tsconfig-utils@^8.46.1": + version "8.46.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.46.1.tgz#24405888560175c6c209c39df11ac06a2efef9d7" + integrity sha512-X88+J/CwFvlJB+mK09VFqx5FE4H5cXD+H/Bdza2aEWkSb8hnWIQorNcscRl4IEo1Cz9VI/+/r/jnGWkbWPx54g== "@typescript-eslint/type-utils@7.18.0": version "7.18.0" @@ -3232,10 +3356,15 @@ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.18.0.tgz#b90a57ccdea71797ffffa0321e744f379ec838c9" integrity sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ== -"@typescript-eslint/types@7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.2.0.tgz#0feb685f16de320e8520f13cca30779c8b7c403f" - integrity sha512-XFtUHPI/abFhm4cbCDc5Ykc8npOKBSJePY3a3s+lwumt7XWJuzP5cZcfZ610MIPHjQjNsOLlYK8ASPaNG8UiyA== +"@typescript-eslint/types@8.38.0": + version "8.38.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.38.0.tgz#297351c994976b93c82ac0f0e206c8143aa82529" + integrity sha512-wzkUfX3plUqij4YwWaJyqhiPE5UCRVlFpKn1oCRn2O1bJ592XxWJj8ROQ3JD5MYXLORW84063z3tZTb/cs4Tyw== + +"@typescript-eslint/types@8.46.1", "@typescript-eslint/types@^8.38.0", "@typescript-eslint/types@^8.46.1": + version "8.46.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.46.1.tgz#4c5479538ec10b5508b8e982e172911c987446d8" + integrity sha512-C+soprGBHwWBdkDpbaRC4paGBrkIXxVlNohadL5o0kfhsXqOC6GYH2S/Obmig+I0HTDl8wMaRySwrfrXVP8/pQ== "@typescript-eslint/typescript-estree@5.62.0": version "5.62.0" @@ -3264,19 +3393,37 @@ semver "^7.6.0" ts-api-utils "^1.3.0" -"@typescript-eslint/typescript-estree@7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.2.0.tgz#5beda2876c4137f8440c5a84b4f0370828682556" - integrity sha512-cyxS5WQQCoBwSakpMrvMXuMDEbhOo9bNHHrNcEWis6XHx6KF518tkF1wBvKIn/tpq5ZpUYK7Bdklu8qY0MsFIA== +"@typescript-eslint/typescript-estree@8.38.0": + version "8.38.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.38.0.tgz#82262199eb6778bba28a319e25ad05b1158957df" + integrity sha512-fooELKcAKzxux6fA6pxOflpNS0jc+nOQEEOipXFNjSlBS6fqrJOVY/whSn70SScHrcJ2LDsxWrneFoWYSVfqhQ== dependencies: - "@typescript-eslint/types" "7.2.0" - "@typescript-eslint/visitor-keys" "7.2.0" + "@typescript-eslint/project-service" "8.38.0" + "@typescript-eslint/tsconfig-utils" "8.38.0" + "@typescript-eslint/types" "8.38.0" + "@typescript-eslint/visitor-keys" "8.38.0" debug "^4.3.4" - globby "^11.1.0" + fast-glob "^3.3.2" is-glob "^4.0.3" - minimatch "9.0.3" - semver "^7.5.4" - ts-api-utils "^1.0.1" + minimatch "^9.0.4" + semver "^7.6.0" + ts-api-utils "^2.1.0" + +"@typescript-eslint/typescript-estree@8.46.1": + version "8.46.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.46.1.tgz#1c146573b942ebe609c156c217ceafdc7a88e6ed" + integrity sha512-uIifjT4s8cQKFQ8ZBXXyoUODtRoAd7F7+G8MKmtzj17+1UbdzFl52AzRyZRyKqPHhgzvXunnSckVu36flGy8cg== + dependencies: + "@typescript-eslint/project-service" "8.46.1" + "@typescript-eslint/tsconfig-utils" "8.46.1" + "@typescript-eslint/types" "8.46.1" + "@typescript-eslint/visitor-keys" "8.46.1" + debug "^4.3.4" + fast-glob "^3.3.2" + is-glob "^4.0.3" + minimatch "^9.0.4" + semver "^7.6.0" + ts-api-utils "^2.1.0" "@typescript-eslint/utils@7.18.0": version "7.18.0" @@ -3318,13 +3465,21 @@ "@typescript-eslint/types" "7.18.0" eslint-visitor-keys "^3.4.3" -"@typescript-eslint/visitor-keys@7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.2.0.tgz#5035f177752538a5750cca1af6044b633610bf9e" - integrity sha512-c6EIQRHhcpl6+tO8EMR+kjkkV+ugUNXOmeASA1rlzkd8EPIriavpWoiEz1HR/VLhbVIdhqnV6E7JZm00cBDx2A== +"@typescript-eslint/visitor-keys@8.38.0": + version "8.38.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.38.0.tgz#a9765a527b082cb8fc60fd8a16e47c7ad5b60ea5" + integrity sha512-pWrTcoFNWuwHlA9CvlfSsGWs14JxfN1TH25zM5L7o0pRLhsoZkDnTsXfQRJBEWJoV5DL0jf+Z+sxiud+K0mq1g== dependencies: - "@typescript-eslint/types" "7.2.0" - eslint-visitor-keys "^3.4.1" + "@typescript-eslint/types" "8.38.0" + eslint-visitor-keys "^4.2.1" + +"@typescript-eslint/visitor-keys@8.46.1": + version "8.46.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.46.1.tgz#da35f1d58ec407419d68847cfd358b32746ac315" + integrity sha512-ptkmIf2iDkNUjdeu2bQqhFPV1m6qTnFFjg7PPDjxKWaMaP0Z6I9l30Jr3g5QqbZGdw8YdYvLp+XnqnWWZOg/NA== + dependencies: + "@typescript-eslint/types" "8.46.1" + eslint-visitor-keys "^4.2.1" "@ungap/structured-clone@^1.2.0": version "1.2.0" @@ -3522,6 +3677,16 @@ ajv@^8.0.0: json-schema-traverse "^1.0.0" require-from-string "^2.0.2" +ajv@~8.12.0: + version "8.12.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.12.0.tgz#d1a0527323e22f53562c567c00991577dfbe19d1" + integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA== + dependencies: + fast-deep-equal "^3.1.1" + json-schema-traverse "^1.0.0" + require-from-string "^2.0.2" + uri-js "^4.2.2" + ajv@~8.13.0: version "8.13.0" resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.13.0.tgz#a3939eaec9fb80d217ddf0c3376948c023f28c91" @@ -3662,7 +3827,7 @@ archiver@^5.0.0: tar-stream "^2.2.0" zip-stream "^4.1.0" -argparse@^1.0.7: +argparse@^1.0.7, argparse@~1.0.9: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== @@ -4020,13 +4185,6 @@ babel-plugin-syntax-hermes-parser@0.28.1: dependencies: hermes-parser "0.28.1" -babel-plugin-syntax-hermes-parser@0.29.1: - version "0.29.1" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-hermes-parser/-/babel-plugin-syntax-hermes-parser-0.29.1.tgz#09ca9ecb0330eba1ef939b6d3f1f55bb06a9dc33" - integrity sha512-2WFYnoWGdmih1I1J5eIqxATOeycOqRwYxAQBu3cUu/rhwInwHUg7k60AFNbuGjSDL8tje5GDrAnxzRLcu2pYcA== - dependencies: - hermes-parser "0.29.1" - babel-plugin-syntax-hermes-parser@0.30.0: version "0.30.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-hermes-parser/-/babel-plugin-syntax-hermes-parser-0.30.0.tgz#c2ce4d6e897ce65ebb482e52a1a6f39726444475" @@ -4034,6 +4192,13 @@ babel-plugin-syntax-hermes-parser@0.30.0: dependencies: hermes-parser "0.30.0" +babel-plugin-syntax-hermes-parser@0.32.0: + version "0.32.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-hermes-parser/-/babel-plugin-syntax-hermes-parser-0.32.0.tgz#06f7452bf91adf6cafd7c98e7467404d4eb65cec" + integrity sha512-m5HthL++AbyeEA2FcdwOLfVFvWYECOBObLHNqdR8ceY4TsEdn4LdX2oTvbB2QJSSElE2AWA/b2MXZ/PF/CqLZg== + dependencies: + hermes-parser "0.32.0" + babel-plugin-transform-define@^2.1.4: version "2.1.4" resolved "https://registry.yarnpkg.com/babel-plugin-transform-define/-/babel-plugin-transform-define-2.1.4.tgz#8f7088211176a55a72788d584ceea9f691a021c1" @@ -5809,6 +5974,11 @@ eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4 resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== +eslint-visitor-keys@^4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz#4cfea60fe7dd0ad8e816e1ed026c1d5251b512c1" + integrity sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ== + eslint@^8.19.0, eslint@^8.57.0: version "8.57.1" resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.57.1.tgz#7df109654aba7e3bbe5c8eae533c5e461d3c6ca9" @@ -6214,19 +6384,19 @@ flatted@^3.2.9: resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.3.1.tgz#21db470729a6734d4997002f439cb308987f567a" integrity sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw== -flow-api-translator@0.29.1: - version "0.29.1" - resolved "https://registry.yarnpkg.com/flow-api-translator/-/flow-api-translator-0.29.1.tgz#37db8accfb83dc9169389acb65230a3d2fc97190" - integrity sha512-WbGArhEKCUz8WYmULcxybi6Y12pZz0lmbTblWNUJFBkk4Y3IjsF/lEALM4hhoxFakUXpphgR3BjntqejuFIuYA== +flow-api-translator@0.30.0: + version "0.30.0" + resolved "https://registry.yarnpkg.com/flow-api-translator/-/flow-api-translator-0.30.0.tgz#9ee99ecdf7c784cfac5315269f178897d88a1844" + integrity sha512-MRkMwJJaU6i1HZDno+tU8gf8wvyOHk5I+x6fXWIjjxKn06IWeZYzp2Mvd04jOqT2R66Xth1qPWTcWeb/vVUM0g== dependencies: "@babel/code-frame" "^7.16.0" - "@typescript-eslint/parser" "7.2.0" - "@typescript-eslint/visitor-keys" "7.2.0" + "@typescript-eslint/parser" "8.38.0" + "@typescript-eslint/visitor-keys" "8.38.0" flow-enums-runtime "^0.0.6" - hermes-eslint "0.29.1" - hermes-estree "0.29.1" - hermes-parser "0.29.1" - hermes-transform "0.29.1" + hermes-eslint "0.30.0" + hermes-estree "0.30.0" + hermes-parser "0.30.0" + hermes-transform "0.30.0" typescript "5.3.2" flow-bin@^0.272.0: @@ -6239,6 +6409,11 @@ flow-bin@^0.274.2: resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.274.2.tgz#79cff569aab38eb04f6b1e64b899c932a51444a4" integrity sha512-vTF+5hiC5qymweFKj7xs5ABlDqMWbB2fPkYC4MI32m652dFYsq/zvEVNc2M09udwAzplLcMIK2O9VswPfd8Isw== +flow-bin@^0.278.0: + version "0.278.0" + resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.278.0.tgz#ad1828d60ffe09d4d1ccb2817ef3eb5f79d98f9a" + integrity sha512-RQgeri43x9zRpMfB9cqAhlXOgDjWd8OU7X6wpxjT5VUS8EotLCAeNKhafLFxvYuaPwUctQ6JnuxykVL6M46ycQ== + flow-enums-runtime@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/flow-enums-runtime/-/flow-enums-runtime-0.0.6.tgz#5bb0cd1b0a3e471330f4d109039b7eba5cb3e787" @@ -6331,6 +6506,15 @@ fs-extra@^9.0.1: jsonfile "^6.0.1" universalify "^2.0.0" +fs-extra@~11.3.0: + version "11.3.2" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.3.2.tgz#c838aeddc6f4a8c74dd15f85e11fe5511bfe02a4" + integrity sha512-Xr9F6z6up6Ws+NjzMCZc6WXg2YFRlrLP9NQDO3VQrWrfiojdhS56TzueT88ze0uBdCTwEIhQ3ptnmKeWGFAe0A== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + fs-extra@~7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" @@ -6551,6 +6735,11 @@ glob-parent@^5.1.2, glob-parent@^6.0.2, glob-parent@~5.1.2: dependencies: is-glob "^4.0.1" +glob-to-regex.js@^1.0.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/glob-to-regex.js/-/glob-to-regex.js-1.2.0.tgz#2b323728271d133830850e32311f40766c5f6413" + integrity sha512-QMwlOQKU/IzqMUOAZWubUOT8Qft+Y0KQWnX9nK3ch0CJg0tTp4TvGZsTfudYKv2NzoQSyPcnA6TYeIQ3jGichQ== + glob@^7.0.0, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@^7.2.3: version "7.2.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" @@ -6765,14 +6954,14 @@ hermes-eslint@0.23.1: hermes-estree "0.23.1" hermes-parser "0.23.1" -hermes-eslint@0.29.1: - version "0.29.1" - resolved "https://registry.yarnpkg.com/hermes-eslint/-/hermes-eslint-0.29.1.tgz#4d51f9e7643037eceea9a89960d75037bab4269d" - integrity sha512-yEFBnlcZGTnQouJtOrWsDE9RGU8b7glbbEzNV5+sPbbfzw94a4DwRyWLkMm2Yzf2mTzj1VZMQfejugNn3cpwtw== +hermes-eslint@0.30.0: + version "0.30.0" + resolved "https://registry.yarnpkg.com/hermes-eslint/-/hermes-eslint-0.30.0.tgz#73b81b1e76b1b420acb09d5454e3269a195dce6c" + integrity sha512-eY2BG1De+ih7Kk+GoVjNQi7Ekto08kdCtX3ZDwFIk3f4pESMceZqU68RePB9g2bKYPHPmTRsGyBKphUSivpnww== dependencies: esrecurse "^4.3.0" - hermes-estree "0.29.1" - hermes-parser "0.29.1" + hermes-estree "0.30.0" + hermes-parser "0.30.0" hermes-estree@0.21.1: version "0.21.1" @@ -6846,17 +7035,17 @@ hermes-parser@0.32.0: dependencies: hermes-estree "0.32.0" -hermes-transform@0.29.1: - version "0.29.1" - resolved "https://registry.yarnpkg.com/hermes-transform/-/hermes-transform-0.29.1.tgz#eefee947d2099411c05397b1649ef11151830c8a" - integrity sha512-4WJ43fpfk3Tsl7yv2hxZXhcSAag7m6WnaQ2pLmnA4HOBmqlhqehMwE2FTalnJYGguVylxaotMxN8F7eoDjn6SQ== +hermes-transform@0.30.0: + version "0.30.0" + resolved "https://registry.yarnpkg.com/hermes-transform/-/hermes-transform-0.30.0.tgz#0e4238e951675788a0af7d79830b863a4fe1ddea" + integrity sha512-sbIQR83Vv97JMYYXS72ZirSJ0VNCqPSUOFh3dIgfIao/DqfQmQhtkp225TfHRpTwtbNTtyp0c6afJxAFFzaLJw== dependencies: "@babel/code-frame" "^7.16.0" esquery "^1.4.0" flow-enums-runtime "^0.0.6" - hermes-eslint "0.29.1" - hermes-estree "0.29.1" - hermes-parser "0.29.1" + hermes-eslint "0.30.0" + hermes-estree "0.30.0" + hermes-parser "0.30.0" string-width "4.2.3" homedir-polyfill@^1.0.1: @@ -6976,6 +7165,11 @@ husky@^4.2.5: slash "^3.0.0" which-pm-runs "^1.0.0" +hyperdyperid@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/hyperdyperid/-/hyperdyperid-1.2.0.tgz#59668d323ada92228d2a869d3e474d5a33b69e6b" + integrity sha512-Y93lCzHYgGWdrJ66yIktxiaGULYc6oGiABxhcO5AufBeOyoIdZF7bIfLaOrbM0iGIOXQQgxxRrFEnb+Y6w1n4A== + iconv-lite@0.4.24, iconv-lite@^0.4.24: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" @@ -7074,6 +7268,11 @@ ini@^1.3.4: resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== +ini@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/ini/-/ini-5.0.0.tgz#a7a4615339843d9a8ccc2d85c9d81cf93ffbc638" + integrity sha512-+N0ngpO3e7cRUWOJAS7qw0IZIVc6XPrW4MlFBdD066F2L4k1L6ker3hLqSq7iXxU5tgS4WGkIUElWn5vogAEnw== + inquirer@^7.1.0: version "7.3.3" resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-7.3.3.tgz#04d176b2af04afc157a83fd7c100e98ee0aad003" @@ -8394,7 +8593,7 @@ lodash.zip@^4.2.0: resolved "https://registry.yarnpkg.com/lodash.zip/-/lodash.zip-4.2.0.tgz#ec6662e4896408ed4ab6c542a3990b72cc080020" integrity sha512-C7IOaBBK/0gMORRBd8OETNx3kmOkgIWIPvyDpZSCTwUrpYmgZwJkjZeOD8ww4xbOUOs4/attY+pciKvadNfFbg== -lodash@^4.17.11, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.21: +lodash@^4.17.11, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.21, lodash@~4.17.15: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -8664,6 +8863,18 @@ mem@^5.0.0: mimic-fn "^2.1.0" p-is-promise "^2.1.0" +memfs@^4.7.7: + version "4.49.0" + resolved "https://registry.yarnpkg.com/memfs/-/memfs-4.49.0.tgz#bc35069570d41a31c62e31f1a6ec6057a8ea82f0" + integrity sha512-L9uC9vGuc4xFybbdOpRLoOAOq1YEBBsocCs5NVW32DfU+CZWWIn3OVF+lB8Gp4ttBVSMazwrTrjv8ussX/e3VQ== + dependencies: + "@jsonjoy.com/json-pack" "^1.11.0" + "@jsonjoy.com/util" "^1.9.0" + glob-to-regex.js "^1.0.1" + thingies "^2.5.0" + tree-dump "^1.0.3" + tslib "^2.0.0" + memoize-one@^5.0.0: version "5.2.1" resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-5.2.1.tgz#8337aa3c4335581839ec01c3d594090cebe8f00e" @@ -8679,10 +8890,10 @@ merge2@^1.3.0, merge2@^1.4.1: resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== -metro-babel-register@^0.82.4: - version "0.82.5" - resolved "https://registry.yarnpkg.com/metro-babel-register/-/metro-babel-register-0.82.5.tgz#897c2021e6c44b18b533338d420fcacd5e9807c4" - integrity sha512-pWGLHX1ggicEu6UvF3Pe7E7xY7812u/EaY1OiR7f9ooy5s/W20OQsvkNshQ68j9v1yvFkckgzB2YCTYiklSsIg== +metro-babel-register@^0.83.1: + version "0.83.3" + resolved "https://registry.yarnpkg.com/metro-babel-register/-/metro-babel-register-0.83.3.tgz#2b8b3802b375b13d29ad41c09c4e41acae402a73" + integrity sha512-EjV03GKnJC9uS7/287L0/Fsn60GxI7TcgjeEqdqjz5JDmihRj+JVUJkAEp3ims9RdAlSud0OpjRJDjC3JFLW8Q== dependencies: "@babel/core" "^7.25.2" "@babel/plugin-proposal-export-namespace-from" "^7.18.9" @@ -8691,7 +8902,7 @@ metro-babel-register@^0.82.4: "@babel/preset-typescript" "^7.24.7" "@babel/register" "^7.24.6" babel-plugin-replace-ts-export-assignment "^0.0.2" - babel-plugin-syntax-hermes-parser "0.29.1" + babel-plugin-syntax-hermes-parser "0.32.0" babel-plugin-transform-flow-enums "^0.0.2" escape-string-regexp "^1.0.5" flow-enums-runtime "^0.0.6" @@ -8750,7 +8961,7 @@ metro-cache@0.83.3: https-proxy-agent "^7.0.5" metro-core "0.83.3" -metro-config@0.82.5, metro-config@^0.82.2, metro-config@^0.82.5: +metro-config@0.82.5, metro-config@^0.82.2: version "0.82.5" resolved "https://registry.yarnpkg.com/metro-config/-/metro-config-0.82.5.tgz#07366f32c3fe6203d630af7df4781900816c7c85" integrity sha512-/r83VqE55l0WsBf8IhNmc/3z71y2zIPe5kRSuqA5tY/SL/ULzlHUJEMd1szztd0G45JozLwjvrhAzhDPJ/Qo/g== @@ -8778,7 +8989,7 @@ metro-config@0.83.3, metro-config@^0.83.1: metro-runtime "0.83.3" yaml "^2.6.1" -metro-core@0.82.5, metro-core@^0.82.5: +metro-core@0.82.5: version "0.82.5" resolved "https://registry.yarnpkg.com/metro-core/-/metro-core-0.82.5.tgz#fda1b2f7365e3a09055dd72ba1681f8fc1f6f492" integrity sha512-OJL18VbSw2RgtBm1f2P3J5kb892LCVJqMvslXxuxjAPex8OH7Eb8RBfgEo7VZSjgb/LOf4jhC4UFk5l5tAOHHA== @@ -8863,7 +9074,7 @@ metro-resolver@0.83.3: dependencies: flow-enums-runtime "^0.0.6" -metro-runtime@0.82.5, metro-runtime@^0.82.2, metro-runtime@^0.82.5: +metro-runtime@0.82.5, metro-runtime@^0.82.2: version "0.82.5" resolved "https://registry.yarnpkg.com/metro-runtime/-/metro-runtime-0.82.5.tgz#97840760e4cee49f08948dd918dbeba08dd0d0ec" integrity sha512-rQZDoCUf7k4Broyw3Ixxlq5ieIPiR1ULONdpcYpbJQ6yQ5GGEyYjtkztGD+OhHlw81LCR2SUAoPvtTus2WDK5g== @@ -8935,7 +9146,7 @@ metro-symbolicate@0.83.3: source-map "^0.5.6" vlq "^1.0.0" -metro-transform-plugins@0.82.5, metro-transform-plugins@^0.82.4: +metro-transform-plugins@0.82.5: version "0.82.5" resolved "https://registry.yarnpkg.com/metro-transform-plugins/-/metro-transform-plugins-0.82.5.tgz#678da4d0f9085b2a3fc0b4350062f19cc625c5fc" integrity sha512-57Bqf3rgq9nPqLrT2d9kf/2WVieTFqsQ6qWHpEng5naIUtc/Iiw9+0bfLLWSAw0GH40iJ4yMjFcFJDtNSYynMA== @@ -8947,7 +9158,7 @@ metro-transform-plugins@0.82.5, metro-transform-plugins@^0.82.4: flow-enums-runtime "^0.0.6" nullthrows "^1.1.1" -metro-transform-plugins@0.83.3: +metro-transform-plugins@0.83.3, metro-transform-plugins@^0.83.1: version "0.83.3" resolved "https://registry.yarnpkg.com/metro-transform-plugins/-/metro-transform-plugins-0.83.3.tgz#2c59ba841e269363cf3acb13138cb992f0c75013" integrity sha512-eRGoKJU6jmqOakBMH5kUB7VitEWiNrDzBHpYbkBXW7C5fUGeOd2CyqrosEzbMK5VMiZYyOcNFEphvxk3OXey2A== @@ -8997,7 +9208,7 @@ metro-transform-worker@0.83.3: metro-transform-plugins "0.83.3" nullthrows "^1.1.1" -metro@0.82.5, metro@^0.82.5: +metro@0.82.5: version "0.82.5" resolved "https://registry.yarnpkg.com/metro/-/metro-0.82.5.tgz#a27fbc08dd283a14ae58496288c10adaae65f461" integrity sha512-8oAXxL7do8QckID/WZEKaIFuQJFUTLzfVcC48ghkHhNK2RGuQq8Xvf4AVd+TUA0SZtX0q8TGNXZ/eba1ckeGCg== @@ -9421,12 +9632,12 @@ mimic-response@^3.1.0: resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9" integrity sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ== -minimatch@9.0.3: - version "9.0.3" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.3.tgz#a6e00c3de44c3a542bfaae70abfc22420a6da825" - integrity sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg== +minimatch@10.0.3: + version "10.0.3" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-10.0.3.tgz#cf7a0314a16c4d9ab73a7730a0e8e3c3502d47aa" + integrity sha512-IPZ167aShDZZUMdRk66cyQAW3qr0WzbHkPdMYa8bzZhlHhO3jALbKdxcaak7W9FfT2rZNpQuUu4Od7ILEpXSaw== dependencies: - brace-expansion "^2.0.1" + "@isaacs/brace-expansion" "^5.0.0" minimatch@^3.0.2, minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" @@ -10282,20 +10493,21 @@ prettier-plugin-hermes-parser@0.21.1: hermes-parser "0.21.1" prettier-plugin-hermes-parser "0.21.1" -prettier-plugin-hermes-parser@0.29.1: - version "0.29.1" - resolved "https://registry.yarnpkg.com/prettier-plugin-hermes-parser/-/prettier-plugin-hermes-parser-0.29.1.tgz#7dc419426fe58fcd2250b0813b5c4543f9742432" - integrity sha512-rGJ53E9HBHCaSz1TC/UZG+jEPjot5qa21d7qafljPbp1jxcCI8PwdVqWahHSfmAf+8dEPHx6NdZ6ajSBoOb+WA== - dependencies: - hermes-estree "0.29.1" - hermes-parser "0.29.1" - prettier-plugin-hermes-parser "0.29.1" +prettier-plugin-hermes-parser@0.31.1: + version "0.31.1" + resolved "https://registry.yarnpkg.com/prettier-plugin-hermes-parser/-/prettier-plugin-hermes-parser-0.31.1.tgz#950f14274ba6d5d39d152cdb25ea67c107b9b467" + integrity sha512-h98zphVpGyil1qXUP70jmD2SLMqsdah2Ys6Ap/f3zbKXJU5U91mtI+egxyTXtDasIL8Jp9awmUVLkzkyfimUNQ== prettier@2.8.8: version "2.8.8" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da" integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== +prettier@3.6.2: + version "3.6.2" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.6.2.tgz#ccda02a1003ebbb2bfda6f83a074978f608b9393" + integrity sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ== + pretty-format@^24.9.0: version "24.9.0" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-24.9.0.tgz#12fac31b37019a4eea3c11aa9a959eb7628aa7c9" @@ -10542,10 +10754,10 @@ react-is@^19.0.0: resolved "https://registry.yarnpkg.com/react-is/-/react-is-19.0.0.tgz#d6669fd389ff022a9684f708cf6fa4962d1fea7a" integrity sha512-H91OHcwjZsbq3ClIDHMzBShc1rotbfACdWENsmEf0IFvZ3FgGPtdHMcsv45bQ1hAbgdfiA8SnxTKfDS+x/8m2g== -react-is@^19.1.0: - version "19.1.0" - resolved "https://registry.yarnpkg.com/react-is/-/react-is-19.1.0.tgz#805bce321546b7e14c084989c77022351bbdd11b" - integrity sha512-Oe56aUPnkHyyDxxkvqtd7KkdQP5uIUfHxd5XTb3wE9d/kRnZLmKbDB0GWk919tdQ+mxxPtG6EAs6RMT6i1qtHg== +react-is@^19.1.1: + version "19.2.0" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-19.2.0.tgz#ddc3b4a4e0f3336c3847f18b806506388d7b9973" + integrity sha512-x3Ax3kNSMIIkyVYhWPyO09bu0uttcAIoecO/um/rKGQ4EltYWVYtyiGkS/3xMynrbVQdS69Jhlv8FXUEZehlzA== react-native-xaml@^0.0.80: version "0.0.80" @@ -10607,12 +10819,12 @@ react-test-renderer@19.0.0: react-is "^19.0.0" scheduler "^0.25.0" -react-test-renderer@19.1.0: - version "19.1.0" - resolved "https://registry.yarnpkg.com/react-test-renderer/-/react-test-renderer-19.1.0.tgz#89e1baa9e45a6da064b9760f92251d5b8e1f34ab" - integrity sha512-jXkSl3CpvPYEF+p/eGDLB4sPoDX8pKkYvRl9+rR8HxLY0X04vW7hCm1/0zHoUSjPZ3bDa+wXWNTDVIw/R8aDVw== +react-test-renderer@19.1.1: + version "19.1.1" + resolved "https://registry.yarnpkg.com/react-test-renderer/-/react-test-renderer-19.1.1.tgz#c1e57b7a9c7291e3f52c489022071ac39f55155a" + integrity sha512-aGRXI+zcBTtg0diHofc7+Vy97nomBs9WHHFY1Csl3iV0x6xucjNYZZAkiVKGiNYUv23ecOex5jE67t8ZzqYObA== dependencies: - react-is "^19.1.0" + react-is "^19.1.1" scheduler "^0.26.0" react@19.1.0, react@^19.1.0: @@ -10620,6 +10832,11 @@ react@19.1.0, react@^19.1.0: resolved "https://registry.yarnpkg.com/react/-/react-19.1.0.tgz#926864b6c48da7627f004795d6cce50e90793b75" integrity sha512-FS+XFBNvn3GTAWq26joslQgWNoFu08F4kl0J4CgdNKADkdSGXQyTCnKteIAJy96Br6YbpEU1LSzV5dYtjMkMDg== +react@19.1.1: + version "19.1.1" + resolved "https://registry.yarnpkg.com/react/-/react-19.1.1.tgz#06d9149ec5e083a67f9a1e39ce97b06a03b644af" + integrity sha512-w8nqGImo45dmMIfljjMwOGtbmC/mk4CMYhWIicdSflH91J9TyCyczcPFXJzrZ/ZXcgGRFeP6BU0BEJTw6tZdfQ== + read-yaml-file@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/read-yaml-file/-/read-yaml-file-2.1.0.tgz#c5866712db9ef5343b4d02c2413bada53c41c4a9" @@ -10868,7 +11085,7 @@ resolve.exports@^2.0.0: resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-2.0.2.tgz#f8c934b8e6a13f539e38b7098e2e36134f01e800" integrity sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg== -resolve@^1.1.6, resolve@^1.10.1, resolve@^1.14.2, resolve@^1.19.0, resolve@^1.20.0, resolve@^1.22.10, resolve@^1.22.3, resolve@~1.22.1: +resolve@^1.1.6, resolve@^1.10.1, resolve@^1.14.2, resolve@^1.19.0, resolve@^1.20.0, resolve@^1.22.10, resolve@^1.22.3, resolve@~1.22.1, resolve@~1.22.2: version "1.22.10" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.10.tgz#b663e83ffb09bbf2386944736baae803029b8b39" integrity sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w== @@ -11449,6 +11666,11 @@ streamx@^2.15.0, streamx@^2.21.0: optionalDependencies: bare-events "^2.2.0" +string-argv@~0.3.1: + version "0.3.2" + resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.2.tgz#2b6d0ef24b656274d957d54e0a4bbf6153dc02b6" + integrity sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q== + string-length@^4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.2.tgz#a8a8dc7bd5c1a82b9b3c8b87e125f66871b6e57a" @@ -11593,7 +11815,7 @@ strip-final-newline@^2.0.0: resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== -strip-json-comments@^3.1.1: +strip-json-comments@^3.1.1, strip-json-comments@~3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== @@ -11617,7 +11839,7 @@ supports-color@^7.0.0, supports-color@^7.1.0: dependencies: has-flag "^4.0.0" -supports-color@^8.0.0, supports-color@^8.1.0: +supports-color@^8.0.0, supports-color@^8.1.0, supports-color@~8.1.1: version "8.1.1" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== @@ -11749,6 +11971,11 @@ text-table@^0.2.0: resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== +thingies@^2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/thingies/-/thingies-2.5.0.tgz#5f7b882c933b85989f8466b528a6247a6881e04f" + integrity sha512-s+2Bwztg6PhWUD7XMfeYm5qliDdSiZm7M7n8KjTkIsm3l/2lgVRc2/Gx/v+ZX8lT4FMA+i8aQvhcWylldc+ZNw== + throat@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/throat/-/throat-5.0.0.tgz#c5199235803aad18754a667d659b5e72ce16764b" @@ -11803,6 +12030,11 @@ traverse@0.6.6: resolved "https://registry.yarnpkg.com/traverse/-/traverse-0.6.6.tgz#cbdf560fd7b9af632502fed40f918c157ea97137" integrity sha512-kdf4JKs8lbARxWdp7RKdNzoJBhGUcIalSYibuGyHJbmk40pOysQ0+QPvlkCOICOivDWU2IJo2rkrxyTK2AH4fw== +tree-dump@^1.0.3, tree-dump@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/tree-dump/-/tree-dump-1.1.0.tgz#ab29129169dc46004414f5a9d4a3c6e89f13e8a4" + integrity sha512-rMuvhU4MCDbcbnleZTFezWsaZXRFemSqAM+7jPnzUl1fo9w3YEKOxAeui0fz3OI4EU4hf23iyA7uQRVko+UaBA== + truncate-utf8-bytes@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/truncate-utf8-bytes/-/truncate-utf8-bytes-1.0.2.tgz#405923909592d56f78a5818434b0b78489ca5f2b" @@ -11810,11 +12042,16 @@ truncate-utf8-bytes@^1.0.0: dependencies: utf8-byte-length "^1.0.1" -ts-api-utils@^1.0.1, ts-api-utils@^1.3.0: +ts-api-utils@^1.3.0: version "1.4.0" resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.4.0.tgz#709c6f2076e511a81557f3d07a0cbd566ae8195c" integrity sha512-032cPxaEKwM+GT3vA5JXNzIaizx388rhsSW79vGRNGXfRRAdEAn2mvk36PvK5HnOchyWZ7afLEXqYCvPCrzuzQ== +ts-api-utils@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-2.1.0.tgz#595f7094e46eed364c13fd23e75f9513d29baf91" + integrity sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ== + ts-jest@^29.0.3: version "29.4.5" resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.4.5.tgz#a6b0dc401e521515d5342234be87f1ca96390a6f" @@ -11835,7 +12072,7 @@ tslib@^1.8.1, tslib@^1.9.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.0.1: +tslib@^2.0.0, tslib@^2.0.1: version "2.8.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f" integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w== @@ -11956,6 +12193,11 @@ typescript@5.3.2: resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.3.2.tgz#00d1c7c1c46928c5845c1ee8d0cc2791031d4c43" integrity sha512-6l+RyNy7oAHDfxC4FzSJcz9vnjTKxrLpDG5M2Vu4SHRVNg6xzqZp6LYSR9zjqQTu8DU/f5xwxUdADOkbrIX2gQ== +typescript@5.8.2: + version "5.8.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.8.2.tgz#8170b3702f74b79db2e5a96207c15e65807999e4" + integrity sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ== + typescript@>=4.7.0: version "5.6.3" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.6.3.tgz#5f3449e31c9d94febb17de03cc081dd56d81db5b" From 400182003642ca75e79ae8e1d2ee11d402f0d88d Mon Sep 17 00:00:00 2001 From: vineethkuttan <66076509+vineethkuttan@users.noreply.github.com> Date: Fri, 17 Oct 2025 08:09:44 +0530 Subject: [PATCH 06/13] commit for PR #15217 Added to avoid conflicts in integration --- .ado/templates/prep-and-pack-nuget.yml | 3 + vnext/.gitignore | 1 + vnext/codegen/.clang-format | 2 - vnext/codegen/NativeAccessibilityInfoSpec.g.h | 83 - .../NativeAccessibilityManagerSpec.g.h | 145 - .../codegen/NativeActionSheetManagerSpec.g.h | 122 - vnext/codegen/NativeAlertManagerSpec.g.h | 64 - vnext/codegen/NativeAnimatedModuleSpec.g.h | 201 - .../codegen/NativeAnimatedTurboModuleSpec.g.h | 201 - vnext/codegen/NativeAppStateSpec.g.h | 69 - vnext/codegen/NativeAppThemeSpec.g.h | 69 - vnext/codegen/NativeAppearanceSpec.g.h | 53 - vnext/codegen/NativeBlobModuleSpec.g.h | 78 - vnext/codegen/NativeClipboardSpec.g.h | 41 - vnext/codegen/NativeDOMSpec.g.h | 149 - vnext/codegen/NativeDevLoadingViewSpec.g.h | 41 - vnext/codegen/NativeDevMenuSpec.g.h | 53 - vnext/codegen/NativeDevSettingsSpec.g.h | 95 - .../codegen/NativeDeviceEventManagerSpec.g.h | 35 - vnext/codegen/NativeDeviceInfoSpec.g.h | 99 - .../NativeDialogManagerAndroidSpec.g.h | 87 - .../NativeDialogManagerWindowsSpec.g.h | 91 - vnext/codegen/NativeExceptionsManagerSpec.g.h | 97 - vnext/codegen/NativeFileReaderModuleSpec.g.h | 41 - vnext/codegen/NativeFrameRateLoggerSpec.g.h | 64 - .../NativeHeadlessJsTaskSupportSpec.g.h | 41 - vnext/codegen/NativeI18nManagerSpec.g.h | 62 - vnext/codegen/NativeIdleCallbacksSpec.g.h | 65 - vnext/codegen/NativeImageEditorSpec.g.h | 93 - .../codegen/NativeImageLoaderAndroidSpec.g.h | 72 - vnext/codegen/NativeImageLoaderIOSSpec.g.h | 72 - vnext/codegen/NativeImageStoreAndroidSpec.g.h | 35 - vnext/codegen/NativeImageStoreIOSSpec.g.h | 75 - vnext/codegen/NativeIntentAndroidSpec.g.h | 59 - .../NativeIntersectionObserverSpec.g.h | 101 - vnext/codegen/NativeJSCHeapCaptureSpec.g.h | 35 - vnext/codegen/NativeKeyboardObserverSpec.g.h | 41 - vnext/codegen/NativeLinkingManagerSpec.g.h | 65 - vnext/codegen/NativeLogBoxSpec.g.h | 41 - vnext/codegen/NativeMicrotasksSpec.g.h | 35 - vnext/codegen/NativeModalManagerSpec.g.h | 41 - vnext/codegen/NativeMutationObserverSpec.g.h | 91 - vnext/codegen/NativeNetworkingAndroidSpec.g.h | 59 - vnext/codegen/NativeNetworkingIOSSpec.g.h | 84 - vnext/codegen/NativePerformanceSpec.g.h | 219 - .../codegen/NativePermissionsAndroidSpec.g.h | 53 - .../NativePlatformConstantsAndroidSpec.g.h | 85 - .../NativePlatformConstantsIOSSpec.g.h | 73 - .../NativePlatformConstantsWindowsSpec.g.h | 82 - .../NativePushNotificationManagerIOSSpec.g.h | 194 - ...ReactDevToolsRuntimeSettingsModuleSpec.g.h | 67 - ...NativeReactDevToolsSettingsManagerSpec.g.h | 41 - .../NativeReactNativeFeatureFlagsSpec.g.h | 443 - vnext/codegen/NativeRedBoxSpec.g.h | 41 - vnext/codegen/NativeSampleTurboModuleSpec.g.h | 203 - vnext/codegen/NativeSegmentFetcherSpec.g.h | 41 - vnext/codegen/NativeSettingsManagerSpec.g.h | 62 - vnext/codegen/NativeShareModuleSpec.g.h | 59 - vnext/codegen/NativeSoundManagerSpec.g.h | 35 - vnext/codegen/NativeSourceCodeSpec.g.h | 42 - .../NativeStatusBarManagerAndroidSpec.g.h | 76 - .../codegen/NativeStatusBarManagerIOSSpec.g.h | 99 - vnext/codegen/NativeTimingSpec.g.h | 47 - vnext/codegen/NativeToastAndroidSpec.g.h | 76 - vnext/codegen/NativeUIManagerSpec.g.h | 155 - vnext/codegen/NativeVibrationSpec.g.h | 47 - vnext/codegen/NativeWebSocketModuleSpec.g.h | 82 - .../rnwcore/ActivityIndicatorView.g.h | 212 - .../rnwcore/AndroidDrawerLayout.g.h | 295 - .../AndroidHorizontalScrollContentView.g.h | 200 - .../components/rnwcore/AndroidProgressBar.g.h | 224 - .../rnwcore/AndroidSwipeRefreshLayout.g.h | 250 - .../components/rnwcore/AndroidSwitch.g.h | 267 - .../components/rnwcore/ComponentDescriptors.h | 30 - .../components/rnwcore/DebuggingOverlay.g.h | 234 - .../components/rnwcore/EventEmitters.cpp | 182 - .../react/components/rnwcore/EventEmitters.h | 219 - .../components/rnwcore/InputAccessory.g.h | 200 - .../components/rnwcore/ModalHostView.g.h | 291 - .../react/components/rnwcore/Props.cpp | 702 -- .../codegen/react/components/rnwcore/Props.h | 553 - .../components/rnwcore/PullToRefreshView.g.h | 246 - .../react/components/rnwcore/SafeAreaView.g.h | 197 - .../react/components/rnwcore/ShadowNodes.cpp | 23 - .../react/components/rnwcore/ShadowNodes.h | 98 - .../react/components/rnwcore/States.cpp | 16 - .../codegen/react/components/rnwcore/States.h | 32 - .../react/components/rnwcore/Switch.g.h | 263 - .../rnwcore/UnimplementedNativeView.g.h | 200 - .../react/components/rnwcore/VirtualView.g.h | 226 - .../rnwcore/VirtualViewExperimental.g.h | 226 - vnext/codegen/rnwcoreJSI-generated.cpp | 3444 ------ vnext/codegen/rnwcoreJSI.h | 9459 ----------------- 93 files changed, 4 insertions(+), 23758 deletions(-) delete mode 100644 vnext/codegen/.clang-format delete mode 100644 vnext/codegen/NativeAccessibilityInfoSpec.g.h delete mode 100644 vnext/codegen/NativeAccessibilityManagerSpec.g.h delete mode 100644 vnext/codegen/NativeActionSheetManagerSpec.g.h delete mode 100644 vnext/codegen/NativeAlertManagerSpec.g.h delete mode 100644 vnext/codegen/NativeAnimatedModuleSpec.g.h delete mode 100644 vnext/codegen/NativeAnimatedTurboModuleSpec.g.h delete mode 100644 vnext/codegen/NativeAppStateSpec.g.h delete mode 100644 vnext/codegen/NativeAppThemeSpec.g.h delete mode 100644 vnext/codegen/NativeAppearanceSpec.g.h delete mode 100644 vnext/codegen/NativeBlobModuleSpec.g.h delete mode 100644 vnext/codegen/NativeClipboardSpec.g.h delete mode 100644 vnext/codegen/NativeDOMSpec.g.h delete mode 100644 vnext/codegen/NativeDevLoadingViewSpec.g.h delete mode 100644 vnext/codegen/NativeDevMenuSpec.g.h delete mode 100644 vnext/codegen/NativeDevSettingsSpec.g.h delete mode 100644 vnext/codegen/NativeDeviceEventManagerSpec.g.h delete mode 100644 vnext/codegen/NativeDeviceInfoSpec.g.h delete mode 100644 vnext/codegen/NativeDialogManagerAndroidSpec.g.h delete mode 100644 vnext/codegen/NativeDialogManagerWindowsSpec.g.h delete mode 100644 vnext/codegen/NativeExceptionsManagerSpec.g.h delete mode 100644 vnext/codegen/NativeFileReaderModuleSpec.g.h delete mode 100644 vnext/codegen/NativeFrameRateLoggerSpec.g.h delete mode 100644 vnext/codegen/NativeHeadlessJsTaskSupportSpec.g.h delete mode 100644 vnext/codegen/NativeI18nManagerSpec.g.h delete mode 100644 vnext/codegen/NativeIdleCallbacksSpec.g.h delete mode 100644 vnext/codegen/NativeImageEditorSpec.g.h delete mode 100644 vnext/codegen/NativeImageLoaderAndroidSpec.g.h delete mode 100644 vnext/codegen/NativeImageLoaderIOSSpec.g.h delete mode 100644 vnext/codegen/NativeImageStoreAndroidSpec.g.h delete mode 100644 vnext/codegen/NativeImageStoreIOSSpec.g.h delete mode 100644 vnext/codegen/NativeIntentAndroidSpec.g.h delete mode 100644 vnext/codegen/NativeIntersectionObserverSpec.g.h delete mode 100644 vnext/codegen/NativeJSCHeapCaptureSpec.g.h delete mode 100644 vnext/codegen/NativeKeyboardObserverSpec.g.h delete mode 100644 vnext/codegen/NativeLinkingManagerSpec.g.h delete mode 100644 vnext/codegen/NativeLogBoxSpec.g.h delete mode 100644 vnext/codegen/NativeMicrotasksSpec.g.h delete mode 100644 vnext/codegen/NativeModalManagerSpec.g.h delete mode 100644 vnext/codegen/NativeMutationObserverSpec.g.h delete mode 100644 vnext/codegen/NativeNetworkingAndroidSpec.g.h delete mode 100644 vnext/codegen/NativeNetworkingIOSSpec.g.h delete mode 100644 vnext/codegen/NativePerformanceSpec.g.h delete mode 100644 vnext/codegen/NativePermissionsAndroidSpec.g.h delete mode 100644 vnext/codegen/NativePlatformConstantsAndroidSpec.g.h delete mode 100644 vnext/codegen/NativePlatformConstantsIOSSpec.g.h delete mode 100644 vnext/codegen/NativePlatformConstantsWindowsSpec.g.h delete mode 100644 vnext/codegen/NativePushNotificationManagerIOSSpec.g.h delete mode 100644 vnext/codegen/NativeReactDevToolsRuntimeSettingsModuleSpec.g.h delete mode 100644 vnext/codegen/NativeReactDevToolsSettingsManagerSpec.g.h delete mode 100644 vnext/codegen/NativeReactNativeFeatureFlagsSpec.g.h delete mode 100644 vnext/codegen/NativeRedBoxSpec.g.h delete mode 100644 vnext/codegen/NativeSampleTurboModuleSpec.g.h delete mode 100644 vnext/codegen/NativeSegmentFetcherSpec.g.h delete mode 100644 vnext/codegen/NativeSettingsManagerSpec.g.h delete mode 100644 vnext/codegen/NativeShareModuleSpec.g.h delete mode 100644 vnext/codegen/NativeSoundManagerSpec.g.h delete mode 100644 vnext/codegen/NativeSourceCodeSpec.g.h delete mode 100644 vnext/codegen/NativeStatusBarManagerAndroidSpec.g.h delete mode 100644 vnext/codegen/NativeStatusBarManagerIOSSpec.g.h delete mode 100644 vnext/codegen/NativeTimingSpec.g.h delete mode 100644 vnext/codegen/NativeToastAndroidSpec.g.h delete mode 100644 vnext/codegen/NativeUIManagerSpec.g.h delete mode 100644 vnext/codegen/NativeVibrationSpec.g.h delete mode 100644 vnext/codegen/NativeWebSocketModuleSpec.g.h delete mode 100644 vnext/codegen/react/components/rnwcore/ActivityIndicatorView.g.h delete mode 100644 vnext/codegen/react/components/rnwcore/AndroidDrawerLayout.g.h delete mode 100644 vnext/codegen/react/components/rnwcore/AndroidHorizontalScrollContentView.g.h delete mode 100644 vnext/codegen/react/components/rnwcore/AndroidProgressBar.g.h delete mode 100644 vnext/codegen/react/components/rnwcore/AndroidSwipeRefreshLayout.g.h delete mode 100644 vnext/codegen/react/components/rnwcore/AndroidSwitch.g.h delete mode 100644 vnext/codegen/react/components/rnwcore/ComponentDescriptors.h delete mode 100644 vnext/codegen/react/components/rnwcore/DebuggingOverlay.g.h delete mode 100644 vnext/codegen/react/components/rnwcore/EventEmitters.cpp delete mode 100644 vnext/codegen/react/components/rnwcore/EventEmitters.h delete mode 100644 vnext/codegen/react/components/rnwcore/InputAccessory.g.h delete mode 100644 vnext/codegen/react/components/rnwcore/ModalHostView.g.h delete mode 100644 vnext/codegen/react/components/rnwcore/Props.cpp delete mode 100644 vnext/codegen/react/components/rnwcore/Props.h delete mode 100644 vnext/codegen/react/components/rnwcore/PullToRefreshView.g.h delete mode 100644 vnext/codegen/react/components/rnwcore/SafeAreaView.g.h delete mode 100644 vnext/codegen/react/components/rnwcore/ShadowNodes.cpp delete mode 100644 vnext/codegen/react/components/rnwcore/ShadowNodes.h delete mode 100644 vnext/codegen/react/components/rnwcore/States.cpp delete mode 100644 vnext/codegen/react/components/rnwcore/States.h delete mode 100644 vnext/codegen/react/components/rnwcore/Switch.g.h delete mode 100644 vnext/codegen/react/components/rnwcore/UnimplementedNativeView.g.h delete mode 100644 vnext/codegen/react/components/rnwcore/VirtualView.g.h delete mode 100644 vnext/codegen/react/components/rnwcore/VirtualViewExperimental.g.h delete mode 100644 vnext/codegen/rnwcoreJSI-generated.cpp delete mode 100644 vnext/codegen/rnwcoreJSI.h diff --git a/.ado/templates/prep-and-pack-nuget.yml b/.ado/templates/prep-and-pack-nuget.yml index ddf38181084..a87dc045921 100644 --- a/.ado/templates/prep-and-pack-nuget.yml +++ b/.ado/templates/prep-and-pack-nuget.yml @@ -73,6 +73,9 @@ steps: artifact: ${{ parameters.artifactName2 }}.${{ slice.platform }}.${{ slice.configuration }} path: ${{parameters.nugetroot}}/${{ parameters.artifactName2 }}/${{ slice.platform }}/${{ slice.configuration }} + - pwsh: yarn build + displayName: Run yarn build + - task: PowerShell@2 displayName: Copy MSRN Resources to NuGet layout inputs: diff --git a/vnext/.gitignore b/vnext/.gitignore index 0d24c1eb3f7..4f9a62a3029 100644 --- a/vnext/.gitignore +++ b/vnext/.gitignore @@ -74,6 +74,7 @@ Generated Files/ /WindowsSampleCSharpApp/obj/ /target/ /x64/ +/codegen/ Examples/WindowsSampleApp/Generated Files/ Examples/WindowsSampleApp/build Examples/TypeScript/Generated Files/ diff --git a/vnext/codegen/.clang-format b/vnext/codegen/.clang-format deleted file mode 100644 index a43d914ec38..00000000000 --- a/vnext/codegen/.clang-format +++ /dev/null @@ -1,2 +0,0 @@ -DisableFormat: true -SortIncludes: false \ No newline at end of file diff --git a/vnext/codegen/NativeAccessibilityInfoSpec.g.h b/vnext/codegen/NativeAccessibilityInfoSpec.g.h deleted file mode 100644 index d3988673998..00000000000 --- a/vnext/codegen/NativeAccessibilityInfoSpec.g.h +++ /dev/null @@ -1,83 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - - -struct AccessibilityInfoSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - Method) noexcept>{0, L"isReduceMotionEnabled"}, - Method) noexcept>{1, L"isInvertColorsEnabled"}, - Method) noexcept>{2, L"isHighTextContrastEnabled"}, - Method) noexcept>{3, L"isTouchExplorationEnabled"}, - Method) noexcept>{4, L"isAccessibilityServiceEnabled"}, - Method{5, L"setAccessibilityFocus"}, - Method{6, L"announceForAccessibility"}, - Method) noexcept>{7, L"getRecommendedTimeoutMillis"}, - Method) noexcept>{8, L"isGrayscaleEnabled"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "isReduceMotionEnabled", - " REACT_METHOD(isReduceMotionEnabled) void isReduceMotionEnabled(std::function const & onSuccess) noexcept { /* implementation */ }\n" - " REACT_METHOD(isReduceMotionEnabled) static void isReduceMotionEnabled(std::function const & onSuccess) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 1, - "isInvertColorsEnabled", - " REACT_METHOD(isInvertColorsEnabled) void isInvertColorsEnabled(std::function const & onSuccess) noexcept { /* implementation */ }\n" - " REACT_METHOD(isInvertColorsEnabled) static void isInvertColorsEnabled(std::function const & onSuccess) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 2, - "isHighTextContrastEnabled", - " REACT_METHOD(isHighTextContrastEnabled) void isHighTextContrastEnabled(std::function const & onSuccess) noexcept { /* implementation */ }\n" - " REACT_METHOD(isHighTextContrastEnabled) static void isHighTextContrastEnabled(std::function const & onSuccess) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 3, - "isTouchExplorationEnabled", - " REACT_METHOD(isTouchExplorationEnabled) void isTouchExplorationEnabled(std::function const & onSuccess) noexcept { /* implementation */ }\n" - " REACT_METHOD(isTouchExplorationEnabled) static void isTouchExplorationEnabled(std::function const & onSuccess) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 4, - "isAccessibilityServiceEnabled", - " REACT_METHOD(isAccessibilityServiceEnabled) void isAccessibilityServiceEnabled(std::function const & onSuccess) noexcept { /* implementation */ }\n" - " REACT_METHOD(isAccessibilityServiceEnabled) static void isAccessibilityServiceEnabled(std::function const & onSuccess) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 5, - "setAccessibilityFocus", - " REACT_METHOD(setAccessibilityFocus) void setAccessibilityFocus(double reactTag) noexcept { /* implementation */ }\n" - " REACT_METHOD(setAccessibilityFocus) static void setAccessibilityFocus(double reactTag) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 6, - "announceForAccessibility", - " REACT_METHOD(announceForAccessibility) void announceForAccessibility(std::string announcement) noexcept { /* implementation */ }\n" - " REACT_METHOD(announceForAccessibility) static void announceForAccessibility(std::string announcement) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 7, - "getRecommendedTimeoutMillis", - " REACT_METHOD(getRecommendedTimeoutMillis) void getRecommendedTimeoutMillis(double mSec, std::function const & onSuccess) noexcept { /* implementation */ }\n" - " REACT_METHOD(getRecommendedTimeoutMillis) static void getRecommendedTimeoutMillis(double mSec, std::function const & onSuccess) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 8, - "isGrayscaleEnabled", - " REACT_METHOD(isGrayscaleEnabled) void isGrayscaleEnabled(std::function const & onSuccess) noexcept { /* implementation */ }\n" - " REACT_METHOD(isGrayscaleEnabled) static void isGrayscaleEnabled(std::function const & onSuccess) noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeAccessibilityManagerSpec.g.h b/vnext/codegen/NativeAccessibilityManagerSpec.g.h deleted file mode 100644 index 3d8d9d73bb2..00000000000 --- a/vnext/codegen/NativeAccessibilityManagerSpec.g.h +++ /dev/null @@ -1,145 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - -struct AccessibilityManagerSpec_setAccessibilityContentSizeMultipliers_JSMultipliers { - std::optional extraSmall; - std::optional small; - std::optional medium; - std::optional large; - std::optional extraLarge; - std::optional extraExtraLarge; - std::optional extraExtraExtraLarge; - std::optional accessibilityMedium; - std::optional accessibilityLarge; - std::optional accessibilityExtraLarge; - std::optional accessibilityExtraExtraLarge; - std::optional accessibilityExtraExtraExtraLarge; -}; - -struct AccessibilityManagerSpec_announceForAccessibilityWithOptions_options { - std::optional queue; -}; - - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(AccessibilityManagerSpec_setAccessibilityContentSizeMultipliers_JSMultipliers*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"extraSmall", &AccessibilityManagerSpec_setAccessibilityContentSizeMultipliers_JSMultipliers::extraSmall}, - {L"small", &AccessibilityManagerSpec_setAccessibilityContentSizeMultipliers_JSMultipliers::small}, - {L"medium", &AccessibilityManagerSpec_setAccessibilityContentSizeMultipliers_JSMultipliers::medium}, - {L"large", &AccessibilityManagerSpec_setAccessibilityContentSizeMultipliers_JSMultipliers::large}, - {L"extraLarge", &AccessibilityManagerSpec_setAccessibilityContentSizeMultipliers_JSMultipliers::extraLarge}, - {L"extraExtraLarge", &AccessibilityManagerSpec_setAccessibilityContentSizeMultipliers_JSMultipliers::extraExtraLarge}, - {L"extraExtraExtraLarge", &AccessibilityManagerSpec_setAccessibilityContentSizeMultipliers_JSMultipliers::extraExtraExtraLarge}, - {L"accessibilityMedium", &AccessibilityManagerSpec_setAccessibilityContentSizeMultipliers_JSMultipliers::accessibilityMedium}, - {L"accessibilityLarge", &AccessibilityManagerSpec_setAccessibilityContentSizeMultipliers_JSMultipliers::accessibilityLarge}, - {L"accessibilityExtraLarge", &AccessibilityManagerSpec_setAccessibilityContentSizeMultipliers_JSMultipliers::accessibilityExtraLarge}, - {L"accessibilityExtraExtraLarge", &AccessibilityManagerSpec_setAccessibilityContentSizeMultipliers_JSMultipliers::accessibilityExtraExtraLarge}, - {L"accessibilityExtraExtraExtraLarge", &AccessibilityManagerSpec_setAccessibilityContentSizeMultipliers_JSMultipliers::accessibilityExtraExtraExtraLarge}, - }; - return fieldMap; -} - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(AccessibilityManagerSpec_announceForAccessibilityWithOptions_options*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"queue", &AccessibilityManagerSpec_announceForAccessibilityWithOptions_options::queue}, - }; - return fieldMap; -} - -struct AccessibilityManagerSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - Method, Callback<::React::JSValue>) noexcept>{0, L"getCurrentBoldTextState"}, - Method, Callback<::React::JSValue>) noexcept>{1, L"getCurrentGrayscaleState"}, - Method, Callback<::React::JSValue>) noexcept>{2, L"getCurrentInvertColorsState"}, - Method, Callback<::React::JSValue>) noexcept>{3, L"getCurrentReduceMotionState"}, - Method, Callback<::React::JSValue>) noexcept>{4, L"getCurrentDarkerSystemColorsState"}, - Method, Callback<::React::JSValue>) noexcept>{5, L"getCurrentPrefersCrossFadeTransitionsState"}, - Method, Callback<::React::JSValue>) noexcept>{6, L"getCurrentReduceTransparencyState"}, - Method, Callback<::React::JSValue>) noexcept>{7, L"getCurrentVoiceOverState"}, - Method{8, L"setAccessibilityContentSizeMultipliers"}, - Method{9, L"setAccessibilityFocus"}, - Method{10, L"announceForAccessibility"}, - Method{11, L"announceForAccessibilityWithOptions"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "getCurrentBoldTextState", - " REACT_METHOD(getCurrentBoldTextState) void getCurrentBoldTextState(std::function const & onSuccess, std::function const & onError) noexcept { /* implementation */ }\n" - " REACT_METHOD(getCurrentBoldTextState) static void getCurrentBoldTextState(std::function const & onSuccess, std::function const & onError) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 1, - "getCurrentGrayscaleState", - " REACT_METHOD(getCurrentGrayscaleState) void getCurrentGrayscaleState(std::function const & onSuccess, std::function const & onError) noexcept { /* implementation */ }\n" - " REACT_METHOD(getCurrentGrayscaleState) static void getCurrentGrayscaleState(std::function const & onSuccess, std::function const & onError) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 2, - "getCurrentInvertColorsState", - " REACT_METHOD(getCurrentInvertColorsState) void getCurrentInvertColorsState(std::function const & onSuccess, std::function const & onError) noexcept { /* implementation */ }\n" - " REACT_METHOD(getCurrentInvertColorsState) static void getCurrentInvertColorsState(std::function const & onSuccess, std::function const & onError) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 3, - "getCurrentReduceMotionState", - " REACT_METHOD(getCurrentReduceMotionState) void getCurrentReduceMotionState(std::function const & onSuccess, std::function const & onError) noexcept { /* implementation */ }\n" - " REACT_METHOD(getCurrentReduceMotionState) static void getCurrentReduceMotionState(std::function const & onSuccess, std::function const & onError) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 4, - "getCurrentDarkerSystemColorsState", - " REACT_METHOD(getCurrentDarkerSystemColorsState) void getCurrentDarkerSystemColorsState(std::function const & onSuccess, std::function const & onError) noexcept { /* implementation */ }\n" - " REACT_METHOD(getCurrentDarkerSystemColorsState) static void getCurrentDarkerSystemColorsState(std::function const & onSuccess, std::function const & onError) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 5, - "getCurrentPrefersCrossFadeTransitionsState", - " REACT_METHOD(getCurrentPrefersCrossFadeTransitionsState) void getCurrentPrefersCrossFadeTransitionsState(std::function const & onSuccess, std::function const & onError) noexcept { /* implementation */ }\n" - " REACT_METHOD(getCurrentPrefersCrossFadeTransitionsState) static void getCurrentPrefersCrossFadeTransitionsState(std::function const & onSuccess, std::function const & onError) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 6, - "getCurrentReduceTransparencyState", - " REACT_METHOD(getCurrentReduceTransparencyState) void getCurrentReduceTransparencyState(std::function const & onSuccess, std::function const & onError) noexcept { /* implementation */ }\n" - " REACT_METHOD(getCurrentReduceTransparencyState) static void getCurrentReduceTransparencyState(std::function const & onSuccess, std::function const & onError) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 7, - "getCurrentVoiceOverState", - " REACT_METHOD(getCurrentVoiceOverState) void getCurrentVoiceOverState(std::function const & onSuccess, std::function const & onError) noexcept { /* implementation */ }\n" - " REACT_METHOD(getCurrentVoiceOverState) static void getCurrentVoiceOverState(std::function const & onSuccess, std::function const & onError) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 8, - "setAccessibilityContentSizeMultipliers", - " REACT_METHOD(setAccessibilityContentSizeMultipliers) void setAccessibilityContentSizeMultipliers(AccessibilityManagerSpec_setAccessibilityContentSizeMultipliers_JSMultipliers && JSMultipliers) noexcept { /* implementation */ }\n" - " REACT_METHOD(setAccessibilityContentSizeMultipliers) static void setAccessibilityContentSizeMultipliers(AccessibilityManagerSpec_setAccessibilityContentSizeMultipliers_JSMultipliers && JSMultipliers) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 9, - "setAccessibilityFocus", - " REACT_METHOD(setAccessibilityFocus) void setAccessibilityFocus(double reactTag) noexcept { /* implementation */ }\n" - " REACT_METHOD(setAccessibilityFocus) static void setAccessibilityFocus(double reactTag) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 10, - "announceForAccessibility", - " REACT_METHOD(announceForAccessibility) void announceForAccessibility(std::string announcement) noexcept { /* implementation */ }\n" - " REACT_METHOD(announceForAccessibility) static void announceForAccessibility(std::string announcement) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 11, - "announceForAccessibilityWithOptions", - " REACT_METHOD(announceForAccessibilityWithOptions) void announceForAccessibilityWithOptions(std::string announcement, AccessibilityManagerSpec_announceForAccessibilityWithOptions_options && options) noexcept { /* implementation */ }\n" - " REACT_METHOD(announceForAccessibilityWithOptions) static void announceForAccessibilityWithOptions(std::string announcement, AccessibilityManagerSpec_announceForAccessibilityWithOptions_options && options) noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeActionSheetManagerSpec.g.h b/vnext/codegen/NativeActionSheetManagerSpec.g.h deleted file mode 100644 index 09fb149c492..00000000000 --- a/vnext/codegen/NativeActionSheetManagerSpec.g.h +++ /dev/null @@ -1,122 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - -struct ActionSheetManagerSpec_showActionSheetWithOptions_options { - std::optional title; - std::optional message; - std::optional> options; - std::optional> destructiveButtonIndices; - std::optional cancelButtonIndex; - std::optional anchor; - std::optional tintColor; - std::optional cancelButtonTintColor; - std::optional disabledButtonTintColor; - std::optional userInterfaceStyle; - std::optional> disabledButtonIndices; -}; - -struct ActionSheetManagerSpec_showShareActionSheetWithOptions_options { - std::optional message; - std::optional url; - std::optional subject; - std::optional anchor; - std::optional tintColor; - std::optional cancelButtonTintColor; - std::optional disabledButtonTintColor; - std::optional> excludedActivityTypes; - std::optional userInterfaceStyle; -}; - -struct ActionSheetManagerSpec_showShareActionSheetWithOptions_failureCallback_error { - std::string domain; - std::string code; - std::optional<::React::JSValue> userInfo; - std::string message; -}; - - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(ActionSheetManagerSpec_showActionSheetWithOptions_options*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"title", &ActionSheetManagerSpec_showActionSheetWithOptions_options::title}, - {L"message", &ActionSheetManagerSpec_showActionSheetWithOptions_options::message}, - {L"options", &ActionSheetManagerSpec_showActionSheetWithOptions_options::options}, - {L"destructiveButtonIndices", &ActionSheetManagerSpec_showActionSheetWithOptions_options::destructiveButtonIndices}, - {L"cancelButtonIndex", &ActionSheetManagerSpec_showActionSheetWithOptions_options::cancelButtonIndex}, - {L"anchor", &ActionSheetManagerSpec_showActionSheetWithOptions_options::anchor}, - {L"tintColor", &ActionSheetManagerSpec_showActionSheetWithOptions_options::tintColor}, - {L"cancelButtonTintColor", &ActionSheetManagerSpec_showActionSheetWithOptions_options::cancelButtonTintColor}, - {L"disabledButtonTintColor", &ActionSheetManagerSpec_showActionSheetWithOptions_options::disabledButtonTintColor}, - {L"userInterfaceStyle", &ActionSheetManagerSpec_showActionSheetWithOptions_options::userInterfaceStyle}, - {L"disabledButtonIndices", &ActionSheetManagerSpec_showActionSheetWithOptions_options::disabledButtonIndices}, - }; - return fieldMap; -} - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(ActionSheetManagerSpec_showShareActionSheetWithOptions_options*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"message", &ActionSheetManagerSpec_showShareActionSheetWithOptions_options::message}, - {L"url", &ActionSheetManagerSpec_showShareActionSheetWithOptions_options::url}, - {L"subject", &ActionSheetManagerSpec_showShareActionSheetWithOptions_options::subject}, - {L"anchor", &ActionSheetManagerSpec_showShareActionSheetWithOptions_options::anchor}, - {L"tintColor", &ActionSheetManagerSpec_showShareActionSheetWithOptions_options::tintColor}, - {L"cancelButtonTintColor", &ActionSheetManagerSpec_showShareActionSheetWithOptions_options::cancelButtonTintColor}, - {L"disabledButtonTintColor", &ActionSheetManagerSpec_showShareActionSheetWithOptions_options::disabledButtonTintColor}, - {L"excludedActivityTypes", &ActionSheetManagerSpec_showShareActionSheetWithOptions_options::excludedActivityTypes}, - {L"userInterfaceStyle", &ActionSheetManagerSpec_showShareActionSheetWithOptions_options::userInterfaceStyle}, - }; - return fieldMap; -} - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(ActionSheetManagerSpec_showShareActionSheetWithOptions_failureCallback_error*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"domain", &ActionSheetManagerSpec_showShareActionSheetWithOptions_failureCallback_error::domain}, - {L"code", &ActionSheetManagerSpec_showShareActionSheetWithOptions_failureCallback_error::code}, - {L"userInfo", &ActionSheetManagerSpec_showShareActionSheetWithOptions_failureCallback_error::userInfo}, - {L"message", &ActionSheetManagerSpec_showShareActionSheetWithOptions_failureCallback_error::message}, - }; - return fieldMap; -} - -struct ActionSheetManagerSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - Method) noexcept>{0, L"showActionSheetWithOptions"}, - Method, Callback>) noexcept>{1, L"showShareActionSheetWithOptions"}, - Method{2, L"dismissActionSheet"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "showActionSheetWithOptions", - " REACT_METHOD(showActionSheetWithOptions) void showActionSheetWithOptions(ActionSheetManagerSpec_showActionSheetWithOptions_options && options, std::function const & callback) noexcept { /* implementation */ }\n" - " REACT_METHOD(showActionSheetWithOptions) static void showActionSheetWithOptions(ActionSheetManagerSpec_showActionSheetWithOptions_options && options, std::function const & callback) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 1, - "showShareActionSheetWithOptions", - " REACT_METHOD(showShareActionSheetWithOptions) void showShareActionSheetWithOptions(ActionSheetManagerSpec_showShareActionSheetWithOptions_options && options, std::function const & failureCallback, std::function)> const & successCallback) noexcept { /* implementation */ }\n" - " REACT_METHOD(showShareActionSheetWithOptions) static void showShareActionSheetWithOptions(ActionSheetManagerSpec_showShareActionSheetWithOptions_options && options, std::function const & failureCallback, std::function)> const & successCallback) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 2, - "dismissActionSheet", - " REACT_METHOD(dismissActionSheet) void dismissActionSheet() noexcept { /* implementation */ }\n" - " REACT_METHOD(dismissActionSheet) static void dismissActionSheet() noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeAlertManagerSpec.g.h b/vnext/codegen/NativeAlertManagerSpec.g.h deleted file mode 100644 index 507b416abb8..00000000000 --- a/vnext/codegen/NativeAlertManagerSpec.g.h +++ /dev/null @@ -1,64 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - -struct AlertManagerSpec_Args { - std::optional title; - std::optional message; - std::optional> buttons; - std::optional type; - std::optional defaultValue; - std::optional cancelButtonKey; - std::optional destructiveButtonKey; - std::optional preferredButtonKey; - std::optional keyboardType; - std::optional userInterfaceStyle; -}; - - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(AlertManagerSpec_Args*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"title", &AlertManagerSpec_Args::title}, - {L"message", &AlertManagerSpec_Args::message}, - {L"buttons", &AlertManagerSpec_Args::buttons}, - {L"type", &AlertManagerSpec_Args::type}, - {L"defaultValue", &AlertManagerSpec_Args::defaultValue}, - {L"cancelButtonKey", &AlertManagerSpec_Args::cancelButtonKey}, - {L"destructiveButtonKey", &AlertManagerSpec_Args::destructiveButtonKey}, - {L"preferredButtonKey", &AlertManagerSpec_Args::preferredButtonKey}, - {L"keyboardType", &AlertManagerSpec_Args::keyboardType}, - {L"userInterfaceStyle", &AlertManagerSpec_Args::userInterfaceStyle}, - }; - return fieldMap; -} - -struct AlertManagerSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - Method) noexcept>{0, L"alertWithArgs"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "alertWithArgs", - " REACT_METHOD(alertWithArgs) void alertWithArgs(AlertManagerSpec_Args && args, std::function const & callback) noexcept { /* implementation */ }\n" - " REACT_METHOD(alertWithArgs) static void alertWithArgs(AlertManagerSpec_Args && args, std::function const & callback) noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeAnimatedModuleSpec.g.h b/vnext/codegen/NativeAnimatedModuleSpec.g.h deleted file mode 100644 index ce1eea2a5ca..00000000000 --- a/vnext/codegen/NativeAnimatedModuleSpec.g.h +++ /dev/null @@ -1,201 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - -struct AnimatedModuleSpec_EndResult { - bool finished; - std::optional value; - std::optional offset; -}; - -struct AnimatedModuleSpec_EventMapping { - std::vector nativeEventPath; - std::optional animatedValueTag; -}; - - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(AnimatedModuleSpec_EndResult*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"finished", &AnimatedModuleSpec_EndResult::finished}, - {L"value", &AnimatedModuleSpec_EndResult::value}, - {L"offset", &AnimatedModuleSpec_EndResult::offset}, - }; - return fieldMap; -} - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(AnimatedModuleSpec_EventMapping*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"nativeEventPath", &AnimatedModuleSpec_EventMapping::nativeEventPath}, - {L"animatedValueTag", &AnimatedModuleSpec_EventMapping::animatedValueTag}, - }; - return fieldMap; -} - -struct AnimatedModuleSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - Method{0, L"startOperationBatch"}, - Method{1, L"finishOperationBatch"}, - Method{2, L"createAnimatedNode"}, - Method{3, L"updateAnimatedNodeConfig"}, - Method) noexcept>{4, L"getValue"}, - Method{5, L"startListeningToAnimatedNodeValue"}, - Method{6, L"stopListeningToAnimatedNodeValue"}, - Method{7, L"connectAnimatedNodes"}, - Method{8, L"disconnectAnimatedNodes"}, - Method) noexcept>{9, L"startAnimatingNode"}, - Method{10, L"stopAnimation"}, - Method{11, L"setAnimatedNodeValue"}, - Method{12, L"setAnimatedNodeOffset"}, - Method{13, L"flattenAnimatedNodeOffset"}, - Method{14, L"extractAnimatedNodeOffset"}, - Method{15, L"connectAnimatedNodeToView"}, - Method{16, L"disconnectAnimatedNodeFromView"}, - Method{17, L"restoreDefaultValues"}, - Method{18, L"dropAnimatedNode"}, - Method{19, L"addAnimatedEventToView"}, - Method{20, L"removeAnimatedEventFromView"}, - Method{21, L"addListener"}, - Method{22, L"removeListeners"}, - Method{23, L"queueAndExecuteBatchedOperations"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "startOperationBatch", - " REACT_METHOD(startOperationBatch) void startOperationBatch() noexcept { /* implementation */ }\n" - " REACT_METHOD(startOperationBatch) static void startOperationBatch() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 1, - "finishOperationBatch", - " REACT_METHOD(finishOperationBatch) void finishOperationBatch() noexcept { /* implementation */ }\n" - " REACT_METHOD(finishOperationBatch) static void finishOperationBatch() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 2, - "createAnimatedNode", - " REACT_METHOD(createAnimatedNode) void createAnimatedNode(double tag, ::React::JSValue && config) noexcept { /* implementation */ }\n" - " REACT_METHOD(createAnimatedNode) static void createAnimatedNode(double tag, ::React::JSValue && config) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 3, - "updateAnimatedNodeConfig", - " REACT_METHOD(updateAnimatedNodeConfig) void updateAnimatedNodeConfig(double tag, ::React::JSValue && config) noexcept { /* implementation */ }\n" - " REACT_METHOD(updateAnimatedNodeConfig) static void updateAnimatedNodeConfig(double tag, ::React::JSValue && config) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 4, - "getValue", - " REACT_METHOD(getValue) void getValue(double tag, std::function const & saveValueCallback) noexcept { /* implementation */ }\n" - " REACT_METHOD(getValue) static void getValue(double tag, std::function const & saveValueCallback) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 5, - "startListeningToAnimatedNodeValue", - " REACT_METHOD(startListeningToAnimatedNodeValue) void startListeningToAnimatedNodeValue(double tag) noexcept { /* implementation */ }\n" - " REACT_METHOD(startListeningToAnimatedNodeValue) static void startListeningToAnimatedNodeValue(double tag) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 6, - "stopListeningToAnimatedNodeValue", - " REACT_METHOD(stopListeningToAnimatedNodeValue) void stopListeningToAnimatedNodeValue(double tag) noexcept { /* implementation */ }\n" - " REACT_METHOD(stopListeningToAnimatedNodeValue) static void stopListeningToAnimatedNodeValue(double tag) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 7, - "connectAnimatedNodes", - " REACT_METHOD(connectAnimatedNodes) void connectAnimatedNodes(double parentTag, double childTag) noexcept { /* implementation */ }\n" - " REACT_METHOD(connectAnimatedNodes) static void connectAnimatedNodes(double parentTag, double childTag) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 8, - "disconnectAnimatedNodes", - " REACT_METHOD(disconnectAnimatedNodes) void disconnectAnimatedNodes(double parentTag, double childTag) noexcept { /* implementation */ }\n" - " REACT_METHOD(disconnectAnimatedNodes) static void disconnectAnimatedNodes(double parentTag, double childTag) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 9, - "startAnimatingNode", - " REACT_METHOD(startAnimatingNode) void startAnimatingNode(double animationId, double nodeTag, ::React::JSValue && config, std::function const & endCallback) noexcept { /* implementation */ }\n" - " REACT_METHOD(startAnimatingNode) static void startAnimatingNode(double animationId, double nodeTag, ::React::JSValue && config, std::function const & endCallback) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 10, - "stopAnimation", - " REACT_METHOD(stopAnimation) void stopAnimation(double animationId) noexcept { /* implementation */ }\n" - " REACT_METHOD(stopAnimation) static void stopAnimation(double animationId) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 11, - "setAnimatedNodeValue", - " REACT_METHOD(setAnimatedNodeValue) void setAnimatedNodeValue(double nodeTag, double value) noexcept { /* implementation */ }\n" - " REACT_METHOD(setAnimatedNodeValue) static void setAnimatedNodeValue(double nodeTag, double value) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 12, - "setAnimatedNodeOffset", - " REACT_METHOD(setAnimatedNodeOffset) void setAnimatedNodeOffset(double nodeTag, double offset) noexcept { /* implementation */ }\n" - " REACT_METHOD(setAnimatedNodeOffset) static void setAnimatedNodeOffset(double nodeTag, double offset) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 13, - "flattenAnimatedNodeOffset", - " REACT_METHOD(flattenAnimatedNodeOffset) void flattenAnimatedNodeOffset(double nodeTag) noexcept { /* implementation */ }\n" - " REACT_METHOD(flattenAnimatedNodeOffset) static void flattenAnimatedNodeOffset(double nodeTag) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 14, - "extractAnimatedNodeOffset", - " REACT_METHOD(extractAnimatedNodeOffset) void extractAnimatedNodeOffset(double nodeTag) noexcept { /* implementation */ }\n" - " REACT_METHOD(extractAnimatedNodeOffset) static void extractAnimatedNodeOffset(double nodeTag) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 15, - "connectAnimatedNodeToView", - " REACT_METHOD(connectAnimatedNodeToView) void connectAnimatedNodeToView(double nodeTag, double viewTag) noexcept { /* implementation */ }\n" - " REACT_METHOD(connectAnimatedNodeToView) static void connectAnimatedNodeToView(double nodeTag, double viewTag) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 16, - "disconnectAnimatedNodeFromView", - " REACT_METHOD(disconnectAnimatedNodeFromView) void disconnectAnimatedNodeFromView(double nodeTag, double viewTag) noexcept { /* implementation */ }\n" - " REACT_METHOD(disconnectAnimatedNodeFromView) static void disconnectAnimatedNodeFromView(double nodeTag, double viewTag) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 17, - "restoreDefaultValues", - " REACT_METHOD(restoreDefaultValues) void restoreDefaultValues(double nodeTag) noexcept { /* implementation */ }\n" - " REACT_METHOD(restoreDefaultValues) static void restoreDefaultValues(double nodeTag) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 18, - "dropAnimatedNode", - " REACT_METHOD(dropAnimatedNode) void dropAnimatedNode(double tag) noexcept { /* implementation */ }\n" - " REACT_METHOD(dropAnimatedNode) static void dropAnimatedNode(double tag) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 19, - "addAnimatedEventToView", - " REACT_METHOD(addAnimatedEventToView) void addAnimatedEventToView(double viewTag, std::string eventName, AnimatedModuleSpec_EventMapping && eventMapping) noexcept { /* implementation */ }\n" - " REACT_METHOD(addAnimatedEventToView) static void addAnimatedEventToView(double viewTag, std::string eventName, AnimatedModuleSpec_EventMapping && eventMapping) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 20, - "removeAnimatedEventFromView", - " REACT_METHOD(removeAnimatedEventFromView) void removeAnimatedEventFromView(double viewTag, std::string eventName, double animatedNodeTag) noexcept { /* implementation */ }\n" - " REACT_METHOD(removeAnimatedEventFromView) static void removeAnimatedEventFromView(double viewTag, std::string eventName, double animatedNodeTag) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 21, - "addListener", - " REACT_METHOD(addListener) void addListener(std::string eventName) noexcept { /* implementation */ }\n" - " REACT_METHOD(addListener) static void addListener(std::string eventName) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 22, - "removeListeners", - " REACT_METHOD(removeListeners) void removeListeners(double count) noexcept { /* implementation */ }\n" - " REACT_METHOD(removeListeners) static void removeListeners(double count) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 23, - "queueAndExecuteBatchedOperations", - " REACT_METHOD(queueAndExecuteBatchedOperations) void queueAndExecuteBatchedOperations(::React::JSValueArray && operationsAndArgs) noexcept { /* implementation */ }\n" - " REACT_METHOD(queueAndExecuteBatchedOperations) static void queueAndExecuteBatchedOperations(::React::JSValueArray && operationsAndArgs) noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeAnimatedTurboModuleSpec.g.h b/vnext/codegen/NativeAnimatedTurboModuleSpec.g.h deleted file mode 100644 index 7bf019e7ab6..00000000000 --- a/vnext/codegen/NativeAnimatedTurboModuleSpec.g.h +++ /dev/null @@ -1,201 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - -struct AnimatedTurboModuleSpec_EndResult { - bool finished; - std::optional value; - std::optional offset; -}; - -struct AnimatedTurboModuleSpec_EventMapping { - std::vector nativeEventPath; - std::optional animatedValueTag; -}; - - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(AnimatedTurboModuleSpec_EndResult*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"finished", &AnimatedTurboModuleSpec_EndResult::finished}, - {L"value", &AnimatedTurboModuleSpec_EndResult::value}, - {L"offset", &AnimatedTurboModuleSpec_EndResult::offset}, - }; - return fieldMap; -} - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(AnimatedTurboModuleSpec_EventMapping*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"nativeEventPath", &AnimatedTurboModuleSpec_EventMapping::nativeEventPath}, - {L"animatedValueTag", &AnimatedTurboModuleSpec_EventMapping::animatedValueTag}, - }; - return fieldMap; -} - -struct AnimatedTurboModuleSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - Method{0, L"startOperationBatch"}, - Method{1, L"finishOperationBatch"}, - Method{2, L"createAnimatedNode"}, - Method{3, L"updateAnimatedNodeConfig"}, - Method) noexcept>{4, L"getValue"}, - Method{5, L"startListeningToAnimatedNodeValue"}, - Method{6, L"stopListeningToAnimatedNodeValue"}, - Method{7, L"connectAnimatedNodes"}, - Method{8, L"disconnectAnimatedNodes"}, - Method) noexcept>{9, L"startAnimatingNode"}, - Method{10, L"stopAnimation"}, - Method{11, L"setAnimatedNodeValue"}, - Method{12, L"setAnimatedNodeOffset"}, - Method{13, L"flattenAnimatedNodeOffset"}, - Method{14, L"extractAnimatedNodeOffset"}, - Method{15, L"connectAnimatedNodeToView"}, - Method{16, L"disconnectAnimatedNodeFromView"}, - Method{17, L"restoreDefaultValues"}, - Method{18, L"dropAnimatedNode"}, - Method{19, L"addAnimatedEventToView"}, - Method{20, L"removeAnimatedEventFromView"}, - Method{21, L"addListener"}, - Method{22, L"removeListeners"}, - Method{23, L"queueAndExecuteBatchedOperations"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "startOperationBatch", - " REACT_METHOD(startOperationBatch) void startOperationBatch() noexcept { /* implementation */ }\n" - " REACT_METHOD(startOperationBatch) static void startOperationBatch() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 1, - "finishOperationBatch", - " REACT_METHOD(finishOperationBatch) void finishOperationBatch() noexcept { /* implementation */ }\n" - " REACT_METHOD(finishOperationBatch) static void finishOperationBatch() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 2, - "createAnimatedNode", - " REACT_METHOD(createAnimatedNode) void createAnimatedNode(double tag, ::React::JSValue && config) noexcept { /* implementation */ }\n" - " REACT_METHOD(createAnimatedNode) static void createAnimatedNode(double tag, ::React::JSValue && config) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 3, - "updateAnimatedNodeConfig", - " REACT_METHOD(updateAnimatedNodeConfig) void updateAnimatedNodeConfig(double tag, ::React::JSValue && config) noexcept { /* implementation */ }\n" - " REACT_METHOD(updateAnimatedNodeConfig) static void updateAnimatedNodeConfig(double tag, ::React::JSValue && config) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 4, - "getValue", - " REACT_METHOD(getValue) void getValue(double tag, std::function const & saveValueCallback) noexcept { /* implementation */ }\n" - " REACT_METHOD(getValue) static void getValue(double tag, std::function const & saveValueCallback) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 5, - "startListeningToAnimatedNodeValue", - " REACT_METHOD(startListeningToAnimatedNodeValue) void startListeningToAnimatedNodeValue(double tag) noexcept { /* implementation */ }\n" - " REACT_METHOD(startListeningToAnimatedNodeValue) static void startListeningToAnimatedNodeValue(double tag) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 6, - "stopListeningToAnimatedNodeValue", - " REACT_METHOD(stopListeningToAnimatedNodeValue) void stopListeningToAnimatedNodeValue(double tag) noexcept { /* implementation */ }\n" - " REACT_METHOD(stopListeningToAnimatedNodeValue) static void stopListeningToAnimatedNodeValue(double tag) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 7, - "connectAnimatedNodes", - " REACT_METHOD(connectAnimatedNodes) void connectAnimatedNodes(double parentTag, double childTag) noexcept { /* implementation */ }\n" - " REACT_METHOD(connectAnimatedNodes) static void connectAnimatedNodes(double parentTag, double childTag) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 8, - "disconnectAnimatedNodes", - " REACT_METHOD(disconnectAnimatedNodes) void disconnectAnimatedNodes(double parentTag, double childTag) noexcept { /* implementation */ }\n" - " REACT_METHOD(disconnectAnimatedNodes) static void disconnectAnimatedNodes(double parentTag, double childTag) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 9, - "startAnimatingNode", - " REACT_METHOD(startAnimatingNode) void startAnimatingNode(double animationId, double nodeTag, ::React::JSValue && config, std::function const & endCallback) noexcept { /* implementation */ }\n" - " REACT_METHOD(startAnimatingNode) static void startAnimatingNode(double animationId, double nodeTag, ::React::JSValue && config, std::function const & endCallback) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 10, - "stopAnimation", - " REACT_METHOD(stopAnimation) void stopAnimation(double animationId) noexcept { /* implementation */ }\n" - " REACT_METHOD(stopAnimation) static void stopAnimation(double animationId) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 11, - "setAnimatedNodeValue", - " REACT_METHOD(setAnimatedNodeValue) void setAnimatedNodeValue(double nodeTag, double value) noexcept { /* implementation */ }\n" - " REACT_METHOD(setAnimatedNodeValue) static void setAnimatedNodeValue(double nodeTag, double value) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 12, - "setAnimatedNodeOffset", - " REACT_METHOD(setAnimatedNodeOffset) void setAnimatedNodeOffset(double nodeTag, double offset) noexcept { /* implementation */ }\n" - " REACT_METHOD(setAnimatedNodeOffset) static void setAnimatedNodeOffset(double nodeTag, double offset) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 13, - "flattenAnimatedNodeOffset", - " REACT_METHOD(flattenAnimatedNodeOffset) void flattenAnimatedNodeOffset(double nodeTag) noexcept { /* implementation */ }\n" - " REACT_METHOD(flattenAnimatedNodeOffset) static void flattenAnimatedNodeOffset(double nodeTag) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 14, - "extractAnimatedNodeOffset", - " REACT_METHOD(extractAnimatedNodeOffset) void extractAnimatedNodeOffset(double nodeTag) noexcept { /* implementation */ }\n" - " REACT_METHOD(extractAnimatedNodeOffset) static void extractAnimatedNodeOffset(double nodeTag) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 15, - "connectAnimatedNodeToView", - " REACT_METHOD(connectAnimatedNodeToView) void connectAnimatedNodeToView(double nodeTag, double viewTag) noexcept { /* implementation */ }\n" - " REACT_METHOD(connectAnimatedNodeToView) static void connectAnimatedNodeToView(double nodeTag, double viewTag) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 16, - "disconnectAnimatedNodeFromView", - " REACT_METHOD(disconnectAnimatedNodeFromView) void disconnectAnimatedNodeFromView(double nodeTag, double viewTag) noexcept { /* implementation */ }\n" - " REACT_METHOD(disconnectAnimatedNodeFromView) static void disconnectAnimatedNodeFromView(double nodeTag, double viewTag) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 17, - "restoreDefaultValues", - " REACT_METHOD(restoreDefaultValues) void restoreDefaultValues(double nodeTag) noexcept { /* implementation */ }\n" - " REACT_METHOD(restoreDefaultValues) static void restoreDefaultValues(double nodeTag) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 18, - "dropAnimatedNode", - " REACT_METHOD(dropAnimatedNode) void dropAnimatedNode(double tag) noexcept { /* implementation */ }\n" - " REACT_METHOD(dropAnimatedNode) static void dropAnimatedNode(double tag) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 19, - "addAnimatedEventToView", - " REACT_METHOD(addAnimatedEventToView) void addAnimatedEventToView(double viewTag, std::string eventName, AnimatedTurboModuleSpec_EventMapping && eventMapping) noexcept { /* implementation */ }\n" - " REACT_METHOD(addAnimatedEventToView) static void addAnimatedEventToView(double viewTag, std::string eventName, AnimatedTurboModuleSpec_EventMapping && eventMapping) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 20, - "removeAnimatedEventFromView", - " REACT_METHOD(removeAnimatedEventFromView) void removeAnimatedEventFromView(double viewTag, std::string eventName, double animatedNodeTag) noexcept { /* implementation */ }\n" - " REACT_METHOD(removeAnimatedEventFromView) static void removeAnimatedEventFromView(double viewTag, std::string eventName, double animatedNodeTag) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 21, - "addListener", - " REACT_METHOD(addListener) void addListener(std::string eventName) noexcept { /* implementation */ }\n" - " REACT_METHOD(addListener) static void addListener(std::string eventName) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 22, - "removeListeners", - " REACT_METHOD(removeListeners) void removeListeners(double count) noexcept { /* implementation */ }\n" - " REACT_METHOD(removeListeners) static void removeListeners(double count) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 23, - "queueAndExecuteBatchedOperations", - " REACT_METHOD(queueAndExecuteBatchedOperations) void queueAndExecuteBatchedOperations(::React::JSValueArray && operationsAndArgs) noexcept { /* implementation */ }\n" - " REACT_METHOD(queueAndExecuteBatchedOperations) static void queueAndExecuteBatchedOperations(::React::JSValueArray && operationsAndArgs) noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeAppStateSpec.g.h b/vnext/codegen/NativeAppStateSpec.g.h deleted file mode 100644 index b9586d91db3..00000000000 --- a/vnext/codegen/NativeAppStateSpec.g.h +++ /dev/null @@ -1,69 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - -struct AppStateSpec_AppState { - std::string app_state; -}; - -struct AppStateSpec_AppStateConstants { - std::string initialAppState; -}; - - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(AppStateSpec_AppState*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"app_state", &AppStateSpec_AppState::app_state}, - }; - return fieldMap; -} - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(AppStateSpec_AppStateConstants*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"initialAppState", &AppStateSpec_AppStateConstants::initialAppState}, - }; - return fieldMap; -} - -struct AppStateSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - Method, Callback<::React::JSValue>) noexcept>{0, L"getCurrentAppState"}, - Method{1, L"addListener"}, - Method{2, L"removeListeners"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "getCurrentAppState", - " REACT_METHOD(getCurrentAppState) void getCurrentAppState(std::function const & success, std::function const & error) noexcept { /* implementation */ }\n" - " REACT_METHOD(getCurrentAppState) static void getCurrentAppState(std::function const & success, std::function const & error) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 1, - "addListener", - " REACT_METHOD(addListener) void addListener(std::string eventName) noexcept { /* implementation */ }\n" - " REACT_METHOD(addListener) static void addListener(std::string eventName) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 2, - "removeListeners", - " REACT_METHOD(removeListeners) void removeListeners(double count) noexcept { /* implementation */ }\n" - " REACT_METHOD(removeListeners) static void removeListeners(double count) noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeAppThemeSpec.g.h b/vnext/codegen/NativeAppThemeSpec.g.h deleted file mode 100644 index cdf9bfc7afd..00000000000 --- a/vnext/codegen/NativeAppThemeSpec.g.h +++ /dev/null @@ -1,69 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - -struct AppThemeSpec_HighContrastColors { - std::string ButtonFaceColor; - std::string ButtonTextColor; - std::string GrayTextColor; - std::string HighlightColor; - std::string HighlightTextColor; - std::string HotlightColor; - std::string WindowColor; - std::string WindowTextColor; -}; - -struct AppThemeSpec_AppThemeData { - bool isHighContrast; - AppThemeSpec_HighContrastColors highContrastColors; -}; - - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(AppThemeSpec_HighContrastColors*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"ButtonFaceColor", &AppThemeSpec_HighContrastColors::ButtonFaceColor}, - {L"ButtonTextColor", &AppThemeSpec_HighContrastColors::ButtonTextColor}, - {L"GrayTextColor", &AppThemeSpec_HighContrastColors::GrayTextColor}, - {L"HighlightColor", &AppThemeSpec_HighContrastColors::HighlightColor}, - {L"HighlightTextColor", &AppThemeSpec_HighContrastColors::HighlightTextColor}, - {L"HotlightColor", &AppThemeSpec_HighContrastColors::HotlightColor}, - {L"WindowColor", &AppThemeSpec_HighContrastColors::WindowColor}, - {L"WindowTextColor", &AppThemeSpec_HighContrastColors::WindowTextColor}, - }; - return fieldMap; -} - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(AppThemeSpec_AppThemeData*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"isHighContrast", &AppThemeSpec_AppThemeData::isHighContrast}, - {L"highContrastColors", &AppThemeSpec_AppThemeData::highContrastColors}, - }; - return fieldMap; -} - -struct AppThemeSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeAppearanceSpec.g.h b/vnext/codegen/NativeAppearanceSpec.g.h deleted file mode 100644 index af2d1120ff0..00000000000 --- a/vnext/codegen/NativeAppearanceSpec.g.h +++ /dev/null @@ -1,53 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - - -struct AppearanceSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - SyncMethod() noexcept>{0, L"getColorScheme"}, - Method{1, L"setColorScheme"}, - Method{2, L"addListener"}, - Method{3, L"removeListeners"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "getColorScheme", - " REACT_SYNC_METHOD(getColorScheme) std::optional getColorScheme() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(getColorScheme) static std::optional getColorScheme() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 1, - "setColorScheme", - " REACT_METHOD(setColorScheme) void setColorScheme(std::string colorScheme) noexcept { /* implementation */ }\n" - " REACT_METHOD(setColorScheme) static void setColorScheme(std::string colorScheme) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 2, - "addListener", - " REACT_METHOD(addListener) void addListener(std::string eventName) noexcept { /* implementation */ }\n" - " REACT_METHOD(addListener) static void addListener(std::string eventName) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 3, - "removeListeners", - " REACT_METHOD(removeListeners) void removeListeners(double count) noexcept { /* implementation */ }\n" - " REACT_METHOD(removeListeners) static void removeListeners(double count) noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeBlobModuleSpec.g.h b/vnext/codegen/NativeBlobModuleSpec.g.h deleted file mode 100644 index 218565360b0..00000000000 --- a/vnext/codegen/NativeBlobModuleSpec.g.h +++ /dev/null @@ -1,78 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - -struct BlobModuleSpec_Constants { - std::optional BLOB_URI_SCHEME; - std::optional BLOB_URI_HOST; -}; - - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(BlobModuleSpec_Constants*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"BLOB_URI_SCHEME", &BlobModuleSpec_Constants::BLOB_URI_SCHEME}, - {L"BLOB_URI_HOST", &BlobModuleSpec_Constants::BLOB_URI_HOST}, - }; - return fieldMap; -} - -struct BlobModuleSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - Method{0, L"addNetworkingHandler"}, - Method{1, L"addWebSocketHandler"}, - Method{2, L"removeWebSocketHandler"}, - Method{3, L"sendOverSocket"}, - Method, std::string) noexcept>{4, L"createFromParts"}, - Method{5, L"release"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "addNetworkingHandler", - " REACT_METHOD(addNetworkingHandler) void addNetworkingHandler() noexcept { /* implementation */ }\n" - " REACT_METHOD(addNetworkingHandler) static void addNetworkingHandler() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 1, - "addWebSocketHandler", - " REACT_METHOD(addWebSocketHandler) void addWebSocketHandler(double id) noexcept { /* implementation */ }\n" - " REACT_METHOD(addWebSocketHandler) static void addWebSocketHandler(double id) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 2, - "removeWebSocketHandler", - " REACT_METHOD(removeWebSocketHandler) void removeWebSocketHandler(double id) noexcept { /* implementation */ }\n" - " REACT_METHOD(removeWebSocketHandler) static void removeWebSocketHandler(double id) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 3, - "sendOverSocket", - " REACT_METHOD(sendOverSocket) void sendOverSocket(::React::JSValue && blob, double socketID) noexcept { /* implementation */ }\n" - " REACT_METHOD(sendOverSocket) static void sendOverSocket(::React::JSValue && blob, double socketID) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 4, - "createFromParts", - " REACT_METHOD(createFromParts) void createFromParts(std::vector<::React::JSValue> const & parts, std::string withId) noexcept { /* implementation */ }\n" - " REACT_METHOD(createFromParts) static void createFromParts(std::vector<::React::JSValue> const & parts, std::string withId) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 5, - "release", - " REACT_METHOD(release) void release(std::string blobId) noexcept { /* implementation */ }\n" - " REACT_METHOD(release) static void release(std::string blobId) noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeClipboardSpec.g.h b/vnext/codegen/NativeClipboardSpec.g.h deleted file mode 100644 index 1908c625795..00000000000 --- a/vnext/codegen/NativeClipboardSpec.g.h +++ /dev/null @@ -1,41 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - - -struct ClipboardSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - Method) noexcept>{0, L"getString"}, - Method{1, L"setString"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "getString", - " REACT_METHOD(getString) void getString(::React::ReactPromise &&result) noexcept { /* implementation */ }\n" - " REACT_METHOD(getString) static void getString(::React::ReactPromise &&result) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 1, - "setString", - " REACT_METHOD(setString) void setString(std::string content) noexcept { /* implementation */ }\n" - " REACT_METHOD(setString) static void setString(std::string content) noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeDOMSpec.g.h b/vnext/codegen/NativeDOMSpec.g.h deleted file mode 100644 index 1ae9a7b3f34..00000000000 --- a/vnext/codegen/NativeDOMSpec.g.h +++ /dev/null @@ -1,149 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - - -struct DOMSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - SyncMethod{0, L"compareDocumentPosition"}, - SyncMethod() noexcept>{1, L"getChildNodes"}, - SyncMethod<() noexcept>{2, L"getParentNode"}, - SyncMethod{3, L"isConnected"}, - SyncMethod() noexcept>{4, L"getBorderWidth"}, - SyncMethod(, bool) noexcept>{5, L"getBoundingClientRect"}, - SyncMethod() noexcept>{6, L"getInnerSize"}, - SyncMethod() noexcept>{7, L"getScrollPosition"}, - SyncMethod() noexcept>{8, L"getScrollSize"}, - SyncMethod{9, L"getTagName"}, - SyncMethod{10, L"getTextContent"}, - SyncMethod{11, L"hasPointerCapture"}, - Method{12, L"releasePointerCapture"}, - Method{13, L"setPointerCapture"}, - SyncMethod() noexcept>{14, L"getOffset"}, - SyncMethod<(double, ) noexcept>{15, L"linkRootNode"}, - Method) noexcept>{16, L"measure"}, - Method) noexcept>{17, L"measureInWindow"}, - Method, Callback) noexcept>{18, L"measureLayout"}, - Method{19, L"setNativeProps"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "compareDocumentPosition", - " REACT_SYNC_METHOD(compareDocumentPosition) double compareDocumentPosition( nativeNodeReference, otherNativeNodeReference) noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(compareDocumentPosition) static double compareDocumentPosition( nativeNodeReference, otherNativeNodeReference) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 1, - "getChildNodes", - " REACT_SYNC_METHOD(getChildNodes) std::vector<> getChildNodes( nativeNodeReference) noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(getChildNodes) static std::vector<> getChildNodes( nativeNodeReference) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 2, - "getParentNode", - " REACT_SYNC_METHOD(getParentNode) getParentNode( nativeNodeReference) noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(getParentNode) static getParentNode( nativeNodeReference) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 3, - "isConnected", - " REACT_SYNC_METHOD(isConnected) bool isConnected( nativeNodeReference) noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(isConnected) static bool isConnected( nativeNodeReference) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 4, - "getBorderWidth", - " REACT_SYNC_METHOD(getBorderWidth) std::vector getBorderWidth( nativeElementReference) noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(getBorderWidth) static std::vector getBorderWidth( nativeElementReference) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 5, - "getBoundingClientRect", - " REACT_SYNC_METHOD(getBoundingClientRect) std::vector getBoundingClientRect( nativeElementReference, bool includeTransform) noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(getBoundingClientRect) static std::vector getBoundingClientRect( nativeElementReference, bool includeTransform) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 6, - "getInnerSize", - " REACT_SYNC_METHOD(getInnerSize) std::vector getInnerSize( nativeElementReference) noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(getInnerSize) static std::vector getInnerSize( nativeElementReference) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 7, - "getScrollPosition", - " REACT_SYNC_METHOD(getScrollPosition) std::vector getScrollPosition( nativeElementReference) noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(getScrollPosition) static std::vector getScrollPosition( nativeElementReference) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 8, - "getScrollSize", - " REACT_SYNC_METHOD(getScrollSize) std::vector getScrollSize( nativeElementReference) noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(getScrollSize) static std::vector getScrollSize( nativeElementReference) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 9, - "getTagName", - " REACT_SYNC_METHOD(getTagName) std::string getTagName( nativeElementReference) noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(getTagName) static std::string getTagName( nativeElementReference) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 10, - "getTextContent", - " REACT_SYNC_METHOD(getTextContent) std::string getTextContent( nativeElementReference) noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(getTextContent) static std::string getTextContent( nativeElementReference) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 11, - "hasPointerCapture", - " REACT_SYNC_METHOD(hasPointerCapture) bool hasPointerCapture( nativeElementReference, double pointerId) noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(hasPointerCapture) static bool hasPointerCapture( nativeElementReference, double pointerId) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 12, - "releasePointerCapture", - " REACT_METHOD(releasePointerCapture) void releasePointerCapture( nativeElementReference, double pointerId) noexcept { /* implementation */ }\n" - " REACT_METHOD(releasePointerCapture) static void releasePointerCapture( nativeElementReference, double pointerId) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 13, - "setPointerCapture", - " REACT_METHOD(setPointerCapture) void setPointerCapture( nativeElementReference, double pointerId) noexcept { /* implementation */ }\n" - " REACT_METHOD(setPointerCapture) static void setPointerCapture( nativeElementReference, double pointerId) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 14, - "getOffset", - " REACT_SYNC_METHOD(getOffset) std::vector<> getOffset( nativeElementReference) noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(getOffset) static std::vector<> getOffset( nativeElementReference) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 15, - "linkRootNode", - " REACT_SYNC_METHOD(linkRootNode) linkRootNode(double rootTag, instanceHandle) noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(linkRootNode) static linkRootNode(double rootTag, instanceHandle) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 16, - "measure", - " REACT_METHOD(measure) void measure( nativeElementReference, std::function const & callback) noexcept { /* implementation */ }\n" - " REACT_METHOD(measure) static void measure( nativeElementReference, std::function const & callback) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 17, - "measureInWindow", - " REACT_METHOD(measureInWindow) void measureInWindow( nativeElementReference, std::function const & callback) noexcept { /* implementation */ }\n" - " REACT_METHOD(measureInWindow) static void measureInWindow( nativeElementReference, std::function const & callback) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 18, - "measureLayout", - " REACT_METHOD(measureLayout) void measureLayout( nativeElementReference, relativeNode, std::function const & onFail, std::function const & onSuccess) noexcept { /* implementation */ }\n" - " REACT_METHOD(measureLayout) static void measureLayout( nativeElementReference, relativeNode, std::function const & onFail, std::function const & onSuccess) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 19, - "setNativeProps", - " REACT_METHOD(setNativeProps) void setNativeProps( nativeElementReference, updatePayload) noexcept { /* implementation */ }\n" - " REACT_METHOD(setNativeProps) static void setNativeProps( nativeElementReference, updatePayload) noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeDevLoadingViewSpec.g.h b/vnext/codegen/NativeDevLoadingViewSpec.g.h deleted file mode 100644 index 8df12e28295..00000000000 --- a/vnext/codegen/NativeDevLoadingViewSpec.g.h +++ /dev/null @@ -1,41 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - - -struct DevLoadingViewSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - Method, std::optional) noexcept>{0, L"showMessage"}, - Method{1, L"hide"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "showMessage", - " REACT_METHOD(showMessage) void showMessage(std::string message, std::optional withColor, std::optional withBackgroundColor) noexcept { /* implementation */ }\n" - " REACT_METHOD(showMessage) static void showMessage(std::string message, std::optional withColor, std::optional withBackgroundColor) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 1, - "hide", - " REACT_METHOD(hide) void hide() noexcept { /* implementation */ }\n" - " REACT_METHOD(hide) static void hide() noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeDevMenuSpec.g.h b/vnext/codegen/NativeDevMenuSpec.g.h deleted file mode 100644 index db5e1edf413..00000000000 --- a/vnext/codegen/NativeDevMenuSpec.g.h +++ /dev/null @@ -1,53 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - - -struct DevMenuSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - Method{0, L"show"}, - Method{1, L"reload"}, - Method{2, L"setProfilingEnabled"}, - Method{3, L"setHotLoadingEnabled"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "show", - " REACT_METHOD(show) void show() noexcept { /* implementation */ }\n" - " REACT_METHOD(show) static void show() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 1, - "reload", - " REACT_METHOD(reload) void reload() noexcept { /* implementation */ }\n" - " REACT_METHOD(reload) static void reload() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 2, - "setProfilingEnabled", - " REACT_METHOD(setProfilingEnabled) void setProfilingEnabled(bool enabled) noexcept { /* implementation */ }\n" - " REACT_METHOD(setProfilingEnabled) static void setProfilingEnabled(bool enabled) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 3, - "setHotLoadingEnabled", - " REACT_METHOD(setHotLoadingEnabled) void setHotLoadingEnabled(bool enabled) noexcept { /* implementation */ }\n" - " REACT_METHOD(setHotLoadingEnabled) static void setHotLoadingEnabled(bool enabled) noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeDevSettingsSpec.g.h b/vnext/codegen/NativeDevSettingsSpec.g.h deleted file mode 100644 index faea2113e9b..00000000000 --- a/vnext/codegen/NativeDevSettingsSpec.g.h +++ /dev/null @@ -1,95 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - - -struct DevSettingsSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - Method{0, L"reload"}, - Method{1, L"reloadWithReason"}, - Method{2, L"onFastRefresh"}, - Method{3, L"setHotLoadingEnabled"}, - Method{4, L"setProfilingEnabled"}, - Method{5, L"toggleElementInspector"}, - Method{6, L"addMenuItem"}, - Method{7, L"openDebugger"}, - Method{8, L"addListener"}, - Method{9, L"removeListeners"}, - Method{10, L"setIsShakeToShowDevMenuEnabled"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "reload", - " REACT_METHOD(reload) void reload() noexcept { /* implementation */ }\n" - " REACT_METHOD(reload) static void reload() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 1, - "reloadWithReason", - " REACT_METHOD(reloadWithReason) void reloadWithReason(std::string reason) noexcept { /* implementation */ }\n" - " REACT_METHOD(reloadWithReason) static void reloadWithReason(std::string reason) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 2, - "onFastRefresh", - " REACT_METHOD(onFastRefresh) void onFastRefresh() noexcept { /* implementation */ }\n" - " REACT_METHOD(onFastRefresh) static void onFastRefresh() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 3, - "setHotLoadingEnabled", - " REACT_METHOD(setHotLoadingEnabled) void setHotLoadingEnabled(bool isHotLoadingEnabled) noexcept { /* implementation */ }\n" - " REACT_METHOD(setHotLoadingEnabled) static void setHotLoadingEnabled(bool isHotLoadingEnabled) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 4, - "setProfilingEnabled", - " REACT_METHOD(setProfilingEnabled) void setProfilingEnabled(bool isProfilingEnabled) noexcept { /* implementation */ }\n" - " REACT_METHOD(setProfilingEnabled) static void setProfilingEnabled(bool isProfilingEnabled) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 5, - "toggleElementInspector", - " REACT_METHOD(toggleElementInspector) void toggleElementInspector() noexcept { /* implementation */ }\n" - " REACT_METHOD(toggleElementInspector) static void toggleElementInspector() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 6, - "addMenuItem", - " REACT_METHOD(addMenuItem) void addMenuItem(std::string title) noexcept { /* implementation */ }\n" - " REACT_METHOD(addMenuItem) static void addMenuItem(std::string title) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 7, - "openDebugger", - " REACT_METHOD(openDebugger) void openDebugger() noexcept { /* implementation */ }\n" - " REACT_METHOD(openDebugger) static void openDebugger() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 8, - "addListener", - " REACT_METHOD(addListener) void addListener(std::string eventName) noexcept { /* implementation */ }\n" - " REACT_METHOD(addListener) static void addListener(std::string eventName) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 9, - "removeListeners", - " REACT_METHOD(removeListeners) void removeListeners(double count) noexcept { /* implementation */ }\n" - " REACT_METHOD(removeListeners) static void removeListeners(double count) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 10, - "setIsShakeToShowDevMenuEnabled", - " REACT_METHOD(setIsShakeToShowDevMenuEnabled) void setIsShakeToShowDevMenuEnabled(bool enabled) noexcept { /* implementation */ }\n" - " REACT_METHOD(setIsShakeToShowDevMenuEnabled) static void setIsShakeToShowDevMenuEnabled(bool enabled) noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeDeviceEventManagerSpec.g.h b/vnext/codegen/NativeDeviceEventManagerSpec.g.h deleted file mode 100644 index 84c12436a76..00000000000 --- a/vnext/codegen/NativeDeviceEventManagerSpec.g.h +++ /dev/null @@ -1,35 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - - -struct DeviceEventManagerSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - Method{0, L"invokeDefaultBackPressHandler"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "invokeDefaultBackPressHandler", - " REACT_METHOD(invokeDefaultBackPressHandler) void invokeDefaultBackPressHandler() noexcept { /* implementation */ }\n" - " REACT_METHOD(invokeDefaultBackPressHandler) static void invokeDefaultBackPressHandler() noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeDeviceInfoSpec.g.h b/vnext/codegen/NativeDeviceInfoSpec.g.h deleted file mode 100644 index f243ab774a4..00000000000 --- a/vnext/codegen/NativeDeviceInfoSpec.g.h +++ /dev/null @@ -1,99 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - -struct DeviceInfoSpec_DisplayMetrics { - double width; - double height; - double scale; - double fontScale; -}; - -struct DeviceInfoSpec_DisplayMetricsAndroid { - double width; - double height; - double scale; - double fontScale; - double densityDpi; -}; - -struct DeviceInfoSpec_DimensionsPayload { - std::optional window; - std::optional screen; - std::optional windowPhysicalPixels; - std::optional screenPhysicalPixels; -}; - -struct DeviceInfoSpec_DeviceInfoConstants { - DeviceInfoSpec_DimensionsPayload Dimensions; - std::optional isEdgeToEdge; - std::optional isIPhoneX_deprecated; -}; - - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(DeviceInfoSpec_DisplayMetrics*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"width", &DeviceInfoSpec_DisplayMetrics::width}, - {L"height", &DeviceInfoSpec_DisplayMetrics::height}, - {L"scale", &DeviceInfoSpec_DisplayMetrics::scale}, - {L"fontScale", &DeviceInfoSpec_DisplayMetrics::fontScale}, - }; - return fieldMap; -} - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(DeviceInfoSpec_DisplayMetricsAndroid*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"width", &DeviceInfoSpec_DisplayMetricsAndroid::width}, - {L"height", &DeviceInfoSpec_DisplayMetricsAndroid::height}, - {L"scale", &DeviceInfoSpec_DisplayMetricsAndroid::scale}, - {L"fontScale", &DeviceInfoSpec_DisplayMetricsAndroid::fontScale}, - {L"densityDpi", &DeviceInfoSpec_DisplayMetricsAndroid::densityDpi}, - }; - return fieldMap; -} - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(DeviceInfoSpec_DimensionsPayload*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"window", &DeviceInfoSpec_DimensionsPayload::window}, - {L"screen", &DeviceInfoSpec_DimensionsPayload::screen}, - {L"windowPhysicalPixels", &DeviceInfoSpec_DimensionsPayload::windowPhysicalPixels}, - {L"screenPhysicalPixels", &DeviceInfoSpec_DimensionsPayload::screenPhysicalPixels}, - }; - return fieldMap; -} - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(DeviceInfoSpec_DeviceInfoConstants*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"Dimensions", &DeviceInfoSpec_DeviceInfoConstants::Dimensions}, - {L"isEdgeToEdge", &DeviceInfoSpec_DeviceInfoConstants::isEdgeToEdge}, - {L"isIPhoneX_deprecated", &DeviceInfoSpec_DeviceInfoConstants::isIPhoneX_deprecated}, - }; - return fieldMap; -} - -struct DeviceInfoSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeDialogManagerAndroidSpec.g.h b/vnext/codegen/NativeDialogManagerAndroidSpec.g.h deleted file mode 100644 index 711c593784d..00000000000 --- a/vnext/codegen/NativeDialogManagerAndroidSpec.g.h +++ /dev/null @@ -1,87 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - -struct DialogManagerAndroidSpec_DialogOptions { - std::optional title; - std::optional message; - std::optional buttonPositive; - std::optional buttonNegative; - std::optional buttonNeutral; - std::optional> items; - std::optional cancelable; -}; - -struct DialogManagerAndroidSpec_Constants { - std::string buttonClicked; - std::string dismissed; - double buttonPositive; - double buttonNegative; - double buttonNeutral; -}; - - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(DialogManagerAndroidSpec_DialogOptions*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"title", &DialogManagerAndroidSpec_DialogOptions::title}, - {L"message", &DialogManagerAndroidSpec_DialogOptions::message}, - {L"buttonPositive", &DialogManagerAndroidSpec_DialogOptions::buttonPositive}, - {L"buttonNegative", &DialogManagerAndroidSpec_DialogOptions::buttonNegative}, - {L"buttonNeutral", &DialogManagerAndroidSpec_DialogOptions::buttonNeutral}, - {L"items", &DialogManagerAndroidSpec_DialogOptions::items}, - {L"cancelable", &DialogManagerAndroidSpec_DialogOptions::cancelable}, - }; - return fieldMap; -} - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(DialogManagerAndroidSpec_Constants*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"buttonClicked", &DialogManagerAndroidSpec_Constants::buttonClicked}, - {L"dismissed", &DialogManagerAndroidSpec_Constants::dismissed}, - {L"buttonPositive", &DialogManagerAndroidSpec_Constants::buttonPositive}, - {L"buttonNegative", &DialogManagerAndroidSpec_Constants::buttonNegative}, - {L"buttonNeutral", &DialogManagerAndroidSpec_Constants::buttonNeutral}, - }; - return fieldMap; -} - -struct DialogManagerAndroidSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto constants = std::tuple{ - TypedConstant{0}, - }; - static constexpr auto methods = std::tuple{ - Method, Callback) noexcept>{0, L"showAlert"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto constantCheckResults = CheckConstants(); - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_CONSTANT_SPEC_ERRORS( - 0, - "DialogManagerAndroidSpec_Constants", - " REACT_GET_CONSTANTS(GetConstants) DialogManagerAndroidSpec_Constants GetConstants() noexcept {/*implementation*/}\n" - " REACT_GET_CONSTANTS(GetConstants) static DialogManagerAndroidSpec_Constants GetConstants() noexcept {/*implementation*/}\n"); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "showAlert", - " REACT_METHOD(showAlert) void showAlert(DialogManagerAndroidSpec_DialogOptions && config, std::function const & onError, std::function const & onAction) noexcept { /* implementation */ }\n" - " REACT_METHOD(showAlert) static void showAlert(DialogManagerAndroidSpec_DialogOptions && config, std::function const & onError, std::function const & onAction) noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeDialogManagerWindowsSpec.g.h b/vnext/codegen/NativeDialogManagerWindowsSpec.g.h deleted file mode 100644 index 9c5fe21a26e..00000000000 --- a/vnext/codegen/NativeDialogManagerWindowsSpec.g.h +++ /dev/null @@ -1,91 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - -struct DialogManagerWindowsSpec_DialogOptions { - std::optional title; - std::optional message; - std::optional buttonPositive; - std::optional buttonNegative; - std::optional buttonNeutral; - std::optional> items; - std::optional cancelable; - std::optional defaultButton; - std::optional rootTag; -}; - -struct DialogManagerWindowsSpec_Constants { - std::string buttonClicked; - std::string dismissed; - int buttonPositive; - int buttonNegative; - int buttonNeutral; -}; - - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(DialogManagerWindowsSpec_DialogOptions*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"title", &DialogManagerWindowsSpec_DialogOptions::title}, - {L"message", &DialogManagerWindowsSpec_DialogOptions::message}, - {L"buttonPositive", &DialogManagerWindowsSpec_DialogOptions::buttonPositive}, - {L"buttonNegative", &DialogManagerWindowsSpec_DialogOptions::buttonNegative}, - {L"buttonNeutral", &DialogManagerWindowsSpec_DialogOptions::buttonNeutral}, - {L"items", &DialogManagerWindowsSpec_DialogOptions::items}, - {L"cancelable", &DialogManagerWindowsSpec_DialogOptions::cancelable}, - {L"defaultButton", &DialogManagerWindowsSpec_DialogOptions::defaultButton}, - {L"rootTag", &DialogManagerWindowsSpec_DialogOptions::rootTag}, - }; - return fieldMap; -} - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(DialogManagerWindowsSpec_Constants*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"buttonClicked", &DialogManagerWindowsSpec_Constants::buttonClicked}, - {L"dismissed", &DialogManagerWindowsSpec_Constants::dismissed}, - {L"buttonPositive", &DialogManagerWindowsSpec_Constants::buttonPositive}, - {L"buttonNegative", &DialogManagerWindowsSpec_Constants::buttonNegative}, - {L"buttonNeutral", &DialogManagerWindowsSpec_Constants::buttonNeutral}, - }; - return fieldMap; -} - -struct DialogManagerWindowsSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto constants = std::tuple{ - TypedConstant{0}, - }; - static constexpr auto methods = std::tuple{ - Method, Callback) noexcept>{0, L"showAlert"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto constantCheckResults = CheckConstants(); - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_CONSTANT_SPEC_ERRORS( - 0, - "DialogManagerWindowsSpec_Constants", - " REACT_GET_CONSTANTS(GetConstants) DialogManagerWindowsSpec_Constants GetConstants() noexcept {/*implementation*/}\n" - " REACT_GET_CONSTANTS(GetConstants) static DialogManagerWindowsSpec_Constants GetConstants() noexcept {/*implementation*/}\n"); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "showAlert", - " REACT_METHOD(showAlert) void showAlert(DialogManagerWindowsSpec_DialogOptions && config, std::function const & onError, std::function const & onAction) noexcept { /* implementation */ }\n" - " REACT_METHOD(showAlert) static void showAlert(DialogManagerWindowsSpec_DialogOptions && config, std::function const & onError, std::function const & onAction) noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeExceptionsManagerSpec.g.h b/vnext/codegen/NativeExceptionsManagerSpec.g.h deleted file mode 100644 index a2a97893f34..00000000000 --- a/vnext/codegen/NativeExceptionsManagerSpec.g.h +++ /dev/null @@ -1,97 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - -struct ExceptionsManagerSpec_StackFrame { - std::optional column; - std::optional file; - std::optional lineNumber; - std::string methodName; - std::optional collapse; -}; - -struct ExceptionsManagerSpec_ExceptionData { - std::string message; - std::optional originalMessage; - std::optional name; - std::optional componentStack; - std::vector stack; - double id; - bool isFatal; - std::optional<::React::JSValue> extraData; -}; - - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(ExceptionsManagerSpec_StackFrame*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"column", &ExceptionsManagerSpec_StackFrame::column}, - {L"file", &ExceptionsManagerSpec_StackFrame::file}, - {L"lineNumber", &ExceptionsManagerSpec_StackFrame::lineNumber}, - {L"methodName", &ExceptionsManagerSpec_StackFrame::methodName}, - {L"collapse", &ExceptionsManagerSpec_StackFrame::collapse}, - }; - return fieldMap; -} - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(ExceptionsManagerSpec_ExceptionData*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"message", &ExceptionsManagerSpec_ExceptionData::message}, - {L"originalMessage", &ExceptionsManagerSpec_ExceptionData::originalMessage}, - {L"name", &ExceptionsManagerSpec_ExceptionData::name}, - {L"componentStack", &ExceptionsManagerSpec_ExceptionData::componentStack}, - {L"stack", &ExceptionsManagerSpec_ExceptionData::stack}, - {L"id", &ExceptionsManagerSpec_ExceptionData::id}, - {L"isFatal", &ExceptionsManagerSpec_ExceptionData::isFatal}, - {L"extraData", &ExceptionsManagerSpec_ExceptionData::extraData}, - }; - return fieldMap; -} - -struct ExceptionsManagerSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - Method, double) noexcept>{0, L"reportFatalException"}, - Method, double) noexcept>{1, L"reportSoftException"}, - Method{2, L"reportException"}, - Method{3, L"dismissRedbox"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "reportFatalException", - " REACT_METHOD(reportFatalException) void reportFatalException(std::string message, std::vector const & stack, double exceptionId) noexcept { /* implementation */ }\n" - " REACT_METHOD(reportFatalException) static void reportFatalException(std::string message, std::vector const & stack, double exceptionId) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 1, - "reportSoftException", - " REACT_METHOD(reportSoftException) void reportSoftException(std::string message, std::vector const & stack, double exceptionId) noexcept { /* implementation */ }\n" - " REACT_METHOD(reportSoftException) static void reportSoftException(std::string message, std::vector const & stack, double exceptionId) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 2, - "reportException", - " REACT_METHOD(reportException) void reportException(ExceptionsManagerSpec_ExceptionData && data) noexcept { /* implementation */ }\n" - " REACT_METHOD(reportException) static void reportException(ExceptionsManagerSpec_ExceptionData && data) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 3, - "dismissRedbox", - " REACT_METHOD(dismissRedbox) void dismissRedbox() noexcept { /* implementation */ }\n" - " REACT_METHOD(dismissRedbox) static void dismissRedbox() noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeFileReaderModuleSpec.g.h b/vnext/codegen/NativeFileReaderModuleSpec.g.h deleted file mode 100644 index e8cd720496d..00000000000 --- a/vnext/codegen/NativeFileReaderModuleSpec.g.h +++ /dev/null @@ -1,41 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - - -struct FileReaderModuleSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - Method) noexcept>{0, L"readAsDataURL"}, - Method) noexcept>{1, L"readAsText"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "readAsDataURL", - " REACT_METHOD(readAsDataURL) void readAsDataURL(::React::JSValue && data, ::React::ReactPromise &&result) noexcept { /* implementation */ }\n" - " REACT_METHOD(readAsDataURL) static void readAsDataURL(::React::JSValue && data, ::React::ReactPromise &&result) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 1, - "readAsText", - " REACT_METHOD(readAsText) void readAsText(::React::JSValue && data, std::string encoding, ::React::ReactPromise &&result) noexcept { /* implementation */ }\n" - " REACT_METHOD(readAsText) static void readAsText(::React::JSValue && data, std::string encoding, ::React::ReactPromise &&result) noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeFrameRateLoggerSpec.g.h b/vnext/codegen/NativeFrameRateLoggerSpec.g.h deleted file mode 100644 index ee0fa9b373f..00000000000 --- a/vnext/codegen/NativeFrameRateLoggerSpec.g.h +++ /dev/null @@ -1,64 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - -struct FrameRateLoggerSpec_setGlobalOptions_options { - std::optional debug; -}; - - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(FrameRateLoggerSpec_setGlobalOptions_options*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"debug", &FrameRateLoggerSpec_setGlobalOptions_options::debug}, - }; - return fieldMap; -} - -struct FrameRateLoggerSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - Method{0, L"setGlobalOptions"}, - Method{1, L"setContext"}, - Method{2, L"beginScroll"}, - Method{3, L"endScroll"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "setGlobalOptions", - " REACT_METHOD(setGlobalOptions) void setGlobalOptions(FrameRateLoggerSpec_setGlobalOptions_options && options) noexcept { /* implementation */ }\n" - " REACT_METHOD(setGlobalOptions) static void setGlobalOptions(FrameRateLoggerSpec_setGlobalOptions_options && options) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 1, - "setContext", - " REACT_METHOD(setContext) void setContext(std::string context) noexcept { /* implementation */ }\n" - " REACT_METHOD(setContext) static void setContext(std::string context) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 2, - "beginScroll", - " REACT_METHOD(beginScroll) void beginScroll() noexcept { /* implementation */ }\n" - " REACT_METHOD(beginScroll) static void beginScroll() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 3, - "endScroll", - " REACT_METHOD(endScroll) void endScroll() noexcept { /* implementation */ }\n" - " REACT_METHOD(endScroll) static void endScroll() noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeHeadlessJsTaskSupportSpec.g.h b/vnext/codegen/NativeHeadlessJsTaskSupportSpec.g.h deleted file mode 100644 index 4ba71d2e7ae..00000000000 --- a/vnext/codegen/NativeHeadlessJsTaskSupportSpec.g.h +++ /dev/null @@ -1,41 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - - -struct HeadlessJsTaskSupportSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - Method{0, L"notifyTaskFinished"}, - Method) noexcept>{1, L"notifyTaskRetry"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "notifyTaskFinished", - " REACT_METHOD(notifyTaskFinished) void notifyTaskFinished(double taskId) noexcept { /* implementation */ }\n" - " REACT_METHOD(notifyTaskFinished) static void notifyTaskFinished(double taskId) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 1, - "notifyTaskRetry", - " REACT_METHOD(notifyTaskRetry) void notifyTaskRetry(double taskId, ::React::ReactPromise &&result) noexcept { /* implementation */ }\n" - " REACT_METHOD(notifyTaskRetry) static void notifyTaskRetry(double taskId, ::React::ReactPromise &&result) noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeI18nManagerSpec.g.h b/vnext/codegen/NativeI18nManagerSpec.g.h deleted file mode 100644 index 2e9eab293a0..00000000000 --- a/vnext/codegen/NativeI18nManagerSpec.g.h +++ /dev/null @@ -1,62 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - -struct I18nManagerSpec_I18nManagerConstants { - bool doLeftAndRightSwapInRTL; - bool isRTL; - std::optional localeIdentifier; -}; - - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(I18nManagerSpec_I18nManagerConstants*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"doLeftAndRightSwapInRTL", &I18nManagerSpec_I18nManagerConstants::doLeftAndRightSwapInRTL}, - {L"isRTL", &I18nManagerSpec_I18nManagerConstants::isRTL}, - {L"localeIdentifier", &I18nManagerSpec_I18nManagerConstants::localeIdentifier}, - }; - return fieldMap; -} - -struct I18nManagerSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - Method{0, L"allowRTL"}, - Method{1, L"forceRTL"}, - Method{2, L"swapLeftAndRightInRTL"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "allowRTL", - " REACT_METHOD(allowRTL) void allowRTL(bool allowRTL) noexcept { /* implementation */ }\n" - " REACT_METHOD(allowRTL) static void allowRTL(bool allowRTL) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 1, - "forceRTL", - " REACT_METHOD(forceRTL) void forceRTL(bool forceRTL) noexcept { /* implementation */ }\n" - " REACT_METHOD(forceRTL) static void forceRTL(bool forceRTL) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 2, - "swapLeftAndRightInRTL", - " REACT_METHOD(swapLeftAndRightInRTL) void swapLeftAndRightInRTL(bool flipStyles) noexcept { /* implementation */ }\n" - " REACT_METHOD(swapLeftAndRightInRTL) static void swapLeftAndRightInRTL(bool flipStyles) noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeIdleCallbacksSpec.g.h b/vnext/codegen/NativeIdleCallbacksSpec.g.h deleted file mode 100644 index 4dbcb376940..00000000000 --- a/vnext/codegen/NativeIdleCallbacksSpec.g.h +++ /dev/null @@ -1,65 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - -struct IdleCallbacksSpec_IdleDeadline { - bool didTimeout; - timeRemaining; -}; - -struct IdleCallbacksSpec_RequestIdleCallbackOptions { - std::optional timeout; -}; - - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(IdleCallbacksSpec_IdleDeadline*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"didTimeout", &IdleCallbacksSpec_IdleDeadline::didTimeout}, - {L"timeRemaining", &IdleCallbacksSpec_IdleDeadline::timeRemaining}, - }; - return fieldMap; -} - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(IdleCallbacksSpec_RequestIdleCallbackOptions*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"timeout", &IdleCallbacksSpec_RequestIdleCallbackOptions::timeout}, - }; - return fieldMap; -} - -struct IdleCallbacksSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - SyncMethod<(Callback, IdleCallbacksSpec_RequestIdleCallbackOptions) noexcept>{0, L"requestIdleCallback"}, - Method{1, L"cancelIdleCallback"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "requestIdleCallback", - " REACT_SYNC_METHOD(requestIdleCallback) requestIdleCallback(std::function const & callback, IdleCallbacksSpec_RequestIdleCallbackOptions && options) noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(requestIdleCallback) static requestIdleCallback(std::function const & callback, IdleCallbacksSpec_RequestIdleCallbackOptions && options) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 1, - "cancelIdleCallback", - " REACT_METHOD(cancelIdleCallback) void cancelIdleCallback( handle) noexcept { /* implementation */ }\n" - " REACT_METHOD(cancelIdleCallback) static void cancelIdleCallback( handle) noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeImageEditorSpec.g.h b/vnext/codegen/NativeImageEditorSpec.g.h deleted file mode 100644 index f308bd08654..00000000000 --- a/vnext/codegen/NativeImageEditorSpec.g.h +++ /dev/null @@ -1,93 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - -struct ImageEditorSpec_Options_offset { - double x; - double y; -}; - -struct ImageEditorSpec_Options_size { - double width; - double height; -}; - -struct ImageEditorSpec_Options_displaySize { - double width; - double height; -}; - -struct ImageEditorSpec_Options { - ImageEditorSpec_Options_offset offset; - ImageEditorSpec_Options_size size; - std::optional displaySize; - std::optional resizeMode; - std::optional allowExternalStorage; -}; - - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(ImageEditorSpec_Options_offset*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"x", &ImageEditorSpec_Options_offset::x}, - {L"y", &ImageEditorSpec_Options_offset::y}, - }; - return fieldMap; -} - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(ImageEditorSpec_Options_size*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"width", &ImageEditorSpec_Options_size::width}, - {L"height", &ImageEditorSpec_Options_size::height}, - }; - return fieldMap; -} - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(ImageEditorSpec_Options_displaySize*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"width", &ImageEditorSpec_Options_displaySize::width}, - {L"height", &ImageEditorSpec_Options_displaySize::height}, - }; - return fieldMap; -} - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(ImageEditorSpec_Options*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"offset", &ImageEditorSpec_Options::offset}, - {L"size", &ImageEditorSpec_Options::size}, - {L"displaySize", &ImageEditorSpec_Options::displaySize}, - {L"resizeMode", &ImageEditorSpec_Options::resizeMode}, - {L"allowExternalStorage", &ImageEditorSpec_Options::allowExternalStorage}, - }; - return fieldMap; -} - -struct ImageEditorSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - Method, Callback) noexcept>{0, L"cropImage"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "cropImage", - " REACT_METHOD(cropImage) void cropImage(std::string uri, ImageEditorSpec_Options && cropData, std::function const & successCallback, std::function const & errorCallback) noexcept { /* implementation */ }\n" - " REACT_METHOD(cropImage) static void cropImage(std::string uri, ImageEditorSpec_Options && cropData, std::function const & successCallback, std::function const & errorCallback) noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeImageLoaderAndroidSpec.g.h b/vnext/codegen/NativeImageLoaderAndroidSpec.g.h deleted file mode 100644 index ac972d61345..00000000000 --- a/vnext/codegen/NativeImageLoaderAndroidSpec.g.h +++ /dev/null @@ -1,72 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - -struct ImageLoaderAndroidSpec_ImageSize { - double width; - double height; -}; - - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(ImageLoaderAndroidSpec_ImageSize*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"width", &ImageLoaderAndroidSpec_ImageSize::width}, - {L"height", &ImageLoaderAndroidSpec_ImageSize::height}, - }; - return fieldMap; -} - -struct ImageLoaderAndroidSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - Method{0, L"abortRequest"}, - Method) noexcept>{1, L"getSize"}, - Method) noexcept>{2, L"getSizeWithHeaders"}, - Method) noexcept>{3, L"prefetchImage"}, - Method, Promise<::React::JSValue>) noexcept>{4, L"queryCache"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "abortRequest", - " REACT_METHOD(abortRequest) void abortRequest(double requestId) noexcept { /* implementation */ }\n" - " REACT_METHOD(abortRequest) static void abortRequest(double requestId) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 1, - "getSize", - " REACT_METHOD(getSize) void getSize(std::string uri, ::React::ReactPromise &&result) noexcept { /* implementation */ }\n" - " REACT_METHOD(getSize) static void getSize(std::string uri, ::React::ReactPromise &&result) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 2, - "getSizeWithHeaders", - " REACT_METHOD(getSizeWithHeaders) void getSizeWithHeaders(std::string uri, ::React::JSValue && headers, ::React::ReactPromise &&result) noexcept { /* implementation */ }\n" - " REACT_METHOD(getSizeWithHeaders) static void getSizeWithHeaders(std::string uri, ::React::JSValue && headers, ::React::ReactPromise &&result) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 3, - "prefetchImage", - " REACT_METHOD(prefetchImage) void prefetchImage(std::string uri, double requestId, ::React::ReactPromise &&result) noexcept { /* implementation */ }\n" - " REACT_METHOD(prefetchImage) static void prefetchImage(std::string uri, double requestId, ::React::ReactPromise &&result) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 4, - "queryCache", - " REACT_METHOD(queryCache) void queryCache(std::vector const & uris, ::React::ReactPromise<::React::JSValue> &&result) noexcept { /* implementation */ }\n" - " REACT_METHOD(queryCache) static void queryCache(std::vector const & uris, ::React::ReactPromise<::React::JSValue> &&result) noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeImageLoaderIOSSpec.g.h b/vnext/codegen/NativeImageLoaderIOSSpec.g.h deleted file mode 100644 index 4b69e50442a..00000000000 --- a/vnext/codegen/NativeImageLoaderIOSSpec.g.h +++ /dev/null @@ -1,72 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - -struct ImageLoaderIOSSpec_getSizeWithHeaders_returnType { - double width; - double height; -}; - - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(ImageLoaderIOSSpec_getSizeWithHeaders_returnType*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"width", &ImageLoaderIOSSpec_getSizeWithHeaders_returnType::width}, - {L"height", &ImageLoaderIOSSpec_getSizeWithHeaders_returnType::height}, - }; - return fieldMap; -} - -struct ImageLoaderIOSSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - Method>) noexcept>{0, L"getSize"}, - Method) noexcept>{1, L"getSizeWithHeaders"}, - Method) noexcept>{2, L"prefetchImage"}, - Method) noexcept>{3, L"prefetchImageWithMetadata"}, - Method, Promise<::React::JSValue>) noexcept>{4, L"queryCache"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "getSize", - " REACT_METHOD(getSize) void getSize(std::string uri, ::React::ReactPromise> &&result) noexcept { /* implementation */ }\n" - " REACT_METHOD(getSize) static void getSize(std::string uri, ::React::ReactPromise> &&result) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 1, - "getSizeWithHeaders", - " REACT_METHOD(getSizeWithHeaders) void getSizeWithHeaders(std::string uri, ::React::JSValue && headers, ::React::ReactPromise &&result) noexcept { /* implementation */ }\n" - " REACT_METHOD(getSizeWithHeaders) static void getSizeWithHeaders(std::string uri, ::React::JSValue && headers, ::React::ReactPromise &&result) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 2, - "prefetchImage", - " REACT_METHOD(prefetchImage) void prefetchImage(std::string uri, ::React::ReactPromise &&result) noexcept { /* implementation */ }\n" - " REACT_METHOD(prefetchImage) static void prefetchImage(std::string uri, ::React::ReactPromise &&result) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 3, - "prefetchImageWithMetadata", - " REACT_METHOD(prefetchImageWithMetadata) void prefetchImageWithMetadata(std::string uri, std::string queryRootName, double rootTag, ::React::ReactPromise &&result) noexcept { /* implementation */ }\n" - " REACT_METHOD(prefetchImageWithMetadata) static void prefetchImageWithMetadata(std::string uri, std::string queryRootName, double rootTag, ::React::ReactPromise &&result) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 4, - "queryCache", - " REACT_METHOD(queryCache) void queryCache(std::vector const & uris, ::React::ReactPromise<::React::JSValue> &&result) noexcept { /* implementation */ }\n" - " REACT_METHOD(queryCache) static void queryCache(std::vector const & uris, ::React::ReactPromise<::React::JSValue> &&result) noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeImageStoreAndroidSpec.g.h b/vnext/codegen/NativeImageStoreAndroidSpec.g.h deleted file mode 100644 index 66fccbe9a63..00000000000 --- a/vnext/codegen/NativeImageStoreAndroidSpec.g.h +++ /dev/null @@ -1,35 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - - -struct ImageStoreAndroidSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - Method, Callback) noexcept>{0, L"getBase64ForTag"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "getBase64ForTag", - " REACT_METHOD(getBase64ForTag) void getBase64ForTag(std::string uri, std::function const & successCallback, std::function const & errorCallback) noexcept { /* implementation */ }\n" - " REACT_METHOD(getBase64ForTag) static void getBase64ForTag(std::string uri, std::function const & successCallback, std::function const & errorCallback) noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeImageStoreIOSSpec.g.h b/vnext/codegen/NativeImageStoreIOSSpec.g.h deleted file mode 100644 index 887fa9af152..00000000000 --- a/vnext/codegen/NativeImageStoreIOSSpec.g.h +++ /dev/null @@ -1,75 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - -struct ImageStoreIOSSpec_getBase64ForTag_errorCallback_error { - std::string message; -}; - -struct ImageStoreIOSSpec_addImageFromBase64_errorCallback_error { - std::string message; -}; - - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(ImageStoreIOSSpec_getBase64ForTag_errorCallback_error*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"message", &ImageStoreIOSSpec_getBase64ForTag_errorCallback_error::message}, - }; - return fieldMap; -} - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(ImageStoreIOSSpec_addImageFromBase64_errorCallback_error*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"message", &ImageStoreIOSSpec_addImageFromBase64_errorCallback_error::message}, - }; - return fieldMap; -} - -struct ImageStoreIOSSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - Method, Callback) noexcept>{0, L"getBase64ForTag"}, - Method) noexcept>{1, L"hasImageForTag"}, - Method{2, L"removeImageForTag"}, - Method, Callback) noexcept>{3, L"addImageFromBase64"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "getBase64ForTag", - " REACT_METHOD(getBase64ForTag) void getBase64ForTag(std::string uri, std::function const & successCallback, std::function const & errorCallback) noexcept { /* implementation */ }\n" - " REACT_METHOD(getBase64ForTag) static void getBase64ForTag(std::string uri, std::function const & successCallback, std::function const & errorCallback) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 1, - "hasImageForTag", - " REACT_METHOD(hasImageForTag) void hasImageForTag(std::string uri, std::function const & callback) noexcept { /* implementation */ }\n" - " REACT_METHOD(hasImageForTag) static void hasImageForTag(std::string uri, std::function const & callback) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 2, - "removeImageForTag", - " REACT_METHOD(removeImageForTag) void removeImageForTag(std::string uri) noexcept { /* implementation */ }\n" - " REACT_METHOD(removeImageForTag) static void removeImageForTag(std::string uri) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 3, - "addImageFromBase64", - " REACT_METHOD(addImageFromBase64) void addImageFromBase64(std::string base64ImageData, std::function const & successCallback, std::function const & errorCallback) noexcept { /* implementation */ }\n" - " REACT_METHOD(addImageFromBase64) static void addImageFromBase64(std::string base64ImageData, std::function const & successCallback, std::function const & errorCallback) noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeIntentAndroidSpec.g.h b/vnext/codegen/NativeIntentAndroidSpec.g.h deleted file mode 100644 index 861ecc0267e..00000000000 --- a/vnext/codegen/NativeIntentAndroidSpec.g.h +++ /dev/null @@ -1,59 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - - -struct IntentAndroidSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - Method) noexcept>{0, L"getInitialURL"}, - Method) noexcept>{1, L"canOpenURL"}, - Method) noexcept>{2, L"openURL"}, - Method) noexcept>{3, L"openSettings"}, - Method, Promise) noexcept>{4, L"sendIntent"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "getInitialURL", - " REACT_METHOD(getInitialURL) void getInitialURL(::React::ReactPromise &&result) noexcept { /* implementation */ }\n" - " REACT_METHOD(getInitialURL) static void getInitialURL(::React::ReactPromise &&result) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 1, - "canOpenURL", - " REACT_METHOD(canOpenURL) void canOpenURL(std::string url, ::React::ReactPromise &&result) noexcept { /* implementation */ }\n" - " REACT_METHOD(canOpenURL) static void canOpenURL(std::string url, ::React::ReactPromise &&result) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 2, - "openURL", - " REACT_METHOD(openURL) void openURL(std::string url, ::React::ReactPromise &&result) noexcept { /* implementation */ }\n" - " REACT_METHOD(openURL) static void openURL(std::string url, ::React::ReactPromise &&result) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 3, - "openSettings", - " REACT_METHOD(openSettings) void openSettings(::React::ReactPromise &&result) noexcept { /* implementation */ }\n" - " REACT_METHOD(openSettings) static void openSettings(::React::ReactPromise &&result) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 4, - "sendIntent", - " REACT_METHOD(sendIntent) void sendIntent(std::string action, std::optional<::React::JSValueArray> extras, ::React::ReactPromise &&result) noexcept { /* implementation */ }\n" - " REACT_METHOD(sendIntent) static void sendIntent(std::string action, std::optional<::React::JSValueArray> extras, ::React::ReactPromise &&result) noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeIntersectionObserverSpec.g.h b/vnext/codegen/NativeIntersectionObserverSpec.g.h deleted file mode 100644 index 35b8e136f25..00000000000 --- a/vnext/codegen/NativeIntersectionObserverSpec.g.h +++ /dev/null @@ -1,101 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - -struct IntersectionObserverSpec_NativeIntersectionObserverEntry { - double intersectionObserverId; - targetInstanceHandle; - std::vector targetRect; - std::vector rootRect; - std::optional> intersectionRect; - bool isIntersectingAboveThresholds; - double time; -}; - -struct IntersectionObserverSpec_NativeIntersectionObserverObserveOptions { - double intersectionObserverId; - std::optional<> rootShadowNode; - targetShadowNode; - std::vector thresholds; - std::optional> rootThresholds; -}; - - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(IntersectionObserverSpec_NativeIntersectionObserverEntry*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"intersectionObserverId", &IntersectionObserverSpec_NativeIntersectionObserverEntry::intersectionObserverId}, - {L"targetInstanceHandle", &IntersectionObserverSpec_NativeIntersectionObserverEntry::targetInstanceHandle}, - {L"targetRect", &IntersectionObserverSpec_NativeIntersectionObserverEntry::targetRect}, - {L"rootRect", &IntersectionObserverSpec_NativeIntersectionObserverEntry::rootRect}, - {L"intersectionRect", &IntersectionObserverSpec_NativeIntersectionObserverEntry::intersectionRect}, - {L"isIntersectingAboveThresholds", &IntersectionObserverSpec_NativeIntersectionObserverEntry::isIntersectingAboveThresholds}, - {L"time", &IntersectionObserverSpec_NativeIntersectionObserverEntry::time}, - }; - return fieldMap; -} - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(IntersectionObserverSpec_NativeIntersectionObserverObserveOptions*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"intersectionObserverId", &IntersectionObserverSpec_NativeIntersectionObserverObserveOptions::intersectionObserverId}, - {L"rootShadowNode", &IntersectionObserverSpec_NativeIntersectionObserverObserveOptions::rootShadowNode}, - {L"targetShadowNode", &IntersectionObserverSpec_NativeIntersectionObserverObserveOptions::targetShadowNode}, - {L"thresholds", &IntersectionObserverSpec_NativeIntersectionObserverObserveOptions::thresholds}, - {L"rootThresholds", &IntersectionObserverSpec_NativeIntersectionObserverObserveOptions::rootThresholds}, - }; - return fieldMap; -} - -struct IntersectionObserverSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - SyncMethod<(IntersectionObserverSpec_NativeIntersectionObserverObserveOptions) noexcept>{0, L"observeV2"}, - Method{1, L"unobserveV2"}, - Method) noexcept>{2, L"connect"}, - Method{3, L"disconnect"}, - SyncMethod() noexcept>{4, L"takeRecords"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "observeV2", - " REACT_SYNC_METHOD(observeV2) observeV2(IntersectionObserverSpec_NativeIntersectionObserverObserveOptions && options) noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(observeV2) static observeV2(IntersectionObserverSpec_NativeIntersectionObserverObserveOptions && options) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 1, - "unobserveV2", - " REACT_METHOD(unobserveV2) void unobserveV2(double intersectionObserverId, token) noexcept { /* implementation */ }\n" - " REACT_METHOD(unobserveV2) static void unobserveV2(double intersectionObserverId, token) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 2, - "connect", - " REACT_METHOD(connect) void connect(std::function const & notifyIntersectionObserversCallback) noexcept { /* implementation */ }\n" - " REACT_METHOD(connect) static void connect(std::function const & notifyIntersectionObserversCallback) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 3, - "disconnect", - " REACT_METHOD(disconnect) void disconnect() noexcept { /* implementation */ }\n" - " REACT_METHOD(disconnect) static void disconnect() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 4, - "takeRecords", - " REACT_SYNC_METHOD(takeRecords) std::vector takeRecords() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(takeRecords) static std::vector takeRecords() noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeJSCHeapCaptureSpec.g.h b/vnext/codegen/NativeJSCHeapCaptureSpec.g.h deleted file mode 100644 index aa9adddd0f1..00000000000 --- a/vnext/codegen/NativeJSCHeapCaptureSpec.g.h +++ /dev/null @@ -1,35 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - - -struct JSCHeapCaptureSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - Method) noexcept>{0, L"captureComplete"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "captureComplete", - " REACT_METHOD(captureComplete) void captureComplete(std::string path, std::optional error) noexcept { /* implementation */ }\n" - " REACT_METHOD(captureComplete) static void captureComplete(std::string path, std::optional error) noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeKeyboardObserverSpec.g.h b/vnext/codegen/NativeKeyboardObserverSpec.g.h deleted file mode 100644 index 3c888dc5023..00000000000 --- a/vnext/codegen/NativeKeyboardObserverSpec.g.h +++ /dev/null @@ -1,41 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - - -struct KeyboardObserverSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - Method{0, L"addListener"}, - Method{1, L"removeListeners"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "addListener", - " REACT_METHOD(addListener) void addListener(std::string eventName) noexcept { /* implementation */ }\n" - " REACT_METHOD(addListener) static void addListener(std::string eventName) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 1, - "removeListeners", - " REACT_METHOD(removeListeners) void removeListeners(double count) noexcept { /* implementation */ }\n" - " REACT_METHOD(removeListeners) static void removeListeners(double count) noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeLinkingManagerSpec.g.h b/vnext/codegen/NativeLinkingManagerSpec.g.h deleted file mode 100644 index c8e5d92a83f..00000000000 --- a/vnext/codegen/NativeLinkingManagerSpec.g.h +++ /dev/null @@ -1,65 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - - -struct LinkingManagerSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - Method>) noexcept>{0, L"getInitialURL"}, - Method) noexcept>{1, L"canOpenURL"}, - Method) noexcept>{2, L"openURL"}, - Method) noexcept>{3, L"openSettings"}, - Method{4, L"addListener"}, - Method{5, L"removeListeners"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "getInitialURL", - " REACT_METHOD(getInitialURL) void getInitialURL(::React::ReactPromise> &&result) noexcept { /* implementation */ }\n" - " REACT_METHOD(getInitialURL) static void getInitialURL(::React::ReactPromise> &&result) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 1, - "canOpenURL", - " REACT_METHOD(canOpenURL) void canOpenURL(std::string url, ::React::ReactPromise &&result) noexcept { /* implementation */ }\n" - " REACT_METHOD(canOpenURL) static void canOpenURL(std::string url, ::React::ReactPromise &&result) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 2, - "openURL", - " REACT_METHOD(openURL) void openURL(std::string url, ::React::ReactPromise &&result) noexcept { /* implementation */ }\n" - " REACT_METHOD(openURL) static void openURL(std::string url, ::React::ReactPromise &&result) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 3, - "openSettings", - " REACT_METHOD(openSettings) void openSettings(::React::ReactPromise &&result) noexcept { /* implementation */ }\n" - " REACT_METHOD(openSettings) static void openSettings(::React::ReactPromise &&result) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 4, - "addListener", - " REACT_METHOD(addListener) void addListener(std::string eventName) noexcept { /* implementation */ }\n" - " REACT_METHOD(addListener) static void addListener(std::string eventName) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 5, - "removeListeners", - " REACT_METHOD(removeListeners) void removeListeners(double count) noexcept { /* implementation */ }\n" - " REACT_METHOD(removeListeners) static void removeListeners(double count) noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeLogBoxSpec.g.h b/vnext/codegen/NativeLogBoxSpec.g.h deleted file mode 100644 index 0e510c75996..00000000000 --- a/vnext/codegen/NativeLogBoxSpec.g.h +++ /dev/null @@ -1,41 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - - -struct LogBoxSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - Method{0, L"show"}, - Method{1, L"hide"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "show", - " REACT_METHOD(show) void show() noexcept { /* implementation */ }\n" - " REACT_METHOD(show) static void show() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 1, - "hide", - " REACT_METHOD(hide) void hide() noexcept { /* implementation */ }\n" - " REACT_METHOD(hide) static void hide() noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeMicrotasksSpec.g.h b/vnext/codegen/NativeMicrotasksSpec.g.h deleted file mode 100644 index bd351cd7fe1..00000000000 --- a/vnext/codegen/NativeMicrotasksSpec.g.h +++ /dev/null @@ -1,35 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - - -struct MicrotasksSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - Method) noexcept>{0, L"queueMicrotask"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "queueMicrotask", - " REACT_METHOD(queueMicrotask) void queueMicrotask(std::function const & callback) noexcept { /* implementation */ }\n" - " REACT_METHOD(queueMicrotask) static void queueMicrotask(std::function const & callback) noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeModalManagerSpec.g.h b/vnext/codegen/NativeModalManagerSpec.g.h deleted file mode 100644 index 9cb67c0b03b..00000000000 --- a/vnext/codegen/NativeModalManagerSpec.g.h +++ /dev/null @@ -1,41 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - - -struct ModalManagerSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - Method{0, L"addListener"}, - Method{1, L"removeListeners"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "addListener", - " REACT_METHOD(addListener) void addListener(std::string eventName) noexcept { /* implementation */ }\n" - " REACT_METHOD(addListener) static void addListener(std::string eventName) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 1, - "removeListeners", - " REACT_METHOD(removeListeners) void removeListeners(double count) noexcept { /* implementation */ }\n" - " REACT_METHOD(removeListeners) static void removeListeners(double count) noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeMutationObserverSpec.g.h b/vnext/codegen/NativeMutationObserverSpec.g.h deleted file mode 100644 index d37fbeb72a3..00000000000 --- a/vnext/codegen/NativeMutationObserverSpec.g.h +++ /dev/null @@ -1,91 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - -struct MutationObserverSpec_NativeMutationObserverObserveOptions { - double mutationObserverId; - targetShadowNode; - bool subtree; -}; - -struct MutationObserverSpec_NativeMutationRecord { - double mutationObserverId; - target; - std::vector<> addedNodes; - std::vector<> removedNodes; -}; - - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(MutationObserverSpec_NativeMutationObserverObserveOptions*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"mutationObserverId", &MutationObserverSpec_NativeMutationObserverObserveOptions::mutationObserverId}, - {L"targetShadowNode", &MutationObserverSpec_NativeMutationObserverObserveOptions::targetShadowNode}, - {L"subtree", &MutationObserverSpec_NativeMutationObserverObserveOptions::subtree}, - }; - return fieldMap; -} - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(MutationObserverSpec_NativeMutationRecord*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"mutationObserverId", &MutationObserverSpec_NativeMutationRecord::mutationObserverId}, - {L"target", &MutationObserverSpec_NativeMutationRecord::target}, - {L"addedNodes", &MutationObserverSpec_NativeMutationRecord::addedNodes}, - {L"removedNodes", &MutationObserverSpec_NativeMutationRecord::removedNodes}, - }; - return fieldMap; -} - -struct MutationObserverSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - Method{0, L"observe"}, - Method{1, L"unobserveAll"}, - Method, Callback<>) noexcept>{2, L"connect"}, - Method{3, L"disconnect"}, - SyncMethod() noexcept>{4, L"takeRecords"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "observe", - " REACT_METHOD(observe) void observe(MutationObserverSpec_NativeMutationObserverObserveOptions && options) noexcept { /* implementation */ }\n" - " REACT_METHOD(observe) static void observe(MutationObserverSpec_NativeMutationObserverObserveOptions && options) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 1, - "unobserveAll", - " REACT_METHOD(unobserveAll) void unobserveAll(double mutationObserverId) noexcept { /* implementation */ }\n" - " REACT_METHOD(unobserveAll) static void unobserveAll(double mutationObserverId) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 2, - "connect", - " REACT_METHOD(connect) void connect(std::function const & notifyMutationObservers, std::function const & getPublicInstanceFromInstanceHandle) noexcept { /* implementation */ }\n" - " REACT_METHOD(connect) static void connect(std::function const & notifyMutationObservers, std::function const & getPublicInstanceFromInstanceHandle) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 3, - "disconnect", - " REACT_METHOD(disconnect) void disconnect() noexcept { /* implementation */ }\n" - " REACT_METHOD(disconnect) static void disconnect() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 4, - "takeRecords", - " REACT_SYNC_METHOD(takeRecords) std::vector takeRecords() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(takeRecords) static std::vector takeRecords() noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeNetworkingAndroidSpec.g.h b/vnext/codegen/NativeNetworkingAndroidSpec.g.h deleted file mode 100644 index 3f6a0276878..00000000000 --- a/vnext/codegen/NativeNetworkingAndroidSpec.g.h +++ /dev/null @@ -1,59 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - - -struct NetworkingAndroidSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - Method{0, L"sendRequest"}, - Method{1, L"abortRequest"}, - Method) noexcept>{2, L"clearCookies"}, - Method{3, L"addListener"}, - Method{4, L"removeListeners"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "sendRequest", - " REACT_METHOD(sendRequest) void sendRequest(std::string method, std::string url, double requestId, ::React::JSValueArray && headers, ::React::JSValue && data, std::string responseType, bool useIncrementalUpdates, double timeout, bool withCredentials) noexcept { /* implementation */ }\n" - " REACT_METHOD(sendRequest) static void sendRequest(std::string method, std::string url, double requestId, ::React::JSValueArray && headers, ::React::JSValue && data, std::string responseType, bool useIncrementalUpdates, double timeout, bool withCredentials) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 1, - "abortRequest", - " REACT_METHOD(abortRequest) void abortRequest(double requestId) noexcept { /* implementation */ }\n" - " REACT_METHOD(abortRequest) static void abortRequest(double requestId) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 2, - "clearCookies", - " REACT_METHOD(clearCookies) void clearCookies(std::function const & callback) noexcept { /* implementation */ }\n" - " REACT_METHOD(clearCookies) static void clearCookies(std::function const & callback) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 3, - "addListener", - " REACT_METHOD(addListener) void addListener(std::string eventName) noexcept { /* implementation */ }\n" - " REACT_METHOD(addListener) static void addListener(std::string eventName) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 4, - "removeListeners", - " REACT_METHOD(removeListeners) void removeListeners(double count) noexcept { /* implementation */ }\n" - " REACT_METHOD(removeListeners) static void removeListeners(double count) noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeNetworkingIOSSpec.g.h b/vnext/codegen/NativeNetworkingIOSSpec.g.h deleted file mode 100644 index 42d2eb7093c..00000000000 --- a/vnext/codegen/NativeNetworkingIOSSpec.g.h +++ /dev/null @@ -1,84 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - -struct NetworkingIOSSpec_sendRequest_query { - std::string method; - std::string url; - ::React::JSValue data; - ::React::JSValue headers; - std::string responseType; - bool incrementalUpdates; - double timeout; - bool withCredentials; -}; - - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(NetworkingIOSSpec_sendRequest_query*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"method", &NetworkingIOSSpec_sendRequest_query::method}, - {L"url", &NetworkingIOSSpec_sendRequest_query::url}, - {L"data", &NetworkingIOSSpec_sendRequest_query::data}, - {L"headers", &NetworkingIOSSpec_sendRequest_query::headers}, - {L"responseType", &NetworkingIOSSpec_sendRequest_query::responseType}, - {L"incrementalUpdates", &NetworkingIOSSpec_sendRequest_query::incrementalUpdates}, - {L"timeout", &NetworkingIOSSpec_sendRequest_query::timeout}, - {L"withCredentials", &NetworkingIOSSpec_sendRequest_query::withCredentials}, - }; - return fieldMap; -} - -struct NetworkingIOSSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - Method) noexcept>{0, L"sendRequest"}, - Method{1, L"abortRequest"}, - Method) noexcept>{2, L"clearCookies"}, - Method{3, L"addListener"}, - Method{4, L"removeListeners"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "sendRequest", - " REACT_METHOD(sendRequest) void sendRequest(NetworkingIOSSpec_sendRequest_query && query, std::function const & callback) noexcept { /* implementation */ }\n" - " REACT_METHOD(sendRequest) static void sendRequest(NetworkingIOSSpec_sendRequest_query && query, std::function const & callback) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 1, - "abortRequest", - " REACT_METHOD(abortRequest) void abortRequest(double requestId) noexcept { /* implementation */ }\n" - " REACT_METHOD(abortRequest) static void abortRequest(double requestId) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 2, - "clearCookies", - " REACT_METHOD(clearCookies) void clearCookies(std::function const & callback) noexcept { /* implementation */ }\n" - " REACT_METHOD(clearCookies) static void clearCookies(std::function const & callback) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 3, - "addListener", - " REACT_METHOD(addListener) void addListener(std::string eventName) noexcept { /* implementation */ }\n" - " REACT_METHOD(addListener) static void addListener(std::string eventName) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 4, - "removeListeners", - " REACT_METHOD(removeListeners) void removeListeners(double count) noexcept { /* implementation */ }\n" - " REACT_METHOD(removeListeners) static void removeListeners(double count) noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativePerformanceSpec.g.h b/vnext/codegen/NativePerformanceSpec.g.h deleted file mode 100644 index cdf87e9ae60..00000000000 --- a/vnext/codegen/NativePerformanceSpec.g.h +++ /dev/null @@ -1,219 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - -struct PerformanceSpec_NativeMemoryInfo { - -}; - -struct PerformanceSpec_PerformanceObserverInit { - std::optional> entryTypes; - std::optional type; - std::optional buffered; - std::optional durationThreshold; -}; - -struct PerformanceSpec_RawPerformanceEntry { - std::string name; - double entryType; - double startTime; - double duration; - std::optional processingStart; - std::optional processingEnd; - std::optional interactionId; - std::optional fetchStart; - std::optional requestStart; - std::optional connectStart; - std::optional connectEnd; - std::optional responseStart; - std::optional responseEnd; - std::optional responseStatus; -}; - -struct PerformanceSpec_ReactNativeStartupTiming { - -}; - - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(PerformanceSpec_NativeMemoryInfo*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - - }; - return fieldMap; -} - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(PerformanceSpec_PerformanceObserverInit*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"entryTypes", &PerformanceSpec_PerformanceObserverInit::entryTypes}, - {L"type", &PerformanceSpec_PerformanceObserverInit::type}, - {L"buffered", &PerformanceSpec_PerformanceObserverInit::buffered}, - {L"durationThreshold", &PerformanceSpec_PerformanceObserverInit::durationThreshold}, - }; - return fieldMap; -} - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(PerformanceSpec_RawPerformanceEntry*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"name", &PerformanceSpec_RawPerformanceEntry::name}, - {L"entryType", &PerformanceSpec_RawPerformanceEntry::entryType}, - {L"startTime", &PerformanceSpec_RawPerformanceEntry::startTime}, - {L"duration", &PerformanceSpec_RawPerformanceEntry::duration}, - {L"processingStart", &PerformanceSpec_RawPerformanceEntry::processingStart}, - {L"processingEnd", &PerformanceSpec_RawPerformanceEntry::processingEnd}, - {L"interactionId", &PerformanceSpec_RawPerformanceEntry::interactionId}, - {L"fetchStart", &PerformanceSpec_RawPerformanceEntry::fetchStart}, - {L"requestStart", &PerformanceSpec_RawPerformanceEntry::requestStart}, - {L"connectStart", &PerformanceSpec_RawPerformanceEntry::connectStart}, - {L"connectEnd", &PerformanceSpec_RawPerformanceEntry::connectEnd}, - {L"responseStart", &PerformanceSpec_RawPerformanceEntry::responseStart}, - {L"responseEnd", &PerformanceSpec_RawPerformanceEntry::responseEnd}, - {L"responseStatus", &PerformanceSpec_RawPerformanceEntry::responseStatus}, - }; - return fieldMap; -} - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(PerformanceSpec_ReactNativeStartupTiming*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - - }; - return fieldMap; -} - -struct PerformanceSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - SyncMethod{0, L"now"}, - Method{1, L"reportMark"}, - Method{2, L"reportMeasure"}, - SyncMethod(std::string) noexcept>{3, L"getMarkTime"}, - Method{4, L"clearMarks"}, - Method{5, L"clearMeasures"}, - SyncMethod() noexcept>{6, L"getEntries"}, - SyncMethod(std::string, std::optional) noexcept>{7, L"getEntriesByName"}, - SyncMethod(double) noexcept>{8, L"getEntriesByType"}, - SyncMethod<::React::JSValueArray() noexcept>{9, L"getEventCounts"}, - SyncMethod<::React::JSValue() noexcept>{10, L"getSimpleMemoryInfo"}, - SyncMethod<::React::JSValue() noexcept>{11, L"getReactNativeStartupTiming"}, - SyncMethod<(Callback<>) noexcept>{12, L"createObserver"}, - SyncMethod{13, L"getDroppedEntriesCount"}, - Method{14, L"observe"}, - Method{15, L"disconnect"}, - SyncMethod(, bool) noexcept>{16, L"takeRecords"}, - SyncMethod() noexcept>{17, L"getSupportedPerformanceEntryTypes"}, - Method{18, L"clearEventCountsForTesting"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "now", - " REACT_SYNC_METHOD(now) double now() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(now) static double now() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 1, - "reportMark", - " REACT_METHOD(reportMark) void reportMark(std::string name, double startTime, entry) noexcept { /* implementation */ }\n" - " REACT_METHOD(reportMark) static void reportMark(std::string name, double startTime, entry) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 2, - "reportMeasure", - " REACT_METHOD(reportMeasure) void reportMeasure(std::string name, double startTime, double duration, entry) noexcept { /* implementation */ }\n" - " REACT_METHOD(reportMeasure) static void reportMeasure(std::string name, double startTime, double duration, entry) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 3, - "getMarkTime", - " REACT_SYNC_METHOD(getMarkTime) std::optional getMarkTime(std::string name) noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(getMarkTime) static std::optional getMarkTime(std::string name) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 4, - "clearMarks", - " REACT_METHOD(clearMarks) void clearMarks(std::string entryName) noexcept { /* implementation */ }\n" - " REACT_METHOD(clearMarks) static void clearMarks(std::string entryName) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 5, - "clearMeasures", - " REACT_METHOD(clearMeasures) void clearMeasures(std::string entryName) noexcept { /* implementation */ }\n" - " REACT_METHOD(clearMeasures) static void clearMeasures(std::string entryName) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 6, - "getEntries", - " REACT_SYNC_METHOD(getEntries) std::vector getEntries() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(getEntries) static std::vector getEntries() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 7, - "getEntriesByName", - " REACT_SYNC_METHOD(getEntriesByName) std::vector getEntriesByName(std::string entryName, std::optional entryType) noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(getEntriesByName) static std::vector getEntriesByName(std::string entryName, std::optional entryType) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 8, - "getEntriesByType", - " REACT_SYNC_METHOD(getEntriesByType) std::vector getEntriesByType(double entryType) noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(getEntriesByType) static std::vector getEntriesByType(double entryType) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 9, - "getEventCounts", - " REACT_SYNC_METHOD(getEventCounts) ::React::JSValueArray getEventCounts() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(getEventCounts) static ::React::JSValueArray getEventCounts() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 10, - "getSimpleMemoryInfo", - " REACT_SYNC_METHOD(getSimpleMemoryInfo) ::React::JSValue getSimpleMemoryInfo() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(getSimpleMemoryInfo) static ::React::JSValue getSimpleMemoryInfo() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 11, - "getReactNativeStartupTiming", - " REACT_SYNC_METHOD(getReactNativeStartupTiming) ::React::JSValue getReactNativeStartupTiming() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(getReactNativeStartupTiming) static ::React::JSValue getReactNativeStartupTiming() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 12, - "createObserver", - " REACT_SYNC_METHOD(createObserver) createObserver(std::function const & callback) noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(createObserver) static createObserver(std::function const & callback) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 13, - "getDroppedEntriesCount", - " REACT_SYNC_METHOD(getDroppedEntriesCount) double getDroppedEntriesCount( observer) noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(getDroppedEntriesCount) static double getDroppedEntriesCount( observer) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 14, - "observe", - " REACT_METHOD(observe) void observe( observer, PerformanceSpec_PerformanceObserverInit && options) noexcept { /* implementation */ }\n" - " REACT_METHOD(observe) static void observe( observer, PerformanceSpec_PerformanceObserverInit && options) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 15, - "disconnect", - " REACT_METHOD(disconnect) void disconnect( observer) noexcept { /* implementation */ }\n" - " REACT_METHOD(disconnect) static void disconnect( observer) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 16, - "takeRecords", - " REACT_SYNC_METHOD(takeRecords) std::vector takeRecords( observer, bool sort) noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(takeRecords) static std::vector takeRecords( observer, bool sort) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 17, - "getSupportedPerformanceEntryTypes", - " REACT_SYNC_METHOD(getSupportedPerformanceEntryTypes) std::vector getSupportedPerformanceEntryTypes() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(getSupportedPerformanceEntryTypes) static std::vector getSupportedPerformanceEntryTypes() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 18, - "clearEventCountsForTesting", - " REACT_METHOD(clearEventCountsForTesting) void clearEventCountsForTesting() noexcept { /* implementation */ }\n" - " REACT_METHOD(clearEventCountsForTesting) static void clearEventCountsForTesting() noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativePermissionsAndroidSpec.g.h b/vnext/codegen/NativePermissionsAndroidSpec.g.h deleted file mode 100644 index 4bde8da8dae..00000000000 --- a/vnext/codegen/NativePermissionsAndroidSpec.g.h +++ /dev/null @@ -1,53 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - - -struct PermissionsAndroidSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - Method) noexcept>{0, L"checkPermission"}, - Method) noexcept>{1, L"requestPermission"}, - Method) noexcept>{2, L"shouldShowRequestPermissionRationale"}, - Method, Promise<::React::JSValue>) noexcept>{3, L"requestMultiplePermissions"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "checkPermission", - " REACT_METHOD(checkPermission) void checkPermission(std::string permission, ::React::ReactPromise &&result) noexcept { /* implementation */ }\n" - " REACT_METHOD(checkPermission) static void checkPermission(std::string permission, ::React::ReactPromise &&result) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 1, - "requestPermission", - " REACT_METHOD(requestPermission) void requestPermission(std::string permission, ::React::ReactPromise &&result) noexcept { /* implementation */ }\n" - " REACT_METHOD(requestPermission) static void requestPermission(std::string permission, ::React::ReactPromise &&result) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 2, - "shouldShowRequestPermissionRationale", - " REACT_METHOD(shouldShowRequestPermissionRationale) void shouldShowRequestPermissionRationale(std::string permission, ::React::ReactPromise &&result) noexcept { /* implementation */ }\n" - " REACT_METHOD(shouldShowRequestPermissionRationale) static void shouldShowRequestPermissionRationale(std::string permission, ::React::ReactPromise &&result) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 3, - "requestMultiplePermissions", - " REACT_METHOD(requestMultiplePermissions) void requestMultiplePermissions(std::vector const & permissions, ::React::ReactPromise<::React::JSValue> &&result) noexcept { /* implementation */ }\n" - " REACT_METHOD(requestMultiplePermissions) static void requestMultiplePermissions(std::vector const & permissions, ::React::ReactPromise<::React::JSValue> &&result) noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativePlatformConstantsAndroidSpec.g.h b/vnext/codegen/NativePlatformConstantsAndroidSpec.g.h deleted file mode 100644 index 7cba243dd24..00000000000 --- a/vnext/codegen/NativePlatformConstantsAndroidSpec.g.h +++ /dev/null @@ -1,85 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - -struct PlatformConstantsAndroidSpec_ReactNativeVersionAndroid { - double major; - double minor; - double patch; - std::optional prerelease; -}; - -struct PlatformConstantsAndroidSpec_PlatformConstantsAndroid { - bool isTesting; - std::optional isDisableAnimations; - PlatformConstantsAndroidSpec_ReactNativeVersionAndroid reactNativeVersion; - double Version; - std::string Release; - std::string Serial; - std::string Fingerprint; - std::string Model; - std::optional ServerHost; - std::string uiMode; - std::string Brand; - std::string Manufacturer; -}; - - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(PlatformConstantsAndroidSpec_ReactNativeVersionAndroid*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"major", &PlatformConstantsAndroidSpec_ReactNativeVersionAndroid::major}, - {L"minor", &PlatformConstantsAndroidSpec_ReactNativeVersionAndroid::minor}, - {L"patch", &PlatformConstantsAndroidSpec_ReactNativeVersionAndroid::patch}, - {L"prerelease", &PlatformConstantsAndroidSpec_ReactNativeVersionAndroid::prerelease}, - }; - return fieldMap; -} - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(PlatformConstantsAndroidSpec_PlatformConstantsAndroid*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"isTesting", &PlatformConstantsAndroidSpec_PlatformConstantsAndroid::isTesting}, - {L"isDisableAnimations", &PlatformConstantsAndroidSpec_PlatformConstantsAndroid::isDisableAnimations}, - {L"reactNativeVersion", &PlatformConstantsAndroidSpec_PlatformConstantsAndroid::reactNativeVersion}, - {L"Version", &PlatformConstantsAndroidSpec_PlatformConstantsAndroid::Version}, - {L"Release", &PlatformConstantsAndroidSpec_PlatformConstantsAndroid::Release}, - {L"Serial", &PlatformConstantsAndroidSpec_PlatformConstantsAndroid::Serial}, - {L"Fingerprint", &PlatformConstantsAndroidSpec_PlatformConstantsAndroid::Fingerprint}, - {L"Model", &PlatformConstantsAndroidSpec_PlatformConstantsAndroid::Model}, - {L"ServerHost", &PlatformConstantsAndroidSpec_PlatformConstantsAndroid::ServerHost}, - {L"uiMode", &PlatformConstantsAndroidSpec_PlatformConstantsAndroid::uiMode}, - {L"Brand", &PlatformConstantsAndroidSpec_PlatformConstantsAndroid::Brand}, - {L"Manufacturer", &PlatformConstantsAndroidSpec_PlatformConstantsAndroid::Manufacturer}, - }; - return fieldMap; -} - -struct PlatformConstantsAndroidSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - SyncMethod{0, L"getAndroidID"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "getAndroidID", - " REACT_SYNC_METHOD(getAndroidID) std::string getAndroidID() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(getAndroidID) static std::string getAndroidID() noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativePlatformConstantsIOSSpec.g.h b/vnext/codegen/NativePlatformConstantsIOSSpec.g.h deleted file mode 100644 index c9c4ca1c224..00000000000 --- a/vnext/codegen/NativePlatformConstantsIOSSpec.g.h +++ /dev/null @@ -1,73 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - -struct PlatformConstantsIOSSpec_PlatformConstantsIOS_reactNativeVersion { - double major; - double minor; - double patch; - std::optional prerelease; -}; - -struct PlatformConstantsIOSSpec_PlatformConstantsIOS { - bool isTesting; - std::optional isDisableAnimations; - PlatformConstantsIOSSpec_PlatformConstantsIOS_reactNativeVersion reactNativeVersion; - bool forceTouchAvailable; - std::string osVersion; - std::string systemName; - std::string interfaceIdiom; - std::optional isMacCatalyst; -}; - - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(PlatformConstantsIOSSpec_PlatformConstantsIOS_reactNativeVersion*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"major", &PlatformConstantsIOSSpec_PlatformConstantsIOS_reactNativeVersion::major}, - {L"minor", &PlatformConstantsIOSSpec_PlatformConstantsIOS_reactNativeVersion::minor}, - {L"patch", &PlatformConstantsIOSSpec_PlatformConstantsIOS_reactNativeVersion::patch}, - {L"prerelease", &PlatformConstantsIOSSpec_PlatformConstantsIOS_reactNativeVersion::prerelease}, - }; - return fieldMap; -} - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(PlatformConstantsIOSSpec_PlatformConstantsIOS*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"isTesting", &PlatformConstantsIOSSpec_PlatformConstantsIOS::isTesting}, - {L"isDisableAnimations", &PlatformConstantsIOSSpec_PlatformConstantsIOS::isDisableAnimations}, - {L"reactNativeVersion", &PlatformConstantsIOSSpec_PlatformConstantsIOS::reactNativeVersion}, - {L"forceTouchAvailable", &PlatformConstantsIOSSpec_PlatformConstantsIOS::forceTouchAvailable}, - {L"osVersion", &PlatformConstantsIOSSpec_PlatformConstantsIOS::osVersion}, - {L"systemName", &PlatformConstantsIOSSpec_PlatformConstantsIOS::systemName}, - {L"interfaceIdiom", &PlatformConstantsIOSSpec_PlatformConstantsIOS::interfaceIdiom}, - {L"isMacCatalyst", &PlatformConstantsIOSSpec_PlatformConstantsIOS::isMacCatalyst}, - }; - return fieldMap; -} - -struct PlatformConstantsIOSSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativePlatformConstantsWindowsSpec.g.h b/vnext/codegen/NativePlatformConstantsWindowsSpec.g.h deleted file mode 100644 index d6a274cbf5f..00000000000 --- a/vnext/codegen/NativePlatformConstantsWindowsSpec.g.h +++ /dev/null @@ -1,82 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - -struct PlatformConstantsWindowsSpec_ReactNativeVersionAndroid { - double major; - double minor; - double patch; - std::optional prerelease; -}; - -struct PlatformConstantsWindowsSpec_PlatformConstantsWindows_reactNativeWindowsVersion { - double major; - double minor; - double patch; -}; - -struct PlatformConstantsWindowsSpec_PlatformConstantsWindows { - bool isTesting; - std::optional isDisableAnimations; - PlatformConstantsWindowsSpec_ReactNativeVersionAndroid reactNativeVersion; - PlatformConstantsWindowsSpec_PlatformConstantsWindows_reactNativeWindowsVersion reactNativeWindowsVersion; - double osVersion; -}; - - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(PlatformConstantsWindowsSpec_ReactNativeVersionAndroid*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"major", &PlatformConstantsWindowsSpec_ReactNativeVersionAndroid::major}, - {L"minor", &PlatformConstantsWindowsSpec_ReactNativeVersionAndroid::minor}, - {L"patch", &PlatformConstantsWindowsSpec_ReactNativeVersionAndroid::patch}, - {L"prerelease", &PlatformConstantsWindowsSpec_ReactNativeVersionAndroid::prerelease}, - }; - return fieldMap; -} - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(PlatformConstantsWindowsSpec_PlatformConstantsWindows_reactNativeWindowsVersion*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"major", &PlatformConstantsWindowsSpec_PlatformConstantsWindows_reactNativeWindowsVersion::major}, - {L"minor", &PlatformConstantsWindowsSpec_PlatformConstantsWindows_reactNativeWindowsVersion::minor}, - {L"patch", &PlatformConstantsWindowsSpec_PlatformConstantsWindows_reactNativeWindowsVersion::patch}, - }; - return fieldMap; -} - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(PlatformConstantsWindowsSpec_PlatformConstantsWindows*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"isTesting", &PlatformConstantsWindowsSpec_PlatformConstantsWindows::isTesting}, - {L"isDisableAnimations", &PlatformConstantsWindowsSpec_PlatformConstantsWindows::isDisableAnimations}, - {L"reactNativeVersion", &PlatformConstantsWindowsSpec_PlatformConstantsWindows::reactNativeVersion}, - {L"reactNativeWindowsVersion", &PlatformConstantsWindowsSpec_PlatformConstantsWindows::reactNativeWindowsVersion}, - {L"osVersion", &PlatformConstantsWindowsSpec_PlatformConstantsWindows::osVersion}, - }; - return fieldMap; -} - -struct PlatformConstantsWindowsSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativePushNotificationManagerIOSSpec.g.h b/vnext/codegen/NativePushNotificationManagerIOSSpec.g.h deleted file mode 100644 index 7ebec3d5d30..00000000000 --- a/vnext/codegen/NativePushNotificationManagerIOSSpec.g.h +++ /dev/null @@ -1,194 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - -struct PushNotificationManagerIOSSpec_Notification { - std::optional alertTitle; - std::optional alertBody; - std::optional<::React::JSValue> userInfo; - std::optional category; - std::optional fireDate; - std::optional fireIntervalSeconds; - std::optional applicationIconBadgeNumber; - std::optional isSilent; - std::optional soundName; -}; - -struct PushNotificationManagerIOSSpec_Permissions { - bool alert; - bool badge; - bool sound; -}; - -struct PushNotificationManagerIOSSpec_requestPermissions_permission { - bool alert; - bool badge; - bool sound; -}; - - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(PushNotificationManagerIOSSpec_Notification*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"alertTitle", &PushNotificationManagerIOSSpec_Notification::alertTitle}, - {L"alertBody", &PushNotificationManagerIOSSpec_Notification::alertBody}, - {L"userInfo", &PushNotificationManagerIOSSpec_Notification::userInfo}, - {L"category", &PushNotificationManagerIOSSpec_Notification::category}, - {L"fireDate", &PushNotificationManagerIOSSpec_Notification::fireDate}, - {L"fireIntervalSeconds", &PushNotificationManagerIOSSpec_Notification::fireIntervalSeconds}, - {L"applicationIconBadgeNumber", &PushNotificationManagerIOSSpec_Notification::applicationIconBadgeNumber}, - {L"isSilent", &PushNotificationManagerIOSSpec_Notification::isSilent}, - {L"soundName", &PushNotificationManagerIOSSpec_Notification::soundName}, - }; - return fieldMap; -} - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(PushNotificationManagerIOSSpec_Permissions*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"alert", &PushNotificationManagerIOSSpec_Permissions::alert}, - {L"badge", &PushNotificationManagerIOSSpec_Permissions::badge}, - {L"sound", &PushNotificationManagerIOSSpec_Permissions::sound}, - }; - return fieldMap; -} - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(PushNotificationManagerIOSSpec_requestPermissions_permission*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"alert", &PushNotificationManagerIOSSpec_requestPermissions_permission::alert}, - {L"badge", &PushNotificationManagerIOSSpec_requestPermissions_permission::badge}, - {L"sound", &PushNotificationManagerIOSSpec_requestPermissions_permission::sound}, - }; - return fieldMap; -} - -struct PushNotificationManagerIOSSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - Method{0, L"onFinishRemoteNotification"}, - Method{1, L"setApplicationIconBadgeNumber"}, - Method) noexcept>{2, L"getApplicationIconBadgeNumber"}, - Method) noexcept>{3, L"requestPermissions"}, - Method{4, L"abandonPermissions"}, - Method) noexcept>{5, L"checkPermissions"}, - Method{6, L"presentLocalNotification"}, - Method{7, L"scheduleLocalNotification"}, - Method{8, L"cancelAllLocalNotifications"}, - Method{9, L"cancelLocalNotifications"}, - Method>) noexcept>{10, L"getInitialNotification"}, - Method) noexcept>{11, L"getScheduledLocalNotifications"}, - Method{12, L"removeAllDeliveredNotifications"}, - Method) noexcept>{13, L"removeDeliveredNotifications"}, - Method>) noexcept>{14, L"getDeliveredNotifications"}, - Method) noexcept>{15, L"getAuthorizationStatus"}, - Method{16, L"addListener"}, - Method{17, L"removeListeners"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "onFinishRemoteNotification", - " REACT_METHOD(onFinishRemoteNotification) void onFinishRemoteNotification(std::string notificationId, std::string fetchResult) noexcept { /* implementation */ }\n" - " REACT_METHOD(onFinishRemoteNotification) static void onFinishRemoteNotification(std::string notificationId, std::string fetchResult) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 1, - "setApplicationIconBadgeNumber", - " REACT_METHOD(setApplicationIconBadgeNumber) void setApplicationIconBadgeNumber(double num) noexcept { /* implementation */ }\n" - " REACT_METHOD(setApplicationIconBadgeNumber) static void setApplicationIconBadgeNumber(double num) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 2, - "getApplicationIconBadgeNumber", - " REACT_METHOD(getApplicationIconBadgeNumber) void getApplicationIconBadgeNumber(std::function const & callback) noexcept { /* implementation */ }\n" - " REACT_METHOD(getApplicationIconBadgeNumber) static void getApplicationIconBadgeNumber(std::function const & callback) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 3, - "requestPermissions", - " REACT_METHOD(requestPermissions) void requestPermissions(PushNotificationManagerIOSSpec_requestPermissions_permission && permission, ::React::ReactPromise &&result) noexcept { /* implementation */ }\n" - " REACT_METHOD(requestPermissions) static void requestPermissions(PushNotificationManagerIOSSpec_requestPermissions_permission && permission, ::React::ReactPromise &&result) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 4, - "abandonPermissions", - " REACT_METHOD(abandonPermissions) void abandonPermissions() noexcept { /* implementation */ }\n" - " REACT_METHOD(abandonPermissions) static void abandonPermissions() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 5, - "checkPermissions", - " REACT_METHOD(checkPermissions) void checkPermissions(std::function const & callback) noexcept { /* implementation */ }\n" - " REACT_METHOD(checkPermissions) static void checkPermissions(std::function const & callback) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 6, - "presentLocalNotification", - " REACT_METHOD(presentLocalNotification) void presentLocalNotification(PushNotificationManagerIOSSpec_Notification && notification) noexcept { /* implementation */ }\n" - " REACT_METHOD(presentLocalNotification) static void presentLocalNotification(PushNotificationManagerIOSSpec_Notification && notification) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 7, - "scheduleLocalNotification", - " REACT_METHOD(scheduleLocalNotification) void scheduleLocalNotification(PushNotificationManagerIOSSpec_Notification && notification) noexcept { /* implementation */ }\n" - " REACT_METHOD(scheduleLocalNotification) static void scheduleLocalNotification(PushNotificationManagerIOSSpec_Notification && notification) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 8, - "cancelAllLocalNotifications", - " REACT_METHOD(cancelAllLocalNotifications) void cancelAllLocalNotifications() noexcept { /* implementation */ }\n" - " REACT_METHOD(cancelAllLocalNotifications) static void cancelAllLocalNotifications() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 9, - "cancelLocalNotifications", - " REACT_METHOD(cancelLocalNotifications) void cancelLocalNotifications(::React::JSValue && userInfo) noexcept { /* implementation */ }\n" - " REACT_METHOD(cancelLocalNotifications) static void cancelLocalNotifications(::React::JSValue && userInfo) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 10, - "getInitialNotification", - " REACT_METHOD(getInitialNotification) void getInitialNotification(::React::ReactPromise> &&result) noexcept { /* implementation */ }\n" - " REACT_METHOD(getInitialNotification) static void getInitialNotification(::React::ReactPromise> &&result) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 11, - "getScheduledLocalNotifications", - " REACT_METHOD(getScheduledLocalNotifications) void getScheduledLocalNotifications(std::function const & callback) noexcept { /* implementation */ }\n" - " REACT_METHOD(getScheduledLocalNotifications) static void getScheduledLocalNotifications(std::function const & callback) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 12, - "removeAllDeliveredNotifications", - " REACT_METHOD(removeAllDeliveredNotifications) void removeAllDeliveredNotifications() noexcept { /* implementation */ }\n" - " REACT_METHOD(removeAllDeliveredNotifications) static void removeAllDeliveredNotifications() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 13, - "removeDeliveredNotifications", - " REACT_METHOD(removeDeliveredNotifications) void removeDeliveredNotifications(std::vector const & identifiers) noexcept { /* implementation */ }\n" - " REACT_METHOD(removeDeliveredNotifications) static void removeDeliveredNotifications(std::vector const & identifiers) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 14, - "getDeliveredNotifications", - " REACT_METHOD(getDeliveredNotifications) void getDeliveredNotifications(std::function const &)> const & callback) noexcept { /* implementation */ }\n" - " REACT_METHOD(getDeliveredNotifications) static void getDeliveredNotifications(std::function const &)> const & callback) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 15, - "getAuthorizationStatus", - " REACT_METHOD(getAuthorizationStatus) void getAuthorizationStatus(std::function const & callback) noexcept { /* implementation */ }\n" - " REACT_METHOD(getAuthorizationStatus) static void getAuthorizationStatus(std::function const & callback) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 16, - "addListener", - " REACT_METHOD(addListener) void addListener(std::string eventType) noexcept { /* implementation */ }\n" - " REACT_METHOD(addListener) static void addListener(std::string eventType) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 17, - "removeListeners", - " REACT_METHOD(removeListeners) void removeListeners(double count) noexcept { /* implementation */ }\n" - " REACT_METHOD(removeListeners) static void removeListeners(double count) noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeReactDevToolsRuntimeSettingsModuleSpec.g.h b/vnext/codegen/NativeReactDevToolsRuntimeSettingsModuleSpec.g.h deleted file mode 100644 index c9275869659..00000000000 --- a/vnext/codegen/NativeReactDevToolsRuntimeSettingsModuleSpec.g.h +++ /dev/null @@ -1,67 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - -struct ReactDevToolsRuntimeSettingsModuleSpec_PartialReloadAndProfileConfig { - std::optional shouldReloadAndProfile; - std::optional recordChangeDescriptions; -}; - -struct ReactDevToolsRuntimeSettingsModuleSpec_ReloadAndProfileConfig { - bool shouldReloadAndProfile; - bool recordChangeDescriptions; -}; - - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(ReactDevToolsRuntimeSettingsModuleSpec_PartialReloadAndProfileConfig*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"shouldReloadAndProfile", &ReactDevToolsRuntimeSettingsModuleSpec_PartialReloadAndProfileConfig::shouldReloadAndProfile}, - {L"recordChangeDescriptions", &ReactDevToolsRuntimeSettingsModuleSpec_PartialReloadAndProfileConfig::recordChangeDescriptions}, - }; - return fieldMap; -} - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(ReactDevToolsRuntimeSettingsModuleSpec_ReloadAndProfileConfig*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"shouldReloadAndProfile", &ReactDevToolsRuntimeSettingsModuleSpec_ReloadAndProfileConfig::shouldReloadAndProfile}, - {L"recordChangeDescriptions", &ReactDevToolsRuntimeSettingsModuleSpec_ReloadAndProfileConfig::recordChangeDescriptions}, - }; - return fieldMap; -} - -struct ReactDevToolsRuntimeSettingsModuleSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - Method{0, L"setReloadAndProfileConfig"}, - SyncMethod{1, L"getReloadAndProfileConfig"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "setReloadAndProfileConfig", - " REACT_METHOD(setReloadAndProfileConfig) void setReloadAndProfileConfig(ReactDevToolsRuntimeSettingsModuleSpec_PartialReloadAndProfileConfig && config) noexcept { /* implementation */ }\n" - " REACT_METHOD(setReloadAndProfileConfig) static void setReloadAndProfileConfig(ReactDevToolsRuntimeSettingsModuleSpec_PartialReloadAndProfileConfig && config) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 1, - "getReloadAndProfileConfig", - " REACT_SYNC_METHOD(getReloadAndProfileConfig) ReactDevToolsRuntimeSettingsModuleSpec_ReloadAndProfileConfig getReloadAndProfileConfig() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(getReloadAndProfileConfig) static ReactDevToolsRuntimeSettingsModuleSpec_ReloadAndProfileConfig getReloadAndProfileConfig() noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeReactDevToolsSettingsManagerSpec.g.h b/vnext/codegen/NativeReactDevToolsSettingsManagerSpec.g.h deleted file mode 100644 index 3aa4d89dc57..00000000000 --- a/vnext/codegen/NativeReactDevToolsSettingsManagerSpec.g.h +++ /dev/null @@ -1,41 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - - -struct ReactDevToolsSettingsManagerSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - Method{0, L"setGlobalHookSettings"}, - SyncMethod() noexcept>{1, L"getGlobalHookSettings"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "setGlobalHookSettings", - " REACT_METHOD(setGlobalHookSettings) void setGlobalHookSettings(std::string settings) noexcept { /* implementation */ }\n" - " REACT_METHOD(setGlobalHookSettings) static void setGlobalHookSettings(std::string settings) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 1, - "getGlobalHookSettings", - " REACT_SYNC_METHOD(getGlobalHookSettings) std::optional getGlobalHookSettings() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(getGlobalHookSettings) static std::optional getGlobalHookSettings() noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeReactNativeFeatureFlagsSpec.g.h b/vnext/codegen/NativeReactNativeFeatureFlagsSpec.g.h deleted file mode 100644 index acb3577d276..00000000000 --- a/vnext/codegen/NativeReactNativeFeatureFlagsSpec.g.h +++ /dev/null @@ -1,443 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - - -struct ReactNativeFeatureFlagsSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - SyncMethod{0, L"commonTestFlag"}, - SyncMethod{1, L"commonTestFlagWithoutNativeImplementation"}, - SyncMethod{2, L"cdpInteractionMetricsEnabled"}, - SyncMethod{3, L"cxxNativeAnimatedEnabled"}, - SyncMethod{4, L"cxxNativeAnimatedRemoveJsSync"}, - SyncMethod{5, L"disableFabricCommitInCXXAnimated"}, - SyncMethod{6, L"disableMountItemReorderingAndroid"}, - SyncMethod{7, L"disableOldAndroidAttachmentMetricsWorkarounds"}, - SyncMethod{8, L"disableTextLayoutManagerCacheAndroid"}, - SyncMethod{9, L"enableAccessibilityOrder"}, - SyncMethod{10, L"enableAccumulatedUpdatesInRawPropsAndroid"}, - SyncMethod{11, L"enableAndroidTextMeasurementOptimizations"}, - SyncMethod{12, L"enableBridgelessArchitecture"}, - SyncMethod{13, L"enableCppPropsIteratorSetter"}, - SyncMethod{14, L"enableCustomFocusSearchOnClippedElementsAndroid"}, - SyncMethod{15, L"enableDestroyShadowTreeRevisionAsync"}, - SyncMethod{16, L"enableDoubleMeasurementFixAndroid"}, - SyncMethod{17, L"enableEagerMainQueueModulesOnIOS"}, - SyncMethod{18, L"enableEagerRootViewAttachment"}, - SyncMethod{19, L"enableFabricLogs"}, - SyncMethod{20, L"enableFabricRenderer"}, - SyncMethod{21, L"enableFixForParentTagDuringReparenting"}, - SyncMethod{22, L"enableFontScaleChangesUpdatingLayout"}, - SyncMethod{23, L"enableIOSTextBaselineOffsetPerLine"}, - SyncMethod{24, L"enableIOSViewClipToPaddingBox"}, - SyncMethod{25, L"enableImagePrefetchingAndroid"}, - SyncMethod{26, L"enableImmediateUpdateModeForContentOffsetChanges"}, - SyncMethod{27, L"enableInteropViewManagerClassLookUpOptimizationIOS"}, - SyncMethod{28, L"enableLayoutAnimationsOnAndroid"}, - SyncMethod{29, L"enableLayoutAnimationsOnIOS"}, - SyncMethod{30, L"enableMainQueueCoordinatorOnIOS"}, - SyncMethod{31, L"enableModuleArgumentNSNullConversionIOS"}, - SyncMethod{32, L"enableNativeCSSParsing"}, - SyncMethod{33, L"enableNetworkEventReporting"}, - SyncMethod{34, L"enableNewBackgroundAndBorderDrawables"}, - SyncMethod{35, L"enablePreparedTextLayout"}, - SyncMethod{36, L"enablePropsUpdateReconciliationAndroid"}, - SyncMethod{37, L"enableResourceTimingAPI"}, - SyncMethod{38, L"enableViewCulling"}, - SyncMethod{39, L"enableViewRecycling"}, - SyncMethod{40, L"enableViewRecyclingForText"}, - SyncMethod{41, L"enableViewRecyclingForView"}, - SyncMethod{42, L"enableVirtualViewDebugFeatures"}, - SyncMethod{43, L"enableVirtualViewRenderState"}, - SyncMethod{44, L"enableVirtualViewWindowFocusDetection"}, - SyncMethod{45, L"fixMappingOfEventPrioritiesBetweenFabricAndReact"}, - SyncMethod{46, L"fuseboxEnabledRelease"}, - SyncMethod{47, L"fuseboxNetworkInspectionEnabled"}, - SyncMethod{48, L"hideOffscreenVirtualViewsOnIOS"}, - SyncMethod{49, L"perfMonitorV2Enabled"}, - SyncMethod{50, L"preparedTextCacheSize"}, - SyncMethod{51, L"preventShadowTreeCommitExhaustion"}, - SyncMethod{52, L"releaseImageDataWhenConsumed"}, - SyncMethod{53, L"shouldPressibilityUseW3CPointerEventsForHover"}, - SyncMethod{54, L"skipActivityIdentityAssertionOnHostPause"}, - SyncMethod{55, L"sweepActiveTouchOnChildNativeGesturesAndroid"}, - SyncMethod{56, L"traceTurboModulePromiseRejectionsOnAndroid"}, - SyncMethod{57, L"updateRuntimeShadowNodeReferencesOnCommit"}, - SyncMethod{58, L"useAlwaysAvailableJSErrorHandling"}, - SyncMethod{59, L"useFabricInterop"}, - SyncMethod{60, L"useNativeEqualsInNativeReadableArrayAndroid"}, - SyncMethod{61, L"useNativeTransformHelperAndroid"}, - SyncMethod{62, L"useNativeViewConfigsInBridgelessMode"}, - SyncMethod{63, L"useOptimizedEventBatchingOnAndroid"}, - SyncMethod{64, L"useRawPropsJsiValue"}, - SyncMethod{65, L"useShadowNodeStateOnClone"}, - SyncMethod{66, L"useTurboModuleInterop"}, - SyncMethod{67, L"useTurboModules"}, - SyncMethod{68, L"virtualViewPrerenderRatio"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "commonTestFlag", - " REACT_SYNC_METHOD(commonTestFlag) bool commonTestFlag() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(commonTestFlag) static bool commonTestFlag() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 1, - "commonTestFlagWithoutNativeImplementation", - " REACT_SYNC_METHOD(commonTestFlagWithoutNativeImplementation) bool commonTestFlagWithoutNativeImplementation() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(commonTestFlagWithoutNativeImplementation) static bool commonTestFlagWithoutNativeImplementation() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 2, - "cdpInteractionMetricsEnabled", - " REACT_SYNC_METHOD(cdpInteractionMetricsEnabled) bool cdpInteractionMetricsEnabled() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(cdpInteractionMetricsEnabled) static bool cdpInteractionMetricsEnabled() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 3, - "cxxNativeAnimatedEnabled", - " REACT_SYNC_METHOD(cxxNativeAnimatedEnabled) bool cxxNativeAnimatedEnabled() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(cxxNativeAnimatedEnabled) static bool cxxNativeAnimatedEnabled() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 4, - "cxxNativeAnimatedRemoveJsSync", - " REACT_SYNC_METHOD(cxxNativeAnimatedRemoveJsSync) bool cxxNativeAnimatedRemoveJsSync() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(cxxNativeAnimatedRemoveJsSync) static bool cxxNativeAnimatedRemoveJsSync() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 5, - "disableFabricCommitInCXXAnimated", - " REACT_SYNC_METHOD(disableFabricCommitInCXXAnimated) bool disableFabricCommitInCXXAnimated() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(disableFabricCommitInCXXAnimated) static bool disableFabricCommitInCXXAnimated() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 6, - "disableMountItemReorderingAndroid", - " REACT_SYNC_METHOD(disableMountItemReorderingAndroid) bool disableMountItemReorderingAndroid() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(disableMountItemReorderingAndroid) static bool disableMountItemReorderingAndroid() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 7, - "disableOldAndroidAttachmentMetricsWorkarounds", - " REACT_SYNC_METHOD(disableOldAndroidAttachmentMetricsWorkarounds) bool disableOldAndroidAttachmentMetricsWorkarounds() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(disableOldAndroidAttachmentMetricsWorkarounds) static bool disableOldAndroidAttachmentMetricsWorkarounds() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 8, - "disableTextLayoutManagerCacheAndroid", - " REACT_SYNC_METHOD(disableTextLayoutManagerCacheAndroid) bool disableTextLayoutManagerCacheAndroid() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(disableTextLayoutManagerCacheAndroid) static bool disableTextLayoutManagerCacheAndroid() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 9, - "enableAccessibilityOrder", - " REACT_SYNC_METHOD(enableAccessibilityOrder) bool enableAccessibilityOrder() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(enableAccessibilityOrder) static bool enableAccessibilityOrder() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 10, - "enableAccumulatedUpdatesInRawPropsAndroid", - " REACT_SYNC_METHOD(enableAccumulatedUpdatesInRawPropsAndroid) bool enableAccumulatedUpdatesInRawPropsAndroid() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(enableAccumulatedUpdatesInRawPropsAndroid) static bool enableAccumulatedUpdatesInRawPropsAndroid() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 11, - "enableAndroidTextMeasurementOptimizations", - " REACT_SYNC_METHOD(enableAndroidTextMeasurementOptimizations) bool enableAndroidTextMeasurementOptimizations() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(enableAndroidTextMeasurementOptimizations) static bool enableAndroidTextMeasurementOptimizations() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 12, - "enableBridgelessArchitecture", - " REACT_SYNC_METHOD(enableBridgelessArchitecture) bool enableBridgelessArchitecture() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(enableBridgelessArchitecture) static bool enableBridgelessArchitecture() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 13, - "enableCppPropsIteratorSetter", - " REACT_SYNC_METHOD(enableCppPropsIteratorSetter) bool enableCppPropsIteratorSetter() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(enableCppPropsIteratorSetter) static bool enableCppPropsIteratorSetter() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 14, - "enableCustomFocusSearchOnClippedElementsAndroid", - " REACT_SYNC_METHOD(enableCustomFocusSearchOnClippedElementsAndroid) bool enableCustomFocusSearchOnClippedElementsAndroid() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(enableCustomFocusSearchOnClippedElementsAndroid) static bool enableCustomFocusSearchOnClippedElementsAndroid() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 15, - "enableDestroyShadowTreeRevisionAsync", - " REACT_SYNC_METHOD(enableDestroyShadowTreeRevisionAsync) bool enableDestroyShadowTreeRevisionAsync() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(enableDestroyShadowTreeRevisionAsync) static bool enableDestroyShadowTreeRevisionAsync() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 16, - "enableDoubleMeasurementFixAndroid", - " REACT_SYNC_METHOD(enableDoubleMeasurementFixAndroid) bool enableDoubleMeasurementFixAndroid() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(enableDoubleMeasurementFixAndroid) static bool enableDoubleMeasurementFixAndroid() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 17, - "enableEagerMainQueueModulesOnIOS", - " REACT_SYNC_METHOD(enableEagerMainQueueModulesOnIOS) bool enableEagerMainQueueModulesOnIOS() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(enableEagerMainQueueModulesOnIOS) static bool enableEagerMainQueueModulesOnIOS() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 18, - "enableEagerRootViewAttachment", - " REACT_SYNC_METHOD(enableEagerRootViewAttachment) bool enableEagerRootViewAttachment() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(enableEagerRootViewAttachment) static bool enableEagerRootViewAttachment() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 19, - "enableFabricLogs", - " REACT_SYNC_METHOD(enableFabricLogs) bool enableFabricLogs() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(enableFabricLogs) static bool enableFabricLogs() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 20, - "enableFabricRenderer", - " REACT_SYNC_METHOD(enableFabricRenderer) bool enableFabricRenderer() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(enableFabricRenderer) static bool enableFabricRenderer() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 21, - "enableFixForParentTagDuringReparenting", - " REACT_SYNC_METHOD(enableFixForParentTagDuringReparenting) bool enableFixForParentTagDuringReparenting() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(enableFixForParentTagDuringReparenting) static bool enableFixForParentTagDuringReparenting() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 22, - "enableFontScaleChangesUpdatingLayout", - " REACT_SYNC_METHOD(enableFontScaleChangesUpdatingLayout) bool enableFontScaleChangesUpdatingLayout() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(enableFontScaleChangesUpdatingLayout) static bool enableFontScaleChangesUpdatingLayout() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 23, - "enableIOSTextBaselineOffsetPerLine", - " REACT_SYNC_METHOD(enableIOSTextBaselineOffsetPerLine) bool enableIOSTextBaselineOffsetPerLine() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(enableIOSTextBaselineOffsetPerLine) static bool enableIOSTextBaselineOffsetPerLine() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 24, - "enableIOSViewClipToPaddingBox", - " REACT_SYNC_METHOD(enableIOSViewClipToPaddingBox) bool enableIOSViewClipToPaddingBox() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(enableIOSViewClipToPaddingBox) static bool enableIOSViewClipToPaddingBox() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 25, - "enableImagePrefetchingAndroid", - " REACT_SYNC_METHOD(enableImagePrefetchingAndroid) bool enableImagePrefetchingAndroid() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(enableImagePrefetchingAndroid) static bool enableImagePrefetchingAndroid() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 26, - "enableImmediateUpdateModeForContentOffsetChanges", - " REACT_SYNC_METHOD(enableImmediateUpdateModeForContentOffsetChanges) bool enableImmediateUpdateModeForContentOffsetChanges() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(enableImmediateUpdateModeForContentOffsetChanges) static bool enableImmediateUpdateModeForContentOffsetChanges() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 27, - "enableInteropViewManagerClassLookUpOptimizationIOS", - " REACT_SYNC_METHOD(enableInteropViewManagerClassLookUpOptimizationIOS) bool enableInteropViewManagerClassLookUpOptimizationIOS() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(enableInteropViewManagerClassLookUpOptimizationIOS) static bool enableInteropViewManagerClassLookUpOptimizationIOS() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 28, - "enableLayoutAnimationsOnAndroid", - " REACT_SYNC_METHOD(enableLayoutAnimationsOnAndroid) bool enableLayoutAnimationsOnAndroid() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(enableLayoutAnimationsOnAndroid) static bool enableLayoutAnimationsOnAndroid() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 29, - "enableLayoutAnimationsOnIOS", - " REACT_SYNC_METHOD(enableLayoutAnimationsOnIOS) bool enableLayoutAnimationsOnIOS() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(enableLayoutAnimationsOnIOS) static bool enableLayoutAnimationsOnIOS() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 30, - "enableMainQueueCoordinatorOnIOS", - " REACT_SYNC_METHOD(enableMainQueueCoordinatorOnIOS) bool enableMainQueueCoordinatorOnIOS() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(enableMainQueueCoordinatorOnIOS) static bool enableMainQueueCoordinatorOnIOS() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 31, - "enableModuleArgumentNSNullConversionIOS", - " REACT_SYNC_METHOD(enableModuleArgumentNSNullConversionIOS) bool enableModuleArgumentNSNullConversionIOS() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(enableModuleArgumentNSNullConversionIOS) static bool enableModuleArgumentNSNullConversionIOS() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 32, - "enableNativeCSSParsing", - " REACT_SYNC_METHOD(enableNativeCSSParsing) bool enableNativeCSSParsing() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(enableNativeCSSParsing) static bool enableNativeCSSParsing() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 33, - "enableNetworkEventReporting", - " REACT_SYNC_METHOD(enableNetworkEventReporting) bool enableNetworkEventReporting() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(enableNetworkEventReporting) static bool enableNetworkEventReporting() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 34, - "enableNewBackgroundAndBorderDrawables", - " REACT_SYNC_METHOD(enableNewBackgroundAndBorderDrawables) bool enableNewBackgroundAndBorderDrawables() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(enableNewBackgroundAndBorderDrawables) static bool enableNewBackgroundAndBorderDrawables() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 35, - "enablePreparedTextLayout", - " REACT_SYNC_METHOD(enablePreparedTextLayout) bool enablePreparedTextLayout() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(enablePreparedTextLayout) static bool enablePreparedTextLayout() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 36, - "enablePropsUpdateReconciliationAndroid", - " REACT_SYNC_METHOD(enablePropsUpdateReconciliationAndroid) bool enablePropsUpdateReconciliationAndroid() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(enablePropsUpdateReconciliationAndroid) static bool enablePropsUpdateReconciliationAndroid() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 37, - "enableResourceTimingAPI", - " REACT_SYNC_METHOD(enableResourceTimingAPI) bool enableResourceTimingAPI() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(enableResourceTimingAPI) static bool enableResourceTimingAPI() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 38, - "enableViewCulling", - " REACT_SYNC_METHOD(enableViewCulling) bool enableViewCulling() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(enableViewCulling) static bool enableViewCulling() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 39, - "enableViewRecycling", - " REACT_SYNC_METHOD(enableViewRecycling) bool enableViewRecycling() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(enableViewRecycling) static bool enableViewRecycling() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 40, - "enableViewRecyclingForText", - " REACT_SYNC_METHOD(enableViewRecyclingForText) bool enableViewRecyclingForText() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(enableViewRecyclingForText) static bool enableViewRecyclingForText() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 41, - "enableViewRecyclingForView", - " REACT_SYNC_METHOD(enableViewRecyclingForView) bool enableViewRecyclingForView() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(enableViewRecyclingForView) static bool enableViewRecyclingForView() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 42, - "enableVirtualViewDebugFeatures", - " REACT_SYNC_METHOD(enableVirtualViewDebugFeatures) bool enableVirtualViewDebugFeatures() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(enableVirtualViewDebugFeatures) static bool enableVirtualViewDebugFeatures() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 43, - "enableVirtualViewRenderState", - " REACT_SYNC_METHOD(enableVirtualViewRenderState) bool enableVirtualViewRenderState() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(enableVirtualViewRenderState) static bool enableVirtualViewRenderState() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 44, - "enableVirtualViewWindowFocusDetection", - " REACT_SYNC_METHOD(enableVirtualViewWindowFocusDetection) bool enableVirtualViewWindowFocusDetection() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(enableVirtualViewWindowFocusDetection) static bool enableVirtualViewWindowFocusDetection() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 45, - "fixMappingOfEventPrioritiesBetweenFabricAndReact", - " REACT_SYNC_METHOD(fixMappingOfEventPrioritiesBetweenFabricAndReact) bool fixMappingOfEventPrioritiesBetweenFabricAndReact() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(fixMappingOfEventPrioritiesBetweenFabricAndReact) static bool fixMappingOfEventPrioritiesBetweenFabricAndReact() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 46, - "fuseboxEnabledRelease", - " REACT_SYNC_METHOD(fuseboxEnabledRelease) bool fuseboxEnabledRelease() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(fuseboxEnabledRelease) static bool fuseboxEnabledRelease() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 47, - "fuseboxNetworkInspectionEnabled", - " REACT_SYNC_METHOD(fuseboxNetworkInspectionEnabled) bool fuseboxNetworkInspectionEnabled() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(fuseboxNetworkInspectionEnabled) static bool fuseboxNetworkInspectionEnabled() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 48, - "hideOffscreenVirtualViewsOnIOS", - " REACT_SYNC_METHOD(hideOffscreenVirtualViewsOnIOS) bool hideOffscreenVirtualViewsOnIOS() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(hideOffscreenVirtualViewsOnIOS) static bool hideOffscreenVirtualViewsOnIOS() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 49, - "perfMonitorV2Enabled", - " REACT_SYNC_METHOD(perfMonitorV2Enabled) bool perfMonitorV2Enabled() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(perfMonitorV2Enabled) static bool perfMonitorV2Enabled() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 50, - "preparedTextCacheSize", - " REACT_SYNC_METHOD(preparedTextCacheSize) double preparedTextCacheSize() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(preparedTextCacheSize) static double preparedTextCacheSize() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 51, - "preventShadowTreeCommitExhaustion", - " REACT_SYNC_METHOD(preventShadowTreeCommitExhaustion) bool preventShadowTreeCommitExhaustion() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(preventShadowTreeCommitExhaustion) static bool preventShadowTreeCommitExhaustion() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 52, - "releaseImageDataWhenConsumed", - " REACT_SYNC_METHOD(releaseImageDataWhenConsumed) bool releaseImageDataWhenConsumed() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(releaseImageDataWhenConsumed) static bool releaseImageDataWhenConsumed() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 53, - "shouldPressibilityUseW3CPointerEventsForHover", - " REACT_SYNC_METHOD(shouldPressibilityUseW3CPointerEventsForHover) bool shouldPressibilityUseW3CPointerEventsForHover() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(shouldPressibilityUseW3CPointerEventsForHover) static bool shouldPressibilityUseW3CPointerEventsForHover() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 54, - "skipActivityIdentityAssertionOnHostPause", - " REACT_SYNC_METHOD(skipActivityIdentityAssertionOnHostPause) bool skipActivityIdentityAssertionOnHostPause() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(skipActivityIdentityAssertionOnHostPause) static bool skipActivityIdentityAssertionOnHostPause() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 55, - "sweepActiveTouchOnChildNativeGesturesAndroid", - " REACT_SYNC_METHOD(sweepActiveTouchOnChildNativeGesturesAndroid) bool sweepActiveTouchOnChildNativeGesturesAndroid() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(sweepActiveTouchOnChildNativeGesturesAndroid) static bool sweepActiveTouchOnChildNativeGesturesAndroid() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 56, - "traceTurboModulePromiseRejectionsOnAndroid", - " REACT_SYNC_METHOD(traceTurboModulePromiseRejectionsOnAndroid) bool traceTurboModulePromiseRejectionsOnAndroid() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(traceTurboModulePromiseRejectionsOnAndroid) static bool traceTurboModulePromiseRejectionsOnAndroid() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 57, - "updateRuntimeShadowNodeReferencesOnCommit", - " REACT_SYNC_METHOD(updateRuntimeShadowNodeReferencesOnCommit) bool updateRuntimeShadowNodeReferencesOnCommit() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(updateRuntimeShadowNodeReferencesOnCommit) static bool updateRuntimeShadowNodeReferencesOnCommit() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 58, - "useAlwaysAvailableJSErrorHandling", - " REACT_SYNC_METHOD(useAlwaysAvailableJSErrorHandling) bool useAlwaysAvailableJSErrorHandling() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(useAlwaysAvailableJSErrorHandling) static bool useAlwaysAvailableJSErrorHandling() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 59, - "useFabricInterop", - " REACT_SYNC_METHOD(useFabricInterop) bool useFabricInterop() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(useFabricInterop) static bool useFabricInterop() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 60, - "useNativeEqualsInNativeReadableArrayAndroid", - " REACT_SYNC_METHOD(useNativeEqualsInNativeReadableArrayAndroid) bool useNativeEqualsInNativeReadableArrayAndroid() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(useNativeEqualsInNativeReadableArrayAndroid) static bool useNativeEqualsInNativeReadableArrayAndroid() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 61, - "useNativeTransformHelperAndroid", - " REACT_SYNC_METHOD(useNativeTransformHelperAndroid) bool useNativeTransformHelperAndroid() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(useNativeTransformHelperAndroid) static bool useNativeTransformHelperAndroid() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 62, - "useNativeViewConfigsInBridgelessMode", - " REACT_SYNC_METHOD(useNativeViewConfigsInBridgelessMode) bool useNativeViewConfigsInBridgelessMode() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(useNativeViewConfigsInBridgelessMode) static bool useNativeViewConfigsInBridgelessMode() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 63, - "useOptimizedEventBatchingOnAndroid", - " REACT_SYNC_METHOD(useOptimizedEventBatchingOnAndroid) bool useOptimizedEventBatchingOnAndroid() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(useOptimizedEventBatchingOnAndroid) static bool useOptimizedEventBatchingOnAndroid() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 64, - "useRawPropsJsiValue", - " REACT_SYNC_METHOD(useRawPropsJsiValue) bool useRawPropsJsiValue() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(useRawPropsJsiValue) static bool useRawPropsJsiValue() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 65, - "useShadowNodeStateOnClone", - " REACT_SYNC_METHOD(useShadowNodeStateOnClone) bool useShadowNodeStateOnClone() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(useShadowNodeStateOnClone) static bool useShadowNodeStateOnClone() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 66, - "useTurboModuleInterop", - " REACT_SYNC_METHOD(useTurboModuleInterop) bool useTurboModuleInterop() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(useTurboModuleInterop) static bool useTurboModuleInterop() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 67, - "useTurboModules", - " REACT_SYNC_METHOD(useTurboModules) bool useTurboModules() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(useTurboModules) static bool useTurboModules() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 68, - "virtualViewPrerenderRatio", - " REACT_SYNC_METHOD(virtualViewPrerenderRatio) double virtualViewPrerenderRatio() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(virtualViewPrerenderRatio) static double virtualViewPrerenderRatio() noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeRedBoxSpec.g.h b/vnext/codegen/NativeRedBoxSpec.g.h deleted file mode 100644 index df5920f44d0..00000000000 --- a/vnext/codegen/NativeRedBoxSpec.g.h +++ /dev/null @@ -1,41 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - - -struct RedBoxSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - Method{0, L"setExtraData"}, - Method{1, L"dismiss"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "setExtraData", - " REACT_METHOD(setExtraData) void setExtraData(::React::JSValue && extraData, std::string forIdentifier) noexcept { /* implementation */ }\n" - " REACT_METHOD(setExtraData) static void setExtraData(::React::JSValue && extraData, std::string forIdentifier) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 1, - "dismiss", - " REACT_METHOD(dismiss) void dismiss() noexcept { /* implementation */ }\n" - " REACT_METHOD(dismiss) static void dismiss() noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeSampleTurboModuleSpec.g.h b/vnext/codegen/NativeSampleTurboModuleSpec.g.h deleted file mode 100644 index 3aef0ad9002..00000000000 --- a/vnext/codegen/NativeSampleTurboModuleSpec.g.h +++ /dev/null @@ -1,203 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - -struct SampleTurboModuleSpec_ObjectStruct { - double a; - std::string b; - std::optional c; -}; - -struct SampleTurboModuleSpec_Constants { - bool const1; - double const2; - std::string const3; -}; - - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(SampleTurboModuleSpec_ObjectStruct*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"a", &SampleTurboModuleSpec_ObjectStruct::a}, - {L"b", &SampleTurboModuleSpec_ObjectStruct::b}, - {L"c", &SampleTurboModuleSpec_ObjectStruct::c}, - }; - return fieldMap; -} - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(SampleTurboModuleSpec_Constants*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"const1", &SampleTurboModuleSpec_Constants::const1}, - {L"const2", &SampleTurboModuleSpec_Constants::const2}, - {L"const3", &SampleTurboModuleSpec_Constants::const3}, - }; - return fieldMap; -} - -struct SampleTurboModuleSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto constants = std::tuple{ - TypedConstant{0}, - }; - static constexpr auto methods = std::tuple{ - Method{0, L"voidFunc"}, - SyncMethod{1, L"getBool"}, - SyncMethod{2, L"getEnum"}, - SyncMethod{3, L"getNumber"}, - SyncMethod{4, L"getString"}, - SyncMethod<::React::JSValueArray(::React::JSValueArray) noexcept>{5, L"getArray"}, - SyncMethod<::React::JSValue(::React::JSValue) noexcept>{6, L"getObject"}, - SyncMethod<::React::JSValue(::React::JSValue) noexcept>{7, L"getUnsafeObject"}, - SyncMethod{8, L"getRootTag"}, - SyncMethod<::React::JSValue(double, std::string, ::React::JSValue) noexcept>{9, L"getValue"}, - Method) noexcept>{10, L"getValueWithCallback"}, - Method) noexcept>{11, L"getValueWithPromise"}, - Method{12, L"voidFuncThrows"}, - SyncMethod<::React::JSValue(::React::JSValue) noexcept>{13, L"getObjectThrows"}, - Method) noexcept>{14, L"promiseThrows"}, - Method{15, L"voidFuncAssert"}, - SyncMethod<::React::JSValue(::React::JSValue) noexcept>{16, L"getObjectAssert"}, - Method) noexcept>{17, L"promiseAssert"}, - Method) noexcept>{18, L"getImageUrl"}, - EventEmitter{19, L"onPress"}, - EventEmitter{20, L"onClick"}, - EventEmitter{21, L"onChange"}, - EventEmitter)>{22, L"onSubmit"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto constantCheckResults = CheckConstants(); - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_CONSTANT_SPEC_ERRORS( - 0, - "SampleTurboModuleSpec_Constants", - " REACT_GET_CONSTANTS(GetConstants) SampleTurboModuleSpec_Constants GetConstants() noexcept {/*implementation*/}\n" - " REACT_GET_CONSTANTS(GetConstants) static SampleTurboModuleSpec_Constants GetConstants() noexcept {/*implementation*/}\n"); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "voidFunc", - " REACT_METHOD(voidFunc) void voidFunc() noexcept { /* implementation */ }\n" - " REACT_METHOD(voidFunc) static void voidFunc() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 1, - "getBool", - " REACT_SYNC_METHOD(getBool) bool getBool(bool arg) noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(getBool) static bool getBool(bool arg) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 2, - "getEnum", - " REACT_SYNC_METHOD(getEnum) double getEnum(double arg) noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(getEnum) static double getEnum(double arg) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 3, - "getNumber", - " REACT_SYNC_METHOD(getNumber) double getNumber(double arg) noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(getNumber) static double getNumber(double arg) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 4, - "getString", - " REACT_SYNC_METHOD(getString) std::string getString(std::string arg) noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(getString) static std::string getString(std::string arg) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 5, - "getArray", - " REACT_SYNC_METHOD(getArray) ::React::JSValueArray getArray(::React::JSValueArray && arg) noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(getArray) static ::React::JSValueArray getArray(::React::JSValueArray && arg) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 6, - "getObject", - " REACT_SYNC_METHOD(getObject) ::React::JSValue getObject(::React::JSValue && arg) noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(getObject) static ::React::JSValue getObject(::React::JSValue && arg) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 7, - "getUnsafeObject", - " REACT_SYNC_METHOD(getUnsafeObject) ::React::JSValue getUnsafeObject(::React::JSValue && arg) noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(getUnsafeObject) static ::React::JSValue getUnsafeObject(::React::JSValue && arg) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 8, - "getRootTag", - " REACT_SYNC_METHOD(getRootTag) double getRootTag(double arg) noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(getRootTag) static double getRootTag(double arg) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 9, - "getValue", - " REACT_SYNC_METHOD(getValue) ::React::JSValue getValue(double x, std::string y, ::React::JSValue && z) noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(getValue) static ::React::JSValue getValue(double x, std::string y, ::React::JSValue && z) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 10, - "getValueWithCallback", - " REACT_METHOD(getValueWithCallback) void getValueWithCallback(std::function const & callback) noexcept { /* implementation */ }\n" - " REACT_METHOD(getValueWithCallback) static void getValueWithCallback(std::function const & callback) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 11, - "getValueWithPromise", - " REACT_METHOD(getValueWithPromise) void getValueWithPromise(bool error, ::React::ReactPromise &&result) noexcept { /* implementation */ }\n" - " REACT_METHOD(getValueWithPromise) static void getValueWithPromise(bool error, ::React::ReactPromise &&result) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 12, - "voidFuncThrows", - " REACT_METHOD(voidFuncThrows) void voidFuncThrows() noexcept { /* implementation */ }\n" - " REACT_METHOD(voidFuncThrows) static void voidFuncThrows() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 13, - "getObjectThrows", - " REACT_SYNC_METHOD(getObjectThrows) ::React::JSValue getObjectThrows(::React::JSValue && arg) noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(getObjectThrows) static ::React::JSValue getObjectThrows(::React::JSValue && arg) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 14, - "promiseThrows", - " REACT_METHOD(promiseThrows) void promiseThrows(::React::ReactPromise &&result) noexcept { /* implementation */ }\n" - " REACT_METHOD(promiseThrows) static void promiseThrows(::React::ReactPromise &&result) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 15, - "voidFuncAssert", - " REACT_METHOD(voidFuncAssert) void voidFuncAssert() noexcept { /* implementation */ }\n" - " REACT_METHOD(voidFuncAssert) static void voidFuncAssert() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 16, - "getObjectAssert", - " REACT_SYNC_METHOD(getObjectAssert) ::React::JSValue getObjectAssert(::React::JSValue && arg) noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(getObjectAssert) static ::React::JSValue getObjectAssert(::React::JSValue && arg) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 17, - "promiseAssert", - " REACT_METHOD(promiseAssert) void promiseAssert(::React::ReactPromise &&result) noexcept { /* implementation */ }\n" - " REACT_METHOD(promiseAssert) static void promiseAssert(::React::ReactPromise &&result) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 18, - "getImageUrl", - " REACT_METHOD(getImageUrl) void getImageUrl(::React::ReactPromise &&result) noexcept { /* implementation */ }\n" - " REACT_METHOD(getImageUrl) static void getImageUrl(::React::ReactPromise &&result) noexcept { /* implementation */ }\n"); - REACT_SHOW_EVENTEMITTER_SPEC_ERRORS( - 19, - "onPress", - " REACT_EVENT(onPress) std::function onPress;\n"); - REACT_SHOW_EVENTEMITTER_SPEC_ERRORS( - 20, - "onClick", - " REACT_EVENT(onClick) std::function onClick;\n"); - REACT_SHOW_EVENTEMITTER_SPEC_ERRORS( - 21, - "onChange", - " REACT_EVENT(onChange) std::function onChange;\n"); - REACT_SHOW_EVENTEMITTER_SPEC_ERRORS( - 22, - "onSubmit", - " REACT_EVENT(onSubmit) std::function)> onSubmit;\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeSegmentFetcherSpec.g.h b/vnext/codegen/NativeSegmentFetcherSpec.g.h deleted file mode 100644 index 437c2ec2733..00000000000 --- a/vnext/codegen/NativeSegmentFetcherSpec.g.h +++ /dev/null @@ -1,41 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - - -struct SegmentFetcherSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - Method>) noexcept>{0, L"fetchSegment"}, - Method, std::optional>) noexcept>{1, L"getSegment"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "fetchSegment", - " REACT_METHOD(fetchSegment) void fetchSegment(double segmentId, ::React::JSValue && options, std::function)> const & callback) noexcept { /* implementation */ }\n" - " REACT_METHOD(fetchSegment) static void fetchSegment(double segmentId, ::React::JSValue && options, std::function)> const & callback) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 1, - "getSegment", - " REACT_METHOD(getSegment) void getSegment(double segmentId, ::React::JSValue && options, std::function, std::optional)> const & callback) noexcept { /* implementation */ }\n" - " REACT_METHOD(getSegment) static void getSegment(double segmentId, ::React::JSValue && options, std::function, std::optional)> const & callback) noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeSettingsManagerSpec.g.h b/vnext/codegen/NativeSettingsManagerSpec.g.h deleted file mode 100644 index e7c95185389..00000000000 --- a/vnext/codegen/NativeSettingsManagerSpec.g.h +++ /dev/null @@ -1,62 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - -struct SettingsManagerSpec_Constants { - ::React::JSValue settings; -}; - - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(SettingsManagerSpec_Constants*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"settings", &SettingsManagerSpec_Constants::settings}, - }; - return fieldMap; -} - -struct SettingsManagerSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto constants = std::tuple{ - TypedConstant{0}, - }; - static constexpr auto methods = std::tuple{ - Method{0, L"setValues"}, - Method) noexcept>{1, L"deleteValues"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto constantCheckResults = CheckConstants(); - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_CONSTANT_SPEC_ERRORS( - 0, - "SettingsManagerSpec_Constants", - " REACT_GET_CONSTANTS(GetConstants) SettingsManagerSpec_Constants GetConstants() noexcept {/*implementation*/}\n" - " REACT_GET_CONSTANTS(GetConstants) static SettingsManagerSpec_Constants GetConstants() noexcept {/*implementation*/}\n"); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "setValues", - " REACT_METHOD(setValues) void setValues(::React::JSValue && values) noexcept { /* implementation */ }\n" - " REACT_METHOD(setValues) static void setValues(::React::JSValue && values) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 1, - "deleteValues", - " REACT_METHOD(deleteValues) void deleteValues(std::vector const & values) noexcept { /* implementation */ }\n" - " REACT_METHOD(deleteValues) static void deleteValues(std::vector const & values) noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeShareModuleSpec.g.h b/vnext/codegen/NativeShareModuleSpec.g.h deleted file mode 100644 index 203924e6799..00000000000 --- a/vnext/codegen/NativeShareModuleSpec.g.h +++ /dev/null @@ -1,59 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - -struct ShareModuleSpec_share_content { - std::optional title; - std::optional message; -}; - -struct ShareModuleSpec_share_returnType { - std::string action; -}; - - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(ShareModuleSpec_share_content*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"title", &ShareModuleSpec_share_content::title}, - {L"message", &ShareModuleSpec_share_content::message}, - }; - return fieldMap; -} - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(ShareModuleSpec_share_returnType*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"action", &ShareModuleSpec_share_returnType::action}, - }; - return fieldMap; -} - -struct ShareModuleSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - Method) noexcept>{0, L"share"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "share", - " REACT_METHOD(share) void share(ShareModuleSpec_share_content && content, std::string dialogTitle, ::React::ReactPromise &&result) noexcept { /* implementation */ }\n" - " REACT_METHOD(share) static void share(ShareModuleSpec_share_content && content, std::string dialogTitle, ::React::ReactPromise &&result) noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeSoundManagerSpec.g.h b/vnext/codegen/NativeSoundManagerSpec.g.h deleted file mode 100644 index 0261a978d41..00000000000 --- a/vnext/codegen/NativeSoundManagerSpec.g.h +++ /dev/null @@ -1,35 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - - -struct SoundManagerSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - Method{0, L"playTouchSound"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "playTouchSound", - " REACT_METHOD(playTouchSound) void playTouchSound() noexcept { /* implementation */ }\n" - " REACT_METHOD(playTouchSound) static void playTouchSound() noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeSourceCodeSpec.g.h b/vnext/codegen/NativeSourceCodeSpec.g.h deleted file mode 100644 index 814ab87ba70..00000000000 --- a/vnext/codegen/NativeSourceCodeSpec.g.h +++ /dev/null @@ -1,42 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - -struct SourceCodeSpec_SourceCodeConstants { - std::string scriptURL; -}; - - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(SourceCodeSpec_SourceCodeConstants*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"scriptURL", &SourceCodeSpec_SourceCodeConstants::scriptURL}, - }; - return fieldMap; -} - -struct SourceCodeSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeStatusBarManagerAndroidSpec.g.h b/vnext/codegen/NativeStatusBarManagerAndroidSpec.g.h deleted file mode 100644 index 1bd4371f002..00000000000 --- a/vnext/codegen/NativeStatusBarManagerAndroidSpec.g.h +++ /dev/null @@ -1,76 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - -struct StatusBarManagerAndroidSpec_Constants { - double HEIGHT; - double DEFAULT_BACKGROUND_COLOR; -}; - - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(StatusBarManagerAndroidSpec_Constants*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"HEIGHT", &StatusBarManagerAndroidSpec_Constants::HEIGHT}, - {L"DEFAULT_BACKGROUND_COLOR", &StatusBarManagerAndroidSpec_Constants::DEFAULT_BACKGROUND_COLOR}, - }; - return fieldMap; -} - -struct StatusBarManagerAndroidSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto constants = std::tuple{ - TypedConstant{0}, - }; - static constexpr auto methods = std::tuple{ - Method{0, L"setColor"}, - Method{1, L"setTranslucent"}, - Method) noexcept>{2, L"setStyle"}, - Method{3, L"setHidden"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto constantCheckResults = CheckConstants(); - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_CONSTANT_SPEC_ERRORS( - 0, - "StatusBarManagerAndroidSpec_Constants", - " REACT_GET_CONSTANTS(GetConstants) StatusBarManagerAndroidSpec_Constants GetConstants() noexcept {/*implementation*/}\n" - " REACT_GET_CONSTANTS(GetConstants) static StatusBarManagerAndroidSpec_Constants GetConstants() noexcept {/*implementation*/}\n"); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "setColor", - " REACT_METHOD(setColor) void setColor(double color, bool animated) noexcept { /* implementation */ }\n" - " REACT_METHOD(setColor) static void setColor(double color, bool animated) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 1, - "setTranslucent", - " REACT_METHOD(setTranslucent) void setTranslucent(bool translucent) noexcept { /* implementation */ }\n" - " REACT_METHOD(setTranslucent) static void setTranslucent(bool translucent) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 2, - "setStyle", - " REACT_METHOD(setStyle) void setStyle(std::optional statusBarStyle) noexcept { /* implementation */ }\n" - " REACT_METHOD(setStyle) static void setStyle(std::optional statusBarStyle) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 3, - "setHidden", - " REACT_METHOD(setHidden) void setHidden(bool hidden) noexcept { /* implementation */ }\n" - " REACT_METHOD(setHidden) static void setHidden(bool hidden) noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeStatusBarManagerIOSSpec.g.h b/vnext/codegen/NativeStatusBarManagerIOSSpec.g.h deleted file mode 100644 index aa643aa9c06..00000000000 --- a/vnext/codegen/NativeStatusBarManagerIOSSpec.g.h +++ /dev/null @@ -1,99 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - -struct StatusBarManagerIOSSpec_getHeight_callback_result { - double height; -}; - -struct StatusBarManagerIOSSpec_Constants { - double HEIGHT; - std::optional DEFAULT_BACKGROUND_COLOR; -}; - - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(StatusBarManagerIOSSpec_getHeight_callback_result*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"height", &StatusBarManagerIOSSpec_getHeight_callback_result::height}, - }; - return fieldMap; -} - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(StatusBarManagerIOSSpec_Constants*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"HEIGHT", &StatusBarManagerIOSSpec_Constants::HEIGHT}, - {L"DEFAULT_BACKGROUND_COLOR", &StatusBarManagerIOSSpec_Constants::DEFAULT_BACKGROUND_COLOR}, - }; - return fieldMap; -} - -struct StatusBarManagerIOSSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto constants = std::tuple{ - TypedConstant{0}, - }; - static constexpr auto methods = std::tuple{ - Method) noexcept>{0, L"getHeight"}, - Method{1, L"setNetworkActivityIndicatorVisible"}, - Method{2, L"addListener"}, - Method{3, L"removeListeners"}, - Method, bool) noexcept>{4, L"setStyle"}, - Method{5, L"setHidden"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto constantCheckResults = CheckConstants(); - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_CONSTANT_SPEC_ERRORS( - 0, - "StatusBarManagerIOSSpec_Constants", - " REACT_GET_CONSTANTS(GetConstants) StatusBarManagerIOSSpec_Constants GetConstants() noexcept {/*implementation*/}\n" - " REACT_GET_CONSTANTS(GetConstants) static StatusBarManagerIOSSpec_Constants GetConstants() noexcept {/*implementation*/}\n"); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "getHeight", - " REACT_METHOD(getHeight) void getHeight(std::function const & callback) noexcept { /* implementation */ }\n" - " REACT_METHOD(getHeight) static void getHeight(std::function const & callback) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 1, - "setNetworkActivityIndicatorVisible", - " REACT_METHOD(setNetworkActivityIndicatorVisible) void setNetworkActivityIndicatorVisible(bool visible) noexcept { /* implementation */ }\n" - " REACT_METHOD(setNetworkActivityIndicatorVisible) static void setNetworkActivityIndicatorVisible(bool visible) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 2, - "addListener", - " REACT_METHOD(addListener) void addListener(std::string eventType) noexcept { /* implementation */ }\n" - " REACT_METHOD(addListener) static void addListener(std::string eventType) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 3, - "removeListeners", - " REACT_METHOD(removeListeners) void removeListeners(double count) noexcept { /* implementation */ }\n" - " REACT_METHOD(removeListeners) static void removeListeners(double count) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 4, - "setStyle", - " REACT_METHOD(setStyle) void setStyle(std::optional statusBarStyle, bool animated) noexcept { /* implementation */ }\n" - " REACT_METHOD(setStyle) static void setStyle(std::optional statusBarStyle, bool animated) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 5, - "setHidden", - " REACT_METHOD(setHidden) void setHidden(bool hidden, std::string withAnimation) noexcept { /* implementation */ }\n" - " REACT_METHOD(setHidden) static void setHidden(bool hidden, std::string withAnimation) noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeTimingSpec.g.h b/vnext/codegen/NativeTimingSpec.g.h deleted file mode 100644 index 8f06e1a7529..00000000000 --- a/vnext/codegen/NativeTimingSpec.g.h +++ /dev/null @@ -1,47 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - - -struct TimingSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - Method{0, L"createTimer"}, - Method{1, L"deleteTimer"}, - Method{2, L"setSendIdleEvents"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "createTimer", - " REACT_METHOD(createTimer) void createTimer(double callbackID, double duration, double jsSchedulingTime, bool repeats) noexcept { /* implementation */ }\n" - " REACT_METHOD(createTimer) static void createTimer(double callbackID, double duration, double jsSchedulingTime, bool repeats) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 1, - "deleteTimer", - " REACT_METHOD(deleteTimer) void deleteTimer(double timerID) noexcept { /* implementation */ }\n" - " REACT_METHOD(deleteTimer) static void deleteTimer(double timerID) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 2, - "setSendIdleEvents", - " REACT_METHOD(setSendIdleEvents) void setSendIdleEvents(bool sendIdleEvents) noexcept { /* implementation */ }\n" - " REACT_METHOD(setSendIdleEvents) static void setSendIdleEvents(bool sendIdleEvents) noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeToastAndroidSpec.g.h b/vnext/codegen/NativeToastAndroidSpec.g.h deleted file mode 100644 index 117aefda153..00000000000 --- a/vnext/codegen/NativeToastAndroidSpec.g.h +++ /dev/null @@ -1,76 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - -struct ToastAndroidSpec_Constants { - double SHORT; - double LONG; - double TOP; - double BOTTOM; - double CENTER; -}; - - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(ToastAndroidSpec_Constants*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"SHORT", &ToastAndroidSpec_Constants::SHORT}, - {L"LONG", &ToastAndroidSpec_Constants::LONG}, - {L"TOP", &ToastAndroidSpec_Constants::TOP}, - {L"BOTTOM", &ToastAndroidSpec_Constants::BOTTOM}, - {L"CENTER", &ToastAndroidSpec_Constants::CENTER}, - }; - return fieldMap; -} - -struct ToastAndroidSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto constants = std::tuple{ - TypedConstant{0}, - }; - static constexpr auto methods = std::tuple{ - Method{0, L"show"}, - Method{1, L"showWithGravity"}, - Method{2, L"showWithGravityAndOffset"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto constantCheckResults = CheckConstants(); - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_CONSTANT_SPEC_ERRORS( - 0, - "ToastAndroidSpec_Constants", - " REACT_GET_CONSTANTS(GetConstants) ToastAndroidSpec_Constants GetConstants() noexcept {/*implementation*/}\n" - " REACT_GET_CONSTANTS(GetConstants) static ToastAndroidSpec_Constants GetConstants() noexcept {/*implementation*/}\n"); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "show", - " REACT_METHOD(show) void show(std::string message, double duration) noexcept { /* implementation */ }\n" - " REACT_METHOD(show) static void show(std::string message, double duration) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 1, - "showWithGravity", - " REACT_METHOD(showWithGravity) void showWithGravity(std::string message, double duration, double gravity) noexcept { /* implementation */ }\n" - " REACT_METHOD(showWithGravity) static void showWithGravity(std::string message, double duration, double gravity) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 2, - "showWithGravityAndOffset", - " REACT_METHOD(showWithGravityAndOffset) void showWithGravityAndOffset(std::string message, double duration, double gravity, double xOffset, double yOffset) noexcept { /* implementation */ }\n" - " REACT_METHOD(showWithGravityAndOffset) static void showWithGravityAndOffset(std::string message, double duration, double gravity, double xOffset, double yOffset) noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeUIManagerSpec.g.h b/vnext/codegen/NativeUIManagerSpec.g.h deleted file mode 100644 index fac3f0be693..00000000000 --- a/vnext/codegen/NativeUIManagerSpec.g.h +++ /dev/null @@ -1,155 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - - -struct UIManagerSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - Method{0, L"createView"}, - Method{1, L"updateView"}, - Method, Callback) noexcept>{2, L"findSubviewIn"}, - Method{3, L"dispatchViewManagerCommand"}, - Method) noexcept>{4, L"measure"}, - Method) noexcept>{5, L"measureInWindow"}, - Method>) noexcept>{6, L"viewIsDescendantOf"}, - Method, Callback) noexcept>{7, L"measureLayout"}, - Method, Callback) noexcept>{8, L"measureLayoutRelativeToParent"}, - Method{9, L"setJSResponder"}, - Method{10, L"clearJSResponder"}, - Method, Callback<::React::JSValue>) noexcept>{11, L"configureNextLayoutAnimation"}, - Method) noexcept>{12, L"setChildren"}, - Method, std::vector, std::vector, std::vector, std::vector) noexcept>{13, L"manageChildren"}, - SyncMethod(std::string) noexcept>{14, L"getConstantsForViewManager"}, - SyncMethod() noexcept>{15, L"getDefaultEventTypes"}, - Method{16, L"setLayoutAnimationEnabledExperimental"}, - Method{17, L"sendAccessibilityEvent"}, - SyncMethod<::React::JSValue(std::string) noexcept>{18, L"lazilyLoadView"}, - Method{19, L"focus"}, - Method{20, L"blur"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "createView", - " REACT_METHOD(createView) void createView(double reactTag, std::string viewName, double rootTag, ::React::JSValue && props) noexcept { /* implementation */ }\n" - " REACT_METHOD(createView) static void createView(double reactTag, std::string viewName, double rootTag, ::React::JSValue && props) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 1, - "updateView", - " REACT_METHOD(updateView) void updateView(double reactTag, std::string viewName, ::React::JSValue && props) noexcept { /* implementation */ }\n" - " REACT_METHOD(updateView) static void updateView(double reactTag, std::string viewName, ::React::JSValue && props) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 2, - "findSubviewIn", - " REACT_METHOD(findSubviewIn) void findSubviewIn(double reactTag, std::vector const & point, std::function const & callback) noexcept { /* implementation */ }\n" - " REACT_METHOD(findSubviewIn) static void findSubviewIn(double reactTag, std::vector const & point, std::function const & callback) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 3, - "dispatchViewManagerCommand", - " REACT_METHOD(dispatchViewManagerCommand) void dispatchViewManagerCommand(double reactTag, double commandID, ::React::JSValueArray && commandArgs) noexcept { /* implementation */ }\n" - " REACT_METHOD(dispatchViewManagerCommand) static void dispatchViewManagerCommand(double reactTag, double commandID, ::React::JSValueArray && commandArgs) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 4, - "measure", - " REACT_METHOD(measure) void measure(double reactTag, std::function const & callback) noexcept { /* implementation */ }\n" - " REACT_METHOD(measure) static void measure(double reactTag, std::function const & callback) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 5, - "measureInWindow", - " REACT_METHOD(measureInWindow) void measureInWindow(double reactTag, std::function const & callback) noexcept { /* implementation */ }\n" - " REACT_METHOD(measureInWindow) static void measureInWindow(double reactTag, std::function const & callback) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 6, - "viewIsDescendantOf", - " REACT_METHOD(viewIsDescendantOf) void viewIsDescendantOf(double reactTag, double ancestorReactTag, std::function const &)> const & callback) noexcept { /* implementation */ }\n" - " REACT_METHOD(viewIsDescendantOf) static void viewIsDescendantOf(double reactTag, double ancestorReactTag, std::function const &)> const & callback) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 7, - "measureLayout", - " REACT_METHOD(measureLayout) void measureLayout(double reactTag, double ancestorReactTag, std::function const & errorCallback, std::function const & callback) noexcept { /* implementation */ }\n" - " REACT_METHOD(measureLayout) static void measureLayout(double reactTag, double ancestorReactTag, std::function const & errorCallback, std::function const & callback) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 8, - "measureLayoutRelativeToParent", - " REACT_METHOD(measureLayoutRelativeToParent) void measureLayoutRelativeToParent(double reactTag, std::function const & errorCallback, std::function const & callback) noexcept { /* implementation */ }\n" - " REACT_METHOD(measureLayoutRelativeToParent) static void measureLayoutRelativeToParent(double reactTag, std::function const & errorCallback, std::function const & callback) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 9, - "setJSResponder", - " REACT_METHOD(setJSResponder) void setJSResponder(double reactTag, bool blockNativeResponder) noexcept { /* implementation */ }\n" - " REACT_METHOD(setJSResponder) static void setJSResponder(double reactTag, bool blockNativeResponder) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 10, - "clearJSResponder", - " REACT_METHOD(clearJSResponder) void clearJSResponder() noexcept { /* implementation */ }\n" - " REACT_METHOD(clearJSResponder) static void clearJSResponder() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 11, - "configureNextLayoutAnimation", - " REACT_METHOD(configureNextLayoutAnimation) void configureNextLayoutAnimation(::React::JSValue && config, std::function const & callback, std::function const & errorCallback) noexcept { /* implementation */ }\n" - " REACT_METHOD(configureNextLayoutAnimation) static void configureNextLayoutAnimation(::React::JSValue && config, std::function const & callback, std::function const & errorCallback) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 12, - "setChildren", - " REACT_METHOD(setChildren) void setChildren(double containerTag, std::vector const & reactTags) noexcept { /* implementation */ }\n" - " REACT_METHOD(setChildren) static void setChildren(double containerTag, std::vector const & reactTags) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 13, - "manageChildren", - " REACT_METHOD(manageChildren) void manageChildren(double containerTag, std::vector const & moveFromIndices, std::vector const & moveToIndices, std::vector const & addChildReactTags, std::vector const & addAtIndices, std::vector const & removeAtIndices) noexcept { /* implementation */ }\n" - " REACT_METHOD(manageChildren) static void manageChildren(double containerTag, std::vector const & moveFromIndices, std::vector const & moveToIndices, std::vector const & addChildReactTags, std::vector const & addAtIndices, std::vector const & removeAtIndices) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 14, - "getConstantsForViewManager", - " REACT_SYNC_METHOD(getConstantsForViewManager) std::optional<::React::JSValue> getConstantsForViewManager(std::string viewManagerName) noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(getConstantsForViewManager) static std::optional<::React::JSValue> getConstantsForViewManager(std::string viewManagerName) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 15, - "getDefaultEventTypes", - " REACT_SYNC_METHOD(getDefaultEventTypes) std::vector getDefaultEventTypes() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(getDefaultEventTypes) static std::vector getDefaultEventTypes() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 16, - "setLayoutAnimationEnabledExperimental", - " REACT_METHOD(setLayoutAnimationEnabledExperimental) void setLayoutAnimationEnabledExperimental(bool enabled) noexcept { /* implementation */ }\n" - " REACT_METHOD(setLayoutAnimationEnabledExperimental) static void setLayoutAnimationEnabledExperimental(bool enabled) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 17, - "sendAccessibilityEvent", - " REACT_METHOD(sendAccessibilityEvent) void sendAccessibilityEvent(double reactTag, double eventType) noexcept { /* implementation */ }\n" - " REACT_METHOD(sendAccessibilityEvent) static void sendAccessibilityEvent(double reactTag, double eventType) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 18, - "lazilyLoadView", - " REACT_SYNC_METHOD(lazilyLoadView) ::React::JSValue lazilyLoadView(std::string name) noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(lazilyLoadView) static ::React::JSValue lazilyLoadView(std::string name) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 19, - "focus", - " REACT_METHOD(focus) void focus(double reactTag) noexcept { /* implementation */ }\n" - " REACT_METHOD(focus) static void focus(double reactTag) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 20, - "blur", - " REACT_METHOD(blur) void blur(double reactTag) noexcept { /* implementation */ }\n" - " REACT_METHOD(blur) static void blur(double reactTag) noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeVibrationSpec.g.h b/vnext/codegen/NativeVibrationSpec.g.h deleted file mode 100644 index 0f62498567b..00000000000 --- a/vnext/codegen/NativeVibrationSpec.g.h +++ /dev/null @@ -1,47 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - - -struct VibrationSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - Method{0, L"vibrate"}, - Method, double) noexcept>{1, L"vibrateByPattern"}, - Method{2, L"cancel"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "vibrate", - " REACT_METHOD(vibrate) void vibrate(double pattern) noexcept { /* implementation */ }\n" - " REACT_METHOD(vibrate) static void vibrate(double pattern) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 1, - "vibrateByPattern", - " REACT_METHOD(vibrateByPattern) void vibrateByPattern(std::vector const & pattern, double repeat) noexcept { /* implementation */ }\n" - " REACT_METHOD(vibrateByPattern) static void vibrateByPattern(std::vector const & pattern, double repeat) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 2, - "cancel", - " REACT_METHOD(cancel) void cancel() noexcept { /* implementation */ }\n" - " REACT_METHOD(cancel) static void cancel() noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeWebSocketModuleSpec.g.h b/vnext/codegen/NativeWebSocketModuleSpec.g.h deleted file mode 100644 index 1e037ea4d15..00000000000 --- a/vnext/codegen/NativeWebSocketModuleSpec.g.h +++ /dev/null @@ -1,82 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - -struct WebSocketModuleSpec_connect_options { - std::optional<::React::JSValue> headers; -}; - - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(WebSocketModuleSpec_connect_options*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"headers", &WebSocketModuleSpec_connect_options::headers}, - }; - return fieldMap; -} - -struct WebSocketModuleSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - Method>, WebSocketModuleSpec_connect_options, double) noexcept>{0, L"connect"}, - Method{1, L"send"}, - Method{2, L"sendBinary"}, - Method{3, L"ping"}, - Method{4, L"close"}, - Method{5, L"addListener"}, - Method{6, L"removeListeners"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "connect", - " REACT_METHOD(connect) void connect(std::string url, std::optional> protocols, WebSocketModuleSpec_connect_options && options, double socketID) noexcept { /* implementation */ }\n" - " REACT_METHOD(connect) static void connect(std::string url, std::optional> protocols, WebSocketModuleSpec_connect_options && options, double socketID) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 1, - "send", - " REACT_METHOD(send) void send(std::string message, double forSocketID) noexcept { /* implementation */ }\n" - " REACT_METHOD(send) static void send(std::string message, double forSocketID) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 2, - "sendBinary", - " REACT_METHOD(sendBinary) void sendBinary(std::string base64String, double forSocketID) noexcept { /* implementation */ }\n" - " REACT_METHOD(sendBinary) static void sendBinary(std::string base64String, double forSocketID) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 3, - "ping", - " REACT_METHOD(ping) void ping(double socketID) noexcept { /* implementation */ }\n" - " REACT_METHOD(ping) static void ping(double socketID) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 4, - "close", - " REACT_METHOD(close) void close(double code, std::string reason, double socketID) noexcept { /* implementation */ }\n" - " REACT_METHOD(close) static void close(double code, std::string reason, double socketID) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 5, - "addListener", - " REACT_METHOD(addListener) void addListener(std::string eventName) noexcept { /* implementation */ }\n" - " REACT_METHOD(addListener) static void addListener(std::string eventName) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 6, - "removeListeners", - " REACT_METHOD(removeListeners) void removeListeners(double count) noexcept { /* implementation */ }\n" - " REACT_METHOD(removeListeners) static void removeListeners(double count) noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/react/components/rnwcore/ActivityIndicatorView.g.h b/vnext/codegen/react/components/rnwcore/ActivityIndicatorView.g.h deleted file mode 100644 index 4f889b70cb1..00000000000 --- a/vnext/codegen/react/components/rnwcore/ActivityIndicatorView.g.h +++ /dev/null @@ -1,212 +0,0 @@ - -/* - * This file is auto-generated from ActivityIndicatorViewNativeComponent spec file in flow / TypeScript. - */ -// clang-format off -#pragma once - -#include - -#ifdef RNW_NEW_ARCH -#include - -#include -#include -#endif // #ifdef RNW_NEW_ARCH - -#ifdef RNW_NEW_ARCH - -namespace Microsoft::ReactNativeSpecs { - -REACT_STRUCT(ActivityIndicatorViewProps) -struct ActivityIndicatorViewProps : winrt::implements { - ActivityIndicatorViewProps(winrt::Microsoft::ReactNative::ViewProps props, const winrt::Microsoft::ReactNative::IComponentProps& cloneFrom) - : ViewProps(props) - { - if (cloneFrom) { - auto cloneFromProps = cloneFrom.as(); - hidesWhenStopped = cloneFromProps->hidesWhenStopped; - animating = cloneFromProps->animating; - color = cloneFromProps->color; - size = cloneFromProps->size; - } - } - - void SetProp(uint32_t hash, winrt::hstring propName, winrt::Microsoft::ReactNative::IJSValueReader value) noexcept { - winrt::Microsoft::ReactNative::ReadProp(hash, propName, value, *this); - } - - REACT_FIELD(hidesWhenStopped) - bool hidesWhenStopped{true}; - - REACT_FIELD(animating) - bool animating{true}; - - REACT_FIELD(color) - winrt::Microsoft::ReactNative::Color color{nullptr}; - - REACT_FIELD(size) - std::optional size; - - const winrt::Microsoft::ReactNative::ViewProps ViewProps; -}; - -struct ActivityIndicatorViewEventEmitter { - ActivityIndicatorViewEventEmitter(const winrt::Microsoft::ReactNative::EventEmitter &eventEmitter) - : m_eventEmitter(eventEmitter) {} - - private: - winrt::Microsoft::ReactNative::EventEmitter m_eventEmitter{nullptr}; -}; - -template -struct BaseActivityIndicatorView { - - virtual void UpdateProps( - const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::com_ptr &newProps, - const winrt::com_ptr &/*oldProps*/) noexcept { - m_props = newProps; - } - - // UpdateLayoutMetrics will only be called if this method is overridden - virtual void UpdateLayoutMetrics( - const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::LayoutMetrics &/*newLayoutMetrics*/, - const winrt::Microsoft::ReactNative::LayoutMetrics &/*oldLayoutMetrics*/) noexcept { - } - - // UpdateState will only be called if this method is overridden - virtual void UpdateState( - const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::IComponentState &/*newState*/) noexcept { - } - - virtual void UpdateEventEmitter(const std::shared_ptr &eventEmitter) noexcept { - m_eventEmitter = eventEmitter; - } - - // MountChildComponentView will only be called if this method is overridden - virtual void MountChildComponentView(const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::MountChildComponentViewArgs &/*args*/) noexcept { - } - - // UnmountChildComponentView will only be called if this method is overridden - virtual void UnmountChildComponentView(const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::UnmountChildComponentViewArgs &/*args*/) noexcept { - } - - // Initialize will only be called if this method is overridden - virtual void Initialize(const winrt::Microsoft::ReactNative::ComponentView &/*view*/) noexcept { - } - - // CreateVisual will only be called if this method is overridden - virtual winrt::Microsoft::UI::Composition::Visual CreateVisual(const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { - return view.as().Compositor().CreateSpriteVisual(); - } - - // FinalizeUpdate will only be called if this method is overridden - virtual void FinalizeUpdate(const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - winrt::Microsoft::ReactNative::ComponentViewUpdateMask /*mask*/) noexcept { - } - - - - const std::shared_ptr& EventEmitter() const { return m_eventEmitter; } - const winrt::com_ptr& Props() const { return m_props; } - -private: - winrt::com_ptr m_props; - std::shared_ptr m_eventEmitter; -}; - -template -void RegisterActivityIndicatorViewNativeComponent( - winrt::Microsoft::ReactNative::IReactPackageBuilder const &packageBuilder, - std::function builderCallback) noexcept { - packageBuilder.as().AddViewComponent( - L"ActivityIndicatorView", [builderCallback](winrt::Microsoft::ReactNative::IReactViewComponentBuilder const &builder) noexcept { - auto compBuilder = builder.as(); - - builder.SetCreateProps([](winrt::Microsoft::ReactNative::ViewProps props, - const winrt::Microsoft::ReactNative::IComponentProps& cloneFrom) noexcept { - return winrt::make(props, cloneFrom); - }); - - builder.SetUpdatePropsHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::IComponentProps &newProps, - const winrt::Microsoft::ReactNative::IComponentProps &oldProps) noexcept { - auto userData = view.UserData().as(); - userData->UpdateProps(view, newProps ? newProps.as() : nullptr, oldProps ? oldProps.as() : nullptr); - }); - - compBuilder.SetUpdateLayoutMetricsHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::LayoutMetrics &newLayoutMetrics, - const winrt::Microsoft::ReactNative::LayoutMetrics &oldLayoutMetrics) noexcept { - auto userData = view.UserData().as(); - userData->UpdateLayoutMetrics(view, newLayoutMetrics, oldLayoutMetrics); - }); - - builder.SetUpdateEventEmitterHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::EventEmitter &eventEmitter) noexcept { - auto userData = view.UserData().as(); - userData->UpdateEventEmitter(std::make_shared(eventEmitter)); - }); - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::FinalizeUpdate != &BaseActivityIndicatorView::FinalizeUpdate) { - builder.SetFinalizeUpdateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - winrt::Microsoft::ReactNative::ComponentViewUpdateMask mask) noexcept { - auto userData = view.UserData().as(); - userData->FinalizeUpdate(view, mask); - }); - } - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UpdateState != &BaseActivityIndicatorView::UpdateState) { - builder.SetUpdateStateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::IComponentState &newState) noexcept { - auto userData = view.UserData().as(); - userData->UpdateState(view, newState); - }); - } - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::MountChildComponentView != &BaseActivityIndicatorView::MountChildComponentView) { - builder.SetMountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::MountChildComponentViewArgs &args) noexcept { - auto userData = view.UserData().as(); - return userData->MountChildComponentView(view, args); - }); - } - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UnmountChildComponentView != &BaseActivityIndicatorView::UnmountChildComponentView) { - builder.SetUnmountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::UnmountChildComponentViewArgs &args) noexcept { - auto userData = view.UserData().as(); - return userData->UnmountChildComponentView(view, args); - }); - } - - compBuilder.SetViewComponentViewInitializer([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { - auto userData = winrt::make_self(); - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::Initialize != &BaseActivityIndicatorView::Initialize) { - userData->Initialize(view); - } - view.UserData(*userData); - }); - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::CreateVisual != &BaseActivityIndicatorView::CreateVisual) { - compBuilder.SetCreateVisualHandler([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { - auto userData = view.UserData().as(); - return userData->CreateVisual(view); - }); - } - - // Allow app to further customize the builder - if (builderCallback) { - builderCallback(compBuilder); - } - }); -} - -} // namespace Microsoft::ReactNativeSpecs - -#endif // #ifdef RNW_NEW_ARCH diff --git a/vnext/codegen/react/components/rnwcore/AndroidDrawerLayout.g.h b/vnext/codegen/react/components/rnwcore/AndroidDrawerLayout.g.h deleted file mode 100644 index 60f6327eaa7..00000000000 --- a/vnext/codegen/react/components/rnwcore/AndroidDrawerLayout.g.h +++ /dev/null @@ -1,295 +0,0 @@ - -/* - * This file is auto-generated from AndroidDrawerLayoutNativeComponent spec file in flow / TypeScript. - */ -// clang-format off -#pragma once - -#include - -#ifdef RNW_NEW_ARCH -#include - -#include -#include -#endif // #ifdef RNW_NEW_ARCH - -#ifdef RNW_NEW_ARCH - -namespace Microsoft::ReactNativeSpecs { - -REACT_STRUCT(AndroidDrawerLayoutProps) -struct AndroidDrawerLayoutProps : winrt::implements { - AndroidDrawerLayoutProps(winrt::Microsoft::ReactNative::ViewProps props, const winrt::Microsoft::ReactNative::IComponentProps& cloneFrom) - : ViewProps(props) - { - if (cloneFrom) { - auto cloneFromProps = cloneFrom.as(); - keyboardDismissMode = cloneFromProps->keyboardDismissMode; - drawerBackgroundColor = cloneFromProps->drawerBackgroundColor; - drawerPosition = cloneFromProps->drawerPosition; - drawerWidth = cloneFromProps->drawerWidth; - drawerLockMode = cloneFromProps->drawerLockMode; - statusBarBackgroundColor = cloneFromProps->statusBarBackgroundColor; - } - } - - void SetProp(uint32_t hash, winrt::hstring propName, winrt::Microsoft::ReactNative::IJSValueReader value) noexcept { - winrt::Microsoft::ReactNative::ReadProp(hash, propName, value, *this); - } - - REACT_FIELD(keyboardDismissMode) - std::optional keyboardDismissMode; - - REACT_FIELD(drawerBackgroundColor) - winrt::Microsoft::ReactNative::Color drawerBackgroundColor{nullptr}; - - REACT_FIELD(drawerPosition) - std::optional drawerPosition; - - REACT_FIELD(drawerWidth) - std::optional drawerWidth{}; - - REACT_FIELD(drawerLockMode) - std::optional drawerLockMode; - - REACT_FIELD(statusBarBackgroundColor) - winrt::Microsoft::ReactNative::Color statusBarBackgroundColor{nullptr}; - - const winrt::Microsoft::ReactNative::ViewProps ViewProps; -}; - -REACT_STRUCT(AndroidDrawerLayout_OnDrawerSlide) -struct AndroidDrawerLayout_OnDrawerSlide { - REACT_FIELD(offset) - float offset{}; -}; - -REACT_STRUCT(AndroidDrawerLayout_OnDrawerStateChanged) -struct AndroidDrawerLayout_OnDrawerStateChanged { - REACT_FIELD(drawerState) - int32_t drawerState{}; -}; - -REACT_STRUCT(AndroidDrawerLayout_OnDrawerOpen) -struct AndroidDrawerLayout_OnDrawerOpen { -}; - -REACT_STRUCT(AndroidDrawerLayout_OnDrawerClose) -struct AndroidDrawerLayout_OnDrawerClose { -}; - -struct AndroidDrawerLayoutEventEmitter { - AndroidDrawerLayoutEventEmitter(const winrt::Microsoft::ReactNative::EventEmitter &eventEmitter) - : m_eventEmitter(eventEmitter) {} - - using OnDrawerSlide = AndroidDrawerLayout_OnDrawerSlide; - using OnDrawerStateChanged = AndroidDrawerLayout_OnDrawerStateChanged; - using OnDrawerOpen = AndroidDrawerLayout_OnDrawerOpen; - using OnDrawerClose = AndroidDrawerLayout_OnDrawerClose; - - void onDrawerSlide(OnDrawerSlide &value) const { - m_eventEmitter.DispatchEvent(L"drawerSlide", [value](const winrt::Microsoft::ReactNative::IJSValueWriter writer) { - winrt::Microsoft::ReactNative::WriteValue(writer, value); - }); - } - - void onDrawerStateChanged(OnDrawerStateChanged &value) const { - m_eventEmitter.DispatchEvent(L"drawerStateChanged", [value](const winrt::Microsoft::ReactNative::IJSValueWriter writer) { - winrt::Microsoft::ReactNative::WriteValue(writer, value); - }); - } - - void onDrawerOpen(OnDrawerOpen &value) const { - m_eventEmitter.DispatchEvent(L"drawerOpen", [value](const winrt::Microsoft::ReactNative::IJSValueWriter writer) { - winrt::Microsoft::ReactNative::WriteValue(writer, value); - }); - } - - void onDrawerClose(OnDrawerClose &value) const { - m_eventEmitter.DispatchEvent(L"drawerClose", [value](const winrt::Microsoft::ReactNative::IJSValueWriter writer) { - winrt::Microsoft::ReactNative::WriteValue(writer, value); - }); - } - - private: - winrt::Microsoft::ReactNative::EventEmitter m_eventEmitter{nullptr}; -}; - -template -struct BaseAndroidDrawerLayout { - - virtual void UpdateProps( - const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::com_ptr &newProps, - const winrt::com_ptr &/*oldProps*/) noexcept { - m_props = newProps; - } - - // UpdateLayoutMetrics will only be called if this method is overridden - virtual void UpdateLayoutMetrics( - const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::LayoutMetrics &/*newLayoutMetrics*/, - const winrt::Microsoft::ReactNative::LayoutMetrics &/*oldLayoutMetrics*/) noexcept { - } - - // UpdateState will only be called if this method is overridden - virtual void UpdateState( - const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::IComponentState &/*newState*/) noexcept { - } - - virtual void UpdateEventEmitter(const std::shared_ptr &eventEmitter) noexcept { - m_eventEmitter = eventEmitter; - } - - // MountChildComponentView will only be called if this method is overridden - virtual void MountChildComponentView(const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::MountChildComponentViewArgs &/*args*/) noexcept { - } - - // UnmountChildComponentView will only be called if this method is overridden - virtual void UnmountChildComponentView(const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::UnmountChildComponentViewArgs &/*args*/) noexcept { - } - - // Initialize will only be called if this method is overridden - virtual void Initialize(const winrt::Microsoft::ReactNative::ComponentView &/*view*/) noexcept { - } - - // CreateVisual will only be called if this method is overridden - virtual winrt::Microsoft::UI::Composition::Visual CreateVisual(const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { - return view.as().Compositor().CreateSpriteVisual(); - } - - // FinalizeUpdate will only be called if this method is overridden - virtual void FinalizeUpdate(const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - winrt::Microsoft::ReactNative::ComponentViewUpdateMask /*mask*/) noexcept { - } - - // You must provide an implementation of this method to handle the "openDrawer" command - virtual void HandleOpenDrawerCommand() noexcept = 0; - - // You must provide an implementation of this method to handle the "closeDrawer" command - virtual void HandleCloseDrawerCommand() noexcept = 0; - - void HandleCommand(const winrt::Microsoft::ReactNative::ComponentView &view, const winrt::Microsoft::ReactNative::HandleCommandArgs& args) noexcept { - auto userData = view.UserData().as(); - auto commandName = args.CommandName(); - if (commandName == L"openDrawer") { - - userData->HandleOpenDrawerCommand(); - return; - } - - if (commandName == L"closeDrawer") { - - userData->HandleCloseDrawerCommand(); - return; - } - } - - const std::shared_ptr& EventEmitter() const { return m_eventEmitter; } - const winrt::com_ptr& Props() const { return m_props; } - -private: - winrt::com_ptr m_props; - std::shared_ptr m_eventEmitter; -}; - -template -void RegisterAndroidDrawerLayoutNativeComponent( - winrt::Microsoft::ReactNative::IReactPackageBuilder const &packageBuilder, - std::function builderCallback) noexcept { - packageBuilder.as().AddViewComponent( - L"AndroidDrawerLayout", [builderCallback](winrt::Microsoft::ReactNative::IReactViewComponentBuilder const &builder) noexcept { - auto compBuilder = builder.as(); - - builder.SetCreateProps([](winrt::Microsoft::ReactNative::ViewProps props, - const winrt::Microsoft::ReactNative::IComponentProps& cloneFrom) noexcept { - return winrt::make(props, cloneFrom); - }); - - builder.SetUpdatePropsHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::IComponentProps &newProps, - const winrt::Microsoft::ReactNative::IComponentProps &oldProps) noexcept { - auto userData = view.UserData().as(); - userData->UpdateProps(view, newProps ? newProps.as() : nullptr, oldProps ? oldProps.as() : nullptr); - }); - - compBuilder.SetUpdateLayoutMetricsHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::LayoutMetrics &newLayoutMetrics, - const winrt::Microsoft::ReactNative::LayoutMetrics &oldLayoutMetrics) noexcept { - auto userData = view.UserData().as(); - userData->UpdateLayoutMetrics(view, newLayoutMetrics, oldLayoutMetrics); - }); - - builder.SetUpdateEventEmitterHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::EventEmitter &eventEmitter) noexcept { - auto userData = view.UserData().as(); - userData->UpdateEventEmitter(std::make_shared(eventEmitter)); - }); - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::FinalizeUpdate != &BaseAndroidDrawerLayout::FinalizeUpdate) { - builder.SetFinalizeUpdateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - winrt::Microsoft::ReactNative::ComponentViewUpdateMask mask) noexcept { - auto userData = view.UserData().as(); - userData->FinalizeUpdate(view, mask); - }); - } - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UpdateState != &BaseAndroidDrawerLayout::UpdateState) { - builder.SetUpdateStateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::IComponentState &newState) noexcept { - auto userData = view.UserData().as(); - userData->UpdateState(view, newState); - }); - } - - builder.SetCustomCommandHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::HandleCommandArgs& args) noexcept { - auto userData = view.UserData().as(); - userData->HandleCommand(view, args); - }); - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::MountChildComponentView != &BaseAndroidDrawerLayout::MountChildComponentView) { - builder.SetMountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::MountChildComponentViewArgs &args) noexcept { - auto userData = view.UserData().as(); - return userData->MountChildComponentView(view, args); - }); - } - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UnmountChildComponentView != &BaseAndroidDrawerLayout::UnmountChildComponentView) { - builder.SetUnmountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::UnmountChildComponentViewArgs &args) noexcept { - auto userData = view.UserData().as(); - return userData->UnmountChildComponentView(view, args); - }); - } - - compBuilder.SetViewComponentViewInitializer([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { - auto userData = winrt::make_self(); - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::Initialize != &BaseAndroidDrawerLayout::Initialize) { - userData->Initialize(view); - } - view.UserData(*userData); - }); - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::CreateVisual != &BaseAndroidDrawerLayout::CreateVisual) { - compBuilder.SetCreateVisualHandler([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { - auto userData = view.UserData().as(); - return userData->CreateVisual(view); - }); - } - - // Allow app to further customize the builder - if (builderCallback) { - builderCallback(compBuilder); - } - }); -} - -} // namespace Microsoft::ReactNativeSpecs - -#endif // #ifdef RNW_NEW_ARCH diff --git a/vnext/codegen/react/components/rnwcore/AndroidHorizontalScrollContentView.g.h b/vnext/codegen/react/components/rnwcore/AndroidHorizontalScrollContentView.g.h deleted file mode 100644 index 2162299f622..00000000000 --- a/vnext/codegen/react/components/rnwcore/AndroidHorizontalScrollContentView.g.h +++ /dev/null @@ -1,200 +0,0 @@ - -/* - * This file is auto-generated from AndroidHorizontalScrollContentViewNativeComponent spec file in flow / TypeScript. - */ -// clang-format off -#pragma once - -#include - -#ifdef RNW_NEW_ARCH -#include - -#include -#include -#endif // #ifdef RNW_NEW_ARCH - -#ifdef RNW_NEW_ARCH - -namespace Microsoft::ReactNativeSpecs { - -REACT_STRUCT(AndroidHorizontalScrollContentViewProps) -struct AndroidHorizontalScrollContentViewProps : winrt::implements { - AndroidHorizontalScrollContentViewProps(winrt::Microsoft::ReactNative::ViewProps props, const winrt::Microsoft::ReactNative::IComponentProps& cloneFrom) - : ViewProps(props) - { - if (cloneFrom) { - auto cloneFromProps = cloneFrom.as(); - removeClippedSubviews = cloneFromProps->removeClippedSubviews; - } - } - - void SetProp(uint32_t hash, winrt::hstring propName, winrt::Microsoft::ReactNative::IJSValueReader value) noexcept { - winrt::Microsoft::ReactNative::ReadProp(hash, propName, value, *this); - } - - REACT_FIELD(removeClippedSubviews) - std::optional removeClippedSubviews{}; - - const winrt::Microsoft::ReactNative::ViewProps ViewProps; -}; - -struct AndroidHorizontalScrollContentViewEventEmitter { - AndroidHorizontalScrollContentViewEventEmitter(const winrt::Microsoft::ReactNative::EventEmitter &eventEmitter) - : m_eventEmitter(eventEmitter) {} - - private: - winrt::Microsoft::ReactNative::EventEmitter m_eventEmitter{nullptr}; -}; - -template -struct BaseAndroidHorizontalScrollContentView { - - virtual void UpdateProps( - const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::com_ptr &newProps, - const winrt::com_ptr &/*oldProps*/) noexcept { - m_props = newProps; - } - - // UpdateLayoutMetrics will only be called if this method is overridden - virtual void UpdateLayoutMetrics( - const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::LayoutMetrics &/*newLayoutMetrics*/, - const winrt::Microsoft::ReactNative::LayoutMetrics &/*oldLayoutMetrics*/) noexcept { - } - - // UpdateState will only be called if this method is overridden - virtual void UpdateState( - const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::IComponentState &/*newState*/) noexcept { - } - - virtual void UpdateEventEmitter(const std::shared_ptr &eventEmitter) noexcept { - m_eventEmitter = eventEmitter; - } - - // MountChildComponentView will only be called if this method is overridden - virtual void MountChildComponentView(const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::MountChildComponentViewArgs &/*args*/) noexcept { - } - - // UnmountChildComponentView will only be called if this method is overridden - virtual void UnmountChildComponentView(const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::UnmountChildComponentViewArgs &/*args*/) noexcept { - } - - // Initialize will only be called if this method is overridden - virtual void Initialize(const winrt::Microsoft::ReactNative::ComponentView &/*view*/) noexcept { - } - - // CreateVisual will only be called if this method is overridden - virtual winrt::Microsoft::UI::Composition::Visual CreateVisual(const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { - return view.as().Compositor().CreateSpriteVisual(); - } - - // FinalizeUpdate will only be called if this method is overridden - virtual void FinalizeUpdate(const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - winrt::Microsoft::ReactNative::ComponentViewUpdateMask /*mask*/) noexcept { - } - - - - const std::shared_ptr& EventEmitter() const { return m_eventEmitter; } - const winrt::com_ptr& Props() const { return m_props; } - -private: - winrt::com_ptr m_props; - std::shared_ptr m_eventEmitter; -}; - -template -void RegisterAndroidHorizontalScrollContentViewNativeComponent( - winrt::Microsoft::ReactNative::IReactPackageBuilder const &packageBuilder, - std::function builderCallback) noexcept { - packageBuilder.as().AddViewComponent( - L"AndroidHorizontalScrollContentView", [builderCallback](winrt::Microsoft::ReactNative::IReactViewComponentBuilder const &builder) noexcept { - auto compBuilder = builder.as(); - - builder.SetCreateProps([](winrt::Microsoft::ReactNative::ViewProps props, - const winrt::Microsoft::ReactNative::IComponentProps& cloneFrom) noexcept { - return winrt::make(props, cloneFrom); - }); - - builder.SetUpdatePropsHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::IComponentProps &newProps, - const winrt::Microsoft::ReactNative::IComponentProps &oldProps) noexcept { - auto userData = view.UserData().as(); - userData->UpdateProps(view, newProps ? newProps.as() : nullptr, oldProps ? oldProps.as() : nullptr); - }); - - compBuilder.SetUpdateLayoutMetricsHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::LayoutMetrics &newLayoutMetrics, - const winrt::Microsoft::ReactNative::LayoutMetrics &oldLayoutMetrics) noexcept { - auto userData = view.UserData().as(); - userData->UpdateLayoutMetrics(view, newLayoutMetrics, oldLayoutMetrics); - }); - - builder.SetUpdateEventEmitterHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::EventEmitter &eventEmitter) noexcept { - auto userData = view.UserData().as(); - userData->UpdateEventEmitter(std::make_shared(eventEmitter)); - }); - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::FinalizeUpdate != &BaseAndroidHorizontalScrollContentView::FinalizeUpdate) { - builder.SetFinalizeUpdateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - winrt::Microsoft::ReactNative::ComponentViewUpdateMask mask) noexcept { - auto userData = view.UserData().as(); - userData->FinalizeUpdate(view, mask); - }); - } - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UpdateState != &BaseAndroidHorizontalScrollContentView::UpdateState) { - builder.SetUpdateStateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::IComponentState &newState) noexcept { - auto userData = view.UserData().as(); - userData->UpdateState(view, newState); - }); - } - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::MountChildComponentView != &BaseAndroidHorizontalScrollContentView::MountChildComponentView) { - builder.SetMountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::MountChildComponentViewArgs &args) noexcept { - auto userData = view.UserData().as(); - return userData->MountChildComponentView(view, args); - }); - } - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UnmountChildComponentView != &BaseAndroidHorizontalScrollContentView::UnmountChildComponentView) { - builder.SetUnmountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::UnmountChildComponentViewArgs &args) noexcept { - auto userData = view.UserData().as(); - return userData->UnmountChildComponentView(view, args); - }); - } - - compBuilder.SetViewComponentViewInitializer([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { - auto userData = winrt::make_self(); - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::Initialize != &BaseAndroidHorizontalScrollContentView::Initialize) { - userData->Initialize(view); - } - view.UserData(*userData); - }); - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::CreateVisual != &BaseAndroidHorizontalScrollContentView::CreateVisual) { - compBuilder.SetCreateVisualHandler([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { - auto userData = view.UserData().as(); - return userData->CreateVisual(view); - }); - } - - // Allow app to further customize the builder - if (builderCallback) { - builderCallback(compBuilder); - } - }); -} - -} // namespace Microsoft::ReactNativeSpecs - -#endif // #ifdef RNW_NEW_ARCH diff --git a/vnext/codegen/react/components/rnwcore/AndroidProgressBar.g.h b/vnext/codegen/react/components/rnwcore/AndroidProgressBar.g.h deleted file mode 100644 index 98c0b14197f..00000000000 --- a/vnext/codegen/react/components/rnwcore/AndroidProgressBar.g.h +++ /dev/null @@ -1,224 +0,0 @@ - -/* - * This file is auto-generated from AndroidProgressBarNativeComponent spec file in flow / TypeScript. - */ -// clang-format off -#pragma once - -#include - -#ifdef RNW_NEW_ARCH -#include - -#include -#include -#endif // #ifdef RNW_NEW_ARCH - -#ifdef RNW_NEW_ARCH - -namespace Microsoft::ReactNativeSpecs { - -REACT_STRUCT(AndroidProgressBarProps) -struct AndroidProgressBarProps : winrt::implements { - AndroidProgressBarProps(winrt::Microsoft::ReactNative::ViewProps props, const winrt::Microsoft::ReactNative::IComponentProps& cloneFrom) - : ViewProps(props) - { - if (cloneFrom) { - auto cloneFromProps = cloneFrom.as(); - styleAttr = cloneFromProps->styleAttr; - typeAttr = cloneFromProps->typeAttr; - indeterminate = cloneFromProps->indeterminate; - progress = cloneFromProps->progress; - animating = cloneFromProps->animating; - color = cloneFromProps->color; - testID = cloneFromProps->testID; - } - } - - void SetProp(uint32_t hash, winrt::hstring propName, winrt::Microsoft::ReactNative::IJSValueReader value) noexcept { - winrt::Microsoft::ReactNative::ReadProp(hash, propName, value, *this); - } - - REACT_FIELD(styleAttr) - std::optional styleAttr; - - REACT_FIELD(typeAttr) - std::optional typeAttr; - - REACT_FIELD(indeterminate) - bool indeterminate{}; - - REACT_FIELD(progress) - std::optional progress{}; - - REACT_FIELD(animating) - bool animating{true}; - - REACT_FIELD(color) - winrt::Microsoft::ReactNative::Color color{nullptr}; - - REACT_FIELD(testID) - std::optional testID; - - const winrt::Microsoft::ReactNative::ViewProps ViewProps; -}; - -struct AndroidProgressBarEventEmitter { - AndroidProgressBarEventEmitter(const winrt::Microsoft::ReactNative::EventEmitter &eventEmitter) - : m_eventEmitter(eventEmitter) {} - - private: - winrt::Microsoft::ReactNative::EventEmitter m_eventEmitter{nullptr}; -}; - -template -struct BaseAndroidProgressBar { - - virtual void UpdateProps( - const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::com_ptr &newProps, - const winrt::com_ptr &/*oldProps*/) noexcept { - m_props = newProps; - } - - // UpdateLayoutMetrics will only be called if this method is overridden - virtual void UpdateLayoutMetrics( - const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::LayoutMetrics &/*newLayoutMetrics*/, - const winrt::Microsoft::ReactNative::LayoutMetrics &/*oldLayoutMetrics*/) noexcept { - } - - // UpdateState will only be called if this method is overridden - virtual void UpdateState( - const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::IComponentState &/*newState*/) noexcept { - } - - virtual void UpdateEventEmitter(const std::shared_ptr &eventEmitter) noexcept { - m_eventEmitter = eventEmitter; - } - - // MountChildComponentView will only be called if this method is overridden - virtual void MountChildComponentView(const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::MountChildComponentViewArgs &/*args*/) noexcept { - } - - // UnmountChildComponentView will only be called if this method is overridden - virtual void UnmountChildComponentView(const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::UnmountChildComponentViewArgs &/*args*/) noexcept { - } - - // Initialize will only be called if this method is overridden - virtual void Initialize(const winrt::Microsoft::ReactNative::ComponentView &/*view*/) noexcept { - } - - // CreateVisual will only be called if this method is overridden - virtual winrt::Microsoft::UI::Composition::Visual CreateVisual(const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { - return view.as().Compositor().CreateSpriteVisual(); - } - - // FinalizeUpdate will only be called if this method is overridden - virtual void FinalizeUpdate(const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - winrt::Microsoft::ReactNative::ComponentViewUpdateMask /*mask*/) noexcept { - } - - - - const std::shared_ptr& EventEmitter() const { return m_eventEmitter; } - const winrt::com_ptr& Props() const { return m_props; } - -private: - winrt::com_ptr m_props; - std::shared_ptr m_eventEmitter; -}; - -template -void RegisterAndroidProgressBarNativeComponent( - winrt::Microsoft::ReactNative::IReactPackageBuilder const &packageBuilder, - std::function builderCallback) noexcept { - packageBuilder.as().AddViewComponent( - L"AndroidProgressBar", [builderCallback](winrt::Microsoft::ReactNative::IReactViewComponentBuilder const &builder) noexcept { - auto compBuilder = builder.as(); - - builder.SetCreateProps([](winrt::Microsoft::ReactNative::ViewProps props, - const winrt::Microsoft::ReactNative::IComponentProps& cloneFrom) noexcept { - return winrt::make(props, cloneFrom); - }); - - builder.SetUpdatePropsHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::IComponentProps &newProps, - const winrt::Microsoft::ReactNative::IComponentProps &oldProps) noexcept { - auto userData = view.UserData().as(); - userData->UpdateProps(view, newProps ? newProps.as() : nullptr, oldProps ? oldProps.as() : nullptr); - }); - - compBuilder.SetUpdateLayoutMetricsHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::LayoutMetrics &newLayoutMetrics, - const winrt::Microsoft::ReactNative::LayoutMetrics &oldLayoutMetrics) noexcept { - auto userData = view.UserData().as(); - userData->UpdateLayoutMetrics(view, newLayoutMetrics, oldLayoutMetrics); - }); - - builder.SetUpdateEventEmitterHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::EventEmitter &eventEmitter) noexcept { - auto userData = view.UserData().as(); - userData->UpdateEventEmitter(std::make_shared(eventEmitter)); - }); - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::FinalizeUpdate != &BaseAndroidProgressBar::FinalizeUpdate) { - builder.SetFinalizeUpdateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - winrt::Microsoft::ReactNative::ComponentViewUpdateMask mask) noexcept { - auto userData = view.UserData().as(); - userData->FinalizeUpdate(view, mask); - }); - } - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UpdateState != &BaseAndroidProgressBar::UpdateState) { - builder.SetUpdateStateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::IComponentState &newState) noexcept { - auto userData = view.UserData().as(); - userData->UpdateState(view, newState); - }); - } - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::MountChildComponentView != &BaseAndroidProgressBar::MountChildComponentView) { - builder.SetMountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::MountChildComponentViewArgs &args) noexcept { - auto userData = view.UserData().as(); - return userData->MountChildComponentView(view, args); - }); - } - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UnmountChildComponentView != &BaseAndroidProgressBar::UnmountChildComponentView) { - builder.SetUnmountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::UnmountChildComponentViewArgs &args) noexcept { - auto userData = view.UserData().as(); - return userData->UnmountChildComponentView(view, args); - }); - } - - compBuilder.SetViewComponentViewInitializer([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { - auto userData = winrt::make_self(); - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::Initialize != &BaseAndroidProgressBar::Initialize) { - userData->Initialize(view); - } - view.UserData(*userData); - }); - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::CreateVisual != &BaseAndroidProgressBar::CreateVisual) { - compBuilder.SetCreateVisualHandler([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { - auto userData = view.UserData().as(); - return userData->CreateVisual(view); - }); - } - - // Allow app to further customize the builder - if (builderCallback) { - builderCallback(compBuilder); - } - }); -} - -} // namespace Microsoft::ReactNativeSpecs - -#endif // #ifdef RNW_NEW_ARCH diff --git a/vnext/codegen/react/components/rnwcore/AndroidSwipeRefreshLayout.g.h b/vnext/codegen/react/components/rnwcore/AndroidSwipeRefreshLayout.g.h deleted file mode 100644 index 6d149d8fd67..00000000000 --- a/vnext/codegen/react/components/rnwcore/AndroidSwipeRefreshLayout.g.h +++ /dev/null @@ -1,250 +0,0 @@ - -/* - * This file is auto-generated from AndroidSwipeRefreshLayoutNativeComponent spec file in flow / TypeScript. - */ -// clang-format off -#pragma once - -#include - -#ifdef RNW_NEW_ARCH -#include - -#include -#include -#endif // #ifdef RNW_NEW_ARCH - -#ifdef RNW_NEW_ARCH - -namespace Microsoft::ReactNativeSpecs { - -REACT_STRUCT(AndroidSwipeRefreshLayoutProps) -struct AndroidSwipeRefreshLayoutProps : winrt::implements { - AndroidSwipeRefreshLayoutProps(winrt::Microsoft::ReactNative::ViewProps props, const winrt::Microsoft::ReactNative::IComponentProps& cloneFrom) - : ViewProps(props) - { - if (cloneFrom) { - auto cloneFromProps = cloneFrom.as(); - enabled = cloneFromProps->enabled; - colors = cloneFromProps->colors; - progressBackgroundColor = cloneFromProps->progressBackgroundColor; - size = cloneFromProps->size; - progressViewOffset = cloneFromProps->progressViewOffset; - refreshing = cloneFromProps->refreshing; - } - } - - void SetProp(uint32_t hash, winrt::hstring propName, winrt::Microsoft::ReactNative::IJSValueReader value) noexcept { - winrt::Microsoft::ReactNative::ReadProp(hash, propName, value, *this); - } - - REACT_FIELD(enabled) - bool enabled{true}; - - REACT_FIELD(colors) - std::optional> colors; - - REACT_FIELD(progressBackgroundColor) - winrt::Microsoft::ReactNative::Color progressBackgroundColor{nullptr}; - - REACT_FIELD(size) - std::optional size; - - REACT_FIELD(progressViewOffset) - std::optional progressViewOffset{}; - - REACT_FIELD(refreshing) - bool refreshing{}; - - const winrt::Microsoft::ReactNative::ViewProps ViewProps; -}; - -REACT_STRUCT(AndroidSwipeRefreshLayout_OnRefresh) -struct AndroidSwipeRefreshLayout_OnRefresh { -}; - -struct AndroidSwipeRefreshLayoutEventEmitter { - AndroidSwipeRefreshLayoutEventEmitter(const winrt::Microsoft::ReactNative::EventEmitter &eventEmitter) - : m_eventEmitter(eventEmitter) {} - - using OnRefresh = AndroidSwipeRefreshLayout_OnRefresh; - - void onRefresh(OnRefresh &value) const { - m_eventEmitter.DispatchEvent(L"refresh", [value](const winrt::Microsoft::ReactNative::IJSValueWriter writer) { - winrt::Microsoft::ReactNative::WriteValue(writer, value); - }); - } - - private: - winrt::Microsoft::ReactNative::EventEmitter m_eventEmitter{nullptr}; -}; - -template -struct BaseAndroidSwipeRefreshLayout { - - virtual void UpdateProps( - const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::com_ptr &newProps, - const winrt::com_ptr &/*oldProps*/) noexcept { - m_props = newProps; - } - - // UpdateLayoutMetrics will only be called if this method is overridden - virtual void UpdateLayoutMetrics( - const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::LayoutMetrics &/*newLayoutMetrics*/, - const winrt::Microsoft::ReactNative::LayoutMetrics &/*oldLayoutMetrics*/) noexcept { - } - - // UpdateState will only be called if this method is overridden - virtual void UpdateState( - const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::IComponentState &/*newState*/) noexcept { - } - - virtual void UpdateEventEmitter(const std::shared_ptr &eventEmitter) noexcept { - m_eventEmitter = eventEmitter; - } - - // MountChildComponentView will only be called if this method is overridden - virtual void MountChildComponentView(const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::MountChildComponentViewArgs &/*args*/) noexcept { - } - - // UnmountChildComponentView will only be called if this method is overridden - virtual void UnmountChildComponentView(const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::UnmountChildComponentViewArgs &/*args*/) noexcept { - } - - // Initialize will only be called if this method is overridden - virtual void Initialize(const winrt::Microsoft::ReactNative::ComponentView &/*view*/) noexcept { - } - - // CreateVisual will only be called if this method is overridden - virtual winrt::Microsoft::UI::Composition::Visual CreateVisual(const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { - return view.as().Compositor().CreateSpriteVisual(); - } - - // FinalizeUpdate will only be called if this method is overridden - virtual void FinalizeUpdate(const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - winrt::Microsoft::ReactNative::ComponentViewUpdateMask /*mask*/) noexcept { - } - - // You must provide an implementation of this method to handle the "setNativeRefreshing" command - virtual void HandleSetNativeRefreshingCommand(bool value) noexcept = 0; - - void HandleCommand(const winrt::Microsoft::ReactNative::ComponentView &view, const winrt::Microsoft::ReactNative::HandleCommandArgs& args) noexcept { - auto userData = view.UserData().as(); - auto commandName = args.CommandName(); - if (commandName == L"setNativeRefreshing") { - bool value; - winrt::Microsoft::ReactNative::ReadArgs(args.CommandArgs(), value); - userData->HandleSetNativeRefreshingCommand(value); - return; - } - } - - const std::shared_ptr& EventEmitter() const { return m_eventEmitter; } - const winrt::com_ptr& Props() const { return m_props; } - -private: - winrt::com_ptr m_props; - std::shared_ptr m_eventEmitter; -}; - -template -void RegisterAndroidSwipeRefreshLayoutNativeComponent( - winrt::Microsoft::ReactNative::IReactPackageBuilder const &packageBuilder, - std::function builderCallback) noexcept { - packageBuilder.as().AddViewComponent( - L"AndroidSwipeRefreshLayout", [builderCallback](winrt::Microsoft::ReactNative::IReactViewComponentBuilder const &builder) noexcept { - auto compBuilder = builder.as(); - - builder.SetCreateProps([](winrt::Microsoft::ReactNative::ViewProps props, - const winrt::Microsoft::ReactNative::IComponentProps& cloneFrom) noexcept { - return winrt::make(props, cloneFrom); - }); - - builder.SetUpdatePropsHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::IComponentProps &newProps, - const winrt::Microsoft::ReactNative::IComponentProps &oldProps) noexcept { - auto userData = view.UserData().as(); - userData->UpdateProps(view, newProps ? newProps.as() : nullptr, oldProps ? oldProps.as() : nullptr); - }); - - compBuilder.SetUpdateLayoutMetricsHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::LayoutMetrics &newLayoutMetrics, - const winrt::Microsoft::ReactNative::LayoutMetrics &oldLayoutMetrics) noexcept { - auto userData = view.UserData().as(); - userData->UpdateLayoutMetrics(view, newLayoutMetrics, oldLayoutMetrics); - }); - - builder.SetUpdateEventEmitterHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::EventEmitter &eventEmitter) noexcept { - auto userData = view.UserData().as(); - userData->UpdateEventEmitter(std::make_shared(eventEmitter)); - }); - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::FinalizeUpdate != &BaseAndroidSwipeRefreshLayout::FinalizeUpdate) { - builder.SetFinalizeUpdateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - winrt::Microsoft::ReactNative::ComponentViewUpdateMask mask) noexcept { - auto userData = view.UserData().as(); - userData->FinalizeUpdate(view, mask); - }); - } - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UpdateState != &BaseAndroidSwipeRefreshLayout::UpdateState) { - builder.SetUpdateStateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::IComponentState &newState) noexcept { - auto userData = view.UserData().as(); - userData->UpdateState(view, newState); - }); - } - - builder.SetCustomCommandHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::HandleCommandArgs& args) noexcept { - auto userData = view.UserData().as(); - userData->HandleCommand(view, args); - }); - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::MountChildComponentView != &BaseAndroidSwipeRefreshLayout::MountChildComponentView) { - builder.SetMountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::MountChildComponentViewArgs &args) noexcept { - auto userData = view.UserData().as(); - return userData->MountChildComponentView(view, args); - }); - } - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UnmountChildComponentView != &BaseAndroidSwipeRefreshLayout::UnmountChildComponentView) { - builder.SetUnmountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::UnmountChildComponentViewArgs &args) noexcept { - auto userData = view.UserData().as(); - return userData->UnmountChildComponentView(view, args); - }); - } - - compBuilder.SetViewComponentViewInitializer([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { - auto userData = winrt::make_self(); - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::Initialize != &BaseAndroidSwipeRefreshLayout::Initialize) { - userData->Initialize(view); - } - view.UserData(*userData); - }); - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::CreateVisual != &BaseAndroidSwipeRefreshLayout::CreateVisual) { - compBuilder.SetCreateVisualHandler([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { - auto userData = view.UserData().as(); - return userData->CreateVisual(view); - }); - } - - // Allow app to further customize the builder - if (builderCallback) { - builderCallback(compBuilder); - } - }); -} - -} // namespace Microsoft::ReactNativeSpecs - -#endif // #ifdef RNW_NEW_ARCH diff --git a/vnext/codegen/react/components/rnwcore/AndroidSwitch.g.h b/vnext/codegen/react/components/rnwcore/AndroidSwitch.g.h deleted file mode 100644 index 7aa785222ee..00000000000 --- a/vnext/codegen/react/components/rnwcore/AndroidSwitch.g.h +++ /dev/null @@ -1,267 +0,0 @@ - -/* - * This file is auto-generated from AndroidSwitchNativeComponent spec file in flow / TypeScript. - */ -// clang-format off -#pragma once - -#include - -#ifdef RNW_NEW_ARCH -#include - -#include -#include -#endif // #ifdef RNW_NEW_ARCH - -#ifdef RNW_NEW_ARCH - -namespace Microsoft::ReactNativeSpecs { - -REACT_STRUCT(AndroidSwitchProps) -struct AndroidSwitchProps : winrt::implements { - AndroidSwitchProps(winrt::Microsoft::ReactNative::ViewProps props, const winrt::Microsoft::ReactNative::IComponentProps& cloneFrom) - : ViewProps(props) - { - if (cloneFrom) { - auto cloneFromProps = cloneFrom.as(); - disabled = cloneFromProps->disabled; - enabled = cloneFromProps->enabled; - thumbColor = cloneFromProps->thumbColor; - trackColorForFalse = cloneFromProps->trackColorForFalse; - trackColorForTrue = cloneFromProps->trackColorForTrue; - value = cloneFromProps->value; - on = cloneFromProps->on; - thumbTintColor = cloneFromProps->thumbTintColor; - trackTintColor = cloneFromProps->trackTintColor; - } - } - - void SetProp(uint32_t hash, winrt::hstring propName, winrt::Microsoft::ReactNative::IJSValueReader value) noexcept { - winrt::Microsoft::ReactNative::ReadProp(hash, propName, value, *this); - } - - REACT_FIELD(disabled) - std::optional disabled{}; - - REACT_FIELD(enabled) - bool enabled{true}; - - REACT_FIELD(thumbColor) - winrt::Microsoft::ReactNative::Color thumbColor{nullptr}; - - REACT_FIELD(trackColorForFalse) - winrt::Microsoft::ReactNative::Color trackColorForFalse{nullptr}; - - REACT_FIELD(trackColorForTrue) - winrt::Microsoft::ReactNative::Color trackColorForTrue{nullptr}; - - REACT_FIELD(value) - std::optional value{}; - - REACT_FIELD(on) - std::optional on{}; - - REACT_FIELD(thumbTintColor) - winrt::Microsoft::ReactNative::Color thumbTintColor{nullptr}; - - REACT_FIELD(trackTintColor) - winrt::Microsoft::ReactNative::Color trackTintColor{nullptr}; - - const winrt::Microsoft::ReactNative::ViewProps ViewProps; -}; - -REACT_STRUCT(AndroidSwitch_OnChange) -struct AndroidSwitch_OnChange { - REACT_FIELD(value) - bool value{}; - - REACT_FIELD(target) - int32_t target{}; -}; - -struct AndroidSwitchEventEmitter { - AndroidSwitchEventEmitter(const winrt::Microsoft::ReactNative::EventEmitter &eventEmitter) - : m_eventEmitter(eventEmitter) {} - - using OnChange = AndroidSwitch_OnChange; - - void onChange(OnChange &value) const { - m_eventEmitter.DispatchEvent(L"change", [value](const winrt::Microsoft::ReactNative::IJSValueWriter writer) { - winrt::Microsoft::ReactNative::WriteValue(writer, value); - }); - } - - private: - winrt::Microsoft::ReactNative::EventEmitter m_eventEmitter{nullptr}; -}; - -template -struct BaseAndroidSwitch { - - virtual void UpdateProps( - const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::com_ptr &newProps, - const winrt::com_ptr &/*oldProps*/) noexcept { - m_props = newProps; - } - - // UpdateLayoutMetrics will only be called if this method is overridden - virtual void UpdateLayoutMetrics( - const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::LayoutMetrics &/*newLayoutMetrics*/, - const winrt::Microsoft::ReactNative::LayoutMetrics &/*oldLayoutMetrics*/) noexcept { - } - - // UpdateState will only be called if this method is overridden - virtual void UpdateState( - const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::IComponentState &/*newState*/) noexcept { - } - - virtual void UpdateEventEmitter(const std::shared_ptr &eventEmitter) noexcept { - m_eventEmitter = eventEmitter; - } - - // MountChildComponentView will only be called if this method is overridden - virtual void MountChildComponentView(const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::MountChildComponentViewArgs &/*args*/) noexcept { - } - - // UnmountChildComponentView will only be called if this method is overridden - virtual void UnmountChildComponentView(const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::UnmountChildComponentViewArgs &/*args*/) noexcept { - } - - // Initialize will only be called if this method is overridden - virtual void Initialize(const winrt::Microsoft::ReactNative::ComponentView &/*view*/) noexcept { - } - - // CreateVisual will only be called if this method is overridden - virtual winrt::Microsoft::UI::Composition::Visual CreateVisual(const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { - return view.as().Compositor().CreateSpriteVisual(); - } - - // FinalizeUpdate will only be called if this method is overridden - virtual void FinalizeUpdate(const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - winrt::Microsoft::ReactNative::ComponentViewUpdateMask /*mask*/) noexcept { - } - - // You must provide an implementation of this method to handle the "setNativeValue" command - virtual void HandleSetNativeValueCommand(bool value) noexcept = 0; - - void HandleCommand(const winrt::Microsoft::ReactNative::ComponentView &view, const winrt::Microsoft::ReactNative::HandleCommandArgs& args) noexcept { - auto userData = view.UserData().as(); - auto commandName = args.CommandName(); - if (commandName == L"setNativeValue") { - bool value; - winrt::Microsoft::ReactNative::ReadArgs(args.CommandArgs(), value); - userData->HandleSetNativeValueCommand(value); - return; - } - } - - const std::shared_ptr& EventEmitter() const { return m_eventEmitter; } - const winrt::com_ptr& Props() const { return m_props; } - -private: - winrt::com_ptr m_props; - std::shared_ptr m_eventEmitter; -}; - -template -void RegisterAndroidSwitchNativeComponent( - winrt::Microsoft::ReactNative::IReactPackageBuilder const &packageBuilder, - std::function builderCallback) noexcept { - packageBuilder.as().AddViewComponent( - L"AndroidSwitch", [builderCallback](winrt::Microsoft::ReactNative::IReactViewComponentBuilder const &builder) noexcept { - auto compBuilder = builder.as(); - - builder.SetCreateProps([](winrt::Microsoft::ReactNative::ViewProps props, - const winrt::Microsoft::ReactNative::IComponentProps& cloneFrom) noexcept { - return winrt::make(props, cloneFrom); - }); - - builder.SetUpdatePropsHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::IComponentProps &newProps, - const winrt::Microsoft::ReactNative::IComponentProps &oldProps) noexcept { - auto userData = view.UserData().as(); - userData->UpdateProps(view, newProps ? newProps.as() : nullptr, oldProps ? oldProps.as() : nullptr); - }); - - compBuilder.SetUpdateLayoutMetricsHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::LayoutMetrics &newLayoutMetrics, - const winrt::Microsoft::ReactNative::LayoutMetrics &oldLayoutMetrics) noexcept { - auto userData = view.UserData().as(); - userData->UpdateLayoutMetrics(view, newLayoutMetrics, oldLayoutMetrics); - }); - - builder.SetUpdateEventEmitterHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::EventEmitter &eventEmitter) noexcept { - auto userData = view.UserData().as(); - userData->UpdateEventEmitter(std::make_shared(eventEmitter)); - }); - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::FinalizeUpdate != &BaseAndroidSwitch::FinalizeUpdate) { - builder.SetFinalizeUpdateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - winrt::Microsoft::ReactNative::ComponentViewUpdateMask mask) noexcept { - auto userData = view.UserData().as(); - userData->FinalizeUpdate(view, mask); - }); - } - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UpdateState != &BaseAndroidSwitch::UpdateState) { - builder.SetUpdateStateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::IComponentState &newState) noexcept { - auto userData = view.UserData().as(); - userData->UpdateState(view, newState); - }); - } - - builder.SetCustomCommandHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::HandleCommandArgs& args) noexcept { - auto userData = view.UserData().as(); - userData->HandleCommand(view, args); - }); - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::MountChildComponentView != &BaseAndroidSwitch::MountChildComponentView) { - builder.SetMountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::MountChildComponentViewArgs &args) noexcept { - auto userData = view.UserData().as(); - return userData->MountChildComponentView(view, args); - }); - } - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UnmountChildComponentView != &BaseAndroidSwitch::UnmountChildComponentView) { - builder.SetUnmountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::UnmountChildComponentViewArgs &args) noexcept { - auto userData = view.UserData().as(); - return userData->UnmountChildComponentView(view, args); - }); - } - - compBuilder.SetViewComponentViewInitializer([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { - auto userData = winrt::make_self(); - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::Initialize != &BaseAndroidSwitch::Initialize) { - userData->Initialize(view); - } - view.UserData(*userData); - }); - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::CreateVisual != &BaseAndroidSwitch::CreateVisual) { - compBuilder.SetCreateVisualHandler([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { - auto userData = view.UserData().as(); - return userData->CreateVisual(view); - }); - } - - // Allow app to further customize the builder - if (builderCallback) { - builderCallback(compBuilder); - } - }); -} - -} // namespace Microsoft::ReactNativeSpecs - -#endif // #ifdef RNW_NEW_ARCH diff --git a/vnext/codegen/react/components/rnwcore/ComponentDescriptors.h b/vnext/codegen/react/components/rnwcore/ComponentDescriptors.h deleted file mode 100644 index 45b7b5ea904..00000000000 --- a/vnext/codegen/react/components/rnwcore/ComponentDescriptors.h +++ /dev/null @@ -1,30 +0,0 @@ - -/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * @generated by codegen project: GenerateComponentDescriptorH.js - */ - -#pragma once - -#include "ShadowNodes.h" -#include -#include - -namespace facebook::react { - -using ActivityIndicatorViewComponentDescriptor = ConcreteComponentDescriptor; -using AndroidDrawerLayoutComponentDescriptor = ConcreteComponentDescriptor; -using AndroidSwipeRefreshLayoutComponentDescriptor = ConcreteComponentDescriptor; -using DebuggingOverlayComponentDescriptor = ConcreteComponentDescriptor; -using PullToRefreshViewComponentDescriptor = ConcreteComponentDescriptor; -using SwitchComponentDescriptor = ConcreteComponentDescriptor; -using UnimplementedNativeViewComponentDescriptor = ConcreteComponentDescriptor; - -void rnwcore_registerComponentDescriptorsFromCodegen( - std::shared_ptr registry); - -} // namespace facebook::react diff --git a/vnext/codegen/react/components/rnwcore/DebuggingOverlay.g.h b/vnext/codegen/react/components/rnwcore/DebuggingOverlay.g.h deleted file mode 100644 index 23ece9b6f09..00000000000 --- a/vnext/codegen/react/components/rnwcore/DebuggingOverlay.g.h +++ /dev/null @@ -1,234 +0,0 @@ - -/* - * This file is auto-generated from DebuggingOverlayNativeComponent spec file in flow / TypeScript. - */ -// clang-format off -#pragma once - -#include - -#ifdef RNW_NEW_ARCH -#include - -#include -#include -#endif // #ifdef RNW_NEW_ARCH - -#ifdef RNW_NEW_ARCH - -namespace Microsoft::ReactNativeSpecs { - -REACT_STRUCT(DebuggingOverlayProps) -struct DebuggingOverlayProps : winrt::implements { - DebuggingOverlayProps(winrt::Microsoft::ReactNative::ViewProps props, const winrt::Microsoft::ReactNative::IComponentProps& cloneFrom) - : ViewProps(props) - { - if (cloneFrom) { - auto cloneFromProps = cloneFrom.as(); - - } - } - - void SetProp(uint32_t hash, winrt::hstring propName, winrt::Microsoft::ReactNative::IJSValueReader value) noexcept { - winrt::Microsoft::ReactNative::ReadProp(hash, propName, value, *this); - } - - const winrt::Microsoft::ReactNative::ViewProps ViewProps; -}; - -struct DebuggingOverlayEventEmitter { - DebuggingOverlayEventEmitter(const winrt::Microsoft::ReactNative::EventEmitter &eventEmitter) - : m_eventEmitter(eventEmitter) {} - - private: - winrt::Microsoft::ReactNative::EventEmitter m_eventEmitter{nullptr}; -}; - -template -struct BaseDebuggingOverlay { - - virtual void UpdateProps( - const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::com_ptr &newProps, - const winrt::com_ptr &/*oldProps*/) noexcept { - m_props = newProps; - } - - // UpdateLayoutMetrics will only be called if this method is overridden - virtual void UpdateLayoutMetrics( - const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::LayoutMetrics &/*newLayoutMetrics*/, - const winrt::Microsoft::ReactNative::LayoutMetrics &/*oldLayoutMetrics*/) noexcept { - } - - // UpdateState will only be called if this method is overridden - virtual void UpdateState( - const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::IComponentState &/*newState*/) noexcept { - } - - virtual void UpdateEventEmitter(const std::shared_ptr &eventEmitter) noexcept { - m_eventEmitter = eventEmitter; - } - - // MountChildComponentView will only be called if this method is overridden - virtual void MountChildComponentView(const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::MountChildComponentViewArgs &/*args*/) noexcept { - } - - // UnmountChildComponentView will only be called if this method is overridden - virtual void UnmountChildComponentView(const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::UnmountChildComponentViewArgs &/*args*/) noexcept { - } - - // Initialize will only be called if this method is overridden - virtual void Initialize(const winrt::Microsoft::ReactNative::ComponentView &/*view*/) noexcept { - } - - // CreateVisual will only be called if this method is overridden - virtual winrt::Microsoft::UI::Composition::Visual CreateVisual(const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { - return view.as().Compositor().CreateSpriteVisual(); - } - - // FinalizeUpdate will only be called if this method is overridden - virtual void FinalizeUpdate(const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - winrt::Microsoft::ReactNative::ComponentViewUpdateMask /*mask*/) noexcept { - } - - // You must provide an implementation of this method to handle the "highlightTraceUpdates" command - virtual void HandleHighlightTraceUpdatesCommand(std::vector updates) noexcept = 0; - - // You must provide an implementation of this method to handle the "highlightElements" command - virtual void HandleHighlightElementsCommand(std::vector elements) noexcept = 0; - - // You must provide an implementation of this method to handle the "clearElementsHighlights" command - virtual void HandleClearElementsHighlightsCommand() noexcept = 0; - - void HandleCommand(const winrt::Microsoft::ReactNative::ComponentView &view, const winrt::Microsoft::ReactNative::HandleCommandArgs& args) noexcept { - auto userData = view.UserData().as(); - auto commandName = args.CommandName(); - if (commandName == L"highlightTraceUpdates") { - std::vector updates; - winrt::Microsoft::ReactNative::ReadArgs(args.CommandArgs(), updates); - userData->HandleHighlightTraceUpdatesCommand(updates); - return; - } - - if (commandName == L"highlightElements") { - std::vector elements; - winrt::Microsoft::ReactNative::ReadArgs(args.CommandArgs(), elements); - userData->HandleHighlightElementsCommand(elements); - return; - } - - if (commandName == L"clearElementsHighlights") { - - userData->HandleClearElementsHighlightsCommand(); - return; - } - } - - const std::shared_ptr& EventEmitter() const { return m_eventEmitter; } - const winrt::com_ptr& Props() const { return m_props; } - -private: - winrt::com_ptr m_props; - std::shared_ptr m_eventEmitter; -}; - -template -void RegisterDebuggingOverlayNativeComponent( - winrt::Microsoft::ReactNative::IReactPackageBuilder const &packageBuilder, - std::function builderCallback) noexcept { - packageBuilder.as().AddViewComponent( - L"DebuggingOverlay", [builderCallback](winrt::Microsoft::ReactNative::IReactViewComponentBuilder const &builder) noexcept { - auto compBuilder = builder.as(); - - builder.SetCreateProps([](winrt::Microsoft::ReactNative::ViewProps props, - const winrt::Microsoft::ReactNative::IComponentProps& cloneFrom) noexcept { - return winrt::make(props, cloneFrom); - }); - - builder.SetUpdatePropsHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::IComponentProps &newProps, - const winrt::Microsoft::ReactNative::IComponentProps &oldProps) noexcept { - auto userData = view.UserData().as(); - userData->UpdateProps(view, newProps ? newProps.as() : nullptr, oldProps ? oldProps.as() : nullptr); - }); - - compBuilder.SetUpdateLayoutMetricsHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::LayoutMetrics &newLayoutMetrics, - const winrt::Microsoft::ReactNative::LayoutMetrics &oldLayoutMetrics) noexcept { - auto userData = view.UserData().as(); - userData->UpdateLayoutMetrics(view, newLayoutMetrics, oldLayoutMetrics); - }); - - builder.SetUpdateEventEmitterHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::EventEmitter &eventEmitter) noexcept { - auto userData = view.UserData().as(); - userData->UpdateEventEmitter(std::make_shared(eventEmitter)); - }); - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::FinalizeUpdate != &BaseDebuggingOverlay::FinalizeUpdate) { - builder.SetFinalizeUpdateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - winrt::Microsoft::ReactNative::ComponentViewUpdateMask mask) noexcept { - auto userData = view.UserData().as(); - userData->FinalizeUpdate(view, mask); - }); - } - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UpdateState != &BaseDebuggingOverlay::UpdateState) { - builder.SetUpdateStateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::IComponentState &newState) noexcept { - auto userData = view.UserData().as(); - userData->UpdateState(view, newState); - }); - } - - builder.SetCustomCommandHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::HandleCommandArgs& args) noexcept { - auto userData = view.UserData().as(); - userData->HandleCommand(view, args); - }); - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::MountChildComponentView != &BaseDebuggingOverlay::MountChildComponentView) { - builder.SetMountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::MountChildComponentViewArgs &args) noexcept { - auto userData = view.UserData().as(); - return userData->MountChildComponentView(view, args); - }); - } - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UnmountChildComponentView != &BaseDebuggingOverlay::UnmountChildComponentView) { - builder.SetUnmountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::UnmountChildComponentViewArgs &args) noexcept { - auto userData = view.UserData().as(); - return userData->UnmountChildComponentView(view, args); - }); - } - - compBuilder.SetViewComponentViewInitializer([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { - auto userData = winrt::make_self(); - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::Initialize != &BaseDebuggingOverlay::Initialize) { - userData->Initialize(view); - } - view.UserData(*userData); - }); - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::CreateVisual != &BaseDebuggingOverlay::CreateVisual) { - compBuilder.SetCreateVisualHandler([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { - auto userData = view.UserData().as(); - return userData->CreateVisual(view); - }); - } - - // Allow app to further customize the builder - if (builderCallback) { - builderCallback(compBuilder); - } - }); -} - -} // namespace Microsoft::ReactNativeSpecs - -#endif // #ifdef RNW_NEW_ARCH diff --git a/vnext/codegen/react/components/rnwcore/EventEmitters.cpp b/vnext/codegen/react/components/rnwcore/EventEmitters.cpp deleted file mode 100644 index 413c7604eec..00000000000 --- a/vnext/codegen/react/components/rnwcore/EventEmitters.cpp +++ /dev/null @@ -1,182 +0,0 @@ - -/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * @generated by codegen project: GenerateEventEmitterCpp.js - */ - -#include "EventEmitters.h" - - -namespace facebook::react { - -void VirtualViewExperimentalEventEmitter::onModeChange(OnModeChange event) const { - dispatchEvent("modeChange", [event=std::move(event)](jsi::Runtime &runtime) { - auto payload = jsi::Object(runtime); - payload.setProperty(runtime, "mode", event.mode); -{ - auto targetRect = jsi::Object(runtime); - targetRect.setProperty(runtime, "x", event.targetRect.x); - targetRect.setProperty(runtime, "y", event.targetRect.y); - targetRect.setProperty(runtime, "width", event.targetRect.width); - targetRect.setProperty(runtime, "height", event.targetRect.height); - payload.setProperty(runtime, "targetRect", targetRect); -} -{ - auto thresholdRect = jsi::Object(runtime); - thresholdRect.setProperty(runtime, "x", event.thresholdRect.x); - thresholdRect.setProperty(runtime, "y", event.thresholdRect.y); - thresholdRect.setProperty(runtime, "width", event.thresholdRect.width); - thresholdRect.setProperty(runtime, "height", event.thresholdRect.height); - payload.setProperty(runtime, "thresholdRect", thresholdRect); -} - return payload; - }); -} - - -void VirtualViewEventEmitter::onModeChange(OnModeChange event) const { - dispatchEvent("modeChange", [event=std::move(event)](jsi::Runtime &runtime) { - auto payload = jsi::Object(runtime); - payload.setProperty(runtime, "mode", event.mode); -{ - auto targetRect = jsi::Object(runtime); - targetRect.setProperty(runtime, "x", event.targetRect.x); - targetRect.setProperty(runtime, "y", event.targetRect.y); - targetRect.setProperty(runtime, "width", event.targetRect.width); - targetRect.setProperty(runtime, "height", event.targetRect.height); - payload.setProperty(runtime, "targetRect", targetRect); -} -{ - auto thresholdRect = jsi::Object(runtime); - thresholdRect.setProperty(runtime, "x", event.thresholdRect.x); - thresholdRect.setProperty(runtime, "y", event.thresholdRect.y); - thresholdRect.setProperty(runtime, "width", event.thresholdRect.width); - thresholdRect.setProperty(runtime, "height", event.thresholdRect.height); - payload.setProperty(runtime, "thresholdRect", thresholdRect); -} - return payload; - }); -} - - - -void AndroidDrawerLayoutEventEmitter::onDrawerSlide(OnDrawerSlide event) const { - dispatchEvent("drawerSlide", [event=std::move(event)](jsi::Runtime &runtime) { - auto payload = jsi::Object(runtime); - payload.setProperty(runtime, "offset", event.offset); - return payload; - }); -} - - -void AndroidDrawerLayoutEventEmitter::onDrawerStateChanged(OnDrawerStateChanged event) const { - dispatchEvent("drawerStateChanged", [event=std::move(event)](jsi::Runtime &runtime) { - auto payload = jsi::Object(runtime); - payload.setProperty(runtime, "drawerState", event.drawerState); - return payload; - }); -} - - -void AndroidDrawerLayoutEventEmitter::onDrawerOpen(OnDrawerOpen event) const { - dispatchEvent("drawerOpen", [](jsi::Runtime &runtime) { - auto payload = jsi::Object(runtime); - - return payload; - }); -} - - -void AndroidDrawerLayoutEventEmitter::onDrawerClose(OnDrawerClose event) const { - dispatchEvent("drawerClose", [](jsi::Runtime &runtime) { - auto payload = jsi::Object(runtime); - - return payload; - }); -} - - - -void AndroidSwipeRefreshLayoutEventEmitter::onRefresh(OnRefresh event) const { - dispatchEvent("refresh", [](jsi::Runtime &runtime) { - auto payload = jsi::Object(runtime); - - return payload; - }); -} - - -void AndroidSwitchEventEmitter::onChange(OnChange event) const { - dispatchEvent("change", [event=std::move(event)](jsi::Runtime &runtime) { - auto payload = jsi::Object(runtime); - payload.setProperty(runtime, "value", event.value); -payload.setProperty(runtime, "target", event.target); - return payload; - }); -} - - - - -void PullToRefreshViewEventEmitter::onRefresh(OnRefresh event) const { - dispatchEvent("refresh", [](jsi::Runtime &runtime) { - auto payload = jsi::Object(runtime); - - return payload; - }); -} - - - -void ModalHostViewEventEmitter::onRequestClose(OnRequestClose event) const { - dispatchEvent("requestClose", [](jsi::Runtime &runtime) { - auto payload = jsi::Object(runtime); - - return payload; - }); -} - - -void ModalHostViewEventEmitter::onShow(OnShow event) const { - dispatchEvent("show", [](jsi::Runtime &runtime) { - auto payload = jsi::Object(runtime); - - return payload; - }); -} - - -void ModalHostViewEventEmitter::onDismiss(OnDismiss event) const { - dispatchEvent("dismiss", [](jsi::Runtime &runtime) { - auto payload = jsi::Object(runtime); - - return payload; - }); -} - - -void ModalHostViewEventEmitter::onOrientationChange(OnOrientationChange event) const { - dispatchEvent("orientationChange", [event=std::move(event)](jsi::Runtime &runtime) { - auto payload = jsi::Object(runtime); - payload.setProperty(runtime, "orientation", toString(event.orientation)); - return payload; - }); -} - - - -void SwitchEventEmitter::onChange(OnChange event) const { - dispatchEvent("change", [event=std::move(event)](jsi::Runtime &runtime) { - auto payload = jsi::Object(runtime); - payload.setProperty(runtime, "value", event.value); -payload.setProperty(runtime, "target", event.target); - return payload; - }); -} - - -} // namespace facebook::react diff --git a/vnext/codegen/react/components/rnwcore/EventEmitters.h b/vnext/codegen/react/components/rnwcore/EventEmitters.h deleted file mode 100644 index b6abdefc88a..00000000000 --- a/vnext/codegen/react/components/rnwcore/EventEmitters.h +++ /dev/null @@ -1,219 +0,0 @@ - -/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * @generated by codegen project: GenerateEventEmitterH.js - */ -#pragma once - -#include - - -namespace facebook::react { -class VirtualViewExperimentalEventEmitter : public ViewEventEmitter { - public: - using ViewEventEmitter::ViewEventEmitter; - - struct OnModeChangeTargetRect { - double x; - double y; - double width; - double height; - }; - - struct OnModeChangeThresholdRect { - double x; - double y; - double width; - double height; - }; - - struct OnModeChange { - int mode; - OnModeChangeTargetRect targetRect; - OnModeChangeThresholdRect thresholdRect; - }; - void onModeChange(OnModeChange value) const; -}; -class VirtualViewEventEmitter : public ViewEventEmitter { - public: - using ViewEventEmitter::ViewEventEmitter; - - struct OnModeChangeTargetRect { - double x; - double y; - double width; - double height; - }; - - struct OnModeChangeThresholdRect { - double x; - double y; - double width; - double height; - }; - - struct OnModeChange { - int mode; - OnModeChangeTargetRect targetRect; - OnModeChangeThresholdRect thresholdRect; - }; - void onModeChange(OnModeChange value) const; -}; -class ActivityIndicatorViewEventEmitter : public ViewEventEmitter { - public: - using ViewEventEmitter::ViewEventEmitter; - - - -}; -class AndroidDrawerLayoutEventEmitter : public ViewEventEmitter { - public: - using ViewEventEmitter::ViewEventEmitter; - - struct OnDrawerSlide { - Float offset; - }; - - struct OnDrawerStateChanged { - int drawerState; - }; - - struct OnDrawerOpen { - - }; - - struct OnDrawerClose { - - }; - void onDrawerSlide(OnDrawerSlide value) const; - - void onDrawerStateChanged(OnDrawerStateChanged value) const; - - void onDrawerOpen(OnDrawerOpen value) const; - - void onDrawerClose(OnDrawerClose value) const; -}; -class AndroidHorizontalScrollContentViewEventEmitter : public ViewEventEmitter { - public: - using ViewEventEmitter::ViewEventEmitter; - - - -}; -class AndroidSwipeRefreshLayoutEventEmitter : public ViewEventEmitter { - public: - using ViewEventEmitter::ViewEventEmitter; - - struct OnRefresh { - - }; - void onRefresh(OnRefresh value) const; -}; -class AndroidSwitchEventEmitter : public ViewEventEmitter { - public: - using ViewEventEmitter::ViewEventEmitter; - - struct OnChange { - bool value; - int target; - }; - void onChange(OnChange value) const; -}; -class DebuggingOverlayEventEmitter : public ViewEventEmitter { - public: - using ViewEventEmitter::ViewEventEmitter; - - - -}; -class AndroidProgressBarEventEmitter : public ViewEventEmitter { - public: - using ViewEventEmitter::ViewEventEmitter; - - - -}; -class PullToRefreshViewEventEmitter : public ViewEventEmitter { - public: - using ViewEventEmitter::ViewEventEmitter; - - struct OnRefresh { - - }; - void onRefresh(OnRefresh value) const; -}; -class InputAccessoryEventEmitter : public ViewEventEmitter { - public: - using ViewEventEmitter::ViewEventEmitter; - - - -}; -class ModalHostViewEventEmitter : public ViewEventEmitter { - public: - using ViewEventEmitter::ViewEventEmitter; - - struct OnRequestClose { - - }; - - struct OnShow { - - }; - - struct OnDismiss { - - }; - - enum class OnOrientationChangeOrientation { - Portrait, - Landscape - }; - - static char const *toString(const OnOrientationChangeOrientation value) { - switch (value) { - case OnOrientationChangeOrientation::Portrait: return "portrait"; - case OnOrientationChangeOrientation::Landscape: return "landscape"; - } - } - - struct OnOrientationChange { - OnOrientationChangeOrientation orientation; - }; - void onRequestClose(OnRequestClose value) const; - - void onShow(OnShow value) const; - - void onDismiss(OnDismiss value) const; - - void onOrientationChange(OnOrientationChange value) const; -}; -class SafeAreaViewEventEmitter : public ViewEventEmitter { - public: - using ViewEventEmitter::ViewEventEmitter; - - - -}; -class SwitchEventEmitter : public ViewEventEmitter { - public: - using ViewEventEmitter::ViewEventEmitter; - - struct OnChange { - bool value; - int target; - }; - void onChange(OnChange value) const; -}; -class UnimplementedNativeViewEventEmitter : public ViewEventEmitter { - public: - using ViewEventEmitter::ViewEventEmitter; - - - -}; -} // namespace facebook::react diff --git a/vnext/codegen/react/components/rnwcore/InputAccessory.g.h b/vnext/codegen/react/components/rnwcore/InputAccessory.g.h deleted file mode 100644 index 2b490f988ef..00000000000 --- a/vnext/codegen/react/components/rnwcore/InputAccessory.g.h +++ /dev/null @@ -1,200 +0,0 @@ - -/* - * This file is auto-generated from InputAccessoryNativeComponent spec file in flow / TypeScript. - */ -// clang-format off -#pragma once - -#include - -#ifdef RNW_NEW_ARCH -#include - -#include -#include -#endif // #ifdef RNW_NEW_ARCH - -#ifdef RNW_NEW_ARCH - -namespace Microsoft::ReactNativeSpecs { - -REACT_STRUCT(InputAccessoryProps) -struct InputAccessoryProps : winrt::implements { - InputAccessoryProps(winrt::Microsoft::ReactNative::ViewProps props, const winrt::Microsoft::ReactNative::IComponentProps& cloneFrom) - : ViewProps(props) - { - if (cloneFrom) { - auto cloneFromProps = cloneFrom.as(); - backgroundColor = cloneFromProps->backgroundColor; - } - } - - void SetProp(uint32_t hash, winrt::hstring propName, winrt::Microsoft::ReactNative::IJSValueReader value) noexcept { - winrt::Microsoft::ReactNative::ReadProp(hash, propName, value, *this); - } - - REACT_FIELD(backgroundColor) - winrt::Microsoft::ReactNative::Color backgroundColor{nullptr}; - - const winrt::Microsoft::ReactNative::ViewProps ViewProps; -}; - -struct InputAccessoryEventEmitter { - InputAccessoryEventEmitter(const winrt::Microsoft::ReactNative::EventEmitter &eventEmitter) - : m_eventEmitter(eventEmitter) {} - - private: - winrt::Microsoft::ReactNative::EventEmitter m_eventEmitter{nullptr}; -}; - -template -struct BaseInputAccessory { - - virtual void UpdateProps( - const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::com_ptr &newProps, - const winrt::com_ptr &/*oldProps*/) noexcept { - m_props = newProps; - } - - // UpdateLayoutMetrics will only be called if this method is overridden - virtual void UpdateLayoutMetrics( - const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::LayoutMetrics &/*newLayoutMetrics*/, - const winrt::Microsoft::ReactNative::LayoutMetrics &/*oldLayoutMetrics*/) noexcept { - } - - // UpdateState will only be called if this method is overridden - virtual void UpdateState( - const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::IComponentState &/*newState*/) noexcept { - } - - virtual void UpdateEventEmitter(const std::shared_ptr &eventEmitter) noexcept { - m_eventEmitter = eventEmitter; - } - - // MountChildComponentView will only be called if this method is overridden - virtual void MountChildComponentView(const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::MountChildComponentViewArgs &/*args*/) noexcept { - } - - // UnmountChildComponentView will only be called if this method is overridden - virtual void UnmountChildComponentView(const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::UnmountChildComponentViewArgs &/*args*/) noexcept { - } - - // Initialize will only be called if this method is overridden - virtual void Initialize(const winrt::Microsoft::ReactNative::ComponentView &/*view*/) noexcept { - } - - // CreateVisual will only be called if this method is overridden - virtual winrt::Microsoft::UI::Composition::Visual CreateVisual(const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { - return view.as().Compositor().CreateSpriteVisual(); - } - - // FinalizeUpdate will only be called if this method is overridden - virtual void FinalizeUpdate(const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - winrt::Microsoft::ReactNative::ComponentViewUpdateMask /*mask*/) noexcept { - } - - - - const std::shared_ptr& EventEmitter() const { return m_eventEmitter; } - const winrt::com_ptr& Props() const { return m_props; } - -private: - winrt::com_ptr m_props; - std::shared_ptr m_eventEmitter; -}; - -template -void RegisterInputAccessoryNativeComponent( - winrt::Microsoft::ReactNative::IReactPackageBuilder const &packageBuilder, - std::function builderCallback) noexcept { - packageBuilder.as().AddViewComponent( - L"InputAccessory", [builderCallback](winrt::Microsoft::ReactNative::IReactViewComponentBuilder const &builder) noexcept { - auto compBuilder = builder.as(); - - builder.SetCreateProps([](winrt::Microsoft::ReactNative::ViewProps props, - const winrt::Microsoft::ReactNative::IComponentProps& cloneFrom) noexcept { - return winrt::make(props, cloneFrom); - }); - - builder.SetUpdatePropsHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::IComponentProps &newProps, - const winrt::Microsoft::ReactNative::IComponentProps &oldProps) noexcept { - auto userData = view.UserData().as(); - userData->UpdateProps(view, newProps ? newProps.as() : nullptr, oldProps ? oldProps.as() : nullptr); - }); - - compBuilder.SetUpdateLayoutMetricsHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::LayoutMetrics &newLayoutMetrics, - const winrt::Microsoft::ReactNative::LayoutMetrics &oldLayoutMetrics) noexcept { - auto userData = view.UserData().as(); - userData->UpdateLayoutMetrics(view, newLayoutMetrics, oldLayoutMetrics); - }); - - builder.SetUpdateEventEmitterHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::EventEmitter &eventEmitter) noexcept { - auto userData = view.UserData().as(); - userData->UpdateEventEmitter(std::make_shared(eventEmitter)); - }); - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::FinalizeUpdate != &BaseInputAccessory::FinalizeUpdate) { - builder.SetFinalizeUpdateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - winrt::Microsoft::ReactNative::ComponentViewUpdateMask mask) noexcept { - auto userData = view.UserData().as(); - userData->FinalizeUpdate(view, mask); - }); - } - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UpdateState != &BaseInputAccessory::UpdateState) { - builder.SetUpdateStateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::IComponentState &newState) noexcept { - auto userData = view.UserData().as(); - userData->UpdateState(view, newState); - }); - } - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::MountChildComponentView != &BaseInputAccessory::MountChildComponentView) { - builder.SetMountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::MountChildComponentViewArgs &args) noexcept { - auto userData = view.UserData().as(); - return userData->MountChildComponentView(view, args); - }); - } - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UnmountChildComponentView != &BaseInputAccessory::UnmountChildComponentView) { - builder.SetUnmountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::UnmountChildComponentViewArgs &args) noexcept { - auto userData = view.UserData().as(); - return userData->UnmountChildComponentView(view, args); - }); - } - - compBuilder.SetViewComponentViewInitializer([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { - auto userData = winrt::make_self(); - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::Initialize != &BaseInputAccessory::Initialize) { - userData->Initialize(view); - } - view.UserData(*userData); - }); - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::CreateVisual != &BaseInputAccessory::CreateVisual) { - compBuilder.SetCreateVisualHandler([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { - auto userData = view.UserData().as(); - return userData->CreateVisual(view); - }); - } - - // Allow app to further customize the builder - if (builderCallback) { - builderCallback(compBuilder); - } - }); -} - -} // namespace Microsoft::ReactNativeSpecs - -#endif // #ifdef RNW_NEW_ARCH diff --git a/vnext/codegen/react/components/rnwcore/ModalHostView.g.h b/vnext/codegen/react/components/rnwcore/ModalHostView.g.h deleted file mode 100644 index 1aa595d258c..00000000000 --- a/vnext/codegen/react/components/rnwcore/ModalHostView.g.h +++ /dev/null @@ -1,291 +0,0 @@ - -/* - * This file is auto-generated from ModalHostViewNativeComponent spec file in flow / TypeScript. - */ -// clang-format off -#pragma once - -#include - -#ifdef RNW_NEW_ARCH -#include - -#include -#include -#endif // #ifdef RNW_NEW_ARCH - -#ifdef RNW_NEW_ARCH - -namespace Microsoft::ReactNativeSpecs { - -REACT_STRUCT(ModalHostViewProps) -struct ModalHostViewProps : winrt::implements { - ModalHostViewProps(winrt::Microsoft::ReactNative::ViewProps props, const winrt::Microsoft::ReactNative::IComponentProps& cloneFrom) - : ViewProps(props) - { - if (cloneFrom) { - auto cloneFromProps = cloneFrom.as(); - animationType = cloneFromProps->animationType; - presentationStyle = cloneFromProps->presentationStyle; - transparent = cloneFromProps->transparent; - statusBarTranslucent = cloneFromProps->statusBarTranslucent; - navigationBarTranslucent = cloneFromProps->navigationBarTranslucent; - hardwareAccelerated = cloneFromProps->hardwareAccelerated; - visible = cloneFromProps->visible; - animated = cloneFromProps->animated; - allowSwipeDismissal = cloneFromProps->allowSwipeDismissal; - supportedOrientations = cloneFromProps->supportedOrientations; - identifier = cloneFromProps->identifier; - title = cloneFromProps->title; - } - } - - void SetProp(uint32_t hash, winrt::hstring propName, winrt::Microsoft::ReactNative::IJSValueReader value) noexcept { - winrt::Microsoft::ReactNative::ReadProp(hash, propName, value, *this); - } - - REACT_FIELD(animationType) - std::optional animationType; - - REACT_FIELD(presentationStyle) - std::optional presentationStyle; - - REACT_FIELD(transparent) - std::optional transparent{}; - - REACT_FIELD(statusBarTranslucent) - std::optional statusBarTranslucent{}; - - REACT_FIELD(navigationBarTranslucent) - std::optional navigationBarTranslucent{}; - - REACT_FIELD(hardwareAccelerated) - std::optional hardwareAccelerated{}; - - REACT_FIELD(visible) - std::optional visible{}; - - REACT_FIELD(animated) - std::optional animated{}; - - REACT_FIELD(allowSwipeDismissal) - std::optional allowSwipeDismissal{}; - - REACT_FIELD(supportedOrientations) - std::optional> supportedOrientations; - - REACT_FIELD(identifier) - std::optional identifier{}; - - REACT_FIELD(title) - std::optional title; - - const winrt::Microsoft::ReactNative::ViewProps ViewProps; -}; - -REACT_STRUCT(ModalHostView_OnRequestClose) -struct ModalHostView_OnRequestClose { -}; - -REACT_STRUCT(ModalHostView_OnShow) -struct ModalHostView_OnShow { -}; - -REACT_STRUCT(ModalHostView_OnDismiss) -struct ModalHostView_OnDismiss { -}; - -REACT_STRUCT(ModalHostView_OnOrientationChange) -struct ModalHostView_OnOrientationChange { - REACT_FIELD(orientation) - std::string orientation; -}; - -struct ModalHostViewEventEmitter { - ModalHostViewEventEmitter(const winrt::Microsoft::ReactNative::EventEmitter &eventEmitter) - : m_eventEmitter(eventEmitter) {} - - using OnRequestClose = ModalHostView_OnRequestClose; - using OnShow = ModalHostView_OnShow; - using OnDismiss = ModalHostView_OnDismiss; - using OnOrientationChange = ModalHostView_OnOrientationChange; - - void onRequestClose(OnRequestClose &value) const { - m_eventEmitter.DispatchEvent(L"requestClose", [value](const winrt::Microsoft::ReactNative::IJSValueWriter writer) { - winrt::Microsoft::ReactNative::WriteValue(writer, value); - }); - } - - void onShow(OnShow &value) const { - m_eventEmitter.DispatchEvent(L"show", [value](const winrt::Microsoft::ReactNative::IJSValueWriter writer) { - winrt::Microsoft::ReactNative::WriteValue(writer, value); - }); - } - - void onDismiss(OnDismiss &value) const { - m_eventEmitter.DispatchEvent(L"dismiss", [value](const winrt::Microsoft::ReactNative::IJSValueWriter writer) { - winrt::Microsoft::ReactNative::WriteValue(writer, value); - }); - } - - void onOrientationChange(OnOrientationChange &value) const { - m_eventEmitter.DispatchEvent(L"orientationChange", [value](const winrt::Microsoft::ReactNative::IJSValueWriter writer) { - winrt::Microsoft::ReactNative::WriteValue(writer, value); - }); - } - - private: - winrt::Microsoft::ReactNative::EventEmitter m_eventEmitter{nullptr}; -}; - -template -struct BaseModalHostView { - - virtual void UpdateProps( - const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::com_ptr &newProps, - const winrt::com_ptr &/*oldProps*/) noexcept { - m_props = newProps; - } - - // UpdateLayoutMetrics will only be called if this method is overridden - virtual void UpdateLayoutMetrics( - const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::LayoutMetrics &/*newLayoutMetrics*/, - const winrt::Microsoft::ReactNative::LayoutMetrics &/*oldLayoutMetrics*/) noexcept { - } - - // UpdateState will only be called if this method is overridden - virtual void UpdateState( - const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::IComponentState &/*newState*/) noexcept { - } - - virtual void UpdateEventEmitter(const std::shared_ptr &eventEmitter) noexcept { - m_eventEmitter = eventEmitter; - } - - // MountChildComponentView will only be called if this method is overridden - virtual void MountChildComponentView(const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::MountChildComponentViewArgs &/*args*/) noexcept { - } - - // UnmountChildComponentView will only be called if this method is overridden - virtual void UnmountChildComponentView(const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::UnmountChildComponentViewArgs &/*args*/) noexcept { - } - - // Initialize will only be called if this method is overridden - virtual void Initialize(const winrt::Microsoft::ReactNative::ComponentView &/*view*/) noexcept { - } - - // CreateVisual will only be called if this method is overridden - virtual winrt::Microsoft::UI::Composition::Visual CreateVisual(const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { - return view.as().Compositor().CreateSpriteVisual(); - } - - // FinalizeUpdate will only be called if this method is overridden - virtual void FinalizeUpdate(const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - winrt::Microsoft::ReactNative::ComponentViewUpdateMask /*mask*/) noexcept { - } - - - - const std::shared_ptr& EventEmitter() const { return m_eventEmitter; } - const winrt::com_ptr& Props() const { return m_props; } - -private: - winrt::com_ptr m_props; - std::shared_ptr m_eventEmitter; -}; - -template -void RegisterModalHostViewNativeComponent( - winrt::Microsoft::ReactNative::IReactPackageBuilder const &packageBuilder, - std::function builderCallback) noexcept { - packageBuilder.as().AddViewComponent( - L"ModalHostView", [builderCallback](winrt::Microsoft::ReactNative::IReactViewComponentBuilder const &builder) noexcept { - auto compBuilder = builder.as(); - - builder.SetCreateProps([](winrt::Microsoft::ReactNative::ViewProps props, - const winrt::Microsoft::ReactNative::IComponentProps& cloneFrom) noexcept { - return winrt::make(props, cloneFrom); - }); - - builder.SetUpdatePropsHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::IComponentProps &newProps, - const winrt::Microsoft::ReactNative::IComponentProps &oldProps) noexcept { - auto userData = view.UserData().as(); - userData->UpdateProps(view, newProps ? newProps.as() : nullptr, oldProps ? oldProps.as() : nullptr); - }); - - compBuilder.SetUpdateLayoutMetricsHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::LayoutMetrics &newLayoutMetrics, - const winrt::Microsoft::ReactNative::LayoutMetrics &oldLayoutMetrics) noexcept { - auto userData = view.UserData().as(); - userData->UpdateLayoutMetrics(view, newLayoutMetrics, oldLayoutMetrics); - }); - - builder.SetUpdateEventEmitterHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::EventEmitter &eventEmitter) noexcept { - auto userData = view.UserData().as(); - userData->UpdateEventEmitter(std::make_shared(eventEmitter)); - }); - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::FinalizeUpdate != &BaseModalHostView::FinalizeUpdate) { - builder.SetFinalizeUpdateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - winrt::Microsoft::ReactNative::ComponentViewUpdateMask mask) noexcept { - auto userData = view.UserData().as(); - userData->FinalizeUpdate(view, mask); - }); - } - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UpdateState != &BaseModalHostView::UpdateState) { - builder.SetUpdateStateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::IComponentState &newState) noexcept { - auto userData = view.UserData().as(); - userData->UpdateState(view, newState); - }); - } - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::MountChildComponentView != &BaseModalHostView::MountChildComponentView) { - builder.SetMountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::MountChildComponentViewArgs &args) noexcept { - auto userData = view.UserData().as(); - return userData->MountChildComponentView(view, args); - }); - } - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UnmountChildComponentView != &BaseModalHostView::UnmountChildComponentView) { - builder.SetUnmountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::UnmountChildComponentViewArgs &args) noexcept { - auto userData = view.UserData().as(); - return userData->UnmountChildComponentView(view, args); - }); - } - - compBuilder.SetViewComponentViewInitializer([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { - auto userData = winrt::make_self(); - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::Initialize != &BaseModalHostView::Initialize) { - userData->Initialize(view); - } - view.UserData(*userData); - }); - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::CreateVisual != &BaseModalHostView::CreateVisual) { - compBuilder.SetCreateVisualHandler([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { - auto userData = view.UserData().as(); - return userData->CreateVisual(view); - }); - } - - // Allow app to further customize the builder - if (builderCallback) { - builderCallback(compBuilder); - } - }); -} - -} // namespace Microsoft::ReactNativeSpecs - -#endif // #ifdef RNW_NEW_ARCH diff --git a/vnext/codegen/react/components/rnwcore/Props.cpp b/vnext/codegen/react/components/rnwcore/Props.cpp deleted file mode 100644 index 09f2bb860f7..00000000000 --- a/vnext/codegen/react/components/rnwcore/Props.cpp +++ /dev/null @@ -1,702 +0,0 @@ - -/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * @generated by codegen project: GeneratePropsCpp.js - */ - -#include "Props.h" -#include -#include - -namespace facebook::react { - -VirtualViewExperimentalProps::VirtualViewExperimentalProps( - const PropsParserContext &context, - const VirtualViewExperimentalProps &sourceProps, - const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), - - initialHidden(convertRawProp(context, rawProps, "initialHidden", sourceProps.initialHidden, {false})), - renderState(convertRawProp(context, rawProps, "renderState", sourceProps.renderState, {0})) {} - -#ifdef RN_SERIALIZABLE_STATE -ComponentName VirtualViewExperimentalProps::getDiffPropsImplementationTarget() const { - return "VirtualViewExperimental"; -} - -folly::dynamic VirtualViewExperimentalProps::getDiffProps( - const Props* prevProps) const { - static const auto defaultProps = VirtualViewExperimentalProps(); - const VirtualViewExperimentalProps* oldProps = prevProps == nullptr - ? &defaultProps - : static_cast(prevProps); - if (this == oldProps) { - return folly::dynamic::object(); - } - folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps); - - if (initialHidden != oldProps->initialHidden) { - result["initialHidden"] = initialHidden; - } - - if (renderState != oldProps->renderState) { - result["renderState"] = renderState; - } - return result; -} -#endif -VirtualViewProps::VirtualViewProps( - const PropsParserContext &context, - const VirtualViewProps &sourceProps, - const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), - - initialHidden(convertRawProp(context, rawProps, "initialHidden", sourceProps.initialHidden, {false})), - renderState(convertRawProp(context, rawProps, "renderState", sourceProps.renderState, {0})) {} - -#ifdef RN_SERIALIZABLE_STATE -ComponentName VirtualViewProps::getDiffPropsImplementationTarget() const { - return "VirtualView"; -} - -folly::dynamic VirtualViewProps::getDiffProps( - const Props* prevProps) const { - static const auto defaultProps = VirtualViewProps(); - const VirtualViewProps* oldProps = prevProps == nullptr - ? &defaultProps - : static_cast(prevProps); - if (this == oldProps) { - return folly::dynamic::object(); - } - folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps); - - if (initialHidden != oldProps->initialHidden) { - result["initialHidden"] = initialHidden; - } - - if (renderState != oldProps->renderState) { - result["renderState"] = renderState; - } - return result; -} -#endif -ActivityIndicatorViewProps::ActivityIndicatorViewProps( - const PropsParserContext &context, - const ActivityIndicatorViewProps &sourceProps, - const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), - - hidesWhenStopped(convertRawProp(context, rawProps, "hidesWhenStopped", sourceProps.hidesWhenStopped, {true})), - animating(convertRawProp(context, rawProps, "animating", sourceProps.animating, {true})), - color(convertRawProp(context, rawProps, "color", sourceProps.color, {})), - size(convertRawProp(context, rawProps, "size", sourceProps.size, {ActivityIndicatorViewSize::Small})) {} - -#ifdef RN_SERIALIZABLE_STATE -ComponentName ActivityIndicatorViewProps::getDiffPropsImplementationTarget() const { - return "ActivityIndicatorView"; -} - -folly::dynamic ActivityIndicatorViewProps::getDiffProps( - const Props* prevProps) const { - static const auto defaultProps = ActivityIndicatorViewProps(); - const ActivityIndicatorViewProps* oldProps = prevProps == nullptr - ? &defaultProps - : static_cast(prevProps); - if (this == oldProps) { - return folly::dynamic::object(); - } - folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps); - - if (hidesWhenStopped != oldProps->hidesWhenStopped) { - result["hidesWhenStopped"] = hidesWhenStopped; - } - - if (animating != oldProps->animating) { - result["animating"] = animating; - } - - if (color != oldProps->color) { - result["color"] = *color; - } - - if (size != oldProps->size) { - result["size"] = toDynamic(size); - } - return result; -} -#endif -AndroidDrawerLayoutProps::AndroidDrawerLayoutProps( - const PropsParserContext &context, - const AndroidDrawerLayoutProps &sourceProps, - const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), - - keyboardDismissMode(convertRawProp(context, rawProps, "keyboardDismissMode", sourceProps.keyboardDismissMode, {AndroidDrawerLayoutKeyboardDismissMode::None})), - drawerBackgroundColor(convertRawProp(context, rawProps, "drawerBackgroundColor", sourceProps.drawerBackgroundColor, {})), - drawerPosition(convertRawProp(context, rawProps, "drawerPosition", sourceProps.drawerPosition, {AndroidDrawerLayoutDrawerPosition::Left})), - drawerWidth(convertRawProp(context, rawProps, "drawerWidth", sourceProps.drawerWidth, {})), - drawerLockMode(convertRawProp(context, rawProps, "drawerLockMode", sourceProps.drawerLockMode, {AndroidDrawerLayoutDrawerLockMode::Unlocked})), - statusBarBackgroundColor(convertRawProp(context, rawProps, "statusBarBackgroundColor", sourceProps.statusBarBackgroundColor, {})) {} - -#ifdef RN_SERIALIZABLE_STATE -ComponentName AndroidDrawerLayoutProps::getDiffPropsImplementationTarget() const { - return "AndroidDrawerLayout"; -} - -folly::dynamic AndroidDrawerLayoutProps::getDiffProps( - const Props* prevProps) const { - static const auto defaultProps = AndroidDrawerLayoutProps(); - const AndroidDrawerLayoutProps* oldProps = prevProps == nullptr - ? &defaultProps - : static_cast(prevProps); - if (this == oldProps) { - return folly::dynamic::object(); - } - folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps); - - if (keyboardDismissMode != oldProps->keyboardDismissMode) { - result["keyboardDismissMode"] = toDynamic(keyboardDismissMode); - } - - if (drawerBackgroundColor != oldProps->drawerBackgroundColor) { - result["drawerBackgroundColor"] = *drawerBackgroundColor; - } - - if (drawerPosition != oldProps->drawerPosition) { - result["drawerPosition"] = toDynamic(drawerPosition); - } - - if ((drawerWidth != oldProps->drawerWidth) && !(std::isnan(drawerWidth) && std::isnan(oldProps->drawerWidth))) { - result["drawerWidth"] = drawerWidth; - } - - if (drawerLockMode != oldProps->drawerLockMode) { - result["drawerLockMode"] = toDynamic(drawerLockMode); - } - - if (statusBarBackgroundColor != oldProps->statusBarBackgroundColor) { - result["statusBarBackgroundColor"] = *statusBarBackgroundColor; - } - return result; -} -#endif -AndroidHorizontalScrollContentViewProps::AndroidHorizontalScrollContentViewProps( - const PropsParserContext &context, - const AndroidHorizontalScrollContentViewProps &sourceProps, - const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), - - removeClippedSubviews(convertRawProp(context, rawProps, "removeClippedSubviews", sourceProps.removeClippedSubviews, {false})) {} - -#ifdef RN_SERIALIZABLE_STATE -ComponentName AndroidHorizontalScrollContentViewProps::getDiffPropsImplementationTarget() const { - return "AndroidHorizontalScrollContentView"; -} - -folly::dynamic AndroidHorizontalScrollContentViewProps::getDiffProps( - const Props* prevProps) const { - static const auto defaultProps = AndroidHorizontalScrollContentViewProps(); - const AndroidHorizontalScrollContentViewProps* oldProps = prevProps == nullptr - ? &defaultProps - : static_cast(prevProps); - if (this == oldProps) { - return folly::dynamic::object(); - } - folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps); - - if (removeClippedSubviews != oldProps->removeClippedSubviews) { - result["removeClippedSubviews"] = removeClippedSubviews; - } - return result; -} -#endif -AndroidSwipeRefreshLayoutProps::AndroidSwipeRefreshLayoutProps( - const PropsParserContext &context, - const AndroidSwipeRefreshLayoutProps &sourceProps, - const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), - - enabled(convertRawProp(context, rawProps, "enabled", sourceProps.enabled, {true})), - colors(convertRawProp(context, rawProps, "colors", sourceProps.colors, {})), - progressBackgroundColor(convertRawProp(context, rawProps, "progressBackgroundColor", sourceProps.progressBackgroundColor, {})), - size(convertRawProp(context, rawProps, "size", sourceProps.size, {AndroidSwipeRefreshLayoutSize::Default})), - progressViewOffset(convertRawProp(context, rawProps, "progressViewOffset", sourceProps.progressViewOffset, {0.0})), - refreshing(convertRawProp(context, rawProps, "refreshing", sourceProps.refreshing, {false})) {} - -#ifdef RN_SERIALIZABLE_STATE -ComponentName AndroidSwipeRefreshLayoutProps::getDiffPropsImplementationTarget() const { - return "AndroidSwipeRefreshLayout"; -} - -folly::dynamic AndroidSwipeRefreshLayoutProps::getDiffProps( - const Props* prevProps) const { - static const auto defaultProps = AndroidSwipeRefreshLayoutProps(); - const AndroidSwipeRefreshLayoutProps* oldProps = prevProps == nullptr - ? &defaultProps - : static_cast(prevProps); - if (this == oldProps) { - return folly::dynamic::object(); - } - folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps); - - if (enabled != oldProps->enabled) { - result["enabled"] = enabled; - } - - if (colors != oldProps->colors) { - result["colors"] = toDynamic(colors); - } - - if (progressBackgroundColor != oldProps->progressBackgroundColor) { - result["progressBackgroundColor"] = *progressBackgroundColor; - } - - if (size != oldProps->size) { - result["size"] = toDynamic(size); - } - - if ((progressViewOffset != oldProps->progressViewOffset) && !(std::isnan(progressViewOffset) && std::isnan(oldProps->progressViewOffset))) { - result["progressViewOffset"] = progressViewOffset; - } - - if (refreshing != oldProps->refreshing) { - result["refreshing"] = refreshing; - } - return result; -} -#endif -AndroidSwitchProps::AndroidSwitchProps( - const PropsParserContext &context, - const AndroidSwitchProps &sourceProps, - const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), - - disabled(convertRawProp(context, rawProps, "disabled", sourceProps.disabled, {false})), - enabled(convertRawProp(context, rawProps, "enabled", sourceProps.enabled, {true})), - thumbColor(convertRawProp(context, rawProps, "thumbColor", sourceProps.thumbColor, {})), - trackColorForFalse(convertRawProp(context, rawProps, "trackColorForFalse", sourceProps.trackColorForFalse, {})), - trackColorForTrue(convertRawProp(context, rawProps, "trackColorForTrue", sourceProps.trackColorForTrue, {})), - value(convertRawProp(context, rawProps, "value", sourceProps.value, {false})), - on(convertRawProp(context, rawProps, "on", sourceProps.on, {false})), - thumbTintColor(convertRawProp(context, rawProps, "thumbTintColor", sourceProps.thumbTintColor, {})), - trackTintColor(convertRawProp(context, rawProps, "trackTintColor", sourceProps.trackTintColor, {})) {} - -#ifdef RN_SERIALIZABLE_STATE -ComponentName AndroidSwitchProps::getDiffPropsImplementationTarget() const { - return "AndroidSwitch"; -} - -folly::dynamic AndroidSwitchProps::getDiffProps( - const Props* prevProps) const { - static const auto defaultProps = AndroidSwitchProps(); - const AndroidSwitchProps* oldProps = prevProps == nullptr - ? &defaultProps - : static_cast(prevProps); - if (this == oldProps) { - return folly::dynamic::object(); - } - folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps); - - if (disabled != oldProps->disabled) { - result["disabled"] = disabled; - } - - if (enabled != oldProps->enabled) { - result["enabled"] = enabled; - } - - if (thumbColor != oldProps->thumbColor) { - result["thumbColor"] = *thumbColor; - } - - if (trackColorForFalse != oldProps->trackColorForFalse) { - result["trackColorForFalse"] = *trackColorForFalse; - } - - if (trackColorForTrue != oldProps->trackColorForTrue) { - result["trackColorForTrue"] = *trackColorForTrue; - } - - if (value != oldProps->value) { - result["value"] = value; - } - - if (on != oldProps->on) { - result["on"] = on; - } - - if (thumbTintColor != oldProps->thumbTintColor) { - result["thumbTintColor"] = *thumbTintColor; - } - - if (trackTintColor != oldProps->trackTintColor) { - result["trackTintColor"] = *trackTintColor; - } - return result; -} -#endif -DebuggingOverlayProps::DebuggingOverlayProps( - const PropsParserContext &context, - const DebuggingOverlayProps &sourceProps, - const RawProps &rawProps): ViewProps(context, sourceProps, rawProps) - - {} - -#ifdef RN_SERIALIZABLE_STATE -ComponentName DebuggingOverlayProps::getDiffPropsImplementationTarget() const { - return "DebuggingOverlay"; -} - -folly::dynamic DebuggingOverlayProps::getDiffProps( - const Props* prevProps) const { - static const auto defaultProps = DebuggingOverlayProps(); - const DebuggingOverlayProps* oldProps = prevProps == nullptr - ? &defaultProps - : static_cast(prevProps); - if (this == oldProps) { - return folly::dynamic::object(); - } - folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps); - - return result; -} -#endif -AndroidProgressBarProps::AndroidProgressBarProps( - const PropsParserContext &context, - const AndroidProgressBarProps &sourceProps, - const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), - - styleAttr(convertRawProp(context, rawProps, "styleAttr", sourceProps.styleAttr, {})), - typeAttr(convertRawProp(context, rawProps, "typeAttr", sourceProps.typeAttr, {})), - indeterminate(convertRawProp(context, rawProps, "indeterminate", sourceProps.indeterminate, {false})), - progress(convertRawProp(context, rawProps, "progress", sourceProps.progress, {0.0})), - animating(convertRawProp(context, rawProps, "animating", sourceProps.animating, {true})), - color(convertRawProp(context, rawProps, "color", sourceProps.color, {})), - testID(convertRawProp(context, rawProps, "testID", sourceProps.testID, {""})) {} - -#ifdef RN_SERIALIZABLE_STATE -ComponentName AndroidProgressBarProps::getDiffPropsImplementationTarget() const { - return "AndroidProgressBar"; -} - -folly::dynamic AndroidProgressBarProps::getDiffProps( - const Props* prevProps) const { - static const auto defaultProps = AndroidProgressBarProps(); - const AndroidProgressBarProps* oldProps = prevProps == nullptr - ? &defaultProps - : static_cast(prevProps); - if (this == oldProps) { - return folly::dynamic::object(); - } - folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps); - - if (styleAttr != oldProps->styleAttr) { - result["styleAttr"] = styleAttr; - } - - if (typeAttr != oldProps->typeAttr) { - result["typeAttr"] = typeAttr; - } - - if (indeterminate != oldProps->indeterminate) { - result["indeterminate"] = indeterminate; - } - - if ((progress != oldProps->progress) && !(std::isnan(progress) && std::isnan(oldProps->progress))) { - result["progress"] = progress; - } - - if (animating != oldProps->animating) { - result["animating"] = animating; - } - - if (color != oldProps->color) { - result["color"] = *color; - } - - if (testID != oldProps->testID) { - result["testID"] = testID; - } - return result; -} -#endif -PullToRefreshViewProps::PullToRefreshViewProps( - const PropsParserContext &context, - const PullToRefreshViewProps &sourceProps, - const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), - - tintColor(convertRawProp(context, rawProps, "tintColor", sourceProps.tintColor, {})), - titleColor(convertRawProp(context, rawProps, "titleColor", sourceProps.titleColor, {})), - title(convertRawProp(context, rawProps, "title", sourceProps.title, {})), - progressViewOffset(convertRawProp(context, rawProps, "progressViewOffset", sourceProps.progressViewOffset, {0.0})), - refreshing(convertRawProp(context, rawProps, "refreshing", sourceProps.refreshing, {false})) {} - -#ifdef RN_SERIALIZABLE_STATE -ComponentName PullToRefreshViewProps::getDiffPropsImplementationTarget() const { - return "PullToRefreshView"; -} - -folly::dynamic PullToRefreshViewProps::getDiffProps( - const Props* prevProps) const { - static const auto defaultProps = PullToRefreshViewProps(); - const PullToRefreshViewProps* oldProps = prevProps == nullptr - ? &defaultProps - : static_cast(prevProps); - if (this == oldProps) { - return folly::dynamic::object(); - } - folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps); - - if (tintColor != oldProps->tintColor) { - result["tintColor"] = *tintColor; - } - - if (titleColor != oldProps->titleColor) { - result["titleColor"] = *titleColor; - } - - if (title != oldProps->title) { - result["title"] = title; - } - - if ((progressViewOffset != oldProps->progressViewOffset) && !(std::isnan(progressViewOffset) && std::isnan(oldProps->progressViewOffset))) { - result["progressViewOffset"] = progressViewOffset; - } - - if (refreshing != oldProps->refreshing) { - result["refreshing"] = refreshing; - } - return result; -} -#endif -InputAccessoryProps::InputAccessoryProps( - const PropsParserContext &context, - const InputAccessoryProps &sourceProps, - const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), - - backgroundColor(convertRawProp(context, rawProps, "backgroundColor", sourceProps.backgroundColor, {})) {} - -#ifdef RN_SERIALIZABLE_STATE -ComponentName InputAccessoryProps::getDiffPropsImplementationTarget() const { - return "InputAccessory"; -} - -folly::dynamic InputAccessoryProps::getDiffProps( - const Props* prevProps) const { - static const auto defaultProps = InputAccessoryProps(); - const InputAccessoryProps* oldProps = prevProps == nullptr - ? &defaultProps - : static_cast(prevProps); - if (this == oldProps) { - return folly::dynamic::object(); - } - folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps); - - if (backgroundColor != oldProps->backgroundColor) { - result["backgroundColor"] = *backgroundColor; - } - return result; -} -#endif -ModalHostViewProps::ModalHostViewProps( - const PropsParserContext &context, - const ModalHostViewProps &sourceProps, - const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), - - animationType(convertRawProp(context, rawProps, "animationType", sourceProps.animationType, {ModalHostViewAnimationType::None})), - presentationStyle(convertRawProp(context, rawProps, "presentationStyle", sourceProps.presentationStyle, {ModalHostViewPresentationStyle::FullScreen})), - transparent(convertRawProp(context, rawProps, "transparent", sourceProps.transparent, {false})), - statusBarTranslucent(convertRawProp(context, rawProps, "statusBarTranslucent", sourceProps.statusBarTranslucent, {false})), - navigationBarTranslucent(convertRawProp(context, rawProps, "navigationBarTranslucent", sourceProps.navigationBarTranslucent, {false})), - hardwareAccelerated(convertRawProp(context, rawProps, "hardwareAccelerated", sourceProps.hardwareAccelerated, {false})), - visible(convertRawProp(context, rawProps, "visible", sourceProps.visible, {false})), - animated(convertRawProp(context, rawProps, "animated", sourceProps.animated, {false})), - allowSwipeDismissal(convertRawProp(context, rawProps, "allowSwipeDismissal", sourceProps.allowSwipeDismissal, {false})), - supportedOrientations(convertRawProp(context, rawProps, "supportedOrientations", ModalHostViewSupportedOrientationsMaskWrapped{ .value = sourceProps.supportedOrientations }, {static_cast(ModalHostViewSupportedOrientations::Portrait)}).value), - identifier(convertRawProp(context, rawProps, "identifier", sourceProps.identifier, {0})), - title(convertRawProp(context, rawProps, "title", sourceProps.title, {})) {} - -#ifdef RN_SERIALIZABLE_STATE -ComponentName ModalHostViewProps::getDiffPropsImplementationTarget() const { - return "ModalHostView"; -} - -folly::dynamic ModalHostViewProps::getDiffProps( - const Props* prevProps) const { - static const auto defaultProps = ModalHostViewProps(); - const ModalHostViewProps* oldProps = prevProps == nullptr - ? &defaultProps - : static_cast(prevProps); - if (this == oldProps) { - return folly::dynamic::object(); - } - folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps); - - if (animationType != oldProps->animationType) { - result["animationType"] = toDynamic(animationType); - } - - if (presentationStyle != oldProps->presentationStyle) { - result["presentationStyle"] = toDynamic(presentationStyle); - } - - if (transparent != oldProps->transparent) { - result["transparent"] = transparent; - } - - if (statusBarTranslucent != oldProps->statusBarTranslucent) { - result["statusBarTranslucent"] = statusBarTranslucent; - } - - if (navigationBarTranslucent != oldProps->navigationBarTranslucent) { - result["navigationBarTranslucent"] = navigationBarTranslucent; - } - - if (hardwareAccelerated != oldProps->hardwareAccelerated) { - result["hardwareAccelerated"] = hardwareAccelerated; - } - - if (visible != oldProps->visible) { - result["visible"] = visible; - } - - if (animated != oldProps->animated) { - result["animated"] = animated; - } - - if (allowSwipeDismissal != oldProps->allowSwipeDismissal) { - result["allowSwipeDismissal"] = allowSwipeDismissal; - } - - if (supportedOrientations != oldProps->supportedOrientations) { - result["supportedOrientations"] = toDynamic(supportedOrientations); - } - - if (identifier != oldProps->identifier) { - result["identifier"] = identifier; - } - - if (title != oldProps->title) { - result["title"] = title; - } - return result; -} -#endif -SafeAreaViewProps::SafeAreaViewProps( - const PropsParserContext &context, - const SafeAreaViewProps &sourceProps, - const RawProps &rawProps): ViewProps(context, sourceProps, rawProps) - - {} - -#ifdef RN_SERIALIZABLE_STATE -ComponentName SafeAreaViewProps::getDiffPropsImplementationTarget() const { - return "SafeAreaView"; -} - -folly::dynamic SafeAreaViewProps::getDiffProps( - const Props* prevProps) const { - static const auto defaultProps = SafeAreaViewProps(); - const SafeAreaViewProps* oldProps = prevProps == nullptr - ? &defaultProps - : static_cast(prevProps); - if (this == oldProps) { - return folly::dynamic::object(); - } - folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps); - - return result; -} -#endif -SwitchProps::SwitchProps( - const PropsParserContext &context, - const SwitchProps &sourceProps, - const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), - - disabled(convertRawProp(context, rawProps, "disabled", sourceProps.disabled, {false})), - value(convertRawProp(context, rawProps, "value", sourceProps.value, {false})), - tintColor(convertRawProp(context, rawProps, "tintColor", sourceProps.tintColor, {})), - onTintColor(convertRawProp(context, rawProps, "onTintColor", sourceProps.onTintColor, {})), - thumbTintColor(convertRawProp(context, rawProps, "thumbTintColor", sourceProps.thumbTintColor, {})), - thumbColor(convertRawProp(context, rawProps, "thumbColor", sourceProps.thumbColor, {})), - trackColorForFalse(convertRawProp(context, rawProps, "trackColorForFalse", sourceProps.trackColorForFalse, {})), - trackColorForTrue(convertRawProp(context, rawProps, "trackColorForTrue", sourceProps.trackColorForTrue, {})) {} - -#ifdef RN_SERIALIZABLE_STATE -ComponentName SwitchProps::getDiffPropsImplementationTarget() const { - return "Switch"; -} - -folly::dynamic SwitchProps::getDiffProps( - const Props* prevProps) const { - static const auto defaultProps = SwitchProps(); - const SwitchProps* oldProps = prevProps == nullptr - ? &defaultProps - : static_cast(prevProps); - if (this == oldProps) { - return folly::dynamic::object(); - } - folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps); - - if (disabled != oldProps->disabled) { - result["disabled"] = disabled; - } - - if (value != oldProps->value) { - result["value"] = value; - } - - if (tintColor != oldProps->tintColor) { - result["tintColor"] = *tintColor; - } - - if (onTintColor != oldProps->onTintColor) { - result["onTintColor"] = *onTintColor; - } - - if (thumbTintColor != oldProps->thumbTintColor) { - result["thumbTintColor"] = *thumbTintColor; - } - - if (thumbColor != oldProps->thumbColor) { - result["thumbColor"] = *thumbColor; - } - - if (trackColorForFalse != oldProps->trackColorForFalse) { - result["trackColorForFalse"] = *trackColorForFalse; - } - - if (trackColorForTrue != oldProps->trackColorForTrue) { - result["trackColorForTrue"] = *trackColorForTrue; - } - return result; -} -#endif -UnimplementedNativeViewProps::UnimplementedNativeViewProps( - const PropsParserContext &context, - const UnimplementedNativeViewProps &sourceProps, - const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), - - name(convertRawProp(context, rawProps, "name", sourceProps.name, {""})) {} - -#ifdef RN_SERIALIZABLE_STATE -ComponentName UnimplementedNativeViewProps::getDiffPropsImplementationTarget() const { - return "UnimplementedNativeView"; -} - -folly::dynamic UnimplementedNativeViewProps::getDiffProps( - const Props* prevProps) const { - static const auto defaultProps = UnimplementedNativeViewProps(); - const UnimplementedNativeViewProps* oldProps = prevProps == nullptr - ? &defaultProps - : static_cast(prevProps); - if (this == oldProps) { - return folly::dynamic::object(); - } - folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps); - - if (name != oldProps->name) { - result["name"] = name; - } - return result; -} -#endif - -} // namespace facebook::react diff --git a/vnext/codegen/react/components/rnwcore/Props.h b/vnext/codegen/react/components/rnwcore/Props.h deleted file mode 100644 index 507e1f0460c..00000000000 --- a/vnext/codegen/react/components/rnwcore/Props.h +++ /dev/null @@ -1,553 +0,0 @@ - -/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * @generated by codegen project: GeneratePropsH.js - */ -#pragma once - -#include -#include -#include -#include -#include - -namespace facebook::react { - -class VirtualViewExperimentalProps final : public ViewProps { - public: - VirtualViewExperimentalProps() = default; - VirtualViewExperimentalProps(const PropsParserContext& context, const VirtualViewExperimentalProps &sourceProps, const RawProps &rawProps); - -#pragma mark - Props - - bool initialHidden{false}; - int renderState{0}; - - #ifdef RN_SERIALIZABLE_STATE - ComponentName getDiffPropsImplementationTarget() const override; - - folly::dynamic getDiffProps(const Props* prevProps) const override; - #endif -}; - -class VirtualViewProps final : public ViewProps { - public: - VirtualViewProps() = default; - VirtualViewProps(const PropsParserContext& context, const VirtualViewProps &sourceProps, const RawProps &rawProps); - -#pragma mark - Props - - bool initialHidden{false}; - int renderState{0}; - - #ifdef RN_SERIALIZABLE_STATE - ComponentName getDiffPropsImplementationTarget() const override; - - folly::dynamic getDiffProps(const Props* prevProps) const override; - #endif -}; - -enum class ActivityIndicatorViewSize { Small, Large }; - -static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ActivityIndicatorViewSize &result) { - auto string = (std::string)value; - if (string == "small") { result = ActivityIndicatorViewSize::Small; return; } - if (string == "large") { result = ActivityIndicatorViewSize::Large; return; } - abort(); -} - -static inline std::string toString(const ActivityIndicatorViewSize &value) { - switch (value) { - case ActivityIndicatorViewSize::Small: return "small"; - case ActivityIndicatorViewSize::Large: return "large"; - } -} - -#ifdef RN_SERIALIZABLE_STATE -static inline folly::dynamic toDynamic(const ActivityIndicatorViewSize &value) { - return toString(value); -} -#endif - -class ActivityIndicatorViewProps final : public ViewProps { - public: - ActivityIndicatorViewProps() = default; - ActivityIndicatorViewProps(const PropsParserContext& context, const ActivityIndicatorViewProps &sourceProps, const RawProps &rawProps); - -#pragma mark - Props - - bool hidesWhenStopped{true}; - bool animating{true}; - SharedColor color{}; - ActivityIndicatorViewSize size{ActivityIndicatorViewSize::Small}; - - #ifdef RN_SERIALIZABLE_STATE - ComponentName getDiffPropsImplementationTarget() const override; - - folly::dynamic getDiffProps(const Props* prevProps) const override; - #endif -}; - -enum class AndroidDrawerLayoutKeyboardDismissMode { None, OnDrag }; - -static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, AndroidDrawerLayoutKeyboardDismissMode &result) { - auto string = (std::string)value; - if (string == "none") { result = AndroidDrawerLayoutKeyboardDismissMode::None; return; } - if (string == "on-drag") { result = AndroidDrawerLayoutKeyboardDismissMode::OnDrag; return; } - abort(); -} - -static inline std::string toString(const AndroidDrawerLayoutKeyboardDismissMode &value) { - switch (value) { - case AndroidDrawerLayoutKeyboardDismissMode::None: return "none"; - case AndroidDrawerLayoutKeyboardDismissMode::OnDrag: return "on-drag"; - } -} - -#ifdef RN_SERIALIZABLE_STATE -static inline folly::dynamic toDynamic(const AndroidDrawerLayoutKeyboardDismissMode &value) { - return toString(value); -} -#endif -enum class AndroidDrawerLayoutDrawerPosition { Left, Right }; - -static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, AndroidDrawerLayoutDrawerPosition &result) { - auto string = (std::string)value; - if (string == "left") { result = AndroidDrawerLayoutDrawerPosition::Left; return; } - if (string == "right") { result = AndroidDrawerLayoutDrawerPosition::Right; return; } - abort(); -} - -static inline std::string toString(const AndroidDrawerLayoutDrawerPosition &value) { - switch (value) { - case AndroidDrawerLayoutDrawerPosition::Left: return "left"; - case AndroidDrawerLayoutDrawerPosition::Right: return "right"; - } -} - -#ifdef RN_SERIALIZABLE_STATE -static inline folly::dynamic toDynamic(const AndroidDrawerLayoutDrawerPosition &value) { - return toString(value); -} -#endif -enum class AndroidDrawerLayoutDrawerLockMode { Unlocked, LockedClosed, LockedOpen }; - -static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, AndroidDrawerLayoutDrawerLockMode &result) { - auto string = (std::string)value; - if (string == "unlocked") { result = AndroidDrawerLayoutDrawerLockMode::Unlocked; return; } - if (string == "locked-closed") { result = AndroidDrawerLayoutDrawerLockMode::LockedClosed; return; } - if (string == "locked-open") { result = AndroidDrawerLayoutDrawerLockMode::LockedOpen; return; } - abort(); -} - -static inline std::string toString(const AndroidDrawerLayoutDrawerLockMode &value) { - switch (value) { - case AndroidDrawerLayoutDrawerLockMode::Unlocked: return "unlocked"; - case AndroidDrawerLayoutDrawerLockMode::LockedClosed: return "locked-closed"; - case AndroidDrawerLayoutDrawerLockMode::LockedOpen: return "locked-open"; - } -} - -#ifdef RN_SERIALIZABLE_STATE -static inline folly::dynamic toDynamic(const AndroidDrawerLayoutDrawerLockMode &value) { - return toString(value); -} -#endif - -class AndroidDrawerLayoutProps final : public ViewProps { - public: - AndroidDrawerLayoutProps() = default; - AndroidDrawerLayoutProps(const PropsParserContext& context, const AndroidDrawerLayoutProps &sourceProps, const RawProps &rawProps); - -#pragma mark - Props - - AndroidDrawerLayoutKeyboardDismissMode keyboardDismissMode{AndroidDrawerLayoutKeyboardDismissMode::None}; - SharedColor drawerBackgroundColor{}; - AndroidDrawerLayoutDrawerPosition drawerPosition{AndroidDrawerLayoutDrawerPosition::Left}; - Float drawerWidth{}; - AndroidDrawerLayoutDrawerLockMode drawerLockMode{AndroidDrawerLayoutDrawerLockMode::Unlocked}; - SharedColor statusBarBackgroundColor{}; - - #ifdef RN_SERIALIZABLE_STATE - ComponentName getDiffPropsImplementationTarget() const override; - - folly::dynamic getDiffProps(const Props* prevProps) const override; - #endif -}; - -class AndroidHorizontalScrollContentViewProps final : public ViewProps { - public: - AndroidHorizontalScrollContentViewProps() = default; - AndroidHorizontalScrollContentViewProps(const PropsParserContext& context, const AndroidHorizontalScrollContentViewProps &sourceProps, const RawProps &rawProps); - -#pragma mark - Props - - bool removeClippedSubviews{false}; - - #ifdef RN_SERIALIZABLE_STATE - ComponentName getDiffPropsImplementationTarget() const override; - - folly::dynamic getDiffProps(const Props* prevProps) const override; - #endif -}; - -enum class AndroidSwipeRefreshLayoutSize { Default, Large }; - -static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, AndroidSwipeRefreshLayoutSize &result) { - auto string = (std::string)value; - if (string == "default") { result = AndroidSwipeRefreshLayoutSize::Default; return; } - if (string == "large") { result = AndroidSwipeRefreshLayoutSize::Large; return; } - abort(); -} - -static inline std::string toString(const AndroidSwipeRefreshLayoutSize &value) { - switch (value) { - case AndroidSwipeRefreshLayoutSize::Default: return "default"; - case AndroidSwipeRefreshLayoutSize::Large: return "large"; - } -} - -#ifdef RN_SERIALIZABLE_STATE -static inline folly::dynamic toDynamic(const AndroidSwipeRefreshLayoutSize &value) { - return toString(value); -} -#endif - -class AndroidSwipeRefreshLayoutProps final : public ViewProps { - public: - AndroidSwipeRefreshLayoutProps() = default; - AndroidSwipeRefreshLayoutProps(const PropsParserContext& context, const AndroidSwipeRefreshLayoutProps &sourceProps, const RawProps &rawProps); - -#pragma mark - Props - - bool enabled{true}; - std::vector colors{}; - SharedColor progressBackgroundColor{}; - AndroidSwipeRefreshLayoutSize size{AndroidSwipeRefreshLayoutSize::Default}; - Float progressViewOffset{0.0}; - bool refreshing{false}; - - #ifdef RN_SERIALIZABLE_STATE - ComponentName getDiffPropsImplementationTarget() const override; - - folly::dynamic getDiffProps(const Props* prevProps) const override; - #endif -}; - -class AndroidSwitchProps final : public ViewProps { - public: - AndroidSwitchProps() = default; - AndroidSwitchProps(const PropsParserContext& context, const AndroidSwitchProps &sourceProps, const RawProps &rawProps); - -#pragma mark - Props - - bool disabled{false}; - bool enabled{true}; - SharedColor thumbColor{}; - SharedColor trackColorForFalse{}; - SharedColor trackColorForTrue{}; - bool value{false}; - bool on{false}; - SharedColor thumbTintColor{}; - SharedColor trackTintColor{}; - - #ifdef RN_SERIALIZABLE_STATE - ComponentName getDiffPropsImplementationTarget() const override; - - folly::dynamic getDiffProps(const Props* prevProps) const override; - #endif -}; - -class DebuggingOverlayProps final : public ViewProps { - public: - DebuggingOverlayProps() = default; - DebuggingOverlayProps(const PropsParserContext& context, const DebuggingOverlayProps &sourceProps, const RawProps &rawProps); - -#pragma mark - Props - - - - #ifdef RN_SERIALIZABLE_STATE - ComponentName getDiffPropsImplementationTarget() const override; - - folly::dynamic getDiffProps(const Props* prevProps) const override; - #endif -}; - -class AndroidProgressBarProps final : public ViewProps { - public: - AndroidProgressBarProps() = default; - AndroidProgressBarProps(const PropsParserContext& context, const AndroidProgressBarProps &sourceProps, const RawProps &rawProps); - -#pragma mark - Props - - std::string styleAttr{}; - std::string typeAttr{}; - bool indeterminate{false}; - double progress{0.0}; - bool animating{true}; - SharedColor color{}; - std::string testID{""}; - - #ifdef RN_SERIALIZABLE_STATE - ComponentName getDiffPropsImplementationTarget() const override; - - folly::dynamic getDiffProps(const Props* prevProps) const override; - #endif -}; - -class PullToRefreshViewProps final : public ViewProps { - public: - PullToRefreshViewProps() = default; - PullToRefreshViewProps(const PropsParserContext& context, const PullToRefreshViewProps &sourceProps, const RawProps &rawProps); - -#pragma mark - Props - - SharedColor tintColor{}; - SharedColor titleColor{}; - std::string title{}; - Float progressViewOffset{0.0}; - bool refreshing{false}; - - #ifdef RN_SERIALIZABLE_STATE - ComponentName getDiffPropsImplementationTarget() const override; - - folly::dynamic getDiffProps(const Props* prevProps) const override; - #endif -}; - -class InputAccessoryProps final : public ViewProps { - public: - InputAccessoryProps() = default; - InputAccessoryProps(const PropsParserContext& context, const InputAccessoryProps &sourceProps, const RawProps &rawProps); - -#pragma mark - Props - - SharedColor backgroundColor{}; - - #ifdef RN_SERIALIZABLE_STATE - ComponentName getDiffPropsImplementationTarget() const override; - - folly::dynamic getDiffProps(const Props* prevProps) const override; - #endif -}; - -enum class ModalHostViewAnimationType { None, Slide, Fade }; - -static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ModalHostViewAnimationType &result) { - auto string = (std::string)value; - if (string == "none") { result = ModalHostViewAnimationType::None; return; } - if (string == "slide") { result = ModalHostViewAnimationType::Slide; return; } - if (string == "fade") { result = ModalHostViewAnimationType::Fade; return; } - abort(); -} - -static inline std::string toString(const ModalHostViewAnimationType &value) { - switch (value) { - case ModalHostViewAnimationType::None: return "none"; - case ModalHostViewAnimationType::Slide: return "slide"; - case ModalHostViewAnimationType::Fade: return "fade"; - } -} - -#ifdef RN_SERIALIZABLE_STATE -static inline folly::dynamic toDynamic(const ModalHostViewAnimationType &value) { - return toString(value); -} -#endif -enum class ModalHostViewPresentationStyle { FullScreen, PageSheet, FormSheet, OverFullScreen }; - -static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ModalHostViewPresentationStyle &result) { - auto string = (std::string)value; - if (string == "fullScreen") { result = ModalHostViewPresentationStyle::FullScreen; return; } - if (string == "pageSheet") { result = ModalHostViewPresentationStyle::PageSheet; return; } - if (string == "formSheet") { result = ModalHostViewPresentationStyle::FormSheet; return; } - if (string == "overFullScreen") { result = ModalHostViewPresentationStyle::OverFullScreen; return; } - abort(); -} - -static inline std::string toString(const ModalHostViewPresentationStyle &value) { - switch (value) { - case ModalHostViewPresentationStyle::FullScreen: return "fullScreen"; - case ModalHostViewPresentationStyle::PageSheet: return "pageSheet"; - case ModalHostViewPresentationStyle::FormSheet: return "formSheet"; - case ModalHostViewPresentationStyle::OverFullScreen: return "overFullScreen"; - } -} - -#ifdef RN_SERIALIZABLE_STATE -static inline folly::dynamic toDynamic(const ModalHostViewPresentationStyle &value) { - return toString(value); -} -#endif -using ModalHostViewSupportedOrientationsMask = uint32_t; - -struct ModalHostViewSupportedOrientationsMaskWrapped { - ModalHostViewSupportedOrientationsMask value; -}; - -enum class ModalHostViewSupportedOrientations: ModalHostViewSupportedOrientationsMask { - Portrait = 1 << 0, - PortraitUpsideDown = 1 << 1, - Landscape = 1 << 2, - LandscapeLeft = 1 << 3, - LandscapeRight = 1 << 4 -}; - -constexpr bool operator&( - ModalHostViewSupportedOrientationsMask const lhs, - enum ModalHostViewSupportedOrientations const rhs) { - return lhs & static_cast(rhs); -} - -constexpr ModalHostViewSupportedOrientationsMask operator|( - ModalHostViewSupportedOrientationsMask const lhs, - enum ModalHostViewSupportedOrientations const rhs) { - return lhs | static_cast(rhs); -} - -constexpr void operator|=( - ModalHostViewSupportedOrientationsMask &lhs, - enum ModalHostViewSupportedOrientations const rhs) { - lhs = lhs | static_cast(rhs); -} - -static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ModalHostViewSupportedOrientationsMaskWrapped &wrapped) { - auto items = std::vector{value}; - for (const auto &item : items) { - if (item == "portrait") { - wrapped.value |= ModalHostViewSupportedOrientations::Portrait; - continue; - } - if (item == "portrait-upside-down") { - wrapped.value |= ModalHostViewSupportedOrientations::PortraitUpsideDown; - continue; - } - if (item == "landscape") { - wrapped.value |= ModalHostViewSupportedOrientations::Landscape; - continue; - } - if (item == "landscape-left") { - wrapped.value |= ModalHostViewSupportedOrientations::LandscapeLeft; - continue; - } - if (item == "landscape-right") { - wrapped.value |= ModalHostViewSupportedOrientations::LandscapeRight; - continue; - } - abort(); - } -} - -static inline std::string toString(const ModalHostViewSupportedOrientationsMaskWrapped &wrapped) { - auto result = std::string{}; - auto separator = std::string{", "}; - - if (wrapped.value & ModalHostViewSupportedOrientations::Portrait) { - result += "portrait" + separator; - } - if (wrapped.value & ModalHostViewSupportedOrientations::PortraitUpsideDown) { - result += "portrait-upside-down" + separator; - } - if (wrapped.value & ModalHostViewSupportedOrientations::Landscape) { - result += "landscape" + separator; - } - if (wrapped.value & ModalHostViewSupportedOrientations::LandscapeLeft) { - result += "landscape-left" + separator; - } - if (wrapped.value & ModalHostViewSupportedOrientations::LandscapeRight) { - result += "landscape-right" + separator; - } - if (!result.empty()) { - result.erase(result.length() - separator.length()); - } - return result; -} - -class ModalHostViewProps final : public ViewProps { - public: - ModalHostViewProps() = default; - ModalHostViewProps(const PropsParserContext& context, const ModalHostViewProps &sourceProps, const RawProps &rawProps); - -#pragma mark - Props - - ModalHostViewAnimationType animationType{ModalHostViewAnimationType::None}; - ModalHostViewPresentationStyle presentationStyle{ModalHostViewPresentationStyle::FullScreen}; - bool transparent{false}; - bool statusBarTranslucent{false}; - bool navigationBarTranslucent{false}; - bool hardwareAccelerated{false}; - bool visible{false}; - bool animated{false}; - bool allowSwipeDismissal{false}; - ModalHostViewSupportedOrientationsMask supportedOrientations{static_cast(ModalHostViewSupportedOrientations::Portrait)}; - int identifier{0}; - std::string title{}; - - #ifdef RN_SERIALIZABLE_STATE - ComponentName getDiffPropsImplementationTarget() const override; - - folly::dynamic getDiffProps(const Props* prevProps) const override; - #endif -}; - -class SafeAreaViewProps final : public ViewProps { - public: - SafeAreaViewProps() = default; - SafeAreaViewProps(const PropsParserContext& context, const SafeAreaViewProps &sourceProps, const RawProps &rawProps); - -#pragma mark - Props - - - - #ifdef RN_SERIALIZABLE_STATE - ComponentName getDiffPropsImplementationTarget() const override; - - folly::dynamic getDiffProps(const Props* prevProps) const override; - #endif -}; - -class SwitchProps final : public ViewProps { - public: - SwitchProps() = default; - SwitchProps(const PropsParserContext& context, const SwitchProps &sourceProps, const RawProps &rawProps); - -#pragma mark - Props - - bool disabled{false}; - bool value{false}; - SharedColor tintColor{}; - SharedColor onTintColor{}; - SharedColor thumbTintColor{}; - SharedColor thumbColor{}; - SharedColor trackColorForFalse{}; - SharedColor trackColorForTrue{}; - - #ifdef RN_SERIALIZABLE_STATE - ComponentName getDiffPropsImplementationTarget() const override; - - folly::dynamic getDiffProps(const Props* prevProps) const override; - #endif -}; - -class UnimplementedNativeViewProps final : public ViewProps { - public: - UnimplementedNativeViewProps() = default; - UnimplementedNativeViewProps(const PropsParserContext& context, const UnimplementedNativeViewProps &sourceProps, const RawProps &rawProps); - -#pragma mark - Props - - std::string name{""}; - - #ifdef RN_SERIALIZABLE_STATE - ComponentName getDiffPropsImplementationTarget() const override; - - folly::dynamic getDiffProps(const Props* prevProps) const override; - #endif -}; - -} // namespace facebook::react diff --git a/vnext/codegen/react/components/rnwcore/PullToRefreshView.g.h b/vnext/codegen/react/components/rnwcore/PullToRefreshView.g.h deleted file mode 100644 index bcb972aae78..00000000000 --- a/vnext/codegen/react/components/rnwcore/PullToRefreshView.g.h +++ /dev/null @@ -1,246 +0,0 @@ - -/* - * This file is auto-generated from PullToRefreshViewNativeComponent spec file in flow / TypeScript. - */ -// clang-format off -#pragma once - -#include - -#ifdef RNW_NEW_ARCH -#include - -#include -#include -#endif // #ifdef RNW_NEW_ARCH - -#ifdef RNW_NEW_ARCH - -namespace Microsoft::ReactNativeSpecs { - -REACT_STRUCT(PullToRefreshViewProps) -struct PullToRefreshViewProps : winrt::implements { - PullToRefreshViewProps(winrt::Microsoft::ReactNative::ViewProps props, const winrt::Microsoft::ReactNative::IComponentProps& cloneFrom) - : ViewProps(props) - { - if (cloneFrom) { - auto cloneFromProps = cloneFrom.as(); - tintColor = cloneFromProps->tintColor; - titleColor = cloneFromProps->titleColor; - title = cloneFromProps->title; - progressViewOffset = cloneFromProps->progressViewOffset; - refreshing = cloneFromProps->refreshing; - } - } - - void SetProp(uint32_t hash, winrt::hstring propName, winrt::Microsoft::ReactNative::IJSValueReader value) noexcept { - winrt::Microsoft::ReactNative::ReadProp(hash, propName, value, *this); - } - - REACT_FIELD(tintColor) - winrt::Microsoft::ReactNative::Color tintColor{nullptr}; - - REACT_FIELD(titleColor) - winrt::Microsoft::ReactNative::Color titleColor{nullptr}; - - REACT_FIELD(title) - std::optional title; - - REACT_FIELD(progressViewOffset) - std::optional progressViewOffset{}; - - REACT_FIELD(refreshing) - bool refreshing{}; - - const winrt::Microsoft::ReactNative::ViewProps ViewProps; -}; - -REACT_STRUCT(PullToRefreshView_OnRefresh) -struct PullToRefreshView_OnRefresh { -}; - -struct PullToRefreshViewEventEmitter { - PullToRefreshViewEventEmitter(const winrt::Microsoft::ReactNative::EventEmitter &eventEmitter) - : m_eventEmitter(eventEmitter) {} - - using OnRefresh = PullToRefreshView_OnRefresh; - - void onRefresh(OnRefresh &value) const { - m_eventEmitter.DispatchEvent(L"refresh", [value](const winrt::Microsoft::ReactNative::IJSValueWriter writer) { - winrt::Microsoft::ReactNative::WriteValue(writer, value); - }); - } - - private: - winrt::Microsoft::ReactNative::EventEmitter m_eventEmitter{nullptr}; -}; - -template -struct BasePullToRefreshView { - - virtual void UpdateProps( - const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::com_ptr &newProps, - const winrt::com_ptr &/*oldProps*/) noexcept { - m_props = newProps; - } - - // UpdateLayoutMetrics will only be called if this method is overridden - virtual void UpdateLayoutMetrics( - const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::LayoutMetrics &/*newLayoutMetrics*/, - const winrt::Microsoft::ReactNative::LayoutMetrics &/*oldLayoutMetrics*/) noexcept { - } - - // UpdateState will only be called if this method is overridden - virtual void UpdateState( - const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::IComponentState &/*newState*/) noexcept { - } - - virtual void UpdateEventEmitter(const std::shared_ptr &eventEmitter) noexcept { - m_eventEmitter = eventEmitter; - } - - // MountChildComponentView will only be called if this method is overridden - virtual void MountChildComponentView(const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::MountChildComponentViewArgs &/*args*/) noexcept { - } - - // UnmountChildComponentView will only be called if this method is overridden - virtual void UnmountChildComponentView(const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::UnmountChildComponentViewArgs &/*args*/) noexcept { - } - - // Initialize will only be called if this method is overridden - virtual void Initialize(const winrt::Microsoft::ReactNative::ComponentView &/*view*/) noexcept { - } - - // CreateVisual will only be called if this method is overridden - virtual winrt::Microsoft::UI::Composition::Visual CreateVisual(const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { - return view.as().Compositor().CreateSpriteVisual(); - } - - // FinalizeUpdate will only be called if this method is overridden - virtual void FinalizeUpdate(const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - winrt::Microsoft::ReactNative::ComponentViewUpdateMask /*mask*/) noexcept { - } - - // You must provide an implementation of this method to handle the "setNativeRefreshing" command - virtual void HandleSetNativeRefreshingCommand(bool refreshing) noexcept = 0; - - void HandleCommand(const winrt::Microsoft::ReactNative::ComponentView &view, const winrt::Microsoft::ReactNative::HandleCommandArgs& args) noexcept { - auto userData = view.UserData().as(); - auto commandName = args.CommandName(); - if (commandName == L"setNativeRefreshing") { - bool refreshing; - winrt::Microsoft::ReactNative::ReadArgs(args.CommandArgs(), refreshing); - userData->HandleSetNativeRefreshingCommand(refreshing); - return; - } - } - - const std::shared_ptr& EventEmitter() const { return m_eventEmitter; } - const winrt::com_ptr& Props() const { return m_props; } - -private: - winrt::com_ptr m_props; - std::shared_ptr m_eventEmitter; -}; - -template -void RegisterPullToRefreshViewNativeComponent( - winrt::Microsoft::ReactNative::IReactPackageBuilder const &packageBuilder, - std::function builderCallback) noexcept { - packageBuilder.as().AddViewComponent( - L"PullToRefreshView", [builderCallback](winrt::Microsoft::ReactNative::IReactViewComponentBuilder const &builder) noexcept { - auto compBuilder = builder.as(); - - builder.SetCreateProps([](winrt::Microsoft::ReactNative::ViewProps props, - const winrt::Microsoft::ReactNative::IComponentProps& cloneFrom) noexcept { - return winrt::make(props, cloneFrom); - }); - - builder.SetUpdatePropsHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::IComponentProps &newProps, - const winrt::Microsoft::ReactNative::IComponentProps &oldProps) noexcept { - auto userData = view.UserData().as(); - userData->UpdateProps(view, newProps ? newProps.as() : nullptr, oldProps ? oldProps.as() : nullptr); - }); - - compBuilder.SetUpdateLayoutMetricsHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::LayoutMetrics &newLayoutMetrics, - const winrt::Microsoft::ReactNative::LayoutMetrics &oldLayoutMetrics) noexcept { - auto userData = view.UserData().as(); - userData->UpdateLayoutMetrics(view, newLayoutMetrics, oldLayoutMetrics); - }); - - builder.SetUpdateEventEmitterHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::EventEmitter &eventEmitter) noexcept { - auto userData = view.UserData().as(); - userData->UpdateEventEmitter(std::make_shared(eventEmitter)); - }); - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::FinalizeUpdate != &BasePullToRefreshView::FinalizeUpdate) { - builder.SetFinalizeUpdateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - winrt::Microsoft::ReactNative::ComponentViewUpdateMask mask) noexcept { - auto userData = view.UserData().as(); - userData->FinalizeUpdate(view, mask); - }); - } - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UpdateState != &BasePullToRefreshView::UpdateState) { - builder.SetUpdateStateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::IComponentState &newState) noexcept { - auto userData = view.UserData().as(); - userData->UpdateState(view, newState); - }); - } - - builder.SetCustomCommandHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::HandleCommandArgs& args) noexcept { - auto userData = view.UserData().as(); - userData->HandleCommand(view, args); - }); - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::MountChildComponentView != &BasePullToRefreshView::MountChildComponentView) { - builder.SetMountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::MountChildComponentViewArgs &args) noexcept { - auto userData = view.UserData().as(); - return userData->MountChildComponentView(view, args); - }); - } - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UnmountChildComponentView != &BasePullToRefreshView::UnmountChildComponentView) { - builder.SetUnmountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::UnmountChildComponentViewArgs &args) noexcept { - auto userData = view.UserData().as(); - return userData->UnmountChildComponentView(view, args); - }); - } - - compBuilder.SetViewComponentViewInitializer([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { - auto userData = winrt::make_self(); - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::Initialize != &BasePullToRefreshView::Initialize) { - userData->Initialize(view); - } - view.UserData(*userData); - }); - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::CreateVisual != &BasePullToRefreshView::CreateVisual) { - compBuilder.SetCreateVisualHandler([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { - auto userData = view.UserData().as(); - return userData->CreateVisual(view); - }); - } - - // Allow app to further customize the builder - if (builderCallback) { - builderCallback(compBuilder); - } - }); -} - -} // namespace Microsoft::ReactNativeSpecs - -#endif // #ifdef RNW_NEW_ARCH diff --git a/vnext/codegen/react/components/rnwcore/SafeAreaView.g.h b/vnext/codegen/react/components/rnwcore/SafeAreaView.g.h deleted file mode 100644 index 6f37466ee69..00000000000 --- a/vnext/codegen/react/components/rnwcore/SafeAreaView.g.h +++ /dev/null @@ -1,197 +0,0 @@ - -/* - * This file is auto-generated from SafeAreaViewNativeComponent spec file in flow / TypeScript. - */ -// clang-format off -#pragma once - -#include - -#ifdef RNW_NEW_ARCH -#include - -#include -#include -#endif // #ifdef RNW_NEW_ARCH - -#ifdef RNW_NEW_ARCH - -namespace Microsoft::ReactNativeSpecs { - -REACT_STRUCT(SafeAreaViewProps) -struct SafeAreaViewProps : winrt::implements { - SafeAreaViewProps(winrt::Microsoft::ReactNative::ViewProps props, const winrt::Microsoft::ReactNative::IComponentProps& cloneFrom) - : ViewProps(props) - { - if (cloneFrom) { - auto cloneFromProps = cloneFrom.as(); - - } - } - - void SetProp(uint32_t hash, winrt::hstring propName, winrt::Microsoft::ReactNative::IJSValueReader value) noexcept { - winrt::Microsoft::ReactNative::ReadProp(hash, propName, value, *this); - } - - const winrt::Microsoft::ReactNative::ViewProps ViewProps; -}; - -struct SafeAreaViewEventEmitter { - SafeAreaViewEventEmitter(const winrt::Microsoft::ReactNative::EventEmitter &eventEmitter) - : m_eventEmitter(eventEmitter) {} - - private: - winrt::Microsoft::ReactNative::EventEmitter m_eventEmitter{nullptr}; -}; - -template -struct BaseSafeAreaView { - - virtual void UpdateProps( - const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::com_ptr &newProps, - const winrt::com_ptr &/*oldProps*/) noexcept { - m_props = newProps; - } - - // UpdateLayoutMetrics will only be called if this method is overridden - virtual void UpdateLayoutMetrics( - const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::LayoutMetrics &/*newLayoutMetrics*/, - const winrt::Microsoft::ReactNative::LayoutMetrics &/*oldLayoutMetrics*/) noexcept { - } - - // UpdateState will only be called if this method is overridden - virtual void UpdateState( - const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::IComponentState &/*newState*/) noexcept { - } - - virtual void UpdateEventEmitter(const std::shared_ptr &eventEmitter) noexcept { - m_eventEmitter = eventEmitter; - } - - // MountChildComponentView will only be called if this method is overridden - virtual void MountChildComponentView(const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::MountChildComponentViewArgs &/*args*/) noexcept { - } - - // UnmountChildComponentView will only be called if this method is overridden - virtual void UnmountChildComponentView(const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::UnmountChildComponentViewArgs &/*args*/) noexcept { - } - - // Initialize will only be called if this method is overridden - virtual void Initialize(const winrt::Microsoft::ReactNative::ComponentView &/*view*/) noexcept { - } - - // CreateVisual will only be called if this method is overridden - virtual winrt::Microsoft::UI::Composition::Visual CreateVisual(const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { - return view.as().Compositor().CreateSpriteVisual(); - } - - // FinalizeUpdate will only be called if this method is overridden - virtual void FinalizeUpdate(const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - winrt::Microsoft::ReactNative::ComponentViewUpdateMask /*mask*/) noexcept { - } - - - - const std::shared_ptr& EventEmitter() const { return m_eventEmitter; } - const winrt::com_ptr& Props() const { return m_props; } - -private: - winrt::com_ptr m_props; - std::shared_ptr m_eventEmitter; -}; - -template -void RegisterSafeAreaViewNativeComponent( - winrt::Microsoft::ReactNative::IReactPackageBuilder const &packageBuilder, - std::function builderCallback) noexcept { - packageBuilder.as().AddViewComponent( - L"SafeAreaView", [builderCallback](winrt::Microsoft::ReactNative::IReactViewComponentBuilder const &builder) noexcept { - auto compBuilder = builder.as(); - - builder.SetCreateProps([](winrt::Microsoft::ReactNative::ViewProps props, - const winrt::Microsoft::ReactNative::IComponentProps& cloneFrom) noexcept { - return winrt::make(props, cloneFrom); - }); - - builder.SetUpdatePropsHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::IComponentProps &newProps, - const winrt::Microsoft::ReactNative::IComponentProps &oldProps) noexcept { - auto userData = view.UserData().as(); - userData->UpdateProps(view, newProps ? newProps.as() : nullptr, oldProps ? oldProps.as() : nullptr); - }); - - compBuilder.SetUpdateLayoutMetricsHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::LayoutMetrics &newLayoutMetrics, - const winrt::Microsoft::ReactNative::LayoutMetrics &oldLayoutMetrics) noexcept { - auto userData = view.UserData().as(); - userData->UpdateLayoutMetrics(view, newLayoutMetrics, oldLayoutMetrics); - }); - - builder.SetUpdateEventEmitterHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::EventEmitter &eventEmitter) noexcept { - auto userData = view.UserData().as(); - userData->UpdateEventEmitter(std::make_shared(eventEmitter)); - }); - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::FinalizeUpdate != &BaseSafeAreaView::FinalizeUpdate) { - builder.SetFinalizeUpdateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - winrt::Microsoft::ReactNative::ComponentViewUpdateMask mask) noexcept { - auto userData = view.UserData().as(); - userData->FinalizeUpdate(view, mask); - }); - } - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UpdateState != &BaseSafeAreaView::UpdateState) { - builder.SetUpdateStateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::IComponentState &newState) noexcept { - auto userData = view.UserData().as(); - userData->UpdateState(view, newState); - }); - } - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::MountChildComponentView != &BaseSafeAreaView::MountChildComponentView) { - builder.SetMountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::MountChildComponentViewArgs &args) noexcept { - auto userData = view.UserData().as(); - return userData->MountChildComponentView(view, args); - }); - } - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UnmountChildComponentView != &BaseSafeAreaView::UnmountChildComponentView) { - builder.SetUnmountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::UnmountChildComponentViewArgs &args) noexcept { - auto userData = view.UserData().as(); - return userData->UnmountChildComponentView(view, args); - }); - } - - compBuilder.SetViewComponentViewInitializer([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { - auto userData = winrt::make_self(); - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::Initialize != &BaseSafeAreaView::Initialize) { - userData->Initialize(view); - } - view.UserData(*userData); - }); - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::CreateVisual != &BaseSafeAreaView::CreateVisual) { - compBuilder.SetCreateVisualHandler([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { - auto userData = view.UserData().as(); - return userData->CreateVisual(view); - }); - } - - // Allow app to further customize the builder - if (builderCallback) { - builderCallback(compBuilder); - } - }); -} - -} // namespace Microsoft::ReactNativeSpecs - -#endif // #ifdef RNW_NEW_ARCH diff --git a/vnext/codegen/react/components/rnwcore/ShadowNodes.cpp b/vnext/codegen/react/components/rnwcore/ShadowNodes.cpp deleted file mode 100644 index dccefb1d478..00000000000 --- a/vnext/codegen/react/components/rnwcore/ShadowNodes.cpp +++ /dev/null @@ -1,23 +0,0 @@ - -/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * @generated by codegen project: GenerateShadowNodeCpp.js - */ - -#include "ShadowNodes.h" - -namespace facebook::react { - -extern const char ActivityIndicatorViewComponentName[] = "ActivityIndicatorView"; -extern const char AndroidDrawerLayoutComponentName[] = "AndroidDrawerLayout"; -extern const char AndroidSwipeRefreshLayoutComponentName[] = "AndroidSwipeRefreshLayout"; -extern const char DebuggingOverlayComponentName[] = "DebuggingOverlay"; -extern const char PullToRefreshViewComponentName[] = "PullToRefreshView"; -extern const char SwitchComponentName[] = "Switch"; -extern const char UnimplementedNativeViewComponentName[] = "UnimplementedNativeView"; - -} // namespace facebook::react diff --git a/vnext/codegen/react/components/rnwcore/ShadowNodes.h b/vnext/codegen/react/components/rnwcore/ShadowNodes.h deleted file mode 100644 index 2c7c94720cf..00000000000 --- a/vnext/codegen/react/components/rnwcore/ShadowNodes.h +++ /dev/null @@ -1,98 +0,0 @@ - -/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * @generated by codegen project: GenerateShadowNodeH.js - */ - -#pragma once - -#include "EventEmitters.h" -#include "Props.h" -#include "States.h" -#include -#include - -namespace facebook::react { - -JSI_EXPORT extern const char ActivityIndicatorViewComponentName[]; - -/* - * `ShadowNode` for component. - */ -using ActivityIndicatorViewShadowNode = ConcreteViewShadowNode< - ActivityIndicatorViewComponentName, - ActivityIndicatorViewProps, - ActivityIndicatorViewEventEmitter, - ActivityIndicatorViewState>; - -JSI_EXPORT extern const char AndroidDrawerLayoutComponentName[]; - -/* - * `ShadowNode` for component. - */ -using AndroidDrawerLayoutShadowNode = ConcreteViewShadowNode< - AndroidDrawerLayoutComponentName, - AndroidDrawerLayoutProps, - AndroidDrawerLayoutEventEmitter, - AndroidDrawerLayoutState>; - -JSI_EXPORT extern const char AndroidSwipeRefreshLayoutComponentName[]; - -/* - * `ShadowNode` for component. - */ -using AndroidSwipeRefreshLayoutShadowNode = ConcreteViewShadowNode< - AndroidSwipeRefreshLayoutComponentName, - AndroidSwipeRefreshLayoutProps, - AndroidSwipeRefreshLayoutEventEmitter, - AndroidSwipeRefreshLayoutState>; - -JSI_EXPORT extern const char DebuggingOverlayComponentName[]; - -/* - * `ShadowNode` for component. - */ -using DebuggingOverlayShadowNode = ConcreteViewShadowNode< - DebuggingOverlayComponentName, - DebuggingOverlayProps, - DebuggingOverlayEventEmitter, - DebuggingOverlayState>; - -JSI_EXPORT extern const char PullToRefreshViewComponentName[]; - -/* - * `ShadowNode` for component. - */ -using PullToRefreshViewShadowNode = ConcreteViewShadowNode< - PullToRefreshViewComponentName, - PullToRefreshViewProps, - PullToRefreshViewEventEmitter, - PullToRefreshViewState>; - -JSI_EXPORT extern const char SwitchComponentName[]; - -/* - * `ShadowNode` for component. - */ -using SwitchShadowNode = ConcreteViewShadowNode< - SwitchComponentName, - SwitchProps, - SwitchEventEmitter, - SwitchState>; - -JSI_EXPORT extern const char UnimplementedNativeViewComponentName[]; - -/* - * `ShadowNode` for component. - */ -using UnimplementedNativeViewShadowNode = ConcreteViewShadowNode< - UnimplementedNativeViewComponentName, - UnimplementedNativeViewProps, - UnimplementedNativeViewEventEmitter, - UnimplementedNativeViewState>; - -} // namespace facebook::react diff --git a/vnext/codegen/react/components/rnwcore/States.cpp b/vnext/codegen/react/components/rnwcore/States.cpp deleted file mode 100644 index 1dbb184cbdd..00000000000 --- a/vnext/codegen/react/components/rnwcore/States.cpp +++ /dev/null @@ -1,16 +0,0 @@ - -/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * @generated by codegen project: GenerateStateCpp.js - */ -#include "States.h" - -namespace facebook::react { - - - -} // namespace facebook::react diff --git a/vnext/codegen/react/components/rnwcore/States.h b/vnext/codegen/react/components/rnwcore/States.h deleted file mode 100644 index 837c1ea42fe..00000000000 --- a/vnext/codegen/react/components/rnwcore/States.h +++ /dev/null @@ -1,32 +0,0 @@ -/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * @generated by codegen project: GenerateStateH.js - */ -#pragma once - -#include -#ifdef RN_SERIALIZABLE_STATE -#include -#endif - -namespace facebook::react { - -using ActivityIndicatorViewState = StateData; - -using AndroidDrawerLayoutState = StateData; - -using AndroidSwipeRefreshLayoutState = StateData; - -using DebuggingOverlayState = StateData; - -using PullToRefreshViewState = StateData; - -using SwitchState = StateData; - -using UnimplementedNativeViewState = StateData; - -} // namespace facebook::react \ No newline at end of file diff --git a/vnext/codegen/react/components/rnwcore/Switch.g.h b/vnext/codegen/react/components/rnwcore/Switch.g.h deleted file mode 100644 index 7c452873596..00000000000 --- a/vnext/codegen/react/components/rnwcore/Switch.g.h +++ /dev/null @@ -1,263 +0,0 @@ - -/* - * This file is auto-generated from SwitchNativeComponent spec file in flow / TypeScript. - */ -// clang-format off -#pragma once - -#include - -#ifdef RNW_NEW_ARCH -#include - -#include -#include -#endif // #ifdef RNW_NEW_ARCH - -#ifdef RNW_NEW_ARCH - -namespace Microsoft::ReactNativeSpecs { - -REACT_STRUCT(SwitchProps) -struct SwitchProps : winrt::implements { - SwitchProps(winrt::Microsoft::ReactNative::ViewProps props, const winrt::Microsoft::ReactNative::IComponentProps& cloneFrom) - : ViewProps(props) - { - if (cloneFrom) { - auto cloneFromProps = cloneFrom.as(); - disabled = cloneFromProps->disabled; - value = cloneFromProps->value; - tintColor = cloneFromProps->tintColor; - onTintColor = cloneFromProps->onTintColor; - thumbTintColor = cloneFromProps->thumbTintColor; - thumbColor = cloneFromProps->thumbColor; - trackColorForFalse = cloneFromProps->trackColorForFalse; - trackColorForTrue = cloneFromProps->trackColorForTrue; - } - } - - void SetProp(uint32_t hash, winrt::hstring propName, winrt::Microsoft::ReactNative::IJSValueReader value) noexcept { - winrt::Microsoft::ReactNative::ReadProp(hash, propName, value, *this); - } - - REACT_FIELD(disabled) - std::optional disabled{}; - - REACT_FIELD(value) - std::optional value{}; - - REACT_FIELD(tintColor) - winrt::Microsoft::ReactNative::Color tintColor{nullptr}; - - REACT_FIELD(onTintColor) - winrt::Microsoft::ReactNative::Color onTintColor{nullptr}; - - REACT_FIELD(thumbTintColor) - winrt::Microsoft::ReactNative::Color thumbTintColor{nullptr}; - - REACT_FIELD(thumbColor) - winrt::Microsoft::ReactNative::Color thumbColor{nullptr}; - - REACT_FIELD(trackColorForFalse) - winrt::Microsoft::ReactNative::Color trackColorForFalse{nullptr}; - - REACT_FIELD(trackColorForTrue) - winrt::Microsoft::ReactNative::Color trackColorForTrue{nullptr}; - - const winrt::Microsoft::ReactNative::ViewProps ViewProps; -}; - -REACT_STRUCT(Switch_OnChange) -struct Switch_OnChange { - REACT_FIELD(value) - bool value{}; - - REACT_FIELD(target) - int32_t target{}; -}; - -struct SwitchEventEmitter { - SwitchEventEmitter(const winrt::Microsoft::ReactNative::EventEmitter &eventEmitter) - : m_eventEmitter(eventEmitter) {} - - using OnChange = Switch_OnChange; - - void onChange(OnChange &value) const { - m_eventEmitter.DispatchEvent(L"change", [value](const winrt::Microsoft::ReactNative::IJSValueWriter writer) { - winrt::Microsoft::ReactNative::WriteValue(writer, value); - }); - } - - private: - winrt::Microsoft::ReactNative::EventEmitter m_eventEmitter{nullptr}; -}; - -template -struct BaseSwitch { - - virtual void UpdateProps( - const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::com_ptr &newProps, - const winrt::com_ptr &/*oldProps*/) noexcept { - m_props = newProps; - } - - // UpdateLayoutMetrics will only be called if this method is overridden - virtual void UpdateLayoutMetrics( - const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::LayoutMetrics &/*newLayoutMetrics*/, - const winrt::Microsoft::ReactNative::LayoutMetrics &/*oldLayoutMetrics*/) noexcept { - } - - // UpdateState will only be called if this method is overridden - virtual void UpdateState( - const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::IComponentState &/*newState*/) noexcept { - } - - virtual void UpdateEventEmitter(const std::shared_ptr &eventEmitter) noexcept { - m_eventEmitter = eventEmitter; - } - - // MountChildComponentView will only be called if this method is overridden - virtual void MountChildComponentView(const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::MountChildComponentViewArgs &/*args*/) noexcept { - } - - // UnmountChildComponentView will only be called if this method is overridden - virtual void UnmountChildComponentView(const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::UnmountChildComponentViewArgs &/*args*/) noexcept { - } - - // Initialize will only be called if this method is overridden - virtual void Initialize(const winrt::Microsoft::ReactNative::ComponentView &/*view*/) noexcept { - } - - // CreateVisual will only be called if this method is overridden - virtual winrt::Microsoft::UI::Composition::Visual CreateVisual(const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { - return view.as().Compositor().CreateSpriteVisual(); - } - - // FinalizeUpdate will only be called if this method is overridden - virtual void FinalizeUpdate(const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - winrt::Microsoft::ReactNative::ComponentViewUpdateMask /*mask*/) noexcept { - } - - // You must provide an implementation of this method to handle the "setValue" command - virtual void HandleSetValueCommand(bool value) noexcept = 0; - - void HandleCommand(const winrt::Microsoft::ReactNative::ComponentView &view, const winrt::Microsoft::ReactNative::HandleCommandArgs& args) noexcept { - auto userData = view.UserData().as(); - auto commandName = args.CommandName(); - if (commandName == L"setValue") { - bool value; - winrt::Microsoft::ReactNative::ReadArgs(args.CommandArgs(), value); - userData->HandleSetValueCommand(value); - return; - } - } - - const std::shared_ptr& EventEmitter() const { return m_eventEmitter; } - const winrt::com_ptr& Props() const { return m_props; } - -private: - winrt::com_ptr m_props; - std::shared_ptr m_eventEmitter; -}; - -template -void RegisterSwitchNativeComponent( - winrt::Microsoft::ReactNative::IReactPackageBuilder const &packageBuilder, - std::function builderCallback) noexcept { - packageBuilder.as().AddViewComponent( - L"Switch", [builderCallback](winrt::Microsoft::ReactNative::IReactViewComponentBuilder const &builder) noexcept { - auto compBuilder = builder.as(); - - builder.SetCreateProps([](winrt::Microsoft::ReactNative::ViewProps props, - const winrt::Microsoft::ReactNative::IComponentProps& cloneFrom) noexcept { - return winrt::make(props, cloneFrom); - }); - - builder.SetUpdatePropsHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::IComponentProps &newProps, - const winrt::Microsoft::ReactNative::IComponentProps &oldProps) noexcept { - auto userData = view.UserData().as(); - userData->UpdateProps(view, newProps ? newProps.as() : nullptr, oldProps ? oldProps.as() : nullptr); - }); - - compBuilder.SetUpdateLayoutMetricsHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::LayoutMetrics &newLayoutMetrics, - const winrt::Microsoft::ReactNative::LayoutMetrics &oldLayoutMetrics) noexcept { - auto userData = view.UserData().as(); - userData->UpdateLayoutMetrics(view, newLayoutMetrics, oldLayoutMetrics); - }); - - builder.SetUpdateEventEmitterHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::EventEmitter &eventEmitter) noexcept { - auto userData = view.UserData().as(); - userData->UpdateEventEmitter(std::make_shared(eventEmitter)); - }); - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::FinalizeUpdate != &BaseSwitch::FinalizeUpdate) { - builder.SetFinalizeUpdateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - winrt::Microsoft::ReactNative::ComponentViewUpdateMask mask) noexcept { - auto userData = view.UserData().as(); - userData->FinalizeUpdate(view, mask); - }); - } - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UpdateState != &BaseSwitch::UpdateState) { - builder.SetUpdateStateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::IComponentState &newState) noexcept { - auto userData = view.UserData().as(); - userData->UpdateState(view, newState); - }); - } - - builder.SetCustomCommandHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::HandleCommandArgs& args) noexcept { - auto userData = view.UserData().as(); - userData->HandleCommand(view, args); - }); - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::MountChildComponentView != &BaseSwitch::MountChildComponentView) { - builder.SetMountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::MountChildComponentViewArgs &args) noexcept { - auto userData = view.UserData().as(); - return userData->MountChildComponentView(view, args); - }); - } - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UnmountChildComponentView != &BaseSwitch::UnmountChildComponentView) { - builder.SetUnmountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::UnmountChildComponentViewArgs &args) noexcept { - auto userData = view.UserData().as(); - return userData->UnmountChildComponentView(view, args); - }); - } - - compBuilder.SetViewComponentViewInitializer([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { - auto userData = winrt::make_self(); - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::Initialize != &BaseSwitch::Initialize) { - userData->Initialize(view); - } - view.UserData(*userData); - }); - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::CreateVisual != &BaseSwitch::CreateVisual) { - compBuilder.SetCreateVisualHandler([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { - auto userData = view.UserData().as(); - return userData->CreateVisual(view); - }); - } - - // Allow app to further customize the builder - if (builderCallback) { - builderCallback(compBuilder); - } - }); -} - -} // namespace Microsoft::ReactNativeSpecs - -#endif // #ifdef RNW_NEW_ARCH diff --git a/vnext/codegen/react/components/rnwcore/UnimplementedNativeView.g.h b/vnext/codegen/react/components/rnwcore/UnimplementedNativeView.g.h deleted file mode 100644 index 3577f22bc08..00000000000 --- a/vnext/codegen/react/components/rnwcore/UnimplementedNativeView.g.h +++ /dev/null @@ -1,200 +0,0 @@ - -/* - * This file is auto-generated from UnimplementedNativeViewNativeComponent spec file in flow / TypeScript. - */ -// clang-format off -#pragma once - -#include - -#ifdef RNW_NEW_ARCH -#include - -#include -#include -#endif // #ifdef RNW_NEW_ARCH - -#ifdef RNW_NEW_ARCH - -namespace Microsoft::ReactNativeSpecs { - -REACT_STRUCT(UnimplementedNativeViewProps) -struct UnimplementedNativeViewProps : winrt::implements { - UnimplementedNativeViewProps(winrt::Microsoft::ReactNative::ViewProps props, const winrt::Microsoft::ReactNative::IComponentProps& cloneFrom) - : ViewProps(props) - { - if (cloneFrom) { - auto cloneFromProps = cloneFrom.as(); - name = cloneFromProps->name; - } - } - - void SetProp(uint32_t hash, winrt::hstring propName, winrt::Microsoft::ReactNative::IJSValueReader value) noexcept { - winrt::Microsoft::ReactNative::ReadProp(hash, propName, value, *this); - } - - REACT_FIELD(name) - std::optional name; - - const winrt::Microsoft::ReactNative::ViewProps ViewProps; -}; - -struct UnimplementedNativeViewEventEmitter { - UnimplementedNativeViewEventEmitter(const winrt::Microsoft::ReactNative::EventEmitter &eventEmitter) - : m_eventEmitter(eventEmitter) {} - - private: - winrt::Microsoft::ReactNative::EventEmitter m_eventEmitter{nullptr}; -}; - -template -struct BaseUnimplementedNativeView { - - virtual void UpdateProps( - const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::com_ptr &newProps, - const winrt::com_ptr &/*oldProps*/) noexcept { - m_props = newProps; - } - - // UpdateLayoutMetrics will only be called if this method is overridden - virtual void UpdateLayoutMetrics( - const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::LayoutMetrics &/*newLayoutMetrics*/, - const winrt::Microsoft::ReactNative::LayoutMetrics &/*oldLayoutMetrics*/) noexcept { - } - - // UpdateState will only be called if this method is overridden - virtual void UpdateState( - const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::IComponentState &/*newState*/) noexcept { - } - - virtual void UpdateEventEmitter(const std::shared_ptr &eventEmitter) noexcept { - m_eventEmitter = eventEmitter; - } - - // MountChildComponentView will only be called if this method is overridden - virtual void MountChildComponentView(const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::MountChildComponentViewArgs &/*args*/) noexcept { - } - - // UnmountChildComponentView will only be called if this method is overridden - virtual void UnmountChildComponentView(const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::UnmountChildComponentViewArgs &/*args*/) noexcept { - } - - // Initialize will only be called if this method is overridden - virtual void Initialize(const winrt::Microsoft::ReactNative::ComponentView &/*view*/) noexcept { - } - - // CreateVisual will only be called if this method is overridden - virtual winrt::Microsoft::UI::Composition::Visual CreateVisual(const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { - return view.as().Compositor().CreateSpriteVisual(); - } - - // FinalizeUpdate will only be called if this method is overridden - virtual void FinalizeUpdate(const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - winrt::Microsoft::ReactNative::ComponentViewUpdateMask /*mask*/) noexcept { - } - - - - const std::shared_ptr& EventEmitter() const { return m_eventEmitter; } - const winrt::com_ptr& Props() const { return m_props; } - -private: - winrt::com_ptr m_props; - std::shared_ptr m_eventEmitter; -}; - -template -void RegisterUnimplementedNativeViewNativeComponent( - winrt::Microsoft::ReactNative::IReactPackageBuilder const &packageBuilder, - std::function builderCallback) noexcept { - packageBuilder.as().AddViewComponent( - L"UnimplementedNativeView", [builderCallback](winrt::Microsoft::ReactNative::IReactViewComponentBuilder const &builder) noexcept { - auto compBuilder = builder.as(); - - builder.SetCreateProps([](winrt::Microsoft::ReactNative::ViewProps props, - const winrt::Microsoft::ReactNative::IComponentProps& cloneFrom) noexcept { - return winrt::make(props, cloneFrom); - }); - - builder.SetUpdatePropsHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::IComponentProps &newProps, - const winrt::Microsoft::ReactNative::IComponentProps &oldProps) noexcept { - auto userData = view.UserData().as(); - userData->UpdateProps(view, newProps ? newProps.as() : nullptr, oldProps ? oldProps.as() : nullptr); - }); - - compBuilder.SetUpdateLayoutMetricsHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::LayoutMetrics &newLayoutMetrics, - const winrt::Microsoft::ReactNative::LayoutMetrics &oldLayoutMetrics) noexcept { - auto userData = view.UserData().as(); - userData->UpdateLayoutMetrics(view, newLayoutMetrics, oldLayoutMetrics); - }); - - builder.SetUpdateEventEmitterHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::EventEmitter &eventEmitter) noexcept { - auto userData = view.UserData().as(); - userData->UpdateEventEmitter(std::make_shared(eventEmitter)); - }); - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::FinalizeUpdate != &BaseUnimplementedNativeView::FinalizeUpdate) { - builder.SetFinalizeUpdateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - winrt::Microsoft::ReactNative::ComponentViewUpdateMask mask) noexcept { - auto userData = view.UserData().as(); - userData->FinalizeUpdate(view, mask); - }); - } - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UpdateState != &BaseUnimplementedNativeView::UpdateState) { - builder.SetUpdateStateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::IComponentState &newState) noexcept { - auto userData = view.UserData().as(); - userData->UpdateState(view, newState); - }); - } - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::MountChildComponentView != &BaseUnimplementedNativeView::MountChildComponentView) { - builder.SetMountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::MountChildComponentViewArgs &args) noexcept { - auto userData = view.UserData().as(); - return userData->MountChildComponentView(view, args); - }); - } - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UnmountChildComponentView != &BaseUnimplementedNativeView::UnmountChildComponentView) { - builder.SetUnmountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::UnmountChildComponentViewArgs &args) noexcept { - auto userData = view.UserData().as(); - return userData->UnmountChildComponentView(view, args); - }); - } - - compBuilder.SetViewComponentViewInitializer([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { - auto userData = winrt::make_self(); - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::Initialize != &BaseUnimplementedNativeView::Initialize) { - userData->Initialize(view); - } - view.UserData(*userData); - }); - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::CreateVisual != &BaseUnimplementedNativeView::CreateVisual) { - compBuilder.SetCreateVisualHandler([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { - auto userData = view.UserData().as(); - return userData->CreateVisual(view); - }); - } - - // Allow app to further customize the builder - if (builderCallback) { - builderCallback(compBuilder); - } - }); -} - -} // namespace Microsoft::ReactNativeSpecs - -#endif // #ifdef RNW_NEW_ARCH diff --git a/vnext/codegen/react/components/rnwcore/VirtualView.g.h b/vnext/codegen/react/components/rnwcore/VirtualView.g.h deleted file mode 100644 index d0c7364971c..00000000000 --- a/vnext/codegen/react/components/rnwcore/VirtualView.g.h +++ /dev/null @@ -1,226 +0,0 @@ - -/* - * This file is auto-generated from VirtualViewNativeComponent spec file in flow / TypeScript. - */ -// clang-format off -#pragma once - -#include - -#ifdef RNW_NEW_ARCH -#include - -#include -#include -#endif // #ifdef RNW_NEW_ARCH - -#ifdef RNW_NEW_ARCH - -namespace Microsoft::ReactNativeSpecs { - -REACT_STRUCT(VirtualViewProps) -struct VirtualViewProps : winrt::implements { - VirtualViewProps(winrt::Microsoft::ReactNative::ViewProps props, const winrt::Microsoft::ReactNative::IComponentProps& cloneFrom) - : ViewProps(props) - { - if (cloneFrom) { - auto cloneFromProps = cloneFrom.as(); - initialHidden = cloneFromProps->initialHidden; - renderState = cloneFromProps->renderState; - } - } - - void SetProp(uint32_t hash, winrt::hstring propName, winrt::Microsoft::ReactNative::IJSValueReader value) noexcept { - winrt::Microsoft::ReactNative::ReadProp(hash, propName, value, *this); - } - - REACT_FIELD(initialHidden) - std::optional initialHidden{}; - - REACT_FIELD(renderState) - int32_t renderState{}; - - const winrt::Microsoft::ReactNative::ViewProps ViewProps; -}; - -REACT_STRUCT(VirtualView_OnModeChange) -struct VirtualView_OnModeChange { - REACT_FIELD(mode) - int32_t mode{}; - - REACT_FIELD(targetRect) - VirtualViewSpec_onModeChange2 targetRect; - - REACT_FIELD(thresholdRect) - VirtualViewSpec_onModeChange3 thresholdRect; -}; - -struct VirtualViewEventEmitter { - VirtualViewEventEmitter(const winrt::Microsoft::ReactNative::EventEmitter &eventEmitter) - : m_eventEmitter(eventEmitter) {} - - using OnModeChange = VirtualView_OnModeChange; - using OnModeChange2 = VirtualView_OnModeChange2; - using OnModeChange3 = VirtualView_OnModeChange3; - - void onModeChange(OnModeChange &value) const { - m_eventEmitter.DispatchEvent(L"modeChange", [value](const winrt::Microsoft::ReactNative::IJSValueWriter writer) { - winrt::Microsoft::ReactNative::WriteValue(writer, value); - }); - } - - private: - winrt::Microsoft::ReactNative::EventEmitter m_eventEmitter{nullptr}; -}; - -template -struct BaseVirtualView { - - virtual void UpdateProps( - const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::com_ptr &newProps, - const winrt::com_ptr &/*oldProps*/) noexcept { - m_props = newProps; - } - - // UpdateLayoutMetrics will only be called if this method is overridden - virtual void UpdateLayoutMetrics( - const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::LayoutMetrics &/*newLayoutMetrics*/, - const winrt::Microsoft::ReactNative::LayoutMetrics &/*oldLayoutMetrics*/) noexcept { - } - - // UpdateState will only be called if this method is overridden - virtual void UpdateState( - const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::IComponentState &/*newState*/) noexcept { - } - - virtual void UpdateEventEmitter(const std::shared_ptr &eventEmitter) noexcept { - m_eventEmitter = eventEmitter; - } - - // MountChildComponentView will only be called if this method is overridden - virtual void MountChildComponentView(const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::MountChildComponentViewArgs &/*args*/) noexcept { - } - - // UnmountChildComponentView will only be called if this method is overridden - virtual void UnmountChildComponentView(const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::UnmountChildComponentViewArgs &/*args*/) noexcept { - } - - // Initialize will only be called if this method is overridden - virtual void Initialize(const winrt::Microsoft::ReactNative::ComponentView &/*view*/) noexcept { - } - - // CreateVisual will only be called if this method is overridden - virtual winrt::Microsoft::UI::Composition::Visual CreateVisual(const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { - return view.as().Compositor().CreateSpriteVisual(); - } - - // FinalizeUpdate will only be called if this method is overridden - virtual void FinalizeUpdate(const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - winrt::Microsoft::ReactNative::ComponentViewUpdateMask /*mask*/) noexcept { - } - - - - const std::shared_ptr& EventEmitter() const { return m_eventEmitter; } - const winrt::com_ptr& Props() const { return m_props; } - -private: - winrt::com_ptr m_props; - std::shared_ptr m_eventEmitter; -}; - -template -void RegisterVirtualViewNativeComponent( - winrt::Microsoft::ReactNative::IReactPackageBuilder const &packageBuilder, - std::function builderCallback) noexcept { - packageBuilder.as().AddViewComponent( - L"VirtualView", [builderCallback](winrt::Microsoft::ReactNative::IReactViewComponentBuilder const &builder) noexcept { - auto compBuilder = builder.as(); - - builder.SetCreateProps([](winrt::Microsoft::ReactNative::ViewProps props, - const winrt::Microsoft::ReactNative::IComponentProps& cloneFrom) noexcept { - return winrt::make(props, cloneFrom); - }); - - builder.SetUpdatePropsHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::IComponentProps &newProps, - const winrt::Microsoft::ReactNative::IComponentProps &oldProps) noexcept { - auto userData = view.UserData().as(); - userData->UpdateProps(view, newProps ? newProps.as() : nullptr, oldProps ? oldProps.as() : nullptr); - }); - - compBuilder.SetUpdateLayoutMetricsHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::LayoutMetrics &newLayoutMetrics, - const winrt::Microsoft::ReactNative::LayoutMetrics &oldLayoutMetrics) noexcept { - auto userData = view.UserData().as(); - userData->UpdateLayoutMetrics(view, newLayoutMetrics, oldLayoutMetrics); - }); - - builder.SetUpdateEventEmitterHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::EventEmitter &eventEmitter) noexcept { - auto userData = view.UserData().as(); - userData->UpdateEventEmitter(std::make_shared(eventEmitter)); - }); - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::FinalizeUpdate != &BaseVirtualView::FinalizeUpdate) { - builder.SetFinalizeUpdateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - winrt::Microsoft::ReactNative::ComponentViewUpdateMask mask) noexcept { - auto userData = view.UserData().as(); - userData->FinalizeUpdate(view, mask); - }); - } - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UpdateState != &BaseVirtualView::UpdateState) { - builder.SetUpdateStateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::IComponentState &newState) noexcept { - auto userData = view.UserData().as(); - userData->UpdateState(view, newState); - }); - } - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::MountChildComponentView != &BaseVirtualView::MountChildComponentView) { - builder.SetMountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::MountChildComponentViewArgs &args) noexcept { - auto userData = view.UserData().as(); - return userData->MountChildComponentView(view, args); - }); - } - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UnmountChildComponentView != &BaseVirtualView::UnmountChildComponentView) { - builder.SetUnmountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::UnmountChildComponentViewArgs &args) noexcept { - auto userData = view.UserData().as(); - return userData->UnmountChildComponentView(view, args); - }); - } - - compBuilder.SetViewComponentViewInitializer([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { - auto userData = winrt::make_self(); - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::Initialize != &BaseVirtualView::Initialize) { - userData->Initialize(view); - } - view.UserData(*userData); - }); - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::CreateVisual != &BaseVirtualView::CreateVisual) { - compBuilder.SetCreateVisualHandler([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { - auto userData = view.UserData().as(); - return userData->CreateVisual(view); - }); - } - - // Allow app to further customize the builder - if (builderCallback) { - builderCallback(compBuilder); - } - }); -} - -} // namespace Microsoft::ReactNativeSpecs - -#endif // #ifdef RNW_NEW_ARCH diff --git a/vnext/codegen/react/components/rnwcore/VirtualViewExperimental.g.h b/vnext/codegen/react/components/rnwcore/VirtualViewExperimental.g.h deleted file mode 100644 index 68e0c7fb24a..00000000000 --- a/vnext/codegen/react/components/rnwcore/VirtualViewExperimental.g.h +++ /dev/null @@ -1,226 +0,0 @@ - -/* - * This file is auto-generated from VirtualViewExperimentalNativeComponent spec file in flow / TypeScript. - */ -// clang-format off -#pragma once - -#include - -#ifdef RNW_NEW_ARCH -#include - -#include -#include -#endif // #ifdef RNW_NEW_ARCH - -#ifdef RNW_NEW_ARCH - -namespace Microsoft::ReactNativeSpecs { - -REACT_STRUCT(VirtualViewExperimentalProps) -struct VirtualViewExperimentalProps : winrt::implements { - VirtualViewExperimentalProps(winrt::Microsoft::ReactNative::ViewProps props, const winrt::Microsoft::ReactNative::IComponentProps& cloneFrom) - : ViewProps(props) - { - if (cloneFrom) { - auto cloneFromProps = cloneFrom.as(); - initialHidden = cloneFromProps->initialHidden; - renderState = cloneFromProps->renderState; - } - } - - void SetProp(uint32_t hash, winrt::hstring propName, winrt::Microsoft::ReactNative::IJSValueReader value) noexcept { - winrt::Microsoft::ReactNative::ReadProp(hash, propName, value, *this); - } - - REACT_FIELD(initialHidden) - std::optional initialHidden{}; - - REACT_FIELD(renderState) - int32_t renderState{}; - - const winrt::Microsoft::ReactNative::ViewProps ViewProps; -}; - -REACT_STRUCT(VirtualViewExperimental_OnModeChange) -struct VirtualViewExperimental_OnModeChange { - REACT_FIELD(mode) - int32_t mode{}; - - REACT_FIELD(targetRect) - VirtualViewExperimentalSpec_onModeChange2 targetRect; - - REACT_FIELD(thresholdRect) - VirtualViewExperimentalSpec_onModeChange3 thresholdRect; -}; - -struct VirtualViewExperimentalEventEmitter { - VirtualViewExperimentalEventEmitter(const winrt::Microsoft::ReactNative::EventEmitter &eventEmitter) - : m_eventEmitter(eventEmitter) {} - - using OnModeChange = VirtualViewExperimental_OnModeChange; - using OnModeChange2 = VirtualViewExperimental_OnModeChange2; - using OnModeChange3 = VirtualViewExperimental_OnModeChange3; - - void onModeChange(OnModeChange &value) const { - m_eventEmitter.DispatchEvent(L"modeChange", [value](const winrt::Microsoft::ReactNative::IJSValueWriter writer) { - winrt::Microsoft::ReactNative::WriteValue(writer, value); - }); - } - - private: - winrt::Microsoft::ReactNative::EventEmitter m_eventEmitter{nullptr}; -}; - -template -struct BaseVirtualViewExperimental { - - virtual void UpdateProps( - const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::com_ptr &newProps, - const winrt::com_ptr &/*oldProps*/) noexcept { - m_props = newProps; - } - - // UpdateLayoutMetrics will only be called if this method is overridden - virtual void UpdateLayoutMetrics( - const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::LayoutMetrics &/*newLayoutMetrics*/, - const winrt::Microsoft::ReactNative::LayoutMetrics &/*oldLayoutMetrics*/) noexcept { - } - - // UpdateState will only be called if this method is overridden - virtual void UpdateState( - const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::IComponentState &/*newState*/) noexcept { - } - - virtual void UpdateEventEmitter(const std::shared_ptr &eventEmitter) noexcept { - m_eventEmitter = eventEmitter; - } - - // MountChildComponentView will only be called if this method is overridden - virtual void MountChildComponentView(const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::MountChildComponentViewArgs &/*args*/) noexcept { - } - - // UnmountChildComponentView will only be called if this method is overridden - virtual void UnmountChildComponentView(const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - const winrt::Microsoft::ReactNative::UnmountChildComponentViewArgs &/*args*/) noexcept { - } - - // Initialize will only be called if this method is overridden - virtual void Initialize(const winrt::Microsoft::ReactNative::ComponentView &/*view*/) noexcept { - } - - // CreateVisual will only be called if this method is overridden - virtual winrt::Microsoft::UI::Composition::Visual CreateVisual(const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { - return view.as().Compositor().CreateSpriteVisual(); - } - - // FinalizeUpdate will only be called if this method is overridden - virtual void FinalizeUpdate(const winrt::Microsoft::ReactNative::ComponentView &/*view*/, - winrt::Microsoft::ReactNative::ComponentViewUpdateMask /*mask*/) noexcept { - } - - - - const std::shared_ptr& EventEmitter() const { return m_eventEmitter; } - const winrt::com_ptr& Props() const { return m_props; } - -private: - winrt::com_ptr m_props; - std::shared_ptr m_eventEmitter; -}; - -template -void RegisterVirtualViewExperimentalNativeComponent( - winrt::Microsoft::ReactNative::IReactPackageBuilder const &packageBuilder, - std::function builderCallback) noexcept { - packageBuilder.as().AddViewComponent( - L"VirtualViewExperimental", [builderCallback](winrt::Microsoft::ReactNative::IReactViewComponentBuilder const &builder) noexcept { - auto compBuilder = builder.as(); - - builder.SetCreateProps([](winrt::Microsoft::ReactNative::ViewProps props, - const winrt::Microsoft::ReactNative::IComponentProps& cloneFrom) noexcept { - return winrt::make(props, cloneFrom); - }); - - builder.SetUpdatePropsHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::IComponentProps &newProps, - const winrt::Microsoft::ReactNative::IComponentProps &oldProps) noexcept { - auto userData = view.UserData().as(); - userData->UpdateProps(view, newProps ? newProps.as() : nullptr, oldProps ? oldProps.as() : nullptr); - }); - - compBuilder.SetUpdateLayoutMetricsHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::LayoutMetrics &newLayoutMetrics, - const winrt::Microsoft::ReactNative::LayoutMetrics &oldLayoutMetrics) noexcept { - auto userData = view.UserData().as(); - userData->UpdateLayoutMetrics(view, newLayoutMetrics, oldLayoutMetrics); - }); - - builder.SetUpdateEventEmitterHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::EventEmitter &eventEmitter) noexcept { - auto userData = view.UserData().as(); - userData->UpdateEventEmitter(std::make_shared(eventEmitter)); - }); - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::FinalizeUpdate != &BaseVirtualViewExperimental::FinalizeUpdate) { - builder.SetFinalizeUpdateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - winrt::Microsoft::ReactNative::ComponentViewUpdateMask mask) noexcept { - auto userData = view.UserData().as(); - userData->FinalizeUpdate(view, mask); - }); - } - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UpdateState != &BaseVirtualViewExperimental::UpdateState) { - builder.SetUpdateStateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::IComponentState &newState) noexcept { - auto userData = view.UserData().as(); - userData->UpdateState(view, newState); - }); - } - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::MountChildComponentView != &BaseVirtualViewExperimental::MountChildComponentView) { - builder.SetMountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::MountChildComponentViewArgs &args) noexcept { - auto userData = view.UserData().as(); - return userData->MountChildComponentView(view, args); - }); - } - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UnmountChildComponentView != &BaseVirtualViewExperimental::UnmountChildComponentView) { - builder.SetUnmountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, - const winrt::Microsoft::ReactNative::UnmountChildComponentViewArgs &args) noexcept { - auto userData = view.UserData().as(); - return userData->UnmountChildComponentView(view, args); - }); - } - - compBuilder.SetViewComponentViewInitializer([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { - auto userData = winrt::make_self(); - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::Initialize != &BaseVirtualViewExperimental::Initialize) { - userData->Initialize(view); - } - view.UserData(*userData); - }); - - if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::CreateVisual != &BaseVirtualViewExperimental::CreateVisual) { - compBuilder.SetCreateVisualHandler([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { - auto userData = view.UserData().as(); - return userData->CreateVisual(view); - }); - } - - // Allow app to further customize the builder - if (builderCallback) { - builderCallback(compBuilder); - } - }); -} - -} // namespace Microsoft::ReactNativeSpecs - -#endif // #ifdef RNW_NEW_ARCH diff --git a/vnext/codegen/rnwcoreJSI-generated.cpp b/vnext/codegen/rnwcoreJSI-generated.cpp deleted file mode 100644 index 4837960604d..00000000000 --- a/vnext/codegen/rnwcoreJSI-generated.cpp +++ /dev/null @@ -1,3444 +0,0 @@ -/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * @generated by codegen project: GenerateModuleCpp.js - */ - -#include "rnwcoreJSI.h" - -namespace facebook::react { - -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_commonTestFlag(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->commonTestFlag( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_commonTestFlagWithoutNativeImplementation(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->commonTestFlagWithoutNativeImplementation( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_cdpInteractionMetricsEnabled(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->cdpInteractionMetricsEnabled( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_cxxNativeAnimatedEnabled(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->cxxNativeAnimatedEnabled( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_cxxNativeAnimatedRemoveJsSync(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->cxxNativeAnimatedRemoveJsSync( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_disableFabricCommitInCXXAnimated(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->disableFabricCommitInCXXAnimated( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_disableMountItemReorderingAndroid(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->disableMountItemReorderingAndroid( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_disableOldAndroidAttachmentMetricsWorkarounds(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->disableOldAndroidAttachmentMetricsWorkarounds( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_disableTextLayoutManagerCacheAndroid(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->disableTextLayoutManagerCacheAndroid( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableAccessibilityOrder(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->enableAccessibilityOrder( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableAccumulatedUpdatesInRawPropsAndroid(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->enableAccumulatedUpdatesInRawPropsAndroid( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableAndroidTextMeasurementOptimizations(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->enableAndroidTextMeasurementOptimizations( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableBridgelessArchitecture(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->enableBridgelessArchitecture( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableCppPropsIteratorSetter(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->enableCppPropsIteratorSetter( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableCustomFocusSearchOnClippedElementsAndroid(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->enableCustomFocusSearchOnClippedElementsAndroid( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableDestroyShadowTreeRevisionAsync(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->enableDestroyShadowTreeRevisionAsync( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableDoubleMeasurementFixAndroid(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->enableDoubleMeasurementFixAndroid( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableEagerMainQueueModulesOnIOS(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->enableEagerMainQueueModulesOnIOS( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableEagerRootViewAttachment(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->enableEagerRootViewAttachment( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableFabricLogs(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->enableFabricLogs( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableFabricRenderer(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->enableFabricRenderer( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableFixForParentTagDuringReparenting(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->enableFixForParentTagDuringReparenting( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableFontScaleChangesUpdatingLayout(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->enableFontScaleChangesUpdatingLayout( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableIOSTextBaselineOffsetPerLine(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->enableIOSTextBaselineOffsetPerLine( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableIOSViewClipToPaddingBox(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->enableIOSViewClipToPaddingBox( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableImagePrefetchingAndroid(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->enableImagePrefetchingAndroid( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableImmediateUpdateModeForContentOffsetChanges(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->enableImmediateUpdateModeForContentOffsetChanges( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableInteropViewManagerClassLookUpOptimizationIOS(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->enableInteropViewManagerClassLookUpOptimizationIOS( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableLayoutAnimationsOnAndroid(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->enableLayoutAnimationsOnAndroid( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableLayoutAnimationsOnIOS(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->enableLayoutAnimationsOnIOS( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableMainQueueCoordinatorOnIOS(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->enableMainQueueCoordinatorOnIOS( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableModuleArgumentNSNullConversionIOS(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->enableModuleArgumentNSNullConversionIOS( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableNativeCSSParsing(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->enableNativeCSSParsing( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableNetworkEventReporting(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->enableNetworkEventReporting( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableNewBackgroundAndBorderDrawables(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->enableNewBackgroundAndBorderDrawables( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enablePreparedTextLayout(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->enablePreparedTextLayout( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enablePropsUpdateReconciliationAndroid(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->enablePropsUpdateReconciliationAndroid( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableResourceTimingAPI(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->enableResourceTimingAPI( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableViewCulling(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->enableViewCulling( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableViewRecycling(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->enableViewRecycling( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableViewRecyclingForText(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->enableViewRecyclingForText( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableViewRecyclingForView(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->enableViewRecyclingForView( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableVirtualViewDebugFeatures(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->enableVirtualViewDebugFeatures( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableVirtualViewRenderState(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->enableVirtualViewRenderState( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableVirtualViewWindowFocusDetection(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->enableVirtualViewWindowFocusDetection( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_fixMappingOfEventPrioritiesBetweenFabricAndReact(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->fixMappingOfEventPrioritiesBetweenFabricAndReact( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_fuseboxEnabledRelease(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->fuseboxEnabledRelease( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_fuseboxNetworkInspectionEnabled(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->fuseboxNetworkInspectionEnabled( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_hideOffscreenVirtualViewsOnIOS(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->hideOffscreenVirtualViewsOnIOS( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_perfMonitorV2Enabled(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->perfMonitorV2Enabled( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_preparedTextCacheSize(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->preparedTextCacheSize( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_preventShadowTreeCommitExhaustion(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->preventShadowTreeCommitExhaustion( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_releaseImageDataWhenConsumed(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->releaseImageDataWhenConsumed( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_shouldPressibilityUseW3CPointerEventsForHover(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->shouldPressibilityUseW3CPointerEventsForHover( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_skipActivityIdentityAssertionOnHostPause(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->skipActivityIdentityAssertionOnHostPause( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_sweepActiveTouchOnChildNativeGesturesAndroid(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->sweepActiveTouchOnChildNativeGesturesAndroid( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_traceTurboModulePromiseRejectionsOnAndroid(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->traceTurboModulePromiseRejectionsOnAndroid( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_updateRuntimeShadowNodeReferencesOnCommit(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->updateRuntimeShadowNodeReferencesOnCommit( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useAlwaysAvailableJSErrorHandling(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->useAlwaysAvailableJSErrorHandling( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useFabricInterop(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->useFabricInterop( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useNativeEqualsInNativeReadableArrayAndroid(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->useNativeEqualsInNativeReadableArrayAndroid( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useNativeTransformHelperAndroid(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->useNativeTransformHelperAndroid( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useNativeViewConfigsInBridgelessMode(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->useNativeViewConfigsInBridgelessMode( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useOptimizedEventBatchingOnAndroid(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->useOptimizedEventBatchingOnAndroid( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useRawPropsJsiValue(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->useRawPropsJsiValue( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useShadowNodeStateOnClone(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->useShadowNodeStateOnClone( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useTurboModuleInterop(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->useTurboModuleInterop( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useTurboModules(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->useTurboModules( - rt - ); -} -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_virtualViewPrerenderRatio(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->virtualViewPrerenderRatio( - rt - ); -} - -NativeReactNativeFeatureFlagsCxxSpecJSI::NativeReactNativeFeatureFlagsCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("NativeReactNativeFeatureFlagsCxx", jsInvoker) { - methodMap_["commonTestFlag"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_commonTestFlag}; - methodMap_["commonTestFlagWithoutNativeImplementation"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_commonTestFlagWithoutNativeImplementation}; - methodMap_["cdpInteractionMetricsEnabled"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_cdpInteractionMetricsEnabled}; - methodMap_["cxxNativeAnimatedEnabled"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_cxxNativeAnimatedEnabled}; - methodMap_["cxxNativeAnimatedRemoveJsSync"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_cxxNativeAnimatedRemoveJsSync}; - methodMap_["disableFabricCommitInCXXAnimated"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_disableFabricCommitInCXXAnimated}; - methodMap_["disableMountItemReorderingAndroid"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_disableMountItemReorderingAndroid}; - methodMap_["disableOldAndroidAttachmentMetricsWorkarounds"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_disableOldAndroidAttachmentMetricsWorkarounds}; - methodMap_["disableTextLayoutManagerCacheAndroid"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_disableTextLayoutManagerCacheAndroid}; - methodMap_["enableAccessibilityOrder"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableAccessibilityOrder}; - methodMap_["enableAccumulatedUpdatesInRawPropsAndroid"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableAccumulatedUpdatesInRawPropsAndroid}; - methodMap_["enableAndroidTextMeasurementOptimizations"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableAndroidTextMeasurementOptimizations}; - methodMap_["enableBridgelessArchitecture"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableBridgelessArchitecture}; - methodMap_["enableCppPropsIteratorSetter"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableCppPropsIteratorSetter}; - methodMap_["enableCustomFocusSearchOnClippedElementsAndroid"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableCustomFocusSearchOnClippedElementsAndroid}; - methodMap_["enableDestroyShadowTreeRevisionAsync"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableDestroyShadowTreeRevisionAsync}; - methodMap_["enableDoubleMeasurementFixAndroid"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableDoubleMeasurementFixAndroid}; - methodMap_["enableEagerMainQueueModulesOnIOS"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableEagerMainQueueModulesOnIOS}; - methodMap_["enableEagerRootViewAttachment"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableEagerRootViewAttachment}; - methodMap_["enableFabricLogs"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableFabricLogs}; - methodMap_["enableFabricRenderer"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableFabricRenderer}; - methodMap_["enableFixForParentTagDuringReparenting"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableFixForParentTagDuringReparenting}; - methodMap_["enableFontScaleChangesUpdatingLayout"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableFontScaleChangesUpdatingLayout}; - methodMap_["enableIOSTextBaselineOffsetPerLine"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableIOSTextBaselineOffsetPerLine}; - methodMap_["enableIOSViewClipToPaddingBox"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableIOSViewClipToPaddingBox}; - methodMap_["enableImagePrefetchingAndroid"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableImagePrefetchingAndroid}; - methodMap_["enableImmediateUpdateModeForContentOffsetChanges"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableImmediateUpdateModeForContentOffsetChanges}; - methodMap_["enableInteropViewManagerClassLookUpOptimizationIOS"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableInteropViewManagerClassLookUpOptimizationIOS}; - methodMap_["enableLayoutAnimationsOnAndroid"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableLayoutAnimationsOnAndroid}; - methodMap_["enableLayoutAnimationsOnIOS"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableLayoutAnimationsOnIOS}; - methodMap_["enableMainQueueCoordinatorOnIOS"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableMainQueueCoordinatorOnIOS}; - methodMap_["enableModuleArgumentNSNullConversionIOS"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableModuleArgumentNSNullConversionIOS}; - methodMap_["enableNativeCSSParsing"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableNativeCSSParsing}; - methodMap_["enableNetworkEventReporting"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableNetworkEventReporting}; - methodMap_["enableNewBackgroundAndBorderDrawables"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableNewBackgroundAndBorderDrawables}; - methodMap_["enablePreparedTextLayout"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enablePreparedTextLayout}; - methodMap_["enablePropsUpdateReconciliationAndroid"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enablePropsUpdateReconciliationAndroid}; - methodMap_["enableResourceTimingAPI"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableResourceTimingAPI}; - methodMap_["enableViewCulling"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableViewCulling}; - methodMap_["enableViewRecycling"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableViewRecycling}; - methodMap_["enableViewRecyclingForText"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableViewRecyclingForText}; - methodMap_["enableViewRecyclingForView"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableViewRecyclingForView}; - methodMap_["enableVirtualViewDebugFeatures"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableVirtualViewDebugFeatures}; - methodMap_["enableVirtualViewRenderState"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableVirtualViewRenderState}; - methodMap_["enableVirtualViewWindowFocusDetection"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableVirtualViewWindowFocusDetection}; - methodMap_["fixMappingOfEventPrioritiesBetweenFabricAndReact"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_fixMappingOfEventPrioritiesBetweenFabricAndReact}; - methodMap_["fuseboxEnabledRelease"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_fuseboxEnabledRelease}; - methodMap_["fuseboxNetworkInspectionEnabled"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_fuseboxNetworkInspectionEnabled}; - methodMap_["hideOffscreenVirtualViewsOnIOS"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_hideOffscreenVirtualViewsOnIOS}; - methodMap_["perfMonitorV2Enabled"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_perfMonitorV2Enabled}; - methodMap_["preparedTextCacheSize"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_preparedTextCacheSize}; - methodMap_["preventShadowTreeCommitExhaustion"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_preventShadowTreeCommitExhaustion}; - methodMap_["releaseImageDataWhenConsumed"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_releaseImageDataWhenConsumed}; - methodMap_["shouldPressibilityUseW3CPointerEventsForHover"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_shouldPressibilityUseW3CPointerEventsForHover}; - methodMap_["skipActivityIdentityAssertionOnHostPause"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_skipActivityIdentityAssertionOnHostPause}; - methodMap_["sweepActiveTouchOnChildNativeGesturesAndroid"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_sweepActiveTouchOnChildNativeGesturesAndroid}; - methodMap_["traceTurboModulePromiseRejectionsOnAndroid"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_traceTurboModulePromiseRejectionsOnAndroid}; - methodMap_["updateRuntimeShadowNodeReferencesOnCommit"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_updateRuntimeShadowNodeReferencesOnCommit}; - methodMap_["useAlwaysAvailableJSErrorHandling"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useAlwaysAvailableJSErrorHandling}; - methodMap_["useFabricInterop"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useFabricInterop}; - methodMap_["useNativeEqualsInNativeReadableArrayAndroid"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useNativeEqualsInNativeReadableArrayAndroid}; - methodMap_["useNativeTransformHelperAndroid"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useNativeTransformHelperAndroid}; - methodMap_["useNativeViewConfigsInBridgelessMode"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useNativeViewConfigsInBridgelessMode}; - methodMap_["useOptimizedEventBatchingOnAndroid"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useOptimizedEventBatchingOnAndroid}; - methodMap_["useRawPropsJsiValue"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useRawPropsJsiValue}; - methodMap_["useShadowNodeStateOnClone"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useShadowNodeStateOnClone}; - methodMap_["useTurboModuleInterop"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useTurboModuleInterop}; - methodMap_["useTurboModules"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useTurboModules}; - methodMap_["virtualViewPrerenderRatio"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_virtualViewPrerenderRatio}; -} -static jsi::Value __hostFunction_NativeAccessibilityInfoCxxSpecJSI_isReduceMotionEnabled(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->isReduceMotionEnabled( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt).asFunction(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAccessibilityInfoCxxSpecJSI_isInvertColorsEnabled(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->isInvertColorsEnabled( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt).asFunction(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAccessibilityInfoCxxSpecJSI_isHighTextContrastEnabled(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->isHighTextContrastEnabled( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt).asFunction(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAccessibilityInfoCxxSpecJSI_isTouchExplorationEnabled(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->isTouchExplorationEnabled( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt).asFunction(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAccessibilityInfoCxxSpecJSI_isAccessibilityServiceEnabled(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->isAccessibilityServiceEnabled( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt).asFunction(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAccessibilityInfoCxxSpecJSI_setAccessibilityFocus(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->setAccessibilityFocus( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAccessibilityInfoCxxSpecJSI_announceForAccessibility(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->announceForAccessibility( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAccessibilityInfoCxxSpecJSI_getRecommendedTimeoutMillis(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->getRecommendedTimeoutMillis( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt).asFunction(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAccessibilityInfoCxxSpecJSI_isGrayscaleEnabled(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->isGrayscaleEnabled( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt).asFunction(rt) - ); - return jsi::Value::undefined(); -} - -NativeAccessibilityInfoCxxSpecJSI::NativeAccessibilityInfoCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("AccessibilityInfo", jsInvoker) { - methodMap_["isReduceMotionEnabled"] = MethodMetadata {1, __hostFunction_NativeAccessibilityInfoCxxSpecJSI_isReduceMotionEnabled}; - methodMap_["isInvertColorsEnabled"] = MethodMetadata {1, __hostFunction_NativeAccessibilityInfoCxxSpecJSI_isInvertColorsEnabled}; - methodMap_["isHighTextContrastEnabled"] = MethodMetadata {1, __hostFunction_NativeAccessibilityInfoCxxSpecJSI_isHighTextContrastEnabled}; - methodMap_["isTouchExplorationEnabled"] = MethodMetadata {1, __hostFunction_NativeAccessibilityInfoCxxSpecJSI_isTouchExplorationEnabled}; - methodMap_["isAccessibilityServiceEnabled"] = MethodMetadata {1, __hostFunction_NativeAccessibilityInfoCxxSpecJSI_isAccessibilityServiceEnabled}; - methodMap_["setAccessibilityFocus"] = MethodMetadata {1, __hostFunction_NativeAccessibilityInfoCxxSpecJSI_setAccessibilityFocus}; - methodMap_["announceForAccessibility"] = MethodMetadata {1, __hostFunction_NativeAccessibilityInfoCxxSpecJSI_announceForAccessibility}; - methodMap_["getRecommendedTimeoutMillis"] = MethodMetadata {2, __hostFunction_NativeAccessibilityInfoCxxSpecJSI_getRecommendedTimeoutMillis}; - methodMap_["isGrayscaleEnabled"] = MethodMetadata {1, __hostFunction_NativeAccessibilityInfoCxxSpecJSI_isGrayscaleEnabled}; -} -static jsi::Value __hostFunction_NativeAccessibilityManagerCxxSpecJSI_getCurrentBoldTextState(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->getCurrentBoldTextState( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt).asFunction(rt), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt).asFunction(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAccessibilityManagerCxxSpecJSI_getCurrentGrayscaleState(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->getCurrentGrayscaleState( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt).asFunction(rt), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt).asFunction(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAccessibilityManagerCxxSpecJSI_getCurrentInvertColorsState(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->getCurrentInvertColorsState( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt).asFunction(rt), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt).asFunction(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAccessibilityManagerCxxSpecJSI_getCurrentReduceMotionState(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->getCurrentReduceMotionState( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt).asFunction(rt), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt).asFunction(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAccessibilityManagerCxxSpecJSI_getCurrentDarkerSystemColorsState(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->getCurrentDarkerSystemColorsState( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt).asFunction(rt), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt).asFunction(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAccessibilityManagerCxxSpecJSI_getCurrentPrefersCrossFadeTransitionsState(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->getCurrentPrefersCrossFadeTransitionsState( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt).asFunction(rt), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt).asFunction(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAccessibilityManagerCxxSpecJSI_getCurrentReduceTransparencyState(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->getCurrentReduceTransparencyState( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt).asFunction(rt), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt).asFunction(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAccessibilityManagerCxxSpecJSI_getCurrentVoiceOverState(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->getCurrentVoiceOverState( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt).asFunction(rt), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt).asFunction(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAccessibilityManagerCxxSpecJSI_setAccessibilityContentSizeMultipliers(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->setAccessibilityContentSizeMultipliers( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAccessibilityManagerCxxSpecJSI_setAccessibilityFocus(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->setAccessibilityFocus( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAccessibilityManagerCxxSpecJSI_announceForAccessibility(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->announceForAccessibility( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAccessibilityManagerCxxSpecJSI_announceForAccessibilityWithOptions(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->announceForAccessibilityWithOptions( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt) - ); - return jsi::Value::undefined(); -} - -NativeAccessibilityManagerCxxSpecJSI::NativeAccessibilityManagerCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("AccessibilityManager", jsInvoker) { - methodMap_["getCurrentBoldTextState"] = MethodMetadata {2, __hostFunction_NativeAccessibilityManagerCxxSpecJSI_getCurrentBoldTextState}; - methodMap_["getCurrentGrayscaleState"] = MethodMetadata {2, __hostFunction_NativeAccessibilityManagerCxxSpecJSI_getCurrentGrayscaleState}; - methodMap_["getCurrentInvertColorsState"] = MethodMetadata {2, __hostFunction_NativeAccessibilityManagerCxxSpecJSI_getCurrentInvertColorsState}; - methodMap_["getCurrentReduceMotionState"] = MethodMetadata {2, __hostFunction_NativeAccessibilityManagerCxxSpecJSI_getCurrentReduceMotionState}; - methodMap_["getCurrentDarkerSystemColorsState"] = MethodMetadata {2, __hostFunction_NativeAccessibilityManagerCxxSpecJSI_getCurrentDarkerSystemColorsState}; - methodMap_["getCurrentPrefersCrossFadeTransitionsState"] = MethodMetadata {2, __hostFunction_NativeAccessibilityManagerCxxSpecJSI_getCurrentPrefersCrossFadeTransitionsState}; - methodMap_["getCurrentReduceTransparencyState"] = MethodMetadata {2, __hostFunction_NativeAccessibilityManagerCxxSpecJSI_getCurrentReduceTransparencyState}; - methodMap_["getCurrentVoiceOverState"] = MethodMetadata {2, __hostFunction_NativeAccessibilityManagerCxxSpecJSI_getCurrentVoiceOverState}; - methodMap_["setAccessibilityContentSizeMultipliers"] = MethodMetadata {1, __hostFunction_NativeAccessibilityManagerCxxSpecJSI_setAccessibilityContentSizeMultipliers}; - methodMap_["setAccessibilityFocus"] = MethodMetadata {1, __hostFunction_NativeAccessibilityManagerCxxSpecJSI_setAccessibilityFocus}; - methodMap_["announceForAccessibility"] = MethodMetadata {1, __hostFunction_NativeAccessibilityManagerCxxSpecJSI_announceForAccessibility}; - methodMap_["announceForAccessibilityWithOptions"] = MethodMetadata {2, __hostFunction_NativeAccessibilityManagerCxxSpecJSI_announceForAccessibilityWithOptions}; -} -static jsi::Value __hostFunction_NativeActionSheetManagerCxxSpecJSI_getConstants(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getConstants( - rt - ); -} -static jsi::Value __hostFunction_NativeActionSheetManagerCxxSpecJSI_showActionSheetWithOptions(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->showActionSheetWithOptions( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt).asFunction(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeActionSheetManagerCxxSpecJSI_showShareActionSheetWithOptions(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->showShareActionSheetWithOptions( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt).asFunction(rt), - count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asObject(rt).asFunction(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeActionSheetManagerCxxSpecJSI_dismissActionSheet(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->dismissActionSheet( - rt - ); - return jsi::Value::undefined(); -} - -NativeActionSheetManagerCxxSpecJSI::NativeActionSheetManagerCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("ActionSheetManager", jsInvoker) { - methodMap_["getConstants"] = MethodMetadata {0, __hostFunction_NativeActionSheetManagerCxxSpecJSI_getConstants}; - methodMap_["showActionSheetWithOptions"] = MethodMetadata {2, __hostFunction_NativeActionSheetManagerCxxSpecJSI_showActionSheetWithOptions}; - methodMap_["showShareActionSheetWithOptions"] = MethodMetadata {3, __hostFunction_NativeActionSheetManagerCxxSpecJSI_showShareActionSheetWithOptions}; - methodMap_["dismissActionSheet"] = MethodMetadata {0, __hostFunction_NativeActionSheetManagerCxxSpecJSI_dismissActionSheet}; -} -static jsi::Value __hostFunction_NativeAlertManagerCxxSpecJSI_alertWithArgs(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->alertWithArgs( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt).asFunction(rt) - ); - return jsi::Value::undefined(); -} - -NativeAlertManagerCxxSpecJSI::NativeAlertManagerCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("AlertManager", jsInvoker) { - methodMap_["alertWithArgs"] = MethodMetadata {2, __hostFunction_NativeAlertManagerCxxSpecJSI_alertWithArgs}; -} -static jsi::Value __hostFunction_NativeAnimatedModuleCxxSpecJSI_startOperationBatch(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->startOperationBatch( - rt - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAnimatedModuleCxxSpecJSI_finishOperationBatch(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->finishOperationBatch( - rt - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAnimatedModuleCxxSpecJSI_createAnimatedNode(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->createAnimatedNode( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAnimatedModuleCxxSpecJSI_updateAnimatedNodeConfig(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->updateAnimatedNodeConfig( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAnimatedModuleCxxSpecJSI_getValue(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->getValue( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt).asFunction(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAnimatedModuleCxxSpecJSI_startListeningToAnimatedNodeValue(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->startListeningToAnimatedNodeValue( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAnimatedModuleCxxSpecJSI_stopListeningToAnimatedNodeValue(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->stopListeningToAnimatedNodeValue( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAnimatedModuleCxxSpecJSI_connectAnimatedNodes(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->connectAnimatedNodes( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAnimatedModuleCxxSpecJSI_disconnectAnimatedNodes(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->disconnectAnimatedNodes( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAnimatedModuleCxxSpecJSI_startAnimatingNode(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->startAnimatingNode( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asNumber(), - count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asObject(rt), - count <= 3 ? throw jsi::JSError(rt, "Expected argument in position 3 to be passed") : args[3].asObject(rt).asFunction(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAnimatedModuleCxxSpecJSI_stopAnimation(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->stopAnimation( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAnimatedModuleCxxSpecJSI_setAnimatedNodeValue(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->setAnimatedNodeValue( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAnimatedModuleCxxSpecJSI_setAnimatedNodeOffset(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->setAnimatedNodeOffset( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAnimatedModuleCxxSpecJSI_flattenAnimatedNodeOffset(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->flattenAnimatedNodeOffset( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAnimatedModuleCxxSpecJSI_extractAnimatedNodeOffset(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->extractAnimatedNodeOffset( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAnimatedModuleCxxSpecJSI_connectAnimatedNodeToView(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->connectAnimatedNodeToView( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAnimatedModuleCxxSpecJSI_disconnectAnimatedNodeFromView(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->disconnectAnimatedNodeFromView( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAnimatedModuleCxxSpecJSI_restoreDefaultValues(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->restoreDefaultValues( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAnimatedModuleCxxSpecJSI_dropAnimatedNode(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->dropAnimatedNode( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAnimatedModuleCxxSpecJSI_addAnimatedEventToView(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->addAnimatedEventToView( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt), - count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asObject(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAnimatedModuleCxxSpecJSI_removeAnimatedEventFromView(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->removeAnimatedEventFromView( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt), - count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAnimatedModuleCxxSpecJSI_addListener(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->addListener( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAnimatedModuleCxxSpecJSI_removeListeners(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->removeListeners( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAnimatedModuleCxxSpecJSI_queueAndExecuteBatchedOperations(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->queueAndExecuteBatchedOperations( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt).asArray(rt) - ); - return jsi::Value::undefined(); -} - -NativeAnimatedModuleCxxSpecJSI::NativeAnimatedModuleCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("NativeAnimatedModule", jsInvoker) { - methodMap_["startOperationBatch"] = MethodMetadata {0, __hostFunction_NativeAnimatedModuleCxxSpecJSI_startOperationBatch}; - methodMap_["finishOperationBatch"] = MethodMetadata {0, __hostFunction_NativeAnimatedModuleCxxSpecJSI_finishOperationBatch}; - methodMap_["createAnimatedNode"] = MethodMetadata {2, __hostFunction_NativeAnimatedModuleCxxSpecJSI_createAnimatedNode}; - methodMap_["updateAnimatedNodeConfig"] = MethodMetadata {2, __hostFunction_NativeAnimatedModuleCxxSpecJSI_updateAnimatedNodeConfig}; - methodMap_["getValue"] = MethodMetadata {2, __hostFunction_NativeAnimatedModuleCxxSpecJSI_getValue}; - methodMap_["startListeningToAnimatedNodeValue"] = MethodMetadata {1, __hostFunction_NativeAnimatedModuleCxxSpecJSI_startListeningToAnimatedNodeValue}; - methodMap_["stopListeningToAnimatedNodeValue"] = MethodMetadata {1, __hostFunction_NativeAnimatedModuleCxxSpecJSI_stopListeningToAnimatedNodeValue}; - methodMap_["connectAnimatedNodes"] = MethodMetadata {2, __hostFunction_NativeAnimatedModuleCxxSpecJSI_connectAnimatedNodes}; - methodMap_["disconnectAnimatedNodes"] = MethodMetadata {2, __hostFunction_NativeAnimatedModuleCxxSpecJSI_disconnectAnimatedNodes}; - methodMap_["startAnimatingNode"] = MethodMetadata {4, __hostFunction_NativeAnimatedModuleCxxSpecJSI_startAnimatingNode}; - methodMap_["stopAnimation"] = MethodMetadata {1, __hostFunction_NativeAnimatedModuleCxxSpecJSI_stopAnimation}; - methodMap_["setAnimatedNodeValue"] = MethodMetadata {2, __hostFunction_NativeAnimatedModuleCxxSpecJSI_setAnimatedNodeValue}; - methodMap_["setAnimatedNodeOffset"] = MethodMetadata {2, __hostFunction_NativeAnimatedModuleCxxSpecJSI_setAnimatedNodeOffset}; - methodMap_["flattenAnimatedNodeOffset"] = MethodMetadata {1, __hostFunction_NativeAnimatedModuleCxxSpecJSI_flattenAnimatedNodeOffset}; - methodMap_["extractAnimatedNodeOffset"] = MethodMetadata {1, __hostFunction_NativeAnimatedModuleCxxSpecJSI_extractAnimatedNodeOffset}; - methodMap_["connectAnimatedNodeToView"] = MethodMetadata {2, __hostFunction_NativeAnimatedModuleCxxSpecJSI_connectAnimatedNodeToView}; - methodMap_["disconnectAnimatedNodeFromView"] = MethodMetadata {2, __hostFunction_NativeAnimatedModuleCxxSpecJSI_disconnectAnimatedNodeFromView}; - methodMap_["restoreDefaultValues"] = MethodMetadata {1, __hostFunction_NativeAnimatedModuleCxxSpecJSI_restoreDefaultValues}; - methodMap_["dropAnimatedNode"] = MethodMetadata {1, __hostFunction_NativeAnimatedModuleCxxSpecJSI_dropAnimatedNode}; - methodMap_["addAnimatedEventToView"] = MethodMetadata {3, __hostFunction_NativeAnimatedModuleCxxSpecJSI_addAnimatedEventToView}; - methodMap_["removeAnimatedEventFromView"] = MethodMetadata {3, __hostFunction_NativeAnimatedModuleCxxSpecJSI_removeAnimatedEventFromView}; - methodMap_["addListener"] = MethodMetadata {1, __hostFunction_NativeAnimatedModuleCxxSpecJSI_addListener}; - methodMap_["removeListeners"] = MethodMetadata {1, __hostFunction_NativeAnimatedModuleCxxSpecJSI_removeListeners}; - methodMap_["queueAndExecuteBatchedOperations"] = MethodMetadata {1, __hostFunction_NativeAnimatedModuleCxxSpecJSI_queueAndExecuteBatchedOperations}; -} -static jsi::Value __hostFunction_NativeAnimatedTurboModuleCxxSpecJSI_startOperationBatch(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->startOperationBatch( - rt - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAnimatedTurboModuleCxxSpecJSI_finishOperationBatch(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->finishOperationBatch( - rt - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAnimatedTurboModuleCxxSpecJSI_createAnimatedNode(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->createAnimatedNode( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAnimatedTurboModuleCxxSpecJSI_updateAnimatedNodeConfig(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->updateAnimatedNodeConfig( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAnimatedTurboModuleCxxSpecJSI_getValue(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->getValue( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt).asFunction(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAnimatedTurboModuleCxxSpecJSI_startListeningToAnimatedNodeValue(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->startListeningToAnimatedNodeValue( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAnimatedTurboModuleCxxSpecJSI_stopListeningToAnimatedNodeValue(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->stopListeningToAnimatedNodeValue( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAnimatedTurboModuleCxxSpecJSI_connectAnimatedNodes(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->connectAnimatedNodes( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAnimatedTurboModuleCxxSpecJSI_disconnectAnimatedNodes(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->disconnectAnimatedNodes( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAnimatedTurboModuleCxxSpecJSI_startAnimatingNode(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->startAnimatingNode( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asNumber(), - count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asObject(rt), - count <= 3 ? throw jsi::JSError(rt, "Expected argument in position 3 to be passed") : args[3].asObject(rt).asFunction(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAnimatedTurboModuleCxxSpecJSI_stopAnimation(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->stopAnimation( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAnimatedTurboModuleCxxSpecJSI_setAnimatedNodeValue(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->setAnimatedNodeValue( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAnimatedTurboModuleCxxSpecJSI_setAnimatedNodeOffset(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->setAnimatedNodeOffset( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAnimatedTurboModuleCxxSpecJSI_flattenAnimatedNodeOffset(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->flattenAnimatedNodeOffset( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAnimatedTurboModuleCxxSpecJSI_extractAnimatedNodeOffset(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->extractAnimatedNodeOffset( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAnimatedTurboModuleCxxSpecJSI_connectAnimatedNodeToView(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->connectAnimatedNodeToView( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAnimatedTurboModuleCxxSpecJSI_disconnectAnimatedNodeFromView(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->disconnectAnimatedNodeFromView( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAnimatedTurboModuleCxxSpecJSI_restoreDefaultValues(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->restoreDefaultValues( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAnimatedTurboModuleCxxSpecJSI_dropAnimatedNode(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->dropAnimatedNode( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAnimatedTurboModuleCxxSpecJSI_addAnimatedEventToView(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->addAnimatedEventToView( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt), - count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asObject(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAnimatedTurboModuleCxxSpecJSI_removeAnimatedEventFromView(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->removeAnimatedEventFromView( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt), - count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAnimatedTurboModuleCxxSpecJSI_addListener(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->addListener( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAnimatedTurboModuleCxxSpecJSI_removeListeners(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->removeListeners( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAnimatedTurboModuleCxxSpecJSI_queueAndExecuteBatchedOperations(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->queueAndExecuteBatchedOperations( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt).asArray(rt) - ); - return jsi::Value::undefined(); -} - -NativeAnimatedTurboModuleCxxSpecJSI::NativeAnimatedTurboModuleCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("NativeAnimatedTurboModule", jsInvoker) { - methodMap_["startOperationBatch"] = MethodMetadata {0, __hostFunction_NativeAnimatedTurboModuleCxxSpecJSI_startOperationBatch}; - methodMap_["finishOperationBatch"] = MethodMetadata {0, __hostFunction_NativeAnimatedTurboModuleCxxSpecJSI_finishOperationBatch}; - methodMap_["createAnimatedNode"] = MethodMetadata {2, __hostFunction_NativeAnimatedTurboModuleCxxSpecJSI_createAnimatedNode}; - methodMap_["updateAnimatedNodeConfig"] = MethodMetadata {2, __hostFunction_NativeAnimatedTurboModuleCxxSpecJSI_updateAnimatedNodeConfig}; - methodMap_["getValue"] = MethodMetadata {2, __hostFunction_NativeAnimatedTurboModuleCxxSpecJSI_getValue}; - methodMap_["startListeningToAnimatedNodeValue"] = MethodMetadata {1, __hostFunction_NativeAnimatedTurboModuleCxxSpecJSI_startListeningToAnimatedNodeValue}; - methodMap_["stopListeningToAnimatedNodeValue"] = MethodMetadata {1, __hostFunction_NativeAnimatedTurboModuleCxxSpecJSI_stopListeningToAnimatedNodeValue}; - methodMap_["connectAnimatedNodes"] = MethodMetadata {2, __hostFunction_NativeAnimatedTurboModuleCxxSpecJSI_connectAnimatedNodes}; - methodMap_["disconnectAnimatedNodes"] = MethodMetadata {2, __hostFunction_NativeAnimatedTurboModuleCxxSpecJSI_disconnectAnimatedNodes}; - methodMap_["startAnimatingNode"] = MethodMetadata {4, __hostFunction_NativeAnimatedTurboModuleCxxSpecJSI_startAnimatingNode}; - methodMap_["stopAnimation"] = MethodMetadata {1, __hostFunction_NativeAnimatedTurboModuleCxxSpecJSI_stopAnimation}; - methodMap_["setAnimatedNodeValue"] = MethodMetadata {2, __hostFunction_NativeAnimatedTurboModuleCxxSpecJSI_setAnimatedNodeValue}; - methodMap_["setAnimatedNodeOffset"] = MethodMetadata {2, __hostFunction_NativeAnimatedTurboModuleCxxSpecJSI_setAnimatedNodeOffset}; - methodMap_["flattenAnimatedNodeOffset"] = MethodMetadata {1, __hostFunction_NativeAnimatedTurboModuleCxxSpecJSI_flattenAnimatedNodeOffset}; - methodMap_["extractAnimatedNodeOffset"] = MethodMetadata {1, __hostFunction_NativeAnimatedTurboModuleCxxSpecJSI_extractAnimatedNodeOffset}; - methodMap_["connectAnimatedNodeToView"] = MethodMetadata {2, __hostFunction_NativeAnimatedTurboModuleCxxSpecJSI_connectAnimatedNodeToView}; - methodMap_["disconnectAnimatedNodeFromView"] = MethodMetadata {2, __hostFunction_NativeAnimatedTurboModuleCxxSpecJSI_disconnectAnimatedNodeFromView}; - methodMap_["restoreDefaultValues"] = MethodMetadata {1, __hostFunction_NativeAnimatedTurboModuleCxxSpecJSI_restoreDefaultValues}; - methodMap_["dropAnimatedNode"] = MethodMetadata {1, __hostFunction_NativeAnimatedTurboModuleCxxSpecJSI_dropAnimatedNode}; - methodMap_["addAnimatedEventToView"] = MethodMetadata {3, __hostFunction_NativeAnimatedTurboModuleCxxSpecJSI_addAnimatedEventToView}; - methodMap_["removeAnimatedEventFromView"] = MethodMetadata {3, __hostFunction_NativeAnimatedTurboModuleCxxSpecJSI_removeAnimatedEventFromView}; - methodMap_["addListener"] = MethodMetadata {1, __hostFunction_NativeAnimatedTurboModuleCxxSpecJSI_addListener}; - methodMap_["removeListeners"] = MethodMetadata {1, __hostFunction_NativeAnimatedTurboModuleCxxSpecJSI_removeListeners}; - methodMap_["queueAndExecuteBatchedOperations"] = MethodMetadata {1, __hostFunction_NativeAnimatedTurboModuleCxxSpecJSI_queueAndExecuteBatchedOperations}; -} -static jsi::Value __hostFunction_NativeAppearanceCxxSpecJSI_getColorScheme(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - auto result = static_cast(&turboModule)->getColorScheme( - rt - ); - return result ? jsi::Value(std::move(*result)) : jsi::Value::null(); -} -static jsi::Value __hostFunction_NativeAppearanceCxxSpecJSI_setColorScheme(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->setColorScheme( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAppearanceCxxSpecJSI_addListener(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->addListener( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAppearanceCxxSpecJSI_removeListeners(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->removeListeners( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber() - ); - return jsi::Value::undefined(); -} - -NativeAppearanceCxxSpecJSI::NativeAppearanceCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("Appearance", jsInvoker) { - methodMap_["getColorScheme"] = MethodMetadata {0, __hostFunction_NativeAppearanceCxxSpecJSI_getColorScheme}; - methodMap_["setColorScheme"] = MethodMetadata {1, __hostFunction_NativeAppearanceCxxSpecJSI_setColorScheme}; - methodMap_["addListener"] = MethodMetadata {1, __hostFunction_NativeAppearanceCxxSpecJSI_addListener}; - methodMap_["removeListeners"] = MethodMetadata {1, __hostFunction_NativeAppearanceCxxSpecJSI_removeListeners}; -} -static jsi::Value __hostFunction_NativeAppStateCxxSpecJSI_getConstants(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getConstants( - rt - ); -} -static jsi::Value __hostFunction_NativeAppStateCxxSpecJSI_getCurrentAppState(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->getCurrentAppState( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt).asFunction(rt), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt).asFunction(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAppStateCxxSpecJSI_addListener(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->addListener( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeAppStateCxxSpecJSI_removeListeners(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->removeListeners( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber() - ); - return jsi::Value::undefined(); -} - -NativeAppStateCxxSpecJSI::NativeAppStateCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("AppState", jsInvoker) { - methodMap_["getConstants"] = MethodMetadata {0, __hostFunction_NativeAppStateCxxSpecJSI_getConstants}; - methodMap_["getCurrentAppState"] = MethodMetadata {2, __hostFunction_NativeAppStateCxxSpecJSI_getCurrentAppState}; - methodMap_["addListener"] = MethodMetadata {1, __hostFunction_NativeAppStateCxxSpecJSI_addListener}; - methodMap_["removeListeners"] = MethodMetadata {1, __hostFunction_NativeAppStateCxxSpecJSI_removeListeners}; -} -static jsi::Value __hostFunction_NativeAppThemeCxxSpecJSI_getConstants(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getConstants( - rt - ); -} - -NativeAppThemeCxxSpecJSI::NativeAppThemeCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("AppTheme", jsInvoker) { - methodMap_["getConstants"] = MethodMetadata {0, __hostFunction_NativeAppThemeCxxSpecJSI_getConstants}; -} -static jsi::Value __hostFunction_NativeBlobModuleCxxSpecJSI_getConstants(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getConstants( - rt - ); -} -static jsi::Value __hostFunction_NativeBlobModuleCxxSpecJSI_addNetworkingHandler(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->addNetworkingHandler( - rt - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeBlobModuleCxxSpecJSI_addWebSocketHandler(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->addWebSocketHandler( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeBlobModuleCxxSpecJSI_removeWebSocketHandler(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->removeWebSocketHandler( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeBlobModuleCxxSpecJSI_sendOverSocket(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->sendOverSocket( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeBlobModuleCxxSpecJSI_createFromParts(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->createFromParts( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt).asArray(rt), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeBlobModuleCxxSpecJSI_release(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->release( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt) - ); - return jsi::Value::undefined(); -} - -NativeBlobModuleCxxSpecJSI::NativeBlobModuleCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("BlobModule", jsInvoker) { - methodMap_["getConstants"] = MethodMetadata {0, __hostFunction_NativeBlobModuleCxxSpecJSI_getConstants}; - methodMap_["addNetworkingHandler"] = MethodMetadata {0, __hostFunction_NativeBlobModuleCxxSpecJSI_addNetworkingHandler}; - methodMap_["addWebSocketHandler"] = MethodMetadata {1, __hostFunction_NativeBlobModuleCxxSpecJSI_addWebSocketHandler}; - methodMap_["removeWebSocketHandler"] = MethodMetadata {1, __hostFunction_NativeBlobModuleCxxSpecJSI_removeWebSocketHandler}; - methodMap_["sendOverSocket"] = MethodMetadata {2, __hostFunction_NativeBlobModuleCxxSpecJSI_sendOverSocket}; - methodMap_["createFromParts"] = MethodMetadata {2, __hostFunction_NativeBlobModuleCxxSpecJSI_createFromParts}; - methodMap_["release"] = MethodMetadata {1, __hostFunction_NativeBlobModuleCxxSpecJSI_release}; -} -static jsi::Value __hostFunction_NativeClipboardCxxSpecJSI_getConstants(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getConstants( - rt - ); -} -static jsi::Value __hostFunction_NativeClipboardCxxSpecJSI_getString(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getString( - rt - ); -} -static jsi::Value __hostFunction_NativeClipboardCxxSpecJSI_setString(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->setString( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt) - ); - return jsi::Value::undefined(); -} - -NativeClipboardCxxSpecJSI::NativeClipboardCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("Clipboard", jsInvoker) { - methodMap_["getConstants"] = MethodMetadata {0, __hostFunction_NativeClipboardCxxSpecJSI_getConstants}; - methodMap_["getString"] = MethodMetadata {0, __hostFunction_NativeClipboardCxxSpecJSI_getString}; - methodMap_["setString"] = MethodMetadata {1, __hostFunction_NativeClipboardCxxSpecJSI_setString}; -} -static jsi::Value __hostFunction_NativeDeviceEventManagerCxxSpecJSI_invokeDefaultBackPressHandler(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->invokeDefaultBackPressHandler( - rt - ); - return jsi::Value::undefined(); -} - -NativeDeviceEventManagerCxxSpecJSI::NativeDeviceEventManagerCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("DeviceEventManager", jsInvoker) { - methodMap_["invokeDefaultBackPressHandler"] = MethodMetadata {0, __hostFunction_NativeDeviceEventManagerCxxSpecJSI_invokeDefaultBackPressHandler}; -} -static jsi::Value __hostFunction_NativeDeviceInfoCxxSpecJSI_getConstants(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getConstants( - rt - ); -} - -NativeDeviceInfoCxxSpecJSI::NativeDeviceInfoCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("DeviceInfo", jsInvoker) { - methodMap_["getConstants"] = MethodMetadata {0, __hostFunction_NativeDeviceInfoCxxSpecJSI_getConstants}; -} -static jsi::Value __hostFunction_NativeDevLoadingViewCxxSpecJSI_showMessage(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->showMessage( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt), - count <= 1 || args[1].isNull() || args[1].isUndefined() ? std::nullopt : std::make_optional(args[1].asNumber()), - count <= 2 || args[2].isNull() || args[2].isUndefined() ? std::nullopt : std::make_optional(args[2].asNumber()) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeDevLoadingViewCxxSpecJSI_hide(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->hide( - rt - ); - return jsi::Value::undefined(); -} - -NativeDevLoadingViewCxxSpecJSI::NativeDevLoadingViewCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("DevLoadingView", jsInvoker) { - methodMap_["showMessage"] = MethodMetadata {3, __hostFunction_NativeDevLoadingViewCxxSpecJSI_showMessage}; - methodMap_["hide"] = MethodMetadata {0, __hostFunction_NativeDevLoadingViewCxxSpecJSI_hide}; -} -static jsi::Value __hostFunction_NativeDevSettingsCxxSpecJSI_reload(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->reload( - rt - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeDevSettingsCxxSpecJSI_reloadWithReason(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->reloadWithReason( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeDevSettingsCxxSpecJSI_onFastRefresh(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->onFastRefresh( - rt - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeDevSettingsCxxSpecJSI_setHotLoadingEnabled(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->setHotLoadingEnabled( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asBool() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeDevSettingsCxxSpecJSI_setProfilingEnabled(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->setProfilingEnabled( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asBool() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeDevSettingsCxxSpecJSI_toggleElementInspector(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->toggleElementInspector( - rt - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeDevSettingsCxxSpecJSI_addMenuItem(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->addMenuItem( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeDevSettingsCxxSpecJSI_openDebugger(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->openDebugger( - rt - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeDevSettingsCxxSpecJSI_addListener(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->addListener( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeDevSettingsCxxSpecJSI_removeListeners(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->removeListeners( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeDevSettingsCxxSpecJSI_setIsShakeToShowDevMenuEnabled(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->setIsShakeToShowDevMenuEnabled( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asBool() - ); - return jsi::Value::undefined(); -} - -NativeDevSettingsCxxSpecJSI::NativeDevSettingsCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("DevSettings", jsInvoker) { - methodMap_["reload"] = MethodMetadata {0, __hostFunction_NativeDevSettingsCxxSpecJSI_reload}; - methodMap_["reloadWithReason"] = MethodMetadata {1, __hostFunction_NativeDevSettingsCxxSpecJSI_reloadWithReason}; - methodMap_["onFastRefresh"] = MethodMetadata {0, __hostFunction_NativeDevSettingsCxxSpecJSI_onFastRefresh}; - methodMap_["setHotLoadingEnabled"] = MethodMetadata {1, __hostFunction_NativeDevSettingsCxxSpecJSI_setHotLoadingEnabled}; - methodMap_["setProfilingEnabled"] = MethodMetadata {1, __hostFunction_NativeDevSettingsCxxSpecJSI_setProfilingEnabled}; - methodMap_["toggleElementInspector"] = MethodMetadata {0, __hostFunction_NativeDevSettingsCxxSpecJSI_toggleElementInspector}; - methodMap_["addMenuItem"] = MethodMetadata {1, __hostFunction_NativeDevSettingsCxxSpecJSI_addMenuItem}; - methodMap_["openDebugger"] = MethodMetadata {0, __hostFunction_NativeDevSettingsCxxSpecJSI_openDebugger}; - methodMap_["addListener"] = MethodMetadata {1, __hostFunction_NativeDevSettingsCxxSpecJSI_addListener}; - methodMap_["removeListeners"] = MethodMetadata {1, __hostFunction_NativeDevSettingsCxxSpecJSI_removeListeners}; - methodMap_["setIsShakeToShowDevMenuEnabled"] = MethodMetadata {1, __hostFunction_NativeDevSettingsCxxSpecJSI_setIsShakeToShowDevMenuEnabled}; -} -static jsi::Value __hostFunction_NativeDialogManagerAndroidCxxSpecJSI_getConstants(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getConstants( - rt - ); -} -static jsi::Value __hostFunction_NativeDialogManagerAndroidCxxSpecJSI_showAlert(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->showAlert( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt).asFunction(rt), - count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asObject(rt).asFunction(rt) - ); - return jsi::Value::undefined(); -} - -NativeDialogManagerAndroidCxxSpecJSI::NativeDialogManagerAndroidCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("DialogManagerAndroid", jsInvoker) { - methodMap_["getConstants"] = MethodMetadata {0, __hostFunction_NativeDialogManagerAndroidCxxSpecJSI_getConstants}; - methodMap_["showAlert"] = MethodMetadata {3, __hostFunction_NativeDialogManagerAndroidCxxSpecJSI_showAlert}; -} -static jsi::Value __hostFunction_NativeDialogManagerWindowsCxxSpecJSI_getConstants(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getConstants( - rt - ); -} -static jsi::Value __hostFunction_NativeDialogManagerWindowsCxxSpecJSI_showAlert(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->showAlert( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt).asFunction(rt), - count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asObject(rt).asFunction(rt) - ); - return jsi::Value::undefined(); -} - -NativeDialogManagerWindowsCxxSpecJSI::NativeDialogManagerWindowsCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("Alert", jsInvoker) { - methodMap_["getConstants"] = MethodMetadata {0, __hostFunction_NativeDialogManagerWindowsCxxSpecJSI_getConstants}; - methodMap_["showAlert"] = MethodMetadata {3, __hostFunction_NativeDialogManagerWindowsCxxSpecJSI_showAlert}; -} -static jsi::Value __hostFunction_NativeExceptionsManagerCxxSpecJSI_reportFatalException(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->reportFatalException( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt).asArray(rt), - count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeExceptionsManagerCxxSpecJSI_reportSoftException(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->reportSoftException( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt).asArray(rt), - count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeExceptionsManagerCxxSpecJSI_reportException(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->reportException( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeExceptionsManagerCxxSpecJSI_dismissRedbox(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->dismissRedbox( - rt - ); - return jsi::Value::undefined(); -} - -NativeExceptionsManagerCxxSpecJSI::NativeExceptionsManagerCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("ExceptionsManager", jsInvoker) { - methodMap_["reportFatalException"] = MethodMetadata {3, __hostFunction_NativeExceptionsManagerCxxSpecJSI_reportFatalException}; - methodMap_["reportSoftException"] = MethodMetadata {3, __hostFunction_NativeExceptionsManagerCxxSpecJSI_reportSoftException}; - methodMap_["reportException"] = MethodMetadata {1, __hostFunction_NativeExceptionsManagerCxxSpecJSI_reportException}; - methodMap_["dismissRedbox"] = MethodMetadata {0, __hostFunction_NativeExceptionsManagerCxxSpecJSI_dismissRedbox}; -} -static jsi::Value __hostFunction_NativeFileReaderModuleCxxSpecJSI_readAsDataURL(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->readAsDataURL( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt) - ); -} -static jsi::Value __hostFunction_NativeFileReaderModuleCxxSpecJSI_readAsText(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->readAsText( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt) - ); -} - -NativeFileReaderModuleCxxSpecJSI::NativeFileReaderModuleCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("FileReaderModule", jsInvoker) { - methodMap_["readAsDataURL"] = MethodMetadata {1, __hostFunction_NativeFileReaderModuleCxxSpecJSI_readAsDataURL}; - methodMap_["readAsText"] = MethodMetadata {2, __hostFunction_NativeFileReaderModuleCxxSpecJSI_readAsText}; -} -static jsi::Value __hostFunction_NativeFrameRateLoggerCxxSpecJSI_setGlobalOptions(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->setGlobalOptions( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeFrameRateLoggerCxxSpecJSI_setContext(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->setContext( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeFrameRateLoggerCxxSpecJSI_beginScroll(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->beginScroll( - rt - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeFrameRateLoggerCxxSpecJSI_endScroll(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->endScroll( - rt - ); - return jsi::Value::undefined(); -} - -NativeFrameRateLoggerCxxSpecJSI::NativeFrameRateLoggerCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("FrameRateLogger", jsInvoker) { - methodMap_["setGlobalOptions"] = MethodMetadata {1, __hostFunction_NativeFrameRateLoggerCxxSpecJSI_setGlobalOptions}; - methodMap_["setContext"] = MethodMetadata {1, __hostFunction_NativeFrameRateLoggerCxxSpecJSI_setContext}; - methodMap_["beginScroll"] = MethodMetadata {0, __hostFunction_NativeFrameRateLoggerCxxSpecJSI_beginScroll}; - methodMap_["endScroll"] = MethodMetadata {0, __hostFunction_NativeFrameRateLoggerCxxSpecJSI_endScroll}; -} -static jsi::Value __hostFunction_NativeHeadlessJsTaskSupportCxxSpecJSI_notifyTaskFinished(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->notifyTaskFinished( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeHeadlessJsTaskSupportCxxSpecJSI_notifyTaskRetry(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->notifyTaskRetry( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber() - ); -} - -NativeHeadlessJsTaskSupportCxxSpecJSI::NativeHeadlessJsTaskSupportCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("HeadlessJsTaskSupport", jsInvoker) { - methodMap_["notifyTaskFinished"] = MethodMetadata {1, __hostFunction_NativeHeadlessJsTaskSupportCxxSpecJSI_notifyTaskFinished}; - methodMap_["notifyTaskRetry"] = MethodMetadata {1, __hostFunction_NativeHeadlessJsTaskSupportCxxSpecJSI_notifyTaskRetry}; -} -static jsi::Value __hostFunction_NativeI18nManagerCxxSpecJSI_getConstants(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getConstants( - rt - ); -} -static jsi::Value __hostFunction_NativeI18nManagerCxxSpecJSI_allowRTL(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->allowRTL( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asBool() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeI18nManagerCxxSpecJSI_forceRTL(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->forceRTL( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asBool() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeI18nManagerCxxSpecJSI_swapLeftAndRightInRTL(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->swapLeftAndRightInRTL( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asBool() - ); - return jsi::Value::undefined(); -} - -NativeI18nManagerCxxSpecJSI::NativeI18nManagerCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("I18nManager", jsInvoker) { - methodMap_["getConstants"] = MethodMetadata {0, __hostFunction_NativeI18nManagerCxxSpecJSI_getConstants}; - methodMap_["allowRTL"] = MethodMetadata {1, __hostFunction_NativeI18nManagerCxxSpecJSI_allowRTL}; - methodMap_["forceRTL"] = MethodMetadata {1, __hostFunction_NativeI18nManagerCxxSpecJSI_forceRTL}; - methodMap_["swapLeftAndRightInRTL"] = MethodMetadata {1, __hostFunction_NativeI18nManagerCxxSpecJSI_swapLeftAndRightInRTL}; -} -static jsi::Value __hostFunction_NativeImageEditorCxxSpecJSI_getConstants(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getConstants( - rt - ); -} -static jsi::Value __hostFunction_NativeImageEditorCxxSpecJSI_cropImage(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->cropImage( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt), - count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asObject(rt).asFunction(rt), - count <= 3 ? throw jsi::JSError(rt, "Expected argument in position 3 to be passed") : args[3].asObject(rt).asFunction(rt) - ); - return jsi::Value::undefined(); -} - -NativeImageEditorCxxSpecJSI::NativeImageEditorCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("ImageEditingManager", jsInvoker) { - methodMap_["getConstants"] = MethodMetadata {0, __hostFunction_NativeImageEditorCxxSpecJSI_getConstants}; - methodMap_["cropImage"] = MethodMetadata {4, __hostFunction_NativeImageEditorCxxSpecJSI_cropImage}; -} -static jsi::Value __hostFunction_NativeImageLoaderAndroidCxxSpecJSI_abortRequest(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->abortRequest( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeImageLoaderAndroidCxxSpecJSI_getConstants(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getConstants( - rt - ); -} -static jsi::Value __hostFunction_NativeImageLoaderAndroidCxxSpecJSI_getSize(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getSize( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt) - ); -} -static jsi::Value __hostFunction_NativeImageLoaderAndroidCxxSpecJSI_getSizeWithHeaders(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getSizeWithHeaders( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt) - ); -} -static jsi::Value __hostFunction_NativeImageLoaderAndroidCxxSpecJSI_prefetchImage(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->prefetchImage( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asNumber() - ); -} -static jsi::Value __hostFunction_NativeImageLoaderAndroidCxxSpecJSI_queryCache(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->queryCache( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt).asArray(rt) - ); -} - -NativeImageLoaderAndroidCxxSpecJSI::NativeImageLoaderAndroidCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("ImageLoader", jsInvoker) { - methodMap_["abortRequest"] = MethodMetadata {1, __hostFunction_NativeImageLoaderAndroidCxxSpecJSI_abortRequest}; - methodMap_["getConstants"] = MethodMetadata {0, __hostFunction_NativeImageLoaderAndroidCxxSpecJSI_getConstants}; - methodMap_["getSize"] = MethodMetadata {1, __hostFunction_NativeImageLoaderAndroidCxxSpecJSI_getSize}; - methodMap_["getSizeWithHeaders"] = MethodMetadata {2, __hostFunction_NativeImageLoaderAndroidCxxSpecJSI_getSizeWithHeaders}; - methodMap_["prefetchImage"] = MethodMetadata {2, __hostFunction_NativeImageLoaderAndroidCxxSpecJSI_prefetchImage}; - methodMap_["queryCache"] = MethodMetadata {1, __hostFunction_NativeImageLoaderAndroidCxxSpecJSI_queryCache}; -} -static jsi::Value __hostFunction_NativeImageLoaderIOSCxxSpecJSI_getConstants(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getConstants( - rt - ); -} -static jsi::Value __hostFunction_NativeImageLoaderIOSCxxSpecJSI_getSize(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getSize( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt) - ); -} -static jsi::Value __hostFunction_NativeImageLoaderIOSCxxSpecJSI_getSizeWithHeaders(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getSizeWithHeaders( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt) - ); -} -static jsi::Value __hostFunction_NativeImageLoaderIOSCxxSpecJSI_prefetchImage(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->prefetchImage( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt) - ); -} -static jsi::Value __hostFunction_NativeImageLoaderIOSCxxSpecJSI_prefetchImageWithMetadata(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->prefetchImageWithMetadata( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt), - count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asNumber() - ); -} -static jsi::Value __hostFunction_NativeImageLoaderIOSCxxSpecJSI_queryCache(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->queryCache( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt).asArray(rt) - ); -} - -NativeImageLoaderIOSCxxSpecJSI::NativeImageLoaderIOSCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("ImageLoader", jsInvoker) { - methodMap_["getConstants"] = MethodMetadata {0, __hostFunction_NativeImageLoaderIOSCxxSpecJSI_getConstants}; - methodMap_["getSize"] = MethodMetadata {1, __hostFunction_NativeImageLoaderIOSCxxSpecJSI_getSize}; - methodMap_["getSizeWithHeaders"] = MethodMetadata {2, __hostFunction_NativeImageLoaderIOSCxxSpecJSI_getSizeWithHeaders}; - methodMap_["prefetchImage"] = MethodMetadata {1, __hostFunction_NativeImageLoaderIOSCxxSpecJSI_prefetchImage}; - methodMap_["prefetchImageWithMetadata"] = MethodMetadata {3, __hostFunction_NativeImageLoaderIOSCxxSpecJSI_prefetchImageWithMetadata}; - methodMap_["queryCache"] = MethodMetadata {1, __hostFunction_NativeImageLoaderIOSCxxSpecJSI_queryCache}; -} -static jsi::Value __hostFunction_NativeImageStoreAndroidCxxSpecJSI_getConstants(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getConstants( - rt - ); -} -static jsi::Value __hostFunction_NativeImageStoreAndroidCxxSpecJSI_getBase64ForTag(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->getBase64ForTag( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt).asFunction(rt), - count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asObject(rt).asFunction(rt) - ); - return jsi::Value::undefined(); -} - -NativeImageStoreAndroidCxxSpecJSI::NativeImageStoreAndroidCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("ImageStoreManager", jsInvoker) { - methodMap_["getConstants"] = MethodMetadata {0, __hostFunction_NativeImageStoreAndroidCxxSpecJSI_getConstants}; - methodMap_["getBase64ForTag"] = MethodMetadata {3, __hostFunction_NativeImageStoreAndroidCxxSpecJSI_getBase64ForTag}; -} -static jsi::Value __hostFunction_NativeImageStoreIOSCxxSpecJSI_getConstants(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getConstants( - rt - ); -} -static jsi::Value __hostFunction_NativeImageStoreIOSCxxSpecJSI_getBase64ForTag(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->getBase64ForTag( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt).asFunction(rt), - count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asObject(rt).asFunction(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeImageStoreIOSCxxSpecJSI_hasImageForTag(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->hasImageForTag( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt).asFunction(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeImageStoreIOSCxxSpecJSI_removeImageForTag(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->removeImageForTag( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeImageStoreIOSCxxSpecJSI_addImageFromBase64(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->addImageFromBase64( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt).asFunction(rt), - count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asObject(rt).asFunction(rt) - ); - return jsi::Value::undefined(); -} - -NativeImageStoreIOSCxxSpecJSI::NativeImageStoreIOSCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("ImageStoreManager", jsInvoker) { - methodMap_["getConstants"] = MethodMetadata {0, __hostFunction_NativeImageStoreIOSCxxSpecJSI_getConstants}; - methodMap_["getBase64ForTag"] = MethodMetadata {3, __hostFunction_NativeImageStoreIOSCxxSpecJSI_getBase64ForTag}; - methodMap_["hasImageForTag"] = MethodMetadata {2, __hostFunction_NativeImageStoreIOSCxxSpecJSI_hasImageForTag}; - methodMap_["removeImageForTag"] = MethodMetadata {1, __hostFunction_NativeImageStoreIOSCxxSpecJSI_removeImageForTag}; - methodMap_["addImageFromBase64"] = MethodMetadata {3, __hostFunction_NativeImageStoreIOSCxxSpecJSI_addImageFromBase64}; -} -static jsi::Value __hostFunction_NativeIntentAndroidCxxSpecJSI_getInitialURL(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getInitialURL( - rt - ); -} -static jsi::Value __hostFunction_NativeIntentAndroidCxxSpecJSI_canOpenURL(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->canOpenURL( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt) - ); -} -static jsi::Value __hostFunction_NativeIntentAndroidCxxSpecJSI_openURL(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->openURL( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt) - ); -} -static jsi::Value __hostFunction_NativeIntentAndroidCxxSpecJSI_openSettings(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->openSettings( - rt - ); -} -static jsi::Value __hostFunction_NativeIntentAndroidCxxSpecJSI_sendIntent(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->sendIntent( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt), - count <= 1 || args[1].isNull() || args[1].isUndefined() ? std::nullopt : std::make_optional(args[1].asObject(rt).asArray(rt)) - ); -} - -NativeIntentAndroidCxxSpecJSI::NativeIntentAndroidCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("IntentAndroid", jsInvoker) { - methodMap_["getInitialURL"] = MethodMetadata {0, __hostFunction_NativeIntentAndroidCxxSpecJSI_getInitialURL}; - methodMap_["canOpenURL"] = MethodMetadata {1, __hostFunction_NativeIntentAndroidCxxSpecJSI_canOpenURL}; - methodMap_["openURL"] = MethodMetadata {1, __hostFunction_NativeIntentAndroidCxxSpecJSI_openURL}; - methodMap_["openSettings"] = MethodMetadata {0, __hostFunction_NativeIntentAndroidCxxSpecJSI_openSettings}; - methodMap_["sendIntent"] = MethodMetadata {2, __hostFunction_NativeIntentAndroidCxxSpecJSI_sendIntent}; -} -static jsi::Value __hostFunction_NativeJSCHeapCaptureCxxSpecJSI_captureComplete(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->captureComplete( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt), - count <= 1 || args[1].isNull() || args[1].isUndefined() ? std::nullopt : std::make_optional(args[1].asString(rt)) - ); - return jsi::Value::undefined(); -} - -NativeJSCHeapCaptureCxxSpecJSI::NativeJSCHeapCaptureCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("JSCHeapCapture", jsInvoker) { - methodMap_["captureComplete"] = MethodMetadata {2, __hostFunction_NativeJSCHeapCaptureCxxSpecJSI_captureComplete}; -} -static jsi::Value __hostFunction_NativeKeyboardObserverCxxSpecJSI_addListener(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->addListener( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeKeyboardObserverCxxSpecJSI_removeListeners(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->removeListeners( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber() - ); - return jsi::Value::undefined(); -} - -NativeKeyboardObserverCxxSpecJSI::NativeKeyboardObserverCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("KeyboardObserver", jsInvoker) { - methodMap_["addListener"] = MethodMetadata {1, __hostFunction_NativeKeyboardObserverCxxSpecJSI_addListener}; - methodMap_["removeListeners"] = MethodMetadata {1, __hostFunction_NativeKeyboardObserverCxxSpecJSI_removeListeners}; -} -static jsi::Value __hostFunction_NativeLinkingManagerCxxSpecJSI_getInitialURL(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getInitialURL( - rt - ); -} -static jsi::Value __hostFunction_NativeLinkingManagerCxxSpecJSI_canOpenURL(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->canOpenURL( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt) - ); -} -static jsi::Value __hostFunction_NativeLinkingManagerCxxSpecJSI_openURL(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->openURL( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt) - ); -} -static jsi::Value __hostFunction_NativeLinkingManagerCxxSpecJSI_openSettings(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->openSettings( - rt - ); -} -static jsi::Value __hostFunction_NativeLinkingManagerCxxSpecJSI_addListener(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->addListener( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeLinkingManagerCxxSpecJSI_removeListeners(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->removeListeners( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber() - ); - return jsi::Value::undefined(); -} - -NativeLinkingManagerCxxSpecJSI::NativeLinkingManagerCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("LinkingManager", jsInvoker) { - methodMap_["getInitialURL"] = MethodMetadata {0, __hostFunction_NativeLinkingManagerCxxSpecJSI_getInitialURL}; - methodMap_["canOpenURL"] = MethodMetadata {1, __hostFunction_NativeLinkingManagerCxxSpecJSI_canOpenURL}; - methodMap_["openURL"] = MethodMetadata {1, __hostFunction_NativeLinkingManagerCxxSpecJSI_openURL}; - methodMap_["openSettings"] = MethodMetadata {0, __hostFunction_NativeLinkingManagerCxxSpecJSI_openSettings}; - methodMap_["addListener"] = MethodMetadata {1, __hostFunction_NativeLinkingManagerCxxSpecJSI_addListener}; - methodMap_["removeListeners"] = MethodMetadata {1, __hostFunction_NativeLinkingManagerCxxSpecJSI_removeListeners}; -} -static jsi::Value __hostFunction_NativeLogBoxCxxSpecJSI_show(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->show( - rt - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeLogBoxCxxSpecJSI_hide(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->hide( - rt - ); - return jsi::Value::undefined(); -} - -NativeLogBoxCxxSpecJSI::NativeLogBoxCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("LogBox", jsInvoker) { - methodMap_["show"] = MethodMetadata {0, __hostFunction_NativeLogBoxCxxSpecJSI_show}; - methodMap_["hide"] = MethodMetadata {0, __hostFunction_NativeLogBoxCxxSpecJSI_hide}; -} -static jsi::Value __hostFunction_NativeModalManagerCxxSpecJSI_addListener(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->addListener( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeModalManagerCxxSpecJSI_removeListeners(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->removeListeners( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber() - ); - return jsi::Value::undefined(); -} - -NativeModalManagerCxxSpecJSI::NativeModalManagerCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("ModalManager", jsInvoker) { - methodMap_["addListener"] = MethodMetadata {1, __hostFunction_NativeModalManagerCxxSpecJSI_addListener}; - methodMap_["removeListeners"] = MethodMetadata {1, __hostFunction_NativeModalManagerCxxSpecJSI_removeListeners}; -} -static jsi::Value __hostFunction_NativeNetworkingAndroidCxxSpecJSI_sendRequest(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->sendRequest( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt), - count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asNumber(), - count <= 3 ? throw jsi::JSError(rt, "Expected argument in position 3 to be passed") : args[3].asObject(rt).asArray(rt), - count <= 4 ? throw jsi::JSError(rt, "Expected argument in position 4 to be passed") : args[4].asObject(rt), - count <= 5 ? throw jsi::JSError(rt, "Expected argument in position 5 to be passed") : args[5].asString(rt), - count <= 6 ? throw jsi::JSError(rt, "Expected argument in position 6 to be passed") : args[6].asBool(), - count <= 7 ? throw jsi::JSError(rt, "Expected argument in position 7 to be passed") : args[7].asNumber(), - count <= 8 ? throw jsi::JSError(rt, "Expected argument in position 8 to be passed") : args[8].asBool() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeNetworkingAndroidCxxSpecJSI_abortRequest(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->abortRequest( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeNetworkingAndroidCxxSpecJSI_clearCookies(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->clearCookies( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt).asFunction(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeNetworkingAndroidCxxSpecJSI_addListener(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->addListener( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeNetworkingAndroidCxxSpecJSI_removeListeners(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->removeListeners( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber() - ); - return jsi::Value::undefined(); -} - -NativeNetworkingAndroidCxxSpecJSI::NativeNetworkingAndroidCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("Networking", jsInvoker) { - methodMap_["sendRequest"] = MethodMetadata {9, __hostFunction_NativeNetworkingAndroidCxxSpecJSI_sendRequest}; - methodMap_["abortRequest"] = MethodMetadata {1, __hostFunction_NativeNetworkingAndroidCxxSpecJSI_abortRequest}; - methodMap_["clearCookies"] = MethodMetadata {1, __hostFunction_NativeNetworkingAndroidCxxSpecJSI_clearCookies}; - methodMap_["addListener"] = MethodMetadata {1, __hostFunction_NativeNetworkingAndroidCxxSpecJSI_addListener}; - methodMap_["removeListeners"] = MethodMetadata {1, __hostFunction_NativeNetworkingAndroidCxxSpecJSI_removeListeners}; -} -static jsi::Value __hostFunction_NativeNetworkingIOSCxxSpecJSI_sendRequest(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->sendRequest( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt).asFunction(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeNetworkingIOSCxxSpecJSI_abortRequest(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->abortRequest( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeNetworkingIOSCxxSpecJSI_clearCookies(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->clearCookies( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt).asFunction(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeNetworkingIOSCxxSpecJSI_addListener(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->addListener( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeNetworkingIOSCxxSpecJSI_removeListeners(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->removeListeners( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber() - ); - return jsi::Value::undefined(); -} - -NativeNetworkingIOSCxxSpecJSI::NativeNetworkingIOSCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("Networking", jsInvoker) { - methodMap_["sendRequest"] = MethodMetadata {2, __hostFunction_NativeNetworkingIOSCxxSpecJSI_sendRequest}; - methodMap_["abortRequest"] = MethodMetadata {1, __hostFunction_NativeNetworkingIOSCxxSpecJSI_abortRequest}; - methodMap_["clearCookies"] = MethodMetadata {1, __hostFunction_NativeNetworkingIOSCxxSpecJSI_clearCookies}; - methodMap_["addListener"] = MethodMetadata {1, __hostFunction_NativeNetworkingIOSCxxSpecJSI_addListener}; - methodMap_["removeListeners"] = MethodMetadata {1, __hostFunction_NativeNetworkingIOSCxxSpecJSI_removeListeners}; -} -static jsi::Value __hostFunction_NativePermissionsAndroidCxxSpecJSI_checkPermission(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->checkPermission( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt) - ); -} -static jsi::Value __hostFunction_NativePermissionsAndroidCxxSpecJSI_requestPermission(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->requestPermission( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt) - ); -} -static jsi::Value __hostFunction_NativePermissionsAndroidCxxSpecJSI_shouldShowRequestPermissionRationale(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->shouldShowRequestPermissionRationale( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt) - ); -} -static jsi::Value __hostFunction_NativePermissionsAndroidCxxSpecJSI_requestMultiplePermissions(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->requestMultiplePermissions( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt).asArray(rt) - ); -} - -NativePermissionsAndroidCxxSpecJSI::NativePermissionsAndroidCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("PermissionsAndroid", jsInvoker) { - methodMap_["checkPermission"] = MethodMetadata {1, __hostFunction_NativePermissionsAndroidCxxSpecJSI_checkPermission}; - methodMap_["requestPermission"] = MethodMetadata {1, __hostFunction_NativePermissionsAndroidCxxSpecJSI_requestPermission}; - methodMap_["shouldShowRequestPermissionRationale"] = MethodMetadata {1, __hostFunction_NativePermissionsAndroidCxxSpecJSI_shouldShowRequestPermissionRationale}; - methodMap_["requestMultiplePermissions"] = MethodMetadata {1, __hostFunction_NativePermissionsAndroidCxxSpecJSI_requestMultiplePermissions}; -} -static jsi::Value __hostFunction_NativePlatformConstantsAndroidCxxSpecJSI_getConstants(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getConstants( - rt - ); -} -static jsi::Value __hostFunction_NativePlatformConstantsAndroidCxxSpecJSI_getAndroidID(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getAndroidID( - rt - ); -} - -NativePlatformConstantsAndroidCxxSpecJSI::NativePlatformConstantsAndroidCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("PlatformConstants", jsInvoker) { - methodMap_["getConstants"] = MethodMetadata {0, __hostFunction_NativePlatformConstantsAndroidCxxSpecJSI_getConstants}; - methodMap_["getAndroidID"] = MethodMetadata {0, __hostFunction_NativePlatformConstantsAndroidCxxSpecJSI_getAndroidID}; -} -static jsi::Value __hostFunction_NativePlatformConstantsIOSCxxSpecJSI_getConstants(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getConstants( - rt - ); -} - -NativePlatformConstantsIOSCxxSpecJSI::NativePlatformConstantsIOSCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("PlatformConstants", jsInvoker) { - methodMap_["getConstants"] = MethodMetadata {0, __hostFunction_NativePlatformConstantsIOSCxxSpecJSI_getConstants}; -} -static jsi::Value __hostFunction_NativePlatformConstantsWindowsCxxSpecJSI_getConstants(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getConstants( - rt - ); -} - -NativePlatformConstantsWindowsCxxSpecJSI::NativePlatformConstantsWindowsCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("PlatformConstants", jsInvoker) { - methodMap_["getConstants"] = MethodMetadata {0, __hostFunction_NativePlatformConstantsWindowsCxxSpecJSI_getConstants}; -} -static jsi::Value __hostFunction_NativePushNotificationManagerIOSCxxSpecJSI_getConstants(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getConstants( - rt - ); -} -static jsi::Value __hostFunction_NativePushNotificationManagerIOSCxxSpecJSI_onFinishRemoteNotification(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->onFinishRemoteNotification( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativePushNotificationManagerIOSCxxSpecJSI_setApplicationIconBadgeNumber(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->setApplicationIconBadgeNumber( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativePushNotificationManagerIOSCxxSpecJSI_getApplicationIconBadgeNumber(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->getApplicationIconBadgeNumber( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt).asFunction(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativePushNotificationManagerIOSCxxSpecJSI_requestPermissions(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->requestPermissions( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt) - ); -} -static jsi::Value __hostFunction_NativePushNotificationManagerIOSCxxSpecJSI_abandonPermissions(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->abandonPermissions( - rt - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativePushNotificationManagerIOSCxxSpecJSI_checkPermissions(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->checkPermissions( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt).asFunction(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativePushNotificationManagerIOSCxxSpecJSI_presentLocalNotification(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->presentLocalNotification( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativePushNotificationManagerIOSCxxSpecJSI_scheduleLocalNotification(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->scheduleLocalNotification( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativePushNotificationManagerIOSCxxSpecJSI_cancelAllLocalNotifications(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->cancelAllLocalNotifications( - rt - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativePushNotificationManagerIOSCxxSpecJSI_cancelLocalNotifications(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->cancelLocalNotifications( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativePushNotificationManagerIOSCxxSpecJSI_getInitialNotification(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getInitialNotification( - rt - ); -} -static jsi::Value __hostFunction_NativePushNotificationManagerIOSCxxSpecJSI_getScheduledLocalNotifications(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->getScheduledLocalNotifications( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt).asFunction(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativePushNotificationManagerIOSCxxSpecJSI_removeAllDeliveredNotifications(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->removeAllDeliveredNotifications( - rt - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativePushNotificationManagerIOSCxxSpecJSI_removeDeliveredNotifications(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->removeDeliveredNotifications( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt).asArray(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativePushNotificationManagerIOSCxxSpecJSI_getDeliveredNotifications(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->getDeliveredNotifications( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt).asFunction(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativePushNotificationManagerIOSCxxSpecJSI_getAuthorizationStatus(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->getAuthorizationStatus( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt).asFunction(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativePushNotificationManagerIOSCxxSpecJSI_addListener(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->addListener( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativePushNotificationManagerIOSCxxSpecJSI_removeListeners(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->removeListeners( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber() - ); - return jsi::Value::undefined(); -} - -NativePushNotificationManagerIOSCxxSpecJSI::NativePushNotificationManagerIOSCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("PushNotificationManager", jsInvoker) { - methodMap_["getConstants"] = MethodMetadata {0, __hostFunction_NativePushNotificationManagerIOSCxxSpecJSI_getConstants}; - methodMap_["onFinishRemoteNotification"] = MethodMetadata {2, __hostFunction_NativePushNotificationManagerIOSCxxSpecJSI_onFinishRemoteNotification}; - methodMap_["setApplicationIconBadgeNumber"] = MethodMetadata {1, __hostFunction_NativePushNotificationManagerIOSCxxSpecJSI_setApplicationIconBadgeNumber}; - methodMap_["getApplicationIconBadgeNumber"] = MethodMetadata {1, __hostFunction_NativePushNotificationManagerIOSCxxSpecJSI_getApplicationIconBadgeNumber}; - methodMap_["requestPermissions"] = MethodMetadata {1, __hostFunction_NativePushNotificationManagerIOSCxxSpecJSI_requestPermissions}; - methodMap_["abandonPermissions"] = MethodMetadata {0, __hostFunction_NativePushNotificationManagerIOSCxxSpecJSI_abandonPermissions}; - methodMap_["checkPermissions"] = MethodMetadata {1, __hostFunction_NativePushNotificationManagerIOSCxxSpecJSI_checkPermissions}; - methodMap_["presentLocalNotification"] = MethodMetadata {1, __hostFunction_NativePushNotificationManagerIOSCxxSpecJSI_presentLocalNotification}; - methodMap_["scheduleLocalNotification"] = MethodMetadata {1, __hostFunction_NativePushNotificationManagerIOSCxxSpecJSI_scheduleLocalNotification}; - methodMap_["cancelAllLocalNotifications"] = MethodMetadata {0, __hostFunction_NativePushNotificationManagerIOSCxxSpecJSI_cancelAllLocalNotifications}; - methodMap_["cancelLocalNotifications"] = MethodMetadata {1, __hostFunction_NativePushNotificationManagerIOSCxxSpecJSI_cancelLocalNotifications}; - methodMap_["getInitialNotification"] = MethodMetadata {0, __hostFunction_NativePushNotificationManagerIOSCxxSpecJSI_getInitialNotification}; - methodMap_["getScheduledLocalNotifications"] = MethodMetadata {1, __hostFunction_NativePushNotificationManagerIOSCxxSpecJSI_getScheduledLocalNotifications}; - methodMap_["removeAllDeliveredNotifications"] = MethodMetadata {0, __hostFunction_NativePushNotificationManagerIOSCxxSpecJSI_removeAllDeliveredNotifications}; - methodMap_["removeDeliveredNotifications"] = MethodMetadata {1, __hostFunction_NativePushNotificationManagerIOSCxxSpecJSI_removeDeliveredNotifications}; - methodMap_["getDeliveredNotifications"] = MethodMetadata {1, __hostFunction_NativePushNotificationManagerIOSCxxSpecJSI_getDeliveredNotifications}; - methodMap_["getAuthorizationStatus"] = MethodMetadata {1, __hostFunction_NativePushNotificationManagerIOSCxxSpecJSI_getAuthorizationStatus}; - methodMap_["addListener"] = MethodMetadata {1, __hostFunction_NativePushNotificationManagerIOSCxxSpecJSI_addListener}; - methodMap_["removeListeners"] = MethodMetadata {1, __hostFunction_NativePushNotificationManagerIOSCxxSpecJSI_removeListeners}; -} -static jsi::Value __hostFunction_NativeRedBoxCxxSpecJSI_setExtraData(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->setExtraData( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeRedBoxCxxSpecJSI_dismiss(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->dismiss( - rt - ); - return jsi::Value::undefined(); -} - -NativeRedBoxCxxSpecJSI::NativeRedBoxCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("RedBox", jsInvoker) { - methodMap_["setExtraData"] = MethodMetadata {2, __hostFunction_NativeRedBoxCxxSpecJSI_setExtraData}; - methodMap_["dismiss"] = MethodMetadata {0, __hostFunction_NativeRedBoxCxxSpecJSI_dismiss}; -} -static jsi::Value __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getConstants(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getConstants( - rt - ); -} -static jsi::Value __hostFunction_NativeSampleTurboModuleCxxSpecJSI_voidFunc(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->voidFunc( - rt - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getBool(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getBool( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asBool() - ); -} -static jsi::Value __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getEnum(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getEnum( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber() - ); -} -static jsi::Value __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getNumber(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getNumber( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber() - ); -} -static jsi::Value __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getString(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getString( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt) - ); -} -static jsi::Value __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getArray(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getArray( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt).asArray(rt) - ); -} -static jsi::Value __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getObject(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getObject( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt) - ); -} -static jsi::Value __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getUnsafeObject(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getUnsafeObject( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt) - ); -} -static jsi::Value __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getRootTag(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getRootTag( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber() - ); -} -static jsi::Value __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getValue(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getValue( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt), - count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asObject(rt) - ); -} -static jsi::Value __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getValueWithCallback(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->getValueWithCallback( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt).asFunction(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getValueWithPromise(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getValueWithPromise( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asBool() - ); -} -static jsi::Value __hostFunction_NativeSampleTurboModuleCxxSpecJSI_voidFuncThrows(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->voidFuncThrows( - rt - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getObjectThrows(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getObjectThrows( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt) - ); -} -static jsi::Value __hostFunction_NativeSampleTurboModuleCxxSpecJSI_promiseThrows(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->promiseThrows( - rt - ); -} -static jsi::Value __hostFunction_NativeSampleTurboModuleCxxSpecJSI_voidFuncAssert(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->voidFuncAssert( - rt - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getObjectAssert(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getObjectAssert( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt) - ); -} -static jsi::Value __hostFunction_NativeSampleTurboModuleCxxSpecJSI_promiseAssert(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->promiseAssert( - rt - ); -} -static jsi::Value __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getImageUrl(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getImageUrl( - rt - ); -} - -NativeSampleTurboModuleCxxSpecJSI::NativeSampleTurboModuleCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("SampleTurboModule", jsInvoker) { - methodMap_["getConstants"] = MethodMetadata {0, __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getConstants}; - methodMap_["voidFunc"] = MethodMetadata {0, __hostFunction_NativeSampleTurboModuleCxxSpecJSI_voidFunc}; - methodMap_["getBool"] = MethodMetadata {1, __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getBool}; - methodMap_["getEnum"] = MethodMetadata {1, __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getEnum}; - methodMap_["getNumber"] = MethodMetadata {1, __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getNumber}; - methodMap_["getString"] = MethodMetadata {1, __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getString}; - methodMap_["getArray"] = MethodMetadata {1, __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getArray}; - methodMap_["getObject"] = MethodMetadata {1, __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getObject}; - methodMap_["getUnsafeObject"] = MethodMetadata {1, __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getUnsafeObject}; - methodMap_["getRootTag"] = MethodMetadata {1, __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getRootTag}; - methodMap_["getValue"] = MethodMetadata {3, __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getValue}; - methodMap_["getValueWithCallback"] = MethodMetadata {1, __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getValueWithCallback}; - methodMap_["getValueWithPromise"] = MethodMetadata {1, __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getValueWithPromise}; - methodMap_["voidFuncThrows"] = MethodMetadata {0, __hostFunction_NativeSampleTurboModuleCxxSpecJSI_voidFuncThrows}; - methodMap_["getObjectThrows"] = MethodMetadata {1, __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getObjectThrows}; - methodMap_["promiseThrows"] = MethodMetadata {0, __hostFunction_NativeSampleTurboModuleCxxSpecJSI_promiseThrows}; - methodMap_["voidFuncAssert"] = MethodMetadata {0, __hostFunction_NativeSampleTurboModuleCxxSpecJSI_voidFuncAssert}; - methodMap_["getObjectAssert"] = MethodMetadata {1, __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getObjectAssert}; - methodMap_["promiseAssert"] = MethodMetadata {0, __hostFunction_NativeSampleTurboModuleCxxSpecJSI_promiseAssert}; - methodMap_["getImageUrl"] = MethodMetadata {0, __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getImageUrl}; -} -static jsi::Value __hostFunction_NativeSegmentFetcherCxxSpecJSI_fetchSegment(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->fetchSegment( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt), - count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asObject(rt).asFunction(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeSegmentFetcherCxxSpecJSI_getSegment(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->getSegment( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt), - count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asObject(rt).asFunction(rt) - ); - return jsi::Value::undefined(); -} - -NativeSegmentFetcherCxxSpecJSI::NativeSegmentFetcherCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("SegmentFetcher", jsInvoker) { - methodMap_["fetchSegment"] = MethodMetadata {3, __hostFunction_NativeSegmentFetcherCxxSpecJSI_fetchSegment}; - methodMap_["getSegment"] = MethodMetadata {3, __hostFunction_NativeSegmentFetcherCxxSpecJSI_getSegment}; -} -static jsi::Value __hostFunction_NativeSettingsManagerCxxSpecJSI_getConstants(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getConstants( - rt - ); -} -static jsi::Value __hostFunction_NativeSettingsManagerCxxSpecJSI_setValues(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->setValues( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeSettingsManagerCxxSpecJSI_deleteValues(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->deleteValues( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt).asArray(rt) - ); - return jsi::Value::undefined(); -} - -NativeSettingsManagerCxxSpecJSI::NativeSettingsManagerCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("SettingsManager", jsInvoker) { - methodMap_["getConstants"] = MethodMetadata {0, __hostFunction_NativeSettingsManagerCxxSpecJSI_getConstants}; - methodMap_["setValues"] = MethodMetadata {1, __hostFunction_NativeSettingsManagerCxxSpecJSI_setValues}; - methodMap_["deleteValues"] = MethodMetadata {1, __hostFunction_NativeSettingsManagerCxxSpecJSI_deleteValues}; -} -static jsi::Value __hostFunction_NativeShareModuleCxxSpecJSI_getConstants(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getConstants( - rt - ); -} -static jsi::Value __hostFunction_NativeShareModuleCxxSpecJSI_share(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->share( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt), - count <= 1 || args[1].isUndefined() ? std::nullopt : std::make_optional(args[1].asString(rt)) - ); -} - -NativeShareModuleCxxSpecJSI::NativeShareModuleCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("ShareModule", jsInvoker) { - methodMap_["getConstants"] = MethodMetadata {0, __hostFunction_NativeShareModuleCxxSpecJSI_getConstants}; - methodMap_["share"] = MethodMetadata {2, __hostFunction_NativeShareModuleCxxSpecJSI_share}; -} -static jsi::Value __hostFunction_NativeSoundManagerCxxSpecJSI_playTouchSound(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->playTouchSound( - rt - ); - return jsi::Value::undefined(); -} - -NativeSoundManagerCxxSpecJSI::NativeSoundManagerCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("SoundManager", jsInvoker) { - methodMap_["playTouchSound"] = MethodMetadata {0, __hostFunction_NativeSoundManagerCxxSpecJSI_playTouchSound}; -} -static jsi::Value __hostFunction_NativeSourceCodeCxxSpecJSI_getConstants(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getConstants( - rt - ); -} - -NativeSourceCodeCxxSpecJSI::NativeSourceCodeCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("SourceCode", jsInvoker) { - methodMap_["getConstants"] = MethodMetadata {0, __hostFunction_NativeSourceCodeCxxSpecJSI_getConstants}; -} -static jsi::Value __hostFunction_NativeStatusBarManagerAndroidCxxSpecJSI_getConstants(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getConstants( - rt - ); -} -static jsi::Value __hostFunction_NativeStatusBarManagerAndroidCxxSpecJSI_setColor(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->setColor( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asBool() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeStatusBarManagerAndroidCxxSpecJSI_setTranslucent(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->setTranslucent( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asBool() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeStatusBarManagerAndroidCxxSpecJSI_setStyle(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->setStyle( - rt, - count <= 0 || args[0].isNull() || args[0].isUndefined() ? std::nullopt : std::make_optional(args[0].asString(rt)) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeStatusBarManagerAndroidCxxSpecJSI_setHidden(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->setHidden( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asBool() - ); - return jsi::Value::undefined(); -} - -NativeStatusBarManagerAndroidCxxSpecJSI::NativeStatusBarManagerAndroidCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("StatusBarManager", jsInvoker) { - methodMap_["getConstants"] = MethodMetadata {0, __hostFunction_NativeStatusBarManagerAndroidCxxSpecJSI_getConstants}; - methodMap_["setColor"] = MethodMetadata {2, __hostFunction_NativeStatusBarManagerAndroidCxxSpecJSI_setColor}; - methodMap_["setTranslucent"] = MethodMetadata {1, __hostFunction_NativeStatusBarManagerAndroidCxxSpecJSI_setTranslucent}; - methodMap_["setStyle"] = MethodMetadata {1, __hostFunction_NativeStatusBarManagerAndroidCxxSpecJSI_setStyle}; - methodMap_["setHidden"] = MethodMetadata {1, __hostFunction_NativeStatusBarManagerAndroidCxxSpecJSI_setHidden}; -} -static jsi::Value __hostFunction_NativeStatusBarManagerIOSCxxSpecJSI_getConstants(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getConstants( - rt - ); -} -static jsi::Value __hostFunction_NativeStatusBarManagerIOSCxxSpecJSI_getHeight(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->getHeight( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt).asFunction(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeStatusBarManagerIOSCxxSpecJSI_setNetworkActivityIndicatorVisible(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->setNetworkActivityIndicatorVisible( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asBool() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeStatusBarManagerIOSCxxSpecJSI_addListener(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->addListener( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeStatusBarManagerIOSCxxSpecJSI_removeListeners(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->removeListeners( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeStatusBarManagerIOSCxxSpecJSI_setStyle(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->setStyle( - rt, - count <= 0 || args[0].isNull() || args[0].isUndefined() ? std::nullopt : std::make_optional(args[0].asString(rt)), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asBool() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeStatusBarManagerIOSCxxSpecJSI_setHidden(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->setHidden( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asBool(), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt) - ); - return jsi::Value::undefined(); -} - -NativeStatusBarManagerIOSCxxSpecJSI::NativeStatusBarManagerIOSCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("StatusBarManager", jsInvoker) { - methodMap_["getConstants"] = MethodMetadata {0, __hostFunction_NativeStatusBarManagerIOSCxxSpecJSI_getConstants}; - methodMap_["getHeight"] = MethodMetadata {1, __hostFunction_NativeStatusBarManagerIOSCxxSpecJSI_getHeight}; - methodMap_["setNetworkActivityIndicatorVisible"] = MethodMetadata {1, __hostFunction_NativeStatusBarManagerIOSCxxSpecJSI_setNetworkActivityIndicatorVisible}; - methodMap_["addListener"] = MethodMetadata {1, __hostFunction_NativeStatusBarManagerIOSCxxSpecJSI_addListener}; - methodMap_["removeListeners"] = MethodMetadata {1, __hostFunction_NativeStatusBarManagerIOSCxxSpecJSI_removeListeners}; - methodMap_["setStyle"] = MethodMetadata {2, __hostFunction_NativeStatusBarManagerIOSCxxSpecJSI_setStyle}; - methodMap_["setHidden"] = MethodMetadata {2, __hostFunction_NativeStatusBarManagerIOSCxxSpecJSI_setHidden}; -} -static jsi::Value __hostFunction_NativeTimingCxxSpecJSI_createTimer(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->createTimer( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asNumber(), - count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asNumber(), - count <= 3 ? throw jsi::JSError(rt, "Expected argument in position 3 to be passed") : args[3].asBool() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeTimingCxxSpecJSI_deleteTimer(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->deleteTimer( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeTimingCxxSpecJSI_setSendIdleEvents(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->setSendIdleEvents( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asBool() - ); - return jsi::Value::undefined(); -} - -NativeTimingCxxSpecJSI::NativeTimingCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("Timing", jsInvoker) { - methodMap_["createTimer"] = MethodMetadata {4, __hostFunction_NativeTimingCxxSpecJSI_createTimer}; - methodMap_["deleteTimer"] = MethodMetadata {1, __hostFunction_NativeTimingCxxSpecJSI_deleteTimer}; - methodMap_["setSendIdleEvents"] = MethodMetadata {1, __hostFunction_NativeTimingCxxSpecJSI_setSendIdleEvents}; -} -static jsi::Value __hostFunction_NativeToastAndroidCxxSpecJSI_getConstants(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getConstants( - rt - ); -} -static jsi::Value __hostFunction_NativeToastAndroidCxxSpecJSI_show(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->show( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeToastAndroidCxxSpecJSI_showWithGravity(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->showWithGravity( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asNumber(), - count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeToastAndroidCxxSpecJSI_showWithGravityAndOffset(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->showWithGravityAndOffset( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asNumber(), - count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asNumber(), - count <= 3 ? throw jsi::JSError(rt, "Expected argument in position 3 to be passed") : args[3].asNumber(), - count <= 4 ? throw jsi::JSError(rt, "Expected argument in position 4 to be passed") : args[4].asNumber() - ); - return jsi::Value::undefined(); -} - -NativeToastAndroidCxxSpecJSI::NativeToastAndroidCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("ToastAndroid", jsInvoker) { - methodMap_["getConstants"] = MethodMetadata {0, __hostFunction_NativeToastAndroidCxxSpecJSI_getConstants}; - methodMap_["show"] = MethodMetadata {2, __hostFunction_NativeToastAndroidCxxSpecJSI_show}; - methodMap_["showWithGravity"] = MethodMetadata {3, __hostFunction_NativeToastAndroidCxxSpecJSI_showWithGravity}; - methodMap_["showWithGravityAndOffset"] = MethodMetadata {5, __hostFunction_NativeToastAndroidCxxSpecJSI_showWithGravityAndOffset}; -} -static jsi::Value __hostFunction_NativeUIManagerCxxSpecJSI_getConstants(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getConstants( - rt - ); -} -static jsi::Value __hostFunction_NativeUIManagerCxxSpecJSI_createView(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->createView( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt), - count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asNumber(), - count <= 3 ? throw jsi::JSError(rt, "Expected argument in position 3 to be passed") : args[3].asObject(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeUIManagerCxxSpecJSI_updateView(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->updateView( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt), - count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asObject(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeUIManagerCxxSpecJSI_findSubviewIn(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->findSubviewIn( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt).asArray(rt), - count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asObject(rt).asFunction(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeUIManagerCxxSpecJSI_dispatchViewManagerCommand(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->dispatchViewManagerCommand( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asNumber(), - count <= 2 || args[2].isUndefined() ? std::nullopt : std::make_optional(args[2].asObject(rt).asArray(rt)) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeUIManagerCxxSpecJSI_measure(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->measure( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt).asFunction(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeUIManagerCxxSpecJSI_measureInWindow(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->measureInWindow( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt).asFunction(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeUIManagerCxxSpecJSI_viewIsDescendantOf(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->viewIsDescendantOf( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asNumber(), - count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asObject(rt).asFunction(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeUIManagerCxxSpecJSI_measureLayout(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->measureLayout( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asNumber(), - count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asObject(rt).asFunction(rt), - count <= 3 ? throw jsi::JSError(rt, "Expected argument in position 3 to be passed") : args[3].asObject(rt).asFunction(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeUIManagerCxxSpecJSI_measureLayoutRelativeToParent(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->measureLayoutRelativeToParent( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt).asFunction(rt), - count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asObject(rt).asFunction(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeUIManagerCxxSpecJSI_setJSResponder(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->setJSResponder( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asBool() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeUIManagerCxxSpecJSI_clearJSResponder(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->clearJSResponder( - rt - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeUIManagerCxxSpecJSI_configureNextLayoutAnimation(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->configureNextLayoutAnimation( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt).asFunction(rt), - count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asObject(rt).asFunction(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeUIManagerCxxSpecJSI_setChildren(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->setChildren( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt).asArray(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeUIManagerCxxSpecJSI_manageChildren(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->manageChildren( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt).asArray(rt), - count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asObject(rt).asArray(rt), - count <= 3 ? throw jsi::JSError(rt, "Expected argument in position 3 to be passed") : args[3].asObject(rt).asArray(rt), - count <= 4 ? throw jsi::JSError(rt, "Expected argument in position 4 to be passed") : args[4].asObject(rt).asArray(rt), - count <= 5 ? throw jsi::JSError(rt, "Expected argument in position 5 to be passed") : args[5].asObject(rt).asArray(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeUIManagerCxxSpecJSI_getConstantsForViewManager(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - auto result = static_cast(&turboModule)->getConstantsForViewManager( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt) - ); - return result ? jsi::Value(std::move(*result)) : jsi::Value::null(); -} -static jsi::Value __hostFunction_NativeUIManagerCxxSpecJSI_getDefaultEventTypes(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getDefaultEventTypes( - rt - ); -} -static jsi::Value __hostFunction_NativeUIManagerCxxSpecJSI_setLayoutAnimationEnabledExperimental(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->setLayoutAnimationEnabledExperimental( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asBool() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeUIManagerCxxSpecJSI_sendAccessibilityEvent(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->sendAccessibilityEvent( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeUIManagerCxxSpecJSI_lazilyLoadView(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->lazilyLoadView( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt) - ); -} -static jsi::Value __hostFunction_NativeUIManagerCxxSpecJSI_focus(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->focus( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeUIManagerCxxSpecJSI_blur(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->blur( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber() - ); - return jsi::Value::undefined(); -} - -NativeUIManagerCxxSpecJSI::NativeUIManagerCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("UIManager", jsInvoker) { - methodMap_["getConstants"] = MethodMetadata {0, __hostFunction_NativeUIManagerCxxSpecJSI_getConstants}; - methodMap_["createView"] = MethodMetadata {4, __hostFunction_NativeUIManagerCxxSpecJSI_createView}; - methodMap_["updateView"] = MethodMetadata {3, __hostFunction_NativeUIManagerCxxSpecJSI_updateView}; - methodMap_["findSubviewIn"] = MethodMetadata {3, __hostFunction_NativeUIManagerCxxSpecJSI_findSubviewIn}; - methodMap_["dispatchViewManagerCommand"] = MethodMetadata {3, __hostFunction_NativeUIManagerCxxSpecJSI_dispatchViewManagerCommand}; - methodMap_["measure"] = MethodMetadata {2, __hostFunction_NativeUIManagerCxxSpecJSI_measure}; - methodMap_["measureInWindow"] = MethodMetadata {2, __hostFunction_NativeUIManagerCxxSpecJSI_measureInWindow}; - methodMap_["viewIsDescendantOf"] = MethodMetadata {3, __hostFunction_NativeUIManagerCxxSpecJSI_viewIsDescendantOf}; - methodMap_["measureLayout"] = MethodMetadata {4, __hostFunction_NativeUIManagerCxxSpecJSI_measureLayout}; - methodMap_["measureLayoutRelativeToParent"] = MethodMetadata {3, __hostFunction_NativeUIManagerCxxSpecJSI_measureLayoutRelativeToParent}; - methodMap_["setJSResponder"] = MethodMetadata {2, __hostFunction_NativeUIManagerCxxSpecJSI_setJSResponder}; - methodMap_["clearJSResponder"] = MethodMetadata {0, __hostFunction_NativeUIManagerCxxSpecJSI_clearJSResponder}; - methodMap_["configureNextLayoutAnimation"] = MethodMetadata {3, __hostFunction_NativeUIManagerCxxSpecJSI_configureNextLayoutAnimation}; - methodMap_["setChildren"] = MethodMetadata {2, __hostFunction_NativeUIManagerCxxSpecJSI_setChildren}; - methodMap_["manageChildren"] = MethodMetadata {6, __hostFunction_NativeUIManagerCxxSpecJSI_manageChildren}; - methodMap_["getConstantsForViewManager"] = MethodMetadata {1, __hostFunction_NativeUIManagerCxxSpecJSI_getConstantsForViewManager}; - methodMap_["getDefaultEventTypes"] = MethodMetadata {0, __hostFunction_NativeUIManagerCxxSpecJSI_getDefaultEventTypes}; - methodMap_["setLayoutAnimationEnabledExperimental"] = MethodMetadata {1, __hostFunction_NativeUIManagerCxxSpecJSI_setLayoutAnimationEnabledExperimental}; - methodMap_["sendAccessibilityEvent"] = MethodMetadata {2, __hostFunction_NativeUIManagerCxxSpecJSI_sendAccessibilityEvent}; - methodMap_["lazilyLoadView"] = MethodMetadata {1, __hostFunction_NativeUIManagerCxxSpecJSI_lazilyLoadView}; - methodMap_["focus"] = MethodMetadata {1, __hostFunction_NativeUIManagerCxxSpecJSI_focus}; - methodMap_["blur"] = MethodMetadata {1, __hostFunction_NativeUIManagerCxxSpecJSI_blur}; -} -static jsi::Value __hostFunction_NativeVibrationCxxSpecJSI_getConstants(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getConstants( - rt - ); -} -static jsi::Value __hostFunction_NativeVibrationCxxSpecJSI_vibrate(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->vibrate( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeVibrationCxxSpecJSI_vibrateByPattern(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->vibrateByPattern( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt).asArray(rt), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeVibrationCxxSpecJSI_cancel(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->cancel( - rt - ); - return jsi::Value::undefined(); -} - -NativeVibrationCxxSpecJSI::NativeVibrationCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("Vibration", jsInvoker) { - methodMap_["getConstants"] = MethodMetadata {0, __hostFunction_NativeVibrationCxxSpecJSI_getConstants}; - methodMap_["vibrate"] = MethodMetadata {1, __hostFunction_NativeVibrationCxxSpecJSI_vibrate}; - methodMap_["vibrateByPattern"] = MethodMetadata {2, __hostFunction_NativeVibrationCxxSpecJSI_vibrateByPattern}; - methodMap_["cancel"] = MethodMetadata {0, __hostFunction_NativeVibrationCxxSpecJSI_cancel}; -} -static jsi::Value __hostFunction_NativeWebSocketModuleCxxSpecJSI_connect(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->connect( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt), - count <= 1 || args[1].isNull() || args[1].isUndefined() ? std::nullopt : std::make_optional(args[1].asObject(rt).asArray(rt)), - count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asObject(rt), - count <= 3 ? throw jsi::JSError(rt, "Expected argument in position 3 to be passed") : args[3].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeWebSocketModuleCxxSpecJSI_send(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->send( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeWebSocketModuleCxxSpecJSI_sendBinary(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->sendBinary( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeWebSocketModuleCxxSpecJSI_ping(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->ping( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeWebSocketModuleCxxSpecJSI_close(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->close( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt), - count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeWebSocketModuleCxxSpecJSI_addListener(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->addListener( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeWebSocketModuleCxxSpecJSI_removeListeners(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->removeListeners( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber() - ); - return jsi::Value::undefined(); -} - -NativeWebSocketModuleCxxSpecJSI::NativeWebSocketModuleCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("WebSocketModule", jsInvoker) { - methodMap_["connect"] = MethodMetadata {4, __hostFunction_NativeWebSocketModuleCxxSpecJSI_connect}; - methodMap_["send"] = MethodMetadata {2, __hostFunction_NativeWebSocketModuleCxxSpecJSI_send}; - methodMap_["sendBinary"] = MethodMetadata {2, __hostFunction_NativeWebSocketModuleCxxSpecJSI_sendBinary}; - methodMap_["ping"] = MethodMetadata {1, __hostFunction_NativeWebSocketModuleCxxSpecJSI_ping}; - methodMap_["close"] = MethodMetadata {3, __hostFunction_NativeWebSocketModuleCxxSpecJSI_close}; - methodMap_["addListener"] = MethodMetadata {1, __hostFunction_NativeWebSocketModuleCxxSpecJSI_addListener}; - methodMap_["removeListeners"] = MethodMetadata {1, __hostFunction_NativeWebSocketModuleCxxSpecJSI_removeListeners}; -} -static jsi::Value __hostFunction_NativeDevMenuCxxSpecJSI_show(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->show( - rt - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeDevMenuCxxSpecJSI_reload(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->reload( - rt - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeDevMenuCxxSpecJSI_setProfilingEnabled(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->setProfilingEnabled( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asBool() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeDevMenuCxxSpecJSI_setHotLoadingEnabled(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->setHotLoadingEnabled( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asBool() - ); - return jsi::Value::undefined(); -} - -NativeDevMenuCxxSpecJSI::NativeDevMenuCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("DevMenu", jsInvoker) { - methodMap_["show"] = MethodMetadata {0, __hostFunction_NativeDevMenuCxxSpecJSI_show}; - methodMap_["reload"] = MethodMetadata {0, __hostFunction_NativeDevMenuCxxSpecJSI_reload}; - methodMap_["setProfilingEnabled"] = MethodMetadata {1, __hostFunction_NativeDevMenuCxxSpecJSI_setProfilingEnabled}; - methodMap_["setHotLoadingEnabled"] = MethodMetadata {1, __hostFunction_NativeDevMenuCxxSpecJSI_setHotLoadingEnabled}; -} -static jsi::Value __hostFunction_NativeReactDevToolsRuntimeSettingsModuleCxxSpecJSI_setReloadAndProfileConfig(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->setReloadAndProfileConfig( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeReactDevToolsRuntimeSettingsModuleCxxSpecJSI_getReloadAndProfileConfig(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getReloadAndProfileConfig( - rt - ); -} - -NativeReactDevToolsRuntimeSettingsModuleCxxSpecJSI::NativeReactDevToolsRuntimeSettingsModuleCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("ReactDevToolsRuntimeSettingsModule", jsInvoker) { - methodMap_["setReloadAndProfileConfig"] = MethodMetadata {1, __hostFunction_NativeReactDevToolsRuntimeSettingsModuleCxxSpecJSI_setReloadAndProfileConfig}; - methodMap_["getReloadAndProfileConfig"] = MethodMetadata {0, __hostFunction_NativeReactDevToolsRuntimeSettingsModuleCxxSpecJSI_getReloadAndProfileConfig}; -} -static jsi::Value __hostFunction_NativeReactDevToolsSettingsManagerCxxSpecJSI_setGlobalHookSettings(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->setGlobalHookSettings( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeReactDevToolsSettingsManagerCxxSpecJSI_getGlobalHookSettings(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - auto result = static_cast(&turboModule)->getGlobalHookSettings( - rt - ); - return result ? jsi::Value(std::move(*result)) : jsi::Value::null(); -} - -NativeReactDevToolsSettingsManagerCxxSpecJSI::NativeReactDevToolsSettingsManagerCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("ReactDevToolsSettingsManager", jsInvoker) { - methodMap_["setGlobalHookSettings"] = MethodMetadata {1, __hostFunction_NativeReactDevToolsSettingsManagerCxxSpecJSI_setGlobalHookSettings}; - methodMap_["getGlobalHookSettings"] = MethodMetadata {0, __hostFunction_NativeReactDevToolsSettingsManagerCxxSpecJSI_getGlobalHookSettings}; -} -static jsi::Value __hostFunction_NativeIdleCallbacksCxxSpecJSI_requestIdleCallback(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->requestIdleCallback( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt).asFunction(rt), - count <= 1 || args[1].isUndefined() ? std::nullopt : std::make_optional(args[1].asObject(rt)) - ); -} -static jsi::Value __hostFunction_NativeIdleCallbacksCxxSpecJSI_cancelIdleCallback(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->cancelIdleCallback( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : jsi::Value(rt, args[0]) - ); - return jsi::Value::undefined(); -} - -NativeIdleCallbacksCxxSpecJSI::NativeIdleCallbacksCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("NativeIdleCallbacksCxx", jsInvoker) { - methodMap_["requestIdleCallback"] = MethodMetadata {2, __hostFunction_NativeIdleCallbacksCxxSpecJSI_requestIdleCallback}; - methodMap_["cancelIdleCallback"] = MethodMetadata {1, __hostFunction_NativeIdleCallbacksCxxSpecJSI_cancelIdleCallback}; -} -static jsi::Value __hostFunction_NativeIntersectionObserverCxxSpecJSI_observeV2(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->observeV2( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt) - ); -} -static jsi::Value __hostFunction_NativeIntersectionObserverCxxSpecJSI_unobserveV2(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->unobserveV2( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : jsi::Value(rt, args[1]) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeIntersectionObserverCxxSpecJSI_connect(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->connect( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt).asFunction(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeIntersectionObserverCxxSpecJSI_disconnect(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->disconnect( - rt - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeIntersectionObserverCxxSpecJSI_takeRecords(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->takeRecords( - rt - ); -} - -NativeIntersectionObserverCxxSpecJSI::NativeIntersectionObserverCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("NativeIntersectionObserverCxx", jsInvoker) { - methodMap_["observeV2"] = MethodMetadata {1, __hostFunction_NativeIntersectionObserverCxxSpecJSI_observeV2}; - methodMap_["unobserveV2"] = MethodMetadata {2, __hostFunction_NativeIntersectionObserverCxxSpecJSI_unobserveV2}; - methodMap_["connect"] = MethodMetadata {1, __hostFunction_NativeIntersectionObserverCxxSpecJSI_connect}; - methodMap_["disconnect"] = MethodMetadata {0, __hostFunction_NativeIntersectionObserverCxxSpecJSI_disconnect}; - methodMap_["takeRecords"] = MethodMetadata {0, __hostFunction_NativeIntersectionObserverCxxSpecJSI_takeRecords}; -} -static jsi::Value __hostFunction_NativeMicrotasksCxxSpecJSI_queueMicrotask(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->queueMicrotask( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt).asFunction(rt) - ); - return jsi::Value::undefined(); -} - -NativeMicrotasksCxxSpecJSI::NativeMicrotasksCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("NativeMicrotasksCxx", jsInvoker) { - methodMap_["queueMicrotask"] = MethodMetadata {1, __hostFunction_NativeMicrotasksCxxSpecJSI_queueMicrotask}; -} -static jsi::Value __hostFunction_NativeMutationObserverCxxSpecJSI_observe(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->observe( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeMutationObserverCxxSpecJSI_unobserveAll(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->unobserveAll( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeMutationObserverCxxSpecJSI_connect(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->connect( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt).asFunction(rt), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt).asFunction(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeMutationObserverCxxSpecJSI_disconnect(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->disconnect( - rt - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeMutationObserverCxxSpecJSI_takeRecords(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->takeRecords( - rt - ); -} - -NativeMutationObserverCxxSpecJSI::NativeMutationObserverCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("NativeMutationObserverCxx", jsInvoker) { - methodMap_["observe"] = MethodMetadata {1, __hostFunction_NativeMutationObserverCxxSpecJSI_observe}; - methodMap_["unobserveAll"] = MethodMetadata {1, __hostFunction_NativeMutationObserverCxxSpecJSI_unobserveAll}; - methodMap_["connect"] = MethodMetadata {2, __hostFunction_NativeMutationObserverCxxSpecJSI_connect}; - methodMap_["disconnect"] = MethodMetadata {0, __hostFunction_NativeMutationObserverCxxSpecJSI_disconnect}; - methodMap_["takeRecords"] = MethodMetadata {0, __hostFunction_NativeMutationObserverCxxSpecJSI_takeRecords}; -} -static jsi::Value __hostFunction_NativePerformanceCxxSpecJSI_now(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->now( - rt - ); -} -static jsi::Value __hostFunction_NativePerformanceCxxSpecJSI_reportMark(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->reportMark( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asNumber(), - count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : jsi::Value(rt, args[2]) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativePerformanceCxxSpecJSI_reportMeasure(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->reportMeasure( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asNumber(), - count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asNumber(), - count <= 3 ? throw jsi::JSError(rt, "Expected argument in position 3 to be passed") : jsi::Value(rt, args[3]) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativePerformanceCxxSpecJSI_getMarkTime(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - auto result = static_cast(&turboModule)->getMarkTime( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt) - ); - return result ? jsi::Value(std::move(*result)) : jsi::Value::null(); -} -static jsi::Value __hostFunction_NativePerformanceCxxSpecJSI_clearMarks(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->clearMarks( - rt, - count <= 0 || args[0].isUndefined() ? std::nullopt : std::make_optional(args[0].asString(rt)) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativePerformanceCxxSpecJSI_clearMeasures(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->clearMeasures( - rt, - count <= 0 || args[0].isUndefined() ? std::nullopt : std::make_optional(args[0].asString(rt)) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativePerformanceCxxSpecJSI_getEntries(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getEntries( - rt - ); -} -static jsi::Value __hostFunction_NativePerformanceCxxSpecJSI_getEntriesByName(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getEntriesByName( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt), - count <= 1 || args[1].isNull() || args[1].isUndefined() ? std::nullopt : std::make_optional(args[1].asNumber()) - ); -} -static jsi::Value __hostFunction_NativePerformanceCxxSpecJSI_getEntriesByType(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getEntriesByType( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber() - ); -} -static jsi::Value __hostFunction_NativePerformanceCxxSpecJSI_getEventCounts(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getEventCounts( - rt - ); -} -static jsi::Value __hostFunction_NativePerformanceCxxSpecJSI_getSimpleMemoryInfo(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getSimpleMemoryInfo( - rt - ); -} -static jsi::Value __hostFunction_NativePerformanceCxxSpecJSI_getReactNativeStartupTiming(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getReactNativeStartupTiming( - rt - ); -} -static jsi::Value __hostFunction_NativePerformanceCxxSpecJSI_createObserver(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->createObserver( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt).asFunction(rt) - ); -} -static jsi::Value __hostFunction_NativePerformanceCxxSpecJSI_getDroppedEntriesCount(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getDroppedEntriesCount( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : jsi::Value(rt, args[0]) - ); -} -static jsi::Value __hostFunction_NativePerformanceCxxSpecJSI_observe(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->observe( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : jsi::Value(rt, args[0]), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativePerformanceCxxSpecJSI_disconnect(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->disconnect( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : jsi::Value(rt, args[0]) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativePerformanceCxxSpecJSI_takeRecords(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->takeRecords( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : jsi::Value(rt, args[0]), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asBool() - ); -} -static jsi::Value __hostFunction_NativePerformanceCxxSpecJSI_getSupportedPerformanceEntryTypes(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getSupportedPerformanceEntryTypes( - rt - ); -} -static jsi::Value __hostFunction_NativePerformanceCxxSpecJSI_clearEventCountsForTesting(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->clearEventCountsForTesting( - rt - ); - return jsi::Value::undefined(); -} - -NativePerformanceCxxSpecJSI::NativePerformanceCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("NativePerformanceCxx", jsInvoker) { - methodMap_["now"] = MethodMetadata {0, __hostFunction_NativePerformanceCxxSpecJSI_now}; - methodMap_["reportMark"] = MethodMetadata {3, __hostFunction_NativePerformanceCxxSpecJSI_reportMark}; - methodMap_["reportMeasure"] = MethodMetadata {4, __hostFunction_NativePerformanceCxxSpecJSI_reportMeasure}; - methodMap_["getMarkTime"] = MethodMetadata {1, __hostFunction_NativePerformanceCxxSpecJSI_getMarkTime}; - methodMap_["clearMarks"] = MethodMetadata {1, __hostFunction_NativePerformanceCxxSpecJSI_clearMarks}; - methodMap_["clearMeasures"] = MethodMetadata {1, __hostFunction_NativePerformanceCxxSpecJSI_clearMeasures}; - methodMap_["getEntries"] = MethodMetadata {0, __hostFunction_NativePerformanceCxxSpecJSI_getEntries}; - methodMap_["getEntriesByName"] = MethodMetadata {2, __hostFunction_NativePerformanceCxxSpecJSI_getEntriesByName}; - methodMap_["getEntriesByType"] = MethodMetadata {1, __hostFunction_NativePerformanceCxxSpecJSI_getEntriesByType}; - methodMap_["getEventCounts"] = MethodMetadata {0, __hostFunction_NativePerformanceCxxSpecJSI_getEventCounts}; - methodMap_["getSimpleMemoryInfo"] = MethodMetadata {0, __hostFunction_NativePerformanceCxxSpecJSI_getSimpleMemoryInfo}; - methodMap_["getReactNativeStartupTiming"] = MethodMetadata {0, __hostFunction_NativePerformanceCxxSpecJSI_getReactNativeStartupTiming}; - methodMap_["createObserver"] = MethodMetadata {1, __hostFunction_NativePerformanceCxxSpecJSI_createObserver}; - methodMap_["getDroppedEntriesCount"] = MethodMetadata {1, __hostFunction_NativePerformanceCxxSpecJSI_getDroppedEntriesCount}; - methodMap_["observe"] = MethodMetadata {2, __hostFunction_NativePerformanceCxxSpecJSI_observe}; - methodMap_["disconnect"] = MethodMetadata {1, __hostFunction_NativePerformanceCxxSpecJSI_disconnect}; - methodMap_["takeRecords"] = MethodMetadata {2, __hostFunction_NativePerformanceCxxSpecJSI_takeRecords}; - methodMap_["getSupportedPerformanceEntryTypes"] = MethodMetadata {0, __hostFunction_NativePerformanceCxxSpecJSI_getSupportedPerformanceEntryTypes}; - methodMap_["clearEventCountsForTesting"] = MethodMetadata {0, __hostFunction_NativePerformanceCxxSpecJSI_clearEventCountsForTesting}; -} -static jsi::Value __hostFunction_NativeDOMCxxSpecJSI_compareDocumentPosition(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->compareDocumentPosition( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : jsi::Value(rt, args[0]), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : jsi::Value(rt, args[1]) - ); -} -static jsi::Value __hostFunction_NativeDOMCxxSpecJSI_getChildNodes(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getChildNodes( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : jsi::Value(rt, args[0]) - ); -} -static jsi::Value __hostFunction_NativeDOMCxxSpecJSI_getParentNode(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getParentNode( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : jsi::Value(rt, args[0]) - ); -} -static jsi::Value __hostFunction_NativeDOMCxxSpecJSI_isConnected(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->isConnected( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : jsi::Value(rt, args[0]) - ); -} -static jsi::Value __hostFunction_NativeDOMCxxSpecJSI_getBorderWidth(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getBorderWidth( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : jsi::Value(rt, args[0]) - ); -} -static jsi::Value __hostFunction_NativeDOMCxxSpecJSI_getBoundingClientRect(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getBoundingClientRect( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : jsi::Value(rt, args[0]), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asBool() - ); -} -static jsi::Value __hostFunction_NativeDOMCxxSpecJSI_getInnerSize(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getInnerSize( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : jsi::Value(rt, args[0]) - ); -} -static jsi::Value __hostFunction_NativeDOMCxxSpecJSI_getScrollPosition(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getScrollPosition( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : jsi::Value(rt, args[0]) - ); -} -static jsi::Value __hostFunction_NativeDOMCxxSpecJSI_getScrollSize(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getScrollSize( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : jsi::Value(rt, args[0]) - ); -} -static jsi::Value __hostFunction_NativeDOMCxxSpecJSI_getTagName(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getTagName( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : jsi::Value(rt, args[0]) - ); -} -static jsi::Value __hostFunction_NativeDOMCxxSpecJSI_getTextContent(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getTextContent( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : jsi::Value(rt, args[0]) - ); -} -static jsi::Value __hostFunction_NativeDOMCxxSpecJSI_hasPointerCapture(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->hasPointerCapture( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : jsi::Value(rt, args[0]), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asNumber() - ); -} -static jsi::Value __hostFunction_NativeDOMCxxSpecJSI_releasePointerCapture(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->releasePointerCapture( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : jsi::Value(rt, args[0]), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeDOMCxxSpecJSI_setPointerCapture(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->setPointerCapture( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : jsi::Value(rt, args[0]), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeDOMCxxSpecJSI_getOffset(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getOffset( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : jsi::Value(rt, args[0]) - ); -} -static jsi::Value __hostFunction_NativeDOMCxxSpecJSI_linkRootNode(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->linkRootNode( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : jsi::Value(rt, args[1]) - ); -} -static jsi::Value __hostFunction_NativeDOMCxxSpecJSI_measure(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->measure( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : jsi::Value(rt, args[0]), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt).asFunction(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeDOMCxxSpecJSI_measureInWindow(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->measureInWindow( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : jsi::Value(rt, args[0]), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt).asFunction(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeDOMCxxSpecJSI_measureLayout(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->measureLayout( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : jsi::Value(rt, args[0]), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : jsi::Value(rt, args[1]), - count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asObject(rt).asFunction(rt), - count <= 3 ? throw jsi::JSError(rt, "Expected argument in position 3 to be passed") : args[3].asObject(rt).asFunction(rt) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeDOMCxxSpecJSI_setNativeProps(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->setNativeProps( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : jsi::Value(rt, args[0]), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : jsi::Value(rt, args[1]) - ); - return jsi::Value::undefined(); -} - -NativeDOMCxxSpecJSI::NativeDOMCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("NativeDOMCxx", jsInvoker) { - methodMap_["compareDocumentPosition"] = MethodMetadata {2, __hostFunction_NativeDOMCxxSpecJSI_compareDocumentPosition}; - methodMap_["getChildNodes"] = MethodMetadata {1, __hostFunction_NativeDOMCxxSpecJSI_getChildNodes}; - methodMap_["getParentNode"] = MethodMetadata {1, __hostFunction_NativeDOMCxxSpecJSI_getParentNode}; - methodMap_["isConnected"] = MethodMetadata {1, __hostFunction_NativeDOMCxxSpecJSI_isConnected}; - methodMap_["getBorderWidth"] = MethodMetadata {1, __hostFunction_NativeDOMCxxSpecJSI_getBorderWidth}; - methodMap_["getBoundingClientRect"] = MethodMetadata {2, __hostFunction_NativeDOMCxxSpecJSI_getBoundingClientRect}; - methodMap_["getInnerSize"] = MethodMetadata {1, __hostFunction_NativeDOMCxxSpecJSI_getInnerSize}; - methodMap_["getScrollPosition"] = MethodMetadata {1, __hostFunction_NativeDOMCxxSpecJSI_getScrollPosition}; - methodMap_["getScrollSize"] = MethodMetadata {1, __hostFunction_NativeDOMCxxSpecJSI_getScrollSize}; - methodMap_["getTagName"] = MethodMetadata {1, __hostFunction_NativeDOMCxxSpecJSI_getTagName}; - methodMap_["getTextContent"] = MethodMetadata {1, __hostFunction_NativeDOMCxxSpecJSI_getTextContent}; - methodMap_["hasPointerCapture"] = MethodMetadata {2, __hostFunction_NativeDOMCxxSpecJSI_hasPointerCapture}; - methodMap_["releasePointerCapture"] = MethodMetadata {2, __hostFunction_NativeDOMCxxSpecJSI_releasePointerCapture}; - methodMap_["setPointerCapture"] = MethodMetadata {2, __hostFunction_NativeDOMCxxSpecJSI_setPointerCapture}; - methodMap_["getOffset"] = MethodMetadata {1, __hostFunction_NativeDOMCxxSpecJSI_getOffset}; - methodMap_["linkRootNode"] = MethodMetadata {2, __hostFunction_NativeDOMCxxSpecJSI_linkRootNode}; - methodMap_["measure"] = MethodMetadata {2, __hostFunction_NativeDOMCxxSpecJSI_measure}; - methodMap_["measureInWindow"] = MethodMetadata {2, __hostFunction_NativeDOMCxxSpecJSI_measureInWindow}; - methodMap_["measureLayout"] = MethodMetadata {4, __hostFunction_NativeDOMCxxSpecJSI_measureLayout}; - methodMap_["setNativeProps"] = MethodMetadata {2, __hostFunction_NativeDOMCxxSpecJSI_setNativeProps}; -} - - -} // namespace facebook::react diff --git a/vnext/codegen/rnwcoreJSI.h b/vnext/codegen/rnwcoreJSI.h deleted file mode 100644 index 040b64de761..00000000000 --- a/vnext/codegen/rnwcoreJSI.h +++ /dev/null @@ -1,9459 +0,0 @@ -/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * @generated by codegen project: GenerateModuleH.js - */ - -#pragma once - -#include -#include - -namespace facebook::react { - - - class JSI_EXPORT NativeReactNativeFeatureFlagsCxxSpecJSI : public TurboModule { -protected: - NativeReactNativeFeatureFlagsCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual bool commonTestFlag(jsi::Runtime &rt) = 0; - virtual bool commonTestFlagWithoutNativeImplementation(jsi::Runtime &rt) = 0; - virtual bool cdpInteractionMetricsEnabled(jsi::Runtime &rt) = 0; - virtual bool cxxNativeAnimatedEnabled(jsi::Runtime &rt) = 0; - virtual bool cxxNativeAnimatedRemoveJsSync(jsi::Runtime &rt) = 0; - virtual bool disableFabricCommitInCXXAnimated(jsi::Runtime &rt) = 0; - virtual bool disableMountItemReorderingAndroid(jsi::Runtime &rt) = 0; - virtual bool disableOldAndroidAttachmentMetricsWorkarounds(jsi::Runtime &rt) = 0; - virtual bool disableTextLayoutManagerCacheAndroid(jsi::Runtime &rt) = 0; - virtual bool enableAccessibilityOrder(jsi::Runtime &rt) = 0; - virtual bool enableAccumulatedUpdatesInRawPropsAndroid(jsi::Runtime &rt) = 0; - virtual bool enableAndroidTextMeasurementOptimizations(jsi::Runtime &rt) = 0; - virtual bool enableBridgelessArchitecture(jsi::Runtime &rt) = 0; - virtual bool enableCppPropsIteratorSetter(jsi::Runtime &rt) = 0; - virtual bool enableCustomFocusSearchOnClippedElementsAndroid(jsi::Runtime &rt) = 0; - virtual bool enableDestroyShadowTreeRevisionAsync(jsi::Runtime &rt) = 0; - virtual bool enableDoubleMeasurementFixAndroid(jsi::Runtime &rt) = 0; - virtual bool enableEagerMainQueueModulesOnIOS(jsi::Runtime &rt) = 0; - virtual bool enableEagerRootViewAttachment(jsi::Runtime &rt) = 0; - virtual bool enableFabricLogs(jsi::Runtime &rt) = 0; - virtual bool enableFabricRenderer(jsi::Runtime &rt) = 0; - virtual bool enableFixForParentTagDuringReparenting(jsi::Runtime &rt) = 0; - virtual bool enableFontScaleChangesUpdatingLayout(jsi::Runtime &rt) = 0; - virtual bool enableIOSTextBaselineOffsetPerLine(jsi::Runtime &rt) = 0; - virtual bool enableIOSViewClipToPaddingBox(jsi::Runtime &rt) = 0; - virtual bool enableImagePrefetchingAndroid(jsi::Runtime &rt) = 0; - virtual bool enableImmediateUpdateModeForContentOffsetChanges(jsi::Runtime &rt) = 0; - virtual bool enableInteropViewManagerClassLookUpOptimizationIOS(jsi::Runtime &rt) = 0; - virtual bool enableLayoutAnimationsOnAndroid(jsi::Runtime &rt) = 0; - virtual bool enableLayoutAnimationsOnIOS(jsi::Runtime &rt) = 0; - virtual bool enableMainQueueCoordinatorOnIOS(jsi::Runtime &rt) = 0; - virtual bool enableModuleArgumentNSNullConversionIOS(jsi::Runtime &rt) = 0; - virtual bool enableNativeCSSParsing(jsi::Runtime &rt) = 0; - virtual bool enableNetworkEventReporting(jsi::Runtime &rt) = 0; - virtual bool enableNewBackgroundAndBorderDrawables(jsi::Runtime &rt) = 0; - virtual bool enablePreparedTextLayout(jsi::Runtime &rt) = 0; - virtual bool enablePropsUpdateReconciliationAndroid(jsi::Runtime &rt) = 0; - virtual bool enableResourceTimingAPI(jsi::Runtime &rt) = 0; - virtual bool enableViewCulling(jsi::Runtime &rt) = 0; - virtual bool enableViewRecycling(jsi::Runtime &rt) = 0; - virtual bool enableViewRecyclingForText(jsi::Runtime &rt) = 0; - virtual bool enableViewRecyclingForView(jsi::Runtime &rt) = 0; - virtual bool enableVirtualViewDebugFeatures(jsi::Runtime &rt) = 0; - virtual bool enableVirtualViewRenderState(jsi::Runtime &rt) = 0; - virtual bool enableVirtualViewWindowFocusDetection(jsi::Runtime &rt) = 0; - virtual bool fixMappingOfEventPrioritiesBetweenFabricAndReact(jsi::Runtime &rt) = 0; - virtual bool fuseboxEnabledRelease(jsi::Runtime &rt) = 0; - virtual bool fuseboxNetworkInspectionEnabled(jsi::Runtime &rt) = 0; - virtual bool hideOffscreenVirtualViewsOnIOS(jsi::Runtime &rt) = 0; - virtual bool perfMonitorV2Enabled(jsi::Runtime &rt) = 0; - virtual double preparedTextCacheSize(jsi::Runtime &rt) = 0; - virtual bool preventShadowTreeCommitExhaustion(jsi::Runtime &rt) = 0; - virtual bool releaseImageDataWhenConsumed(jsi::Runtime &rt) = 0; - virtual bool shouldPressibilityUseW3CPointerEventsForHover(jsi::Runtime &rt) = 0; - virtual bool skipActivityIdentityAssertionOnHostPause(jsi::Runtime &rt) = 0; - virtual bool sweepActiveTouchOnChildNativeGesturesAndroid(jsi::Runtime &rt) = 0; - virtual bool traceTurboModulePromiseRejectionsOnAndroid(jsi::Runtime &rt) = 0; - virtual bool updateRuntimeShadowNodeReferencesOnCommit(jsi::Runtime &rt) = 0; - virtual bool useAlwaysAvailableJSErrorHandling(jsi::Runtime &rt) = 0; - virtual bool useFabricInterop(jsi::Runtime &rt) = 0; - virtual bool useNativeEqualsInNativeReadableArrayAndroid(jsi::Runtime &rt) = 0; - virtual bool useNativeTransformHelperAndroid(jsi::Runtime &rt) = 0; - virtual bool useNativeViewConfigsInBridgelessMode(jsi::Runtime &rt) = 0; - virtual bool useOptimizedEventBatchingOnAndroid(jsi::Runtime &rt) = 0; - virtual bool useRawPropsJsiValue(jsi::Runtime &rt) = 0; - virtual bool useShadowNodeStateOnClone(jsi::Runtime &rt) = 0; - virtual bool useTurboModuleInterop(jsi::Runtime &rt) = 0; - virtual bool useTurboModules(jsi::Runtime &rt) = 0; - virtual double virtualViewPrerenderRatio(jsi::Runtime &rt) = 0; - -}; - -template -class JSI_EXPORT NativeReactNativeFeatureFlagsCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "NativeReactNativeFeatureFlagsCxx"; - -protected: - NativeReactNativeFeatureFlagsCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeReactNativeFeatureFlagsCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeReactNativeFeatureFlagsCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeReactNativeFeatureFlagsCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - bool commonTestFlag(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::commonTestFlag) == 1, - "Expected commonTestFlag(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::commonTestFlag, jsInvoker_, instance_); - } - bool commonTestFlagWithoutNativeImplementation(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::commonTestFlagWithoutNativeImplementation) == 1, - "Expected commonTestFlagWithoutNativeImplementation(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::commonTestFlagWithoutNativeImplementation, jsInvoker_, instance_); - } - bool cdpInteractionMetricsEnabled(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::cdpInteractionMetricsEnabled) == 1, - "Expected cdpInteractionMetricsEnabled(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::cdpInteractionMetricsEnabled, jsInvoker_, instance_); - } - bool cxxNativeAnimatedEnabled(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::cxxNativeAnimatedEnabled) == 1, - "Expected cxxNativeAnimatedEnabled(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::cxxNativeAnimatedEnabled, jsInvoker_, instance_); - } - bool cxxNativeAnimatedRemoveJsSync(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::cxxNativeAnimatedRemoveJsSync) == 1, - "Expected cxxNativeAnimatedRemoveJsSync(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::cxxNativeAnimatedRemoveJsSync, jsInvoker_, instance_); - } - bool disableFabricCommitInCXXAnimated(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::disableFabricCommitInCXXAnimated) == 1, - "Expected disableFabricCommitInCXXAnimated(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::disableFabricCommitInCXXAnimated, jsInvoker_, instance_); - } - bool disableMountItemReorderingAndroid(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::disableMountItemReorderingAndroid) == 1, - "Expected disableMountItemReorderingAndroid(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::disableMountItemReorderingAndroid, jsInvoker_, instance_); - } - bool disableOldAndroidAttachmentMetricsWorkarounds(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::disableOldAndroidAttachmentMetricsWorkarounds) == 1, - "Expected disableOldAndroidAttachmentMetricsWorkarounds(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::disableOldAndroidAttachmentMetricsWorkarounds, jsInvoker_, instance_); - } - bool disableTextLayoutManagerCacheAndroid(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::disableTextLayoutManagerCacheAndroid) == 1, - "Expected disableTextLayoutManagerCacheAndroid(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::disableTextLayoutManagerCacheAndroid, jsInvoker_, instance_); - } - bool enableAccessibilityOrder(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::enableAccessibilityOrder) == 1, - "Expected enableAccessibilityOrder(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::enableAccessibilityOrder, jsInvoker_, instance_); - } - bool enableAccumulatedUpdatesInRawPropsAndroid(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::enableAccumulatedUpdatesInRawPropsAndroid) == 1, - "Expected enableAccumulatedUpdatesInRawPropsAndroid(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::enableAccumulatedUpdatesInRawPropsAndroid, jsInvoker_, instance_); - } - bool enableAndroidTextMeasurementOptimizations(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::enableAndroidTextMeasurementOptimizations) == 1, - "Expected enableAndroidTextMeasurementOptimizations(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::enableAndroidTextMeasurementOptimizations, jsInvoker_, instance_); - } - bool enableBridgelessArchitecture(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::enableBridgelessArchitecture) == 1, - "Expected enableBridgelessArchitecture(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::enableBridgelessArchitecture, jsInvoker_, instance_); - } - bool enableCppPropsIteratorSetter(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::enableCppPropsIteratorSetter) == 1, - "Expected enableCppPropsIteratorSetter(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::enableCppPropsIteratorSetter, jsInvoker_, instance_); - } - bool enableCustomFocusSearchOnClippedElementsAndroid(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::enableCustomFocusSearchOnClippedElementsAndroid) == 1, - "Expected enableCustomFocusSearchOnClippedElementsAndroid(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::enableCustomFocusSearchOnClippedElementsAndroid, jsInvoker_, instance_); - } - bool enableDestroyShadowTreeRevisionAsync(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::enableDestroyShadowTreeRevisionAsync) == 1, - "Expected enableDestroyShadowTreeRevisionAsync(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::enableDestroyShadowTreeRevisionAsync, jsInvoker_, instance_); - } - bool enableDoubleMeasurementFixAndroid(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::enableDoubleMeasurementFixAndroid) == 1, - "Expected enableDoubleMeasurementFixAndroid(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::enableDoubleMeasurementFixAndroid, jsInvoker_, instance_); - } - bool enableEagerMainQueueModulesOnIOS(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::enableEagerMainQueueModulesOnIOS) == 1, - "Expected enableEagerMainQueueModulesOnIOS(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::enableEagerMainQueueModulesOnIOS, jsInvoker_, instance_); - } - bool enableEagerRootViewAttachment(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::enableEagerRootViewAttachment) == 1, - "Expected enableEagerRootViewAttachment(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::enableEagerRootViewAttachment, jsInvoker_, instance_); - } - bool enableFabricLogs(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::enableFabricLogs) == 1, - "Expected enableFabricLogs(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::enableFabricLogs, jsInvoker_, instance_); - } - bool enableFabricRenderer(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::enableFabricRenderer) == 1, - "Expected enableFabricRenderer(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::enableFabricRenderer, jsInvoker_, instance_); - } - bool enableFixForParentTagDuringReparenting(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::enableFixForParentTagDuringReparenting) == 1, - "Expected enableFixForParentTagDuringReparenting(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::enableFixForParentTagDuringReparenting, jsInvoker_, instance_); - } - bool enableFontScaleChangesUpdatingLayout(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::enableFontScaleChangesUpdatingLayout) == 1, - "Expected enableFontScaleChangesUpdatingLayout(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::enableFontScaleChangesUpdatingLayout, jsInvoker_, instance_); - } - bool enableIOSTextBaselineOffsetPerLine(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::enableIOSTextBaselineOffsetPerLine) == 1, - "Expected enableIOSTextBaselineOffsetPerLine(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::enableIOSTextBaselineOffsetPerLine, jsInvoker_, instance_); - } - bool enableIOSViewClipToPaddingBox(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::enableIOSViewClipToPaddingBox) == 1, - "Expected enableIOSViewClipToPaddingBox(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::enableIOSViewClipToPaddingBox, jsInvoker_, instance_); - } - bool enableImagePrefetchingAndroid(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::enableImagePrefetchingAndroid) == 1, - "Expected enableImagePrefetchingAndroid(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::enableImagePrefetchingAndroid, jsInvoker_, instance_); - } - bool enableImmediateUpdateModeForContentOffsetChanges(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::enableImmediateUpdateModeForContentOffsetChanges) == 1, - "Expected enableImmediateUpdateModeForContentOffsetChanges(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::enableImmediateUpdateModeForContentOffsetChanges, jsInvoker_, instance_); - } - bool enableInteropViewManagerClassLookUpOptimizationIOS(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::enableInteropViewManagerClassLookUpOptimizationIOS) == 1, - "Expected enableInteropViewManagerClassLookUpOptimizationIOS(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::enableInteropViewManagerClassLookUpOptimizationIOS, jsInvoker_, instance_); - } - bool enableLayoutAnimationsOnAndroid(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::enableLayoutAnimationsOnAndroid) == 1, - "Expected enableLayoutAnimationsOnAndroid(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::enableLayoutAnimationsOnAndroid, jsInvoker_, instance_); - } - bool enableLayoutAnimationsOnIOS(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::enableLayoutAnimationsOnIOS) == 1, - "Expected enableLayoutAnimationsOnIOS(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::enableLayoutAnimationsOnIOS, jsInvoker_, instance_); - } - bool enableMainQueueCoordinatorOnIOS(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::enableMainQueueCoordinatorOnIOS) == 1, - "Expected enableMainQueueCoordinatorOnIOS(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::enableMainQueueCoordinatorOnIOS, jsInvoker_, instance_); - } - bool enableModuleArgumentNSNullConversionIOS(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::enableModuleArgumentNSNullConversionIOS) == 1, - "Expected enableModuleArgumentNSNullConversionIOS(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::enableModuleArgumentNSNullConversionIOS, jsInvoker_, instance_); - } - bool enableNativeCSSParsing(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::enableNativeCSSParsing) == 1, - "Expected enableNativeCSSParsing(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::enableNativeCSSParsing, jsInvoker_, instance_); - } - bool enableNetworkEventReporting(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::enableNetworkEventReporting) == 1, - "Expected enableNetworkEventReporting(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::enableNetworkEventReporting, jsInvoker_, instance_); - } - bool enableNewBackgroundAndBorderDrawables(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::enableNewBackgroundAndBorderDrawables) == 1, - "Expected enableNewBackgroundAndBorderDrawables(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::enableNewBackgroundAndBorderDrawables, jsInvoker_, instance_); - } - bool enablePreparedTextLayout(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::enablePreparedTextLayout) == 1, - "Expected enablePreparedTextLayout(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::enablePreparedTextLayout, jsInvoker_, instance_); - } - bool enablePropsUpdateReconciliationAndroid(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::enablePropsUpdateReconciliationAndroid) == 1, - "Expected enablePropsUpdateReconciliationAndroid(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::enablePropsUpdateReconciliationAndroid, jsInvoker_, instance_); - } - bool enableResourceTimingAPI(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::enableResourceTimingAPI) == 1, - "Expected enableResourceTimingAPI(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::enableResourceTimingAPI, jsInvoker_, instance_); - } - bool enableViewCulling(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::enableViewCulling) == 1, - "Expected enableViewCulling(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::enableViewCulling, jsInvoker_, instance_); - } - bool enableViewRecycling(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::enableViewRecycling) == 1, - "Expected enableViewRecycling(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::enableViewRecycling, jsInvoker_, instance_); - } - bool enableViewRecyclingForText(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::enableViewRecyclingForText) == 1, - "Expected enableViewRecyclingForText(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::enableViewRecyclingForText, jsInvoker_, instance_); - } - bool enableViewRecyclingForView(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::enableViewRecyclingForView) == 1, - "Expected enableViewRecyclingForView(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::enableViewRecyclingForView, jsInvoker_, instance_); - } - bool enableVirtualViewDebugFeatures(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::enableVirtualViewDebugFeatures) == 1, - "Expected enableVirtualViewDebugFeatures(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::enableVirtualViewDebugFeatures, jsInvoker_, instance_); - } - bool enableVirtualViewRenderState(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::enableVirtualViewRenderState) == 1, - "Expected enableVirtualViewRenderState(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::enableVirtualViewRenderState, jsInvoker_, instance_); - } - bool enableVirtualViewWindowFocusDetection(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::enableVirtualViewWindowFocusDetection) == 1, - "Expected enableVirtualViewWindowFocusDetection(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::enableVirtualViewWindowFocusDetection, jsInvoker_, instance_); - } - bool fixMappingOfEventPrioritiesBetweenFabricAndReact(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::fixMappingOfEventPrioritiesBetweenFabricAndReact) == 1, - "Expected fixMappingOfEventPrioritiesBetweenFabricAndReact(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::fixMappingOfEventPrioritiesBetweenFabricAndReact, jsInvoker_, instance_); - } - bool fuseboxEnabledRelease(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::fuseboxEnabledRelease) == 1, - "Expected fuseboxEnabledRelease(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::fuseboxEnabledRelease, jsInvoker_, instance_); - } - bool fuseboxNetworkInspectionEnabled(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::fuseboxNetworkInspectionEnabled) == 1, - "Expected fuseboxNetworkInspectionEnabled(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::fuseboxNetworkInspectionEnabled, jsInvoker_, instance_); - } - bool hideOffscreenVirtualViewsOnIOS(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::hideOffscreenVirtualViewsOnIOS) == 1, - "Expected hideOffscreenVirtualViewsOnIOS(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::hideOffscreenVirtualViewsOnIOS, jsInvoker_, instance_); - } - bool perfMonitorV2Enabled(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::perfMonitorV2Enabled) == 1, - "Expected perfMonitorV2Enabled(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::perfMonitorV2Enabled, jsInvoker_, instance_); - } - double preparedTextCacheSize(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::preparedTextCacheSize) == 1, - "Expected preparedTextCacheSize(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::preparedTextCacheSize, jsInvoker_, instance_); - } - bool preventShadowTreeCommitExhaustion(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::preventShadowTreeCommitExhaustion) == 1, - "Expected preventShadowTreeCommitExhaustion(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::preventShadowTreeCommitExhaustion, jsInvoker_, instance_); - } - bool releaseImageDataWhenConsumed(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::releaseImageDataWhenConsumed) == 1, - "Expected releaseImageDataWhenConsumed(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::releaseImageDataWhenConsumed, jsInvoker_, instance_); - } - bool shouldPressibilityUseW3CPointerEventsForHover(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::shouldPressibilityUseW3CPointerEventsForHover) == 1, - "Expected shouldPressibilityUseW3CPointerEventsForHover(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::shouldPressibilityUseW3CPointerEventsForHover, jsInvoker_, instance_); - } - bool skipActivityIdentityAssertionOnHostPause(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::skipActivityIdentityAssertionOnHostPause) == 1, - "Expected skipActivityIdentityAssertionOnHostPause(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::skipActivityIdentityAssertionOnHostPause, jsInvoker_, instance_); - } - bool sweepActiveTouchOnChildNativeGesturesAndroid(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::sweepActiveTouchOnChildNativeGesturesAndroid) == 1, - "Expected sweepActiveTouchOnChildNativeGesturesAndroid(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::sweepActiveTouchOnChildNativeGesturesAndroid, jsInvoker_, instance_); - } - bool traceTurboModulePromiseRejectionsOnAndroid(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::traceTurboModulePromiseRejectionsOnAndroid) == 1, - "Expected traceTurboModulePromiseRejectionsOnAndroid(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::traceTurboModulePromiseRejectionsOnAndroid, jsInvoker_, instance_); - } - bool updateRuntimeShadowNodeReferencesOnCommit(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::updateRuntimeShadowNodeReferencesOnCommit) == 1, - "Expected updateRuntimeShadowNodeReferencesOnCommit(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::updateRuntimeShadowNodeReferencesOnCommit, jsInvoker_, instance_); - } - bool useAlwaysAvailableJSErrorHandling(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::useAlwaysAvailableJSErrorHandling) == 1, - "Expected useAlwaysAvailableJSErrorHandling(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::useAlwaysAvailableJSErrorHandling, jsInvoker_, instance_); - } - bool useFabricInterop(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::useFabricInterop) == 1, - "Expected useFabricInterop(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::useFabricInterop, jsInvoker_, instance_); - } - bool useNativeEqualsInNativeReadableArrayAndroid(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::useNativeEqualsInNativeReadableArrayAndroid) == 1, - "Expected useNativeEqualsInNativeReadableArrayAndroid(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::useNativeEqualsInNativeReadableArrayAndroid, jsInvoker_, instance_); - } - bool useNativeTransformHelperAndroid(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::useNativeTransformHelperAndroid) == 1, - "Expected useNativeTransformHelperAndroid(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::useNativeTransformHelperAndroid, jsInvoker_, instance_); - } - bool useNativeViewConfigsInBridgelessMode(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::useNativeViewConfigsInBridgelessMode) == 1, - "Expected useNativeViewConfigsInBridgelessMode(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::useNativeViewConfigsInBridgelessMode, jsInvoker_, instance_); - } - bool useOptimizedEventBatchingOnAndroid(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::useOptimizedEventBatchingOnAndroid) == 1, - "Expected useOptimizedEventBatchingOnAndroid(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::useOptimizedEventBatchingOnAndroid, jsInvoker_, instance_); - } - bool useRawPropsJsiValue(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::useRawPropsJsiValue) == 1, - "Expected useRawPropsJsiValue(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::useRawPropsJsiValue, jsInvoker_, instance_); - } - bool useShadowNodeStateOnClone(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::useShadowNodeStateOnClone) == 1, - "Expected useShadowNodeStateOnClone(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::useShadowNodeStateOnClone, jsInvoker_, instance_); - } - bool useTurboModuleInterop(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::useTurboModuleInterop) == 1, - "Expected useTurboModuleInterop(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::useTurboModuleInterop, jsInvoker_, instance_); - } - bool useTurboModules(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::useTurboModules) == 1, - "Expected useTurboModules(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::useTurboModules, jsInvoker_, instance_); - } - double virtualViewPrerenderRatio(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::virtualViewPrerenderRatio) == 1, - "Expected virtualViewPrerenderRatio(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::virtualViewPrerenderRatio, jsInvoker_, instance_); - } - - private: - friend class NativeReactNativeFeatureFlagsCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - class JSI_EXPORT NativeAccessibilityInfoCxxSpecJSI : public TurboModule { -protected: - NativeAccessibilityInfoCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual void isReduceMotionEnabled(jsi::Runtime &rt, jsi::Function onSuccess) = 0; - virtual void isInvertColorsEnabled(jsi::Runtime &rt, jsi::Function onSuccess) = 0; - virtual void isHighTextContrastEnabled(jsi::Runtime &rt, jsi::Function onSuccess) = 0; - virtual void isTouchExplorationEnabled(jsi::Runtime &rt, jsi::Function onSuccess) = 0; - virtual void isAccessibilityServiceEnabled(jsi::Runtime &rt, jsi::Function onSuccess) = 0; - virtual void setAccessibilityFocus(jsi::Runtime &rt, double reactTag) = 0; - virtual void announceForAccessibility(jsi::Runtime &rt, jsi::String announcement) = 0; - virtual void getRecommendedTimeoutMillis(jsi::Runtime &rt, double mSec, jsi::Function onSuccess) = 0; - virtual void isGrayscaleEnabled(jsi::Runtime &rt, jsi::Function onSuccess) = 0; - -}; - -template -class JSI_EXPORT NativeAccessibilityInfoCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "AccessibilityInfo"; - -protected: - NativeAccessibilityInfoCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeAccessibilityInfoCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeAccessibilityInfoCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeAccessibilityInfoCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - void isReduceMotionEnabled(jsi::Runtime &rt, jsi::Function onSuccess) override { - static_assert( - bridging::getParameterCount(&T::isReduceMotionEnabled) == 2, - "Expected isReduceMotionEnabled(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::isReduceMotionEnabled, jsInvoker_, instance_, std::move(onSuccess)); - } - void isInvertColorsEnabled(jsi::Runtime &rt, jsi::Function onSuccess) override { - static_assert( - bridging::getParameterCount(&T::isInvertColorsEnabled) == 2, - "Expected isInvertColorsEnabled(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::isInvertColorsEnabled, jsInvoker_, instance_, std::move(onSuccess)); - } - void isHighTextContrastEnabled(jsi::Runtime &rt, jsi::Function onSuccess) override { - static_assert( - bridging::getParameterCount(&T::isHighTextContrastEnabled) == 2, - "Expected isHighTextContrastEnabled(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::isHighTextContrastEnabled, jsInvoker_, instance_, std::move(onSuccess)); - } - void isTouchExplorationEnabled(jsi::Runtime &rt, jsi::Function onSuccess) override { - static_assert( - bridging::getParameterCount(&T::isTouchExplorationEnabled) == 2, - "Expected isTouchExplorationEnabled(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::isTouchExplorationEnabled, jsInvoker_, instance_, std::move(onSuccess)); - } - void isAccessibilityServiceEnabled(jsi::Runtime &rt, jsi::Function onSuccess) override { - static_assert( - bridging::getParameterCount(&T::isAccessibilityServiceEnabled) == 2, - "Expected isAccessibilityServiceEnabled(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::isAccessibilityServiceEnabled, jsInvoker_, instance_, std::move(onSuccess)); - } - void setAccessibilityFocus(jsi::Runtime &rt, double reactTag) override { - static_assert( - bridging::getParameterCount(&T::setAccessibilityFocus) == 2, - "Expected setAccessibilityFocus(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::setAccessibilityFocus, jsInvoker_, instance_, std::move(reactTag)); - } - void announceForAccessibility(jsi::Runtime &rt, jsi::String announcement) override { - static_assert( - bridging::getParameterCount(&T::announceForAccessibility) == 2, - "Expected announceForAccessibility(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::announceForAccessibility, jsInvoker_, instance_, std::move(announcement)); - } - void getRecommendedTimeoutMillis(jsi::Runtime &rt, double mSec, jsi::Function onSuccess) override { - static_assert( - bridging::getParameterCount(&T::getRecommendedTimeoutMillis) == 3, - "Expected getRecommendedTimeoutMillis(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::getRecommendedTimeoutMillis, jsInvoker_, instance_, std::move(mSec), std::move(onSuccess)); - } - void isGrayscaleEnabled(jsi::Runtime &rt, jsi::Function onSuccess) override { - static_assert( - bridging::getParameterCount(&T::isGrayscaleEnabled) == 2, - "Expected isGrayscaleEnabled(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::isGrayscaleEnabled, jsInvoker_, instance_, std::move(onSuccess)); - } - - private: - friend class NativeAccessibilityInfoCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - class JSI_EXPORT NativeAccessibilityManagerCxxSpecJSI : public TurboModule { -protected: - NativeAccessibilityManagerCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual void getCurrentBoldTextState(jsi::Runtime &rt, jsi::Function onSuccess, jsi::Function onError) = 0; - virtual void getCurrentGrayscaleState(jsi::Runtime &rt, jsi::Function onSuccess, jsi::Function onError) = 0; - virtual void getCurrentInvertColorsState(jsi::Runtime &rt, jsi::Function onSuccess, jsi::Function onError) = 0; - virtual void getCurrentReduceMotionState(jsi::Runtime &rt, jsi::Function onSuccess, jsi::Function onError) = 0; - virtual void getCurrentDarkerSystemColorsState(jsi::Runtime &rt, jsi::Function onSuccess, jsi::Function onError) = 0; - virtual void getCurrentPrefersCrossFadeTransitionsState(jsi::Runtime &rt, jsi::Function onSuccess, jsi::Function onError) = 0; - virtual void getCurrentReduceTransparencyState(jsi::Runtime &rt, jsi::Function onSuccess, jsi::Function onError) = 0; - virtual void getCurrentVoiceOverState(jsi::Runtime &rt, jsi::Function onSuccess, jsi::Function onError) = 0; - virtual void setAccessibilityContentSizeMultipliers(jsi::Runtime &rt, jsi::Object JSMultipliers) = 0; - virtual void setAccessibilityFocus(jsi::Runtime &rt, double reactTag) = 0; - virtual void announceForAccessibility(jsi::Runtime &rt, jsi::String announcement) = 0; - virtual void announceForAccessibilityWithOptions(jsi::Runtime &rt, jsi::String announcement, jsi::Object options) = 0; - -}; - -template -class JSI_EXPORT NativeAccessibilityManagerCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "AccessibilityManager"; - -protected: - NativeAccessibilityManagerCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeAccessibilityManagerCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeAccessibilityManagerCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeAccessibilityManagerCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - void getCurrentBoldTextState(jsi::Runtime &rt, jsi::Function onSuccess, jsi::Function onError) override { - static_assert( - bridging::getParameterCount(&T::getCurrentBoldTextState) == 3, - "Expected getCurrentBoldTextState(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::getCurrentBoldTextState, jsInvoker_, instance_, std::move(onSuccess), std::move(onError)); - } - void getCurrentGrayscaleState(jsi::Runtime &rt, jsi::Function onSuccess, jsi::Function onError) override { - static_assert( - bridging::getParameterCount(&T::getCurrentGrayscaleState) == 3, - "Expected getCurrentGrayscaleState(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::getCurrentGrayscaleState, jsInvoker_, instance_, std::move(onSuccess), std::move(onError)); - } - void getCurrentInvertColorsState(jsi::Runtime &rt, jsi::Function onSuccess, jsi::Function onError) override { - static_assert( - bridging::getParameterCount(&T::getCurrentInvertColorsState) == 3, - "Expected getCurrentInvertColorsState(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::getCurrentInvertColorsState, jsInvoker_, instance_, std::move(onSuccess), std::move(onError)); - } - void getCurrentReduceMotionState(jsi::Runtime &rt, jsi::Function onSuccess, jsi::Function onError) override { - static_assert( - bridging::getParameterCount(&T::getCurrentReduceMotionState) == 3, - "Expected getCurrentReduceMotionState(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::getCurrentReduceMotionState, jsInvoker_, instance_, std::move(onSuccess), std::move(onError)); - } - void getCurrentDarkerSystemColorsState(jsi::Runtime &rt, jsi::Function onSuccess, jsi::Function onError) override { - static_assert( - bridging::getParameterCount(&T::getCurrentDarkerSystemColorsState) == 3, - "Expected getCurrentDarkerSystemColorsState(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::getCurrentDarkerSystemColorsState, jsInvoker_, instance_, std::move(onSuccess), std::move(onError)); - } - void getCurrentPrefersCrossFadeTransitionsState(jsi::Runtime &rt, jsi::Function onSuccess, jsi::Function onError) override { - static_assert( - bridging::getParameterCount(&T::getCurrentPrefersCrossFadeTransitionsState) == 3, - "Expected getCurrentPrefersCrossFadeTransitionsState(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::getCurrentPrefersCrossFadeTransitionsState, jsInvoker_, instance_, std::move(onSuccess), std::move(onError)); - } - void getCurrentReduceTransparencyState(jsi::Runtime &rt, jsi::Function onSuccess, jsi::Function onError) override { - static_assert( - bridging::getParameterCount(&T::getCurrentReduceTransparencyState) == 3, - "Expected getCurrentReduceTransparencyState(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::getCurrentReduceTransparencyState, jsInvoker_, instance_, std::move(onSuccess), std::move(onError)); - } - void getCurrentVoiceOverState(jsi::Runtime &rt, jsi::Function onSuccess, jsi::Function onError) override { - static_assert( - bridging::getParameterCount(&T::getCurrentVoiceOverState) == 3, - "Expected getCurrentVoiceOverState(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::getCurrentVoiceOverState, jsInvoker_, instance_, std::move(onSuccess), std::move(onError)); - } - void setAccessibilityContentSizeMultipliers(jsi::Runtime &rt, jsi::Object JSMultipliers) override { - static_assert( - bridging::getParameterCount(&T::setAccessibilityContentSizeMultipliers) == 2, - "Expected setAccessibilityContentSizeMultipliers(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::setAccessibilityContentSizeMultipliers, jsInvoker_, instance_, std::move(JSMultipliers)); - } - void setAccessibilityFocus(jsi::Runtime &rt, double reactTag) override { - static_assert( - bridging::getParameterCount(&T::setAccessibilityFocus) == 2, - "Expected setAccessibilityFocus(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::setAccessibilityFocus, jsInvoker_, instance_, std::move(reactTag)); - } - void announceForAccessibility(jsi::Runtime &rt, jsi::String announcement) override { - static_assert( - bridging::getParameterCount(&T::announceForAccessibility) == 2, - "Expected announceForAccessibility(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::announceForAccessibility, jsInvoker_, instance_, std::move(announcement)); - } - void announceForAccessibilityWithOptions(jsi::Runtime &rt, jsi::String announcement, jsi::Object options) override { - static_assert( - bridging::getParameterCount(&T::announceForAccessibilityWithOptions) == 3, - "Expected announceForAccessibilityWithOptions(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::announceForAccessibilityWithOptions, jsInvoker_, instance_, std::move(announcement), std::move(options)); - } - - private: - friend class NativeAccessibilityManagerCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - class JSI_EXPORT NativeActionSheetManagerCxxSpecJSI : public TurboModule { -protected: - NativeActionSheetManagerCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual jsi::Object getConstants(jsi::Runtime &rt) = 0; - virtual void showActionSheetWithOptions(jsi::Runtime &rt, jsi::Object options, jsi::Function callback) = 0; - virtual void showShareActionSheetWithOptions(jsi::Runtime &rt, jsi::Object options, jsi::Function failureCallback, jsi::Function successCallback) = 0; - virtual void dismissActionSheet(jsi::Runtime &rt) = 0; - -}; - -template -class JSI_EXPORT NativeActionSheetManagerCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "ActionSheetManager"; - -protected: - NativeActionSheetManagerCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeActionSheetManagerCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeActionSheetManagerCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeActionSheetManagerCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - jsi::Object getConstants(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::getConstants) == 1, - "Expected getConstants(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::getConstants, jsInvoker_, instance_); - } - void showActionSheetWithOptions(jsi::Runtime &rt, jsi::Object options, jsi::Function callback) override { - static_assert( - bridging::getParameterCount(&T::showActionSheetWithOptions) == 3, - "Expected showActionSheetWithOptions(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::showActionSheetWithOptions, jsInvoker_, instance_, std::move(options), std::move(callback)); - } - void showShareActionSheetWithOptions(jsi::Runtime &rt, jsi::Object options, jsi::Function failureCallback, jsi::Function successCallback) override { - static_assert( - bridging::getParameterCount(&T::showShareActionSheetWithOptions) == 4, - "Expected showShareActionSheetWithOptions(...) to have 4 parameters"); - - return bridging::callFromJs( - rt, &T::showShareActionSheetWithOptions, jsInvoker_, instance_, std::move(options), std::move(failureCallback), std::move(successCallback)); - } - void dismissActionSheet(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::dismissActionSheet) == 1, - "Expected dismissActionSheet(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::dismissActionSheet, jsInvoker_, instance_); - } - - private: - friend class NativeActionSheetManagerCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - -#pragma mark - NativeAlertManagerArgs - -template -struct NativeAlertManagerArgs { - P0 title; - P1 message; - P2 buttons; - P3 type; - P4 defaultValue; - P5 cancelButtonKey; - P6 destructiveButtonKey; - P7 preferredButtonKey; - P8 keyboardType; - P9 userInterfaceStyle; - bool operator==(const NativeAlertManagerArgs &other) const { - return title == other.title && message == other.message && buttons == other.buttons && type == other.type && defaultValue == other.defaultValue && cancelButtonKey == other.cancelButtonKey && destructiveButtonKey == other.destructiveButtonKey && preferredButtonKey == other.preferredButtonKey && keyboardType == other.keyboardType && userInterfaceStyle == other.userInterfaceStyle; - } -}; - -template -struct NativeAlertManagerArgsBridging { - static T types; - - static T fromJs( - jsi::Runtime &rt, - const jsi::Object &value, - const std::shared_ptr &jsInvoker) { - T result{ - bridging::fromJs(rt, value.getProperty(rt, "title"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "message"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "buttons"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "type"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "defaultValue"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "cancelButtonKey"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "destructiveButtonKey"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "preferredButtonKey"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "keyboardType"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "userInterfaceStyle"), jsInvoker)}; - return result; - } - -#ifdef DEBUG - static jsi::String titleToJs(jsi::Runtime &rt, decltype(types.title) value) { - return bridging::toJs(rt, value); - } - - static jsi::String messageToJs(jsi::Runtime &rt, decltype(types.message) value) { - return bridging::toJs(rt, value); - } - - static jsi::Array buttonsToJs(jsi::Runtime &rt, decltype(types.buttons) value) { - return bridging::toJs(rt, value); - } - - static jsi::String typeToJs(jsi::Runtime &rt, decltype(types.type) value) { - return bridging::toJs(rt, value); - } - - static jsi::String defaultValueToJs(jsi::Runtime &rt, decltype(types.defaultValue) value) { - return bridging::toJs(rt, value); - } - - static jsi::String cancelButtonKeyToJs(jsi::Runtime &rt, decltype(types.cancelButtonKey) value) { - return bridging::toJs(rt, value); - } - - static jsi::String destructiveButtonKeyToJs(jsi::Runtime &rt, decltype(types.destructiveButtonKey) value) { - return bridging::toJs(rt, value); - } - - static jsi::String preferredButtonKeyToJs(jsi::Runtime &rt, decltype(types.preferredButtonKey) value) { - return bridging::toJs(rt, value); - } - - static jsi::String keyboardTypeToJs(jsi::Runtime &rt, decltype(types.keyboardType) value) { - return bridging::toJs(rt, value); - } - - static jsi::String userInterfaceStyleToJs(jsi::Runtime &rt, decltype(types.userInterfaceStyle) value) { - return bridging::toJs(rt, value); - } -#endif - - static jsi::Object toJs( - jsi::Runtime &rt, - const T &value, - const std::shared_ptr &jsInvoker) { - auto result = facebook::jsi::Object(rt); - if (value.title) { - result.setProperty(rt, "title", bridging::toJs(rt, value.title.value(), jsInvoker)); - } - if (value.message) { - result.setProperty(rt, "message", bridging::toJs(rt, value.message.value(), jsInvoker)); - } - if (value.buttons) { - result.setProperty(rt, "buttons", bridging::toJs(rt, value.buttons.value(), jsInvoker)); - } - if (value.type) { - result.setProperty(rt, "type", bridging::toJs(rt, value.type.value(), jsInvoker)); - } - if (value.defaultValue) { - result.setProperty(rt, "defaultValue", bridging::toJs(rt, value.defaultValue.value(), jsInvoker)); - } - if (value.cancelButtonKey) { - result.setProperty(rt, "cancelButtonKey", bridging::toJs(rt, value.cancelButtonKey.value(), jsInvoker)); - } - if (value.destructiveButtonKey) { - result.setProperty(rt, "destructiveButtonKey", bridging::toJs(rt, value.destructiveButtonKey.value(), jsInvoker)); - } - if (value.preferredButtonKey) { - result.setProperty(rt, "preferredButtonKey", bridging::toJs(rt, value.preferredButtonKey.value(), jsInvoker)); - } - if (value.keyboardType) { - result.setProperty(rt, "keyboardType", bridging::toJs(rt, value.keyboardType.value(), jsInvoker)); - } - if (value.userInterfaceStyle) { - result.setProperty(rt, "userInterfaceStyle", bridging::toJs(rt, value.userInterfaceStyle.value(), jsInvoker)); - } - return result; - } -}; - -class JSI_EXPORT NativeAlertManagerCxxSpecJSI : public TurboModule { -protected: - NativeAlertManagerCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual void alertWithArgs(jsi::Runtime &rt, jsi::Object args, jsi::Function callback) = 0; - -}; - -template -class JSI_EXPORT NativeAlertManagerCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "AlertManager"; - -protected: - NativeAlertManagerCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeAlertManagerCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeAlertManagerCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeAlertManagerCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - void alertWithArgs(jsi::Runtime &rt, jsi::Object args, jsi::Function callback) override { - static_assert( - bridging::getParameterCount(&T::alertWithArgs) == 3, - "Expected alertWithArgs(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::alertWithArgs, jsInvoker_, instance_, std::move(args), std::move(callback)); - } - - private: - friend class NativeAlertManagerCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - -#pragma mark - NativeAnimatedModuleEndResult - -template -struct NativeAnimatedModuleEndResult { - P0 finished; - P1 value; - P2 offset; - bool operator==(const NativeAnimatedModuleEndResult &other) const { - return finished == other.finished && value == other.value && offset == other.offset; - } -}; - -template -struct NativeAnimatedModuleEndResultBridging { - static T types; - - static T fromJs( - jsi::Runtime &rt, - const jsi::Object &value, - const std::shared_ptr &jsInvoker) { - T result{ - bridging::fromJs(rt, value.getProperty(rt, "finished"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "value"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "offset"), jsInvoker)}; - return result; - } - -#ifdef DEBUG - static bool finishedToJs(jsi::Runtime &rt, decltype(types.finished) value) { - return bridging::toJs(rt, value); - } - - static double valueToJs(jsi::Runtime &rt, decltype(types.value) value) { - return bridging::toJs(rt, value); - } - - static double offsetToJs(jsi::Runtime &rt, decltype(types.offset) value) { - return bridging::toJs(rt, value); - } -#endif - - static jsi::Object toJs( - jsi::Runtime &rt, - const T &value, - const std::shared_ptr &jsInvoker) { - auto result = facebook::jsi::Object(rt); - result.setProperty(rt, "finished", bridging::toJs(rt, value.finished, jsInvoker)); - if (value.value) { - result.setProperty(rt, "value", bridging::toJs(rt, value.value.value(), jsInvoker)); - } - if (value.offset) { - result.setProperty(rt, "offset", bridging::toJs(rt, value.offset.value(), jsInvoker)); - } - return result; - } -}; - - - -#pragma mark - NativeAnimatedModuleEventMapping - -template -struct NativeAnimatedModuleEventMapping { - P0 nativeEventPath; - P1 animatedValueTag; - bool operator==(const NativeAnimatedModuleEventMapping &other) const { - return nativeEventPath == other.nativeEventPath && animatedValueTag == other.animatedValueTag; - } -}; - -template -struct NativeAnimatedModuleEventMappingBridging { - static T types; - - static T fromJs( - jsi::Runtime &rt, - const jsi::Object &value, - const std::shared_ptr &jsInvoker) { - T result{ - bridging::fromJs(rt, value.getProperty(rt, "nativeEventPath"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "animatedValueTag"), jsInvoker)}; - return result; - } - -#ifdef DEBUG - static jsi::Array nativeEventPathToJs(jsi::Runtime &rt, decltype(types.nativeEventPath) value) { - return bridging::toJs(rt, value); - } - - static std::optional animatedValueTagToJs(jsi::Runtime &rt, decltype(types.animatedValueTag) value) { - return bridging::toJs(rt, value); - } -#endif - - static jsi::Object toJs( - jsi::Runtime &rt, - const T &value, - const std::shared_ptr &jsInvoker) { - auto result = facebook::jsi::Object(rt); - result.setProperty(rt, "nativeEventPath", bridging::toJs(rt, value.nativeEventPath, jsInvoker)); - result.setProperty(rt, "animatedValueTag", bridging::toJs(rt, value.animatedValueTag, jsInvoker)); - return result; - } -}; - -class JSI_EXPORT NativeAnimatedModuleCxxSpecJSI : public TurboModule { -protected: - NativeAnimatedModuleCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual void startOperationBatch(jsi::Runtime &rt) = 0; - virtual void finishOperationBatch(jsi::Runtime &rt) = 0; - virtual void createAnimatedNode(jsi::Runtime &rt, double tag, jsi::Object config) = 0; - virtual void updateAnimatedNodeConfig(jsi::Runtime &rt, double tag, jsi::Object config) = 0; - virtual void getValue(jsi::Runtime &rt, double tag, jsi::Function saveValueCallback) = 0; - virtual void startListeningToAnimatedNodeValue(jsi::Runtime &rt, double tag) = 0; - virtual void stopListeningToAnimatedNodeValue(jsi::Runtime &rt, double tag) = 0; - virtual void connectAnimatedNodes(jsi::Runtime &rt, double parentTag, double childTag) = 0; - virtual void disconnectAnimatedNodes(jsi::Runtime &rt, double parentTag, double childTag) = 0; - virtual void startAnimatingNode(jsi::Runtime &rt, double animationId, double nodeTag, jsi::Object config, jsi::Function endCallback) = 0; - virtual void stopAnimation(jsi::Runtime &rt, double animationId) = 0; - virtual void setAnimatedNodeValue(jsi::Runtime &rt, double nodeTag, double value) = 0; - virtual void setAnimatedNodeOffset(jsi::Runtime &rt, double nodeTag, double offset) = 0; - virtual void flattenAnimatedNodeOffset(jsi::Runtime &rt, double nodeTag) = 0; - virtual void extractAnimatedNodeOffset(jsi::Runtime &rt, double nodeTag) = 0; - virtual void connectAnimatedNodeToView(jsi::Runtime &rt, double nodeTag, double viewTag) = 0; - virtual void disconnectAnimatedNodeFromView(jsi::Runtime &rt, double nodeTag, double viewTag) = 0; - virtual void restoreDefaultValues(jsi::Runtime &rt, double nodeTag) = 0; - virtual void dropAnimatedNode(jsi::Runtime &rt, double tag) = 0; - virtual void addAnimatedEventToView(jsi::Runtime &rt, double viewTag, jsi::String eventName, jsi::Object eventMapping) = 0; - virtual void removeAnimatedEventFromView(jsi::Runtime &rt, double viewTag, jsi::String eventName, double animatedNodeTag) = 0; - virtual void addListener(jsi::Runtime &rt, jsi::String eventName) = 0; - virtual void removeListeners(jsi::Runtime &rt, double count) = 0; - virtual void queueAndExecuteBatchedOperations(jsi::Runtime &rt, jsi::Array operationsAndArgs) = 0; - -}; - -template -class JSI_EXPORT NativeAnimatedModuleCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "NativeAnimatedModule"; - -protected: - NativeAnimatedModuleCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeAnimatedModuleCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeAnimatedModuleCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeAnimatedModuleCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - void startOperationBatch(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::startOperationBatch) == 1, - "Expected startOperationBatch(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::startOperationBatch, jsInvoker_, instance_); - } - void finishOperationBatch(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::finishOperationBatch) == 1, - "Expected finishOperationBatch(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::finishOperationBatch, jsInvoker_, instance_); - } - void createAnimatedNode(jsi::Runtime &rt, double tag, jsi::Object config) override { - static_assert( - bridging::getParameterCount(&T::createAnimatedNode) == 3, - "Expected createAnimatedNode(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::createAnimatedNode, jsInvoker_, instance_, std::move(tag), std::move(config)); - } - void updateAnimatedNodeConfig(jsi::Runtime &rt, double tag, jsi::Object config) override { - static_assert( - bridging::getParameterCount(&T::updateAnimatedNodeConfig) == 3, - "Expected updateAnimatedNodeConfig(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::updateAnimatedNodeConfig, jsInvoker_, instance_, std::move(tag), std::move(config)); - } - void getValue(jsi::Runtime &rt, double tag, jsi::Function saveValueCallback) override { - static_assert( - bridging::getParameterCount(&T::getValue) == 3, - "Expected getValue(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::getValue, jsInvoker_, instance_, std::move(tag), std::move(saveValueCallback)); - } - void startListeningToAnimatedNodeValue(jsi::Runtime &rt, double tag) override { - static_assert( - bridging::getParameterCount(&T::startListeningToAnimatedNodeValue) == 2, - "Expected startListeningToAnimatedNodeValue(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::startListeningToAnimatedNodeValue, jsInvoker_, instance_, std::move(tag)); - } - void stopListeningToAnimatedNodeValue(jsi::Runtime &rt, double tag) override { - static_assert( - bridging::getParameterCount(&T::stopListeningToAnimatedNodeValue) == 2, - "Expected stopListeningToAnimatedNodeValue(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::stopListeningToAnimatedNodeValue, jsInvoker_, instance_, std::move(tag)); - } - void connectAnimatedNodes(jsi::Runtime &rt, double parentTag, double childTag) override { - static_assert( - bridging::getParameterCount(&T::connectAnimatedNodes) == 3, - "Expected connectAnimatedNodes(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::connectAnimatedNodes, jsInvoker_, instance_, std::move(parentTag), std::move(childTag)); - } - void disconnectAnimatedNodes(jsi::Runtime &rt, double parentTag, double childTag) override { - static_assert( - bridging::getParameterCount(&T::disconnectAnimatedNodes) == 3, - "Expected disconnectAnimatedNodes(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::disconnectAnimatedNodes, jsInvoker_, instance_, std::move(parentTag), std::move(childTag)); - } - void startAnimatingNode(jsi::Runtime &rt, double animationId, double nodeTag, jsi::Object config, jsi::Function endCallback) override { - static_assert( - bridging::getParameterCount(&T::startAnimatingNode) == 5, - "Expected startAnimatingNode(...) to have 5 parameters"); - - return bridging::callFromJs( - rt, &T::startAnimatingNode, jsInvoker_, instance_, std::move(animationId), std::move(nodeTag), std::move(config), std::move(endCallback)); - } - void stopAnimation(jsi::Runtime &rt, double animationId) override { - static_assert( - bridging::getParameterCount(&T::stopAnimation) == 2, - "Expected stopAnimation(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::stopAnimation, jsInvoker_, instance_, std::move(animationId)); - } - void setAnimatedNodeValue(jsi::Runtime &rt, double nodeTag, double value) override { - static_assert( - bridging::getParameterCount(&T::setAnimatedNodeValue) == 3, - "Expected setAnimatedNodeValue(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::setAnimatedNodeValue, jsInvoker_, instance_, std::move(nodeTag), std::move(value)); - } - void setAnimatedNodeOffset(jsi::Runtime &rt, double nodeTag, double offset) override { - static_assert( - bridging::getParameterCount(&T::setAnimatedNodeOffset) == 3, - "Expected setAnimatedNodeOffset(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::setAnimatedNodeOffset, jsInvoker_, instance_, std::move(nodeTag), std::move(offset)); - } - void flattenAnimatedNodeOffset(jsi::Runtime &rt, double nodeTag) override { - static_assert( - bridging::getParameterCount(&T::flattenAnimatedNodeOffset) == 2, - "Expected flattenAnimatedNodeOffset(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::flattenAnimatedNodeOffset, jsInvoker_, instance_, std::move(nodeTag)); - } - void extractAnimatedNodeOffset(jsi::Runtime &rt, double nodeTag) override { - static_assert( - bridging::getParameterCount(&T::extractAnimatedNodeOffset) == 2, - "Expected extractAnimatedNodeOffset(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::extractAnimatedNodeOffset, jsInvoker_, instance_, std::move(nodeTag)); - } - void connectAnimatedNodeToView(jsi::Runtime &rt, double nodeTag, double viewTag) override { - static_assert( - bridging::getParameterCount(&T::connectAnimatedNodeToView) == 3, - "Expected connectAnimatedNodeToView(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::connectAnimatedNodeToView, jsInvoker_, instance_, std::move(nodeTag), std::move(viewTag)); - } - void disconnectAnimatedNodeFromView(jsi::Runtime &rt, double nodeTag, double viewTag) override { - static_assert( - bridging::getParameterCount(&T::disconnectAnimatedNodeFromView) == 3, - "Expected disconnectAnimatedNodeFromView(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::disconnectAnimatedNodeFromView, jsInvoker_, instance_, std::move(nodeTag), std::move(viewTag)); - } - void restoreDefaultValues(jsi::Runtime &rt, double nodeTag) override { - static_assert( - bridging::getParameterCount(&T::restoreDefaultValues) == 2, - "Expected restoreDefaultValues(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::restoreDefaultValues, jsInvoker_, instance_, std::move(nodeTag)); - } - void dropAnimatedNode(jsi::Runtime &rt, double tag) override { - static_assert( - bridging::getParameterCount(&T::dropAnimatedNode) == 2, - "Expected dropAnimatedNode(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::dropAnimatedNode, jsInvoker_, instance_, std::move(tag)); - } - void addAnimatedEventToView(jsi::Runtime &rt, double viewTag, jsi::String eventName, jsi::Object eventMapping) override { - static_assert( - bridging::getParameterCount(&T::addAnimatedEventToView) == 4, - "Expected addAnimatedEventToView(...) to have 4 parameters"); - - return bridging::callFromJs( - rt, &T::addAnimatedEventToView, jsInvoker_, instance_, std::move(viewTag), std::move(eventName), std::move(eventMapping)); - } - void removeAnimatedEventFromView(jsi::Runtime &rt, double viewTag, jsi::String eventName, double animatedNodeTag) override { - static_assert( - bridging::getParameterCount(&T::removeAnimatedEventFromView) == 4, - "Expected removeAnimatedEventFromView(...) to have 4 parameters"); - - return bridging::callFromJs( - rt, &T::removeAnimatedEventFromView, jsInvoker_, instance_, std::move(viewTag), std::move(eventName), std::move(animatedNodeTag)); - } - void addListener(jsi::Runtime &rt, jsi::String eventName) override { - static_assert( - bridging::getParameterCount(&T::addListener) == 2, - "Expected addListener(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::addListener, jsInvoker_, instance_, std::move(eventName)); - } - void removeListeners(jsi::Runtime &rt, double count) override { - static_assert( - bridging::getParameterCount(&T::removeListeners) == 2, - "Expected removeListeners(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::removeListeners, jsInvoker_, instance_, std::move(count)); - } - void queueAndExecuteBatchedOperations(jsi::Runtime &rt, jsi::Array operationsAndArgs) override { - static_assert( - bridging::getParameterCount(&T::queueAndExecuteBatchedOperations) == 2, - "Expected queueAndExecuteBatchedOperations(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::queueAndExecuteBatchedOperations, jsInvoker_, instance_, std::move(operationsAndArgs)); - } - - private: - friend class NativeAnimatedModuleCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - -#pragma mark - NativeAnimatedTurboModuleEndResult - -template -struct NativeAnimatedTurboModuleEndResult { - P0 finished; - P1 value; - P2 offset; - bool operator==(const NativeAnimatedTurboModuleEndResult &other) const { - return finished == other.finished && value == other.value && offset == other.offset; - } -}; - -template -struct NativeAnimatedTurboModuleEndResultBridging { - static T types; - - static T fromJs( - jsi::Runtime &rt, - const jsi::Object &value, - const std::shared_ptr &jsInvoker) { - T result{ - bridging::fromJs(rt, value.getProperty(rt, "finished"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "value"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "offset"), jsInvoker)}; - return result; - } - -#ifdef DEBUG - static bool finishedToJs(jsi::Runtime &rt, decltype(types.finished) value) { - return bridging::toJs(rt, value); - } - - static double valueToJs(jsi::Runtime &rt, decltype(types.value) value) { - return bridging::toJs(rt, value); - } - - static double offsetToJs(jsi::Runtime &rt, decltype(types.offset) value) { - return bridging::toJs(rt, value); - } -#endif - - static jsi::Object toJs( - jsi::Runtime &rt, - const T &value, - const std::shared_ptr &jsInvoker) { - auto result = facebook::jsi::Object(rt); - result.setProperty(rt, "finished", bridging::toJs(rt, value.finished, jsInvoker)); - if (value.value) { - result.setProperty(rt, "value", bridging::toJs(rt, value.value.value(), jsInvoker)); - } - if (value.offset) { - result.setProperty(rt, "offset", bridging::toJs(rt, value.offset.value(), jsInvoker)); - } - return result; - } -}; - - - -#pragma mark - NativeAnimatedTurboModuleEventMapping - -template -struct NativeAnimatedTurboModuleEventMapping { - P0 nativeEventPath; - P1 animatedValueTag; - bool operator==(const NativeAnimatedTurboModuleEventMapping &other) const { - return nativeEventPath == other.nativeEventPath && animatedValueTag == other.animatedValueTag; - } -}; - -template -struct NativeAnimatedTurboModuleEventMappingBridging { - static T types; - - static T fromJs( - jsi::Runtime &rt, - const jsi::Object &value, - const std::shared_ptr &jsInvoker) { - T result{ - bridging::fromJs(rt, value.getProperty(rt, "nativeEventPath"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "animatedValueTag"), jsInvoker)}; - return result; - } - -#ifdef DEBUG - static jsi::Array nativeEventPathToJs(jsi::Runtime &rt, decltype(types.nativeEventPath) value) { - return bridging::toJs(rt, value); - } - - static std::optional animatedValueTagToJs(jsi::Runtime &rt, decltype(types.animatedValueTag) value) { - return bridging::toJs(rt, value); - } -#endif - - static jsi::Object toJs( - jsi::Runtime &rt, - const T &value, - const std::shared_ptr &jsInvoker) { - auto result = facebook::jsi::Object(rt); - result.setProperty(rt, "nativeEventPath", bridging::toJs(rt, value.nativeEventPath, jsInvoker)); - result.setProperty(rt, "animatedValueTag", bridging::toJs(rt, value.animatedValueTag, jsInvoker)); - return result; - } -}; - -class JSI_EXPORT NativeAnimatedTurboModuleCxxSpecJSI : public TurboModule { -protected: - NativeAnimatedTurboModuleCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual void startOperationBatch(jsi::Runtime &rt) = 0; - virtual void finishOperationBatch(jsi::Runtime &rt) = 0; - virtual void createAnimatedNode(jsi::Runtime &rt, double tag, jsi::Object config) = 0; - virtual void updateAnimatedNodeConfig(jsi::Runtime &rt, double tag, jsi::Object config) = 0; - virtual void getValue(jsi::Runtime &rt, double tag, jsi::Function saveValueCallback) = 0; - virtual void startListeningToAnimatedNodeValue(jsi::Runtime &rt, double tag) = 0; - virtual void stopListeningToAnimatedNodeValue(jsi::Runtime &rt, double tag) = 0; - virtual void connectAnimatedNodes(jsi::Runtime &rt, double parentTag, double childTag) = 0; - virtual void disconnectAnimatedNodes(jsi::Runtime &rt, double parentTag, double childTag) = 0; - virtual void startAnimatingNode(jsi::Runtime &rt, double animationId, double nodeTag, jsi::Object config, jsi::Function endCallback) = 0; - virtual void stopAnimation(jsi::Runtime &rt, double animationId) = 0; - virtual void setAnimatedNodeValue(jsi::Runtime &rt, double nodeTag, double value) = 0; - virtual void setAnimatedNodeOffset(jsi::Runtime &rt, double nodeTag, double offset) = 0; - virtual void flattenAnimatedNodeOffset(jsi::Runtime &rt, double nodeTag) = 0; - virtual void extractAnimatedNodeOffset(jsi::Runtime &rt, double nodeTag) = 0; - virtual void connectAnimatedNodeToView(jsi::Runtime &rt, double nodeTag, double viewTag) = 0; - virtual void disconnectAnimatedNodeFromView(jsi::Runtime &rt, double nodeTag, double viewTag) = 0; - virtual void restoreDefaultValues(jsi::Runtime &rt, double nodeTag) = 0; - virtual void dropAnimatedNode(jsi::Runtime &rt, double tag) = 0; - virtual void addAnimatedEventToView(jsi::Runtime &rt, double viewTag, jsi::String eventName, jsi::Object eventMapping) = 0; - virtual void removeAnimatedEventFromView(jsi::Runtime &rt, double viewTag, jsi::String eventName, double animatedNodeTag) = 0; - virtual void addListener(jsi::Runtime &rt, jsi::String eventName) = 0; - virtual void removeListeners(jsi::Runtime &rt, double count) = 0; - virtual void queueAndExecuteBatchedOperations(jsi::Runtime &rt, jsi::Array operationsAndArgs) = 0; - -}; - -template -class JSI_EXPORT NativeAnimatedTurboModuleCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "NativeAnimatedTurboModule"; - -protected: - NativeAnimatedTurboModuleCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeAnimatedTurboModuleCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeAnimatedTurboModuleCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeAnimatedTurboModuleCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - void startOperationBatch(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::startOperationBatch) == 1, - "Expected startOperationBatch(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::startOperationBatch, jsInvoker_, instance_); - } - void finishOperationBatch(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::finishOperationBatch) == 1, - "Expected finishOperationBatch(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::finishOperationBatch, jsInvoker_, instance_); - } - void createAnimatedNode(jsi::Runtime &rt, double tag, jsi::Object config) override { - static_assert( - bridging::getParameterCount(&T::createAnimatedNode) == 3, - "Expected createAnimatedNode(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::createAnimatedNode, jsInvoker_, instance_, std::move(tag), std::move(config)); - } - void updateAnimatedNodeConfig(jsi::Runtime &rt, double tag, jsi::Object config) override { - static_assert( - bridging::getParameterCount(&T::updateAnimatedNodeConfig) == 3, - "Expected updateAnimatedNodeConfig(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::updateAnimatedNodeConfig, jsInvoker_, instance_, std::move(tag), std::move(config)); - } - void getValue(jsi::Runtime &rt, double tag, jsi::Function saveValueCallback) override { - static_assert( - bridging::getParameterCount(&T::getValue) == 3, - "Expected getValue(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::getValue, jsInvoker_, instance_, std::move(tag), std::move(saveValueCallback)); - } - void startListeningToAnimatedNodeValue(jsi::Runtime &rt, double tag) override { - static_assert( - bridging::getParameterCount(&T::startListeningToAnimatedNodeValue) == 2, - "Expected startListeningToAnimatedNodeValue(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::startListeningToAnimatedNodeValue, jsInvoker_, instance_, std::move(tag)); - } - void stopListeningToAnimatedNodeValue(jsi::Runtime &rt, double tag) override { - static_assert( - bridging::getParameterCount(&T::stopListeningToAnimatedNodeValue) == 2, - "Expected stopListeningToAnimatedNodeValue(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::stopListeningToAnimatedNodeValue, jsInvoker_, instance_, std::move(tag)); - } - void connectAnimatedNodes(jsi::Runtime &rt, double parentTag, double childTag) override { - static_assert( - bridging::getParameterCount(&T::connectAnimatedNodes) == 3, - "Expected connectAnimatedNodes(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::connectAnimatedNodes, jsInvoker_, instance_, std::move(parentTag), std::move(childTag)); - } - void disconnectAnimatedNodes(jsi::Runtime &rt, double parentTag, double childTag) override { - static_assert( - bridging::getParameterCount(&T::disconnectAnimatedNodes) == 3, - "Expected disconnectAnimatedNodes(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::disconnectAnimatedNodes, jsInvoker_, instance_, std::move(parentTag), std::move(childTag)); - } - void startAnimatingNode(jsi::Runtime &rt, double animationId, double nodeTag, jsi::Object config, jsi::Function endCallback) override { - static_assert( - bridging::getParameterCount(&T::startAnimatingNode) == 5, - "Expected startAnimatingNode(...) to have 5 parameters"); - - return bridging::callFromJs( - rt, &T::startAnimatingNode, jsInvoker_, instance_, std::move(animationId), std::move(nodeTag), std::move(config), std::move(endCallback)); - } - void stopAnimation(jsi::Runtime &rt, double animationId) override { - static_assert( - bridging::getParameterCount(&T::stopAnimation) == 2, - "Expected stopAnimation(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::stopAnimation, jsInvoker_, instance_, std::move(animationId)); - } - void setAnimatedNodeValue(jsi::Runtime &rt, double nodeTag, double value) override { - static_assert( - bridging::getParameterCount(&T::setAnimatedNodeValue) == 3, - "Expected setAnimatedNodeValue(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::setAnimatedNodeValue, jsInvoker_, instance_, std::move(nodeTag), std::move(value)); - } - void setAnimatedNodeOffset(jsi::Runtime &rt, double nodeTag, double offset) override { - static_assert( - bridging::getParameterCount(&T::setAnimatedNodeOffset) == 3, - "Expected setAnimatedNodeOffset(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::setAnimatedNodeOffset, jsInvoker_, instance_, std::move(nodeTag), std::move(offset)); - } - void flattenAnimatedNodeOffset(jsi::Runtime &rt, double nodeTag) override { - static_assert( - bridging::getParameterCount(&T::flattenAnimatedNodeOffset) == 2, - "Expected flattenAnimatedNodeOffset(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::flattenAnimatedNodeOffset, jsInvoker_, instance_, std::move(nodeTag)); - } - void extractAnimatedNodeOffset(jsi::Runtime &rt, double nodeTag) override { - static_assert( - bridging::getParameterCount(&T::extractAnimatedNodeOffset) == 2, - "Expected extractAnimatedNodeOffset(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::extractAnimatedNodeOffset, jsInvoker_, instance_, std::move(nodeTag)); - } - void connectAnimatedNodeToView(jsi::Runtime &rt, double nodeTag, double viewTag) override { - static_assert( - bridging::getParameterCount(&T::connectAnimatedNodeToView) == 3, - "Expected connectAnimatedNodeToView(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::connectAnimatedNodeToView, jsInvoker_, instance_, std::move(nodeTag), std::move(viewTag)); - } - void disconnectAnimatedNodeFromView(jsi::Runtime &rt, double nodeTag, double viewTag) override { - static_assert( - bridging::getParameterCount(&T::disconnectAnimatedNodeFromView) == 3, - "Expected disconnectAnimatedNodeFromView(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::disconnectAnimatedNodeFromView, jsInvoker_, instance_, std::move(nodeTag), std::move(viewTag)); - } - void restoreDefaultValues(jsi::Runtime &rt, double nodeTag) override { - static_assert( - bridging::getParameterCount(&T::restoreDefaultValues) == 2, - "Expected restoreDefaultValues(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::restoreDefaultValues, jsInvoker_, instance_, std::move(nodeTag)); - } - void dropAnimatedNode(jsi::Runtime &rt, double tag) override { - static_assert( - bridging::getParameterCount(&T::dropAnimatedNode) == 2, - "Expected dropAnimatedNode(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::dropAnimatedNode, jsInvoker_, instance_, std::move(tag)); - } - void addAnimatedEventToView(jsi::Runtime &rt, double viewTag, jsi::String eventName, jsi::Object eventMapping) override { - static_assert( - bridging::getParameterCount(&T::addAnimatedEventToView) == 4, - "Expected addAnimatedEventToView(...) to have 4 parameters"); - - return bridging::callFromJs( - rt, &T::addAnimatedEventToView, jsInvoker_, instance_, std::move(viewTag), std::move(eventName), std::move(eventMapping)); - } - void removeAnimatedEventFromView(jsi::Runtime &rt, double viewTag, jsi::String eventName, double animatedNodeTag) override { - static_assert( - bridging::getParameterCount(&T::removeAnimatedEventFromView) == 4, - "Expected removeAnimatedEventFromView(...) to have 4 parameters"); - - return bridging::callFromJs( - rt, &T::removeAnimatedEventFromView, jsInvoker_, instance_, std::move(viewTag), std::move(eventName), std::move(animatedNodeTag)); - } - void addListener(jsi::Runtime &rt, jsi::String eventName) override { - static_assert( - bridging::getParameterCount(&T::addListener) == 2, - "Expected addListener(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::addListener, jsInvoker_, instance_, std::move(eventName)); - } - void removeListeners(jsi::Runtime &rt, double count) override { - static_assert( - bridging::getParameterCount(&T::removeListeners) == 2, - "Expected removeListeners(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::removeListeners, jsInvoker_, instance_, std::move(count)); - } - void queueAndExecuteBatchedOperations(jsi::Runtime &rt, jsi::Array operationsAndArgs) override { - static_assert( - bridging::getParameterCount(&T::queueAndExecuteBatchedOperations) == 2, - "Expected queueAndExecuteBatchedOperations(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::queueAndExecuteBatchedOperations, jsInvoker_, instance_, std::move(operationsAndArgs)); - } - - private: - friend class NativeAnimatedTurboModuleCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - class JSI_EXPORT NativeAppearanceCxxSpecJSI : public TurboModule { -protected: - NativeAppearanceCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual std::optional getColorScheme(jsi::Runtime &rt) = 0; - virtual void setColorScheme(jsi::Runtime &rt, jsi::String colorScheme) = 0; - virtual void addListener(jsi::Runtime &rt, jsi::String eventName) = 0; - virtual void removeListeners(jsi::Runtime &rt, double count) = 0; - -}; - -template -class JSI_EXPORT NativeAppearanceCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "Appearance"; - -protected: - NativeAppearanceCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeAppearanceCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeAppearanceCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeAppearanceCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - std::optional getColorScheme(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::getColorScheme) == 1, - "Expected getColorScheme(...) to have 1 parameters"); - - return bridging::callFromJs>( - rt, &T::getColorScheme, jsInvoker_, instance_); - } - void setColorScheme(jsi::Runtime &rt, jsi::String colorScheme) override { - static_assert( - bridging::getParameterCount(&T::setColorScheme) == 2, - "Expected setColorScheme(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::setColorScheme, jsInvoker_, instance_, std::move(colorScheme)); - } - void addListener(jsi::Runtime &rt, jsi::String eventName) override { - static_assert( - bridging::getParameterCount(&T::addListener) == 2, - "Expected addListener(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::addListener, jsInvoker_, instance_, std::move(eventName)); - } - void removeListeners(jsi::Runtime &rt, double count) override { - static_assert( - bridging::getParameterCount(&T::removeListeners) == 2, - "Expected removeListeners(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::removeListeners, jsInvoker_, instance_, std::move(count)); - } - - private: - friend class NativeAppearanceCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - -#pragma mark - NativeAppStateAppState - -template -struct NativeAppStateAppState { - P0 app_state; - bool operator==(const NativeAppStateAppState &other) const { - return app_state == other.app_state; - } -}; - -template -struct NativeAppStateAppStateBridging { - static T types; - - static T fromJs( - jsi::Runtime &rt, - const jsi::Object &value, - const std::shared_ptr &jsInvoker) { - T result{ - bridging::fromJs(rt, value.getProperty(rt, "app_state"), jsInvoker)}; - return result; - } - -#ifdef DEBUG - static jsi::String app_stateToJs(jsi::Runtime &rt, decltype(types.app_state) value) { - return bridging::toJs(rt, value); - } -#endif - - static jsi::Object toJs( - jsi::Runtime &rt, - const T &value, - const std::shared_ptr &jsInvoker) { - auto result = facebook::jsi::Object(rt); - result.setProperty(rt, "app_state", bridging::toJs(rt, value.app_state, jsInvoker)); - return result; - } -}; - - - -#pragma mark - NativeAppStateAppStateConstants - -template -struct NativeAppStateAppStateConstants { - P0 initialAppState; - bool operator==(const NativeAppStateAppStateConstants &other) const { - return initialAppState == other.initialAppState; - } -}; - -template -struct NativeAppStateAppStateConstantsBridging { - static T types; - - static T fromJs( - jsi::Runtime &rt, - const jsi::Object &value, - const std::shared_ptr &jsInvoker) { - T result{ - bridging::fromJs(rt, value.getProperty(rt, "initialAppState"), jsInvoker)}; - return result; - } - -#ifdef DEBUG - static jsi::String initialAppStateToJs(jsi::Runtime &rt, decltype(types.initialAppState) value) { - return bridging::toJs(rt, value); - } -#endif - - static jsi::Object toJs( - jsi::Runtime &rt, - const T &value, - const std::shared_ptr &jsInvoker) { - auto result = facebook::jsi::Object(rt); - result.setProperty(rt, "initialAppState", bridging::toJs(rt, value.initialAppState, jsInvoker)); - return result; - } -}; - -class JSI_EXPORT NativeAppStateCxxSpecJSI : public TurboModule { -protected: - NativeAppStateCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual jsi::Object getConstants(jsi::Runtime &rt) = 0; - virtual void getCurrentAppState(jsi::Runtime &rt, jsi::Function success, jsi::Function error) = 0; - virtual void addListener(jsi::Runtime &rt, jsi::String eventName) = 0; - virtual void removeListeners(jsi::Runtime &rt, double count) = 0; - -}; - -template -class JSI_EXPORT NativeAppStateCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "AppState"; - -protected: - NativeAppStateCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeAppStateCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeAppStateCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeAppStateCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - jsi::Object getConstants(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::getConstants) == 1, - "Expected getConstants(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::getConstants, jsInvoker_, instance_); - } - void getCurrentAppState(jsi::Runtime &rt, jsi::Function success, jsi::Function error) override { - static_assert( - bridging::getParameterCount(&T::getCurrentAppState) == 3, - "Expected getCurrentAppState(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::getCurrentAppState, jsInvoker_, instance_, std::move(success), std::move(error)); - } - void addListener(jsi::Runtime &rt, jsi::String eventName) override { - static_assert( - bridging::getParameterCount(&T::addListener) == 2, - "Expected addListener(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::addListener, jsInvoker_, instance_, std::move(eventName)); - } - void removeListeners(jsi::Runtime &rt, double count) override { - static_assert( - bridging::getParameterCount(&T::removeListeners) == 2, - "Expected removeListeners(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::removeListeners, jsInvoker_, instance_, std::move(count)); - } - - private: - friend class NativeAppStateCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - -#pragma mark - NativeAppThemeAppThemeData - -template -struct NativeAppThemeAppThemeData { - P0 isHighContrast; - P1 highContrastColors; - bool operator==(const NativeAppThemeAppThemeData &other) const { - return isHighContrast == other.isHighContrast && highContrastColors == other.highContrastColors; - } -}; - -template -struct NativeAppThemeAppThemeDataBridging { - static T types; - - static T fromJs( - jsi::Runtime &rt, - const jsi::Object &value, - const std::shared_ptr &jsInvoker) { - T result{ - bridging::fromJs(rt, value.getProperty(rt, "isHighContrast"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "highContrastColors"), jsInvoker)}; - return result; - } - -#ifdef DEBUG - static bool isHighContrastToJs(jsi::Runtime &rt, decltype(types.isHighContrast) value) { - return bridging::toJs(rt, value); - } - - static jsi::Object highContrastColorsToJs(jsi::Runtime &rt, decltype(types.highContrastColors) value) { - return bridging::toJs(rt, value); - } -#endif - - static jsi::Object toJs( - jsi::Runtime &rt, - const T &value, - const std::shared_ptr &jsInvoker) { - auto result = facebook::jsi::Object(rt); - result.setProperty(rt, "isHighContrast", bridging::toJs(rt, value.isHighContrast, jsInvoker)); - result.setProperty(rt, "highContrastColors", bridging::toJs(rt, value.highContrastColors, jsInvoker)); - return result; - } -}; - - - -#pragma mark - NativeAppThemeHighContrastColors - -template -struct NativeAppThemeHighContrastColors { - P0 ButtonFaceColor; - P1 ButtonTextColor; - P2 GrayTextColor; - P3 HighlightColor; - P4 HighlightTextColor; - P5 HotlightColor; - P6 WindowColor; - P7 WindowTextColor; - bool operator==(const NativeAppThemeHighContrastColors &other) const { - return ButtonFaceColor == other.ButtonFaceColor && ButtonTextColor == other.ButtonTextColor && GrayTextColor == other.GrayTextColor && HighlightColor == other.HighlightColor && HighlightTextColor == other.HighlightTextColor && HotlightColor == other.HotlightColor && WindowColor == other.WindowColor && WindowTextColor == other.WindowTextColor; - } -}; - -template -struct NativeAppThemeHighContrastColorsBridging { - static T types; - - static T fromJs( - jsi::Runtime &rt, - const jsi::Object &value, - const std::shared_ptr &jsInvoker) { - T result{ - bridging::fromJs(rt, value.getProperty(rt, "ButtonFaceColor"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "ButtonTextColor"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "GrayTextColor"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "HighlightColor"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "HighlightTextColor"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "HotlightColor"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "WindowColor"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "WindowTextColor"), jsInvoker)}; - return result; - } - -#ifdef DEBUG - static jsi::String ButtonFaceColorToJs(jsi::Runtime &rt, decltype(types.ButtonFaceColor) value) { - return bridging::toJs(rt, value); - } - - static jsi::String ButtonTextColorToJs(jsi::Runtime &rt, decltype(types.ButtonTextColor) value) { - return bridging::toJs(rt, value); - } - - static jsi::String GrayTextColorToJs(jsi::Runtime &rt, decltype(types.GrayTextColor) value) { - return bridging::toJs(rt, value); - } - - static jsi::String HighlightColorToJs(jsi::Runtime &rt, decltype(types.HighlightColor) value) { - return bridging::toJs(rt, value); - } - - static jsi::String HighlightTextColorToJs(jsi::Runtime &rt, decltype(types.HighlightTextColor) value) { - return bridging::toJs(rt, value); - } - - static jsi::String HotlightColorToJs(jsi::Runtime &rt, decltype(types.HotlightColor) value) { - return bridging::toJs(rt, value); - } - - static jsi::String WindowColorToJs(jsi::Runtime &rt, decltype(types.WindowColor) value) { - return bridging::toJs(rt, value); - } - - static jsi::String WindowTextColorToJs(jsi::Runtime &rt, decltype(types.WindowTextColor) value) { - return bridging::toJs(rt, value); - } -#endif - - static jsi::Object toJs( - jsi::Runtime &rt, - const T &value, - const std::shared_ptr &jsInvoker) { - auto result = facebook::jsi::Object(rt); - result.setProperty(rt, "ButtonFaceColor", bridging::toJs(rt, value.ButtonFaceColor, jsInvoker)); - result.setProperty(rt, "ButtonTextColor", bridging::toJs(rt, value.ButtonTextColor, jsInvoker)); - result.setProperty(rt, "GrayTextColor", bridging::toJs(rt, value.GrayTextColor, jsInvoker)); - result.setProperty(rt, "HighlightColor", bridging::toJs(rt, value.HighlightColor, jsInvoker)); - result.setProperty(rt, "HighlightTextColor", bridging::toJs(rt, value.HighlightTextColor, jsInvoker)); - result.setProperty(rt, "HotlightColor", bridging::toJs(rt, value.HotlightColor, jsInvoker)); - result.setProperty(rt, "WindowColor", bridging::toJs(rt, value.WindowColor, jsInvoker)); - result.setProperty(rt, "WindowTextColor", bridging::toJs(rt, value.WindowTextColor, jsInvoker)); - return result; - } -}; - -class JSI_EXPORT NativeAppThemeCxxSpecJSI : public TurboModule { -protected: - NativeAppThemeCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual jsi::Object getConstants(jsi::Runtime &rt) = 0; - -}; - -template -class JSI_EXPORT NativeAppThemeCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "AppTheme"; - -protected: - NativeAppThemeCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeAppThemeCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeAppThemeCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeAppThemeCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - jsi::Object getConstants(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::getConstants) == 1, - "Expected getConstants(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::getConstants, jsInvoker_, instance_); - } - - private: - friend class NativeAppThemeCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - -#pragma mark - NativeBlobModuleConstants - -template -struct NativeBlobModuleConstants { - P0 BLOB_URI_SCHEME; - P1 BLOB_URI_HOST; - bool operator==(const NativeBlobModuleConstants &other) const { - return BLOB_URI_SCHEME == other.BLOB_URI_SCHEME && BLOB_URI_HOST == other.BLOB_URI_HOST; - } -}; - -template -struct NativeBlobModuleConstantsBridging { - static T types; - - static T fromJs( - jsi::Runtime &rt, - const jsi::Object &value, - const std::shared_ptr &jsInvoker) { - T result{ - bridging::fromJs(rt, value.getProperty(rt, "BLOB_URI_SCHEME"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "BLOB_URI_HOST"), jsInvoker)}; - return result; - } - -#ifdef DEBUG - static std::optional BLOB_URI_SCHEMEToJs(jsi::Runtime &rt, decltype(types.BLOB_URI_SCHEME) value) { - return bridging::toJs(rt, value); - } - - static std::optional BLOB_URI_HOSTToJs(jsi::Runtime &rt, decltype(types.BLOB_URI_HOST) value) { - return bridging::toJs(rt, value); - } -#endif - - static jsi::Object toJs( - jsi::Runtime &rt, - const T &value, - const std::shared_ptr &jsInvoker) { - auto result = facebook::jsi::Object(rt); - result.setProperty(rt, "BLOB_URI_SCHEME", bridging::toJs(rt, value.BLOB_URI_SCHEME, jsInvoker)); - result.setProperty(rt, "BLOB_URI_HOST", bridging::toJs(rt, value.BLOB_URI_HOST, jsInvoker)); - return result; - } -}; - -class JSI_EXPORT NativeBlobModuleCxxSpecJSI : public TurboModule { -protected: - NativeBlobModuleCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual jsi::Object getConstants(jsi::Runtime &rt) = 0; - virtual void addNetworkingHandler(jsi::Runtime &rt) = 0; - virtual void addWebSocketHandler(jsi::Runtime &rt, double id) = 0; - virtual void removeWebSocketHandler(jsi::Runtime &rt, double id) = 0; - virtual void sendOverSocket(jsi::Runtime &rt, jsi::Object blob, double socketID) = 0; - virtual void createFromParts(jsi::Runtime &rt, jsi::Array parts, jsi::String withId) = 0; - virtual void release(jsi::Runtime &rt, jsi::String blobId) = 0; - -}; - -template -class JSI_EXPORT NativeBlobModuleCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "BlobModule"; - -protected: - NativeBlobModuleCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeBlobModuleCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeBlobModuleCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeBlobModuleCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - jsi::Object getConstants(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::getConstants) == 1, - "Expected getConstants(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::getConstants, jsInvoker_, instance_); - } - void addNetworkingHandler(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::addNetworkingHandler) == 1, - "Expected addNetworkingHandler(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::addNetworkingHandler, jsInvoker_, instance_); - } - void addWebSocketHandler(jsi::Runtime &rt, double id) override { - static_assert( - bridging::getParameterCount(&T::addWebSocketHandler) == 2, - "Expected addWebSocketHandler(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::addWebSocketHandler, jsInvoker_, instance_, std::move(id)); - } - void removeWebSocketHandler(jsi::Runtime &rt, double id) override { - static_assert( - bridging::getParameterCount(&T::removeWebSocketHandler) == 2, - "Expected removeWebSocketHandler(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::removeWebSocketHandler, jsInvoker_, instance_, std::move(id)); - } - void sendOverSocket(jsi::Runtime &rt, jsi::Object blob, double socketID) override { - static_assert( - bridging::getParameterCount(&T::sendOverSocket) == 3, - "Expected sendOverSocket(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::sendOverSocket, jsInvoker_, instance_, std::move(blob), std::move(socketID)); - } - void createFromParts(jsi::Runtime &rt, jsi::Array parts, jsi::String withId) override { - static_assert( - bridging::getParameterCount(&T::createFromParts) == 3, - "Expected createFromParts(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::createFromParts, jsInvoker_, instance_, std::move(parts), std::move(withId)); - } - void release(jsi::Runtime &rt, jsi::String blobId) override { - static_assert( - bridging::getParameterCount(&T::release) == 2, - "Expected release(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::release, jsInvoker_, instance_, std::move(blobId)); - } - - private: - friend class NativeBlobModuleCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - class JSI_EXPORT NativeClipboardCxxSpecJSI : public TurboModule { -protected: - NativeClipboardCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual jsi::Object getConstants(jsi::Runtime &rt) = 0; - virtual jsi::Value getString(jsi::Runtime &rt) = 0; - virtual void setString(jsi::Runtime &rt, jsi::String content) = 0; - -}; - -template -class JSI_EXPORT NativeClipboardCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "Clipboard"; - -protected: - NativeClipboardCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeClipboardCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeClipboardCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeClipboardCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - jsi::Object getConstants(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::getConstants) == 1, - "Expected getConstants(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::getConstants, jsInvoker_, instance_); - } - jsi::Value getString(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::getString) == 1, - "Expected getString(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::getString, jsInvoker_, instance_); - } - void setString(jsi::Runtime &rt, jsi::String content) override { - static_assert( - bridging::getParameterCount(&T::setString) == 2, - "Expected setString(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::setString, jsInvoker_, instance_, std::move(content)); - } - - private: - friend class NativeClipboardCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - class JSI_EXPORT NativeDeviceEventManagerCxxSpecJSI : public TurboModule { -protected: - NativeDeviceEventManagerCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual void invokeDefaultBackPressHandler(jsi::Runtime &rt) = 0; - -}; - -template -class JSI_EXPORT NativeDeviceEventManagerCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "DeviceEventManager"; - -protected: - NativeDeviceEventManagerCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeDeviceEventManagerCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeDeviceEventManagerCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeDeviceEventManagerCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - void invokeDefaultBackPressHandler(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::invokeDefaultBackPressHandler) == 1, - "Expected invokeDefaultBackPressHandler(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::invokeDefaultBackPressHandler, jsInvoker_, instance_); - } - - private: - friend class NativeDeviceEventManagerCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - -#pragma mark - NativeDeviceInfoDeviceInfoConstants - -template -struct NativeDeviceInfoDeviceInfoConstants { - P0 Dimensions; - P1 isEdgeToEdge; - P2 isIPhoneX_deprecated; - bool operator==(const NativeDeviceInfoDeviceInfoConstants &other) const { - return Dimensions == other.Dimensions && isEdgeToEdge == other.isEdgeToEdge && isIPhoneX_deprecated == other.isIPhoneX_deprecated; - } -}; - -template -struct NativeDeviceInfoDeviceInfoConstantsBridging { - static T types; - - static T fromJs( - jsi::Runtime &rt, - const jsi::Object &value, - const std::shared_ptr &jsInvoker) { - T result{ - bridging::fromJs(rt, value.getProperty(rt, "Dimensions"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "isEdgeToEdge"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "isIPhoneX_deprecated"), jsInvoker)}; - return result; - } - -#ifdef DEBUG - static jsi::Object DimensionsToJs(jsi::Runtime &rt, decltype(types.Dimensions) value) { - return bridging::toJs(rt, value); - } - - static bool isEdgeToEdgeToJs(jsi::Runtime &rt, decltype(types.isEdgeToEdge) value) { - return bridging::toJs(rt, value); - } - - static bool isIPhoneX_deprecatedToJs(jsi::Runtime &rt, decltype(types.isIPhoneX_deprecated) value) { - return bridging::toJs(rt, value); - } -#endif - - static jsi::Object toJs( - jsi::Runtime &rt, - const T &value, - const std::shared_ptr &jsInvoker) { - auto result = facebook::jsi::Object(rt); - result.setProperty(rt, "Dimensions", bridging::toJs(rt, value.Dimensions, jsInvoker)); - if (value.isEdgeToEdge) { - result.setProperty(rt, "isEdgeToEdge", bridging::toJs(rt, value.isEdgeToEdge.value(), jsInvoker)); - } - if (value.isIPhoneX_deprecated) { - result.setProperty(rt, "isIPhoneX_deprecated", bridging::toJs(rt, value.isIPhoneX_deprecated.value(), jsInvoker)); - } - return result; - } -}; - - - -#pragma mark - NativeDeviceInfoDimensionsPayload - -template -struct NativeDeviceInfoDimensionsPayload { - P0 window; - P1 screen; - P2 windowPhysicalPixels; - P3 screenPhysicalPixels; - bool operator==(const NativeDeviceInfoDimensionsPayload &other) const { - return window == other.window && screen == other.screen && windowPhysicalPixels == other.windowPhysicalPixels && screenPhysicalPixels == other.screenPhysicalPixels; - } -}; - -template -struct NativeDeviceInfoDimensionsPayloadBridging { - static T types; - - static T fromJs( - jsi::Runtime &rt, - const jsi::Object &value, - const std::shared_ptr &jsInvoker) { - T result{ - bridging::fromJs(rt, value.getProperty(rt, "window"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "screen"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "windowPhysicalPixels"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "screenPhysicalPixels"), jsInvoker)}; - return result; - } - -#ifdef DEBUG - static jsi::Object windowToJs(jsi::Runtime &rt, decltype(types.window) value) { - return bridging::toJs(rt, value); - } - - static jsi::Object screenToJs(jsi::Runtime &rt, decltype(types.screen) value) { - return bridging::toJs(rt, value); - } - - static jsi::Object windowPhysicalPixelsToJs(jsi::Runtime &rt, decltype(types.windowPhysicalPixels) value) { - return bridging::toJs(rt, value); - } - - static jsi::Object screenPhysicalPixelsToJs(jsi::Runtime &rt, decltype(types.screenPhysicalPixels) value) { - return bridging::toJs(rt, value); - } -#endif - - static jsi::Object toJs( - jsi::Runtime &rt, - const T &value, - const std::shared_ptr &jsInvoker) { - auto result = facebook::jsi::Object(rt); - if (value.window) { - result.setProperty(rt, "window", bridging::toJs(rt, value.window.value(), jsInvoker)); - } - if (value.screen) { - result.setProperty(rt, "screen", bridging::toJs(rt, value.screen.value(), jsInvoker)); - } - if (value.windowPhysicalPixels) { - result.setProperty(rt, "windowPhysicalPixels", bridging::toJs(rt, value.windowPhysicalPixels.value(), jsInvoker)); - } - if (value.screenPhysicalPixels) { - result.setProperty(rt, "screenPhysicalPixels", bridging::toJs(rt, value.screenPhysicalPixels.value(), jsInvoker)); - } - return result; - } -}; - - - -#pragma mark - NativeDeviceInfoDisplayMetrics - -template -struct NativeDeviceInfoDisplayMetrics { - P0 width; - P1 height; - P2 scale; - P3 fontScale; - bool operator==(const NativeDeviceInfoDisplayMetrics &other) const { - return width == other.width && height == other.height && scale == other.scale && fontScale == other.fontScale; - } -}; - -template -struct NativeDeviceInfoDisplayMetricsBridging { - static T types; - - static T fromJs( - jsi::Runtime &rt, - const jsi::Object &value, - const std::shared_ptr &jsInvoker) { - T result{ - bridging::fromJs(rt, value.getProperty(rt, "width"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "height"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "scale"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "fontScale"), jsInvoker)}; - return result; - } - -#ifdef DEBUG - static double widthToJs(jsi::Runtime &rt, decltype(types.width) value) { - return bridging::toJs(rt, value); - } - - static double heightToJs(jsi::Runtime &rt, decltype(types.height) value) { - return bridging::toJs(rt, value); - } - - static double scaleToJs(jsi::Runtime &rt, decltype(types.scale) value) { - return bridging::toJs(rt, value); - } - - static double fontScaleToJs(jsi::Runtime &rt, decltype(types.fontScale) value) { - return bridging::toJs(rt, value); - } -#endif - - static jsi::Object toJs( - jsi::Runtime &rt, - const T &value, - const std::shared_ptr &jsInvoker) { - auto result = facebook::jsi::Object(rt); - result.setProperty(rt, "width", bridging::toJs(rt, value.width, jsInvoker)); - result.setProperty(rt, "height", bridging::toJs(rt, value.height, jsInvoker)); - result.setProperty(rt, "scale", bridging::toJs(rt, value.scale, jsInvoker)); - result.setProperty(rt, "fontScale", bridging::toJs(rt, value.fontScale, jsInvoker)); - return result; - } -}; - - - -#pragma mark - NativeDeviceInfoDisplayMetricsAndroid - -template -struct NativeDeviceInfoDisplayMetricsAndroid { - P0 width; - P1 height; - P2 scale; - P3 fontScale; - P4 densityDpi; - bool operator==(const NativeDeviceInfoDisplayMetricsAndroid &other) const { - return width == other.width && height == other.height && scale == other.scale && fontScale == other.fontScale && densityDpi == other.densityDpi; - } -}; - -template -struct NativeDeviceInfoDisplayMetricsAndroidBridging { - static T types; - - static T fromJs( - jsi::Runtime &rt, - const jsi::Object &value, - const std::shared_ptr &jsInvoker) { - T result{ - bridging::fromJs(rt, value.getProperty(rt, "width"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "height"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "scale"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "fontScale"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "densityDpi"), jsInvoker)}; - return result; - } - -#ifdef DEBUG - static double widthToJs(jsi::Runtime &rt, decltype(types.width) value) { - return bridging::toJs(rt, value); - } - - static double heightToJs(jsi::Runtime &rt, decltype(types.height) value) { - return bridging::toJs(rt, value); - } - - static double scaleToJs(jsi::Runtime &rt, decltype(types.scale) value) { - return bridging::toJs(rt, value); - } - - static double fontScaleToJs(jsi::Runtime &rt, decltype(types.fontScale) value) { - return bridging::toJs(rt, value); - } - - static double densityDpiToJs(jsi::Runtime &rt, decltype(types.densityDpi) value) { - return bridging::toJs(rt, value); - } -#endif - - static jsi::Object toJs( - jsi::Runtime &rt, - const T &value, - const std::shared_ptr &jsInvoker) { - auto result = facebook::jsi::Object(rt); - result.setProperty(rt, "width", bridging::toJs(rt, value.width, jsInvoker)); - result.setProperty(rt, "height", bridging::toJs(rt, value.height, jsInvoker)); - result.setProperty(rt, "scale", bridging::toJs(rt, value.scale, jsInvoker)); - result.setProperty(rt, "fontScale", bridging::toJs(rt, value.fontScale, jsInvoker)); - result.setProperty(rt, "densityDpi", bridging::toJs(rt, value.densityDpi, jsInvoker)); - return result; - } -}; - -class JSI_EXPORT NativeDeviceInfoCxxSpecJSI : public TurboModule { -protected: - NativeDeviceInfoCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual jsi::Object getConstants(jsi::Runtime &rt) = 0; - -}; - -template -class JSI_EXPORT NativeDeviceInfoCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "DeviceInfo"; - -protected: - NativeDeviceInfoCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeDeviceInfoCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeDeviceInfoCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeDeviceInfoCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - jsi::Object getConstants(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::getConstants) == 1, - "Expected getConstants(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::getConstants, jsInvoker_, instance_); - } - - private: - friend class NativeDeviceInfoCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - class JSI_EXPORT NativeDevLoadingViewCxxSpecJSI : public TurboModule { -protected: - NativeDevLoadingViewCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual void showMessage(jsi::Runtime &rt, jsi::String message, std::optional withColor, std::optional withBackgroundColor) = 0; - virtual void hide(jsi::Runtime &rt) = 0; - -}; - -template -class JSI_EXPORT NativeDevLoadingViewCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "DevLoadingView"; - -protected: - NativeDevLoadingViewCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeDevLoadingViewCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeDevLoadingViewCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeDevLoadingViewCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - void showMessage(jsi::Runtime &rt, jsi::String message, std::optional withColor, std::optional withBackgroundColor) override { - static_assert( - bridging::getParameterCount(&T::showMessage) == 4, - "Expected showMessage(...) to have 4 parameters"); - - return bridging::callFromJs( - rt, &T::showMessage, jsInvoker_, instance_, std::move(message), std::move(withColor), std::move(withBackgroundColor)); - } - void hide(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::hide) == 1, - "Expected hide(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::hide, jsInvoker_, instance_); - } - - private: - friend class NativeDevLoadingViewCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - class JSI_EXPORT NativeDevSettingsCxxSpecJSI : public TurboModule { -protected: - NativeDevSettingsCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual void reload(jsi::Runtime &rt) = 0; - virtual void reloadWithReason(jsi::Runtime &rt, jsi::String reason) = 0; - virtual void onFastRefresh(jsi::Runtime &rt) = 0; - virtual void setHotLoadingEnabled(jsi::Runtime &rt, bool isHotLoadingEnabled) = 0; - virtual void setProfilingEnabled(jsi::Runtime &rt, bool isProfilingEnabled) = 0; - virtual void toggleElementInspector(jsi::Runtime &rt) = 0; - virtual void addMenuItem(jsi::Runtime &rt, jsi::String title) = 0; - virtual void openDebugger(jsi::Runtime &rt) = 0; - virtual void addListener(jsi::Runtime &rt, jsi::String eventName) = 0; - virtual void removeListeners(jsi::Runtime &rt, double count) = 0; - virtual void setIsShakeToShowDevMenuEnabled(jsi::Runtime &rt, bool enabled) = 0; - -}; - -template -class JSI_EXPORT NativeDevSettingsCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "DevSettings"; - -protected: - NativeDevSettingsCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeDevSettingsCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeDevSettingsCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeDevSettingsCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - void reload(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::reload) == 1, - "Expected reload(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::reload, jsInvoker_, instance_); - } - void reloadWithReason(jsi::Runtime &rt, jsi::String reason) override { - static_assert( - bridging::getParameterCount(&T::reloadWithReason) == 2, - "Expected reloadWithReason(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::reloadWithReason, jsInvoker_, instance_, std::move(reason)); - } - void onFastRefresh(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::onFastRefresh) == 1, - "Expected onFastRefresh(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::onFastRefresh, jsInvoker_, instance_); - } - void setHotLoadingEnabled(jsi::Runtime &rt, bool isHotLoadingEnabled) override { - static_assert( - bridging::getParameterCount(&T::setHotLoadingEnabled) == 2, - "Expected setHotLoadingEnabled(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::setHotLoadingEnabled, jsInvoker_, instance_, std::move(isHotLoadingEnabled)); - } - void setProfilingEnabled(jsi::Runtime &rt, bool isProfilingEnabled) override { - static_assert( - bridging::getParameterCount(&T::setProfilingEnabled) == 2, - "Expected setProfilingEnabled(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::setProfilingEnabled, jsInvoker_, instance_, std::move(isProfilingEnabled)); - } - void toggleElementInspector(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::toggleElementInspector) == 1, - "Expected toggleElementInspector(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::toggleElementInspector, jsInvoker_, instance_); - } - void addMenuItem(jsi::Runtime &rt, jsi::String title) override { - static_assert( - bridging::getParameterCount(&T::addMenuItem) == 2, - "Expected addMenuItem(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::addMenuItem, jsInvoker_, instance_, std::move(title)); - } - void openDebugger(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::openDebugger) == 1, - "Expected openDebugger(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::openDebugger, jsInvoker_, instance_); - } - void addListener(jsi::Runtime &rt, jsi::String eventName) override { - static_assert( - bridging::getParameterCount(&T::addListener) == 2, - "Expected addListener(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::addListener, jsInvoker_, instance_, std::move(eventName)); - } - void removeListeners(jsi::Runtime &rt, double count) override { - static_assert( - bridging::getParameterCount(&T::removeListeners) == 2, - "Expected removeListeners(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::removeListeners, jsInvoker_, instance_, std::move(count)); - } - void setIsShakeToShowDevMenuEnabled(jsi::Runtime &rt, bool enabled) override { - static_assert( - bridging::getParameterCount(&T::setIsShakeToShowDevMenuEnabled) == 2, - "Expected setIsShakeToShowDevMenuEnabled(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::setIsShakeToShowDevMenuEnabled, jsInvoker_, instance_, std::move(enabled)); - } - - private: - friend class NativeDevSettingsCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - -#pragma mark - NativeDialogManagerAndroidDialogOptions - -template -struct NativeDialogManagerAndroidDialogOptions { - P0 title; - P1 message; - P2 buttonPositive; - P3 buttonNegative; - P4 buttonNeutral; - P5 items; - P6 cancelable; - bool operator==(const NativeDialogManagerAndroidDialogOptions &other) const { - return title == other.title && message == other.message && buttonPositive == other.buttonPositive && buttonNegative == other.buttonNegative && buttonNeutral == other.buttonNeutral && items == other.items && cancelable == other.cancelable; - } -}; - -template -struct NativeDialogManagerAndroidDialogOptionsBridging { - static T types; - - static T fromJs( - jsi::Runtime &rt, - const jsi::Object &value, - const std::shared_ptr &jsInvoker) { - T result{ - bridging::fromJs(rt, value.getProperty(rt, "title"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "message"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "buttonPositive"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "buttonNegative"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "buttonNeutral"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "items"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "cancelable"), jsInvoker)}; - return result; - } - -#ifdef DEBUG - static jsi::String titleToJs(jsi::Runtime &rt, decltype(types.title) value) { - return bridging::toJs(rt, value); - } - - static jsi::String messageToJs(jsi::Runtime &rt, decltype(types.message) value) { - return bridging::toJs(rt, value); - } - - static jsi::String buttonPositiveToJs(jsi::Runtime &rt, decltype(types.buttonPositive) value) { - return bridging::toJs(rt, value); - } - - static jsi::String buttonNegativeToJs(jsi::Runtime &rt, decltype(types.buttonNegative) value) { - return bridging::toJs(rt, value); - } - - static jsi::String buttonNeutralToJs(jsi::Runtime &rt, decltype(types.buttonNeutral) value) { - return bridging::toJs(rt, value); - } - - static jsi::Array itemsToJs(jsi::Runtime &rt, decltype(types.items) value) { - return bridging::toJs(rt, value); - } - - static bool cancelableToJs(jsi::Runtime &rt, decltype(types.cancelable) value) { - return bridging::toJs(rt, value); - } -#endif - - static jsi::Object toJs( - jsi::Runtime &rt, - const T &value, - const std::shared_ptr &jsInvoker) { - auto result = facebook::jsi::Object(rt); - if (value.title) { - result.setProperty(rt, "title", bridging::toJs(rt, value.title.value(), jsInvoker)); - } - if (value.message) { - result.setProperty(rt, "message", bridging::toJs(rt, value.message.value(), jsInvoker)); - } - if (value.buttonPositive) { - result.setProperty(rt, "buttonPositive", bridging::toJs(rt, value.buttonPositive.value(), jsInvoker)); - } - if (value.buttonNegative) { - result.setProperty(rt, "buttonNegative", bridging::toJs(rt, value.buttonNegative.value(), jsInvoker)); - } - if (value.buttonNeutral) { - result.setProperty(rt, "buttonNeutral", bridging::toJs(rt, value.buttonNeutral.value(), jsInvoker)); - } - if (value.items) { - result.setProperty(rt, "items", bridging::toJs(rt, value.items.value(), jsInvoker)); - } - if (value.cancelable) { - result.setProperty(rt, "cancelable", bridging::toJs(rt, value.cancelable.value(), jsInvoker)); - } - return result; - } -}; - -class JSI_EXPORT NativeDialogManagerAndroidCxxSpecJSI : public TurboModule { -protected: - NativeDialogManagerAndroidCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual jsi::Object getConstants(jsi::Runtime &rt) = 0; - virtual void showAlert(jsi::Runtime &rt, jsi::Object config, jsi::Function onError, jsi::Function onAction) = 0; - -}; - -template -class JSI_EXPORT NativeDialogManagerAndroidCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "DialogManagerAndroid"; - -protected: - NativeDialogManagerAndroidCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeDialogManagerAndroidCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeDialogManagerAndroidCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeDialogManagerAndroidCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - jsi::Object getConstants(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::getConstants) == 1, - "Expected getConstants(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::getConstants, jsInvoker_, instance_); - } - void showAlert(jsi::Runtime &rt, jsi::Object config, jsi::Function onError, jsi::Function onAction) override { - static_assert( - bridging::getParameterCount(&T::showAlert) == 4, - "Expected showAlert(...) to have 4 parameters"); - - return bridging::callFromJs( - rt, &T::showAlert, jsInvoker_, instance_, std::move(config), std::move(onError), std::move(onAction)); - } - - private: - friend class NativeDialogManagerAndroidCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - -#pragma mark - NativeDialogManagerWindowsDialogOptions - -template -struct NativeDialogManagerWindowsDialogOptions { - P0 title; - P1 message; - P2 buttonPositive; - P3 buttonNegative; - P4 buttonNeutral; - P5 items; - P6 cancelable; - P7 defaultButton; - P8 rootTag; - bool operator==(const NativeDialogManagerWindowsDialogOptions &other) const { - return title == other.title && message == other.message && buttonPositive == other.buttonPositive && buttonNegative == other.buttonNegative && buttonNeutral == other.buttonNeutral && items == other.items && cancelable == other.cancelable && defaultButton == other.defaultButton && rootTag == other.rootTag; - } -}; - -template -struct NativeDialogManagerWindowsDialogOptionsBridging { - static T types; - - static T fromJs( - jsi::Runtime &rt, - const jsi::Object &value, - const std::shared_ptr &jsInvoker) { - T result{ - bridging::fromJs(rt, value.getProperty(rt, "title"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "message"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "buttonPositive"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "buttonNegative"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "buttonNeutral"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "items"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "cancelable"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "defaultButton"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "rootTag"), jsInvoker)}; - return result; - } - -#ifdef DEBUG - static jsi::String titleToJs(jsi::Runtime &rt, decltype(types.title) value) { - return bridging::toJs(rt, value); - } - - static jsi::String messageToJs(jsi::Runtime &rt, decltype(types.message) value) { - return bridging::toJs(rt, value); - } - - static jsi::String buttonPositiveToJs(jsi::Runtime &rt, decltype(types.buttonPositive) value) { - return bridging::toJs(rt, value); - } - - static jsi::String buttonNegativeToJs(jsi::Runtime &rt, decltype(types.buttonNegative) value) { - return bridging::toJs(rt, value); - } - - static jsi::String buttonNeutralToJs(jsi::Runtime &rt, decltype(types.buttonNeutral) value) { - return bridging::toJs(rt, value); - } - - static jsi::Array itemsToJs(jsi::Runtime &rt, decltype(types.items) value) { - return bridging::toJs(rt, value); - } - - static bool cancelableToJs(jsi::Runtime &rt, decltype(types.cancelable) value) { - return bridging::toJs(rt, value); - } - - static int defaultButtonToJs(jsi::Runtime &rt, decltype(types.defaultButton) value) { - return bridging::toJs(rt, value); - } - - static int rootTagToJs(jsi::Runtime &rt, decltype(types.rootTag) value) { - return bridging::toJs(rt, value); - } -#endif - - static jsi::Object toJs( - jsi::Runtime &rt, - const T &value, - const std::shared_ptr &jsInvoker) { - auto result = facebook::jsi::Object(rt); - if (value.title) { - result.setProperty(rt, "title", bridging::toJs(rt, value.title.value(), jsInvoker)); - } - if (value.message) { - result.setProperty(rt, "message", bridging::toJs(rt, value.message.value(), jsInvoker)); - } - if (value.buttonPositive) { - result.setProperty(rt, "buttonPositive", bridging::toJs(rt, value.buttonPositive.value(), jsInvoker)); - } - if (value.buttonNegative) { - result.setProperty(rt, "buttonNegative", bridging::toJs(rt, value.buttonNegative.value(), jsInvoker)); - } - if (value.buttonNeutral) { - result.setProperty(rt, "buttonNeutral", bridging::toJs(rt, value.buttonNeutral.value(), jsInvoker)); - } - if (value.items) { - result.setProperty(rt, "items", bridging::toJs(rt, value.items.value(), jsInvoker)); - } - if (value.cancelable) { - result.setProperty(rt, "cancelable", bridging::toJs(rt, value.cancelable.value(), jsInvoker)); - } - if (value.defaultButton) { - result.setProperty(rt, "defaultButton", bridging::toJs(rt, value.defaultButton.value(), jsInvoker)); - } - if (value.rootTag) { - result.setProperty(rt, "rootTag", bridging::toJs(rt, value.rootTag.value(), jsInvoker)); - } - return result; - } -}; - -class JSI_EXPORT NativeDialogManagerWindowsCxxSpecJSI : public TurboModule { -protected: - NativeDialogManagerWindowsCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual jsi::Object getConstants(jsi::Runtime &rt) = 0; - virtual void showAlert(jsi::Runtime &rt, jsi::Object config, jsi::Function onError, jsi::Function onAction) = 0; - -}; - -template -class JSI_EXPORT NativeDialogManagerWindowsCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "Alert"; - -protected: - NativeDialogManagerWindowsCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeDialogManagerWindowsCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeDialogManagerWindowsCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeDialogManagerWindowsCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - jsi::Object getConstants(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::getConstants) == 1, - "Expected getConstants(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::getConstants, jsInvoker_, instance_); - } - void showAlert(jsi::Runtime &rt, jsi::Object config, jsi::Function onError, jsi::Function onAction) override { - static_assert( - bridging::getParameterCount(&T::showAlert) == 4, - "Expected showAlert(...) to have 4 parameters"); - - return bridging::callFromJs( - rt, &T::showAlert, jsInvoker_, instance_, std::move(config), std::move(onError), std::move(onAction)); - } - - private: - friend class NativeDialogManagerWindowsCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - -#pragma mark - NativeExceptionsManagerExceptionData - -template -struct NativeExceptionsManagerExceptionData { - P0 message; - P1 originalMessage; - P2 name; - P3 componentStack; - P4 stack; - P5 id; - P6 isFatal; - P7 extraData; - bool operator==(const NativeExceptionsManagerExceptionData &other) const { - return message == other.message && originalMessage == other.originalMessage && name == other.name && componentStack == other.componentStack && stack == other.stack && id == other.id && isFatal == other.isFatal && extraData == other.extraData; - } -}; - -template -struct NativeExceptionsManagerExceptionDataBridging { - static T types; - - static T fromJs( - jsi::Runtime &rt, - const jsi::Object &value, - const std::shared_ptr &jsInvoker) { - T result{ - bridging::fromJs(rt, value.getProperty(rt, "message"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "originalMessage"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "name"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "componentStack"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "stack"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "id"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "isFatal"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "extraData"), jsInvoker)}; - return result; - } - -#ifdef DEBUG - static jsi::String messageToJs(jsi::Runtime &rt, decltype(types.message) value) { - return bridging::toJs(rt, value); - } - - static std::optional originalMessageToJs(jsi::Runtime &rt, decltype(types.originalMessage) value) { - return bridging::toJs(rt, value); - } - - static std::optional nameToJs(jsi::Runtime &rt, decltype(types.name) value) { - return bridging::toJs(rt, value); - } - - static std::optional componentStackToJs(jsi::Runtime &rt, decltype(types.componentStack) value) { - return bridging::toJs(rt, value); - } - - static jsi::Array stackToJs(jsi::Runtime &rt, decltype(types.stack) value) { - return bridging::toJs(rt, value); - } - - static double idToJs(jsi::Runtime &rt, decltype(types.id) value) { - return bridging::toJs(rt, value); - } - - static bool isFatalToJs(jsi::Runtime &rt, decltype(types.isFatal) value) { - return bridging::toJs(rt, value); - } - - static jsi::Object extraDataToJs(jsi::Runtime &rt, decltype(types.extraData) value) { - return bridging::toJs(rt, value); - } -#endif - - static jsi::Object toJs( - jsi::Runtime &rt, - const T &value, - const std::shared_ptr &jsInvoker) { - auto result = facebook::jsi::Object(rt); - result.setProperty(rt, "message", bridging::toJs(rt, value.message, jsInvoker)); - result.setProperty(rt, "originalMessage", bridging::toJs(rt, value.originalMessage, jsInvoker)); - result.setProperty(rt, "name", bridging::toJs(rt, value.name, jsInvoker)); - result.setProperty(rt, "componentStack", bridging::toJs(rt, value.componentStack, jsInvoker)); - result.setProperty(rt, "stack", bridging::toJs(rt, value.stack, jsInvoker)); - result.setProperty(rt, "id", bridging::toJs(rt, value.id, jsInvoker)); - result.setProperty(rt, "isFatal", bridging::toJs(rt, value.isFatal, jsInvoker)); - if (value.extraData) { - result.setProperty(rt, "extraData", bridging::toJs(rt, value.extraData.value(), jsInvoker)); - } - return result; - } -}; - - - -#pragma mark - NativeExceptionsManagerStackFrame - -template -struct NativeExceptionsManagerStackFrame { - P0 column; - P1 file; - P2 lineNumber; - P3 methodName; - P4 collapse; - bool operator==(const NativeExceptionsManagerStackFrame &other) const { - return column == other.column && file == other.file && lineNumber == other.lineNumber && methodName == other.methodName && collapse == other.collapse; - } -}; - -template -struct NativeExceptionsManagerStackFrameBridging { - static T types; - - static T fromJs( - jsi::Runtime &rt, - const jsi::Object &value, - const std::shared_ptr &jsInvoker) { - T result{ - bridging::fromJs(rt, value.getProperty(rt, "column"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "file"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "lineNumber"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "methodName"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "collapse"), jsInvoker)}; - return result; - } - -#ifdef DEBUG - static std::optional columnToJs(jsi::Runtime &rt, decltype(types.column) value) { - return bridging::toJs(rt, value); - } - - static std::optional fileToJs(jsi::Runtime &rt, decltype(types.file) value) { - return bridging::toJs(rt, value); - } - - static std::optional lineNumberToJs(jsi::Runtime &rt, decltype(types.lineNumber) value) { - return bridging::toJs(rt, value); - } - - static jsi::String methodNameToJs(jsi::Runtime &rt, decltype(types.methodName) value) { - return bridging::toJs(rt, value); - } - - static bool collapseToJs(jsi::Runtime &rt, decltype(types.collapse) value) { - return bridging::toJs(rt, value); - } -#endif - - static jsi::Object toJs( - jsi::Runtime &rt, - const T &value, - const std::shared_ptr &jsInvoker) { - auto result = facebook::jsi::Object(rt); - result.setProperty(rt, "column", bridging::toJs(rt, value.column, jsInvoker)); - result.setProperty(rt, "file", bridging::toJs(rt, value.file, jsInvoker)); - result.setProperty(rt, "lineNumber", bridging::toJs(rt, value.lineNumber, jsInvoker)); - result.setProperty(rt, "methodName", bridging::toJs(rt, value.methodName, jsInvoker)); - if (value.collapse) { - result.setProperty(rt, "collapse", bridging::toJs(rt, value.collapse.value(), jsInvoker)); - } - return result; - } -}; - -class JSI_EXPORT NativeExceptionsManagerCxxSpecJSI : public TurboModule { -protected: - NativeExceptionsManagerCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual void reportFatalException(jsi::Runtime &rt, jsi::String message, jsi::Array stack, double exceptionId) = 0; - virtual void reportSoftException(jsi::Runtime &rt, jsi::String message, jsi::Array stack, double exceptionId) = 0; - virtual void reportException(jsi::Runtime &rt, jsi::Object data) = 0; - virtual void dismissRedbox(jsi::Runtime &rt) = 0; - -}; - -template -class JSI_EXPORT NativeExceptionsManagerCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "ExceptionsManager"; - -protected: - NativeExceptionsManagerCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeExceptionsManagerCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeExceptionsManagerCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeExceptionsManagerCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - void reportFatalException(jsi::Runtime &rt, jsi::String message, jsi::Array stack, double exceptionId) override { - static_assert( - bridging::getParameterCount(&T::reportFatalException) == 4, - "Expected reportFatalException(...) to have 4 parameters"); - - return bridging::callFromJs( - rt, &T::reportFatalException, jsInvoker_, instance_, std::move(message), std::move(stack), std::move(exceptionId)); - } - void reportSoftException(jsi::Runtime &rt, jsi::String message, jsi::Array stack, double exceptionId) override { - static_assert( - bridging::getParameterCount(&T::reportSoftException) == 4, - "Expected reportSoftException(...) to have 4 parameters"); - - return bridging::callFromJs( - rt, &T::reportSoftException, jsInvoker_, instance_, std::move(message), std::move(stack), std::move(exceptionId)); - } - void reportException(jsi::Runtime &rt, jsi::Object data) override { - static_assert( - bridging::getParameterCount(&T::reportException) == 2, - "Expected reportException(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::reportException, jsInvoker_, instance_, std::move(data)); - } - void dismissRedbox(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::dismissRedbox) == 1, - "Expected dismissRedbox(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::dismissRedbox, jsInvoker_, instance_); - } - - private: - friend class NativeExceptionsManagerCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - class JSI_EXPORT NativeFileReaderModuleCxxSpecJSI : public TurboModule { -protected: - NativeFileReaderModuleCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual jsi::Value readAsDataURL(jsi::Runtime &rt, jsi::Object data) = 0; - virtual jsi::Value readAsText(jsi::Runtime &rt, jsi::Object data, jsi::String encoding) = 0; - -}; - -template -class JSI_EXPORT NativeFileReaderModuleCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "FileReaderModule"; - -protected: - NativeFileReaderModuleCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeFileReaderModuleCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeFileReaderModuleCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeFileReaderModuleCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - jsi::Value readAsDataURL(jsi::Runtime &rt, jsi::Object data) override { - static_assert( - bridging::getParameterCount(&T::readAsDataURL) == 2, - "Expected readAsDataURL(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::readAsDataURL, jsInvoker_, instance_, std::move(data)); - } - jsi::Value readAsText(jsi::Runtime &rt, jsi::Object data, jsi::String encoding) override { - static_assert( - bridging::getParameterCount(&T::readAsText) == 3, - "Expected readAsText(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::readAsText, jsInvoker_, instance_, std::move(data), std::move(encoding)); - } - - private: - friend class NativeFileReaderModuleCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - class JSI_EXPORT NativeFrameRateLoggerCxxSpecJSI : public TurboModule { -protected: - NativeFrameRateLoggerCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual void setGlobalOptions(jsi::Runtime &rt, jsi::Object options) = 0; - virtual void setContext(jsi::Runtime &rt, jsi::String context) = 0; - virtual void beginScroll(jsi::Runtime &rt) = 0; - virtual void endScroll(jsi::Runtime &rt) = 0; - -}; - -template -class JSI_EXPORT NativeFrameRateLoggerCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "FrameRateLogger"; - -protected: - NativeFrameRateLoggerCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeFrameRateLoggerCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeFrameRateLoggerCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeFrameRateLoggerCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - void setGlobalOptions(jsi::Runtime &rt, jsi::Object options) override { - static_assert( - bridging::getParameterCount(&T::setGlobalOptions) == 2, - "Expected setGlobalOptions(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::setGlobalOptions, jsInvoker_, instance_, std::move(options)); - } - void setContext(jsi::Runtime &rt, jsi::String context) override { - static_assert( - bridging::getParameterCount(&T::setContext) == 2, - "Expected setContext(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::setContext, jsInvoker_, instance_, std::move(context)); - } - void beginScroll(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::beginScroll) == 1, - "Expected beginScroll(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::beginScroll, jsInvoker_, instance_); - } - void endScroll(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::endScroll) == 1, - "Expected endScroll(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::endScroll, jsInvoker_, instance_); - } - - private: - friend class NativeFrameRateLoggerCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - class JSI_EXPORT NativeHeadlessJsTaskSupportCxxSpecJSI : public TurboModule { -protected: - NativeHeadlessJsTaskSupportCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual void notifyTaskFinished(jsi::Runtime &rt, double taskId) = 0; - virtual jsi::Value notifyTaskRetry(jsi::Runtime &rt, double taskId) = 0; - -}; - -template -class JSI_EXPORT NativeHeadlessJsTaskSupportCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "HeadlessJsTaskSupport"; - -protected: - NativeHeadlessJsTaskSupportCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeHeadlessJsTaskSupportCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeHeadlessJsTaskSupportCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeHeadlessJsTaskSupportCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - void notifyTaskFinished(jsi::Runtime &rt, double taskId) override { - static_assert( - bridging::getParameterCount(&T::notifyTaskFinished) == 2, - "Expected notifyTaskFinished(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::notifyTaskFinished, jsInvoker_, instance_, std::move(taskId)); - } - jsi::Value notifyTaskRetry(jsi::Runtime &rt, double taskId) override { - static_assert( - bridging::getParameterCount(&T::notifyTaskRetry) == 2, - "Expected notifyTaskRetry(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::notifyTaskRetry, jsInvoker_, instance_, std::move(taskId)); - } - - private: - friend class NativeHeadlessJsTaskSupportCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - -#pragma mark - NativeI18nManagerI18nManagerConstants - -template -struct NativeI18nManagerI18nManagerConstants { - P0 doLeftAndRightSwapInRTL; - P1 isRTL; - P2 localeIdentifier; - bool operator==(const NativeI18nManagerI18nManagerConstants &other) const { - return doLeftAndRightSwapInRTL == other.doLeftAndRightSwapInRTL && isRTL == other.isRTL && localeIdentifier == other.localeIdentifier; - } -}; - -template -struct NativeI18nManagerI18nManagerConstantsBridging { - static T types; - - static T fromJs( - jsi::Runtime &rt, - const jsi::Object &value, - const std::shared_ptr &jsInvoker) { - T result{ - bridging::fromJs(rt, value.getProperty(rt, "doLeftAndRightSwapInRTL"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "isRTL"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "localeIdentifier"), jsInvoker)}; - return result; - } - -#ifdef DEBUG - static bool doLeftAndRightSwapInRTLToJs(jsi::Runtime &rt, decltype(types.doLeftAndRightSwapInRTL) value) { - return bridging::toJs(rt, value); - } - - static bool isRTLToJs(jsi::Runtime &rt, decltype(types.isRTL) value) { - return bridging::toJs(rt, value); - } - - static std::optional localeIdentifierToJs(jsi::Runtime &rt, decltype(types.localeIdentifier) value) { - return bridging::toJs(rt, value); - } -#endif - - static jsi::Object toJs( - jsi::Runtime &rt, - const T &value, - const std::shared_ptr &jsInvoker) { - auto result = facebook::jsi::Object(rt); - result.setProperty(rt, "doLeftAndRightSwapInRTL", bridging::toJs(rt, value.doLeftAndRightSwapInRTL, jsInvoker)); - result.setProperty(rt, "isRTL", bridging::toJs(rt, value.isRTL, jsInvoker)); - if (value.localeIdentifier) { - result.setProperty(rt, "localeIdentifier", bridging::toJs(rt, value.localeIdentifier.value(), jsInvoker)); - } - return result; - } -}; - -class JSI_EXPORT NativeI18nManagerCxxSpecJSI : public TurboModule { -protected: - NativeI18nManagerCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual jsi::Object getConstants(jsi::Runtime &rt) = 0; - virtual void allowRTL(jsi::Runtime &rt, bool allowRTL) = 0; - virtual void forceRTL(jsi::Runtime &rt, bool forceRTL) = 0; - virtual void swapLeftAndRightInRTL(jsi::Runtime &rt, bool flipStyles) = 0; - -}; - -template -class JSI_EXPORT NativeI18nManagerCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "I18nManager"; - -protected: - NativeI18nManagerCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeI18nManagerCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeI18nManagerCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeI18nManagerCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - jsi::Object getConstants(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::getConstants) == 1, - "Expected getConstants(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::getConstants, jsInvoker_, instance_); - } - void allowRTL(jsi::Runtime &rt, bool allowRTL) override { - static_assert( - bridging::getParameterCount(&T::allowRTL) == 2, - "Expected allowRTL(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::allowRTL, jsInvoker_, instance_, std::move(allowRTL)); - } - void forceRTL(jsi::Runtime &rt, bool forceRTL) override { - static_assert( - bridging::getParameterCount(&T::forceRTL) == 2, - "Expected forceRTL(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::forceRTL, jsInvoker_, instance_, std::move(forceRTL)); - } - void swapLeftAndRightInRTL(jsi::Runtime &rt, bool flipStyles) override { - static_assert( - bridging::getParameterCount(&T::swapLeftAndRightInRTL) == 2, - "Expected swapLeftAndRightInRTL(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::swapLeftAndRightInRTL, jsInvoker_, instance_, std::move(flipStyles)); - } - - private: - friend class NativeI18nManagerCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - -#pragma mark - NativeImageEditorOptions - -template -struct NativeImageEditorOptions { - P0 offset; - P1 size; - P2 displaySize; - P3 resizeMode; - P4 allowExternalStorage; - bool operator==(const NativeImageEditorOptions &other) const { - return offset == other.offset && size == other.size && displaySize == other.displaySize && resizeMode == other.resizeMode && allowExternalStorage == other.allowExternalStorage; - } -}; - -template -struct NativeImageEditorOptionsBridging { - static T types; - - static T fromJs( - jsi::Runtime &rt, - const jsi::Object &value, - const std::shared_ptr &jsInvoker) { - T result{ - bridging::fromJs(rt, value.getProperty(rt, "offset"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "size"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "displaySize"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "resizeMode"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "allowExternalStorage"), jsInvoker)}; - return result; - } - -#ifdef DEBUG - static jsi::Object offsetToJs(jsi::Runtime &rt, decltype(types.offset) value) { - return bridging::toJs(rt, value); - } - - static jsi::Object sizeToJs(jsi::Runtime &rt, decltype(types.size) value) { - return bridging::toJs(rt, value); - } - - static std::optional displaySizeToJs(jsi::Runtime &rt, decltype(types.displaySize) value) { - return bridging::toJs(rt, value); - } - - static std::optional resizeModeToJs(jsi::Runtime &rt, decltype(types.resizeMode) value) { - return bridging::toJs(rt, value); - } - - static bool allowExternalStorageToJs(jsi::Runtime &rt, decltype(types.allowExternalStorage) value) { - return bridging::toJs(rt, value); - } -#endif - - static jsi::Object toJs( - jsi::Runtime &rt, - const T &value, - const std::shared_ptr &jsInvoker) { - auto result = facebook::jsi::Object(rt); - result.setProperty(rt, "offset", bridging::toJs(rt, value.offset, jsInvoker)); - result.setProperty(rt, "size", bridging::toJs(rt, value.size, jsInvoker)); - if (value.displaySize) { - result.setProperty(rt, "displaySize", bridging::toJs(rt, value.displaySize.value(), jsInvoker)); - } - if (value.resizeMode) { - result.setProperty(rt, "resizeMode", bridging::toJs(rt, value.resizeMode.value(), jsInvoker)); - } - if (value.allowExternalStorage) { - result.setProperty(rt, "allowExternalStorage", bridging::toJs(rt, value.allowExternalStorage.value(), jsInvoker)); - } - return result; - } -}; - -class JSI_EXPORT NativeImageEditorCxxSpecJSI : public TurboModule { -protected: - NativeImageEditorCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual jsi::Object getConstants(jsi::Runtime &rt) = 0; - virtual void cropImage(jsi::Runtime &rt, jsi::String uri, jsi::Object cropData, jsi::Function successCallback, jsi::Function errorCallback) = 0; - -}; - -template -class JSI_EXPORT NativeImageEditorCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "ImageEditingManager"; - -protected: - NativeImageEditorCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeImageEditorCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeImageEditorCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeImageEditorCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - jsi::Object getConstants(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::getConstants) == 1, - "Expected getConstants(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::getConstants, jsInvoker_, instance_); - } - void cropImage(jsi::Runtime &rt, jsi::String uri, jsi::Object cropData, jsi::Function successCallback, jsi::Function errorCallback) override { - static_assert( - bridging::getParameterCount(&T::cropImage) == 5, - "Expected cropImage(...) to have 5 parameters"); - - return bridging::callFromJs( - rt, &T::cropImage, jsInvoker_, instance_, std::move(uri), std::move(cropData), std::move(successCallback), std::move(errorCallback)); - } - - private: - friend class NativeImageEditorCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - -#pragma mark - NativeImageLoaderAndroidImageSize - -template -struct NativeImageLoaderAndroidImageSize { - P0 width; - P1 height; - bool operator==(const NativeImageLoaderAndroidImageSize &other) const { - return width == other.width && height == other.height; - } -}; - -template -struct NativeImageLoaderAndroidImageSizeBridging { - static T types; - - static T fromJs( - jsi::Runtime &rt, - const jsi::Object &value, - const std::shared_ptr &jsInvoker) { - T result{ - bridging::fromJs(rt, value.getProperty(rt, "width"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "height"), jsInvoker)}; - return result; - } - -#ifdef DEBUG - static double widthToJs(jsi::Runtime &rt, decltype(types.width) value) { - return bridging::toJs(rt, value); - } - - static double heightToJs(jsi::Runtime &rt, decltype(types.height) value) { - return bridging::toJs(rt, value); - } -#endif - - static jsi::Object toJs( - jsi::Runtime &rt, - const T &value, - const std::shared_ptr &jsInvoker) { - auto result = facebook::jsi::Object(rt); - result.setProperty(rt, "width", bridging::toJs(rt, value.width, jsInvoker)); - result.setProperty(rt, "height", bridging::toJs(rt, value.height, jsInvoker)); - return result; - } -}; - -class JSI_EXPORT NativeImageLoaderAndroidCxxSpecJSI : public TurboModule { -protected: - NativeImageLoaderAndroidCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual void abortRequest(jsi::Runtime &rt, double requestId) = 0; - virtual jsi::Object getConstants(jsi::Runtime &rt) = 0; - virtual jsi::Value getSize(jsi::Runtime &rt, jsi::String uri) = 0; - virtual jsi::Value getSizeWithHeaders(jsi::Runtime &rt, jsi::String uri, jsi::Object headers) = 0; - virtual jsi::Value prefetchImage(jsi::Runtime &rt, jsi::String uri, double requestId) = 0; - virtual jsi::Value queryCache(jsi::Runtime &rt, jsi::Array uris) = 0; - -}; - -template -class JSI_EXPORT NativeImageLoaderAndroidCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "ImageLoader"; - -protected: - NativeImageLoaderAndroidCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeImageLoaderAndroidCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeImageLoaderAndroidCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeImageLoaderAndroidCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - void abortRequest(jsi::Runtime &rt, double requestId) override { - static_assert( - bridging::getParameterCount(&T::abortRequest) == 2, - "Expected abortRequest(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::abortRequest, jsInvoker_, instance_, std::move(requestId)); - } - jsi::Object getConstants(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::getConstants) == 1, - "Expected getConstants(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::getConstants, jsInvoker_, instance_); - } - jsi::Value getSize(jsi::Runtime &rt, jsi::String uri) override { - static_assert( - bridging::getParameterCount(&T::getSize) == 2, - "Expected getSize(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::getSize, jsInvoker_, instance_, std::move(uri)); - } - jsi::Value getSizeWithHeaders(jsi::Runtime &rt, jsi::String uri, jsi::Object headers) override { - static_assert( - bridging::getParameterCount(&T::getSizeWithHeaders) == 3, - "Expected getSizeWithHeaders(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::getSizeWithHeaders, jsInvoker_, instance_, std::move(uri), std::move(headers)); - } - jsi::Value prefetchImage(jsi::Runtime &rt, jsi::String uri, double requestId) override { - static_assert( - bridging::getParameterCount(&T::prefetchImage) == 3, - "Expected prefetchImage(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::prefetchImage, jsInvoker_, instance_, std::move(uri), std::move(requestId)); - } - jsi::Value queryCache(jsi::Runtime &rt, jsi::Array uris) override { - static_assert( - bridging::getParameterCount(&T::queryCache) == 2, - "Expected queryCache(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::queryCache, jsInvoker_, instance_, std::move(uris)); - } - - private: - friend class NativeImageLoaderAndroidCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - class JSI_EXPORT NativeImageLoaderIOSCxxSpecJSI : public TurboModule { -protected: - NativeImageLoaderIOSCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual jsi::Object getConstants(jsi::Runtime &rt) = 0; - virtual jsi::Value getSize(jsi::Runtime &rt, jsi::String uri) = 0; - virtual jsi::Value getSizeWithHeaders(jsi::Runtime &rt, jsi::String uri, jsi::Object headers) = 0; - virtual jsi::Value prefetchImage(jsi::Runtime &rt, jsi::String uri) = 0; - virtual jsi::Value prefetchImageWithMetadata(jsi::Runtime &rt, jsi::String uri, jsi::String queryRootName, double rootTag) = 0; - virtual jsi::Value queryCache(jsi::Runtime &rt, jsi::Array uris) = 0; - -}; - -template -class JSI_EXPORT NativeImageLoaderIOSCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "ImageLoader"; - -protected: - NativeImageLoaderIOSCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeImageLoaderIOSCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeImageLoaderIOSCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeImageLoaderIOSCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - jsi::Object getConstants(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::getConstants) == 1, - "Expected getConstants(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::getConstants, jsInvoker_, instance_); - } - jsi::Value getSize(jsi::Runtime &rt, jsi::String uri) override { - static_assert( - bridging::getParameterCount(&T::getSize) == 2, - "Expected getSize(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::getSize, jsInvoker_, instance_, std::move(uri)); - } - jsi::Value getSizeWithHeaders(jsi::Runtime &rt, jsi::String uri, jsi::Object headers) override { - static_assert( - bridging::getParameterCount(&T::getSizeWithHeaders) == 3, - "Expected getSizeWithHeaders(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::getSizeWithHeaders, jsInvoker_, instance_, std::move(uri), std::move(headers)); - } - jsi::Value prefetchImage(jsi::Runtime &rt, jsi::String uri) override { - static_assert( - bridging::getParameterCount(&T::prefetchImage) == 2, - "Expected prefetchImage(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::prefetchImage, jsInvoker_, instance_, std::move(uri)); - } - jsi::Value prefetchImageWithMetadata(jsi::Runtime &rt, jsi::String uri, jsi::String queryRootName, double rootTag) override { - static_assert( - bridging::getParameterCount(&T::prefetchImageWithMetadata) == 4, - "Expected prefetchImageWithMetadata(...) to have 4 parameters"); - - return bridging::callFromJs( - rt, &T::prefetchImageWithMetadata, jsInvoker_, instance_, std::move(uri), std::move(queryRootName), std::move(rootTag)); - } - jsi::Value queryCache(jsi::Runtime &rt, jsi::Array uris) override { - static_assert( - bridging::getParameterCount(&T::queryCache) == 2, - "Expected queryCache(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::queryCache, jsInvoker_, instance_, std::move(uris)); - } - - private: - friend class NativeImageLoaderIOSCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - class JSI_EXPORT NativeImageStoreAndroidCxxSpecJSI : public TurboModule { -protected: - NativeImageStoreAndroidCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual jsi::Object getConstants(jsi::Runtime &rt) = 0; - virtual void getBase64ForTag(jsi::Runtime &rt, jsi::String uri, jsi::Function successCallback, jsi::Function errorCallback) = 0; - -}; - -template -class JSI_EXPORT NativeImageStoreAndroidCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "ImageStoreManager"; - -protected: - NativeImageStoreAndroidCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeImageStoreAndroidCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeImageStoreAndroidCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeImageStoreAndroidCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - jsi::Object getConstants(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::getConstants) == 1, - "Expected getConstants(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::getConstants, jsInvoker_, instance_); - } - void getBase64ForTag(jsi::Runtime &rt, jsi::String uri, jsi::Function successCallback, jsi::Function errorCallback) override { - static_assert( - bridging::getParameterCount(&T::getBase64ForTag) == 4, - "Expected getBase64ForTag(...) to have 4 parameters"); - - return bridging::callFromJs( - rt, &T::getBase64ForTag, jsInvoker_, instance_, std::move(uri), std::move(successCallback), std::move(errorCallback)); - } - - private: - friend class NativeImageStoreAndroidCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - class JSI_EXPORT NativeImageStoreIOSCxxSpecJSI : public TurboModule { -protected: - NativeImageStoreIOSCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual jsi::Object getConstants(jsi::Runtime &rt) = 0; - virtual void getBase64ForTag(jsi::Runtime &rt, jsi::String uri, jsi::Function successCallback, jsi::Function errorCallback) = 0; - virtual void hasImageForTag(jsi::Runtime &rt, jsi::String uri, jsi::Function callback) = 0; - virtual void removeImageForTag(jsi::Runtime &rt, jsi::String uri) = 0; - virtual void addImageFromBase64(jsi::Runtime &rt, jsi::String base64ImageData, jsi::Function successCallback, jsi::Function errorCallback) = 0; - -}; - -template -class JSI_EXPORT NativeImageStoreIOSCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "ImageStoreManager"; - -protected: - NativeImageStoreIOSCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeImageStoreIOSCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeImageStoreIOSCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeImageStoreIOSCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - jsi::Object getConstants(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::getConstants) == 1, - "Expected getConstants(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::getConstants, jsInvoker_, instance_); - } - void getBase64ForTag(jsi::Runtime &rt, jsi::String uri, jsi::Function successCallback, jsi::Function errorCallback) override { - static_assert( - bridging::getParameterCount(&T::getBase64ForTag) == 4, - "Expected getBase64ForTag(...) to have 4 parameters"); - - return bridging::callFromJs( - rt, &T::getBase64ForTag, jsInvoker_, instance_, std::move(uri), std::move(successCallback), std::move(errorCallback)); - } - void hasImageForTag(jsi::Runtime &rt, jsi::String uri, jsi::Function callback) override { - static_assert( - bridging::getParameterCount(&T::hasImageForTag) == 3, - "Expected hasImageForTag(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::hasImageForTag, jsInvoker_, instance_, std::move(uri), std::move(callback)); - } - void removeImageForTag(jsi::Runtime &rt, jsi::String uri) override { - static_assert( - bridging::getParameterCount(&T::removeImageForTag) == 2, - "Expected removeImageForTag(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::removeImageForTag, jsInvoker_, instance_, std::move(uri)); - } - void addImageFromBase64(jsi::Runtime &rt, jsi::String base64ImageData, jsi::Function successCallback, jsi::Function errorCallback) override { - static_assert( - bridging::getParameterCount(&T::addImageFromBase64) == 4, - "Expected addImageFromBase64(...) to have 4 parameters"); - - return bridging::callFromJs( - rt, &T::addImageFromBase64, jsInvoker_, instance_, std::move(base64ImageData), std::move(successCallback), std::move(errorCallback)); - } - - private: - friend class NativeImageStoreIOSCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - class JSI_EXPORT NativeIntentAndroidCxxSpecJSI : public TurboModule { -protected: - NativeIntentAndroidCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual jsi::Value getInitialURL(jsi::Runtime &rt) = 0; - virtual jsi::Value canOpenURL(jsi::Runtime &rt, jsi::String url) = 0; - virtual jsi::Value openURL(jsi::Runtime &rt, jsi::String url) = 0; - virtual jsi::Value openSettings(jsi::Runtime &rt) = 0; - virtual jsi::Value sendIntent(jsi::Runtime &rt, jsi::String action, std::optional extras) = 0; - -}; - -template -class JSI_EXPORT NativeIntentAndroidCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "IntentAndroid"; - -protected: - NativeIntentAndroidCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeIntentAndroidCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeIntentAndroidCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeIntentAndroidCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - jsi::Value getInitialURL(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::getInitialURL) == 1, - "Expected getInitialURL(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::getInitialURL, jsInvoker_, instance_); - } - jsi::Value canOpenURL(jsi::Runtime &rt, jsi::String url) override { - static_assert( - bridging::getParameterCount(&T::canOpenURL) == 2, - "Expected canOpenURL(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::canOpenURL, jsInvoker_, instance_, std::move(url)); - } - jsi::Value openURL(jsi::Runtime &rt, jsi::String url) override { - static_assert( - bridging::getParameterCount(&T::openURL) == 2, - "Expected openURL(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::openURL, jsInvoker_, instance_, std::move(url)); - } - jsi::Value openSettings(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::openSettings) == 1, - "Expected openSettings(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::openSettings, jsInvoker_, instance_); - } - jsi::Value sendIntent(jsi::Runtime &rt, jsi::String action, std::optional extras) override { - static_assert( - bridging::getParameterCount(&T::sendIntent) == 3, - "Expected sendIntent(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::sendIntent, jsInvoker_, instance_, std::move(action), std::move(extras)); - } - - private: - friend class NativeIntentAndroidCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - class JSI_EXPORT NativeJSCHeapCaptureCxxSpecJSI : public TurboModule { -protected: - NativeJSCHeapCaptureCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual void captureComplete(jsi::Runtime &rt, jsi::String path, std::optional error) = 0; - -}; - -template -class JSI_EXPORT NativeJSCHeapCaptureCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "JSCHeapCapture"; - -protected: - NativeJSCHeapCaptureCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeJSCHeapCaptureCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeJSCHeapCaptureCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeJSCHeapCaptureCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - void captureComplete(jsi::Runtime &rt, jsi::String path, std::optional error) override { - static_assert( - bridging::getParameterCount(&T::captureComplete) == 3, - "Expected captureComplete(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::captureComplete, jsInvoker_, instance_, std::move(path), std::move(error)); - } - - private: - friend class NativeJSCHeapCaptureCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - class JSI_EXPORT NativeKeyboardObserverCxxSpecJSI : public TurboModule { -protected: - NativeKeyboardObserverCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual void addListener(jsi::Runtime &rt, jsi::String eventName) = 0; - virtual void removeListeners(jsi::Runtime &rt, double count) = 0; - -}; - -template -class JSI_EXPORT NativeKeyboardObserverCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "KeyboardObserver"; - -protected: - NativeKeyboardObserverCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeKeyboardObserverCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeKeyboardObserverCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeKeyboardObserverCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - void addListener(jsi::Runtime &rt, jsi::String eventName) override { - static_assert( - bridging::getParameterCount(&T::addListener) == 2, - "Expected addListener(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::addListener, jsInvoker_, instance_, std::move(eventName)); - } - void removeListeners(jsi::Runtime &rt, double count) override { - static_assert( - bridging::getParameterCount(&T::removeListeners) == 2, - "Expected removeListeners(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::removeListeners, jsInvoker_, instance_, std::move(count)); - } - - private: - friend class NativeKeyboardObserverCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - class JSI_EXPORT NativeLinkingManagerCxxSpecJSI : public TurboModule { -protected: - NativeLinkingManagerCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual jsi::Value getInitialURL(jsi::Runtime &rt) = 0; - virtual jsi::Value canOpenURL(jsi::Runtime &rt, jsi::String url) = 0; - virtual jsi::Value openURL(jsi::Runtime &rt, jsi::String url) = 0; - virtual jsi::Value openSettings(jsi::Runtime &rt) = 0; - virtual void addListener(jsi::Runtime &rt, jsi::String eventName) = 0; - virtual void removeListeners(jsi::Runtime &rt, double count) = 0; - -}; - -template -class JSI_EXPORT NativeLinkingManagerCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "LinkingManager"; - -protected: - NativeLinkingManagerCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeLinkingManagerCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeLinkingManagerCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeLinkingManagerCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - jsi::Value getInitialURL(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::getInitialURL) == 1, - "Expected getInitialURL(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::getInitialURL, jsInvoker_, instance_); - } - jsi::Value canOpenURL(jsi::Runtime &rt, jsi::String url) override { - static_assert( - bridging::getParameterCount(&T::canOpenURL) == 2, - "Expected canOpenURL(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::canOpenURL, jsInvoker_, instance_, std::move(url)); - } - jsi::Value openURL(jsi::Runtime &rt, jsi::String url) override { - static_assert( - bridging::getParameterCount(&T::openURL) == 2, - "Expected openURL(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::openURL, jsInvoker_, instance_, std::move(url)); - } - jsi::Value openSettings(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::openSettings) == 1, - "Expected openSettings(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::openSettings, jsInvoker_, instance_); - } - void addListener(jsi::Runtime &rt, jsi::String eventName) override { - static_assert( - bridging::getParameterCount(&T::addListener) == 2, - "Expected addListener(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::addListener, jsInvoker_, instance_, std::move(eventName)); - } - void removeListeners(jsi::Runtime &rt, double count) override { - static_assert( - bridging::getParameterCount(&T::removeListeners) == 2, - "Expected removeListeners(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::removeListeners, jsInvoker_, instance_, std::move(count)); - } - - private: - friend class NativeLinkingManagerCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - class JSI_EXPORT NativeLogBoxCxxSpecJSI : public TurboModule { -protected: - NativeLogBoxCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual void show(jsi::Runtime &rt) = 0; - virtual void hide(jsi::Runtime &rt) = 0; - -}; - -template -class JSI_EXPORT NativeLogBoxCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "LogBox"; - -protected: - NativeLogBoxCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeLogBoxCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeLogBoxCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeLogBoxCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - void show(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::show) == 1, - "Expected show(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::show, jsInvoker_, instance_); - } - void hide(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::hide) == 1, - "Expected hide(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::hide, jsInvoker_, instance_); - } - - private: - friend class NativeLogBoxCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - class JSI_EXPORT NativeModalManagerCxxSpecJSI : public TurboModule { -protected: - NativeModalManagerCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual void addListener(jsi::Runtime &rt, jsi::String eventName) = 0; - virtual void removeListeners(jsi::Runtime &rt, double count) = 0; - -}; - -template -class JSI_EXPORT NativeModalManagerCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "ModalManager"; - -protected: - NativeModalManagerCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeModalManagerCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeModalManagerCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeModalManagerCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - void addListener(jsi::Runtime &rt, jsi::String eventName) override { - static_assert( - bridging::getParameterCount(&T::addListener) == 2, - "Expected addListener(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::addListener, jsInvoker_, instance_, std::move(eventName)); - } - void removeListeners(jsi::Runtime &rt, double count) override { - static_assert( - bridging::getParameterCount(&T::removeListeners) == 2, - "Expected removeListeners(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::removeListeners, jsInvoker_, instance_, std::move(count)); - } - - private: - friend class NativeModalManagerCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - class JSI_EXPORT NativeNetworkingAndroidCxxSpecJSI : public TurboModule { -protected: - NativeNetworkingAndroidCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual void sendRequest(jsi::Runtime &rt, jsi::String method, jsi::String url, double requestId, jsi::Array headers, jsi::Object data, jsi::String responseType, bool useIncrementalUpdates, double timeout, bool withCredentials) = 0; - virtual void abortRequest(jsi::Runtime &rt, double requestId) = 0; - virtual void clearCookies(jsi::Runtime &rt, jsi::Function callback) = 0; - virtual void addListener(jsi::Runtime &rt, jsi::String eventName) = 0; - virtual void removeListeners(jsi::Runtime &rt, double count) = 0; - -}; - -template -class JSI_EXPORT NativeNetworkingAndroidCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "Networking"; - -protected: - NativeNetworkingAndroidCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeNetworkingAndroidCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeNetworkingAndroidCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeNetworkingAndroidCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - void sendRequest(jsi::Runtime &rt, jsi::String method, jsi::String url, double requestId, jsi::Array headers, jsi::Object data, jsi::String responseType, bool useIncrementalUpdates, double timeout, bool withCredentials) override { - static_assert( - bridging::getParameterCount(&T::sendRequest) == 10, - "Expected sendRequest(...) to have 10 parameters"); - - return bridging::callFromJs( - rt, &T::sendRequest, jsInvoker_, instance_, std::move(method), std::move(url), std::move(requestId), std::move(headers), std::move(data), std::move(responseType), std::move(useIncrementalUpdates), std::move(timeout), std::move(withCredentials)); - } - void abortRequest(jsi::Runtime &rt, double requestId) override { - static_assert( - bridging::getParameterCount(&T::abortRequest) == 2, - "Expected abortRequest(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::abortRequest, jsInvoker_, instance_, std::move(requestId)); - } - void clearCookies(jsi::Runtime &rt, jsi::Function callback) override { - static_assert( - bridging::getParameterCount(&T::clearCookies) == 2, - "Expected clearCookies(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::clearCookies, jsInvoker_, instance_, std::move(callback)); - } - void addListener(jsi::Runtime &rt, jsi::String eventName) override { - static_assert( - bridging::getParameterCount(&T::addListener) == 2, - "Expected addListener(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::addListener, jsInvoker_, instance_, std::move(eventName)); - } - void removeListeners(jsi::Runtime &rt, double count) override { - static_assert( - bridging::getParameterCount(&T::removeListeners) == 2, - "Expected removeListeners(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::removeListeners, jsInvoker_, instance_, std::move(count)); - } - - private: - friend class NativeNetworkingAndroidCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - class JSI_EXPORT NativeNetworkingIOSCxxSpecJSI : public TurboModule { -protected: - NativeNetworkingIOSCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual void sendRequest(jsi::Runtime &rt, jsi::Object query, jsi::Function callback) = 0; - virtual void abortRequest(jsi::Runtime &rt, double requestId) = 0; - virtual void clearCookies(jsi::Runtime &rt, jsi::Function callback) = 0; - virtual void addListener(jsi::Runtime &rt, jsi::String eventName) = 0; - virtual void removeListeners(jsi::Runtime &rt, double count) = 0; - -}; - -template -class JSI_EXPORT NativeNetworkingIOSCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "Networking"; - -protected: - NativeNetworkingIOSCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeNetworkingIOSCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeNetworkingIOSCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeNetworkingIOSCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - void sendRequest(jsi::Runtime &rt, jsi::Object query, jsi::Function callback) override { - static_assert( - bridging::getParameterCount(&T::sendRequest) == 3, - "Expected sendRequest(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::sendRequest, jsInvoker_, instance_, std::move(query), std::move(callback)); - } - void abortRequest(jsi::Runtime &rt, double requestId) override { - static_assert( - bridging::getParameterCount(&T::abortRequest) == 2, - "Expected abortRequest(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::abortRequest, jsInvoker_, instance_, std::move(requestId)); - } - void clearCookies(jsi::Runtime &rt, jsi::Function callback) override { - static_assert( - bridging::getParameterCount(&T::clearCookies) == 2, - "Expected clearCookies(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::clearCookies, jsInvoker_, instance_, std::move(callback)); - } - void addListener(jsi::Runtime &rt, jsi::String eventName) override { - static_assert( - bridging::getParameterCount(&T::addListener) == 2, - "Expected addListener(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::addListener, jsInvoker_, instance_, std::move(eventName)); - } - void removeListeners(jsi::Runtime &rt, double count) override { - static_assert( - bridging::getParameterCount(&T::removeListeners) == 2, - "Expected removeListeners(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::removeListeners, jsInvoker_, instance_, std::move(count)); - } - - private: - friend class NativeNetworkingIOSCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - class JSI_EXPORT NativePermissionsAndroidCxxSpecJSI : public TurboModule { -protected: - NativePermissionsAndroidCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual jsi::Value checkPermission(jsi::Runtime &rt, jsi::String permission) = 0; - virtual jsi::Value requestPermission(jsi::Runtime &rt, jsi::String permission) = 0; - virtual jsi::Value shouldShowRequestPermissionRationale(jsi::Runtime &rt, jsi::String permission) = 0; - virtual jsi::Value requestMultiplePermissions(jsi::Runtime &rt, jsi::Array permissions) = 0; - -}; - -template -class JSI_EXPORT NativePermissionsAndroidCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "PermissionsAndroid"; - -protected: - NativePermissionsAndroidCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativePermissionsAndroidCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativePermissionsAndroidCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativePermissionsAndroidCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - jsi::Value checkPermission(jsi::Runtime &rt, jsi::String permission) override { - static_assert( - bridging::getParameterCount(&T::checkPermission) == 2, - "Expected checkPermission(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::checkPermission, jsInvoker_, instance_, std::move(permission)); - } - jsi::Value requestPermission(jsi::Runtime &rt, jsi::String permission) override { - static_assert( - bridging::getParameterCount(&T::requestPermission) == 2, - "Expected requestPermission(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::requestPermission, jsInvoker_, instance_, std::move(permission)); - } - jsi::Value shouldShowRequestPermissionRationale(jsi::Runtime &rt, jsi::String permission) override { - static_assert( - bridging::getParameterCount(&T::shouldShowRequestPermissionRationale) == 2, - "Expected shouldShowRequestPermissionRationale(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::shouldShowRequestPermissionRationale, jsInvoker_, instance_, std::move(permission)); - } - jsi::Value requestMultiplePermissions(jsi::Runtime &rt, jsi::Array permissions) override { - static_assert( - bridging::getParameterCount(&T::requestMultiplePermissions) == 2, - "Expected requestMultiplePermissions(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::requestMultiplePermissions, jsInvoker_, instance_, std::move(permissions)); - } - - private: - friend class NativePermissionsAndroidCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - -#pragma mark - NativePlatformConstantsAndroidPlatformConstantsAndroid - -template -struct NativePlatformConstantsAndroidPlatformConstantsAndroid { - P0 isTesting; - P1 isDisableAnimations; - P2 reactNativeVersion; - P3 Version; - P4 Release; - P5 Serial; - P6 Fingerprint; - P7 Model; - P8 ServerHost; - P9 uiMode; - P10 Brand; - P11 Manufacturer; - bool operator==(const NativePlatformConstantsAndroidPlatformConstantsAndroid &other) const { - return isTesting == other.isTesting && isDisableAnimations == other.isDisableAnimations && reactNativeVersion == other.reactNativeVersion && Version == other.Version && Release == other.Release && Serial == other.Serial && Fingerprint == other.Fingerprint && Model == other.Model && ServerHost == other.ServerHost && uiMode == other.uiMode && Brand == other.Brand && Manufacturer == other.Manufacturer; - } -}; - -template -struct NativePlatformConstantsAndroidPlatformConstantsAndroidBridging { - static T types; - - static T fromJs( - jsi::Runtime &rt, - const jsi::Object &value, - const std::shared_ptr &jsInvoker) { - T result{ - bridging::fromJs(rt, value.getProperty(rt, "isTesting"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "isDisableAnimations"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "reactNativeVersion"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "Version"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "Release"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "Serial"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "Fingerprint"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "Model"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "ServerHost"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "uiMode"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "Brand"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "Manufacturer"), jsInvoker)}; - return result; - } - -#ifdef DEBUG - static bool isTestingToJs(jsi::Runtime &rt, decltype(types.isTesting) value) { - return bridging::toJs(rt, value); - } - - static bool isDisableAnimationsToJs(jsi::Runtime &rt, decltype(types.isDisableAnimations) value) { - return bridging::toJs(rt, value); - } - - static jsi::Object reactNativeVersionToJs(jsi::Runtime &rt, decltype(types.reactNativeVersion) value) { - return bridging::toJs(rt, value); - } - - static double VersionToJs(jsi::Runtime &rt, decltype(types.Version) value) { - return bridging::toJs(rt, value); - } - - static jsi::String ReleaseToJs(jsi::Runtime &rt, decltype(types.Release) value) { - return bridging::toJs(rt, value); - } - - static jsi::String SerialToJs(jsi::Runtime &rt, decltype(types.Serial) value) { - return bridging::toJs(rt, value); - } - - static jsi::String FingerprintToJs(jsi::Runtime &rt, decltype(types.Fingerprint) value) { - return bridging::toJs(rt, value); - } - - static jsi::String ModelToJs(jsi::Runtime &rt, decltype(types.Model) value) { - return bridging::toJs(rt, value); - } - - static jsi::String ServerHostToJs(jsi::Runtime &rt, decltype(types.ServerHost) value) { - return bridging::toJs(rt, value); - } - - static jsi::String uiModeToJs(jsi::Runtime &rt, decltype(types.uiMode) value) { - return bridging::toJs(rt, value); - } - - static jsi::String BrandToJs(jsi::Runtime &rt, decltype(types.Brand) value) { - return bridging::toJs(rt, value); - } - - static jsi::String ManufacturerToJs(jsi::Runtime &rt, decltype(types.Manufacturer) value) { - return bridging::toJs(rt, value); - } -#endif - - static jsi::Object toJs( - jsi::Runtime &rt, - const T &value, - const std::shared_ptr &jsInvoker) { - auto result = facebook::jsi::Object(rt); - result.setProperty(rt, "isTesting", bridging::toJs(rt, value.isTesting, jsInvoker)); - if (value.isDisableAnimations) { - result.setProperty(rt, "isDisableAnimations", bridging::toJs(rt, value.isDisableAnimations.value(), jsInvoker)); - } - result.setProperty(rt, "reactNativeVersion", bridging::toJs(rt, value.reactNativeVersion, jsInvoker)); - result.setProperty(rt, "Version", bridging::toJs(rt, value.Version, jsInvoker)); - result.setProperty(rt, "Release", bridging::toJs(rt, value.Release, jsInvoker)); - result.setProperty(rt, "Serial", bridging::toJs(rt, value.Serial, jsInvoker)); - result.setProperty(rt, "Fingerprint", bridging::toJs(rt, value.Fingerprint, jsInvoker)); - result.setProperty(rt, "Model", bridging::toJs(rt, value.Model, jsInvoker)); - if (value.ServerHost) { - result.setProperty(rt, "ServerHost", bridging::toJs(rt, value.ServerHost.value(), jsInvoker)); - } - result.setProperty(rt, "uiMode", bridging::toJs(rt, value.uiMode, jsInvoker)); - result.setProperty(rt, "Brand", bridging::toJs(rt, value.Brand, jsInvoker)); - result.setProperty(rt, "Manufacturer", bridging::toJs(rt, value.Manufacturer, jsInvoker)); - return result; - } -}; - - - -#pragma mark - NativePlatformConstantsAndroidReactNativeVersionAndroid - -template -struct NativePlatformConstantsAndroidReactNativeVersionAndroid { - P0 major; - P1 minor; - P2 patch; - P3 prerelease; - bool operator==(const NativePlatformConstantsAndroidReactNativeVersionAndroid &other) const { - return major == other.major && minor == other.minor && patch == other.patch && prerelease == other.prerelease; - } -}; - -template -struct NativePlatformConstantsAndroidReactNativeVersionAndroidBridging { - static T types; - - static T fromJs( - jsi::Runtime &rt, - const jsi::Object &value, - const std::shared_ptr &jsInvoker) { - T result{ - bridging::fromJs(rt, value.getProperty(rt, "major"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "minor"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "patch"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "prerelease"), jsInvoker)}; - return result; - } - -#ifdef DEBUG - static double majorToJs(jsi::Runtime &rt, decltype(types.major) value) { - return bridging::toJs(rt, value); - } - - static double minorToJs(jsi::Runtime &rt, decltype(types.minor) value) { - return bridging::toJs(rt, value); - } - - static double patchToJs(jsi::Runtime &rt, decltype(types.patch) value) { - return bridging::toJs(rt, value); - } - - static std::optional prereleaseToJs(jsi::Runtime &rt, decltype(types.prerelease) value) { - return bridging::toJs(rt, value); - } -#endif - - static jsi::Object toJs( - jsi::Runtime &rt, - const T &value, - const std::shared_ptr &jsInvoker) { - auto result = facebook::jsi::Object(rt); - result.setProperty(rt, "major", bridging::toJs(rt, value.major, jsInvoker)); - result.setProperty(rt, "minor", bridging::toJs(rt, value.minor, jsInvoker)); - result.setProperty(rt, "patch", bridging::toJs(rt, value.patch, jsInvoker)); - result.setProperty(rt, "prerelease", bridging::toJs(rt, value.prerelease, jsInvoker)); - return result; - } -}; - -class JSI_EXPORT NativePlatformConstantsAndroidCxxSpecJSI : public TurboModule { -protected: - NativePlatformConstantsAndroidCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual jsi::Object getConstants(jsi::Runtime &rt) = 0; - virtual jsi::String getAndroidID(jsi::Runtime &rt) = 0; - -}; - -template -class JSI_EXPORT NativePlatformConstantsAndroidCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "PlatformConstants"; - -protected: - NativePlatformConstantsAndroidCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativePlatformConstantsAndroidCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativePlatformConstantsAndroidCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativePlatformConstantsAndroidCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - jsi::Object getConstants(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::getConstants) == 1, - "Expected getConstants(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::getConstants, jsInvoker_, instance_); - } - jsi::String getAndroidID(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::getAndroidID) == 1, - "Expected getAndroidID(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::getAndroidID, jsInvoker_, instance_); - } - - private: - friend class NativePlatformConstantsAndroidCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - -#pragma mark - NativePlatformConstantsIOSPlatformConstantsIOS - -template -struct NativePlatformConstantsIOSPlatformConstantsIOS { - P0 isTesting; - P1 isDisableAnimations; - P2 reactNativeVersion; - P3 forceTouchAvailable; - P4 osVersion; - P5 systemName; - P6 interfaceIdiom; - P7 isMacCatalyst; - bool operator==(const NativePlatformConstantsIOSPlatformConstantsIOS &other) const { - return isTesting == other.isTesting && isDisableAnimations == other.isDisableAnimations && reactNativeVersion == other.reactNativeVersion && forceTouchAvailable == other.forceTouchAvailable && osVersion == other.osVersion && systemName == other.systemName && interfaceIdiom == other.interfaceIdiom && isMacCatalyst == other.isMacCatalyst; - } -}; - -template -struct NativePlatformConstantsIOSPlatformConstantsIOSBridging { - static T types; - - static T fromJs( - jsi::Runtime &rt, - const jsi::Object &value, - const std::shared_ptr &jsInvoker) { - T result{ - bridging::fromJs(rt, value.getProperty(rt, "isTesting"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "isDisableAnimations"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "reactNativeVersion"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "forceTouchAvailable"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "osVersion"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "systemName"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "interfaceIdiom"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "isMacCatalyst"), jsInvoker)}; - return result; - } - -#ifdef DEBUG - static bool isTestingToJs(jsi::Runtime &rt, decltype(types.isTesting) value) { - return bridging::toJs(rt, value); - } - - static bool isDisableAnimationsToJs(jsi::Runtime &rt, decltype(types.isDisableAnimations) value) { - return bridging::toJs(rt, value); - } - - static jsi::Object reactNativeVersionToJs(jsi::Runtime &rt, decltype(types.reactNativeVersion) value) { - return bridging::toJs(rt, value); - } - - static bool forceTouchAvailableToJs(jsi::Runtime &rt, decltype(types.forceTouchAvailable) value) { - return bridging::toJs(rt, value); - } - - static jsi::String osVersionToJs(jsi::Runtime &rt, decltype(types.osVersion) value) { - return bridging::toJs(rt, value); - } - - static jsi::String systemNameToJs(jsi::Runtime &rt, decltype(types.systemName) value) { - return bridging::toJs(rt, value); - } - - static jsi::String interfaceIdiomToJs(jsi::Runtime &rt, decltype(types.interfaceIdiom) value) { - return bridging::toJs(rt, value); - } - - static bool isMacCatalystToJs(jsi::Runtime &rt, decltype(types.isMacCatalyst) value) { - return bridging::toJs(rt, value); - } -#endif - - static jsi::Object toJs( - jsi::Runtime &rt, - const T &value, - const std::shared_ptr &jsInvoker) { - auto result = facebook::jsi::Object(rt); - result.setProperty(rt, "isTesting", bridging::toJs(rt, value.isTesting, jsInvoker)); - if (value.isDisableAnimations) { - result.setProperty(rt, "isDisableAnimations", bridging::toJs(rt, value.isDisableAnimations.value(), jsInvoker)); - } - result.setProperty(rt, "reactNativeVersion", bridging::toJs(rt, value.reactNativeVersion, jsInvoker)); - result.setProperty(rt, "forceTouchAvailable", bridging::toJs(rt, value.forceTouchAvailable, jsInvoker)); - result.setProperty(rt, "osVersion", bridging::toJs(rt, value.osVersion, jsInvoker)); - result.setProperty(rt, "systemName", bridging::toJs(rt, value.systemName, jsInvoker)); - result.setProperty(rt, "interfaceIdiom", bridging::toJs(rt, value.interfaceIdiom, jsInvoker)); - if (value.isMacCatalyst) { - result.setProperty(rt, "isMacCatalyst", bridging::toJs(rt, value.isMacCatalyst.value(), jsInvoker)); - } - return result; - } -}; - -class JSI_EXPORT NativePlatformConstantsIOSCxxSpecJSI : public TurboModule { -protected: - NativePlatformConstantsIOSCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual jsi::Object getConstants(jsi::Runtime &rt) = 0; - -}; - -template -class JSI_EXPORT NativePlatformConstantsIOSCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "PlatformConstants"; - -protected: - NativePlatformConstantsIOSCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativePlatformConstantsIOSCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativePlatformConstantsIOSCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativePlatformConstantsIOSCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - jsi::Object getConstants(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::getConstants) == 1, - "Expected getConstants(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::getConstants, jsInvoker_, instance_); - } - - private: - friend class NativePlatformConstantsIOSCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - -#pragma mark - NativePlatformConstantsWindowsPlatformConstantsWindows - -template -struct NativePlatformConstantsWindowsPlatformConstantsWindows { - P0 isTesting; - P1 isDisableAnimations; - P2 reactNativeVersion; - P3 reactNativeWindowsVersion; - P4 osVersion; - bool operator==(const NativePlatformConstantsWindowsPlatformConstantsWindows &other) const { - return isTesting == other.isTesting && isDisableAnimations == other.isDisableAnimations && reactNativeVersion == other.reactNativeVersion && reactNativeWindowsVersion == other.reactNativeWindowsVersion && osVersion == other.osVersion; - } -}; - -template -struct NativePlatformConstantsWindowsPlatformConstantsWindowsBridging { - static T types; - - static T fromJs( - jsi::Runtime &rt, - const jsi::Object &value, - const std::shared_ptr &jsInvoker) { - T result{ - bridging::fromJs(rt, value.getProperty(rt, "isTesting"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "isDisableAnimations"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "reactNativeVersion"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "reactNativeWindowsVersion"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "osVersion"), jsInvoker)}; - return result; - } - -#ifdef DEBUG - static bool isTestingToJs(jsi::Runtime &rt, decltype(types.isTesting) value) { - return bridging::toJs(rt, value); - } - - static bool isDisableAnimationsToJs(jsi::Runtime &rt, decltype(types.isDisableAnimations) value) { - return bridging::toJs(rt, value); - } - - static jsi::Object reactNativeVersionToJs(jsi::Runtime &rt, decltype(types.reactNativeVersion) value) { - return bridging::toJs(rt, value); - } - - static jsi::Object reactNativeWindowsVersionToJs(jsi::Runtime &rt, decltype(types.reactNativeWindowsVersion) value) { - return bridging::toJs(rt, value); - } - - static double osVersionToJs(jsi::Runtime &rt, decltype(types.osVersion) value) { - return bridging::toJs(rt, value); - } -#endif - - static jsi::Object toJs( - jsi::Runtime &rt, - const T &value, - const std::shared_ptr &jsInvoker) { - auto result = facebook::jsi::Object(rt); - result.setProperty(rt, "isTesting", bridging::toJs(rt, value.isTesting, jsInvoker)); - if (value.isDisableAnimations) { - result.setProperty(rt, "isDisableAnimations", bridging::toJs(rt, value.isDisableAnimations.value(), jsInvoker)); - } - result.setProperty(rt, "reactNativeVersion", bridging::toJs(rt, value.reactNativeVersion, jsInvoker)); - result.setProperty(rt, "reactNativeWindowsVersion", bridging::toJs(rt, value.reactNativeWindowsVersion, jsInvoker)); - result.setProperty(rt, "osVersion", bridging::toJs(rt, value.osVersion, jsInvoker)); - return result; - } -}; - - - -#pragma mark - NativePlatformConstantsWindowsReactNativeVersionAndroid - -template -struct NativePlatformConstantsWindowsReactNativeVersionAndroid { - P0 major; - P1 minor; - P2 patch; - P3 prerelease; - bool operator==(const NativePlatformConstantsWindowsReactNativeVersionAndroid &other) const { - return major == other.major && minor == other.minor && patch == other.patch && prerelease == other.prerelease; - } -}; - -template -struct NativePlatformConstantsWindowsReactNativeVersionAndroidBridging { - static T types; - - static T fromJs( - jsi::Runtime &rt, - const jsi::Object &value, - const std::shared_ptr &jsInvoker) { - T result{ - bridging::fromJs(rt, value.getProperty(rt, "major"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "minor"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "patch"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "prerelease"), jsInvoker)}; - return result; - } - -#ifdef DEBUG - static double majorToJs(jsi::Runtime &rt, decltype(types.major) value) { - return bridging::toJs(rt, value); - } - - static double minorToJs(jsi::Runtime &rt, decltype(types.minor) value) { - return bridging::toJs(rt, value); - } - - static double patchToJs(jsi::Runtime &rt, decltype(types.patch) value) { - return bridging::toJs(rt, value); - } - - static std::optional prereleaseToJs(jsi::Runtime &rt, decltype(types.prerelease) value) { - return bridging::toJs(rt, value); - } -#endif - - static jsi::Object toJs( - jsi::Runtime &rt, - const T &value, - const std::shared_ptr &jsInvoker) { - auto result = facebook::jsi::Object(rt); - result.setProperty(rt, "major", bridging::toJs(rt, value.major, jsInvoker)); - result.setProperty(rt, "minor", bridging::toJs(rt, value.minor, jsInvoker)); - result.setProperty(rt, "patch", bridging::toJs(rt, value.patch, jsInvoker)); - result.setProperty(rt, "prerelease", bridging::toJs(rt, value.prerelease, jsInvoker)); - return result; - } -}; - -class JSI_EXPORT NativePlatformConstantsWindowsCxxSpecJSI : public TurboModule { -protected: - NativePlatformConstantsWindowsCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual jsi::Object getConstants(jsi::Runtime &rt) = 0; - -}; - -template -class JSI_EXPORT NativePlatformConstantsWindowsCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "PlatformConstants"; - -protected: - NativePlatformConstantsWindowsCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativePlatformConstantsWindowsCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativePlatformConstantsWindowsCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativePlatformConstantsWindowsCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - jsi::Object getConstants(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::getConstants) == 1, - "Expected getConstants(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::getConstants, jsInvoker_, instance_); - } - - private: - friend class NativePlatformConstantsWindowsCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - -#pragma mark - NativePushNotificationManagerIOSNotification - -template -struct NativePushNotificationManagerIOSNotification { - P0 alertTitle; - P1 alertBody; - P2 userInfo; - P3 category; - P4 fireDate; - P5 fireIntervalSeconds; - P6 applicationIconBadgeNumber; - P7 isSilent; - P8 soundName; - bool operator==(const NativePushNotificationManagerIOSNotification &other) const { - return alertTitle == other.alertTitle && alertBody == other.alertBody && userInfo == other.userInfo && category == other.category && fireDate == other.fireDate && fireIntervalSeconds == other.fireIntervalSeconds && applicationIconBadgeNumber == other.applicationIconBadgeNumber && isSilent == other.isSilent && soundName == other.soundName; - } -}; - -template -struct NativePushNotificationManagerIOSNotificationBridging { - static T types; - - static T fromJs( - jsi::Runtime &rt, - const jsi::Object &value, - const std::shared_ptr &jsInvoker) { - T result{ - bridging::fromJs(rt, value.getProperty(rt, "alertTitle"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "alertBody"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "userInfo"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "category"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "fireDate"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "fireIntervalSeconds"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "applicationIconBadgeNumber"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "isSilent"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "soundName"), jsInvoker)}; - return result; - } - -#ifdef DEBUG - static std::optional alertTitleToJs(jsi::Runtime &rt, decltype(types.alertTitle) value) { - return bridging::toJs(rt, value); - } - - static std::optional alertBodyToJs(jsi::Runtime &rt, decltype(types.alertBody) value) { - return bridging::toJs(rt, value); - } - - static std::optional userInfoToJs(jsi::Runtime &rt, decltype(types.userInfo) value) { - return bridging::toJs(rt, value); - } - - static std::optional categoryToJs(jsi::Runtime &rt, decltype(types.category) value) { - return bridging::toJs(rt, value); - } - - static std::optional fireDateToJs(jsi::Runtime &rt, decltype(types.fireDate) value) { - return bridging::toJs(rt, value); - } - - static std::optional fireIntervalSecondsToJs(jsi::Runtime &rt, decltype(types.fireIntervalSeconds) value) { - return bridging::toJs(rt, value); - } - - static std::optional applicationIconBadgeNumberToJs(jsi::Runtime &rt, decltype(types.applicationIconBadgeNumber) value) { - return bridging::toJs(rt, value); - } - - static std::optional isSilentToJs(jsi::Runtime &rt, decltype(types.isSilent) value) { - return bridging::toJs(rt, value); - } - - static std::optional soundNameToJs(jsi::Runtime &rt, decltype(types.soundName) value) { - return bridging::toJs(rt, value); - } -#endif - - static jsi::Object toJs( - jsi::Runtime &rt, - const T &value, - const std::shared_ptr &jsInvoker) { - auto result = facebook::jsi::Object(rt); - if (value.alertTitle) { - result.setProperty(rt, "alertTitle", bridging::toJs(rt, value.alertTitle.value(), jsInvoker)); - } - if (value.alertBody) { - result.setProperty(rt, "alertBody", bridging::toJs(rt, value.alertBody.value(), jsInvoker)); - } - if (value.userInfo) { - result.setProperty(rt, "userInfo", bridging::toJs(rt, value.userInfo.value(), jsInvoker)); - } - if (value.category) { - result.setProperty(rt, "category", bridging::toJs(rt, value.category.value(), jsInvoker)); - } - if (value.fireDate) { - result.setProperty(rt, "fireDate", bridging::toJs(rt, value.fireDate.value(), jsInvoker)); - } - if (value.fireIntervalSeconds) { - result.setProperty(rt, "fireIntervalSeconds", bridging::toJs(rt, value.fireIntervalSeconds.value(), jsInvoker)); - } - if (value.applicationIconBadgeNumber) { - result.setProperty(rt, "applicationIconBadgeNumber", bridging::toJs(rt, value.applicationIconBadgeNumber.value(), jsInvoker)); - } - if (value.isSilent) { - result.setProperty(rt, "isSilent", bridging::toJs(rt, value.isSilent.value(), jsInvoker)); - } - if (value.soundName) { - result.setProperty(rt, "soundName", bridging::toJs(rt, value.soundName.value(), jsInvoker)); - } - return result; - } -}; - - - -#pragma mark - NativePushNotificationManagerIOSPermissions - -template -struct NativePushNotificationManagerIOSPermissions { - P0 alert; - P1 badge; - P2 sound; - bool operator==(const NativePushNotificationManagerIOSPermissions &other) const { - return alert == other.alert && badge == other.badge && sound == other.sound; - } -}; - -template -struct NativePushNotificationManagerIOSPermissionsBridging { - static T types; - - static T fromJs( - jsi::Runtime &rt, - const jsi::Object &value, - const std::shared_ptr &jsInvoker) { - T result{ - bridging::fromJs(rt, value.getProperty(rt, "alert"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "badge"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "sound"), jsInvoker)}; - return result; - } - -#ifdef DEBUG - static bool alertToJs(jsi::Runtime &rt, decltype(types.alert) value) { - return bridging::toJs(rt, value); - } - - static bool badgeToJs(jsi::Runtime &rt, decltype(types.badge) value) { - return bridging::toJs(rt, value); - } - - static bool soundToJs(jsi::Runtime &rt, decltype(types.sound) value) { - return bridging::toJs(rt, value); - } -#endif - - static jsi::Object toJs( - jsi::Runtime &rt, - const T &value, - const std::shared_ptr &jsInvoker) { - auto result = facebook::jsi::Object(rt); - result.setProperty(rt, "alert", bridging::toJs(rt, value.alert, jsInvoker)); - result.setProperty(rt, "badge", bridging::toJs(rt, value.badge, jsInvoker)); - result.setProperty(rt, "sound", bridging::toJs(rt, value.sound, jsInvoker)); - return result; - } -}; - -class JSI_EXPORT NativePushNotificationManagerIOSCxxSpecJSI : public TurboModule { -protected: - NativePushNotificationManagerIOSCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual jsi::Object getConstants(jsi::Runtime &rt) = 0; - virtual void onFinishRemoteNotification(jsi::Runtime &rt, jsi::String notificationId, jsi::String fetchResult) = 0; - virtual void setApplicationIconBadgeNumber(jsi::Runtime &rt, double num) = 0; - virtual void getApplicationIconBadgeNumber(jsi::Runtime &rt, jsi::Function callback) = 0; - virtual jsi::Value requestPermissions(jsi::Runtime &rt, jsi::Object permission) = 0; - virtual void abandonPermissions(jsi::Runtime &rt) = 0; - virtual void checkPermissions(jsi::Runtime &rt, jsi::Function callback) = 0; - virtual void presentLocalNotification(jsi::Runtime &rt, jsi::Object notification) = 0; - virtual void scheduleLocalNotification(jsi::Runtime &rt, jsi::Object notification) = 0; - virtual void cancelAllLocalNotifications(jsi::Runtime &rt) = 0; - virtual void cancelLocalNotifications(jsi::Runtime &rt, jsi::Object userInfo) = 0; - virtual jsi::Value getInitialNotification(jsi::Runtime &rt) = 0; - virtual void getScheduledLocalNotifications(jsi::Runtime &rt, jsi::Function callback) = 0; - virtual void removeAllDeliveredNotifications(jsi::Runtime &rt) = 0; - virtual void removeDeliveredNotifications(jsi::Runtime &rt, jsi::Array identifiers) = 0; - virtual void getDeliveredNotifications(jsi::Runtime &rt, jsi::Function callback) = 0; - virtual void getAuthorizationStatus(jsi::Runtime &rt, jsi::Function callback) = 0; - virtual void addListener(jsi::Runtime &rt, jsi::String eventType) = 0; - virtual void removeListeners(jsi::Runtime &rt, double count) = 0; - -}; - -template -class JSI_EXPORT NativePushNotificationManagerIOSCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "PushNotificationManager"; - -protected: - NativePushNotificationManagerIOSCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativePushNotificationManagerIOSCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativePushNotificationManagerIOSCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativePushNotificationManagerIOSCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - jsi::Object getConstants(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::getConstants) == 1, - "Expected getConstants(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::getConstants, jsInvoker_, instance_); - } - void onFinishRemoteNotification(jsi::Runtime &rt, jsi::String notificationId, jsi::String fetchResult) override { - static_assert( - bridging::getParameterCount(&T::onFinishRemoteNotification) == 3, - "Expected onFinishRemoteNotification(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::onFinishRemoteNotification, jsInvoker_, instance_, std::move(notificationId), std::move(fetchResult)); - } - void setApplicationIconBadgeNumber(jsi::Runtime &rt, double num) override { - static_assert( - bridging::getParameterCount(&T::setApplicationIconBadgeNumber) == 2, - "Expected setApplicationIconBadgeNumber(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::setApplicationIconBadgeNumber, jsInvoker_, instance_, std::move(num)); - } - void getApplicationIconBadgeNumber(jsi::Runtime &rt, jsi::Function callback) override { - static_assert( - bridging::getParameterCount(&T::getApplicationIconBadgeNumber) == 2, - "Expected getApplicationIconBadgeNumber(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::getApplicationIconBadgeNumber, jsInvoker_, instance_, std::move(callback)); - } - jsi::Value requestPermissions(jsi::Runtime &rt, jsi::Object permission) override { - static_assert( - bridging::getParameterCount(&T::requestPermissions) == 2, - "Expected requestPermissions(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::requestPermissions, jsInvoker_, instance_, std::move(permission)); - } - void abandonPermissions(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::abandonPermissions) == 1, - "Expected abandonPermissions(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::abandonPermissions, jsInvoker_, instance_); - } - void checkPermissions(jsi::Runtime &rt, jsi::Function callback) override { - static_assert( - bridging::getParameterCount(&T::checkPermissions) == 2, - "Expected checkPermissions(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::checkPermissions, jsInvoker_, instance_, std::move(callback)); - } - void presentLocalNotification(jsi::Runtime &rt, jsi::Object notification) override { - static_assert( - bridging::getParameterCount(&T::presentLocalNotification) == 2, - "Expected presentLocalNotification(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::presentLocalNotification, jsInvoker_, instance_, std::move(notification)); - } - void scheduleLocalNotification(jsi::Runtime &rt, jsi::Object notification) override { - static_assert( - bridging::getParameterCount(&T::scheduleLocalNotification) == 2, - "Expected scheduleLocalNotification(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::scheduleLocalNotification, jsInvoker_, instance_, std::move(notification)); - } - void cancelAllLocalNotifications(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::cancelAllLocalNotifications) == 1, - "Expected cancelAllLocalNotifications(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::cancelAllLocalNotifications, jsInvoker_, instance_); - } - void cancelLocalNotifications(jsi::Runtime &rt, jsi::Object userInfo) override { - static_assert( - bridging::getParameterCount(&T::cancelLocalNotifications) == 2, - "Expected cancelLocalNotifications(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::cancelLocalNotifications, jsInvoker_, instance_, std::move(userInfo)); - } - jsi::Value getInitialNotification(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::getInitialNotification) == 1, - "Expected getInitialNotification(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::getInitialNotification, jsInvoker_, instance_); - } - void getScheduledLocalNotifications(jsi::Runtime &rt, jsi::Function callback) override { - static_assert( - bridging::getParameterCount(&T::getScheduledLocalNotifications) == 2, - "Expected getScheduledLocalNotifications(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::getScheduledLocalNotifications, jsInvoker_, instance_, std::move(callback)); - } - void removeAllDeliveredNotifications(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::removeAllDeliveredNotifications) == 1, - "Expected removeAllDeliveredNotifications(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::removeAllDeliveredNotifications, jsInvoker_, instance_); - } - void removeDeliveredNotifications(jsi::Runtime &rt, jsi::Array identifiers) override { - static_assert( - bridging::getParameterCount(&T::removeDeliveredNotifications) == 2, - "Expected removeDeliveredNotifications(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::removeDeliveredNotifications, jsInvoker_, instance_, std::move(identifiers)); - } - void getDeliveredNotifications(jsi::Runtime &rt, jsi::Function callback) override { - static_assert( - bridging::getParameterCount(&T::getDeliveredNotifications) == 2, - "Expected getDeliveredNotifications(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::getDeliveredNotifications, jsInvoker_, instance_, std::move(callback)); - } - void getAuthorizationStatus(jsi::Runtime &rt, jsi::Function callback) override { - static_assert( - bridging::getParameterCount(&T::getAuthorizationStatus) == 2, - "Expected getAuthorizationStatus(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::getAuthorizationStatus, jsInvoker_, instance_, std::move(callback)); - } - void addListener(jsi::Runtime &rt, jsi::String eventType) override { - static_assert( - bridging::getParameterCount(&T::addListener) == 2, - "Expected addListener(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::addListener, jsInvoker_, instance_, std::move(eventType)); - } - void removeListeners(jsi::Runtime &rt, double count) override { - static_assert( - bridging::getParameterCount(&T::removeListeners) == 2, - "Expected removeListeners(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::removeListeners, jsInvoker_, instance_, std::move(count)); - } - - private: - friend class NativePushNotificationManagerIOSCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - class JSI_EXPORT NativeRedBoxCxxSpecJSI : public TurboModule { -protected: - NativeRedBoxCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual void setExtraData(jsi::Runtime &rt, jsi::Object extraData, jsi::String forIdentifier) = 0; - virtual void dismiss(jsi::Runtime &rt) = 0; - -}; - -template -class JSI_EXPORT NativeRedBoxCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "RedBox"; - -protected: - NativeRedBoxCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeRedBoxCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeRedBoxCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeRedBoxCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - void setExtraData(jsi::Runtime &rt, jsi::Object extraData, jsi::String forIdentifier) override { - static_assert( - bridging::getParameterCount(&T::setExtraData) == 3, - "Expected setExtraData(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::setExtraData, jsInvoker_, instance_, std::move(extraData), std::move(forIdentifier)); - } - void dismiss(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::dismiss) == 1, - "Expected dismiss(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::dismiss, jsInvoker_, instance_); - } - - private: - friend class NativeRedBoxCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - -#pragma mark - NativeSampleTurboModuleEnumInt - -enum class NativeSampleTurboModuleEnumInt { A, B }; - -template <> -struct Bridging { - static NativeSampleTurboModuleEnumInt fromJs(jsi::Runtime &rt, const jsi::Value &rawValue) { - double value = (double)rawValue.asNumber(); - if (value == 23) { - return NativeSampleTurboModuleEnumInt::A; - } else if (value == 42) { - return NativeSampleTurboModuleEnumInt::B; - } else { - throw jsi::JSError(rt, "No appropriate enum member found for value in NativeSampleTurboModuleEnumInt"); - } - } - - static jsi::Value toJs(jsi::Runtime &rt, NativeSampleTurboModuleEnumInt value) { - if (value == NativeSampleTurboModuleEnumInt::A) { - return bridging::toJs(rt, 23); - } else if (value == NativeSampleTurboModuleEnumInt::B) { - return bridging::toJs(rt, 42); - } else { - throw jsi::JSError(rt, "No appropriate enum member found for enum value in NativeSampleTurboModuleEnumInt"); - } - } -}; - -#pragma mark - NativeSampleTurboModuleObjectStruct - -template -struct NativeSampleTurboModuleObjectStruct { - P0 a; - P1 b; - P2 c; - bool operator==(const NativeSampleTurboModuleObjectStruct &other) const { - return a == other.a && b == other.b && c == other.c; - } -}; - -template -struct NativeSampleTurboModuleObjectStructBridging { - static T types; - - static T fromJs( - jsi::Runtime &rt, - const jsi::Object &value, - const std::shared_ptr &jsInvoker) { - T result{ - bridging::fromJs(rt, value.getProperty(rt, "a"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "b"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "c"), jsInvoker)}; - return result; - } - -#ifdef DEBUG - static double aToJs(jsi::Runtime &rt, decltype(types.a) value) { - return bridging::toJs(rt, value); - } - - static jsi::String bToJs(jsi::Runtime &rt, decltype(types.b) value) { - return bridging::toJs(rt, value); - } - - static std::optional cToJs(jsi::Runtime &rt, decltype(types.c) value) { - return bridging::toJs(rt, value); - } -#endif - - static jsi::Object toJs( - jsi::Runtime &rt, - const T &value, - const std::shared_ptr &jsInvoker) { - auto result = facebook::jsi::Object(rt); - result.setProperty(rt, "a", bridging::toJs(rt, value.a, jsInvoker)); - result.setProperty(rt, "b", bridging::toJs(rt, value.b, jsInvoker)); - if (value.c) { - result.setProperty(rt, "c", bridging::toJs(rt, value.c.value(), jsInvoker)); - } - return result; - } -}; - -class JSI_EXPORT NativeSampleTurboModuleCxxSpecJSI : public TurboModule { -protected: - NativeSampleTurboModuleCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual jsi::Object getConstants(jsi::Runtime &rt) = 0; - virtual void voidFunc(jsi::Runtime &rt) = 0; - virtual bool getBool(jsi::Runtime &rt, bool arg) = 0; - virtual jsi::Value getEnum(jsi::Runtime &rt, jsi::Value arg) = 0; - virtual double getNumber(jsi::Runtime &rt, double arg) = 0; - virtual jsi::String getString(jsi::Runtime &rt, jsi::String arg) = 0; - virtual jsi::Array getArray(jsi::Runtime &rt, jsi::Array arg) = 0; - virtual jsi::Object getObject(jsi::Runtime &rt, jsi::Object arg) = 0; - virtual jsi::Object getUnsafeObject(jsi::Runtime &rt, jsi::Object arg) = 0; - virtual double getRootTag(jsi::Runtime &rt, double arg) = 0; - virtual jsi::Object getValue(jsi::Runtime &rt, double x, jsi::String y, jsi::Object z) = 0; - virtual void getValueWithCallback(jsi::Runtime &rt, jsi::Function callback) = 0; - virtual jsi::Value getValueWithPromise(jsi::Runtime &rt, bool error) = 0; - virtual void voidFuncThrows(jsi::Runtime &rt) = 0; - virtual jsi::Object getObjectThrows(jsi::Runtime &rt, jsi::Object arg) = 0; - virtual jsi::Value promiseThrows(jsi::Runtime &rt) = 0; - virtual void voidFuncAssert(jsi::Runtime &rt) = 0; - virtual jsi::Object getObjectAssert(jsi::Runtime &rt, jsi::Object arg) = 0; - virtual jsi::Value promiseAssert(jsi::Runtime &rt) = 0; - virtual jsi::Value getImageUrl(jsi::Runtime &rt) = 0; - -}; - -template -class JSI_EXPORT NativeSampleTurboModuleCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "SampleTurboModule"; - -protected: - NativeSampleTurboModuleCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeSampleTurboModuleCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - void emitOnPress() { - static_cast&>(*delegate_.eventEmitterMap_["onPress"]).emit(); - } - - template void emitOnClick(OnClickType value) { - static_assert(bridging::supportsFromJs, "value cannnot be converted to jsi::String"); - static_cast&>(*delegate_.eventEmitterMap_["onClick"]).emit([jsInvoker = jsInvoker_, eventValue = value](jsi::Runtime& rt) -> jsi::Value { - return bridging::toJs(rt, eventValue, jsInvoker); - }); - } - - template void emitOnChange(OnChangeType value) { - static_assert(bridging::supportsFromJs, "value cannnot be converted to jsi::Object"); - static_cast&>(*delegate_.eventEmitterMap_["onChange"]).emit([jsInvoker = jsInvoker_, eventValue = value](jsi::Runtime& rt) -> jsi::Value { - return bridging::toJs(rt, eventValue, jsInvoker); - }); - } - - template void emitOnSubmit(std::vector value) { - static_assert(bridging::supportsFromJs, jsi::Array>, "value cannnot be converted to jsi::Array"); - static_cast&>(*delegate_.eventEmitterMap_["onSubmit"]).emit([jsInvoker = jsInvoker_, eventValue = value](jsi::Runtime& rt) -> jsi::Value { - return bridging::toJs(rt, eventValue, jsInvoker); - }); - } - -private: - class Delegate : public NativeSampleTurboModuleCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeSampleTurboModuleCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - eventEmitterMap_["onPress"] = std::make_shared>(); - eventEmitterMap_["onClick"] = std::make_shared>(); - eventEmitterMap_["onChange"] = std::make_shared>(); - eventEmitterMap_["onSubmit"] = std::make_shared>(); - } - - jsi::Object getConstants(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::getConstants) == 1, - "Expected getConstants(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::getConstants, jsInvoker_, instance_); - } - void voidFunc(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::voidFunc) == 1, - "Expected voidFunc(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::voidFunc, jsInvoker_, instance_); - } - bool getBool(jsi::Runtime &rt, bool arg) override { - static_assert( - bridging::getParameterCount(&T::getBool) == 2, - "Expected getBool(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::getBool, jsInvoker_, instance_, std::move(arg)); - } - jsi::Value getEnum(jsi::Runtime &rt, jsi::Value arg) override { - static_assert( - bridging::getParameterCount(&T::getEnum) == 2, - "Expected getEnum(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::getEnum, jsInvoker_, instance_, std::move(arg)); - } - double getNumber(jsi::Runtime &rt, double arg) override { - static_assert( - bridging::getParameterCount(&T::getNumber) == 2, - "Expected getNumber(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::getNumber, jsInvoker_, instance_, std::move(arg)); - } - jsi::String getString(jsi::Runtime &rt, jsi::String arg) override { - static_assert( - bridging::getParameterCount(&T::getString) == 2, - "Expected getString(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::getString, jsInvoker_, instance_, std::move(arg)); - } - jsi::Array getArray(jsi::Runtime &rt, jsi::Array arg) override { - static_assert( - bridging::getParameterCount(&T::getArray) == 2, - "Expected getArray(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::getArray, jsInvoker_, instance_, std::move(arg)); - } - jsi::Object getObject(jsi::Runtime &rt, jsi::Object arg) override { - static_assert( - bridging::getParameterCount(&T::getObject) == 2, - "Expected getObject(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::getObject, jsInvoker_, instance_, std::move(arg)); - } - jsi::Object getUnsafeObject(jsi::Runtime &rt, jsi::Object arg) override { - static_assert( - bridging::getParameterCount(&T::getUnsafeObject) == 2, - "Expected getUnsafeObject(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::getUnsafeObject, jsInvoker_, instance_, std::move(arg)); - } - double getRootTag(jsi::Runtime &rt, double arg) override { - static_assert( - bridging::getParameterCount(&T::getRootTag) == 2, - "Expected getRootTag(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::getRootTag, jsInvoker_, instance_, std::move(arg)); - } - jsi::Object getValue(jsi::Runtime &rt, double x, jsi::String y, jsi::Object z) override { - static_assert( - bridging::getParameterCount(&T::getValue) == 4, - "Expected getValue(...) to have 4 parameters"); - - return bridging::callFromJs( - rt, &T::getValue, jsInvoker_, instance_, std::move(x), std::move(y), std::move(z)); - } - void getValueWithCallback(jsi::Runtime &rt, jsi::Function callback) override { - static_assert( - bridging::getParameterCount(&T::getValueWithCallback) == 2, - "Expected getValueWithCallback(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::getValueWithCallback, jsInvoker_, instance_, std::move(callback)); - } - jsi::Value getValueWithPromise(jsi::Runtime &rt, bool error) override { - static_assert( - bridging::getParameterCount(&T::getValueWithPromise) == 2, - "Expected getValueWithPromise(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::getValueWithPromise, jsInvoker_, instance_, std::move(error)); - } - void voidFuncThrows(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::voidFuncThrows) == 1, - "Expected voidFuncThrows(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::voidFuncThrows, jsInvoker_, instance_); - } - jsi::Object getObjectThrows(jsi::Runtime &rt, jsi::Object arg) override { - static_assert( - bridging::getParameterCount(&T::getObjectThrows) == 2, - "Expected getObjectThrows(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::getObjectThrows, jsInvoker_, instance_, std::move(arg)); - } - jsi::Value promiseThrows(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::promiseThrows) == 1, - "Expected promiseThrows(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::promiseThrows, jsInvoker_, instance_); - } - void voidFuncAssert(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::voidFuncAssert) == 1, - "Expected voidFuncAssert(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::voidFuncAssert, jsInvoker_, instance_); - } - jsi::Object getObjectAssert(jsi::Runtime &rt, jsi::Object arg) override { - static_assert( - bridging::getParameterCount(&T::getObjectAssert) == 2, - "Expected getObjectAssert(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::getObjectAssert, jsInvoker_, instance_, std::move(arg)); - } - jsi::Value promiseAssert(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::promiseAssert) == 1, - "Expected promiseAssert(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::promiseAssert, jsInvoker_, instance_); - } - jsi::Value getImageUrl(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::getImageUrl) == 1, - "Expected getImageUrl(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::getImageUrl, jsInvoker_, instance_); - } - - private: - friend class NativeSampleTurboModuleCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - class JSI_EXPORT NativeSegmentFetcherCxxSpecJSI : public TurboModule { -protected: - NativeSegmentFetcherCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual void fetchSegment(jsi::Runtime &rt, double segmentId, jsi::Object options, jsi::Function callback) = 0; - virtual void getSegment(jsi::Runtime &rt, double segmentId, jsi::Object options, jsi::Function callback) = 0; - -}; - -template -class JSI_EXPORT NativeSegmentFetcherCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "SegmentFetcher"; - -protected: - NativeSegmentFetcherCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeSegmentFetcherCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeSegmentFetcherCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeSegmentFetcherCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - void fetchSegment(jsi::Runtime &rt, double segmentId, jsi::Object options, jsi::Function callback) override { - static_assert( - bridging::getParameterCount(&T::fetchSegment) == 4, - "Expected fetchSegment(...) to have 4 parameters"); - - return bridging::callFromJs( - rt, &T::fetchSegment, jsInvoker_, instance_, std::move(segmentId), std::move(options), std::move(callback)); - } - void getSegment(jsi::Runtime &rt, double segmentId, jsi::Object options, jsi::Function callback) override { - static_assert( - bridging::getParameterCount(&T::getSegment) == 4, - "Expected getSegment(...) to have 4 parameters"); - - return bridging::callFromJs( - rt, &T::getSegment, jsInvoker_, instance_, std::move(segmentId), std::move(options), std::move(callback)); - } - - private: - friend class NativeSegmentFetcherCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - class JSI_EXPORT NativeSettingsManagerCxxSpecJSI : public TurboModule { -protected: - NativeSettingsManagerCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual jsi::Object getConstants(jsi::Runtime &rt) = 0; - virtual void setValues(jsi::Runtime &rt, jsi::Object values) = 0; - virtual void deleteValues(jsi::Runtime &rt, jsi::Array values) = 0; - -}; - -template -class JSI_EXPORT NativeSettingsManagerCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "SettingsManager"; - -protected: - NativeSettingsManagerCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeSettingsManagerCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeSettingsManagerCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeSettingsManagerCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - jsi::Object getConstants(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::getConstants) == 1, - "Expected getConstants(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::getConstants, jsInvoker_, instance_); - } - void setValues(jsi::Runtime &rt, jsi::Object values) override { - static_assert( - bridging::getParameterCount(&T::setValues) == 2, - "Expected setValues(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::setValues, jsInvoker_, instance_, std::move(values)); - } - void deleteValues(jsi::Runtime &rt, jsi::Array values) override { - static_assert( - bridging::getParameterCount(&T::deleteValues) == 2, - "Expected deleteValues(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::deleteValues, jsInvoker_, instance_, std::move(values)); - } - - private: - friend class NativeSettingsManagerCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - class JSI_EXPORT NativeShareModuleCxxSpecJSI : public TurboModule { -protected: - NativeShareModuleCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual jsi::Object getConstants(jsi::Runtime &rt) = 0; - virtual jsi::Value share(jsi::Runtime &rt, jsi::Object content, std::optional dialogTitle) = 0; - -}; - -template -class JSI_EXPORT NativeShareModuleCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "ShareModule"; - -protected: - NativeShareModuleCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeShareModuleCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeShareModuleCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeShareModuleCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - jsi::Object getConstants(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::getConstants) == 1, - "Expected getConstants(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::getConstants, jsInvoker_, instance_); - } - jsi::Value share(jsi::Runtime &rt, jsi::Object content, std::optional dialogTitle) override { - static_assert( - bridging::getParameterCount(&T::share) == 3, - "Expected share(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::share, jsInvoker_, instance_, std::move(content), std::move(dialogTitle)); - } - - private: - friend class NativeShareModuleCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - class JSI_EXPORT NativeSoundManagerCxxSpecJSI : public TurboModule { -protected: - NativeSoundManagerCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual void playTouchSound(jsi::Runtime &rt) = 0; - -}; - -template -class JSI_EXPORT NativeSoundManagerCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "SoundManager"; - -protected: - NativeSoundManagerCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeSoundManagerCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeSoundManagerCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeSoundManagerCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - void playTouchSound(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::playTouchSound) == 1, - "Expected playTouchSound(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::playTouchSound, jsInvoker_, instance_); - } - - private: - friend class NativeSoundManagerCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - -#pragma mark - NativeSourceCodeSourceCodeConstants - -template -struct NativeSourceCodeSourceCodeConstants { - P0 scriptURL; - bool operator==(const NativeSourceCodeSourceCodeConstants &other) const { - return scriptURL == other.scriptURL; - } -}; - -template -struct NativeSourceCodeSourceCodeConstantsBridging { - static T types; - - static T fromJs( - jsi::Runtime &rt, - const jsi::Object &value, - const std::shared_ptr &jsInvoker) { - T result{ - bridging::fromJs(rt, value.getProperty(rt, "scriptURL"), jsInvoker)}; - return result; - } - -#ifdef DEBUG - static jsi::String scriptURLToJs(jsi::Runtime &rt, decltype(types.scriptURL) value) { - return bridging::toJs(rt, value); - } -#endif - - static jsi::Object toJs( - jsi::Runtime &rt, - const T &value, - const std::shared_ptr &jsInvoker) { - auto result = facebook::jsi::Object(rt); - result.setProperty(rt, "scriptURL", bridging::toJs(rt, value.scriptURL, jsInvoker)); - return result; - } -}; - -class JSI_EXPORT NativeSourceCodeCxxSpecJSI : public TurboModule { -protected: - NativeSourceCodeCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual jsi::Object getConstants(jsi::Runtime &rt) = 0; - -}; - -template -class JSI_EXPORT NativeSourceCodeCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "SourceCode"; - -protected: - NativeSourceCodeCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeSourceCodeCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeSourceCodeCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeSourceCodeCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - jsi::Object getConstants(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::getConstants) == 1, - "Expected getConstants(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::getConstants, jsInvoker_, instance_); - } - - private: - friend class NativeSourceCodeCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - class JSI_EXPORT NativeStatusBarManagerAndroidCxxSpecJSI : public TurboModule { -protected: - NativeStatusBarManagerAndroidCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual jsi::Object getConstants(jsi::Runtime &rt) = 0; - virtual void setColor(jsi::Runtime &rt, double color, bool animated) = 0; - virtual void setTranslucent(jsi::Runtime &rt, bool translucent) = 0; - virtual void setStyle(jsi::Runtime &rt, std::optional statusBarStyle) = 0; - virtual void setHidden(jsi::Runtime &rt, bool hidden) = 0; - -}; - -template -class JSI_EXPORT NativeStatusBarManagerAndroidCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "StatusBarManager"; - -protected: - NativeStatusBarManagerAndroidCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeStatusBarManagerAndroidCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeStatusBarManagerAndroidCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeStatusBarManagerAndroidCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - jsi::Object getConstants(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::getConstants) == 1, - "Expected getConstants(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::getConstants, jsInvoker_, instance_); - } - void setColor(jsi::Runtime &rt, double color, bool animated) override { - static_assert( - bridging::getParameterCount(&T::setColor) == 3, - "Expected setColor(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::setColor, jsInvoker_, instance_, std::move(color), std::move(animated)); - } - void setTranslucent(jsi::Runtime &rt, bool translucent) override { - static_assert( - bridging::getParameterCount(&T::setTranslucent) == 2, - "Expected setTranslucent(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::setTranslucent, jsInvoker_, instance_, std::move(translucent)); - } - void setStyle(jsi::Runtime &rt, std::optional statusBarStyle) override { - static_assert( - bridging::getParameterCount(&T::setStyle) == 2, - "Expected setStyle(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::setStyle, jsInvoker_, instance_, std::move(statusBarStyle)); - } - void setHidden(jsi::Runtime &rt, bool hidden) override { - static_assert( - bridging::getParameterCount(&T::setHidden) == 2, - "Expected setHidden(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::setHidden, jsInvoker_, instance_, std::move(hidden)); - } - - private: - friend class NativeStatusBarManagerAndroidCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - class JSI_EXPORT NativeStatusBarManagerIOSCxxSpecJSI : public TurboModule { -protected: - NativeStatusBarManagerIOSCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual jsi::Object getConstants(jsi::Runtime &rt) = 0; - virtual void getHeight(jsi::Runtime &rt, jsi::Function callback) = 0; - virtual void setNetworkActivityIndicatorVisible(jsi::Runtime &rt, bool visible) = 0; - virtual void addListener(jsi::Runtime &rt, jsi::String eventType) = 0; - virtual void removeListeners(jsi::Runtime &rt, double count) = 0; - virtual void setStyle(jsi::Runtime &rt, std::optional statusBarStyle, bool animated) = 0; - virtual void setHidden(jsi::Runtime &rt, bool hidden, jsi::String withAnimation) = 0; - -}; - -template -class JSI_EXPORT NativeStatusBarManagerIOSCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "StatusBarManager"; - -protected: - NativeStatusBarManagerIOSCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeStatusBarManagerIOSCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeStatusBarManagerIOSCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeStatusBarManagerIOSCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - jsi::Object getConstants(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::getConstants) == 1, - "Expected getConstants(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::getConstants, jsInvoker_, instance_); - } - void getHeight(jsi::Runtime &rt, jsi::Function callback) override { - static_assert( - bridging::getParameterCount(&T::getHeight) == 2, - "Expected getHeight(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::getHeight, jsInvoker_, instance_, std::move(callback)); - } - void setNetworkActivityIndicatorVisible(jsi::Runtime &rt, bool visible) override { - static_assert( - bridging::getParameterCount(&T::setNetworkActivityIndicatorVisible) == 2, - "Expected setNetworkActivityIndicatorVisible(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::setNetworkActivityIndicatorVisible, jsInvoker_, instance_, std::move(visible)); - } - void addListener(jsi::Runtime &rt, jsi::String eventType) override { - static_assert( - bridging::getParameterCount(&T::addListener) == 2, - "Expected addListener(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::addListener, jsInvoker_, instance_, std::move(eventType)); - } - void removeListeners(jsi::Runtime &rt, double count) override { - static_assert( - bridging::getParameterCount(&T::removeListeners) == 2, - "Expected removeListeners(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::removeListeners, jsInvoker_, instance_, std::move(count)); - } - void setStyle(jsi::Runtime &rt, std::optional statusBarStyle, bool animated) override { - static_assert( - bridging::getParameterCount(&T::setStyle) == 3, - "Expected setStyle(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::setStyle, jsInvoker_, instance_, std::move(statusBarStyle), std::move(animated)); - } - void setHidden(jsi::Runtime &rt, bool hidden, jsi::String withAnimation) override { - static_assert( - bridging::getParameterCount(&T::setHidden) == 3, - "Expected setHidden(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::setHidden, jsInvoker_, instance_, std::move(hidden), std::move(withAnimation)); - } - - private: - friend class NativeStatusBarManagerIOSCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - class JSI_EXPORT NativeTimingCxxSpecJSI : public TurboModule { -protected: - NativeTimingCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual void createTimer(jsi::Runtime &rt, double callbackID, double duration, double jsSchedulingTime, bool repeats) = 0; - virtual void deleteTimer(jsi::Runtime &rt, double timerID) = 0; - virtual void setSendIdleEvents(jsi::Runtime &rt, bool sendIdleEvents) = 0; - -}; - -template -class JSI_EXPORT NativeTimingCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "Timing"; - -protected: - NativeTimingCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeTimingCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeTimingCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeTimingCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - void createTimer(jsi::Runtime &rt, double callbackID, double duration, double jsSchedulingTime, bool repeats) override { - static_assert( - bridging::getParameterCount(&T::createTimer) == 5, - "Expected createTimer(...) to have 5 parameters"); - - return bridging::callFromJs( - rt, &T::createTimer, jsInvoker_, instance_, std::move(callbackID), std::move(duration), std::move(jsSchedulingTime), std::move(repeats)); - } - void deleteTimer(jsi::Runtime &rt, double timerID) override { - static_assert( - bridging::getParameterCount(&T::deleteTimer) == 2, - "Expected deleteTimer(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::deleteTimer, jsInvoker_, instance_, std::move(timerID)); - } - void setSendIdleEvents(jsi::Runtime &rt, bool sendIdleEvents) override { - static_assert( - bridging::getParameterCount(&T::setSendIdleEvents) == 2, - "Expected setSendIdleEvents(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::setSendIdleEvents, jsInvoker_, instance_, std::move(sendIdleEvents)); - } - - private: - friend class NativeTimingCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - class JSI_EXPORT NativeToastAndroidCxxSpecJSI : public TurboModule { -protected: - NativeToastAndroidCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual jsi::Object getConstants(jsi::Runtime &rt) = 0; - virtual void show(jsi::Runtime &rt, jsi::String message, double duration) = 0; - virtual void showWithGravity(jsi::Runtime &rt, jsi::String message, double duration, double gravity) = 0; - virtual void showWithGravityAndOffset(jsi::Runtime &rt, jsi::String message, double duration, double gravity, double xOffset, double yOffset) = 0; - -}; - -template -class JSI_EXPORT NativeToastAndroidCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "ToastAndroid"; - -protected: - NativeToastAndroidCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeToastAndroidCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeToastAndroidCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeToastAndroidCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - jsi::Object getConstants(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::getConstants) == 1, - "Expected getConstants(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::getConstants, jsInvoker_, instance_); - } - void show(jsi::Runtime &rt, jsi::String message, double duration) override { - static_assert( - bridging::getParameterCount(&T::show) == 3, - "Expected show(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::show, jsInvoker_, instance_, std::move(message), std::move(duration)); - } - void showWithGravity(jsi::Runtime &rt, jsi::String message, double duration, double gravity) override { - static_assert( - bridging::getParameterCount(&T::showWithGravity) == 4, - "Expected showWithGravity(...) to have 4 parameters"); - - return bridging::callFromJs( - rt, &T::showWithGravity, jsInvoker_, instance_, std::move(message), std::move(duration), std::move(gravity)); - } - void showWithGravityAndOffset(jsi::Runtime &rt, jsi::String message, double duration, double gravity, double xOffset, double yOffset) override { - static_assert( - bridging::getParameterCount(&T::showWithGravityAndOffset) == 6, - "Expected showWithGravityAndOffset(...) to have 6 parameters"); - - return bridging::callFromJs( - rt, &T::showWithGravityAndOffset, jsInvoker_, instance_, std::move(message), std::move(duration), std::move(gravity), std::move(xOffset), std::move(yOffset)); - } - - private: - friend class NativeToastAndroidCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - class JSI_EXPORT NativeUIManagerCxxSpecJSI : public TurboModule { -protected: - NativeUIManagerCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual jsi::Object getConstants(jsi::Runtime &rt) = 0; - virtual void createView(jsi::Runtime &rt, double reactTag, jsi::String viewName, double rootTag, jsi::Object props) = 0; - virtual void updateView(jsi::Runtime &rt, double reactTag, jsi::String viewName, jsi::Object props) = 0; - virtual void findSubviewIn(jsi::Runtime &rt, double reactTag, jsi::Array point, jsi::Function callback) = 0; - virtual void dispatchViewManagerCommand(jsi::Runtime &rt, double reactTag, double commandID, std::optional commandArgs) = 0; - virtual void measure(jsi::Runtime &rt, double reactTag, jsi::Function callback) = 0; - virtual void measureInWindow(jsi::Runtime &rt, double reactTag, jsi::Function callback) = 0; - virtual void viewIsDescendantOf(jsi::Runtime &rt, double reactTag, double ancestorReactTag, jsi::Function callback) = 0; - virtual void measureLayout(jsi::Runtime &rt, double reactTag, double ancestorReactTag, jsi::Function errorCallback, jsi::Function callback) = 0; - virtual void measureLayoutRelativeToParent(jsi::Runtime &rt, double reactTag, jsi::Function errorCallback, jsi::Function callback) = 0; - virtual void setJSResponder(jsi::Runtime &rt, double reactTag, bool blockNativeResponder) = 0; - virtual void clearJSResponder(jsi::Runtime &rt) = 0; - virtual void configureNextLayoutAnimation(jsi::Runtime &rt, jsi::Object config, jsi::Function callback, jsi::Function errorCallback) = 0; - virtual void setChildren(jsi::Runtime &rt, double containerTag, jsi::Array reactTags) = 0; - virtual void manageChildren(jsi::Runtime &rt, double containerTag, jsi::Array moveFromIndices, jsi::Array moveToIndices, jsi::Array addChildReactTags, jsi::Array addAtIndices, jsi::Array removeAtIndices) = 0; - virtual std::optional getConstantsForViewManager(jsi::Runtime &rt, jsi::String viewManagerName) = 0; - virtual jsi::Array getDefaultEventTypes(jsi::Runtime &rt) = 0; - virtual void setLayoutAnimationEnabledExperimental(jsi::Runtime &rt, bool enabled) = 0; - virtual void sendAccessibilityEvent(jsi::Runtime &rt, double reactTag, double eventType) = 0; - virtual jsi::Object lazilyLoadView(jsi::Runtime &rt, jsi::String name) = 0; - virtual void focus(jsi::Runtime &rt, double reactTag) = 0; - virtual void blur(jsi::Runtime &rt, double reactTag) = 0; - -}; - -template -class JSI_EXPORT NativeUIManagerCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "UIManager"; - -protected: - NativeUIManagerCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeUIManagerCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeUIManagerCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeUIManagerCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - jsi::Object getConstants(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::getConstants) == 1, - "Expected getConstants(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::getConstants, jsInvoker_, instance_); - } - void createView(jsi::Runtime &rt, double reactTag, jsi::String viewName, double rootTag, jsi::Object props) override { - static_assert( - bridging::getParameterCount(&T::createView) == 5, - "Expected createView(...) to have 5 parameters"); - - return bridging::callFromJs( - rt, &T::createView, jsInvoker_, instance_, std::move(reactTag), std::move(viewName), std::move(rootTag), std::move(props)); - } - void updateView(jsi::Runtime &rt, double reactTag, jsi::String viewName, jsi::Object props) override { - static_assert( - bridging::getParameterCount(&T::updateView) == 4, - "Expected updateView(...) to have 4 parameters"); - - return bridging::callFromJs( - rt, &T::updateView, jsInvoker_, instance_, std::move(reactTag), std::move(viewName), std::move(props)); - } - void findSubviewIn(jsi::Runtime &rt, double reactTag, jsi::Array point, jsi::Function callback) override { - static_assert( - bridging::getParameterCount(&T::findSubviewIn) == 4, - "Expected findSubviewIn(...) to have 4 parameters"); - - return bridging::callFromJs( - rt, &T::findSubviewIn, jsInvoker_, instance_, std::move(reactTag), std::move(point), std::move(callback)); - } - void dispatchViewManagerCommand(jsi::Runtime &rt, double reactTag, double commandID, std::optional commandArgs) override { - static_assert( - bridging::getParameterCount(&T::dispatchViewManagerCommand) == 4, - "Expected dispatchViewManagerCommand(...) to have 4 parameters"); - - return bridging::callFromJs( - rt, &T::dispatchViewManagerCommand, jsInvoker_, instance_, std::move(reactTag), std::move(commandID), std::move(commandArgs)); - } - void measure(jsi::Runtime &rt, double reactTag, jsi::Function callback) override { - static_assert( - bridging::getParameterCount(&T::measure) == 3, - "Expected measure(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::measure, jsInvoker_, instance_, std::move(reactTag), std::move(callback)); - } - void measureInWindow(jsi::Runtime &rt, double reactTag, jsi::Function callback) override { - static_assert( - bridging::getParameterCount(&T::measureInWindow) == 3, - "Expected measureInWindow(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::measureInWindow, jsInvoker_, instance_, std::move(reactTag), std::move(callback)); - } - void viewIsDescendantOf(jsi::Runtime &rt, double reactTag, double ancestorReactTag, jsi::Function callback) override { - static_assert( - bridging::getParameterCount(&T::viewIsDescendantOf) == 4, - "Expected viewIsDescendantOf(...) to have 4 parameters"); - - return bridging::callFromJs( - rt, &T::viewIsDescendantOf, jsInvoker_, instance_, std::move(reactTag), std::move(ancestorReactTag), std::move(callback)); - } - void measureLayout(jsi::Runtime &rt, double reactTag, double ancestorReactTag, jsi::Function errorCallback, jsi::Function callback) override { - static_assert( - bridging::getParameterCount(&T::measureLayout) == 5, - "Expected measureLayout(...) to have 5 parameters"); - - return bridging::callFromJs( - rt, &T::measureLayout, jsInvoker_, instance_, std::move(reactTag), std::move(ancestorReactTag), std::move(errorCallback), std::move(callback)); - } - void measureLayoutRelativeToParent(jsi::Runtime &rt, double reactTag, jsi::Function errorCallback, jsi::Function callback) override { - static_assert( - bridging::getParameterCount(&T::measureLayoutRelativeToParent) == 4, - "Expected measureLayoutRelativeToParent(...) to have 4 parameters"); - - return bridging::callFromJs( - rt, &T::measureLayoutRelativeToParent, jsInvoker_, instance_, std::move(reactTag), std::move(errorCallback), std::move(callback)); - } - void setJSResponder(jsi::Runtime &rt, double reactTag, bool blockNativeResponder) override { - static_assert( - bridging::getParameterCount(&T::setJSResponder) == 3, - "Expected setJSResponder(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::setJSResponder, jsInvoker_, instance_, std::move(reactTag), std::move(blockNativeResponder)); - } - void clearJSResponder(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::clearJSResponder) == 1, - "Expected clearJSResponder(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::clearJSResponder, jsInvoker_, instance_); - } - void configureNextLayoutAnimation(jsi::Runtime &rt, jsi::Object config, jsi::Function callback, jsi::Function errorCallback) override { - static_assert( - bridging::getParameterCount(&T::configureNextLayoutAnimation) == 4, - "Expected configureNextLayoutAnimation(...) to have 4 parameters"); - - return bridging::callFromJs( - rt, &T::configureNextLayoutAnimation, jsInvoker_, instance_, std::move(config), std::move(callback), std::move(errorCallback)); - } - void setChildren(jsi::Runtime &rt, double containerTag, jsi::Array reactTags) override { - static_assert( - bridging::getParameterCount(&T::setChildren) == 3, - "Expected setChildren(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::setChildren, jsInvoker_, instance_, std::move(containerTag), std::move(reactTags)); - } - void manageChildren(jsi::Runtime &rt, double containerTag, jsi::Array moveFromIndices, jsi::Array moveToIndices, jsi::Array addChildReactTags, jsi::Array addAtIndices, jsi::Array removeAtIndices) override { - static_assert( - bridging::getParameterCount(&T::manageChildren) == 7, - "Expected manageChildren(...) to have 7 parameters"); - - return bridging::callFromJs( - rt, &T::manageChildren, jsInvoker_, instance_, std::move(containerTag), std::move(moveFromIndices), std::move(moveToIndices), std::move(addChildReactTags), std::move(addAtIndices), std::move(removeAtIndices)); - } - std::optional getConstantsForViewManager(jsi::Runtime &rt, jsi::String viewManagerName) override { - static_assert( - bridging::getParameterCount(&T::getConstantsForViewManager) == 2, - "Expected getConstantsForViewManager(...) to have 2 parameters"); - - return bridging::callFromJs>( - rt, &T::getConstantsForViewManager, jsInvoker_, instance_, std::move(viewManagerName)); - } - jsi::Array getDefaultEventTypes(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::getDefaultEventTypes) == 1, - "Expected getDefaultEventTypes(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::getDefaultEventTypes, jsInvoker_, instance_); - } - void setLayoutAnimationEnabledExperimental(jsi::Runtime &rt, bool enabled) override { - static_assert( - bridging::getParameterCount(&T::setLayoutAnimationEnabledExperimental) == 2, - "Expected setLayoutAnimationEnabledExperimental(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::setLayoutAnimationEnabledExperimental, jsInvoker_, instance_, std::move(enabled)); - } - void sendAccessibilityEvent(jsi::Runtime &rt, double reactTag, double eventType) override { - static_assert( - bridging::getParameterCount(&T::sendAccessibilityEvent) == 3, - "Expected sendAccessibilityEvent(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::sendAccessibilityEvent, jsInvoker_, instance_, std::move(reactTag), std::move(eventType)); - } - jsi::Object lazilyLoadView(jsi::Runtime &rt, jsi::String name) override { - static_assert( - bridging::getParameterCount(&T::lazilyLoadView) == 2, - "Expected lazilyLoadView(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::lazilyLoadView, jsInvoker_, instance_, std::move(name)); - } - void focus(jsi::Runtime &rt, double reactTag) override { - static_assert( - bridging::getParameterCount(&T::focus) == 2, - "Expected focus(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::focus, jsInvoker_, instance_, std::move(reactTag)); - } - void blur(jsi::Runtime &rt, double reactTag) override { - static_assert( - bridging::getParameterCount(&T::blur) == 2, - "Expected blur(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::blur, jsInvoker_, instance_, std::move(reactTag)); - } - - private: - friend class NativeUIManagerCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - class JSI_EXPORT NativeVibrationCxxSpecJSI : public TurboModule { -protected: - NativeVibrationCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual jsi::Object getConstants(jsi::Runtime &rt) = 0; - virtual void vibrate(jsi::Runtime &rt, double pattern) = 0; - virtual void vibrateByPattern(jsi::Runtime &rt, jsi::Array pattern, double repeat) = 0; - virtual void cancel(jsi::Runtime &rt) = 0; - -}; - -template -class JSI_EXPORT NativeVibrationCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "Vibration"; - -protected: - NativeVibrationCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeVibrationCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeVibrationCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeVibrationCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - jsi::Object getConstants(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::getConstants) == 1, - "Expected getConstants(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::getConstants, jsInvoker_, instance_); - } - void vibrate(jsi::Runtime &rt, double pattern) override { - static_assert( - bridging::getParameterCount(&T::vibrate) == 2, - "Expected vibrate(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::vibrate, jsInvoker_, instance_, std::move(pattern)); - } - void vibrateByPattern(jsi::Runtime &rt, jsi::Array pattern, double repeat) override { - static_assert( - bridging::getParameterCount(&T::vibrateByPattern) == 3, - "Expected vibrateByPattern(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::vibrateByPattern, jsInvoker_, instance_, std::move(pattern), std::move(repeat)); - } - void cancel(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::cancel) == 1, - "Expected cancel(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::cancel, jsInvoker_, instance_); - } - - private: - friend class NativeVibrationCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - class JSI_EXPORT NativeWebSocketModuleCxxSpecJSI : public TurboModule { -protected: - NativeWebSocketModuleCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual void connect(jsi::Runtime &rt, jsi::String url, std::optional protocols, jsi::Object options, double socketID) = 0; - virtual void send(jsi::Runtime &rt, jsi::String message, double forSocketID) = 0; - virtual void sendBinary(jsi::Runtime &rt, jsi::String base64String, double forSocketID) = 0; - virtual void ping(jsi::Runtime &rt, double socketID) = 0; - virtual void close(jsi::Runtime &rt, double code, jsi::String reason, double socketID) = 0; - virtual void addListener(jsi::Runtime &rt, jsi::String eventName) = 0; - virtual void removeListeners(jsi::Runtime &rt, double count) = 0; - -}; - -template -class JSI_EXPORT NativeWebSocketModuleCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "WebSocketModule"; - -protected: - NativeWebSocketModuleCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeWebSocketModuleCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeWebSocketModuleCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeWebSocketModuleCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - void connect(jsi::Runtime &rt, jsi::String url, std::optional protocols, jsi::Object options, double socketID) override { - static_assert( - bridging::getParameterCount(&T::connect) == 5, - "Expected connect(...) to have 5 parameters"); - - return bridging::callFromJs( - rt, &T::connect, jsInvoker_, instance_, std::move(url), std::move(protocols), std::move(options), std::move(socketID)); - } - void send(jsi::Runtime &rt, jsi::String message, double forSocketID) override { - static_assert( - bridging::getParameterCount(&T::send) == 3, - "Expected send(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::send, jsInvoker_, instance_, std::move(message), std::move(forSocketID)); - } - void sendBinary(jsi::Runtime &rt, jsi::String base64String, double forSocketID) override { - static_assert( - bridging::getParameterCount(&T::sendBinary) == 3, - "Expected sendBinary(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::sendBinary, jsInvoker_, instance_, std::move(base64String), std::move(forSocketID)); - } - void ping(jsi::Runtime &rt, double socketID) override { - static_assert( - bridging::getParameterCount(&T::ping) == 2, - "Expected ping(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::ping, jsInvoker_, instance_, std::move(socketID)); - } - void close(jsi::Runtime &rt, double code, jsi::String reason, double socketID) override { - static_assert( - bridging::getParameterCount(&T::close) == 4, - "Expected close(...) to have 4 parameters"); - - return bridging::callFromJs( - rt, &T::close, jsInvoker_, instance_, std::move(code), std::move(reason), std::move(socketID)); - } - void addListener(jsi::Runtime &rt, jsi::String eventName) override { - static_assert( - bridging::getParameterCount(&T::addListener) == 2, - "Expected addListener(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::addListener, jsInvoker_, instance_, std::move(eventName)); - } - void removeListeners(jsi::Runtime &rt, double count) override { - static_assert( - bridging::getParameterCount(&T::removeListeners) == 2, - "Expected removeListeners(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::removeListeners, jsInvoker_, instance_, std::move(count)); - } - - private: - friend class NativeWebSocketModuleCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - class JSI_EXPORT NativeDevMenuCxxSpecJSI : public TurboModule { -protected: - NativeDevMenuCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual void show(jsi::Runtime &rt) = 0; - virtual void reload(jsi::Runtime &rt) = 0; - virtual void setProfilingEnabled(jsi::Runtime &rt, bool enabled) = 0; - virtual void setHotLoadingEnabled(jsi::Runtime &rt, bool enabled) = 0; - -}; - -template -class JSI_EXPORT NativeDevMenuCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "DevMenu"; - -protected: - NativeDevMenuCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeDevMenuCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeDevMenuCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeDevMenuCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - void show(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::show) == 1, - "Expected show(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::show, jsInvoker_, instance_); - } - void reload(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::reload) == 1, - "Expected reload(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::reload, jsInvoker_, instance_); - } - void setProfilingEnabled(jsi::Runtime &rt, bool enabled) override { - static_assert( - bridging::getParameterCount(&T::setProfilingEnabled) == 2, - "Expected setProfilingEnabled(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::setProfilingEnabled, jsInvoker_, instance_, std::move(enabled)); - } - void setHotLoadingEnabled(jsi::Runtime &rt, bool enabled) override { - static_assert( - bridging::getParameterCount(&T::setHotLoadingEnabled) == 2, - "Expected setHotLoadingEnabled(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::setHotLoadingEnabled, jsInvoker_, instance_, std::move(enabled)); - } - - private: - friend class NativeDevMenuCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - -#pragma mark - NativeReactDevToolsRuntimeSettingsModulePartialReloadAndProfileConfig - -template -struct NativeReactDevToolsRuntimeSettingsModulePartialReloadAndProfileConfig { - P0 shouldReloadAndProfile; - P1 recordChangeDescriptions; - bool operator==(const NativeReactDevToolsRuntimeSettingsModulePartialReloadAndProfileConfig &other) const { - return shouldReloadAndProfile == other.shouldReloadAndProfile && recordChangeDescriptions == other.recordChangeDescriptions; - } -}; - -template -struct NativeReactDevToolsRuntimeSettingsModulePartialReloadAndProfileConfigBridging { - static T types; - - static T fromJs( - jsi::Runtime &rt, - const jsi::Object &value, - const std::shared_ptr &jsInvoker) { - T result{ - bridging::fromJs(rt, value.getProperty(rt, "shouldReloadAndProfile"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "recordChangeDescriptions"), jsInvoker)}; - return result; - } - -#ifdef DEBUG - static bool shouldReloadAndProfileToJs(jsi::Runtime &rt, decltype(types.shouldReloadAndProfile) value) { - return bridging::toJs(rt, value); - } - - static bool recordChangeDescriptionsToJs(jsi::Runtime &rt, decltype(types.recordChangeDescriptions) value) { - return bridging::toJs(rt, value); - } -#endif - - static jsi::Object toJs( - jsi::Runtime &rt, - const T &value, - const std::shared_ptr &jsInvoker) { - auto result = facebook::jsi::Object(rt); - if (value.shouldReloadAndProfile) { - result.setProperty(rt, "shouldReloadAndProfile", bridging::toJs(rt, value.shouldReloadAndProfile.value(), jsInvoker)); - } - if (value.recordChangeDescriptions) { - result.setProperty(rt, "recordChangeDescriptions", bridging::toJs(rt, value.recordChangeDescriptions.value(), jsInvoker)); - } - return result; - } -}; - - - -#pragma mark - NativeReactDevToolsRuntimeSettingsModuleReloadAndProfileConfig - -template -struct NativeReactDevToolsRuntimeSettingsModuleReloadAndProfileConfig { - P0 shouldReloadAndProfile; - P1 recordChangeDescriptions; - bool operator==(const NativeReactDevToolsRuntimeSettingsModuleReloadAndProfileConfig &other) const { - return shouldReloadAndProfile == other.shouldReloadAndProfile && recordChangeDescriptions == other.recordChangeDescriptions; - } -}; - -template -struct NativeReactDevToolsRuntimeSettingsModuleReloadAndProfileConfigBridging { - static T types; - - static T fromJs( - jsi::Runtime &rt, - const jsi::Object &value, - const std::shared_ptr &jsInvoker) { - T result{ - bridging::fromJs(rt, value.getProperty(rt, "shouldReloadAndProfile"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "recordChangeDescriptions"), jsInvoker)}; - return result; - } - -#ifdef DEBUG - static bool shouldReloadAndProfileToJs(jsi::Runtime &rt, decltype(types.shouldReloadAndProfile) value) { - return bridging::toJs(rt, value); - } - - static bool recordChangeDescriptionsToJs(jsi::Runtime &rt, decltype(types.recordChangeDescriptions) value) { - return bridging::toJs(rt, value); - } -#endif - - static jsi::Object toJs( - jsi::Runtime &rt, - const T &value, - const std::shared_ptr &jsInvoker) { - auto result = facebook::jsi::Object(rt); - result.setProperty(rt, "shouldReloadAndProfile", bridging::toJs(rt, value.shouldReloadAndProfile, jsInvoker)); - result.setProperty(rt, "recordChangeDescriptions", bridging::toJs(rt, value.recordChangeDescriptions, jsInvoker)); - return result; - } -}; - -class JSI_EXPORT NativeReactDevToolsRuntimeSettingsModuleCxxSpecJSI : public TurboModule { -protected: - NativeReactDevToolsRuntimeSettingsModuleCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual void setReloadAndProfileConfig(jsi::Runtime &rt, jsi::Object config) = 0; - virtual jsi::Object getReloadAndProfileConfig(jsi::Runtime &rt) = 0; - -}; - -template -class JSI_EXPORT NativeReactDevToolsRuntimeSettingsModuleCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "ReactDevToolsRuntimeSettingsModule"; - -protected: - NativeReactDevToolsRuntimeSettingsModuleCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeReactDevToolsRuntimeSettingsModuleCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeReactDevToolsRuntimeSettingsModuleCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeReactDevToolsRuntimeSettingsModuleCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - void setReloadAndProfileConfig(jsi::Runtime &rt, jsi::Object config) override { - static_assert( - bridging::getParameterCount(&T::setReloadAndProfileConfig) == 2, - "Expected setReloadAndProfileConfig(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::setReloadAndProfileConfig, jsInvoker_, instance_, std::move(config)); - } - jsi::Object getReloadAndProfileConfig(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::getReloadAndProfileConfig) == 1, - "Expected getReloadAndProfileConfig(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::getReloadAndProfileConfig, jsInvoker_, instance_); - } - - private: - friend class NativeReactDevToolsRuntimeSettingsModuleCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - class JSI_EXPORT NativeReactDevToolsSettingsManagerCxxSpecJSI : public TurboModule { -protected: - NativeReactDevToolsSettingsManagerCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual void setGlobalHookSettings(jsi::Runtime &rt, jsi::String settings) = 0; - virtual std::optional getGlobalHookSettings(jsi::Runtime &rt) = 0; - -}; - -template -class JSI_EXPORT NativeReactDevToolsSettingsManagerCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "ReactDevToolsSettingsManager"; - -protected: - NativeReactDevToolsSettingsManagerCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeReactDevToolsSettingsManagerCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeReactDevToolsSettingsManagerCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeReactDevToolsSettingsManagerCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - void setGlobalHookSettings(jsi::Runtime &rt, jsi::String settings) override { - static_assert( - bridging::getParameterCount(&T::setGlobalHookSettings) == 2, - "Expected setGlobalHookSettings(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::setGlobalHookSettings, jsInvoker_, instance_, std::move(settings)); - } - std::optional getGlobalHookSettings(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::getGlobalHookSettings) == 1, - "Expected getGlobalHookSettings(...) to have 1 parameters"); - - return bridging::callFromJs>( - rt, &T::getGlobalHookSettings, jsInvoker_, instance_); - } - - private: - friend class NativeReactDevToolsSettingsManagerCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - -#pragma mark - NativeIdleCallbacksIdleDeadline - -template -struct NativeIdleCallbacksIdleDeadline { - P0 didTimeout; - P1 timeRemaining; - bool operator==(const NativeIdleCallbacksIdleDeadline &other) const { - return didTimeout == other.didTimeout && timeRemaining == other.timeRemaining; - } -}; - -template -struct NativeIdleCallbacksIdleDeadlineBridging { - static T types; - - static T fromJs( - jsi::Runtime &rt, - const jsi::Object &value, - const std::shared_ptr &jsInvoker) { - T result{ - bridging::fromJs(rt, value.getProperty(rt, "didTimeout"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "timeRemaining"), jsInvoker)}; - return result; - } - -#ifdef DEBUG - static bool didTimeoutToJs(jsi::Runtime &rt, decltype(types.didTimeout) value) { - return bridging::toJs(rt, value); - } - - static jsi::Function timeRemainingToJs(jsi::Runtime &rt, decltype(types.timeRemaining) value) { - return bridging::toJs(rt, value); - } -#endif - - static jsi::Object toJs( - jsi::Runtime &rt, - const T &value, - const std::shared_ptr &jsInvoker) { - auto result = facebook::jsi::Object(rt); - result.setProperty(rt, "didTimeout", bridging::toJs(rt, value.didTimeout, jsInvoker)); - result.setProperty(rt, "timeRemaining", bridging::toJs(rt, value.timeRemaining, jsInvoker)); - return result; - } -}; - - - -#pragma mark - NativeIdleCallbacksRequestIdleCallbackOptions - -template -struct NativeIdleCallbacksRequestIdleCallbackOptions { - P0 timeout; - bool operator==(const NativeIdleCallbacksRequestIdleCallbackOptions &other) const { - return timeout == other.timeout; - } -}; - -template -struct NativeIdleCallbacksRequestIdleCallbackOptionsBridging { - static T types; - - static T fromJs( - jsi::Runtime &rt, - const jsi::Object &value, - const std::shared_ptr &jsInvoker) { - T result{ - bridging::fromJs(rt, value.getProperty(rt, "timeout"), jsInvoker)}; - return result; - } - -#ifdef DEBUG - static double timeoutToJs(jsi::Runtime &rt, decltype(types.timeout) value) { - return bridging::toJs(rt, value); - } -#endif - - static jsi::Object toJs( - jsi::Runtime &rt, - const T &value, - const std::shared_ptr &jsInvoker) { - auto result = facebook::jsi::Object(rt); - if (value.timeout) { - result.setProperty(rt, "timeout", bridging::toJs(rt, value.timeout.value(), jsInvoker)); - } - return result; - } -}; - -class JSI_EXPORT NativeIdleCallbacksCxxSpecJSI : public TurboModule { -protected: - NativeIdleCallbacksCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual jsi::Value requestIdleCallback(jsi::Runtime &rt, jsi::Function callback, std::optional options) = 0; - virtual void cancelIdleCallback(jsi::Runtime &rt, jsi::Value handle) = 0; - -}; - -template -class JSI_EXPORT NativeIdleCallbacksCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "NativeIdleCallbacksCxx"; - -protected: - NativeIdleCallbacksCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeIdleCallbacksCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeIdleCallbacksCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeIdleCallbacksCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - jsi::Value requestIdleCallback(jsi::Runtime &rt, jsi::Function callback, std::optional options) override { - static_assert( - bridging::getParameterCount(&T::requestIdleCallback) == 3, - "Expected requestIdleCallback(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::requestIdleCallback, jsInvoker_, instance_, std::move(callback), std::move(options)); - } - void cancelIdleCallback(jsi::Runtime &rt, jsi::Value handle) override { - static_assert( - bridging::getParameterCount(&T::cancelIdleCallback) == 2, - "Expected cancelIdleCallback(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::cancelIdleCallback, jsInvoker_, instance_, std::move(handle)); - } - - private: - friend class NativeIdleCallbacksCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - -#pragma mark - NativeIntersectionObserverNativeIntersectionObserverEntry - -template -struct NativeIntersectionObserverNativeIntersectionObserverEntry { - P0 intersectionObserverId; - P1 targetInstanceHandle; - P2 targetRect; - P3 rootRect; - P4 intersectionRect; - P5 isIntersectingAboveThresholds; - P6 time; - bool operator==(const NativeIntersectionObserverNativeIntersectionObserverEntry &other) const { - return intersectionObserverId == other.intersectionObserverId && targetInstanceHandle == other.targetInstanceHandle && targetRect == other.targetRect && rootRect == other.rootRect && intersectionRect == other.intersectionRect && isIntersectingAboveThresholds == other.isIntersectingAboveThresholds && time == other.time; - } -}; - -template -struct NativeIntersectionObserverNativeIntersectionObserverEntryBridging { - static T types; - - static T fromJs( - jsi::Runtime &rt, - const jsi::Object &value, - const std::shared_ptr &jsInvoker) { - T result{ - bridging::fromJs(rt, value.getProperty(rt, "intersectionObserverId"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "targetInstanceHandle"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "targetRect"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "rootRect"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "intersectionRect"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "isIntersectingAboveThresholds"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "time"), jsInvoker)}; - return result; - } - -#ifdef DEBUG - static double intersectionObserverIdToJs(jsi::Runtime &rt, decltype(types.intersectionObserverId) value) { - return bridging::toJs(rt, value); - } - - static jsi::Value targetInstanceHandleToJs(jsi::Runtime &rt, decltype(types.targetInstanceHandle) value) { - return bridging::toJs(rt, value); - } - - static jsi::Array targetRectToJs(jsi::Runtime &rt, decltype(types.targetRect) value) { - return bridging::toJs(rt, value); - } - - static jsi::Array rootRectToJs(jsi::Runtime &rt, decltype(types.rootRect) value) { - return bridging::toJs(rt, value); - } - - static std::optional intersectionRectToJs(jsi::Runtime &rt, decltype(types.intersectionRect) value) { - return bridging::toJs(rt, value); - } - - static bool isIntersectingAboveThresholdsToJs(jsi::Runtime &rt, decltype(types.isIntersectingAboveThresholds) value) { - return bridging::toJs(rt, value); - } - - static double timeToJs(jsi::Runtime &rt, decltype(types.time) value) { - return bridging::toJs(rt, value); - } -#endif - - static jsi::Object toJs( - jsi::Runtime &rt, - const T &value, - const std::shared_ptr &jsInvoker) { - auto result = facebook::jsi::Object(rt); - result.setProperty(rt, "intersectionObserverId", bridging::toJs(rt, value.intersectionObserverId, jsInvoker)); - result.setProperty(rt, "targetInstanceHandle", bridging::toJs(rt, value.targetInstanceHandle, jsInvoker)); - result.setProperty(rt, "targetRect", bridging::toJs(rt, value.targetRect, jsInvoker)); - result.setProperty(rt, "rootRect", bridging::toJs(rt, value.rootRect, jsInvoker)); - result.setProperty(rt, "intersectionRect", bridging::toJs(rt, value.intersectionRect, jsInvoker)); - result.setProperty(rt, "isIntersectingAboveThresholds", bridging::toJs(rt, value.isIntersectingAboveThresholds, jsInvoker)); - result.setProperty(rt, "time", bridging::toJs(rt, value.time, jsInvoker)); - return result; - } -}; - - - -#pragma mark - NativeIntersectionObserverNativeIntersectionObserverObserveOptions - -template -struct NativeIntersectionObserverNativeIntersectionObserverObserveOptions { - P0 intersectionObserverId; - P1 rootShadowNode; - P2 targetShadowNode; - P3 thresholds; - P4 rootThresholds; - bool operator==(const NativeIntersectionObserverNativeIntersectionObserverObserveOptions &other) const { - return intersectionObserverId == other.intersectionObserverId && rootShadowNode == other.rootShadowNode && targetShadowNode == other.targetShadowNode && thresholds == other.thresholds && rootThresholds == other.rootThresholds; - } -}; - -template -struct NativeIntersectionObserverNativeIntersectionObserverObserveOptionsBridging { - static T types; - - static T fromJs( - jsi::Runtime &rt, - const jsi::Object &value, - const std::shared_ptr &jsInvoker) { - T result{ - bridging::fromJs(rt, value.getProperty(rt, "intersectionObserverId"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "rootShadowNode"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "targetShadowNode"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "thresholds"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "rootThresholds"), jsInvoker)}; - return result; - } - -#ifdef DEBUG - static double intersectionObserverIdToJs(jsi::Runtime &rt, decltype(types.intersectionObserverId) value) { - return bridging::toJs(rt, value); - } - - static std::optional rootShadowNodeToJs(jsi::Runtime &rt, decltype(types.rootShadowNode) value) { - return bridging::toJs(rt, value); - } - - static jsi::Value targetShadowNodeToJs(jsi::Runtime &rt, decltype(types.targetShadowNode) value) { - return bridging::toJs(rt, value); - } - - static jsi::Array thresholdsToJs(jsi::Runtime &rt, decltype(types.thresholds) value) { - return bridging::toJs(rt, value); - } - - static std::optional rootThresholdsToJs(jsi::Runtime &rt, decltype(types.rootThresholds) value) { - return bridging::toJs(rt, value); - } -#endif - - static jsi::Object toJs( - jsi::Runtime &rt, - const T &value, - const std::shared_ptr &jsInvoker) { - auto result = facebook::jsi::Object(rt); - result.setProperty(rt, "intersectionObserverId", bridging::toJs(rt, value.intersectionObserverId, jsInvoker)); - if (value.rootShadowNode) { - result.setProperty(rt, "rootShadowNode", bridging::toJs(rt, value.rootShadowNode.value(), jsInvoker)); - } - result.setProperty(rt, "targetShadowNode", bridging::toJs(rt, value.targetShadowNode, jsInvoker)); - result.setProperty(rt, "thresholds", bridging::toJs(rt, value.thresholds, jsInvoker)); - if (value.rootThresholds) { - result.setProperty(rt, "rootThresholds", bridging::toJs(rt, value.rootThresholds.value(), jsInvoker)); - } - return result; - } -}; - -class JSI_EXPORT NativeIntersectionObserverCxxSpecJSI : public TurboModule { -protected: - NativeIntersectionObserverCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual jsi::Value observeV2(jsi::Runtime &rt, jsi::Object options) = 0; - virtual void unobserveV2(jsi::Runtime &rt, double intersectionObserverId, jsi::Value token) = 0; - virtual void connect(jsi::Runtime &rt, jsi::Function notifyIntersectionObserversCallback) = 0; - virtual void disconnect(jsi::Runtime &rt) = 0; - virtual jsi::Array takeRecords(jsi::Runtime &rt) = 0; - -}; - -template -class JSI_EXPORT NativeIntersectionObserverCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "NativeIntersectionObserverCxx"; - -protected: - NativeIntersectionObserverCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeIntersectionObserverCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeIntersectionObserverCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeIntersectionObserverCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - jsi::Value observeV2(jsi::Runtime &rt, jsi::Object options) override { - static_assert( - bridging::getParameterCount(&T::observeV2) == 2, - "Expected observeV2(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::observeV2, jsInvoker_, instance_, std::move(options)); - } - void unobserveV2(jsi::Runtime &rt, double intersectionObserverId, jsi::Value token) override { - static_assert( - bridging::getParameterCount(&T::unobserveV2) == 3, - "Expected unobserveV2(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::unobserveV2, jsInvoker_, instance_, std::move(intersectionObserverId), std::move(token)); - } - void connect(jsi::Runtime &rt, jsi::Function notifyIntersectionObserversCallback) override { - static_assert( - bridging::getParameterCount(&T::connect) == 2, - "Expected connect(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::connect, jsInvoker_, instance_, std::move(notifyIntersectionObserversCallback)); - } - void disconnect(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::disconnect) == 1, - "Expected disconnect(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::disconnect, jsInvoker_, instance_); - } - jsi::Array takeRecords(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::takeRecords) == 1, - "Expected takeRecords(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::takeRecords, jsInvoker_, instance_); - } - - private: - friend class NativeIntersectionObserverCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - class JSI_EXPORT NativeMicrotasksCxxSpecJSI : public TurboModule { -protected: - NativeMicrotasksCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual void queueMicrotask(jsi::Runtime &rt, jsi::Function callback) = 0; - -}; - -template -class JSI_EXPORT NativeMicrotasksCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "NativeMicrotasksCxx"; - -protected: - NativeMicrotasksCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeMicrotasksCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeMicrotasksCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeMicrotasksCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - void queueMicrotask(jsi::Runtime &rt, jsi::Function callback) override { - static_assert( - bridging::getParameterCount(&T::queueMicrotask) == 2, - "Expected queueMicrotask(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::queueMicrotask, jsInvoker_, instance_, std::move(callback)); - } - - private: - friend class NativeMicrotasksCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - -#pragma mark - NativeMutationObserverNativeMutationObserverObserveOptions - -template -struct NativeMutationObserverNativeMutationObserverObserveOptions { - P0 mutationObserverId; - P1 targetShadowNode; - P2 subtree; - bool operator==(const NativeMutationObserverNativeMutationObserverObserveOptions &other) const { - return mutationObserverId == other.mutationObserverId && targetShadowNode == other.targetShadowNode && subtree == other.subtree; - } -}; - -template -struct NativeMutationObserverNativeMutationObserverObserveOptionsBridging { - static T types; - - static T fromJs( - jsi::Runtime &rt, - const jsi::Object &value, - const std::shared_ptr &jsInvoker) { - T result{ - bridging::fromJs(rt, value.getProperty(rt, "mutationObserverId"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "targetShadowNode"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "subtree"), jsInvoker)}; - return result; - } - -#ifdef DEBUG - static double mutationObserverIdToJs(jsi::Runtime &rt, decltype(types.mutationObserverId) value) { - return bridging::toJs(rt, value); - } - - static jsi::Value targetShadowNodeToJs(jsi::Runtime &rt, decltype(types.targetShadowNode) value) { - return bridging::toJs(rt, value); - } - - static bool subtreeToJs(jsi::Runtime &rt, decltype(types.subtree) value) { - return bridging::toJs(rt, value); - } -#endif - - static jsi::Object toJs( - jsi::Runtime &rt, - const T &value, - const std::shared_ptr &jsInvoker) { - auto result = facebook::jsi::Object(rt); - result.setProperty(rt, "mutationObserverId", bridging::toJs(rt, value.mutationObserverId, jsInvoker)); - result.setProperty(rt, "targetShadowNode", bridging::toJs(rt, value.targetShadowNode, jsInvoker)); - result.setProperty(rt, "subtree", bridging::toJs(rt, value.subtree, jsInvoker)); - return result; - } -}; - - - -#pragma mark - NativeMutationObserverNativeMutationRecord - -template -struct NativeMutationObserverNativeMutationRecord { - P0 mutationObserverId; - P1 target; - P2 addedNodes; - P3 removedNodes; - bool operator==(const NativeMutationObserverNativeMutationRecord &other) const { - return mutationObserverId == other.mutationObserverId && target == other.target && addedNodes == other.addedNodes && removedNodes == other.removedNodes; - } -}; - -template -struct NativeMutationObserverNativeMutationRecordBridging { - static T types; - - static T fromJs( - jsi::Runtime &rt, - const jsi::Object &value, - const std::shared_ptr &jsInvoker) { - T result{ - bridging::fromJs(rt, value.getProperty(rt, "mutationObserverId"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "target"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "addedNodes"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "removedNodes"), jsInvoker)}; - return result; - } - -#ifdef DEBUG - static double mutationObserverIdToJs(jsi::Runtime &rt, decltype(types.mutationObserverId) value) { - return bridging::toJs(rt, value); - } - - static jsi::Value targetToJs(jsi::Runtime &rt, decltype(types.target) value) { - return bridging::toJs(rt, value); - } - - static jsi::Array addedNodesToJs(jsi::Runtime &rt, decltype(types.addedNodes) value) { - return bridging::toJs(rt, value); - } - - static jsi::Array removedNodesToJs(jsi::Runtime &rt, decltype(types.removedNodes) value) { - return bridging::toJs(rt, value); - } -#endif - - static jsi::Object toJs( - jsi::Runtime &rt, - const T &value, - const std::shared_ptr &jsInvoker) { - auto result = facebook::jsi::Object(rt); - result.setProperty(rt, "mutationObserverId", bridging::toJs(rt, value.mutationObserverId, jsInvoker)); - result.setProperty(rt, "target", bridging::toJs(rt, value.target, jsInvoker)); - result.setProperty(rt, "addedNodes", bridging::toJs(rt, value.addedNodes, jsInvoker)); - result.setProperty(rt, "removedNodes", bridging::toJs(rt, value.removedNodes, jsInvoker)); - return result; - } -}; - -class JSI_EXPORT NativeMutationObserverCxxSpecJSI : public TurboModule { -protected: - NativeMutationObserverCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual void observe(jsi::Runtime &rt, jsi::Object options) = 0; - virtual void unobserveAll(jsi::Runtime &rt, double mutationObserverId) = 0; - virtual void connect(jsi::Runtime &rt, jsi::Function notifyMutationObservers, jsi::Function getPublicInstanceFromInstanceHandle) = 0; - virtual void disconnect(jsi::Runtime &rt) = 0; - virtual jsi::Array takeRecords(jsi::Runtime &rt) = 0; - -}; - -template -class JSI_EXPORT NativeMutationObserverCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "NativeMutationObserverCxx"; - -protected: - NativeMutationObserverCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeMutationObserverCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeMutationObserverCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeMutationObserverCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - void observe(jsi::Runtime &rt, jsi::Object options) override { - static_assert( - bridging::getParameterCount(&T::observe) == 2, - "Expected observe(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::observe, jsInvoker_, instance_, std::move(options)); - } - void unobserveAll(jsi::Runtime &rt, double mutationObserverId) override { - static_assert( - bridging::getParameterCount(&T::unobserveAll) == 2, - "Expected unobserveAll(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::unobserveAll, jsInvoker_, instance_, std::move(mutationObserverId)); - } - void connect(jsi::Runtime &rt, jsi::Function notifyMutationObservers, jsi::Function getPublicInstanceFromInstanceHandle) override { - static_assert( - bridging::getParameterCount(&T::connect) == 3, - "Expected connect(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::connect, jsInvoker_, instance_, std::move(notifyMutationObservers), std::move(getPublicInstanceFromInstanceHandle)); - } - void disconnect(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::disconnect) == 1, - "Expected disconnect(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::disconnect, jsInvoker_, instance_); - } - jsi::Array takeRecords(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::takeRecords) == 1, - "Expected takeRecords(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::takeRecords, jsInvoker_, instance_); - } - - private: - friend class NativeMutationObserverCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - - -#pragma mark - NativePerformancePerformanceObserverInit - -template -struct NativePerformancePerformanceObserverInit { - P0 entryTypes; - P1 type; - P2 buffered; - P3 durationThreshold; - bool operator==(const NativePerformancePerformanceObserverInit &other) const { - return entryTypes == other.entryTypes && type == other.type && buffered == other.buffered && durationThreshold == other.durationThreshold; - } -}; - -template -struct NativePerformancePerformanceObserverInitBridging { - static T types; - - static T fromJs( - jsi::Runtime &rt, - const jsi::Object &value, - const std::shared_ptr &jsInvoker) { - T result{ - bridging::fromJs(rt, value.getProperty(rt, "entryTypes"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "type"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "buffered"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "durationThreshold"), jsInvoker)}; - return result; - } - -#ifdef DEBUG - static jsi::Array entryTypesToJs(jsi::Runtime &rt, decltype(types.entryTypes) value) { - return bridging::toJs(rt, value); - } - - static double typeToJs(jsi::Runtime &rt, decltype(types.type) value) { - return bridging::toJs(rt, value); - } - - static bool bufferedToJs(jsi::Runtime &rt, decltype(types.buffered) value) { - return bridging::toJs(rt, value); - } - - static double durationThresholdToJs(jsi::Runtime &rt, decltype(types.durationThreshold) value) { - return bridging::toJs(rt, value); - } -#endif - - static jsi::Object toJs( - jsi::Runtime &rt, - const T &value, - const std::shared_ptr &jsInvoker) { - auto result = facebook::jsi::Object(rt); - if (value.entryTypes) { - result.setProperty(rt, "entryTypes", bridging::toJs(rt, value.entryTypes.value(), jsInvoker)); - } - if (value.type) { - result.setProperty(rt, "type", bridging::toJs(rt, value.type.value(), jsInvoker)); - } - if (value.buffered) { - result.setProperty(rt, "buffered", bridging::toJs(rt, value.buffered.value(), jsInvoker)); - } - if (value.durationThreshold) { - result.setProperty(rt, "durationThreshold", bridging::toJs(rt, value.durationThreshold.value(), jsInvoker)); - } - return result; - } -}; - - - -#pragma mark - NativePerformanceRawPerformanceEntry - -template -struct NativePerformanceRawPerformanceEntry { - P0 name; - P1 entryType; - P2 startTime; - P3 duration; - P4 processingStart; - P5 processingEnd; - P6 interactionId; - P7 fetchStart; - P8 requestStart; - P9 connectStart; - P10 connectEnd; - P11 responseStart; - P12 responseEnd; - P13 responseStatus; - bool operator==(const NativePerformanceRawPerformanceEntry &other) const { - return name == other.name && entryType == other.entryType && startTime == other.startTime && duration == other.duration && processingStart == other.processingStart && processingEnd == other.processingEnd && interactionId == other.interactionId && fetchStart == other.fetchStart && requestStart == other.requestStart && connectStart == other.connectStart && connectEnd == other.connectEnd && responseStart == other.responseStart && responseEnd == other.responseEnd && responseStatus == other.responseStatus; - } -}; - -template -struct NativePerformanceRawPerformanceEntryBridging { - static T types; - - static T fromJs( - jsi::Runtime &rt, - const jsi::Object &value, - const std::shared_ptr &jsInvoker) { - T result{ - bridging::fromJs(rt, value.getProperty(rt, "name"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "entryType"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "startTime"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "duration"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "processingStart"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "processingEnd"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "interactionId"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "fetchStart"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "requestStart"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "connectStart"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "connectEnd"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "responseStart"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "responseEnd"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "responseStatus"), jsInvoker)}; - return result; - } - -#ifdef DEBUG - static jsi::String nameToJs(jsi::Runtime &rt, decltype(types.name) value) { - return bridging::toJs(rt, value); - } - - static double entryTypeToJs(jsi::Runtime &rt, decltype(types.entryType) value) { - return bridging::toJs(rt, value); - } - - static double startTimeToJs(jsi::Runtime &rt, decltype(types.startTime) value) { - return bridging::toJs(rt, value); - } - - static double durationToJs(jsi::Runtime &rt, decltype(types.duration) value) { - return bridging::toJs(rt, value); - } - - static double processingStartToJs(jsi::Runtime &rt, decltype(types.processingStart) value) { - return bridging::toJs(rt, value); - } - - static double processingEndToJs(jsi::Runtime &rt, decltype(types.processingEnd) value) { - return bridging::toJs(rt, value); - } - - static double interactionIdToJs(jsi::Runtime &rt, decltype(types.interactionId) value) { - return bridging::toJs(rt, value); - } - - static double fetchStartToJs(jsi::Runtime &rt, decltype(types.fetchStart) value) { - return bridging::toJs(rt, value); - } - - static double requestStartToJs(jsi::Runtime &rt, decltype(types.requestStart) value) { - return bridging::toJs(rt, value); - } - - static double connectStartToJs(jsi::Runtime &rt, decltype(types.connectStart) value) { - return bridging::toJs(rt, value); - } - - static double connectEndToJs(jsi::Runtime &rt, decltype(types.connectEnd) value) { - return bridging::toJs(rt, value); - } - - static double responseStartToJs(jsi::Runtime &rt, decltype(types.responseStart) value) { - return bridging::toJs(rt, value); - } - - static double responseEndToJs(jsi::Runtime &rt, decltype(types.responseEnd) value) { - return bridging::toJs(rt, value); - } - - static double responseStatusToJs(jsi::Runtime &rt, decltype(types.responseStatus) value) { - return bridging::toJs(rt, value); - } -#endif - - static jsi::Object toJs( - jsi::Runtime &rt, - const T &value, - const std::shared_ptr &jsInvoker) { - auto result = facebook::jsi::Object(rt); - result.setProperty(rt, "name", bridging::toJs(rt, value.name, jsInvoker)); - result.setProperty(rt, "entryType", bridging::toJs(rt, value.entryType, jsInvoker)); - result.setProperty(rt, "startTime", bridging::toJs(rt, value.startTime, jsInvoker)); - result.setProperty(rt, "duration", bridging::toJs(rt, value.duration, jsInvoker)); - if (value.processingStart) { - result.setProperty(rt, "processingStart", bridging::toJs(rt, value.processingStart.value(), jsInvoker)); - } - if (value.processingEnd) { - result.setProperty(rt, "processingEnd", bridging::toJs(rt, value.processingEnd.value(), jsInvoker)); - } - if (value.interactionId) { - result.setProperty(rt, "interactionId", bridging::toJs(rt, value.interactionId.value(), jsInvoker)); - } - if (value.fetchStart) { - result.setProperty(rt, "fetchStart", bridging::toJs(rt, value.fetchStart.value(), jsInvoker)); - } - if (value.requestStart) { - result.setProperty(rt, "requestStart", bridging::toJs(rt, value.requestStart.value(), jsInvoker)); - } - if (value.connectStart) { - result.setProperty(rt, "connectStart", bridging::toJs(rt, value.connectStart.value(), jsInvoker)); - } - if (value.connectEnd) { - result.setProperty(rt, "connectEnd", bridging::toJs(rt, value.connectEnd.value(), jsInvoker)); - } - if (value.responseStart) { - result.setProperty(rt, "responseStart", bridging::toJs(rt, value.responseStart.value(), jsInvoker)); - } - if (value.responseEnd) { - result.setProperty(rt, "responseEnd", bridging::toJs(rt, value.responseEnd.value(), jsInvoker)); - } - if (value.responseStatus) { - result.setProperty(rt, "responseStatus", bridging::toJs(rt, value.responseStatus.value(), jsInvoker)); - } - return result; - } -}; - - -class JSI_EXPORT NativePerformanceCxxSpecJSI : public TurboModule { -protected: - NativePerformanceCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual double now(jsi::Runtime &rt) = 0; - virtual void reportMark(jsi::Runtime &rt, jsi::String name, double startTime, jsi::Value entry) = 0; - virtual void reportMeasure(jsi::Runtime &rt, jsi::String name, double startTime, double duration, jsi::Value entry) = 0; - virtual std::optional getMarkTime(jsi::Runtime &rt, jsi::String name) = 0; - virtual void clearMarks(jsi::Runtime &rt, std::optional entryName) = 0; - virtual void clearMeasures(jsi::Runtime &rt, std::optional entryName) = 0; - virtual jsi::Array getEntries(jsi::Runtime &rt) = 0; - virtual jsi::Array getEntriesByName(jsi::Runtime &rt, jsi::String entryName, std::optional entryType) = 0; - virtual jsi::Array getEntriesByType(jsi::Runtime &rt, double entryType) = 0; - virtual jsi::Array getEventCounts(jsi::Runtime &rt) = 0; - virtual jsi::Object getSimpleMemoryInfo(jsi::Runtime &rt) = 0; - virtual jsi::Object getReactNativeStartupTiming(jsi::Runtime &rt) = 0; - virtual jsi::Value createObserver(jsi::Runtime &rt, jsi::Function callback) = 0; - virtual double getDroppedEntriesCount(jsi::Runtime &rt, jsi::Value observer) = 0; - virtual void observe(jsi::Runtime &rt, jsi::Value observer, jsi::Object options) = 0; - virtual void disconnect(jsi::Runtime &rt, jsi::Value observer) = 0; - virtual jsi::Array takeRecords(jsi::Runtime &rt, jsi::Value observer, bool sort) = 0; - virtual jsi::Array getSupportedPerformanceEntryTypes(jsi::Runtime &rt) = 0; - virtual void clearEventCountsForTesting(jsi::Runtime &rt) = 0; - -}; - -template -class JSI_EXPORT NativePerformanceCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "NativePerformanceCxx"; - -protected: - NativePerformanceCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativePerformanceCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativePerformanceCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativePerformanceCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - double now(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::now) == 1, - "Expected now(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::now, jsInvoker_, instance_); - } - void reportMark(jsi::Runtime &rt, jsi::String name, double startTime, jsi::Value entry) override { - static_assert( - bridging::getParameterCount(&T::reportMark) == 4, - "Expected reportMark(...) to have 4 parameters"); - - return bridging::callFromJs( - rt, &T::reportMark, jsInvoker_, instance_, std::move(name), std::move(startTime), std::move(entry)); - } - void reportMeasure(jsi::Runtime &rt, jsi::String name, double startTime, double duration, jsi::Value entry) override { - static_assert( - bridging::getParameterCount(&T::reportMeasure) == 5, - "Expected reportMeasure(...) to have 5 parameters"); - - return bridging::callFromJs( - rt, &T::reportMeasure, jsInvoker_, instance_, std::move(name), std::move(startTime), std::move(duration), std::move(entry)); - } - std::optional getMarkTime(jsi::Runtime &rt, jsi::String name) override { - static_assert( - bridging::getParameterCount(&T::getMarkTime) == 2, - "Expected getMarkTime(...) to have 2 parameters"); - - return bridging::callFromJs>( - rt, &T::getMarkTime, jsInvoker_, instance_, std::move(name)); - } - void clearMarks(jsi::Runtime &rt, std::optional entryName) override { - static_assert( - bridging::getParameterCount(&T::clearMarks) == 2, - "Expected clearMarks(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::clearMarks, jsInvoker_, instance_, std::move(entryName)); - } - void clearMeasures(jsi::Runtime &rt, std::optional entryName) override { - static_assert( - bridging::getParameterCount(&T::clearMeasures) == 2, - "Expected clearMeasures(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::clearMeasures, jsInvoker_, instance_, std::move(entryName)); - } - jsi::Array getEntries(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::getEntries) == 1, - "Expected getEntries(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::getEntries, jsInvoker_, instance_); - } - jsi::Array getEntriesByName(jsi::Runtime &rt, jsi::String entryName, std::optional entryType) override { - static_assert( - bridging::getParameterCount(&T::getEntriesByName) == 3, - "Expected getEntriesByName(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::getEntriesByName, jsInvoker_, instance_, std::move(entryName), std::move(entryType)); - } - jsi::Array getEntriesByType(jsi::Runtime &rt, double entryType) override { - static_assert( - bridging::getParameterCount(&T::getEntriesByType) == 2, - "Expected getEntriesByType(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::getEntriesByType, jsInvoker_, instance_, std::move(entryType)); - } - jsi::Array getEventCounts(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::getEventCounts) == 1, - "Expected getEventCounts(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::getEventCounts, jsInvoker_, instance_); - } - jsi::Object getSimpleMemoryInfo(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::getSimpleMemoryInfo) == 1, - "Expected getSimpleMemoryInfo(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::getSimpleMemoryInfo, jsInvoker_, instance_); - } - jsi::Object getReactNativeStartupTiming(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::getReactNativeStartupTiming) == 1, - "Expected getReactNativeStartupTiming(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::getReactNativeStartupTiming, jsInvoker_, instance_); - } - jsi::Value createObserver(jsi::Runtime &rt, jsi::Function callback) override { - static_assert( - bridging::getParameterCount(&T::createObserver) == 2, - "Expected createObserver(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::createObserver, jsInvoker_, instance_, std::move(callback)); - } - double getDroppedEntriesCount(jsi::Runtime &rt, jsi::Value observer) override { - static_assert( - bridging::getParameterCount(&T::getDroppedEntriesCount) == 2, - "Expected getDroppedEntriesCount(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::getDroppedEntriesCount, jsInvoker_, instance_, std::move(observer)); - } - void observe(jsi::Runtime &rt, jsi::Value observer, jsi::Object options) override { - static_assert( - bridging::getParameterCount(&T::observe) == 3, - "Expected observe(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::observe, jsInvoker_, instance_, std::move(observer), std::move(options)); - } - void disconnect(jsi::Runtime &rt, jsi::Value observer) override { - static_assert( - bridging::getParameterCount(&T::disconnect) == 2, - "Expected disconnect(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::disconnect, jsInvoker_, instance_, std::move(observer)); - } - jsi::Array takeRecords(jsi::Runtime &rt, jsi::Value observer, bool sort) override { - static_assert( - bridging::getParameterCount(&T::takeRecords) == 3, - "Expected takeRecords(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::takeRecords, jsInvoker_, instance_, std::move(observer), std::move(sort)); - } - jsi::Array getSupportedPerformanceEntryTypes(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::getSupportedPerformanceEntryTypes) == 1, - "Expected getSupportedPerformanceEntryTypes(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::getSupportedPerformanceEntryTypes, jsInvoker_, instance_); - } - void clearEventCountsForTesting(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::clearEventCountsForTesting) == 1, - "Expected clearEventCountsForTesting(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::clearEventCountsForTesting, jsInvoker_, instance_); - } - - private: - friend class NativePerformanceCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - - class JSI_EXPORT NativeDOMCxxSpecJSI : public TurboModule { -protected: - NativeDOMCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual double compareDocumentPosition(jsi::Runtime &rt, jsi::Value nativeNodeReference, jsi::Value otherNativeNodeReference) = 0; - virtual jsi::Array getChildNodes(jsi::Runtime &rt, jsi::Value nativeNodeReference) = 0; - virtual jsi::Value getParentNode(jsi::Runtime &rt, jsi::Value nativeNodeReference) = 0; - virtual bool isConnected(jsi::Runtime &rt, jsi::Value nativeNodeReference) = 0; - virtual jsi::Array getBorderWidth(jsi::Runtime &rt, jsi::Value nativeElementReference) = 0; - virtual jsi::Array getBoundingClientRect(jsi::Runtime &rt, jsi::Value nativeElementReference, bool includeTransform) = 0; - virtual jsi::Array getInnerSize(jsi::Runtime &rt, jsi::Value nativeElementReference) = 0; - virtual jsi::Array getScrollPosition(jsi::Runtime &rt, jsi::Value nativeElementReference) = 0; - virtual jsi::Array getScrollSize(jsi::Runtime &rt, jsi::Value nativeElementReference) = 0; - virtual jsi::String getTagName(jsi::Runtime &rt, jsi::Value nativeElementReference) = 0; - virtual jsi::String getTextContent(jsi::Runtime &rt, jsi::Value nativeElementReference) = 0; - virtual bool hasPointerCapture(jsi::Runtime &rt, jsi::Value nativeElementReference, double pointerId) = 0; - virtual void releasePointerCapture(jsi::Runtime &rt, jsi::Value nativeElementReference, double pointerId) = 0; - virtual void setPointerCapture(jsi::Runtime &rt, jsi::Value nativeElementReference, double pointerId) = 0; - virtual jsi::Array getOffset(jsi::Runtime &rt, jsi::Value nativeElementReference) = 0; - virtual jsi::Value linkRootNode(jsi::Runtime &rt, double rootTag, jsi::Value instanceHandle) = 0; - virtual void measure(jsi::Runtime &rt, jsi::Value nativeElementReference, jsi::Function callback) = 0; - virtual void measureInWindow(jsi::Runtime &rt, jsi::Value nativeElementReference, jsi::Function callback) = 0; - virtual void measureLayout(jsi::Runtime &rt, jsi::Value nativeElementReference, jsi::Value relativeNode, jsi::Function onFail, jsi::Function onSuccess) = 0; - virtual void setNativeProps(jsi::Runtime &rt, jsi::Value nativeElementReference, jsi::Value updatePayload) = 0; - -}; - -template -class JSI_EXPORT NativeDOMCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "NativeDOMCxx"; - -protected: - NativeDOMCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeDOMCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeDOMCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeDOMCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - double compareDocumentPosition(jsi::Runtime &rt, jsi::Value nativeNodeReference, jsi::Value otherNativeNodeReference) override { - static_assert( - bridging::getParameterCount(&T::compareDocumentPosition) == 3, - "Expected compareDocumentPosition(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::compareDocumentPosition, jsInvoker_, instance_, std::move(nativeNodeReference), std::move(otherNativeNodeReference)); - } - jsi::Array getChildNodes(jsi::Runtime &rt, jsi::Value nativeNodeReference) override { - static_assert( - bridging::getParameterCount(&T::getChildNodes) == 2, - "Expected getChildNodes(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::getChildNodes, jsInvoker_, instance_, std::move(nativeNodeReference)); - } - jsi::Value getParentNode(jsi::Runtime &rt, jsi::Value nativeNodeReference) override { - static_assert( - bridging::getParameterCount(&T::getParentNode) == 2, - "Expected getParentNode(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::getParentNode, jsInvoker_, instance_, std::move(nativeNodeReference)); - } - bool isConnected(jsi::Runtime &rt, jsi::Value nativeNodeReference) override { - static_assert( - bridging::getParameterCount(&T::isConnected) == 2, - "Expected isConnected(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::isConnected, jsInvoker_, instance_, std::move(nativeNodeReference)); - } - jsi::Array getBorderWidth(jsi::Runtime &rt, jsi::Value nativeElementReference) override { - static_assert( - bridging::getParameterCount(&T::getBorderWidth) == 2, - "Expected getBorderWidth(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::getBorderWidth, jsInvoker_, instance_, std::move(nativeElementReference)); - } - jsi::Array getBoundingClientRect(jsi::Runtime &rt, jsi::Value nativeElementReference, bool includeTransform) override { - static_assert( - bridging::getParameterCount(&T::getBoundingClientRect) == 3, - "Expected getBoundingClientRect(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::getBoundingClientRect, jsInvoker_, instance_, std::move(nativeElementReference), std::move(includeTransform)); - } - jsi::Array getInnerSize(jsi::Runtime &rt, jsi::Value nativeElementReference) override { - static_assert( - bridging::getParameterCount(&T::getInnerSize) == 2, - "Expected getInnerSize(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::getInnerSize, jsInvoker_, instance_, std::move(nativeElementReference)); - } - jsi::Array getScrollPosition(jsi::Runtime &rt, jsi::Value nativeElementReference) override { - static_assert( - bridging::getParameterCount(&T::getScrollPosition) == 2, - "Expected getScrollPosition(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::getScrollPosition, jsInvoker_, instance_, std::move(nativeElementReference)); - } - jsi::Array getScrollSize(jsi::Runtime &rt, jsi::Value nativeElementReference) override { - static_assert( - bridging::getParameterCount(&T::getScrollSize) == 2, - "Expected getScrollSize(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::getScrollSize, jsInvoker_, instance_, std::move(nativeElementReference)); - } - jsi::String getTagName(jsi::Runtime &rt, jsi::Value nativeElementReference) override { - static_assert( - bridging::getParameterCount(&T::getTagName) == 2, - "Expected getTagName(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::getTagName, jsInvoker_, instance_, std::move(nativeElementReference)); - } - jsi::String getTextContent(jsi::Runtime &rt, jsi::Value nativeElementReference) override { - static_assert( - bridging::getParameterCount(&T::getTextContent) == 2, - "Expected getTextContent(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::getTextContent, jsInvoker_, instance_, std::move(nativeElementReference)); - } - bool hasPointerCapture(jsi::Runtime &rt, jsi::Value nativeElementReference, double pointerId) override { - static_assert( - bridging::getParameterCount(&T::hasPointerCapture) == 3, - "Expected hasPointerCapture(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::hasPointerCapture, jsInvoker_, instance_, std::move(nativeElementReference), std::move(pointerId)); - } - void releasePointerCapture(jsi::Runtime &rt, jsi::Value nativeElementReference, double pointerId) override { - static_assert( - bridging::getParameterCount(&T::releasePointerCapture) == 3, - "Expected releasePointerCapture(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::releasePointerCapture, jsInvoker_, instance_, std::move(nativeElementReference), std::move(pointerId)); - } - void setPointerCapture(jsi::Runtime &rt, jsi::Value nativeElementReference, double pointerId) override { - static_assert( - bridging::getParameterCount(&T::setPointerCapture) == 3, - "Expected setPointerCapture(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::setPointerCapture, jsInvoker_, instance_, std::move(nativeElementReference), std::move(pointerId)); - } - jsi::Array getOffset(jsi::Runtime &rt, jsi::Value nativeElementReference) override { - static_assert( - bridging::getParameterCount(&T::getOffset) == 2, - "Expected getOffset(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::getOffset, jsInvoker_, instance_, std::move(nativeElementReference)); - } - jsi::Value linkRootNode(jsi::Runtime &rt, double rootTag, jsi::Value instanceHandle) override { - static_assert( - bridging::getParameterCount(&T::linkRootNode) == 3, - "Expected linkRootNode(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::linkRootNode, jsInvoker_, instance_, std::move(rootTag), std::move(instanceHandle)); - } - void measure(jsi::Runtime &rt, jsi::Value nativeElementReference, jsi::Function callback) override { - static_assert( - bridging::getParameterCount(&T::measure) == 3, - "Expected measure(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::measure, jsInvoker_, instance_, std::move(nativeElementReference), std::move(callback)); - } - void measureInWindow(jsi::Runtime &rt, jsi::Value nativeElementReference, jsi::Function callback) override { - static_assert( - bridging::getParameterCount(&T::measureInWindow) == 3, - "Expected measureInWindow(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::measureInWindow, jsInvoker_, instance_, std::move(nativeElementReference), std::move(callback)); - } - void measureLayout(jsi::Runtime &rt, jsi::Value nativeElementReference, jsi::Value relativeNode, jsi::Function onFail, jsi::Function onSuccess) override { - static_assert( - bridging::getParameterCount(&T::measureLayout) == 5, - "Expected measureLayout(...) to have 5 parameters"); - - return bridging::callFromJs( - rt, &T::measureLayout, jsInvoker_, instance_, std::move(nativeElementReference), std::move(relativeNode), std::move(onFail), std::move(onSuccess)); - } - void setNativeProps(jsi::Runtime &rt, jsi::Value nativeElementReference, jsi::Value updatePayload) override { - static_assert( - bridging::getParameterCount(&T::setNativeProps) == 3, - "Expected setNativeProps(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::setNativeProps, jsInvoker_, instance_, std::move(nativeElementReference), std::move(updatePayload)); - } - - private: - friend class NativeDOMCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - -} // namespace facebook::react From 805c9629c4ec5b4fff394f9033fac868260406ee Mon Sep 17 00:00:00 2001 From: vineethkuttan <66076509+vineethkuttan@users.noreply.github.com> Date: Fri, 17 Oct 2025 08:52:05 +0530 Subject: [PATCH 07/13] Update tester files --- .../tester/js/components/ListExampleShared.js | 4 +- .../AccessibilityAndroidExample.js | 4 +- .../Accessibility/AccessibilityExample.js | 3 +- .../Accessibility/AccessibilityIOSExample.js | 4 +- .../ActionSheetIOS/ActionSheetIOSExample.js | 35 ++--- .../examples/AnimatedGratuitousApp/AnExApp.js | 4 +- .../AnimatedGratuitousApp/AnExScroll.js | 2 +- .../examples/Appearance/AppearanceExample.js | 3 +- .../js/examples/BoxShadow/BoxShadowExample.js | 4 +- .../js/examples/Button/ButtonExample.js | 4 +- .../ContentURLAndroid/ContentURLAndroid.js | 4 +- .../tester/js/examples/Crash/CrashExample.js | 3 +- .../js/examples/Cursor/CursorExample.js | 4 +- .../DevSettings/DevSettingsExample.js | 4 +- .../examples/Dimensions/DimensionsExample.js | 4 +- .../DrawerLayoutAndroidExample.js | 3 +- .../InputAccessoryViewExample.js | 4 +- .../InvalidProps/InvalidPropsExample.js | 4 +- .../JSResponderHandlerExample.js | 4 +- .../KeyboardAvoidingViewExample.js | 4 +- .../examples/Layout/LayoutAnimationExample.js | 4 +- .../js/examples/Layout/LayoutEventsExample.js | 3 +- .../js/examples/Layout/LayoutExample.js | 3 +- .../LinearGradient/LinearGradientExample.js | 3 +- .../js/examples/Linking/LinkingExample.js | 4 +- .../NativeAnimationsExample.js | 16 +-- .../NewAppScreen/NewAppScreenExample.js | 4 +- .../NewArchitecture/NewArchitectureExample.js | 4 +- .../OSSLibraryExample/OSSLibraryExample.js | 129 ------------------ .../OrientationChangeExample.js | 4 +- .../PanResponder/PanResponderExample.js | 4 +- .../PermissionsAndroid/PermissionsExample.js | 3 +- .../examples/PixelRatio/PixelRatioExample.js | 4 +- .../PlatformColor/PlatformColorExample.js | 3 +- .../PointerEvents/PointerEventsExample.js | 14 +- .../PopupMenuAndroidExample.js | 3 +- .../js/examples/Pressable/PressableExample.js | 31 +---- .../RCTRootView/RCTRootViewIOSExample.js | 4 +- .../tester/js/examples/RTL/RTLExample.js | 4 +- .../RefreshControl/RefreshControlExample.js | 4 +- .../SafeAreaView/SafeAreaViewExample.js | 4 +- .../ScrollView/ScrollViewAnimatedExample.js | 3 +- .../ScrollViewIndicatorInsetsIOSExample.js | 4 +- .../ScrollViewKeyboardInsetsIOSExample.js | 4 +- .../ScrollView/ScrollViewSimpleExample.js | 4 +- .../examples/SectionList/SectionListIndex.js | 4 +- .../SetPropertiesExampleApp.js | 2 +- .../tester/js/examples/Share/ShareExample.js | 4 +- .../js/examples/Snapshot/SnapshotExample.js | 6 +- .../js/examples/StatusBar/StatusBarExample.js | 13 +- .../SwipeableCardExample.js | 3 +- .../js/examples/Switch/SwitchExample.js | 16 +-- .../js/examples/Text/TextExample.android.js | 16 ++- .../js/examples/Text/TextExample.ios.js | 4 +- .../js/examples/Text/TextSharedExamples.js | 86 ++++++++++++ .../TextInput/TextInputSharedExamples.js | 2 + .../tester/js/examples/Timer/TimerExample.js | 4 +- .../ToastAndroid/ToastAndroidExample.js | 4 +- .../js/examples/Touchable/TouchableExample.js | 17 +-- .../js/examples/Transform/TransformExample.js | 4 +- .../TransparentHitTestExample.js | 4 +- .../TurboModule/LegacyModuleExample.js | 4 +- .../TurboModule/TurboCxxModuleExample.js | 4 +- .../TurboModule/TurboModuleExample.js | 4 +- .../js/examples/Vibration/VibrationExample.js | 4 +- .../js/examples/WebSocket/WebSocketExample.js | 4 +- .../tester/js/examples/XHR/XHRExample.js | 4 +- .../js/examples/XHR/XHRExampleBinaryUpload.js | 2 +- packages/@react-native/tester/overrides.json | 14 +- .../IntegrationTests/IntegrationTestsApp.js | 2 +- 70 files changed, 307 insertions(+), 296 deletions(-) delete mode 100644 packages/@react-native/tester/js/examples/OSSLibraryExample/OSSLibraryExample.js diff --git a/packages/@react-native/tester/js/components/ListExampleShared.js b/packages/@react-native/tester/js/components/ListExampleShared.js index 42bc8694e66..e1dad999b27 100644 --- a/packages/@react-native/tester/js/components/ListExampleShared.js +++ b/packages/@react-native/tester/js/components/ListExampleShared.js @@ -169,7 +169,7 @@ const LoadingComponent: React.ComponentType<{}> = memo(() => ( )); -class ItemSeparatorComponent extends React.PureComponent<$FlowFixMeProps> { +class ItemSeparatorComponent extends React.PureComponent<$FlowFixMe> { render(): React.Node { const style = this.props.highlighted ? [ @@ -181,7 +181,7 @@ class ItemSeparatorComponent extends React.PureComponent<$FlowFixMeProps> { } } -class Spindicator extends React.PureComponent<$FlowFixMeProps> { +class Spindicator extends React.PureComponent<$FlowFixMe> { render(): React.Node { return ( ; }, }, -]; +] as Array; diff --git a/packages/@react-native/tester/js/examples/Accessibility/AccessibilityExample.js b/packages/@react-native/tester/js/examples/Accessibility/AccessibilityExample.js index 32955d3d9ef..696de6e68d3 100644 --- a/packages/@react-native/tester/js/examples/Accessibility/AccessibilityExample.js +++ b/packages/@react-native/tester/js/examples/Accessibility/AccessibilityExample.js @@ -10,6 +10,7 @@ 'use strict'; +import type {RNTesterModuleExample} from '../../types/RNTesterTypes'; import type {EventSubscription, GestureResponderEvent} from 'react-native'; import RNTesterBlock from '../../components/RNTesterBlock'; @@ -2250,4 +2251,4 @@ exports.examples = [ return ; }, }, -]; +] as Array; diff --git a/packages/@react-native/tester/js/examples/Accessibility/AccessibilityIOSExample.js b/packages/@react-native/tester/js/examples/Accessibility/AccessibilityIOSExample.js index 9271ad55471..0c96afb4afb 100644 --- a/packages/@react-native/tester/js/examples/Accessibility/AccessibilityIOSExample.js +++ b/packages/@react-native/tester/js/examples/Accessibility/AccessibilityIOSExample.js @@ -10,6 +10,8 @@ 'use strict'; +import type {RNTesterModuleExample} from '../../types/RNTesterTypes'; + const {RNTesterThemeContext} = require('../../components/RNTesterTheme'); const React = require('react'); const {Alert, Text, View} = require('react-native'); @@ -83,4 +85,4 @@ exports.examples = [ return ; }, }, -]; +] as Array; diff --git a/packages/@react-native/tester/js/examples/ActionSheetIOS/ActionSheetIOSExample.js b/packages/@react-native/tester/js/examples/ActionSheetIOS/ActionSheetIOSExample.js index 8052c83066f..cef545069fd 100644 --- a/packages/@react-native/tester/js/examples/ActionSheetIOS/ActionSheetIOSExample.js +++ b/packages/@react-native/tester/js/examples/ActionSheetIOS/ActionSheetIOSExample.js @@ -10,6 +10,7 @@ 'use strict'; +import type {RNTesterModuleExample} from '../../types/RNTesterTypes'; import type {HostInstance} from 'react-native'; import {RNTesterThemeContext} from '../../components/RNTesterTheme'; @@ -71,10 +72,7 @@ class ActionSheetExample extends React.Component { }; } -class ActionSheetTintExample extends React.Component< - $FlowFixMeProps, - $FlowFixMeState, -> { +class ActionSheetTintExample extends React.Component<$FlowFixMe, $FlowFixMe> { state: any | {clicked: string} = { clicked: 'none', }; @@ -114,8 +112,8 @@ class ActionSheetTintExample extends React.Component< } class ActionSheetCancelButtonTintExample extends React.Component< - $FlowFixMeProps, - $FlowFixMeState, + $FlowFixMe, + $FlowFixMe, > { state: any | {clicked: string} = { clicked: 'none', @@ -157,8 +155,8 @@ class ActionSheetCancelButtonTintExample extends React.Component< } class ActionSheetDisabledButtonTintExample extends React.Component< - $FlowFixMeProps, - $FlowFixMeState, + $FlowFixMe, + $FlowFixMe, > { state: any | {clicked: string} = { clicked: 'none', @@ -200,10 +198,7 @@ class ActionSheetDisabledButtonTintExample extends React.Component< }; } -class ActionSheetAnchorExample extends React.Component< - $FlowFixMeProps, - $FlowFixMeState, -> { +class ActionSheetAnchorExample extends React.Component<$FlowFixMe, $FlowFixMe> { state: any | {clicked: string} = { clicked: 'none', }; @@ -325,10 +320,7 @@ class ActionSheetDismissExample extends React.Component<{...}> { }; } -class ShareActionSheetExample extends React.Component< - $FlowFixMeProps, - $FlowFixMeState, -> { +class ShareActionSheetExample extends React.Component<$FlowFixMe, $FlowFixMe> { state: any | {text: string} = { text: '', }; @@ -374,10 +366,7 @@ class ShareActionSheetExample extends React.Component< }; } -class ShareScreenshotExample extends React.Component< - $FlowFixMeProps, - $FlowFixMeState, -> { +class ShareScreenshotExample extends React.Component<$FlowFixMe, $FlowFixMe> { state: any | {text: string} = { text: '', }; @@ -428,8 +417,8 @@ class ShareScreenshotExample extends React.Component< } class ShareScreenshotAnchorExample extends React.Component< - $FlowFixMeProps, - $FlowFixMeState, + $FlowFixMe, + $FlowFixMe, > { state: any | {text: string} = { text: '', @@ -573,4 +562,4 @@ exports.examples = [ return ; }, }, -]; +] as Array; diff --git a/packages/@react-native/tester/js/examples/AnimatedGratuitousApp/AnExApp.js b/packages/@react-native/tester/js/examples/AnimatedGratuitousApp/AnExApp.js index 02def051b95..f5447314416 100644 --- a/packages/@react-native/tester/js/examples/AnimatedGratuitousApp/AnExApp.js +++ b/packages/@react-native/tester/js/examples/AnimatedGratuitousApp/AnExApp.js @@ -10,6 +10,8 @@ 'use strict'; +import type {RNTesterModuleExample} from '../../types/RNTesterTypes'; + import AnExSet from './AnExSet'; import React from 'react'; import { @@ -396,4 +398,4 @@ exports.examples = [ return ; }, }, -]; +] as Array; diff --git a/packages/@react-native/tester/js/examples/AnimatedGratuitousApp/AnExScroll.js b/packages/@react-native/tester/js/examples/AnimatedGratuitousApp/AnExScroll.js index 8cb35f4f8f7..439c66931d7 100644 --- a/packages/@react-native/tester/js/examples/AnimatedGratuitousApp/AnExScroll.js +++ b/packages/@react-native/tester/js/examples/AnimatedGratuitousApp/AnExScroll.js @@ -20,7 +20,7 @@ import { View, } from 'react-native'; -class AnExScroll extends React.Component<$FlowFixMeProps, any> { +class AnExScroll extends React.Component<$FlowFixMe, any> { state: any = {scrollX: new Animated.Value(0)}; render(): React.Node { diff --git a/packages/@react-native/tester/js/examples/Appearance/AppearanceExample.js b/packages/@react-native/tester/js/examples/Appearance/AppearanceExample.js index 23751f76b93..427653514f6 100644 --- a/packages/@react-native/tester/js/examples/Appearance/AppearanceExample.js +++ b/packages/@react-native/tester/js/examples/Appearance/AppearanceExample.js @@ -8,6 +8,7 @@ * @format */ +import type {RNTesterModuleExample} from '../../types/RNTesterTypes'; import type {ColorSchemeName} from 'react-native'; import RNTesterText from '../../components/RNTesterText'; @@ -245,4 +246,4 @@ exports.examples = [ return ; }, }, -]; +] as Array; diff --git a/packages/@react-native/tester/js/examples/BoxShadow/BoxShadowExample.js b/packages/@react-native/tester/js/examples/BoxShadow/BoxShadowExample.js index a6d66167b06..9a69c6b6d25 100644 --- a/packages/@react-native/tester/js/examples/BoxShadow/BoxShadowExample.js +++ b/packages/@react-native/tester/js/examples/BoxShadow/BoxShadowExample.js @@ -8,6 +8,8 @@ * @format */ +import type {RNTesterModuleExample} from '../../types/RNTesterTypes'; + import * as React from 'react'; import {Image, StyleSheet, View} from 'react-native'; @@ -191,4 +193,4 @@ exports.examples = [ ); }, }, -]; +] as Array; diff --git a/packages/@react-native/tester/js/examples/Button/ButtonExample.js b/packages/@react-native/tester/js/examples/Button/ButtonExample.js index d9c30a8b938..cbedc3f8f11 100644 --- a/packages/@react-native/tester/js/examples/Button/ButtonExample.js +++ b/packages/@react-native/tester/js/examples/Button/ButtonExample.js @@ -10,6 +10,8 @@ 'use strict'; +import type {RNTesterModuleExample} from '../../types/RNTesterTypes'; + const {RNTesterThemeContext} = require('../../components/RNTesterTheme'); const React = require('react'); const {Alert, Button, StyleSheet, View} = require('react-native'); @@ -221,7 +223,7 @@ exports.examples = [ ); }, }, -]; +] as Array; const styles = StyleSheet.create({ container: { diff --git a/packages/@react-native/tester/js/examples/ContentURLAndroid/ContentURLAndroid.js b/packages/@react-native/tester/js/examples/ContentURLAndroid/ContentURLAndroid.js index 650986c7097..81f88a78bf1 100644 --- a/packages/@react-native/tester/js/examples/ContentURLAndroid/ContentURLAndroid.js +++ b/packages/@react-native/tester/js/examples/ContentURLAndroid/ContentURLAndroid.js @@ -10,6 +10,8 @@ 'use strict'; +import type {RNTesterModuleExample} from '../../types/RNTesterTypes'; + import RNTesterBlock from '../../components/RNTesterBlock'; import RNTesterPage from '../../components/RNTesterPage'; import RNTesterText from '../../components/RNTesterText'; @@ -116,4 +118,4 @@ exports.examples = [ return ; }, }, -]; +] as Array; diff --git a/packages/@react-native/tester/js/examples/Crash/CrashExample.js b/packages/@react-native/tester/js/examples/Crash/CrashExample.js index e85482a1ee2..c492f754889 100644 --- a/packages/@react-native/tester/js/examples/Crash/CrashExample.js +++ b/packages/@react-native/tester/js/examples/Crash/CrashExample.js @@ -8,6 +8,7 @@ * @format */ +import type {RNTesterModuleExample} from '../../types/RNTesterTypes'; import type {Node} from 'react'; import React from 'react'; @@ -37,4 +38,4 @@ exports.examples = [ ); }, }, -]; +] as Array; diff --git a/packages/@react-native/tester/js/examples/Cursor/CursorExample.js b/packages/@react-native/tester/js/examples/Cursor/CursorExample.js index 231f3a5338c..4a1b04f8d7c 100644 --- a/packages/@react-native/tester/js/examples/Cursor/CursorExample.js +++ b/packages/@react-native/tester/js/examples/Cursor/CursorExample.js @@ -8,6 +8,8 @@ * @format */ +import type {RNTesterModuleExample} from '../../types/RNTesterTypes'; + import * as React from 'react'; import {StyleSheet, Text, View} from 'react-native'; @@ -107,4 +109,4 @@ exports.examples = [ description: 'Views with a cursor do not get flattened', render: CursorExampleViewFlattening, }, -]; +] as Array; diff --git a/packages/@react-native/tester/js/examples/DevSettings/DevSettingsExample.js b/packages/@react-native/tester/js/examples/DevSettings/DevSettingsExample.js index 2210bfd612a..fa6064b6676 100644 --- a/packages/@react-native/tester/js/examples/DevSettings/DevSettingsExample.js +++ b/packages/@react-native/tester/js/examples/DevSettings/DevSettingsExample.js @@ -8,6 +8,8 @@ * @format */ +import type {RNTesterModuleExample} from '../../types/RNTesterTypes'; + import * as React from 'react'; import {Alert, Button, DevSettings} from 'react-native'; @@ -44,4 +46,4 @@ exports.examples = [ ); }, }, -]; +] as Array; diff --git a/packages/@react-native/tester/js/examples/Dimensions/DimensionsExample.js b/packages/@react-native/tester/js/examples/Dimensions/DimensionsExample.js index 8d246d09aa1..ccc067bffec 100644 --- a/packages/@react-native/tester/js/examples/Dimensions/DimensionsExample.js +++ b/packages/@react-native/tester/js/examples/Dimensions/DimensionsExample.js @@ -8,6 +8,8 @@ * @format */ +import type {RNTesterModuleExample} from '../../types/RNTesterTypes'; + import RNTesterText from '../../components/RNTesterText'; import React, {useEffect, useState} from 'react'; import {Dimensions, useWindowDimensions} from 'react-native'; @@ -60,4 +62,4 @@ exports.examples = [ return ; }, }, -]; +] as Array; diff --git a/packages/@react-native/tester/js/examples/DrawerLayoutAndroid/DrawerLayoutAndroidExample.js b/packages/@react-native/tester/js/examples/DrawerLayoutAndroid/DrawerLayoutAndroidExample.js index 92a034ae195..c0360008167 100644 --- a/packages/@react-native/tester/js/examples/DrawerLayoutAndroid/DrawerLayoutAndroidExample.js +++ b/packages/@react-native/tester/js/examples/DrawerLayoutAndroid/DrawerLayoutAndroidExample.js @@ -10,6 +10,7 @@ 'use strict'; +import type {RNTesterModuleExample} from '../../types/RNTesterTypes'; import type {Node} from 'react'; import {RNTesterThemeContext} from '../../components/RNTesterTheme'; @@ -104,4 +105,4 @@ exports.examples = [ return ; }, }, -]; +] as Array; diff --git a/packages/@react-native/tester/js/examples/InputAccessoryView/InputAccessoryViewExample.js b/packages/@react-native/tester/js/examples/InputAccessoryView/InputAccessoryViewExample.js index 532a9ea2837..9d4e551bc0b 100644 --- a/packages/@react-native/tester/js/examples/InputAccessoryView/InputAccessoryViewExample.js +++ b/packages/@react-native/tester/js/examples/InputAccessoryView/InputAccessoryViewExample.js @@ -10,6 +10,8 @@ 'use strict'; +import type {RNTesterModuleExample} from '../../types/RNTesterTypes'; + import {useTheme} from '../../components/RNTesterTheme'; import {useState} from 'react'; import { @@ -111,4 +113,4 @@ exports.examples = [ return ; }, }, -]; +] as Array; diff --git a/packages/@react-native/tester/js/examples/InvalidProps/InvalidPropsExample.js b/packages/@react-native/tester/js/examples/InvalidProps/InvalidPropsExample.js index a24116faa38..bff02276eb2 100644 --- a/packages/@react-native/tester/js/examples/InvalidProps/InvalidPropsExample.js +++ b/packages/@react-native/tester/js/examples/InvalidProps/InvalidPropsExample.js @@ -10,6 +10,8 @@ 'use strict'; +import type {RNTesterModuleExample} from '../../types/RNTesterTypes'; + import RNTesterText from '../../components/RNTesterText'; import * as React from 'react'; import {View} from 'react-native'; @@ -19,7 +21,7 @@ export const category = 'Other'; export const description = 'Examples of passing invalid prop values and how they fall back to expected defaults.'; -export const examples = [ +export const examples: Array = [ { title: 'View flex', render(): React.Node { diff --git a/packages/@react-native/tester/js/examples/JSResponderHandlerExample/JSResponderHandlerExample.js b/packages/@react-native/tester/js/examples/JSResponderHandlerExample/JSResponderHandlerExample.js index 35a03e96aef..01968efb3e2 100644 --- a/packages/@react-native/tester/js/examples/JSResponderHandlerExample/JSResponderHandlerExample.js +++ b/packages/@react-native/tester/js/examples/JSResponderHandlerExample/JSResponderHandlerExample.js @@ -8,6 +8,8 @@ * @format */ +import type {RNTesterModuleExample} from '../../types/RNTesterTypes'; + import RNTesterText from '../../components/RNTesterText'; import React from 'react'; import {PanResponder, ScrollView, StyleSheet, View} from 'react-native'; @@ -60,7 +62,7 @@ exports.examples = [ ); }, }, -]; +] as Array; const styles = StyleSheet.create({ container: { diff --git a/packages/@react-native/tester/js/examples/KeyboardAvoidingView/KeyboardAvoidingViewExample.js b/packages/@react-native/tester/js/examples/KeyboardAvoidingView/KeyboardAvoidingViewExample.js index 62f66258d9c..610ec9588d4 100644 --- a/packages/@react-native/tester/js/examples/KeyboardAvoidingView/KeyboardAvoidingViewExample.js +++ b/packages/@react-native/tester/js/examples/KeyboardAvoidingView/KeyboardAvoidingViewExample.js @@ -10,6 +10,8 @@ 'use strict'; +import type {RNTesterModuleExample} from '../../types/RNTesterTypes'; + import React, {useState} from 'react'; import { Alert, @@ -276,4 +278,4 @@ exports.examples = [ return ; }, }, -]; +] as Array; diff --git a/packages/@react-native/tester/js/examples/Layout/LayoutAnimationExample.js b/packages/@react-native/tester/js/examples/Layout/LayoutAnimationExample.js index b9f12ee89e2..a83d552799d 100644 --- a/packages/@react-native/tester/js/examples/Layout/LayoutAnimationExample.js +++ b/packages/@react-native/tester/js/examples/Layout/LayoutAnimationExample.js @@ -10,6 +10,8 @@ 'use strict'; +import type {RNTesterModuleExample} from '../../types/RNTesterTypes'; + import RNTesterText from '../../components/RNTesterText'; import React from 'react'; import { @@ -389,4 +391,4 @@ exports.examples = [ return ; }, }, -]; +] as Array; diff --git a/packages/@react-native/tester/js/examples/Layout/LayoutEventsExample.js b/packages/@react-native/tester/js/examples/Layout/LayoutEventsExample.js index a93d4ac4fc9..ee4e78ccefd 100644 --- a/packages/@react-native/tester/js/examples/Layout/LayoutEventsExample.js +++ b/packages/@react-native/tester/js/examples/Layout/LayoutEventsExample.js @@ -10,6 +10,7 @@ 'use strict'; +import type {RNTesterModuleExample} from '../../types/RNTesterTypes'; import type { ViewLayout, ViewLayoutEvent, @@ -163,4 +164,4 @@ exports.examples = [ return ; }, }, -]; +] as Array; diff --git a/packages/@react-native/tester/js/examples/Layout/LayoutExample.js b/packages/@react-native/tester/js/examples/Layout/LayoutExample.js index 27af6b6acc3..f0bd1d27aa6 100644 --- a/packages/@react-native/tester/js/examples/Layout/LayoutExample.js +++ b/packages/@react-native/tester/js/examples/Layout/LayoutExample.js @@ -10,6 +10,7 @@ 'use strict'; +import type {RNTesterModuleExample} from '../../types/RNTesterTypes'; import type {ViewStyleProp} from 'react-native/Libraries/StyleSheet/StyleSheet'; import RNTesterBlock from '../../components/RNTesterBlock'; @@ -210,4 +211,4 @@ exports.examples = [ return ; }, }, -]; +] as Array; diff --git a/packages/@react-native/tester/js/examples/LinearGradient/LinearGradientExample.js b/packages/@react-native/tester/js/examples/LinearGradient/LinearGradientExample.js index 359604f3ebc..ed787dfc4e2 100644 --- a/packages/@react-native/tester/js/examples/LinearGradient/LinearGradientExample.js +++ b/packages/@react-native/tester/js/examples/LinearGradient/LinearGradientExample.js @@ -10,6 +10,7 @@ 'use strict'; +import type {RNTesterModuleExample} from '../../types/RNTesterTypes'; import type {ViewStyleProp} from 'react-native/Libraries/StyleSheet/StyleSheet'; import RNTesterText from '../../components/RNTesterText'; @@ -305,4 +306,4 @@ exports.examples = [ ); }, }, -]; +] as Array; diff --git a/packages/@react-native/tester/js/examples/Linking/LinkingExample.js b/packages/@react-native/tester/js/examples/Linking/LinkingExample.js index 57df6c12eed..34a45fcbd8a 100644 --- a/packages/@react-native/tester/js/examples/Linking/LinkingExample.js +++ b/packages/@react-native/tester/js/examples/Linking/LinkingExample.js @@ -8,6 +8,8 @@ * @format */ +import type {RNTesterModuleExample} from '../../types/RNTesterTypes'; + import RNTesterBlock from '../../components/RNTesterBlock'; import RNTesterText from '../../components/RNTesterText'; import React from 'react'; @@ -168,4 +170,4 @@ exports.examples = [ return ; }, }, -]; +] as Array; diff --git a/packages/@react-native/tester/js/examples/NativeAnimation/NativeAnimationsExample.js b/packages/@react-native/tester/js/examples/NativeAnimation/NativeAnimationsExample.js index 42ca8d02134..9ada17831a7 100644 --- a/packages/@react-native/tester/js/examples/NativeAnimation/NativeAnimationsExample.js +++ b/packages/@react-native/tester/js/examples/NativeAnimation/NativeAnimationsExample.js @@ -10,6 +10,7 @@ 'use strict'; +import type {RNTesterModuleExample} from '../../types/RNTesterTypes'; import type AnimatedValue from 'react-native/Libraries/Animated/nodes/AnimatedValue'; import RNTesterSettingSwitchRow from '../../components/RNTesterSettingSwitchRow'; @@ -23,7 +24,7 @@ import { View, } from 'react-native'; -class Tester extends React.Component<$FlowFixMeProps, $FlowFixMeState> { +class Tester extends React.Component<$FlowFixMe, $FlowFixMe> { state: any | {js: AnimatedValue, native: AnimatedValue} = { native: new Animated.Value(0), js: new Animated.Value(0), @@ -72,7 +73,7 @@ class Tester extends React.Component<$FlowFixMeProps, $FlowFixMeState> { } } -class ValueListenerExample extends React.Component<{...}, $FlowFixMeState> { +class ValueListenerExample extends React.Component<{...}, $FlowFixMe> { state: any | {anim: AnimatedValue, progress: number} = { anim: new Animated.Value(0), progress: 0, @@ -121,7 +122,7 @@ class ValueListenerExample extends React.Component<{...}, $FlowFixMeState> { } } -class LoopExample extends React.Component<{...}, $FlowFixMeState> { +class LoopExample extends React.Component<{...}, $FlowFixMe> { state: any | {value: AnimatedValue} = { value: new Animated.Value(0), }; @@ -192,7 +193,7 @@ const InternalSettings = () => { ); }; -class EventExample extends React.Component<{...}, $FlowFixMeState> { +class EventExample extends React.Component<{...}, $FlowFixMe> { state: any | {anim: AnimatedValue} = { anim: new Animated.Value(0), }; @@ -239,10 +240,7 @@ class EventExample extends React.Component<{...}, $FlowFixMeState> { } } -class TrackingExample extends React.Component< - $FlowFixMeProps, - $FlowFixMeState, -> { +class TrackingExample extends React.Component<$FlowFixMe, $FlowFixMe> { state: | any | { @@ -657,4 +655,4 @@ exports.examples = [ return ; }, }, -]; +] as Array; diff --git a/packages/@react-native/tester/js/examples/NewAppScreen/NewAppScreenExample.js b/packages/@react-native/tester/js/examples/NewAppScreen/NewAppScreenExample.js index 519728dc439..6e3fc3a6c55 100644 --- a/packages/@react-native/tester/js/examples/NewAppScreen/NewAppScreenExample.js +++ b/packages/@react-native/tester/js/examples/NewAppScreen/NewAppScreenExample.js @@ -10,6 +10,8 @@ 'use strict'; +import type {RNTesterModuleExample} from '../../types/RNTesterTypes'; + const {NewAppScreen} = require('@react-native/new-app-screen'); const React = require('react'); const {ScrollView} = require('react-native'); @@ -27,4 +29,4 @@ exports.examples = [ ); }, }, -]; +] as Array; diff --git a/packages/@react-native/tester/js/examples/NewArchitecture/NewArchitectureExample.js b/packages/@react-native/tester/js/examples/NewArchitecture/NewArchitectureExample.js index 30e5d17f6ea..0b68c170f09 100644 --- a/packages/@react-native/tester/js/examples/NewArchitecture/NewArchitectureExample.js +++ b/packages/@react-native/tester/js/examples/NewArchitecture/NewArchitectureExample.js @@ -10,6 +10,8 @@ 'use strict'; +import type {RNTesterModuleExample} from '../../types/RNTesterTypes'; + import MyNativeView from '../../../NativeComponentExample/js/MyNativeView'; import * as React from 'react'; @@ -28,4 +30,4 @@ exports.examples = [ ); }, }, -]; +] as Array; diff --git a/packages/@react-native/tester/js/examples/OSSLibraryExample/OSSLibraryExample.js b/packages/@react-native/tester/js/examples/OSSLibraryExample/OSSLibraryExample.js deleted file mode 100644 index 82048172a55..00000000000 --- a/packages/@react-native/tester/js/examples/OSSLibraryExample/OSSLibraryExample.js +++ /dev/null @@ -1,129 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow - * @format - */ - -'use strict'; - -import type {NativeComponentType} from '@react-native/oss-library-example'; - -import RNTesterText from '../../components/RNTesterText'; -import { - SampleNativeComponent, - SampleNativeComponentCommands, -} from '@react-native/oss-library-example'; -import {NativeSampleModule} from '@react-native/oss-library-example'; -import * as React from 'react'; -import {useRef, useState} from 'react'; -import {Button, View} from 'react-native'; -import {StyleSheet} from 'react-native'; - -const colors = [ - '#0000FF', - '#FF0000', - '#00FF00', - '#003300', - '#330000', - '#000033', -]; - -// $FlowFixMe[value-as-type] -const styles: StyleSheet = StyleSheet.create({ - container: { - flex: 1, - }, - column: { - flex: 2, - justifyContent: 'center', - paddingLeft: 5, - paddingRight: 5, - }, -}); - -function SampleNativeComponentContainer(props: {}): React.Node { - const ref = useRef | null>(null); - const [opacity, setOpacity] = useState(1.0); - const [arrayValues, setArrayValues] = useState([1, 2, 3]); - return ( - - { - console.log(event.nativeEvent.values); - console.log(event.nativeEvent.boolValues); - console.log(event.nativeEvent.floats); - console.log(event.nativeEvent.doubles); - console.log(event.nativeEvent.yesNos); - console.log(event.nativeEvent.strings); - console.log(event.nativeEvent.latLons); - console.log(event.nativeEvent.multiArrays); - }} - /> -