diff --git a/FabricTestExample/App.js b/FabricTestExample/App.js
index 49db6e6bdd..055ae2184d 100644
--- a/FabricTestExample/App.js
+++ b/FabricTestExample/App.js
@@ -93,6 +93,7 @@ import Test1864 from './src/Test1864';
import TestScreenAnimation from './src/TestScreenAnimation';
import Test1981 from './src/Test1981';
import Test2008 from './src/Test2008';
+import Test2028 from './src/Test2028';
enableFreeze(true);
diff --git a/FabricTestExample/src/Test2028.tsx b/FabricTestExample/src/Test2028.tsx
new file mode 100644
index 0000000000..81c1f1aa3f
--- /dev/null
+++ b/FabricTestExample/src/Test2028.tsx
@@ -0,0 +1,54 @@
+
+import React from 'react';
+import { Button, SafeAreaView, View } from 'react-native';
+
+import { createNativeStackNavigator } from '@react-navigation/native-stack';
+import { NavigationContainer } from '@react-navigation/native';
+
+const Stack = createNativeStackNavigator();
+
+const TestScreen = ({ navigation }): React.JSX.Element => {
+ return (
+
+
+ );
+};
+function App(): React.JSX.Element {
+ return (
+ <>
+
+
+
+
+
+
+
+ >
+ );
+}
+
+export default App;
diff --git a/FabricTestExample/yarn.lock b/FabricTestExample/yarn.lock
index e51e2f0764..5625ffc90a 100644
--- a/FabricTestExample/yarn.lock
+++ b/FabricTestExample/yarn.lock
@@ -3021,7 +3021,7 @@ defaults@^1.0.3:
dependencies:
clone "^1.0.2"
-define-data-property@^1.0.1, define-data-property@^1.1.2, define-data-property@^1.1.4:
+define-data-property@^1.0.1, define-data-property@^1.1.4:
version "1.1.4"
resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e"
integrity sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==
@@ -3696,7 +3696,7 @@ get-caller-file@^2.0.1, get-caller-file@^2.0.5:
resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e"
integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==
-get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@^1.2.1, get-intrinsic@^1.2.2, get-intrinsic@^1.2.3, get-intrinsic@^1.2.4:
+get-intrinsic@^1.1.3, get-intrinsic@^1.2.1, get-intrinsic@^1.2.3, get-intrinsic@^1.2.4:
version "1.2.4"
resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.4.tgz#e385f5a4b5227d449c3eabbad05494ef0abbeadd"
integrity sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==
@@ -3815,7 +3815,7 @@ has-flag@^4.0.0:
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b"
integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==
-has-property-descriptors@^1.0.0, has-property-descriptors@^1.0.1, has-property-descriptors@^1.0.2:
+has-property-descriptors@^1.0.0, has-property-descriptors@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz#963ed7d071dc7bf5f084c5bfbe0d1b6222586854"
integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==
@@ -3832,7 +3832,7 @@ has-symbols@^1.0.2, has-symbols@^1.0.3:
resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8"
integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==
-has-tostringtag@^1.0.0, has-tostringtag@^1.0.1, has-tostringtag@^1.0.2:
+has-tostringtag@^1.0.0, has-tostringtag@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz#2cdc42d40bef2e5b4eeab7c01a73c54ce7ab5abc"
integrity sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==
@@ -4083,10 +4083,10 @@ is-interactive@^1.0.0:
resolved "https://registry.yarnpkg.com/is-interactive/-/is-interactive-1.0.0.tgz#cea6e6ae5c870a7b0a0004070b7b587e0252912e"
integrity sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==
-is-map@^2.0.1:
- version "2.0.2"
- resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.2.tgz#00922db8c9bf73e81b7a335827bc2a43f2b91127"
- integrity sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==
+is-map@^2.0.3:
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.3.tgz#ede96b7fe1e270b3c4465e3a465658764926d62e"
+ integrity sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==
is-negative-zero@^2.0.2:
version "2.0.3"
@@ -4125,10 +4125,10 @@ is-regex@^1.1.4:
call-bind "^1.0.2"
has-tostringtag "^1.0.0"
-is-set@^2.0.1:
- version "2.0.2"
- resolved "https://registry.yarnpkg.com/is-set/-/is-set-2.0.2.tgz#90755fa4c2562dc1c5d4024760d6119b94ca18ec"
- integrity sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g==
+is-set@^2.0.3:
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/is-set/-/is-set-2.0.3.tgz#8ab209ea424608141372ded6e0cb200ef1d9d01d"
+ integrity sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==
is-shared-array-buffer@^1.0.2:
version "1.0.3"
@@ -4168,10 +4168,10 @@ is-unicode-supported@^0.1.0:
resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7"
integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==
-is-weakmap@^2.0.1:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/is-weakmap/-/is-weakmap-2.0.1.tgz#5008b59bdc43b698201d18f62b37b2ca243e8cf2"
- integrity sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA==
+is-weakmap@^2.0.2:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/is-weakmap/-/is-weakmap-2.0.2.tgz#bf72615d649dfe5f699079c54b83e47d1ae19cfd"
+ integrity sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==
is-weakref@^1.0.2:
version "1.0.2"
@@ -4180,13 +4180,13 @@ is-weakref@^1.0.2:
dependencies:
call-bind "^1.0.2"
-is-weakset@^2.0.1:
- version "2.0.2"
- resolved "https://registry.yarnpkg.com/is-weakset/-/is-weakset-2.0.2.tgz#4569d67a747a1ce5a994dfd4ef6dcea76e7c0a1d"
- integrity sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg==
+is-weakset@^2.0.3:
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/is-weakset/-/is-weakset-2.0.3.tgz#e801519df8c0c43e12ff2834eead84ec9e624007"
+ integrity sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ==
dependencies:
- call-bind "^1.0.2"
- get-intrinsic "^1.1.1"
+ call-bind "^1.0.7"
+ get-intrinsic "^1.2.4"
is-wsl@^1.1.0:
version "1.1.0"
@@ -5663,9 +5663,9 @@ range-parser@~1.2.1:
integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==
react-devtools-core@^5.0.0:
- version "5.0.0"
- resolved "https://registry.yarnpkg.com/react-devtools-core/-/react-devtools-core-5.0.0.tgz#50b04a4dbfa62badbe4d86529e9478c396988b31"
- integrity sha512-SAAMLacNDfFjMJjmbXURNWtrTyARi9xTqGkY48Btw5cIWlr1wgxfWYZKxoUZav1qqmhbpgTzSmmF+cpMHGHY3A==
+ version "5.0.2"
+ resolved "https://registry.yarnpkg.com/react-devtools-core/-/react-devtools-core-5.0.2.tgz#c3c11c7b91857131d694457885ef49b7ae590857"
+ integrity sha512-+fDp3kDfPpF5xbAACJmihPHL0iDKpnKr7MyRvW0nZq71xwHWDW3zRCNpiiAJWd85vAGT+GbV9O87zAIDgvV1gw==
dependencies:
shell-quote "^1.6.1"
ws "^7"
@@ -5989,12 +5989,12 @@ run-parallel@^1.1.9:
queue-microtask "^1.2.2"
safe-array-concat@^1.1.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/safe-array-concat/-/safe-array-concat-1.1.0.tgz#8d0cae9cb806d6d1c06e08ab13d847293ebe0692"
- integrity sha512-ZdQ0Jeb9Ofti4hbt5lX3T2JcAamT9hfzYU1MNB+z/jaEbB6wfFfPIR/zEORmZqobkCCJhSjodobH6WHNmJ97dg==
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/safe-array-concat/-/safe-array-concat-1.1.2.tgz#81d77ee0c4e8b863635227c721278dd524c20edb"
+ integrity sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==
dependencies:
- call-bind "^1.0.5"
- get-intrinsic "^1.2.2"
+ call-bind "^1.0.7"
+ get-intrinsic "^1.2.4"
has-symbols "^1.0.3"
isarray "^2.0.5"
@@ -6096,16 +6096,16 @@ set-blocking@^2.0.0:
integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==
set-function-length@^1.2.1:
- version "1.2.1"
- resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.1.tgz#47cc5945f2c771e2cf261c6737cf9684a2a5e425"
- integrity sha512-j4t6ccc+VsKwYHso+kElc5neZpjtq9EnRICFZtWyBsLojhmeF/ZBd/elqm22WJh/BziDe/SBiOeAt0m2mfLD0g==
+ version "1.2.2"
+ resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449"
+ integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==
dependencies:
- define-data-property "^1.1.2"
+ define-data-property "^1.1.4"
es-errors "^1.3.0"
function-bind "^1.1.2"
- get-intrinsic "^1.2.3"
+ get-intrinsic "^1.2.4"
gopd "^1.0.1"
- has-property-descriptors "^1.0.1"
+ has-property-descriptors "^1.0.2"
set-function-name@^2.0.0, set-function-name@^2.0.1:
version "2.0.2"
@@ -6147,11 +6147,11 @@ shell-quote@^1.6.1, shell-quote@^1.7.3:
integrity sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==
side-channel@^1.0.4:
- version "1.0.5"
- resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.5.tgz#9a84546599b48909fb6af1211708d23b1946221b"
- integrity sha512-QcgiIWV4WV7qWExbN5llt6frQB/lBven9pqliLXfGPB+K9ZYXxDozp0wLkHS24kWCm+6YXH/f0HhnObZnZOBnQ==
+ version "1.0.6"
+ resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.6.tgz#abd25fb7cd24baf45466406b1096b7831c9215f2"
+ integrity sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==
dependencies:
- call-bind "^1.0.6"
+ call-bind "^1.0.7"
es-errors "^1.3.0"
get-intrinsic "^1.2.4"
object-inspect "^1.13.1"
@@ -6418,9 +6418,9 @@ temp@^0.8.4:
rimraf "~2.6.2"
terser@^5.15.0:
- version "5.27.2"
- resolved "https://registry.yarnpkg.com/terser/-/terser-5.27.2.tgz#577a362515ff5635f98ba149643793a3973ba77e"
- integrity sha512-sHXmLSkImesJ4p5apTeT63DsV4Obe1s37qT8qvwHRmVxKTBH7Rv9Wr26VcAMmLbmk9UliiwK8z+657NyJHHy/w==
+ version "5.29.2"
+ resolved "https://registry.yarnpkg.com/terser/-/terser-5.29.2.tgz#c17d573ce1da1b30f21a877bffd5655dd86fdb35"
+ integrity sha512-ZiGkhUBIM+7LwkNjXYJq8svgkd+QK3UUr0wJqY4MieaezBSAIPgbSPZyIx0idM6XWK5CMzSWa8MJIzmRcB8Caw==
dependencies:
"@jridgewell/source-map" "^0.3.3"
acorn "^8.8.2"
@@ -6482,9 +6482,9 @@ tr46@~0.0.3:
integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==
ts-api-utils@^1.0.1:
- version "1.2.1"
- resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.2.1.tgz#f716c7e027494629485b21c0df6180f4d08f5e8b"
- integrity sha512-RIYA36cJn2WiH9Hy77hdF9r7oEwxAtB/TS9/S4Qd90Ap4z5FSiin5zEiTL44OII1Y3IIlEvxwxFUVgrHSZ/UpA==
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.3.0.tgz#4b490e27129f1e8e686b45cc4ab63714dc60eea1"
+ integrity sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==
tslib@^1.8.1:
version "1.14.1"
@@ -6743,14 +6743,14 @@ which-builtin-type@^1.1.3:
which-typed-array "^1.1.9"
which-collection@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/which-collection/-/which-collection-1.0.1.tgz#70eab71ebbbd2aefaf32f917082fc62cdcb70906"
- integrity sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A==
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/which-collection/-/which-collection-1.0.2.tgz#627ef76243920a107e7ce8e96191debe4b16c2a0"
+ integrity sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==
dependencies:
- is-map "^2.0.1"
- is-set "^2.0.1"
- is-weakmap "^2.0.1"
- is-weakset "^2.0.1"
+ is-map "^2.0.3"
+ is-set "^2.0.3"
+ is-weakmap "^2.0.2"
+ is-weakset "^2.0.3"
which-module@^2.0.0:
version "2.0.1"
@@ -6758,15 +6758,15 @@ which-module@^2.0.0:
integrity sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==
which-typed-array@^1.1.14, which-typed-array@^1.1.9:
- version "1.1.14"
- resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.14.tgz#1f78a111aee1e131ca66164d8bdc3ab062c95a06"
- integrity sha512-VnXFiIW8yNn9kIHN88xvZ4yOWchftKDsRJ8fEPacX/wl1lOvBrhsJ/OeJCXq7B0AaijRuqgzSKalJoPk+D8MPg==
+ version "1.1.15"
+ resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.15.tgz#264859e9b11a649b388bfaaf4f767df1f779b38d"
+ integrity sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==
dependencies:
- available-typed-arrays "^1.0.6"
- call-bind "^1.0.5"
+ available-typed-arrays "^1.0.7"
+ call-bind "^1.0.7"
for-each "^0.3.3"
gopd "^1.0.1"
- has-tostringtag "^1.0.1"
+ has-tostringtag "^1.0.2"
which@^2.0.1:
version "2.0.2"
@@ -6853,9 +6853,9 @@ yallist@^4.0.0:
integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==
yaml@^2.2.1:
- version "2.3.4"
- resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.3.4.tgz#53fc1d514be80aabf386dc6001eb29bf3b7523b2"
- integrity sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==
+ version "2.4.1"
+ resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.4.1.tgz#2e57e0b5e995292c25c75d2658f0664765210eed"
+ integrity sha512-pIXzoImaqmfOrL7teGUBt/T7ZDnyeGBWyXQBvOVhLkWLN37GXv8NMLK406UY6dS51JfcQHsmcW5cJ441bHg6Lg==
yargs-parser@^18.1.2:
version "18.1.3"
diff --git a/TestsExample/Gemfile.lock b/TestsExample/Gemfile.lock
index 49ea1312e8..73bcf331dd 100644
--- a/TestsExample/Gemfile.lock
+++ b/TestsExample/Gemfile.lock
@@ -1,26 +1,29 @@
GEM
remote: https://rubygems.org/
specs:
- CFPropertyList (3.0.6)
+ CFPropertyList (3.0.7)
+ base64
+ nkf
rexml
- activesupport (7.0.7.2)
+ activesupport (7.0.8.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
- addressable (2.8.4)
+ addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
algoliasearch (1.27.5)
httpclient (~> 2.8, >= 2.8.3)
json (>= 1.5.1)
atomos (0.1.3)
+ base64 (0.2.0)
claide (1.1.0)
- cocoapods (1.12.1)
+ cocoapods (1.15.2)
addressable (~> 2.8)
claide (>= 1.0.2, < 2.0)
- cocoapods-core (= 1.12.1)
+ cocoapods-core (= 1.15.2)
cocoapods-deintegrate (>= 1.0.3, < 2.0)
- cocoapods-downloader (>= 1.6.0, < 2.0)
+ cocoapods-downloader (>= 2.1, < 3.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
cocoapods-search (>= 1.0.0, < 2.0)
cocoapods-trunk (>= 1.6.0, < 2.0)
@@ -32,8 +35,8 @@ GEM
molinillo (~> 0.8.0)
nap (~> 1.0)
ruby-macho (>= 2.3.0, < 3.0)
- xcodeproj (>= 1.21.0, < 2.0)
- cocoapods-core (1.12.1)
+ xcodeproj (>= 1.23.0, < 2.0)
+ cocoapods-core (1.15.2)
activesupport (>= 5.0, < 8)
addressable (~> 2.8)
algoliasearch (~> 1.0)
@@ -44,7 +47,7 @@ GEM
public_suffix (~> 4.0)
typhoeus (~> 1.0)
cocoapods-deintegrate (1.0.5)
- cocoapods-downloader (1.6.3)
+ cocoapods-downloader (2.1)
cocoapods-plugins (1.0.0)
nap
cocoapods-search (1.0.1)
@@ -53,31 +56,32 @@ GEM
netrc (~> 0.11)
cocoapods-try (1.2.0)
colored2 (3.1.2)
- concurrent-ruby (1.2.2)
+ concurrent-ruby (1.2.3)
escape (0.0.4)
ethon (0.16.0)
ffi (>= 1.15.0)
- ffi (1.15.5)
+ ffi (1.16.3)
fourflusher (2.3.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
httpclient (2.8.3)
- i18n (1.14.1)
+ i18n (1.14.4)
concurrent-ruby (~> 1.0)
- json (2.6.3)
- minitest (5.19.0)
+ json (2.7.1)
+ minitest (5.22.3)
molinillo (0.8.0)
nanaimo (0.3.0)
nap (1.1.0)
netrc (0.11.0)
+ nkf (0.2.0)
public_suffix (4.0.7)
- rexml (3.2.5)
+ rexml (3.2.6)
ruby-macho (2.5.1)
- typhoeus (1.4.0)
+ typhoeus (1.4.1)
ethon (>= 0.9.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
- xcodeproj (1.22.0)
+ xcodeproj (1.24.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
@@ -89,10 +93,11 @@ PLATFORMS
ruby
DEPENDENCIES
- cocoapods (~> 1.12)
+ activesupport (>= 6.1.7.5, < 7.1.0)
+ cocoapods (~> 1.15.2)
RUBY VERSION
- ruby 2.6.10p210
+ ruby 3.2.1p31
BUNDLED WITH
- 1.17.2
+ 2.4.6
diff --git a/TestsExample/ios/Podfile b/TestsExample/ios/Podfile
index 348e4f6ff7..bd3f1e81dd 100644
--- a/TestsExample/ios/Podfile
+++ b/TestsExample/ios/Podfile
@@ -8,17 +8,6 @@ require Pod::Executable.execute_command('node', ['-p',
platform :ios, min_ios_version_supported
prepare_react_native_project!
-# If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set.
-# because `react-native-flipper` depends on (FlipperKit,...) that will be excluded
-#
-# To fix this you can also exclude `react-native-flipper` using a `react-native.config.js`
-# ```js
-# module.exports = {
-# dependencies: {
-# ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),
-# ```
-flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled
-
linkage = ENV['USE_FRAMEWORKS']
if linkage != nil
Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
@@ -30,11 +19,7 @@ target 'TestsExample' do
use_react_native!(
:path => config[:reactNativePath],
- # Enables Flipper.
- #
- # Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable the next line.
- :flipper_configuration => flipper_config,
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
diff --git a/TestsExample/ios/Podfile.lock b/TestsExample/ios/Podfile.lock
index 64d4c88960..a8fbc3c6f1 100644
--- a/TestsExample/ios/Podfile.lock
+++ b/TestsExample/ios/Podfile.lock
@@ -1,6 +1,5 @@
PODS:
- boost (1.83.0)
- - CocoaAsyncSocket (7.6.5)
- DoubleConversion (1.1.6)
- FBLazyVector (0.73.4)
- FBReactNativeSpec (0.73.4):
@@ -10,69 +9,12 @@ PODS:
- React-Core (= 0.73.4)
- React-jsi (= 0.73.4)
- ReactCommon/turbomodule/core (= 0.73.4)
- - Flipper (0.201.0):
- - Flipper-Folly (~> 2.6)
- - Flipper-Boost-iOSX (1.76.0.1.11)
- - Flipper-DoubleConversion (3.2.0.1)
- - Flipper-Fmt (7.1.7)
- - Flipper-Folly (2.6.10):
- - Flipper-Boost-iOSX
- - Flipper-DoubleConversion
- - Flipper-Fmt (= 7.1.7)
- - Flipper-Glog
- - libevent (~> 2.1.12)
- - OpenSSL-Universal (= 1.1.1100)
- - Flipper-Glog (0.5.0.5)
- - Flipper-PeerTalk (0.0.4)
- - FlipperKit (0.201.0):
- - FlipperKit/Core (= 0.201.0)
- - FlipperKit/Core (0.201.0):
- - Flipper (~> 0.201.0)
- - FlipperKit/CppBridge
- - FlipperKit/FBCxxFollyDynamicConvert
- - FlipperKit/FBDefines
- - FlipperKit/FKPortForwarding
- - SocketRocket (~> 0.6.0)
- - FlipperKit/CppBridge (0.201.0):
- - Flipper (~> 0.201.0)
- - FlipperKit/FBCxxFollyDynamicConvert (0.201.0):
- - Flipper-Folly (~> 2.6)
- - FlipperKit/FBDefines (0.201.0)
- - FlipperKit/FKPortForwarding (0.201.0):
- - CocoaAsyncSocket (~> 7.6)
- - Flipper-PeerTalk (~> 0.0.4)
- - FlipperKit/FlipperKitHighlightOverlay (0.201.0)
- - FlipperKit/FlipperKitLayoutHelpers (0.201.0):
- - FlipperKit/Core
- - FlipperKit/FlipperKitHighlightOverlay
- - FlipperKit/FlipperKitLayoutTextSearchable
- - FlipperKit/FlipperKitLayoutIOSDescriptors (0.201.0):
- - FlipperKit/Core
- - FlipperKit/FlipperKitHighlightOverlay
- - FlipperKit/FlipperKitLayoutHelpers
- - FlipperKit/FlipperKitLayoutPlugin (0.201.0):
- - FlipperKit/Core
- - FlipperKit/FlipperKitHighlightOverlay
- - FlipperKit/FlipperKitLayoutHelpers
- - FlipperKit/FlipperKitLayoutIOSDescriptors
- - FlipperKit/FlipperKitLayoutTextSearchable
- - FlipperKit/FlipperKitLayoutTextSearchable (0.201.0)
- - FlipperKit/FlipperKitNetworkPlugin (0.201.0):
- - FlipperKit/Core
- - FlipperKit/FlipperKitReactPlugin (0.201.0):
- - FlipperKit/Core
- - FlipperKit/FlipperKitUserDefaultsPlugin (0.201.0):
- - FlipperKit/Core
- - FlipperKit/SKIOSNetworkPlugin (0.201.0):
- - FlipperKit/Core
- - FlipperKit/FlipperKitNetworkPlugin
- fmt (6.2.1)
- glog (0.3.5)
- hermes-engine (0.73.4):
- hermes-engine/Pre-built (= 0.73.4)
- hermes-engine/Pre-built (0.73.4)
- libevent (2.1.12)
- - OpenSSL-Universal (1.1.1100)
- RCT-Folly (2022.05.16.00):
- boost
- DoubleConversion
@@ -1134,30 +1076,9 @@ DEPENDENCIES:
- DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
- FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`)
- FBReactNativeSpec (from `../node_modules/react-native/React/FBReactNativeSpec`)
- - Flipper (= 0.201.0)
- - Flipper-Boost-iOSX (= 1.76.0.1.11)
- - Flipper-DoubleConversion (= 3.2.0.1)
- - Flipper-Fmt (= 7.1.7)
- - Flipper-Folly (= 2.6.10)
- - Flipper-Glog (= 0.5.0.5)
- - Flipper-PeerTalk (= 0.0.4)
- - FlipperKit (= 0.201.0)
- - FlipperKit/Core (= 0.201.0)
- - FlipperKit/CppBridge (= 0.201.0)
- - FlipperKit/FBCxxFollyDynamicConvert (= 0.201.0)
- - FlipperKit/FBDefines (= 0.201.0)
- - FlipperKit/FKPortForwarding (= 0.201.0)
- - FlipperKit/FlipperKitHighlightOverlay (= 0.201.0)
- - FlipperKit/FlipperKitLayoutPlugin (= 0.201.0)
- - FlipperKit/FlipperKitLayoutTextSearchable (= 0.201.0)
- - FlipperKit/FlipperKitNetworkPlugin (= 0.201.0)
- - FlipperKit/FlipperKitReactPlugin (= 0.201.0)
- - FlipperKit/FlipperKitUserDefaultsPlugin (= 0.201.0)
- - FlipperKit/SKIOSNetworkPlugin (= 0.201.0)
- glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
- hermes-engine (from `../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`)
- libevent (~> 2.1.12)
- - OpenSSL-Universal (= 1.1.1100)
- RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`)
- RCT-Folly/Fabric (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`)
- RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`)
@@ -1166,7 +1087,6 @@ DEPENDENCIES:
- React-callinvoker (from `../node_modules/react-native/ReactCommon/callinvoker`)
- React-Codegen (from `build/generated/ios`)
- React-Core (from `../node_modules/react-native/`)
- - React-Core/DevSupport (from `../node_modules/react-native/`)
- React-Core/RCTWebSocket (from `../node_modules/react-native/`)
- React-CoreModules (from `../node_modules/react-native/React/CoreModules`)
- React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`)
@@ -1210,18 +1130,8 @@ DEPENDENCIES:
SPEC REPOS:
trunk:
- - CocoaAsyncSocket
- - Flipper
- - Flipper-Boost-iOSX
- - Flipper-DoubleConversion
- - Flipper-Fmt
- - Flipper-Folly
- - Flipper-Glog
- - Flipper-PeerTalk
- - FlipperKit
- fmt
- libevent
- - OpenSSL-Universal
- SocketRocket
EXTERNAL SOURCES:
@@ -1332,24 +1242,14 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/ReactCommon/yoga"
SPEC CHECKSUMS:
- boost: 26fad476bfa736552bbfa698a06cc530475c1505
- CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
+ boost: d3f49c53809116a5d38da093a8aa78bf551aed09
DoubleConversion: fea03f2699887d960129cc54bba7e52542b6f953
FBLazyVector: 84f6edbe225f38aebd9deaf1540a4160b1f087d7
FBReactNativeSpec: d0086a479be91c44ce4687a962956a352d2dc697
- Flipper: c7a0093234c4bdd456e363f2f19b2e4b27652d44
- Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c
- Flipper-DoubleConversion: 2dc99b02f658daf147069aad9dbd29d8feb06d30
- Flipper-Fmt: 60cbdd92fc254826e61d669a5d87ef7015396a9b
- Flipper-Folly: 584845625005ff068a6ebf41f857f468decd26b3
- Flipper-Glog: 70c50ce58ddaf67dc35180db05f191692570f446
- Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9
- FlipperKit: 37525a5d056ef9b93d1578e04bc3ea1de940094f
fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9
glog: c5d68082e772fa1c511173d6b30a9de2c05a69a2
hermes-engine: b2669ce35fc4ac14f523b307aff8896799829fe2
libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
- OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c
RCT-Folly: 7169b2b1c44399c76a47b5deaaba715eeeb476c0
RCTRequired: ab7f915c15569f04a49669e573e6e319a53f9faa
RCTTypeSafety: 63b97ced7b766865057e7154db0e81ce4ee6cf1e
@@ -1394,10 +1294,10 @@ SPEC CHECKSUMS:
ReactCommon: 840a955d37b7f3358554d819446bffcf624b2522
RNGestureHandler: 61bfdfc05db9b79dd61f894dcd29d3dcc6db3c02
RNReanimated: e7abe58f02a10c8b619db32b6bf33507420a9f86
- RNScreens: d5ebd3115fba92d04c2727bda678635942b45301
+ RNScreens: def6f725a69b1912c472af25ec9e54a22d4e0d3a
SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17
- Yoga: 64cd2a583ead952b0315d5135bf39e053ae9be70
+ Yoga: 1b901a6d6eeba4e8a2e8f308f708691cdb5db312
-PODFILE CHECKSUM: 0ddaec8b74c24b39086422661a8aeb46f68d0382
+PODFILE CHECKSUM: e9288ec08e6f39cc345ed03cff69a6bb3749c97d
-COCOAPODS: 1.11.3
+COCOAPODS: 1.15.2
diff --git a/android/src/fabric/java/com/swmansion/rnscreens/FabricEnabledViewGroup.kt b/android/src/fabric/java/com/swmansion/rnscreens/FabricEnabledViewGroup.kt
index 2d946c4416..2912a138d7 100644
--- a/android/src/fabric/java/com/swmansion/rnscreens/FabricEnabledViewGroup.kt
+++ b/android/src/fabric/java/com/swmansion/rnscreens/FabricEnabledViewGroup.kt
@@ -19,12 +19,12 @@ abstract class FabricEnabledViewGroup constructor(context: ReactContext?) : View
return mFabricViewStateManager
}
- protected fun updateScreenSizeFabric(width: Int, height: Int) {
- updateState(width, height)
+ protected fun updateScreenSizeFabric(width: Int, height: Int, headerHeight: Double) {
+ updateState(width, height, headerHeight)
}
@UiThread
- fun updateState(width: Int, height: Int) {
+ fun updateState(width: Int, height: Int, headerHeight: Double) {
val realWidth: Float = PixelUtil.toDIPFromPixel(width.toFloat())
val realHeight: Float = PixelUtil.toDIPFromPixel(height.toFloat())
@@ -44,6 +44,8 @@ abstract class FabricEnabledViewGroup constructor(context: ReactContext?) : View
val map: WritableMap = WritableNativeMap()
map.putDouble("frameWidth", realWidth.toDouble())
map.putDouble("frameHeight", realHeight.toDouble())
+ map.putDouble("contentOffsetX", 0.0)
+ map.putDouble("contentOffsetY", headerHeight)
map
}
}
diff --git a/android/src/main/java/com/swmansion/rnscreens/ModalScreenViewManager.kt b/android/src/main/java/com/swmansion/rnscreens/ModalScreenViewManager.kt
new file mode 100644
index 0000000000..ea414d068f
--- /dev/null
+++ b/android/src/main/java/com/swmansion/rnscreens/ModalScreenViewManager.kt
@@ -0,0 +1,12 @@
+package com.swmansion.rnscreens
+
+import com.facebook.react.module.annotations.ReactModule
+
+@ReactModule(name = ModalScreenViewManager.REACT_CLASS)
+class ModalScreenViewManager : ScreenViewManager() {
+ override fun getName() = REACT_CLASS
+
+ companion object {
+ const val REACT_CLASS = "RNSModalScreen"
+ }
+}
diff --git a/android/src/main/java/com/swmansion/rnscreens/RNScreensPackage.kt b/android/src/main/java/com/swmansion/rnscreens/RNScreensPackage.kt
index 2780dd6bb2..eeed28509e 100644
--- a/android/src/main/java/com/swmansion/rnscreens/RNScreensPackage.kt
+++ b/android/src/main/java/com/swmansion/rnscreens/RNScreensPackage.kt
@@ -18,6 +18,7 @@ class RNScreensPackage : TurboReactPackage() {
listOf>(
ScreenContainerViewManager(),
ScreenViewManager(),
+ ModalScreenViewManager(),
ScreenStackViewManager(),
ScreenStackHeaderConfigViewManager(),
ScreenStackHeaderSubviewManager(),
diff --git a/android/src/main/java/com/swmansion/rnscreens/Screen.kt b/android/src/main/java/com/swmansion/rnscreens/Screen.kt
index be7cffa0d4..3495957a88 100644
--- a/android/src/main/java/com/swmansion/rnscreens/Screen.kt
+++ b/android/src/main/java/com/swmansion/rnscreens/Screen.kt
@@ -61,13 +61,13 @@ class Screen(context: ReactContext?) : FabricEnabledViewGroup(context) {
}
override fun onLayout(changed: Boolean, l: Int, t: Int, r: Int, b: Int) {
- if (changed) {
+ if (container is ScreenStack && changed) {
val width = r - l
val height = b - t
- calculateHeaderHeight()
+ val headerHeight = calculateHeaderHeight().first
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
- updateScreenSizeFabric(width, height)
+ updateScreenSizeFabric(width, height, headerHeight)
} else {
updateScreenSizePaper(width, height)
}
@@ -229,7 +229,7 @@ class Screen(context: ReactContext?) : FabricEnabledViewGroup(context) {
var nativeBackButtonDismissalEnabled: Boolean = true
- private fun calculateHeaderHeight() {
+ private fun calculateHeaderHeight(): Pair {
val actionBarTv = TypedValue()
val resolvedActionBarSize = context.theme.resolveAttribute(android.R.attr.actionBarSize, actionBarTv, true)
@@ -245,9 +245,7 @@ class Screen(context: ReactContext?) : FabricEnabledViewGroup(context) {
?.let { PixelUtil.toDIPFromPixel(it.toFloat()).toDouble() }
?: 0.0
- val totalHeight = actionBarHeight + statusBarHeight
- UIManagerHelper.getEventDispatcherForReactTag(context as ReactContext, id)
- ?.dispatchEvent(HeaderHeightChangeEvent(id, totalHeight))
+ return actionBarHeight to statusBarHeight
}
enum class StackPresentation {
diff --git a/android/src/main/java/com/swmansion/rnscreens/ScreenContainer.kt b/android/src/main/java/com/swmansion/rnscreens/ScreenContainer.kt
index 2f222dca09..4d3a3e85f5 100644
--- a/android/src/main/java/com/swmansion/rnscreens/ScreenContainer.kt
+++ b/android/src/main/java/com/swmansion/rnscreens/ScreenContainer.kt
@@ -320,7 +320,6 @@ open class ScreenContainer(context: Context?) : ViewGroup(context) {
// will already be false.
performUpdates()
}
-
}
protected fun performUpdatesNow() {
diff --git a/android/src/main/java/com/swmansion/rnscreens/ScreenViewManager.kt b/android/src/main/java/com/swmansion/rnscreens/ScreenViewManager.kt
index 1f76750358..c45adc02d4 100644
--- a/android/src/main/java/com/swmansion/rnscreens/ScreenViewManager.kt
+++ b/android/src/main/java/com/swmansion/rnscreens/ScreenViewManager.kt
@@ -22,7 +22,7 @@ import com.swmansion.rnscreens.events.ScreenWillAppearEvent
import com.swmansion.rnscreens.events.ScreenWillDisappearEvent
@ReactModule(name = ScreenViewManager.REACT_CLASS)
-class ScreenViewManager : ViewGroupManager(), RNSScreenManagerInterface {
+open class ScreenViewManager : ViewGroupManager(), RNSScreenManagerInterface {
private val delegate: ViewManagerDelegate
init {
diff --git a/android/src/main/jni/rnscreens.h b/android/src/main/jni/rnscreens.h
index 2d755a0092..a8dbde1289 100644
--- a/android/src/main/jni/rnscreens.h
+++ b/android/src/main/jni/rnscreens.h
@@ -17,6 +17,7 @@
* See: https://github.com/software-mansion/react-native-screens/pull/1585
*/
#include
+#include
namespace facebook {
namespace react {
diff --git a/android/src/paper/java/com/swmansion/rnscreens/FabricEnabledViewGroup.kt b/android/src/paper/java/com/swmansion/rnscreens/FabricEnabledViewGroup.kt
index 6c1c238bd6..917c18d159 100644
--- a/android/src/paper/java/com/swmansion/rnscreens/FabricEnabledViewGroup.kt
+++ b/android/src/paper/java/com/swmansion/rnscreens/FabricEnabledViewGroup.kt
@@ -8,7 +8,7 @@ abstract class FabricEnabledViewGroup constructor(context: ReactContext?) : View
val fabricViewStateManager get() = null as FabricViewStateManager?
- protected fun updateScreenSizeFabric(width: Int, height: Int) {
+ protected fun updateScreenSizeFabric(width: Int, height: Int, headerHeight: Double) {
// do nothing
}
}
diff --git a/common/cpp/react/renderer/components/rnscreens/RNSModalScreenComponentDescriptor.h b/common/cpp/react/renderer/components/rnscreens/RNSModalScreenComponentDescriptor.h
new file mode 100644
index 0000000000..1c6fa19f2a
--- /dev/null
+++ b/common/cpp/react/renderer/components/rnscreens/RNSModalScreenComponentDescriptor.h
@@ -0,0 +1,41 @@
+#pragma once
+
+#include
+#include "RNSModalScreenShadowNode.h"
+#include
+
+namespace facebook {
+namespace react {
+
+class RNSModalScreenComponentDescriptor final
+ : public ConcreteComponentDescriptor {
+ public:
+ using ConcreteComponentDescriptor::ConcreteComponentDescriptor;
+
+ void adopt(ShadowNode& shadowNode) const override {
+ react_native_assert(
+ dynamic_cast(&shadowNode));
+ auto& screenShadowNode =
+ static_cast(shadowNode);
+
+ react_native_assert(
+ dynamic_cast(&screenShadowNode));
+ auto& layoutableShadowNode =
+ dynamic_cast(screenShadowNode);
+
+ auto state =
+ std::static_pointer_cast(
+ shadowNode.getState());
+ auto stateData = state->getData();
+
+ if (stateData.frameSize.width != 0 && stateData.frameSize.height != 0) {
+ layoutableShadowNode.setSize(
+ Size{stateData.frameSize.width, stateData.frameSize.height});
+ }
+
+ ConcreteComponentDescriptor::adopt(shadowNode);
+ }
+};
+
+} // namespace react
+} // namespace facebook
diff --git a/common/cpp/react/renderer/components/rnscreens/RNSModalScreenShadowNode.cpp b/common/cpp/react/renderer/components/rnscreens/RNSModalScreenShadowNode.cpp
new file mode 100644
index 0000000000..1de059671e
--- /dev/null
+++ b/common/cpp/react/renderer/components/rnscreens/RNSModalScreenShadowNode.cpp
@@ -0,0 +1,15 @@
+#include "RNSModalScreenShadowNode.h"
+
+namespace facebook {
+namespace react {
+
+extern const char RNSModalScreenComponentName[] = "RNSModalScreen";
+
+Point RNSModalScreenShadowNode::getContentOriginOffset() const {
+ auto stateData = getStateData();
+ auto contentOffset = stateData.contentOffset;
+ return {contentOffset.x, contentOffset.y};
+}
+
+} // namespace react
+} // namespace facebook
diff --git a/common/cpp/react/renderer/components/rnscreens/RNSModalScreenShadowNode.h b/common/cpp/react/renderer/components/rnscreens/RNSModalScreenShadowNode.h
new file mode 100644
index 0000000000..67709d9289
--- /dev/null
+++ b/common/cpp/react/renderer/components/rnscreens/RNSModalScreenShadowNode.h
@@ -0,0 +1,31 @@
+#pragma once
+
+#include "RNSScreenState.h"
+#include
+#include
+#include
+#include
+
+namespace facebook {
+namespace react {
+
+JSI_EXPORT extern const char RNSModalScreenComponentName[];
+
+class JSI_EXPORT RNSModalScreenShadowNode final : public ConcreteViewShadowNode<
+ RNSModalScreenComponentName,
+ RNSScreenProps,
+ RNSScreenEventEmitter,
+ RNSScreenState> {
+ public:
+ using ConcreteViewShadowNode::ConcreteViewShadowNode;
+
+ Point getContentOriginOffset() const override;
+ static ShadowNodeTraits BaseTraits() {
+ auto traits = ConcreteViewShadowNode::BaseTraits();
+ traits.set(ShadowNodeTraits::Trait::RootNodeKind);
+ return traits;
+ }
+};
+
+} // namespace react
+} // namespace facebook
diff --git a/common/cpp/react/renderer/components/rnscreens/RNSScreenShadowNode.cpp b/common/cpp/react/renderer/components/rnscreens/RNSScreenShadowNode.cpp
index ba61ed8025..0e3746ebc0 100644
--- a/common/cpp/react/renderer/components/rnscreens/RNSScreenShadowNode.cpp
+++ b/common/cpp/react/renderer/components/rnscreens/RNSScreenShadowNode.cpp
@@ -5,5 +5,11 @@ namespace react {
extern const char RNSScreenComponentName[] = "RNSScreen";
+Point RNSScreenShadowNode::getContentOriginOffset() const {
+ auto stateData = getStateData();
+ auto contentOffset = stateData.contentOffset;
+ return {contentOffset.x, contentOffset.y};
+}
+
} // namespace react
} // namespace facebook
diff --git a/common/cpp/react/renderer/components/rnscreens/RNSScreenShadowNode.h b/common/cpp/react/renderer/components/rnscreens/RNSScreenShadowNode.h
index ef25dd16de..25b644227b 100644
--- a/common/cpp/react/renderer/components/rnscreens/RNSScreenShadowNode.h
+++ b/common/cpp/react/renderer/components/rnscreens/RNSScreenShadowNode.h
@@ -19,11 +19,7 @@ class JSI_EXPORT RNSScreenShadowNode final : public ConcreteViewShadowNode<
public:
using ConcreteViewShadowNode::ConcreteViewShadowNode;
- static ShadowNodeTraits BaseTraits() {
- auto traits = ConcreteViewShadowNode::BaseTraits();
- traits.set(ShadowNodeTraits::Trait::RootNodeKind);
- return traits;
- }
+ Point getContentOriginOffset() const override;
};
} // namespace react
diff --git a/common/cpp/react/renderer/components/rnscreens/RNSScreenState.cpp b/common/cpp/react/renderer/components/rnscreens/RNSScreenState.cpp
index 69c77a6b2a..3dd6013525 100644
--- a/common/cpp/react/renderer/components/rnscreens/RNSScreenState.cpp
+++ b/common/cpp/react/renderer/components/rnscreens/RNSScreenState.cpp
@@ -6,7 +6,7 @@ namespace react {
#ifdef ANDROID
folly::dynamic RNSScreenState::getDynamic() const {
return folly::dynamic::object("frameWidth", frameSize.width)(
- "frameHeight", frameSize.height);
+ "frameHeight", frameSize.height)("contentOffsetX", contentOffset.x)("contentOffsetY", contentOffset.y);
}
#endif
diff --git a/common/cpp/react/renderer/components/rnscreens/RNSScreenState.h b/common/cpp/react/renderer/components/rnscreens/RNSScreenState.h
index ce0980719c..495cabdbb3 100644
--- a/common/cpp/react/renderer/components/rnscreens/RNSScreenState.h
+++ b/common/cpp/react/renderer/components/rnscreens/RNSScreenState.h
@@ -17,7 +17,7 @@ class JSI_EXPORT RNSScreenState final {
using Shared = std::shared_ptr;
RNSScreenState(){};
- RNSScreenState(Size frameSize_) : frameSize(frameSize_){};
+ RNSScreenState(Size frameSize_, Point contentOffset_) : frameSize(frameSize_), contentOffset(contentOffset_){};
#ifdef ANDROID
RNSScreenState(
@@ -25,10 +25,15 @@ class JSI_EXPORT RNSScreenState final {
folly::dynamic data)
: frameSize(Size{
(Float)data["frameWidth"].getDouble(),
- (Float)data["frameHeight"].getDouble()}){};
+ (Float)data["frameHeight"].getDouble()}),
+ contentOffset(Point{
+ (Float)data["contentOffsetX"].getDouble(),
+ (Float)data["contentOffsetY"].getDouble()})
+ {};
#endif
- const Size frameSize{};
+ const Size frameSize{};
+ Point contentOffset;
#ifdef ANDROID
folly::dynamic getDynamic() const;
diff --git a/ios/RNSModalScreen.h b/ios/RNSModalScreen.h
new file mode 100644
index 0000000000..d0a4603fb6
--- /dev/null
+++ b/ios/RNSModalScreen.h
@@ -0,0 +1,8 @@
+#import "RNSScreen.h"
+
+@interface RNSModalScreen : RNSScreenView
+@end
+
+@interface RNSModalScreenManager : RNSScreenManager
+
+@end
diff --git a/ios/RNSModalScreen.mm b/ios/RNSModalScreen.mm
new file mode 100644
index 0000000000..f88437f8ab
--- /dev/null
+++ b/ios/RNSModalScreen.mm
@@ -0,0 +1,36 @@
+#import "RNSModalScreen.h"
+
+#ifdef RCT_NEW_ARCH_ENABLED
+#import
+#import
+#endif
+
+@implementation RNSModalScreen
+
+#ifdef RCT_NEW_ARCH_ENABLED
++ (react::ComponentDescriptorProvider)componentDescriptorProvider
+{
+ return react::concreteComponentDescriptorProvider();
+}
+#endif
+@end
+
+#ifdef RCT_NEW_ARCH_ENABLED
+Class RNSModalScreenCls(void)
+{
+ return RNSModalScreen.class;
+}
+#endif
+
+@implementation RNSModalScreenManager
+
+RCT_EXPORT_MODULE()
+
+#ifdef RCT_NEW_ARCH_ENABLED
+#else
+- (UIView *)view
+{
+ return [[RNSModalScreen alloc] initWithBridge:self.bridge];
+}
+#endif // RCT_NEW_ARCH_ENABLED
+@end
diff --git a/ios/RNSScreen.h b/ios/RNSScreen.h
index f1bd9d8175..073cdfa53e 100644
--- a/ios/RNSScreen.h
+++ b/ios/RNSScreen.h
@@ -42,6 +42,7 @@ namespace react = facebook::react;
#ifdef RCT_NEW_ARCH_ENABLED
- (void)setViewToSnapshot:(UIView *)snapshot;
- (void)resetViewToScreen;
+- (CGFloat)calculateHeaderHeightIsModal:(BOOL)isModal;
#endif
@end
@@ -121,7 +122,9 @@ namespace react = facebook::react;
- (void)updateBounds;
- (void)notifyDismissedWithCount:(int)dismissCount;
- (instancetype)initWithFrame:(CGRect)frame;
-#endif
+#else
+- (instancetype)initWithBridge:(RCTBridge *)bridge;
+#endif // RCT_NEW_ARCH_ENABLED
- (void)notifyTransitionProgress:(double)progress closing:(BOOL)closing goingForward:(BOOL)goingForward;
- (void)notifyDismissCancelledWithDismissCount:(int)dismissCount;
diff --git a/ios/RNSScreen.mm b/ios/RNSScreen.mm
index 3b7951b99c..3f3b469766 100644
--- a/ios/RNSScreen.mm
+++ b/ios/RNSScreen.mm
@@ -38,13 +38,13 @@ @interface RNSScreenView ()
@end
@implementation RNSScreenView {
- __weak RCTBridge *_bridge;
#ifdef RCT_NEW_ARCH_ENABLED
RCTSurfaceTouchHandler *_touchHandler;
react::RNSScreenShadowNode::ConcreteState::Shared _state;
// on fabric, they are not available by default so we need them exposed here too
NSMutableArray *_reactSubviews;
#else
+ __weak RCTBridge *_bridge;
RCTTouchHandler *_touchHandler;
CGRect _reactFrame;
#endif
@@ -61,8 +61,7 @@ - (instancetype)initWithFrame:(CGRect)frame
}
return self;
}
-#endif // RCT_NEW_ARCH_ENABLED
-
+#else
- (instancetype)initWithBridge:(RCTBridge *)bridge
{
if (self = [super init]) {
@@ -72,6 +71,7 @@ - (instancetype)initWithBridge:(RCTBridge *)bridge
return self;
}
+#endif // RCT_NEW_ARCH_ENABLED
- (void)initCommonProps
{
@@ -107,7 +107,12 @@ - (void)updateBounds
{
#ifdef RCT_NEW_ARCH_ENABLED
if (_state != nullptr) {
- auto newState = react::RNSScreenState{RCTSizeFromCGSize(self.bounds.size)};
+ RNSScreenStackHeaderConfig *config = [self findHeaderConfig];
+ // in large title, ScrollView handles the offset of content so we cannot set it here also.
+ CGFloat headerHeight =
+ config.largeTitle ? 0 : [_controller calculateHeaderHeightIsModal:self.isPresentedAsNativeModal];
+ auto newState =
+ react::RNSScreenState{RCTSizeFromCGSize(self.bounds.size), RCTPointFromCGPoint(CGPointMake(0, headerHeight))};
_state->updateState(std::move(newState));
UINavigationController *navctr = _controller.navigationController;
[navctr.view setNeedsLayout];
@@ -1522,10 +1527,13 @@ - (void)dealloc
}
#endif // !TARGET_OS_TV
+#ifdef RCT_NEW_ARCH_ENABLED
+#else
- (UIView *)view
{
return [[RNSScreenView alloc] initWithBridge:self.bridge];
}
+#endif
+ (BOOL)requiresMainQueueSetup
{
diff --git a/react-native.config.js b/react-native.config.js
index f519564c97..9b382b3442 100644
--- a/react-native.config.js
+++ b/react-native.config.js
@@ -20,7 +20,8 @@ module.exports = {
"RNSScreenStackHeaderSubviewComponentDescriptor",
"RNSScreenStackComponentDescriptor",
"RNSSearchBarComponentDescriptor",
- 'RNSScreenComponentDescriptor'
+ 'RNSScreenComponentDescriptor',
+ 'RNSModalScreenComponentDescriptor'
],
cmakeListsPath: "../android/src/main/jni/CMakeLists.txt"
} : {},
diff --git a/src/components/Screen.tsx b/src/components/Screen.tsx
index 9e73dc3c7b..22463d95a9 100644
--- a/src/components/Screen.tsx
+++ b/src/components/Screen.tsx
@@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/no-var-requires */
import React from 'react';
-import { Animated, View } from 'react-native';
+import { Animated, View, Platform } from 'react-native';
import TransitionProgressContext from '../TransitionProgressContext';
import DelayedFreeze from './helpers/DelayedFreeze';
@@ -14,6 +14,7 @@ import {
// Native components
import ScreenNativeComponent from '../fabric/ScreenNativeComponent';
+import ModalScreenNativeComponent from '../fabric/ModalScreenNativeComponent';
// @ts-ignore - its taken straight from RN
// eslint-disable-next-line import/namespace
@@ -31,7 +32,10 @@ customDirectEventTypes.topDetached = {
export const NativeScreen: React.ComponentType =
ScreenNativeComponent as any;
-let AnimatedNativeScreen: React.ComponentType;
+const AnimatedNativeScreen = Animated.createAnimatedComponent(NativeScreen);
+const AnimatedNativeModalScreen = Animated.createAnimatedComponent(
+ ModalScreenNativeComponent as React.ComponentType
+);
// Incomplete type, all accessible properties available at:
// react-native/Libraries/Components/View/ReactNativeViewViewConfig.js
@@ -75,11 +79,18 @@ export class InnerScreen extends React.Component {
sheetGrabberVisible = false,
sheetCornerRadius = -1.0,
sheetExpandsWhenScrolledToEdge = true,
+ stackPresentation,
} = rest;
if (enabled && isNativePlatformSupported) {
- AnimatedNativeScreen =
- AnimatedNativeScreen || Animated.createAnimatedComponent(NativeScreen);
+ // Due to how Yoga resolves layout, we need to have different components for modal nad non-modal screens
+ const AnimatedScreen =
+ Platform.OS === 'android' ||
+ stackPresentation === 'push' ||
+ stackPresentation === 'containedModal' ||
+ stackPresentation === 'containedTransparentModal'
+ ? AnimatedNativeScreen
+ : AnimatedNativeModalScreen;
let {
// Filter out active prop in this case because it is unused and
@@ -113,7 +124,7 @@ export class InnerScreen extends React.Component {
return (
- {
{children}
)}
-
+
);
} else {
diff --git a/src/fabric/ModalScreenNativeComponent.ts b/src/fabric/ModalScreenNativeComponent.ts
new file mode 100644
index 0000000000..28a7bdccda
--- /dev/null
+++ b/src/fabric/ModalScreenNativeComponent.ts
@@ -0,0 +1,104 @@
+import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
+import type { ViewProps, ColorValue } from 'react-native';
+import type {
+ BubblingEventHandler,
+ WithDefault,
+ Int32,
+ Float,
+ Double,
+} from 'react-native/Libraries/Types/CodegenTypes';
+
+// eslint-disable-next-line @typescript-eslint/ban-types
+type ScreenEvent = Readonly<{}>;
+
+type ScreenDismissedEvent = Readonly<{
+ dismissCount: Int32;
+}>;
+
+type TransitionProgressEvent = Readonly<{
+ progress: Double;
+ closing: Int32;
+ goingForward: Int32;
+}>;
+
+type HeaderHeightChangeEvent = Readonly<{
+ headerHeight: Double;
+}>;
+
+type GestureResponseDistanceType = Readonly<{
+ start: Float;
+ end: Float;
+ top: Float;
+ bottom: Float;
+}>;
+
+type StackPresentation =
+ | 'push'
+ | 'modal'
+ | 'transparentModal'
+ | 'fullScreenModal'
+ | 'formSheet'
+ | 'containedModal'
+ | 'containedTransparentModal';
+
+type StackAnimation =
+ | 'default'
+ | 'flip'
+ | 'simple_push'
+ | 'none'
+ | 'fade'
+ | 'slide_from_right'
+ | 'slide_from_left'
+ | 'slide_from_bottom'
+ | 'fade_from_bottom'
+ | 'ios';
+
+type SwipeDirection = 'vertical' | 'horizontal';
+
+type ReplaceAnimation = 'pop' | 'push';
+
+type SheetDetentTypes = 'large' | 'medium' | 'all';
+
+export interface NativeProps extends ViewProps {
+ onAppear?: BubblingEventHandler;
+ onDisappear?: BubblingEventHandler;
+ onDismissed?: BubblingEventHandler;
+ onNativeDismissCancelled?: BubblingEventHandler;
+ onWillAppear?: BubblingEventHandler;
+ onWillDisappear?: BubblingEventHandler;
+ onHeaderHeightChange?: BubblingEventHandler;
+ onTransitionProgress?: BubblingEventHandler;
+ onGestureCancel?: BubblingEventHandler;
+ onHeaderBackButtonClicked?: BubblingEventHandler;
+ sheetAllowedDetents?: WithDefault;
+ sheetLargestUndimmedDetent?: WithDefault;
+ sheetGrabberVisible?: WithDefault;
+ sheetCornerRadius?: WithDefault;
+ sheetExpandsWhenScrolledToEdge?: WithDefault;
+ customAnimationOnSwipe?: boolean;
+ fullScreenSwipeEnabled?: boolean;
+ homeIndicatorHidden?: boolean;
+ preventNativeDismiss?: boolean;
+ gestureEnabled?: WithDefault;
+ statusBarColor?: ColorValue;
+ statusBarHidden?: boolean;
+ screenOrientation?: string;
+ statusBarAnimation?: string;
+ statusBarStyle?: string;
+ statusBarTranslucent?: boolean;
+ gestureResponseDistance?: GestureResponseDistanceType;
+ stackPresentation?: WithDefault;
+ stackAnimation?: WithDefault;
+ transitionDuration?: WithDefault;
+ replaceAnimation?: WithDefault;
+ swipeDirection?: WithDefault;
+ hideKeyboardOnSwipe?: boolean;
+ activityState?: WithDefault;
+ navigationBarColor?: ColorValue;
+ navigationBarHidden?: boolean;
+ nativeBackButtonDismissalEnabled?: boolean;
+}
+
+export default codegenNativeComponent('RNSModalScreen', {
+ interfaceOnly: true,
+});