diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 76c87e0a..29a5a28c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,12 +6,13 @@ jobs: tests: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 with: node-version-file: ".node-version" - - uses: actions/cache@v2 + - uses: actions/cache@v4 with: path: ~/.npm key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c68f582..065f2ec1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,40 @@ # Changelog of `rescript-react-native` +## 0.77.4 - 2025-06-25 + +- Fix ScrollView onContentSizeChange params [#837](https://github.com/rescript-react-native/rescript-react-native/pull/837) by @cknitt + +## 0.77.3 - 2025-04-28 + +- Add missing props for ScrollView [#834](https://github.com/rescript-react-native/rescript-react-native/pull/834) by @Freddy03h + - `automaticallyAdjustKeyboardInsets` + - `automaticallyAdjustsScrollIndicatorInsets` + - `onScrollAnimationEnd` + - `onScrollToTop` + - `persistentScrollbar` + - `invertStickyHeaders` + - `disableIntervalMomentum` + - `disableScrollViewPanResponder` + - `StickyHeaderComponent` + +## 0.77.2 - 2025-03-14 + +- Add missing props for Image and Modal [#831](https://github.com/rescript-react-native/rescript-react-native/pull/831) by @namenu + - add `resizeMultiplier` Image prop + - add `backdropColor` and `navigationBarTranslucent` Modal props + +## 0.77.1 - 2025-03-05 + +- Use record for separatorComponentProps [#829](https://github.com/rescript-react-native/rescript-react-native/pull/829) by @cknitt + +## 0.77.0 - 2025-02-20 + +- 0.77 changes [#828](https://github.com/rescript-react-native/rescript-react-native/pull/828) by @Freddy03h + - add `display: contents` style + - add `mixBlendMode` and `isolation` styles + - add `boxSizing` style + - add `outlineColor`, `outlineOffset`, `outlineStyle` and `outlineWidth` styles + ## 0.76.0 - 2025-02-02 - 0.76 changes [#826](https://github.com/rescript-react-native/rescript-react-native/pull/826) by @Freddy03h diff --git a/package-lock.json b/package-lock.json index 0ac83eec..63b5784d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "rescript-react-native", - "version": "0.76.0", + "version": "0.77.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "rescript-react-native", - "version": "0.76.0", + "version": "0.77.4", "license": "MIT", "devDependencies": { "@rescript/react": "^0.12.2", @@ -22,7 +22,7 @@ }, "peerDependencies": { "@rescript/react": ">=0.12.0", - "react-native": ">=0.76.0", + "react-native": ">=0.77.0", "rescript": ">=11.0.0" } }, @@ -405,27 +405,27 @@ } }, "node_modules/@babel/helpers": { - "version": "7.26.7", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.7.tgz", - "integrity": "sha512-8NHiL98vsi0mbPQmYAGWwfcFaOy4j2HY49fXJCfuDcdE7fMIsH9a7GdaeXpIBsbT7307WU8KCMp5pUVDNL4f9A==", + "version": "7.26.10", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.10.tgz", + "integrity": "sha512-UPYc3SauzZ3JGgj87GgZ89JVdC5dj0AoetR5Bw6wj4niittNyFh6+eOGonYvJ1ao6B8lEa3Q3klS7ADZ53bc5g==", "license": "MIT", "peer": true, "dependencies": { - "@babel/template": "^7.25.9", - "@babel/types": "^7.26.7" + "@babel/template": "^7.26.9", + "@babel/types": "^7.26.10" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/parser": { - "version": "7.26.7", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.7.tgz", - "integrity": "sha512-kEvgGGgEjRUutvdVvZhbn/BxVt+5VSpwXz1j3WYXQbXDo8KzFOPNG2GQbdAiNq8g6wn1yKk7C/qrke03a84V+w==", + "version": "7.26.10", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.10.tgz", + "integrity": "sha512-6aQR2zGE/QFi8JpDLjUZEPYOs7+mhKXm86VaKFiLP35JQwQb6bwUE+XbvkH0EptsYhbNBSUGaUBLKqxH1xSgsA==", "license": "MIT", "peer": true, "dependencies": { - "@babel/types": "^7.26.7" + "@babel/types": "^7.26.10" }, "bin": { "parser": "bin/babel-parser.js" @@ -2005,9 +2005,9 @@ } }, "node_modules/@babel/runtime": { - "version": "7.26.7", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.7.tgz", - "integrity": "sha512-AOPI3D+a8dXnja+iwsUqGRjr1BbZIe771sXdapOtYI531gSqpi92vXivKcq2asu/DFpdl1ceFAKZyRzK2PCVcQ==", + "version": "7.26.10", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.10.tgz", + "integrity": "sha512-2WJMeRQPHKSPemqk/awGrAiuFfzBmOIPXKizAsVhWH9YJqLZ0H+HS4c8loHGgW6utJ3E/ejXQUsiGaQy2NZ9Fw==", "license": "MIT", "peer": true, "dependencies": { @@ -2025,15 +2025,15 @@ "peer": true }, "node_modules/@babel/template": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.9.tgz", - "integrity": "sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg==", + "version": "7.26.9", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.26.9.tgz", + "integrity": "sha512-qyRplbeIpNZhmzOysF/wFMuP9sctmh2cFzRAZOn1YapxBsE1i9bJIY586R/WBLfLcmcBlM8ROBiQURnnNy+zfA==", "license": "MIT", "peer": true, "dependencies": { - "@babel/code-frame": "^7.25.9", - "@babel/parser": "^7.25.9", - "@babel/types": "^7.25.9" + "@babel/code-frame": "^7.26.2", + "@babel/parser": "^7.26.9", + "@babel/types": "^7.26.9" }, "engines": { "node": ">=6.9.0" @@ -2079,9 +2079,9 @@ } }, "node_modules/@babel/types": { - "version": "7.26.7", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.7.tgz", - "integrity": "sha512-t8kDRGrKXyp6+tjUh7hw2RLyclsW4TRoRvRHtSyAX9Bb5ldlFh+90YAYY6awRXrlB4G5G2izNeGySpATlFzmOg==", + "version": "7.26.10", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.10.tgz", + "integrity": "sha512-emqcG3vHrpxUKTrxcblR36dcrcoRDvKmnL/dCL6ZsHaShW80qxCAcNhzQZrpeM765VzEos+xOi4s+r4IXzTwdQ==", "license": "MIT", "peer": true, "dependencies": { @@ -2462,9 +2462,9 @@ } }, "node_modules/@octokit/endpoint": { - "version": "10.1.2", - "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-10.1.2.tgz", - "integrity": "sha512-XybpFv9Ms4hX5OCHMZqyODYqGTZ3H6K6Vva+M9LR7ib/xr1y1ZnlChYv9H680y77Vd/i/k+thXApeRASBQkzhA==", + "version": "10.1.3", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-10.1.3.tgz", + "integrity": "sha512-nBRBMpKPhQUxCsQQeW+rCJ/OPSMcj3g0nfHn01zGYZXuNDvvXudF/TYY6APj5THlurerpFN4a/dQAIAaM6BYhA==", "dev": true, "license": "MIT", "peer": true, @@ -2562,15 +2562,15 @@ } }, "node_modules/@octokit/request": { - "version": "9.2.0", - "resolved": "https://registry.npmjs.org/@octokit/request/-/request-9.2.0.tgz", - "integrity": "sha512-kXLfcxhC4ozCnAXy2ff+cSxpcF0A1UqxjvYMqNuPIeOAzJbVWQ+dy5G2fTylofB/gTbObT8O6JORab+5XtA1Kw==", + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-9.2.2.tgz", + "integrity": "sha512-dZl0ZHx6gOQGcffgm1/Sf6JfEpmh34v3Af2Uci02vzUYz6qEN6zepoRtmybWXIGXFIK8K9ylE3b+duCWqhArtg==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "@octokit/endpoint": "^10.0.0", - "@octokit/request-error": "^6.0.1", + "@octokit/endpoint": "^10.1.3", + "@octokit/request-error": "^6.1.7", "@octokit/types": "^13.6.2", "fast-content-type-parse": "^2.0.0", "universal-user-agent": "^7.0.2" @@ -2580,9 +2580,9 @@ } }, "node_modules/@octokit/request-error": { - "version": "6.1.6", - "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-6.1.6.tgz", - "integrity": "sha512-pqnVKYo/at0NuOjinrgcQYpEbv4snvP3bKMRqHaD9kIsk9u1LCpb2smHZi8/qJfgeNqLo5hNW4Z7FezNdEo0xg==", + "version": "6.1.7", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-6.1.7.tgz", + "integrity": "sha512-69NIppAwaauwZv6aOzb+VVLwt+0havz9GT5YplkeJv7fG7a40qpLt/yZKyiDxAhgz0EtgNdNcb96Z0u+Zyuy2g==", "dev": true, "license": "MIT", "peer": true, @@ -3871,9 +3871,9 @@ "peer": true }, "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", @@ -5627,9 +5627,9 @@ } }, "node_modules/image-size": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/image-size/-/image-size-1.2.0.tgz", - "integrity": "sha512-4S8fwbO6w3GeCVN6OPtA9I5IGKkcDMPcKndtUlpJuCwu7JLjtj7JZpwqLuyY2nrmQT3AWsCJLSKPsc2mPBSl3w==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/image-size/-/image-size-1.2.1.tgz", + "integrity": "sha512-rH+46sQJ2dlwfjfhCyNx5thzrv+dtmBIhPHk0zgRUukHzZ/kRueTJXoYYsclBaKcSMBWuGbOFXtioLpzTb5euw==", "license": "MIT", "peer": true, "dependencies": { diff --git a/package.json b/package.json index 8f5d0ef1..e031be3a 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,10 @@ { "name": "rescript-react-native", "description": "ReScript bindings for React Native.", - "version": "0.76.0", + "version": "0.77.4", "peerDependencies": { "@rescript/react": ">=0.12.0", - "react-native": ">=0.76.0", + "react-native": ">=0.77.0", "rescript": ">=11.0.0" }, "overrides": { diff --git a/src/apis/Style.res b/src/apis/Style.res index d8938630..b1ff752d 100644 --- a/src/apis/Style.res +++ b/src/apis/Style.res @@ -96,6 +96,29 @@ type filter external unsafeFilter: {..} => filter = "%identity" +type blendMode = [ + | #normal + | #multiply + | #screen + | #overlay + | #darken + | #lighten + | #"color-dodge" + | #"color-burn" + | #"hard-light" + | #"soft-light" + | #difference + | #exclusion + | #hue + | #saturation + | #color + | #luminosity +] + +type isolation = [#auto | #isolate] + +type outlineStyle = [#solid | #dotted | #dashed] + type resizeMode = [#cover | #contain | #stretch | #repeat | #center] type fontStyle = [#normal | #italic] @@ -138,7 +161,9 @@ type backfaceVisibility = [#visible | #hidden] type borderStyle = [#solid | #dotted | #dashed] -type display = [#none | #flex] +type display = [#none | #flex | #contents] + +type boxSizing = [#"border-box" | #"content-box"] type overflow = [#visible | #hidden | #scroll] @@ -230,6 +255,7 @@ type flexStyle = { columnGap?: size, direction?: direction, display?: display, + boxSizing?: boxSizing, end?: size, flex?: float, flexBasis?: margin, @@ -330,8 +356,14 @@ type viewCoreStyle = { borderTopStartRadius?: float, boxShadow?: array, filter?: array, + mixBlendMode?: blendMode, + isolation?: isolation, elevation?: float, opacity?: float, + outlineColor?: Color.t, + outlineOffset?: float, + outlineStyle?: outlineStyle, + outlineWidth?: float, } // Text Style Props (https://reactnative.dev/docs/text-style-props) diff --git a/src/apis/Style.resi b/src/apis/Style.resi index 7a0ff33c..9086ead9 100644 --- a/src/apis/Style.resi +++ b/src/apis/Style.resi @@ -91,6 +91,29 @@ type filter external unsafeFilter: {..} => filter = "%identity" +type blendMode = [ + | #normal + | #multiply + | #screen + | #overlay + | #darken + | #lighten + | #"color-dodge" + | #"color-burn" + | #"hard-light" + | #"soft-light" + | #difference + | #exclusion + | #hue + | #saturation + | #color + | #luminosity +] + +type isolation = [#auto | #isolate] + +type outlineStyle = [#solid | #dotted | #dashed] + type resizeMode = [#cover | #contain | #stretch | #repeat | #center] type fontStyle = [#normal | #italic] @@ -126,7 +149,9 @@ type backfaceVisibility = [#visible | #hidden] type borderStyle = [#solid | #dotted | #dashed] -type display = [#none | #flex] +type display = [#none | #flex | #contents] + +type boxSizing = [#"border-box" | #"content-box"] type overflow = [#visible | #hidden | #scroll] @@ -218,6 +243,7 @@ type flexStyle = { columnGap?: size, direction?: direction, display?: display, + boxSizing?: boxSizing, end?: size, flex?: float, flexBasis?: margin, @@ -318,8 +344,14 @@ type viewCoreStyle = { borderTopStartRadius?: float, boxShadow?: array, filter?: array, + mixBlendMode?: blendMode, + isolation?: isolation, elevation?: float, opacity?: float, + outlineColor?: Color.t, + outlineOffset?: float, + outlineStyle?: outlineStyle, + outlineWidth?: float, } // Text Style Props (https://reactnative.dev/docs/text-style-props) diff --git a/src/components/Image.res b/src/components/Image.res index f901e69c..7dac7777 100644 --- a/src/components/Image.res +++ b/src/components/Image.res @@ -110,6 +110,7 @@ type props = { referrerPolicy?: referrerPolicy, resizeMethod?: resizeMethod, resizeMode?: Style.resizeMode, + resizeMultiplier?: float, source: Source.t, srcSet?: string, style?: Style.t, diff --git a/src/components/Modal.res b/src/components/Modal.res index fd222882..2f15b91a 100644 --- a/src/components/Modal.res +++ b/src/components/Modal.res @@ -34,7 +34,9 @@ external make: ( ~ref: ref=?, // Modal props ~animationType: animationType=?, + ~backdropColor: Color.t=?, ~hardwareAccelerated: bool=?, + ~navigationBarTranslucent: bool=?, ~onDismiss: unit => unit=?, ~onOrientationChange: orientationChangeEvent => unit=?, ~onRequestClose: unit => unit=?, diff --git a/src/components/ScrollView.res b/src/components/ScrollView.res index 8c61ec38..6dfee9ba 100644 --- a/src/components/ScrollView.res +++ b/src/components/ScrollView.res @@ -32,57 +32,74 @@ type maintainVisibleContentPosition = { minIndexForVisible: int, } -type scrollViewProps = { - ...View.viewProps, +type iosProps = { alwaysBounceHorizontal?: bool, alwaysBounceVertical?: bool, automaticallyAdjustContentInsets?: bool, + automaticallyAdjustKeyboardInsets?: bool, + automaticallyAdjustsScrollIndicatorInsets?: bool, bounces?: bool, bouncesZoom?: bool, canCancelContentTouches?: bool, centerContent?: bool, - contentContainerStyle?: Style.t, contentInset?: Rect.t, - contentInsetAdjustmentBehavior?: contentInsetAdjustmentBehavior, contentOffset?: contentOffset, - decelerationRate?: decelerationRate, + contentInsetAdjustmentBehavior?: contentInsetAdjustmentBehavior, directionalLockEnabled?: bool, - endFillColor?: Color.t, - fadingEdgeLength?: float, - horizontal?: bool, indicatorStyle?: indicatorStyle, - keyboardDismissMode?: keyboardDismissMode, - keyboardShouldPersistTaps?: keyboardShouldPersistTaps, maintainVisibleContentPosition?: maintainVisibleContentPosition, maximumZoomScale?: float, minimumZoomScale?: float, + onScrollAnimationEnd?: unit => unit, + pinchGestureEnabled?: bool, + scrollEventThrottle?: int, + scrollIndicatorInsets?: Rect.t, + scrollToOverflowEnabled?: bool, + scrollsToTop?: bool, + snapToAlignment?: snapToAlignment, + onScrollToTop?: Event.scrollEvent => unit, + zoomScale?: float, +} + +type androidProps = { + endFillColor?: Color.t, + scrollPerfTag?: string, + overScrollMode?: overScrollMode, nestedScrollEnabled?: bool, - onContentSizeChange?: ((float, float)) => unit, - onMomentumScrollBegin?: Event.scrollEvent => unit, - onMomentumScrollEnd?: Event.scrollEvent => unit, + fadingEdgeLength?: float, + persistentScrollbar?: bool, +} + +type scrollViewProps = { + ...View.viewProps, + ...iosProps, + ...androidProps, + contentContainerStyle?: Style.t, + decelerationRate?: decelerationRate, + horizontal?: bool, + invertStickyHeaders?: bool, + keyboardDismissMode?: keyboardDismissMode, + keyboardShouldPersistTaps?: keyboardShouldPersistTaps, + onContentSizeChange?: (float, float) => unit, onScroll?: Event.scrollEvent => unit, onScrollBeginDrag?: Event.scrollEvent => unit, onScrollEndDrag?: Event.scrollEvent => unit, - overScrollMode?: overScrollMode, + onMomentumScrollEnd?: Event.scrollEvent => unit, + onMomentumScrollBegin?: Event.scrollEvent => unit, pagingEnabled?: bool, - pinchGestureEnabled?: bool, - refreshControl?: React.element, scrollEnabled?: bool, - scrollEventThrottle?: int, - scrollIndicatorInsets?: Rect.t, - scrollPerfTag?: string, - scrollsToTop?: bool, - scrollToOverflowEnabled?: bool, showsHorizontalScrollIndicator?: bool, showsVerticalScrollIndicator?: bool, - snapToAlignment?: snapToAlignment, - snapToEnd?: bool, + stickyHeaderHiddenOnScroll?: bool, + refreshControl?: React.element, snapToInterval?: float, snapToOffsets?: array, snapToStart?: bool, - stickyHeaderHiddenOnScroll?: bool, + snapToEnd?: bool, stickyHeaderIndices?: array, - zoomScale?: float, + disableIntervalMomentum?: bool, + disableScrollViewPanResponder?: bool, + \"StickyHeaderComponent"?: React.element, } type props = { diff --git a/src/components/VirtualizedList.res b/src/components/VirtualizedList.res index 98bf522f..089bd9a7 100644 --- a/src/components/VirtualizedList.res +++ b/src/components/VirtualizedList.res @@ -40,7 +40,7 @@ type onScrollToIndexFailedParams = { averageItemLength: float, } -type separatorComponentProps<'item> = {"highlighted": bool, "leadingItem": option<'item>} +type separatorComponentProps<'item> = {highlighted: bool, leadingItem: option<'item>} type viewabilityConfig = { minimumViewTime?: float, pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy