From 31fb094e35ac5d058fb5d2136f8e4e192a8ba8cc Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Thu, 25 Apr 2024 11:53:41 +0800 Subject: [PATCH 1/6] update rn-web to 0.19.11 --- package-lock.json | 14 ++++++++++---- package.json | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index b72a8706e0c4..d6d7436e835e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -121,7 +121,7 @@ "react-native-url-polyfill": "^2.0.0", "react-native-view-shot": "3.8.0", "react-native-vision-camera": "^4.0.0-beta.13", - "react-native-web": "^0.19.9", + "react-native-web": "^0.19.11", "react-native-web-linear-gradient": "^1.1.2", "react-native-web-sound": "^0.1.3", "react-native-webview": "13.6.4", @@ -31628,11 +31628,12 @@ } }, "node_modules/react-native-web": { - "version": "0.19.9", - "license": "MIT", + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/react-native-web/-/react-native-web-0.19.11.tgz", + "integrity": "sha512-51Qcjr0AtIgskwLqLsBByUMPs2nAWZ+6QF7x/siC72svNPcJ1/daXoPTNuHR2fX4oOrDATC4Vmc/SXOYPH19rw==", "dependencies": { "@babel/runtime": "^7.18.6", - "@react-native/normalize-color": "^2.1.0", + "@react-native/normalize-colors": "^0.74.1", "fbjs": "^3.0.4", "inline-style-prefixer": "^6.0.1", "memoize-one": "^6.0.0", @@ -31662,6 +31663,11 @@ "react-native-web": "*" } }, + "node_modules/react-native-web/node_modules/@react-native/normalize-colors": { + "version": "0.74.81", + "resolved": "https://registry.npmjs.org/@react-native/normalize-colors/-/normalize-colors-0.74.81.tgz", + "integrity": "sha512-g3YvkLO7UsSWiDfYAU+gLhRHtEpUyz732lZB+N8IlLXc5MnfXHC8GKneDGY3Mh52I3gBrs20o37D5viQX9E1CA==" + }, "node_modules/react-native-web/node_modules/memoize-one": { "version": "6.0.0", "license": "MIT" diff --git a/package.json b/package.json index 4143266df358..e90281481f5f 100644 --- a/package.json +++ b/package.json @@ -173,7 +173,7 @@ "react-native-url-polyfill": "^2.0.0", "react-native-view-shot": "3.8.0", "react-native-vision-camera": "^4.0.0-beta.13", - "react-native-web": "^0.19.9", + "react-native-web": "^0.19.11", "react-native-web-linear-gradient": "^1.1.2", "react-native-web-sound": "^0.1.3", "react-native-webview": "13.6.4", From 75d3316d2860e36a7626d293a7af904b3150f9e3 Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Thu, 25 Apr 2024 11:53:52 +0800 Subject: [PATCH 2/6] delete unused patch --- ...eact-native-web+0.19.9+002+measureInWindow.patch | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 patches/react-native-web+0.19.9+002+measureInWindow.patch diff --git a/patches/react-native-web+0.19.9+002+measureInWindow.patch b/patches/react-native-web+0.19.9+002+measureInWindow.patch deleted file mode 100644 index f41b4b3b48cb..000000000000 --- a/patches/react-native-web+0.19.9+002+measureInWindow.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/node_modules/react-native-web/dist/exports/UIManager/index.js b/node_modules/react-native-web/dist/exports/UIManager/index.js -index 15b71d5..46b9e01 100644 ---- a/node_modules/react-native-web/dist/exports/UIManager/index.js -+++ b/node_modules/react-native-web/dist/exports/UIManager/index.js -@@ -77,7 +77,7 @@ var UIManager = { - measureInWindow(node, callback) { - if (node) { - setTimeout(() => { -- var _getRect2 = getRect(node), -+ var _getRect2 = node.getBoundingClientRect(), - height = _getRect2.height, - left = _getRect2.left, - top = _getRect2.top, From 3b90c986b1bed7546f55e47e84665f49d57006a0 Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Thu, 25 Apr 2024 11:53:59 +0800 Subject: [PATCH 3/6] rename patches --- ...1+initial.patch => react-native-web+0.19.11+001+initial.patch} | 0 ...cer.patch => react-native-web+0.19.11+002+fixLastSpacer.patch} | 0 ...ch => react-native-web+0.19.11+003+image-header-support.patch} | 0 ...tch => react-native-web+0.19.11+004+fixPointerEventDown.patch} | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename patches/{react-native-web+0.19.9+001+initial.patch => react-native-web+0.19.11+001+initial.patch} (100%) rename patches/{react-native-web+0.19.9+004+fixLastSpacer.patch => react-native-web+0.19.11+002+fixLastSpacer.patch} (100%) rename patches/{react-native-web+0.19.9+005+image-header-support.patch => react-native-web+0.19.11+003+image-header-support.patch} (100%) rename patches/{react-native-web+0.19.9+006+fixPointerEventDown.patch => react-native-web+0.19.11+004+fixPointerEventDown.patch} (100%) diff --git a/patches/react-native-web+0.19.9+001+initial.patch b/patches/react-native-web+0.19.11+001+initial.patch similarity index 100% rename from patches/react-native-web+0.19.9+001+initial.patch rename to patches/react-native-web+0.19.11+001+initial.patch diff --git a/patches/react-native-web+0.19.9+004+fixLastSpacer.patch b/patches/react-native-web+0.19.11+002+fixLastSpacer.patch similarity index 100% rename from patches/react-native-web+0.19.9+004+fixLastSpacer.patch rename to patches/react-native-web+0.19.11+002+fixLastSpacer.patch diff --git a/patches/react-native-web+0.19.9+005+image-header-support.patch b/patches/react-native-web+0.19.11+003+image-header-support.patch similarity index 100% rename from patches/react-native-web+0.19.9+005+image-header-support.patch rename to patches/react-native-web+0.19.11+003+image-header-support.patch diff --git a/patches/react-native-web+0.19.9+006+fixPointerEventDown.patch b/patches/react-native-web+0.19.11+004+fixPointerEventDown.patch similarity index 100% rename from patches/react-native-web+0.19.9+006+fixPointerEventDown.patch rename to patches/react-native-web+0.19.11+004+fixPointerEventDown.patch From f86d3f7f55d285434dfb8c6977ed87e75b3276de Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Thu, 25 Apr 2024 11:54:04 +0800 Subject: [PATCH 4/6] remove workaround --- src/components/Button/index.tsx | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/components/Button/index.tsx b/src/components/Button/index.tsx index 68f1aac41a5b..3b05d22fe6c4 100644 --- a/src/components/Button/index.tsx +++ b/src/components/Button/index.tsx @@ -289,10 +289,6 @@ function Button( currentTarget?.blur(); } - if (event?.type === 'keyup') { - return; - } - if (shouldEnableHapticFeedback) { HapticFeedback.press(); } From 7e428127c331cc9d8fffc758da0e1b26f298e246 Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Wed, 22 May 2024 21:37:42 +0800 Subject: [PATCH 5/6] update rn-web to 0.19.12 --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9414ed988933..a04de0651f69 100644 --- a/package-lock.json +++ b/package-lock.json @@ -121,7 +121,7 @@ "react-native-url-polyfill": "^2.0.0", "react-native-view-shot": "3.8.0", "react-native-vision-camera": "^4.0.0-beta.13", - "react-native-web": "^0.19.11", + "react-native-web": "^0.19.12", "react-native-web-linear-gradient": "^1.1.2", "react-native-web-sound": "^0.1.3", "react-native-webview": "13.6.4", @@ -31742,9 +31742,9 @@ } }, "node_modules/react-native-web": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/react-native-web/-/react-native-web-0.19.11.tgz", - "integrity": "sha512-51Qcjr0AtIgskwLqLsBByUMPs2nAWZ+6QF7x/siC72svNPcJ1/daXoPTNuHR2fX4oOrDATC4Vmc/SXOYPH19rw==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/react-native-web/-/react-native-web-0.19.12.tgz", + "integrity": "sha512-o2T0oztoVDQjztt4YksO9S1XRjoH/AqcSvifgWLrPJgGVbMWsfhILgl6lfUdEamVZzZSVV/2gqDVMAk/qq7mZw==", "dependencies": { "@babel/runtime": "^7.18.6", "@react-native/normalize-colors": "^0.74.1", diff --git a/package.json b/package.json index 11478d0617e3..0ea400058fd3 100644 --- a/package.json +++ b/package.json @@ -173,7 +173,7 @@ "react-native-url-polyfill": "^2.0.0", "react-native-view-shot": "3.8.0", "react-native-vision-camera": "^4.0.0-beta.13", - "react-native-web": "^0.19.11", + "react-native-web": "^0.19.12", "react-native-web-linear-gradient": "^1.1.2", "react-native-web-sound": "^0.1.3", "react-native-webview": "13.6.4", From fc549e827988055322733a55b2faaaac01d61037 Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Wed, 22 May 2024 21:38:38 +0800 Subject: [PATCH 6/6] update patch --- ...> react-native-web+0.19.12+001+initial.patch} | 16 ++++++++-------- ...t-native-web+0.19.12+002+fixLastSpacer.patch} | 0 ...e-web+0.19.12+003+image-header-support.patch} | 12 ++++++------ ...ve-web+0.19.12+004+fixPointerEventDown.patch} | 0 ...native-web+0.19.12+005+osr-improvement.patch} | 0 5 files changed, 14 insertions(+), 14 deletions(-) rename patches/{react-native-web+0.19.11+001+initial.patch => react-native-web+0.19.12+001+initial.patch} (98%) rename patches/{react-native-web+0.19.11+002+fixLastSpacer.patch => react-native-web+0.19.12+002+fixLastSpacer.patch} (100%) rename patches/{react-native-web+0.19.11+003+image-header-support.patch => react-native-web+0.19.12+003+image-header-support.patch} (95%) rename patches/{react-native-web+0.19.11+004+fixPointerEventDown.patch => react-native-web+0.19.12+004+fixPointerEventDown.patch} (100%) rename patches/{react-native-web+0.19.9+007+osr-improvement.patch => react-native-web+0.19.12+005+osr-improvement.patch} (100%) diff --git a/patches/react-native-web+0.19.11+001+initial.patch b/patches/react-native-web+0.19.12+001+initial.patch similarity index 98% rename from patches/react-native-web+0.19.11+001+initial.patch rename to patches/react-native-web+0.19.12+001+initial.patch index 91ba6bfd59c0..c77cfc7829ed 100644 --- a/patches/react-native-web+0.19.11+001+initial.patch +++ b/patches/react-native-web+0.19.12+001+initial.patch @@ -1,9 +1,9 @@ diff --git a/node_modules/react-native-web/dist/vendor/react-native/VirtualizedList/index.js b/node_modules/react-native-web/dist/vendor/react-native/VirtualizedList/index.js -index c879838..0c9dfcb 100644 +index e137def..c3e5054 100644 --- a/node_modules/react-native-web/dist/vendor/react-native/VirtualizedList/index.js +++ b/node_modules/react-native-web/dist/vendor/react-native/VirtualizedList/index.js @@ -285,7 +285,7 @@ class VirtualizedList extends StateSafePureComponent { - // $FlowFixMe[missing-local-annot] + // REACT-NATIVE-WEB patch to preserve during future RN merges: Support inverted wheel scroller. constructor(_props) { - var _this$props$updateCel; @@ -243,7 +243,7 @@ index c879838..0c9dfcb 100644 }); this._hasMore = this.state.cellsAroundViewport.last < itemCount - 1; var innerRet = /*#__PURE__*/React.createElement(VirtualizedListContextProvider, { -@@ -1307,8 +1360,12 @@ class VirtualizedList extends StateSafePureComponent { +@@ -1317,8 +1370,12 @@ class VirtualizedList extends StateSafePureComponent { onStartReached = _this$props8.onStartReached, onStartReachedThreshold = _this$props8.onStartReachedThreshold, onEndReached = _this$props8.onEndReached, @@ -258,7 +258,7 @@ index c879838..0c9dfcb 100644 var _this$_scrollMetrics2 = this._scrollMetrics, contentLength = _this$_scrollMetrics2.contentLength, visibleLength = _this$_scrollMetrics2.visibleLength, -@@ -1348,16 +1405,10 @@ class VirtualizedList extends StateSafePureComponent { +@@ -1358,16 +1415,10 @@ class VirtualizedList extends StateSafePureComponent { // and call onStartReached only once for a given content length, // and only if onEndReached is not being executed else if (onStartReached != null && this.state.cellsAroundViewport.first === 0 && isWithinStartThreshold && this._scrollMetrics.contentLength !== this._sentStartForContentLength) { @@ -279,9 +279,9 @@ index c879838..0c9dfcb 100644 } // If the user scrolls away from the start or end and back again, -@@ -1412,6 +1463,11 @@ class VirtualizedList extends StateSafePureComponent { - } - } +@@ -1433,6 +1484,11 @@ class VirtualizedList extends StateSafePureComponent { + */ + _updateViewableItems(props, cellsAroundViewport) { + // If we have any pending scroll updates it means that the scroll metrics + // are out of date and we should not call any of the visibility callbacks. @@ -292,7 +292,7 @@ index c879838..0c9dfcb 100644 tuple.viewabilityHelper.onUpdate(props, this._scrollMetrics.offset, this._scrollMetrics.visibleLength, this._getFrameMetrics, this._createViewToken, tuple.onViewableItemsChanged, cellsAroundViewport); }); diff --git a/node_modules/react-native-web/src/vendor/react-native/VirtualizedList/index.js b/node_modules/react-native-web/src/vendor/react-native/VirtualizedList/index.js -index c7d68bb..43f9653 100644 +index c7d68bb..459f017 100644 --- a/node_modules/react-native-web/src/vendor/react-native/VirtualizedList/index.js +++ b/node_modules/react-native-web/src/vendor/react-native/VirtualizedList/index.js @@ -75,6 +75,10 @@ type ViewabilityHelperCallbackTuple = { diff --git a/patches/react-native-web+0.19.11+002+fixLastSpacer.patch b/patches/react-native-web+0.19.12+002+fixLastSpacer.patch similarity index 100% rename from patches/react-native-web+0.19.11+002+fixLastSpacer.patch rename to patches/react-native-web+0.19.12+002+fixLastSpacer.patch diff --git a/patches/react-native-web+0.19.11+003+image-header-support.patch b/patches/react-native-web+0.19.12+003+image-header-support.patch similarity index 95% rename from patches/react-native-web+0.19.11+003+image-header-support.patch rename to patches/react-native-web+0.19.12+003+image-header-support.patch index 4652e22662f0..6652f0345cc4 100644 --- a/patches/react-native-web+0.19.11+003+image-header-support.patch +++ b/patches/react-native-web+0.19.12+003+image-header-support.patch @@ -1,5 +1,5 @@ diff --git a/node_modules/react-native-web/dist/exports/Image/index.js b/node_modules/react-native-web/dist/exports/Image/index.js -index 95355d5..19109fc 100644 +index 9649d27..3281cc8 100644 --- a/node_modules/react-native-web/dist/exports/Image/index.js +++ b/node_modules/react-native-web/dist/exports/Image/index.js @@ -135,7 +135,22 @@ function resolveAssetUri(source) { @@ -23,10 +23,10 @@ index 95355d5..19109fc 100644 + return a.uri !== b.uri || JSON.stringify(a.headers) !== JSON.stringify(b.headers); +} +var BaseImage = /*#__PURE__*/React.forwardRef((props, ref) => { - var ariaLabel = props['aria-label'], + var _ariaLabel = props['aria-label'], + accessibilityLabel = props.accessibilityLabel, blurRadius = props.blurRadius, - defaultSource = props.defaultSource, -@@ -236,16 +251,10 @@ var Image = /*#__PURE__*/React.forwardRef((props, ref) => { +@@ -238,16 +253,10 @@ var Image = /*#__PURE__*/React.forwardRef((props, ref) => { } }, function error() { updateState(ERRORED); @@ -47,7 +47,7 @@ index 95355d5..19109fc 100644 }); } function abortPendingRequest() { -@@ -277,10 +286,78 @@ var Image = /*#__PURE__*/React.forwardRef((props, ref) => { +@@ -279,10 +288,78 @@ var Image = /*#__PURE__*/React.forwardRef((props, ref) => { suppressHydrationWarning: true }), hiddenImage, createTintColorSVG(tintColor, filterRef.current)); }); @@ -129,7 +129,7 @@ index 95355d5..19109fc 100644 ImageLoader.getSize(uri, success, failure); }; diff --git a/node_modules/react-native-web/dist/modules/ImageLoader/index.js b/node_modules/react-native-web/dist/modules/ImageLoader/index.js -index bc06a87..e309394 100644 +index bc06a87..5a22819 100644 --- a/node_modules/react-native-web/dist/modules/ImageLoader/index.js +++ b/node_modules/react-native-web/dist/modules/ImageLoader/index.js @@ -76,7 +76,7 @@ var ImageLoader = { diff --git a/patches/react-native-web+0.19.11+004+fixPointerEventDown.patch b/patches/react-native-web+0.19.12+004+fixPointerEventDown.patch similarity index 100% rename from patches/react-native-web+0.19.11+004+fixPointerEventDown.patch rename to patches/react-native-web+0.19.12+004+fixPointerEventDown.patch diff --git a/patches/react-native-web+0.19.9+007+osr-improvement.patch b/patches/react-native-web+0.19.12+005+osr-improvement.patch similarity index 100% rename from patches/react-native-web+0.19.9+007+osr-improvement.patch rename to patches/react-native-web+0.19.12+005+osr-improvement.patch