react-native-smooth-clip-view 0.4.3 → 0.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.4.5](https://github.com/kbrattli/react-native-smooth-clip-view/releases/tag/v0.4.5) — 2026-09-20
4
+
5
+ - Run native `animateTo` for uniform `continuous` clips. The autonomous gate now
6
+ requires uniform corner radii and an unchanged curve instead of circular
7
+ corners, so iOS animates `cornerRadius` under a constant `cornerCurve` with no
8
+ mask. Unequal radii and curve changes still return `null`.
9
+
10
+ ## [0.4.4](https://github.com/kbrattli/react-native-smooth-clip-view/releases/tag/v0.4.4) — 2026-09-11
11
+
12
+ - Allow the Expo 56 runtime baseline (React Native 0.85.3, Reanimated 4.3.1, Worklets 0.8.3).
13
+
3
14
  ## [0.4.3](https://github.com/kbrattli/react-native-smooth-clip-view/releases/tag/v0.4.3) — 2026-09-11
4
15
 
5
16
  ### Rotate and fade the whole clip
package/README.md CHANGED
@@ -214,6 +214,10 @@ APIs share validation, run ownership, and completion behavior.
214
214
  reject the complete presentation. Spring opacity is clamped for rendering
215
215
  without clamping its internal spring state.
216
216
  - Circular and continuous curves and independent corner radii are supported.
217
+ - Native `animateTo` runs need uniform corner radii and one curve for the whole
218
+ run, so a uniform `continuous` clip animates natively. Unequal radii or a
219
+ curve change are static-only: set them with `setFrame`; `animateTo` returns
220
+ `null`.
217
221
  - One outset `boxShadow` is supported. It escapes the aperture but not the host.
218
222
  - A fully off-host aperture is not touchable, even when only its shadow overlaps.
219
223
  - Descendant accessibility is hidden during autonomous native motion and restored
@@ -386,8 +386,10 @@ void installBindings(
386
386
  runtime, bindings, "supportsAutonomousComplexPathAnimation", 0,
387
387
  [](Runtime &, const Value &, const Value *, size_t) -> Value {
388
388
  // Static complex clipping is available. Autonomous complex-path
389
- // animation is deliberately gated off until physical-device sampling
390
- // proves the release tolerance and frame-time requirements.
389
+ // animation (unequal radii or a curve change; uniform continuous
390
+ // corners are scalar and already run natively) is deliberately gated
391
+ // off until physical-device sampling proves the release tolerance and
392
+ // frame-time requirements.
391
393
  return Value(false);
392
394
  });
393
395
 
@@ -1235,8 +1235,7 @@ int32_t startGroupCommon(
1235
1235
  : visiblePresentation(entry.driverId, iterator->second);
1236
1236
  if (!isFinitePresentation(resolvedStart) ||
1237
1237
  !isFinitePresentation(entry.target) ||
1238
- !isAutonomousUniformCircular(resolvedStart) ||
1239
- !isAutonomousUniformCircular(entry.target)) {
1238
+ !isAutonomousUniformPair(resolvedStart, entry.target)) {
1240
1239
  return 0;
1241
1240
  }
1242
1241
  if (kind == AnimationKind::Spring) {
@@ -238,16 +238,29 @@ inline bool hasVisibleShadow(const Presentation &presentation) {
238
238
  presentation.clip.width > 0 && presentation.clip.height > 0;
239
239
  }
240
240
 
241
- inline bool isAutonomousUniformCircular(
242
- const Presentation &presentation) {
241
+ inline bool hasUniformRadii(const Presentation &presentation) {
243
242
  const Geometry &clip = presentation.clip;
244
- return clip.curve == ClipCurve::Circular && radiiAreUniform(
243
+ return radiiAreUniform(
245
244
  resolvedRadius(clip.topLeftRadius, clip.radius),
246
245
  resolvedRadius(clip.topRightRadius, clip.radius),
247
246
  resolvedRadius(clip.bottomRightRadius, clip.radius),
248
247
  resolvedRadius(clip.bottomLeftRadius, clip.radius));
249
248
  }
250
249
 
250
+ /**
251
+ * An autonomous run may only interpolate scalar channels. Uniform radii with
252
+ * one curve family for the whole interval qualify: iOS animates
253
+ * CALayer.cornerRadius under a constant cornerCurve and Android rebuilds its
254
+ * fixed-topology path from the blended radius. Unequal radii or a curve change
255
+ * would need complex-path interpolation, which stays gated off.
256
+ */
257
+ inline bool isAutonomousUniformPair(
258
+ const Presentation &from,
259
+ const Presentation &to) {
260
+ return from.clip.curve == to.clip.curve && hasUniformRadii(from) &&
261
+ hasUniformRadii(to);
262
+ }
263
+
251
264
  /**
252
265
  * Makes shadow appearance/disappearance a pure alpha fade. A disabled or
253
266
  * transparent endpoint borrows the visible endpoint's style while retaining
@@ -1275,8 +1275,7 @@ bool preflightGroupEntries(
1275
1275
  : canonicalVisiblePresentation(iterator->second);
1276
1276
  if (!isFinitePresentation(resolvedStart) ||
1277
1277
  !isFinitePresentation(entry.target) ||
1278
- !isAutonomousUniformCircular(resolvedStart) ||
1279
- !isAutonomousUniformCircular(entry.target)) {
1278
+ !isAutonomousUniformPair(resolvedStart, entry.target)) {
1280
1279
  return false;
1281
1280
  }
1282
1281
  if (kind == AnimationKind::Spring) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-smooth-clip-view",
3
- "version": "0.4.3",
3
+ "version": "0.4.5",
4
4
  "description": "Layout-free animated rounded clipping for React Native Fabric",
5
5
  "main": "./lib/module/index.js",
6
6
  "module": "./lib/module/index.js",
@@ -104,9 +104,9 @@
104
104
  },
105
105
  "peerDependencies": {
106
106
  "react": ">=19.2.0",
107
- "react-native": ">=0.86.0",
108
- "react-native-reanimated": ">=4.5.0",
109
- "react-native-worklets": ">=0.10.1"
107
+ "react-native": ">=0.85.3",
108
+ "react-native-reanimated": ">=4.3.1",
109
+ "react-native-worklets": ">=0.8.3"
110
110
  },
111
111
  "workspaces": [
112
112
  "example"