diff --git a/.github/workflows/verify-ios.yml b/.github/workflows/verify-ios.yml index 862627eb53..91a2bdcb95 100644 --- a/.github/workflows/verify-ios.yml +++ b/.github/workflows/verify-ios.yml @@ -77,5 +77,5 @@ jobs: test \ -scheme KeyboardControllerNative \ -only-testing KeyboardControllerNativeTests \ - -destination 'platform=iOS Simulator,name=iPhone 16 Pro,OS=18.4' \ + -destination 'platform=iOS Simulator,name=iPhone 16 Pro,OS=18.5' \ CODE_SIGNING_ALLOWED=NO | xcpretty" diff --git a/FabricExample/ios/Podfile.lock b/FabricExample/ios/Podfile.lock index d573044887..521856cb33 100644 --- a/FabricExample/ios/Podfile.lock +++ b/FabricExample/ios/Podfile.lock @@ -2597,7 +2597,7 @@ PODS: - ReactCommon/turbomodule/core - SocketRocket - Yoga - - RNReanimated (4.1.2): + - RNReanimated (4.2.1): - boost - DoubleConversion - fast_float @@ -2624,11 +2624,11 @@ PODS: - ReactCodegen - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - RNReanimated/reanimated (= 4.1.2) + - RNReanimated/reanimated (= 4.2.1) - RNWorklets - SocketRocket - Yoga - - RNReanimated/reanimated (4.1.2): + - RNReanimated/reanimated (4.2.1): - boost - DoubleConversion - fast_float @@ -2655,11 +2655,11 @@ PODS: - ReactCodegen - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - RNReanimated/reanimated/apple (= 4.1.2) + - RNReanimated/reanimated/apple (= 4.2.1) - RNWorklets - SocketRocket - Yoga - - RNReanimated/reanimated/apple (4.1.2): + - RNReanimated/reanimated/apple (4.2.1): - boost - DoubleConversion - fast_float @@ -2748,7 +2748,7 @@ PODS: - ReactCommon/turbomodule/core - SocketRocket - Yoga - - RNWorklets (0.6.0): + - RNWorklets (0.7.1): - boost - DoubleConversion - fast_float @@ -2775,10 +2775,10 @@ PODS: - ReactCodegen - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - RNWorklets/worklets (= 0.6.0) + - RNWorklets/worklets (= 0.7.1) - SocketRocket - Yoga - - RNWorklets/worklets (0.6.0): + - RNWorklets/worklets (0.7.1): - boost - DoubleConversion - fast_float @@ -2805,10 +2805,10 @@ PODS: - ReactCodegen - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - RNWorklets/worklets/apple (= 0.6.0) + - RNWorklets/worklets/apple (= 0.7.1) - SocketRocket - Yoga - - RNWorklets/worklets/apple (0.6.0): + - RNWorklets/worklets/apple (0.7.1): - boost - DoubleConversion - fast_float @@ -3184,9 +3184,9 @@ SPEC CHECKSUMS: RNCMaskedView: 63268de1986a098b5f4d1fb5b1bc1e97fade0aee RNGestureHandler: 4f7cc97a71d4fe0fcba38c94acdd969f5f17c91c RNReactNativeHapticFeedback: 63aa39dbd6ef56e9de688210c5761d4007927a7e - RNReanimated: b8b86b99a4bb938cacac1213724cb4c8edb6c614 + RNReanimated: f2cdef8c5ec70e440498b949f9af3ea39f70fcec RNScreens: 74985ca8e102294a60cec7513fa84c936fa0b20b - RNWorklets: e752b7443b51916158d3b6ca6700294827e8a1ea + RNWorklets: ab7740c2a152f77ff76a40d52be860d8f128fab1 SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748 Yoga: 922d794dce2af9c437f864bf4093abfa7a131adb diff --git a/FabricExample/jestSetup.js b/FabricExample/jestSetup.js index da4abfab9c..d734cb1ce7 100644 --- a/FabricExample/jestSetup.js +++ b/FabricExample/jestSetup.js @@ -2,6 +2,10 @@ import "react-native-gesture-handler/jestSetup"; require("react-native-reanimated/lib/module/jestUtils").setUpTests(); +jest.mock("react-native-worklets", () => + require("react-native-worklets/src/mock"), +); + jest.mock("react-native-keyboard-controller", () => require("react-native-keyboard-controller/jest"), ); diff --git a/FabricExample/package.json b/FabricExample/package.json index bf7b52049f..5a3fde26e1 100644 --- a/FabricExample/package.json +++ b/FabricExample/package.json @@ -30,13 +30,13 @@ "react-native-gesture-handler": "2.28.0", "react-native-haptic-feedback": "2.3.3", "react-native-keyboard-controller": "link:../", - "react-native-reanimated": "4.1.2", + "react-native-reanimated": "4.2.1", "react-native-safe-area-context": "5.6.1", "react-native-screens": "4.16.0", "react-native-toast-message": "^2.3.0", "react-native-web": "^0.21.2", "react-native-webview": "^13.16.0", - "react-native-worklets": "^0.6.0" + "react-native-worklets": "^0.7.1" }, "devDependencies": { "@babel/core": "^7.25.2", diff --git a/FabricExample/yarn.lock b/FabricExample/yarn.lock index f480502631..535e1285ab 100644 --- a/FabricExample/yarn.lock +++ b/FabricExample/yarn.lock @@ -19,6 +19,15 @@ js-tokens "^4.0.0" picocolors "^1.1.1" +"@babel/code-frame@^7.28.6": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.28.6.tgz#72499312ec58b1e2245ba4a4f550c132be4982f7" + integrity sha512-JYgintcMjRiCvS8mMECzaEn+m3PfoQiyqukOMCCVQtoJGYJw8j/8LBJEiqkHLkfwCcs74E3pbAUFNg7d9VNJ+Q== + dependencies: + "@babel/helper-validator-identifier" "^7.28.5" + js-tokens "^4.0.0" + picocolors "^1.1.1" + "@babel/compat-data@^7.22.6", "@babel/compat-data@^7.27.2": version "7.27.5" resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.27.5.tgz#7d0658ec1a8420fc866d1df1b03bea0e79934c82" @@ -56,7 +65,18 @@ "@jridgewell/trace-mapping" "^0.3.25" jsesc "^3.0.2" -"@babel/helper-annotate-as-pure@^7.27.1": +"@babel/generator@^7.28.6": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.28.6.tgz#48dcc65d98fcc8626a48f72b62e263d25fc3c3f1" + integrity sha512-lOoVRwADj8hjf7al89tvQ2a1lf53Z+7tiXMgpZJL3maQPDxh0DgLMN62B2MKUOFcoodBHLMbDM6WAbKgNy5Suw== + dependencies: + "@babel/parser" "^7.28.6" + "@babel/types" "^7.28.6" + "@jridgewell/gen-mapping" "^0.3.12" + "@jridgewell/trace-mapping" "^0.3.28" + jsesc "^3.0.2" + +"@babel/helper-annotate-as-pure@^7.27.1", "@babel/helper-annotate-as-pure@^7.27.3": version "7.27.3" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.27.3.tgz#f31fd86b915fc4daf1f3ac6976c59be7084ed9c5" integrity sha512-fXSwMQqitTGeHLBC08Eq5yXz2m37E4pJX1qAU1+2cNedz/ifv/bVXft90VeSav5nFO61EcNgwr0aJxbyPaWBPg== @@ -107,6 +127,11 @@ lodash.debounce "^4.0.8" resolve "^1.14.2" +"@babel/helper-globals@^7.28.0": + version "7.28.0" + resolved "https://registry.yarnpkg.com/@babel/helper-globals/-/helper-globals-7.28.0.tgz#b9430df2aa4e17bc28665eadeae8aa1d985e6674" + integrity sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw== + "@babel/helper-member-expression-to-functions@^7.27.1": version "7.27.1" resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.27.1.tgz#ea1211276be93e798ce19037da6f06fbb994fa44" @@ -180,6 +205,11 @@ resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz#a7054dcc145a967dd4dc8fee845a57c1316c9df8" integrity sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow== +"@babel/helper-validator-identifier@^7.28.5": + version "7.28.5" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz#010b6938fab7cb7df74aa2bbc06aa503b8fe5fb4" + integrity sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q== + "@babel/helper-validator-option@^7.27.1": version "7.27.1" resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz#fa52f5b1e7db1ab049445b421c4471303897702f" @@ -209,6 +239,13 @@ dependencies: "@babel/types" "^7.27.3" +"@babel/parser@^7.28.6": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.28.6.tgz#f01a8885b7fa1e56dd8a155130226cd698ef13fd" + integrity sha512-TeR9zWR18BvbfPmGbLampPMW+uW1NZnJlRuuHso8i87QZNq2JRF9i6RgxRqtEq+wQGsS19NNTWr2duhnE49mfQ== + dependencies: + "@babel/types" "^7.28.6" + "@babel/plugin-bugfix-firefox-class-in-computed-class-key@^7.27.1": version "7.27.1" resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.27.1.tgz#61dd8a8e61f7eb568268d1b5f129da3eee364bf9" @@ -415,7 +452,7 @@ "@babel/helper-create-regexp-features-plugin" "^7.18.6" "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-transform-arrow-functions@^7.0.0-0", "@babel/plugin-transform-arrow-functions@^7.24.7", "@babel/plugin-transform-arrow-functions@^7.27.1": +"@babel/plugin-transform-arrow-functions@7.27.1", "@babel/plugin-transform-arrow-functions@^7.24.7", "@babel/plugin-transform-arrow-functions@^7.27.1": version "7.27.1" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.27.1.tgz#6e2061067ba3ab0266d834a9f94811196f2aba9a" integrity sha512-8Z4TGic6xW70FKThA5HYEKKyBpOOsucTOD1DjU3fZxDg+K3zBJcXMFnt/4yQiZnf5+MiOMSXQ9PaEK/Ilh1DeA== @@ -454,7 +491,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.27.1" -"@babel/plugin-transform-class-properties@^7.0.0-0", "@babel/plugin-transform-class-properties@^7.25.4", "@babel/plugin-transform-class-properties@^7.27.1": +"@babel/plugin-transform-class-properties@7.27.1", "@babel/plugin-transform-class-properties@^7.25.4", "@babel/plugin-transform-class-properties@^7.27.1": version "7.27.1" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.27.1.tgz#dd40a6a370dfd49d32362ae206ddaf2bb082a925" integrity sha512-D0VcalChDMtuRvJIu3U/fwWjf8ZMykz5iZsg77Nuj821vCKI3zCyRLwRdWbsuJ/uRwZhZ002QtCqIkwC/ZkvbA== @@ -470,7 +507,19 @@ "@babel/helper-create-class-features-plugin" "^7.27.1" "@babel/helper-plugin-utils" "^7.27.1" -"@babel/plugin-transform-classes@^7.0.0-0", "@babel/plugin-transform-classes@^7.25.4", "@babel/plugin-transform-classes@^7.27.1": +"@babel/plugin-transform-classes@7.28.4": + version "7.28.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.28.4.tgz#75d66175486788c56728a73424d67cbc7473495c" + integrity sha512-cFOlhIYPBv/iBoc+KS3M6et2XPtbT2HiCRfBXWtfpc9OAyostldxIf9YAYB6ypURBBbx+Qv6nyrLzASfJe+hBA== + dependencies: + "@babel/helper-annotate-as-pure" "^7.27.3" + "@babel/helper-compilation-targets" "^7.27.2" + "@babel/helper-globals" "^7.28.0" + "@babel/helper-plugin-utils" "^7.27.1" + "@babel/helper-replace-supers" "^7.27.1" + "@babel/traverse" "^7.28.4" + +"@babel/plugin-transform-classes@^7.25.4", "@babel/plugin-transform-classes@^7.27.1": version "7.27.1" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.27.1.tgz#03bb04bea2c7b2f711f0db7304a8da46a85cced4" integrity sha512-7iLhfFAubmpeJe/Wo2TVuDrykh/zlWXLzPNdL0Jqn/Xu8R3QQ8h9ff8FQoISZOsw74/HFqFI7NX63HN7QFIHKA== @@ -643,7 +692,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.27.1" -"@babel/plugin-transform-nullish-coalescing-operator@^7.0.0-0", "@babel/plugin-transform-nullish-coalescing-operator@^7.24.7", "@babel/plugin-transform-nullish-coalescing-operator@^7.27.1": +"@babel/plugin-transform-nullish-coalescing-operator@7.27.1", "@babel/plugin-transform-nullish-coalescing-operator@^7.24.7", "@babel/plugin-transform-nullish-coalescing-operator@^7.27.1": version "7.27.1" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.27.1.tgz#4f9d3153bf6782d73dd42785a9d22d03197bc91d" integrity sha512-aGZh6xMo6q9vq1JGcw58lZ1Z0+i0xB2x0XaauNIUXd6O1xXc3RwoWEBlsTQrY4KQ9Jf0s5rgD6SiNkaUdJegTA== @@ -682,7 +731,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.27.1" -"@babel/plugin-transform-optional-chaining@^7.0.0-0", "@babel/plugin-transform-optional-chaining@^7.24.8", "@babel/plugin-transform-optional-chaining@^7.27.1": +"@babel/plugin-transform-optional-chaining@7.27.1", "@babel/plugin-transform-optional-chaining@^7.24.8", "@babel/plugin-transform-optional-chaining@^7.27.1": version "7.27.1" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.27.1.tgz#874ce3c4f06b7780592e946026eb76a32830454f" integrity sha512-BQmKPPIuc8EkZgNKsv0X4bPmOoayeu4F1YCwx2/CfmDSXDbp7GnzlUH+/ul5VGfRg1AoFPsrIThlEBj2xb4CAg== @@ -787,7 +836,7 @@ babel-plugin-polyfill-regenerator "^0.6.1" semver "^6.3.1" -"@babel/plugin-transform-shorthand-properties@^7.0.0-0", "@babel/plugin-transform-shorthand-properties@^7.24.7", "@babel/plugin-transform-shorthand-properties@^7.27.1": +"@babel/plugin-transform-shorthand-properties@7.27.1", "@babel/plugin-transform-shorthand-properties@^7.24.7", "@babel/plugin-transform-shorthand-properties@^7.27.1": version "7.27.1" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.27.1.tgz#532abdacdec87bfee1e0ef8e2fcdee543fe32b90" integrity sha512-N/wH1vcn4oYawbJ13Y/FxcQrWk63jhfNa7jef0ih7PHSIHX2LB7GWE1rkPrOnka9kwMxb6hMl19p7lidA+EHmQ== @@ -809,7 +858,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.27.1" -"@babel/plugin-transform-template-literals@^7.0.0-0", "@babel/plugin-transform-template-literals@^7.27.1": +"@babel/plugin-transform-template-literals@7.27.1", "@babel/plugin-transform-template-literals@^7.27.1": version "7.27.1" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.27.1.tgz#1a0eb35d8bb3e6efc06c9fd40eb0bcef548328b8" integrity sha512-fBJKiV7F2DxZUkg5EtHKXQdbsbURW3DZKQUWphDum0uRP6eHGGa/He9mc0mypL680pb+e/lDIthRohlv8NCHkg== @@ -849,7 +898,7 @@ "@babel/helper-create-regexp-features-plugin" "^7.27.1" "@babel/helper-plugin-utils" "^7.27.1" -"@babel/plugin-transform-unicode-regex@^7.0.0-0", "@babel/plugin-transform-unicode-regex@^7.24.7", "@babel/plugin-transform-unicode-regex@^7.27.1": +"@babel/plugin-transform-unicode-regex@7.27.1", "@babel/plugin-transform-unicode-regex@^7.24.7", "@babel/plugin-transform-unicode-regex@^7.27.1": version "7.27.1" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.27.1.tgz#25948f5c395db15f609028e370667ed8bae9af97" integrity sha512-xvINq24TRojDuyt6JGtHmkVkrfVV3FPT16uytxImLeBZqW3/H52yN+kM1MGuyPkIQxrzKwPHs5U/MP3qKyzkGw== @@ -949,7 +998,7 @@ "@babel/types" "^7.4.4" esutils "^2.0.2" -"@babel/preset-typescript@^7.16.7": +"@babel/preset-typescript@7.27.1": version "7.27.1" resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.27.1.tgz#190742a6428d282306648a55b0529b561484f912" integrity sha512-l7WfQfX0WK4M0v2RudjuQK4u99BS6yLHYEmdtVPP7lKV013zr9DygFuWNlnbvQ9LR+LS0Egz/XAvGx5U9MX0fQ== @@ -979,6 +1028,15 @@ "@babel/parser" "^7.27.2" "@babel/types" "^7.27.1" +"@babel/template@^7.28.6": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.28.6.tgz#0e7e56ecedb78aeef66ce7972b082fce76a23e57" + integrity sha512-YA6Ma2KsCdGb+WC6UpBVFJGXL58MDA6oyONbjyF/+5sBgxY/dwkhLogbMT2GXXyU84/IhRw/2D1Os1B/giz+BQ== + dependencies: + "@babel/code-frame" "^7.28.6" + "@babel/parser" "^7.28.6" + "@babel/types" "^7.28.6" + "@babel/traverse--for-generate-function-map@npm:@babel/traverse@^7.25.3": version "7.27.4" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.27.4.tgz#b0045ac7023c8472c3d35effd7cc9ebd638da6ea" @@ -1005,6 +1063,19 @@ debug "^4.3.1" globals "^11.1.0" +"@babel/traverse@^7.28.4": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.28.6.tgz#871ddc79a80599a5030c53b1cc48cbe3a5583c2e" + integrity sha512-fgWX62k02qtjqdSNTAGxmKYY/7FSL9WAS1o2Hu5+I5m9T0yxZzr4cnrfXQ/MX0rIifthCSs6FKTlzYbJcPtMNg== + dependencies: + "@babel/code-frame" "^7.28.6" + "@babel/generator" "^7.28.6" + "@babel/helper-globals" "^7.28.0" + "@babel/parser" "^7.28.6" + "@babel/template" "^7.28.6" + "@babel/types" "^7.28.6" + debug "^4.3.1" + "@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.25.2", "@babel/types@^7.27.1", "@babel/types@^7.27.3", "@babel/types@^7.27.6", "@babel/types@^7.3.3", "@babel/types@^7.4.4": version "7.27.6" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.27.6.tgz#a434ca7add514d4e646c80f7375c0aa2befc5535" @@ -1013,6 +1084,14 @@ "@babel/helper-string-parser" "^7.27.1" "@babel/helper-validator-identifier" "^7.27.1" +"@babel/types@^7.28.6": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.28.6.tgz#c3e9377f1b155005bcc4c46020e7e394e13089df" + integrity sha512-0ZrskXVEHSWIqZM/sQZ4EV3jZJXRkio/WCxaqKZP1g//CEWEPSfeZFcms4XeKBCHU0ZKnIkdJeU/kF+eRp5lBg== + dependencies: + "@babel/helper-string-parser" "^7.27.1" + "@babel/helper-validator-identifier" "^7.28.5" + "@bcoe/v8-coverage@^0.2.3": version "0.2.3" resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" @@ -1277,6 +1356,14 @@ "@types/yargs" "^17.0.8" chalk "^4.0.0" +"@jridgewell/gen-mapping@^0.3.12": + version "0.3.13" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz#6342a19f44347518c93e43b1ac69deb3c4656a1f" + integrity sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA== + dependencies: + "@jridgewell/sourcemap-codec" "^1.5.0" + "@jridgewell/trace-mapping" "^0.3.24" + "@jridgewell/gen-mapping@^0.3.5": version "0.3.8" resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz#4f0e06362e01362f823d348f1872b08f666d8142" @@ -1309,6 +1396,11 @@ resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz#3188bcb273a414b0d215fd22a58540b989b9409a" integrity sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ== +"@jridgewell/sourcemap-codec@^1.5.0": + version "1.5.5" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz#6912b00d2c631c0d15ce1a7ab57cd657f2a8f8ba" + integrity sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og== + "@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": version "0.3.25" resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz#15f190e98895f3fc23276ee14bc76b675c2e50f0" @@ -1317,6 +1409,14 @@ "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" +"@jridgewell/trace-mapping@^0.3.28": + version "0.3.31" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz#db15d6781c931f3a251a3dac39501c98a6082fd0" + integrity sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw== + dependencies: + "@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" @@ -3093,7 +3193,7 @@ content-type@~1.0.4, content-type@~1.0.5: resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.5.tgz#8b773162656d1d1086784c8f23a54ce6d73d7918" integrity sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA== -convert-source-map@^2.0.0: +convert-source-map@2.0.0, convert-source-map@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a" integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== @@ -5875,7 +5975,7 @@ react-native-haptic-feedback@2.3.3: resolved "https://registry.yarnpkg.com/react-native-haptic-feedback/-/react-native-haptic-feedback-2.3.3.tgz#88b6876e91399a69bd1b551fe1681b2f3dc1214e" integrity sha512-svS4D5PxfNv8o68m9ahWfwje5NqukM3qLS48+WTdhbDkNUkOhP9rDfDSRHzlhk4zq+ISjyw95EhLeh8NkKX5vQ== -react-native-is-edge-to-edge@^1.2.1: +react-native-is-edge-to-edge@1.2.1, react-native-is-edge-to-edge@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/react-native-is-edge-to-edge/-/react-native-is-edge-to-edge-1.2.1.tgz#64e10851abd9d176cbf2b40562f751622bde3358" integrity sha512-FLbPWl/MyYQWz+KwqOZsSyj2JmLKglHatd3xLZWskXOpRaio4LfEDEz8E/A6uD8QoTHW6Aobw1jbEwK7KMgR7Q== @@ -5884,13 +5984,13 @@ react-native-is-edge-to-edge@^1.2.1: version "0.0.0" uid "" -react-native-reanimated@4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/react-native-reanimated/-/react-native-reanimated-4.1.2.tgz#d2ab20c575740b29002d115617d6621c83e81c89" - integrity sha512-qzmQiFrvjm62pRBcj97QI9Xckc3EjgHQoY1F2yjktd0kpjhoyePeuTEXjYRCAVIy7IV/1cfeSup34+zFThFoHQ== +react-native-reanimated@4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/react-native-reanimated/-/react-native-reanimated-4.2.1.tgz#fbdee721bff0946a6e5ae67c8c38c37ca4a0a057" + integrity sha512-/NcHnZMyOvsD/wYXug/YqSKw90P9edN0kEPL5lP4PFf1aQ4F1V7MKe/E0tvfkXKIajy3Qocp5EiEnlcrK/+BZg== dependencies: - react-native-is-edge-to-edge "^1.2.1" - semver "7.7.2" + react-native-is-edge-to-edge "1.2.1" + semver "7.7.3" react-native-safe-area-context@5.6.1: version "5.6.1" @@ -5933,22 +6033,22 @@ react-native-webview@^13.16.0: escape-string-regexp "^4.0.0" invariant "2.2.4" -react-native-worklets@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/react-native-worklets/-/react-native-worklets-0.6.0.tgz#bbbaf65715d15e3746ca32597a69e0e63690c069" - integrity sha512-yETMNuCcivdYWteuG4eRqgiAk2DzRCrVAaEBIEWPo4emrf3BNjadFo85L5QvyEusrX9QKE3ZEAx8U5A/nbyFgg== - dependencies: - "@babel/plugin-transform-arrow-functions" "^7.0.0-0" - "@babel/plugin-transform-class-properties" "^7.0.0-0" - "@babel/plugin-transform-classes" "^7.0.0-0" - "@babel/plugin-transform-nullish-coalescing-operator" "^7.0.0-0" - "@babel/plugin-transform-optional-chaining" "^7.0.0-0" - "@babel/plugin-transform-shorthand-properties" "^7.0.0-0" - "@babel/plugin-transform-template-literals" "^7.0.0-0" - "@babel/plugin-transform-unicode-regex" "^7.0.0-0" - "@babel/preset-typescript" "^7.16.7" - convert-source-map "^2.0.0" - semver "7.7.2" +react-native-worklets@^0.7.1: + version "0.7.1" + resolved "https://registry.yarnpkg.com/react-native-worklets/-/react-native-worklets-0.7.1.tgz#263da5216b0b5342b9f1b36e0ab897c5ca5c863b" + integrity sha512-KNsvR48ULg73QhTlmwPbdJLPsWcyBotrGPsrDRDswb5FYpQaJEThUKc2ncXE4UM5dn/ewLoQHjSjLaKUVPxPhA== + dependencies: + "@babel/plugin-transform-arrow-functions" "7.27.1" + "@babel/plugin-transform-class-properties" "7.27.1" + "@babel/plugin-transform-classes" "7.28.4" + "@babel/plugin-transform-nullish-coalescing-operator" "7.27.1" + "@babel/plugin-transform-optional-chaining" "7.27.1" + "@babel/plugin-transform-shorthand-properties" "7.27.1" + "@babel/plugin-transform-template-literals" "7.27.1" + "@babel/plugin-transform-unicode-regex" "7.27.1" + "@babel/preset-typescript" "7.27.1" + convert-source-map "2.0.0" + semver "7.7.3" react-native@0.81.4: version "0.81.4" @@ -6256,10 +6356,10 @@ selfsigned@^2.4.1: "@types/node-forge" "^1.3.0" node-forge "^1" -semver@7.7.2, semver@^7.1.3, semver@^7.5.2, semver@^7.5.3, semver@^7.5.4: - version "7.7.2" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.2.tgz#67d99fdcd35cec21e6f8b87a7fd515a33f982b58" - integrity sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA== +semver@7.7.3: + version "7.7.3" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.3.tgz#4b5f4143d007633a8dc671cd0a6ef9147b8bb946" + integrity sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q== semver@^5.5.0, semver@^5.6.0: version "5.7.2" @@ -6271,6 +6371,11 @@ semver@^6.3.0, semver@^6.3.1: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== +semver@^7.1.3, semver@^7.5.2, semver@^7.5.3, semver@^7.5.4: + version "7.7.2" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.2.tgz#67d99fdcd35cec21e6f8b87a7fd515a33f982b58" + integrity sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA== + send@0.19.0: version "0.19.0" resolved "https://registry.yarnpkg.com/send/-/send-0.19.0.tgz#bbc5a388c8ea6c048967049dbeac0e4a3f09d7f8" diff --git a/ios/animations/KeyboardAnimation.swift b/ios/animations/KeyboardAnimation.swift index fbf557f30c..3f1ee7c956 100644 --- a/ios/animations/KeyboardAnimation.swift +++ b/ios/animations/KeyboardAnimation.swift @@ -23,13 +23,18 @@ public class KeyboardAnimation: KeyboardAnimationProtocol { // constructor variables let fromValue: Double let toValue: Double + let duration: Double let speed: Double let timestamp: CFTimeInterval + // internal state + var lastValue: Double - init(fromValue: Double, toValue: Double, animation: CAMediaTiming) { + init(fromValue: Double, toValue: Double, animation: CAMediaTiming, duration: Double) { self.fromValue = fromValue self.toValue = toValue self.animation = animation + self.duration = duration + lastValue = fromValue speed = Double(animation.speed) timestamp = CACurrentMediaTime() } @@ -48,6 +53,10 @@ public class KeyboardAnimation: KeyboardAnimationProtocol { return fromValue < toValue } + var isFinished: Bool { + return lastValue == toValue + } + func valueAt(time _: Double) -> Double { fatalError("Method is not implemented in abstract class!") } diff --git a/ios/animations/SpringAnimation.swift b/ios/animations/SpringAnimation.swift index 8712c29aa7..8e7e388fad 100644 --- a/ios/animations/SpringAnimation.swift +++ b/ios/animations/SpringAnimation.swift @@ -57,7 +57,7 @@ public final class SpringAnimation: KeyboardAnimation { bUnder = 0 } - super.init(fromValue: fromValue, toValue: toValue, animation: animation) + super.init(fromValue: fromValue, toValue: toValue, animation: animation, duration: animation.settlingDuration) } // public functions diff --git a/ios/animations/TimingAnimation.swift b/ios/animations/TimingAnimation.swift index 7120bdb471..7515cb280b 100644 --- a/ios/animations/TimingAnimation.swift +++ b/ios/animations/TimingAnimation.swift @@ -30,7 +30,7 @@ public final class TimingAnimation: KeyboardAnimation { self.p1 = p1 self.p2 = p2 - super.init(fromValue: fromValue, toValue: toValue, animation: animation) + super.init(fromValue: fromValue, toValue: toValue, animation: animation, duration: animation.duration) } // MARK: public functions diff --git a/ios/extensions/Notification.swift b/ios/extensions/Notification.swift index 9874fd2296..17f0b88edf 100644 --- a/ios/extensions/Notification.swift +++ b/ios/extensions/Notification.swift @@ -18,4 +18,5 @@ extension Notification { extension Notification.Name { static let shouldIgnoreKeyboardEvents = Notification.Name("shouldIgnoreKeyboardEvents") + static let keyboardDidAppear = Notification.Name("keyboardDidAppear") } diff --git a/ios/interactive/KeyboardAreaExtender.swift b/ios/interactive/KeyboardAreaExtender.swift index 8948f11ca0..124304d3bb 100644 --- a/ios/interactive/KeyboardAreaExtender.swift +++ b/ios/interactive/KeyboardAreaExtender.swift @@ -15,7 +15,7 @@ class KeyboardAreaExtender: NSObject { NotificationCenter.default.addObserver( self, selector: #selector(keyboardDidAppear), - name: UIResponder.keyboardDidShowNotification, + name: .keyboardDidAppear, object: nil ) } diff --git a/ios/observers/movement/observer/KeyboardMovementObserver+Lifecycle.swift b/ios/observers/movement/observer/KeyboardMovementObserver+Lifecycle.swift index 3d23f507cd..cdbd63359b 100644 --- a/ios/observers/movement/observer/KeyboardMovementObserver+Lifecycle.swift +++ b/ios/observers/movement/observer/KeyboardMovementObserver+Lifecycle.swift @@ -25,18 +25,6 @@ public extension KeyboardMovementObserver { name: UIResponder.keyboardWillShowNotification, object: nil ) - NotificationCenter.default.addObserver( - self, - selector: #selector(keyboardDidAppear), - name: UIResponder.keyboardDidShowNotification, - object: nil - ) - NotificationCenter.default.addObserver( - self, - selector: #selector(keyboardDidDisappear), - name: UIResponder.keyboardDidHideNotification, - object: nil - ) } @objc func unmount() { diff --git a/ios/observers/movement/observer/KeyboardMovementObserver+Listeners.swift b/ios/observers/movement/observer/KeyboardMovementObserver+Listeners.swift index b6d517c172..47cb3b0b9c 100644 --- a/ios/observers/movement/observer/KeyboardMovementObserver+Listeners.swift +++ b/ios/observers/movement/observer/KeyboardMovementObserver+Listeners.swift @@ -14,8 +14,8 @@ extension KeyboardMovementObserver { tag = UIResponder.current.reactViewTag let keyboardHeight = keyboardFrame.cgRectValue.size.height self.keyboardHeight = keyboardHeight + self.notification = notification self.duration = duration - didShowDeadline = Date.currentTimeStamp + Int64(duration) onRequestAnimation() onEvent("onKeyboardMoveStart", Float(self.keyboardHeight) as NSNumber, 1, duration as NSNumber, tag) @@ -30,6 +30,11 @@ extension KeyboardMovementObserver { guard !UIResponder.isKeyboardPreloading else { return } let (duration, _) = notification.keyboardMetaData() tag = UIResponder.current.reactViewTag + self.notification = notification + // when keyboard disappears immediately replace the keyboard frame with .zero + // since this will be the final frame of the keyboard after animation + self.notification?.userInfo?[UIResponder.keyboardFrameEndUserInfoKey] = + NSValue(cgRect: CGRect(x: 0, y: 0, width: 0, height: 0)) self.duration = duration onRequestAnimation() @@ -44,10 +49,8 @@ extension KeyboardMovementObserver { @objc func keyboardDidAppear(_ notification: Notification) { guard !UIResponder.isKeyboardPreloading else { return } - let timestamp = Date.currentTimeStamp let (duration, frame) = notification.keyboardMetaData() if let keyboardFrame = frame { - let (position, _) = keyboardTrackingView.view.frameTransitionInWindow let keyboardHeight = keyboardFrame.cgRectValue.size.height tag = UIResponder.current.reactViewTag self.keyboardHeight = keyboardHeight @@ -57,9 +60,7 @@ extension KeyboardMovementObserver { return } - // if the event is caught in between it's highly likely that it could be a "resize" event - // so we just read actual keyboard frame value in this case - let height = timestamp >= didShowDeadline ? self.keyboardHeight : position - KeyboardAreaExtender.shared.offset + let height = self.keyboardHeight - KeyboardAreaExtender.shared.offset // always limit progress to the maximum possible value let progress = min(height / self.keyboardHeight, 1.0) @@ -70,6 +71,10 @@ extension KeyboardMovementObserver { removeKeyboardWatcher() setupKVObserver() animation = nil + + NotificationCenter.default.post( + name: .keyboardDidAppear, object: notification, userInfo: nil + ) } } diff --git a/ios/observers/movement/observer/KeyboardMovementObserver+Watcher.swift b/ios/observers/movement/observer/KeyboardMovementObserver+Watcher.swift index 53148a6ea0..61b53a1d99 100644 --- a/ios/observers/movement/observer/KeyboardMovementObserver+Watcher.swift +++ b/ios/observers/movement/observer/KeyboardMovementObserver+Watcher.swift @@ -40,6 +40,9 @@ extension KeyboardMovementObserver { prevKeyboardPosition = keyboardPosition if let animation = animation { + if animation.isFinished { + return + } let baseDuration = animation.timingAt(value: keyboardPosition) #if targetEnvironment(simulator) @@ -59,6 +62,7 @@ extension KeyboardMovementObserver { // but CASpringAnimation can never get to this final destination let race: (CGFloat, CGFloat) -> CGFloat = animation.isIncreasing ? max : min keyboardPosition = race(position, keyboardPosition) + animation.lastValue = keyboardPosition } onEvent( diff --git a/ios/observers/movement/observer/KeyboardMovementObserver.swift b/ios/observers/movement/observer/KeyboardMovementObserver.swift index 7fb0746446..5c23801136 100644 --- a/ios/observers/movement/observer/KeyboardMovementObserver.swift +++ b/ios/observers/movement/observer/KeyboardMovementObserver.swift @@ -19,7 +19,30 @@ public class KeyboardMovementObserver: NSObject { var onCancelAnimation: () -> Void // progress tracker @objc public var keyboardTrackingView = KeyboardTrackingView() - var animation: KeyboardAnimation? + var animation: KeyboardAnimation? { + didSet { + keyboardDidTask?.cancel() + + guard let animation = animation, let notification = notification else { + return + } + + let toValue = animation.toValue + let duration = animation.duration + + let task = DispatchWorkItem { [weak self] in + guard let self = self else { return } + if toValue > 0 { + self.keyboardDidAppear(notification) + } else { + self.keyboardDidDisappear(notification) + } + } + + keyboardDidTask = task + DispatchQueue.main.asyncAfter(deadline: .now() + duration, execute: task) + } + } var prevKeyboardPosition = 0.0 var displayLink: CADisplayLink! @@ -32,9 +55,34 @@ public class KeyboardMovementObserver: NSObject { set { _keyboardHeight = newValue } } - var duration = 0 + var duration = 0 { + didSet { + keyboardDidTask?.cancel() + + guard let notification = notification, + let height = notification.keyboardMetaData().1?.cgRectValue.size.height, duration == 0 + else { + return + } + + let task = DispatchWorkItem { [weak self] in + guard let self = self else { return } + if height > 0 { + self.keyboardDidAppear(notification) + } else { + self.keyboardDidDisappear(notification) + } + } + + keyboardDidTask = task + DispatchQueue.main.asyncAfter(deadline: .now() + UIUtils.nextFrame, execute: task) + } + } + var tag: NSNumber = -1 - var didShowDeadline: Int64 = 0 + // manual did events + var notification: Notification? + var keyboardDidTask: DispatchWorkItem? @objc public init( handler: @escaping (NSString, NSNumber, NSNumber, NSNumber, NSNumber) -> Void,