react-native-smooth-clip-view 0.4.6 → 0.5.0

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.
Files changed (64) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/README.md +47 -0
  3. package/android/src/main/cpp/SmoothClipAndroid.h +22 -0
  4. package/android/src/main/cpp/SmoothClipBindings.cpp +37 -3
  5. package/android/src/main/cpp/SmoothClipRegistry.cpp +85 -2
  6. package/android/src/main/java/com/smoothclipview/ClipGeometryNormalizer.kt +18 -0
  7. package/android/src/main/java/com/smoothclipview/SmoothClipBackdropView.kt +59 -0
  8. package/android/src/main/java/com/smoothclipview/SmoothClipBackdropViewManager.kt +63 -0
  9. package/android/src/main/java/com/smoothclipview/SmoothClipBindings.kt +15 -0
  10. package/android/src/main/java/com/smoothclipview/SmoothClipView.kt +316 -34
  11. package/android/src/main/java/com/smoothclipview/SmoothClipViewManager.kt +19 -0
  12. package/android/src/main/java/com/smoothclipview/SmoothClipViewPackage.kt +1 -1
  13. package/cpp/SmoothClipAnimationCurve.h +36 -11
  14. package/cpp/SmoothClipRegistry.h +11 -4
  15. package/ios/SmoothClipBackdropView.h +17 -0
  16. package/ios/SmoothClipBackdropView.mm +267 -0
  17. package/ios/SmoothClipRegistry.mm +192 -9
  18. package/ios/SmoothClipTurboModule.cpp +33 -11
  19. package/ios/SmoothClipView.mm +713 -22
  20. package/ios/SmoothClipViewRegistry.h +14 -0
  21. package/lib/module/SmoothClipBackdropView.js +40 -0
  22. package/lib/module/SmoothClipBackdropView.js.map +1 -0
  23. package/lib/module/SmoothClipBackdropViewNativeComponent.ts +15 -0
  24. package/lib/module/SmoothClipView.ios.js +17 -1
  25. package/lib/module/SmoothClipView.ios.js.map +1 -1
  26. package/lib/module/SmoothClipViewNativeComponent.ts +4 -0
  27. package/lib/module/geometry.js +44 -6
  28. package/lib/module/geometry.js.map +1 -1
  29. package/lib/module/groups.native.js +10 -3
  30. package/lib/module/groups.native.js.map +1 -1
  31. package/lib/module/index.js +1 -0
  32. package/lib/module/index.js.map +1 -1
  33. package/lib/module/presentationCodec.js +6 -2
  34. package/lib/module/presentationCodec.js.map +1 -1
  35. package/lib/typescript/src/SmoothClipBackdropView.d.ts +155 -0
  36. package/lib/typescript/src/SmoothClipBackdropView.d.ts.map +1 -0
  37. package/lib/typescript/src/SmoothClipBackdropViewNativeComponent.d.ts +8 -0
  38. package/lib/typescript/src/SmoothClipBackdropViewNativeComponent.d.ts.map +1 -0
  39. package/lib/typescript/src/SmoothClipView.android.d.ts +1 -1
  40. package/lib/typescript/src/SmoothClipView.android.d.ts.map +1 -1
  41. package/lib/typescript/src/SmoothClipView.d.ts +1 -1
  42. package/lib/typescript/src/SmoothClipView.d.ts.map +1 -1
  43. package/lib/typescript/src/SmoothClipView.ios.d.ts +15 -1
  44. package/lib/typescript/src/SmoothClipView.ios.d.ts.map +1 -1
  45. package/lib/typescript/src/SmoothClipViewNativeComponent.d.ts +4 -0
  46. package/lib/typescript/src/SmoothClipViewNativeComponent.d.ts.map +1 -1
  47. package/lib/typescript/src/geometry.d.ts +19 -0
  48. package/lib/typescript/src/geometry.d.ts.map +1 -1
  49. package/lib/typescript/src/groups.native.d.ts.map +1 -1
  50. package/lib/typescript/src/index.d.ts +4 -2
  51. package/lib/typescript/src/index.d.ts.map +1 -1
  52. package/lib/typescript/src/presentationCodec.d.ts +1 -1
  53. package/lib/typescript/src/presentationCodec.d.ts.map +1 -1
  54. package/package.json +4 -1
  55. package/src/SmoothClipBackdropView.tsx +53 -0
  56. package/src/SmoothClipBackdropViewNativeComponent.ts +15 -0
  57. package/src/SmoothClipView.android.tsx +4 -1
  58. package/src/SmoothClipView.ios.tsx +24 -1
  59. package/src/SmoothClipView.tsx +4 -1
  60. package/src/SmoothClipViewNativeComponent.ts +4 -0
  61. package/src/geometry.ts +59 -4
  62. package/src/groups.native.ts +9 -3
  63. package/src/index.ts +7 -1
  64. package/src/presentationCodec.ts +8 -2
@@ -0,0 +1,155 @@
1
+ import { type ComponentRef, type ForwardedRef, type ReactElement, type ReactNode } from 'react';
2
+ import type { ViewProps } from 'react-native';
3
+ import type { SmoothClipController } from './controllerTypes.js';
4
+ import NativeSmoothClipBackdropView from './SmoothClipBackdropViewNativeComponent';
5
+ export type SmoothClipBackdropViewProps = ViewProps & {
6
+ controller: SmoothClipController;
7
+ children?: ReactNode;
8
+ };
9
+ export declare function renderSmoothClipBackdropView({ controller, children, ...viewProps }: SmoothClipBackdropViewProps, forwardedRef: ForwardedRef<ComponentRef<typeof NativeSmoothClipBackdropView>>): ReactElement;
10
+ /**
11
+ * A view translated by its controller's `backdrop` channel: every `setFrame`
12
+ * and native run that moves the clip moves this view's content by the
13
+ * presentation's `backdrop.translateX/Y` in the same native frame, with the
14
+ * same clock and epoch as the aperture. Content that must stay locked to the
15
+ * window (a canvas centred in it) belongs here rather than on a Reanimated
16
+ * mapper, which can land a frame later than the clip.
17
+ *
18
+ * Any number of backdrop views may bind to one controller, anywhere in the
19
+ * tree. One that mounts while a run is in flight adopts the driver's current
20
+ * value and follows from the next run. The channel owns the content's
21
+ * transform: do not put a `transform` style on this view.
22
+ */
23
+ export declare const SmoothClipBackdropView: import("react").ForwardRefExoticComponent<Readonly<Omit<Readonly<{
24
+ onAccessibilityAction?: ((event: import("react-native").AccessibilityActionEvent) => unknown) | undefined;
25
+ onAccessibilityTap?: (() => unknown) | undefined;
26
+ onLayout?: ((event: import("react-native").LayoutChangeEvent) => unknown) | undefined;
27
+ onMagicTap?: (() => unknown) | undefined;
28
+ onAccessibilityEscape?: (() => unknown) | undefined;
29
+ }>, "id" | "onMoveShouldSetResponder" | "onMoveShouldSetResponderCapture" | "onResponderGrant" | "onResponderMove" | "onResponderReject" | "onResponderRelease" | "onResponderStart" | "onResponderEnd" | "onResponderTerminate" | "onResponderTerminationRequest" | "onStartShouldSetResponder" | "onStartShouldSetResponderCapture" | "onMouseEnter" | "onMouseLeave" | "onClick" | "onClickCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onBlur" | "onBlurCapture" | "onFocus" | "onFocusCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyUp" | "onKeyUpCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "nativeBackgroundAndroid" | "nativeForegroundAndroid" | "renderToHardwareTextureAndroid" | "hasTVPreferredFocus" | "nextFocusDown" | "nextFocusForward" | "nextFocusLeft" | "nextFocusRight" | "nextFocusUp" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "importantForAccessibility" | "screenReaderFocusable" | "children" | "style" | "collapsable" | "collapsableChildren" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
30
+ onMoveShouldSetResponder?: ((e: import("react-native").GestureResponderEvent) => boolean) | undefined;
31
+ onMoveShouldSetResponderCapture?: ((e: import("react-native").GestureResponderEvent) => boolean) | undefined;
32
+ onResponderGrant?: ((e: import("react-native").GestureResponderEvent) => void | boolean) | undefined;
33
+ onResponderMove?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
34
+ onResponderReject?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
35
+ onResponderRelease?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
36
+ onResponderStart?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
37
+ onResponderEnd?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
38
+ onResponderTerminate?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
39
+ onResponderTerminationRequest?: ((e: import("react-native").GestureResponderEvent) => boolean) | undefined;
40
+ onStartShouldSetResponder?: ((e: import("react-native").GestureResponderEvent) => boolean) | undefined;
41
+ onStartShouldSetResponderCapture?: ((e: import("react-native").GestureResponderEvent) => boolean) | undefined;
42
+ }>, "id" | "onMouseEnter" | "onMouseLeave" | "onClick" | "onClickCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onBlur" | "onBlurCapture" | "onFocus" | "onFocusCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyUp" | "onKeyUpCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "nativeBackgroundAndroid" | "nativeForegroundAndroid" | "renderToHardwareTextureAndroid" | "hasTVPreferredFocus" | "nextFocusDown" | "nextFocusForward" | "nextFocusLeft" | "nextFocusRight" | "nextFocusUp" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "importantForAccessibility" | "screenReaderFocusable" | "children" | "style" | "collapsable" | "collapsableChildren" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
43
+ onMouseEnter?: ((event: import("react-native").MouseEvent) => void) | undefined;
44
+ onMouseLeave?: ((event: import("react-native").MouseEvent) => void) | undefined;
45
+ }>, "id" | "onClick" | "onClickCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onBlur" | "onBlurCapture" | "onFocus" | "onFocusCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyUp" | "onKeyUpCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "nativeBackgroundAndroid" | "nativeForegroundAndroid" | "renderToHardwareTextureAndroid" | "hasTVPreferredFocus" | "nextFocusDown" | "nextFocusForward" | "nextFocusLeft" | "nextFocusRight" | "nextFocusUp" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "importantForAccessibility" | "screenReaderFocusable" | "children" | "style" | "collapsable" | "collapsableChildren" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
46
+ onClick?: ((event: import("react-native").PointerEvent) => void) | undefined;
47
+ onClickCapture?: ((event: import("react-native").PointerEvent) => void) | undefined;
48
+ onPointerEnter?: ((event: import("react-native").PointerEvent) => void) | undefined;
49
+ onPointerEnterCapture?: ((event: import("react-native").PointerEvent) => void) | undefined;
50
+ onPointerLeave?: ((event: import("react-native").PointerEvent) => void) | undefined;
51
+ onPointerLeaveCapture?: ((event: import("react-native").PointerEvent) => void) | undefined;
52
+ onPointerMove?: ((event: import("react-native").PointerEvent) => void) | undefined;
53
+ onPointerMoveCapture?: ((event: import("react-native").PointerEvent) => void) | undefined;
54
+ onPointerCancel?: ((e: import("react-native").PointerEvent) => void) | undefined;
55
+ onPointerCancelCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
56
+ onPointerDown?: ((e: import("react-native").PointerEvent) => void) | undefined;
57
+ onPointerDownCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
58
+ onPointerUp?: ((e: import("react-native").PointerEvent) => void) | undefined;
59
+ onPointerUpCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
60
+ onPointerOver?: ((e: import("react-native").PointerEvent) => void) | undefined;
61
+ onPointerOverCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
62
+ onPointerOut?: ((e: import("react-native").PointerEvent) => void) | undefined;
63
+ onPointerOutCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
64
+ onGotPointerCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
65
+ onGotPointerCaptureCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
66
+ onLostPointerCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
67
+ onLostPointerCaptureCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
68
+ }>, "id" | "onClick" | "onBlur" | "onBlurCapture" | "onFocus" | "onFocusCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyUp" | "onKeyUpCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "nativeBackgroundAndroid" | "nativeForegroundAndroid" | "renderToHardwareTextureAndroid" | "hasTVPreferredFocus" | "nextFocusDown" | "nextFocusForward" | "nextFocusLeft" | "nextFocusRight" | "nextFocusUp" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "importantForAccessibility" | "screenReaderFocusable" | "children" | "style" | "collapsable" | "collapsableChildren" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
69
+ onBlur?: ((event: import("react-native").BlurEvent) => void) | undefined;
70
+ onBlurCapture?: ((event: import("react-native").BlurEvent) => void) | undefined;
71
+ onFocus?: ((event: import("react-native").FocusEvent) => void) | undefined;
72
+ onFocusCapture?: ((event: import("react-native").FocusEvent) => void) | undefined;
73
+ }>, "id" | "onClick" | "onKeyDown" | "onKeyDownCapture" | "onKeyUp" | "onKeyUpCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "nativeBackgroundAndroid" | "nativeForegroundAndroid" | "renderToHardwareTextureAndroid" | "hasTVPreferredFocus" | "nextFocusDown" | "nextFocusForward" | "nextFocusLeft" | "nextFocusRight" | "nextFocusUp" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "importantForAccessibility" | "screenReaderFocusable" | "children" | "style" | "collapsable" | "collapsableChildren" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
74
+ onKeyDown?: ((event: import("react-native").KeyDownEvent) => void) | undefined;
75
+ onKeyDownCapture?: ((event: import("react-native").KeyDownEvent) => void) | undefined;
76
+ onKeyUp?: ((event: import("react-native").KeyUpEvent) => void) | undefined;
77
+ onKeyUpCapture?: ((event: import("react-native").KeyUpEvent) => void) | undefined;
78
+ }>, "id" | "onClick" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "nativeBackgroundAndroid" | "nativeForegroundAndroid" | "renderToHardwareTextureAndroid" | "hasTVPreferredFocus" | "nextFocusDown" | "nextFocusForward" | "nextFocusLeft" | "nextFocusRight" | "nextFocusUp" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "importantForAccessibility" | "screenReaderFocusable" | "children" | "style" | "collapsable" | "collapsableChildren" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
79
+ onTouchCancel?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
80
+ onTouchCancelCapture?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
81
+ onTouchEnd?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
82
+ onTouchEndCapture?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
83
+ onTouchMove?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
84
+ onTouchMoveCapture?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
85
+ onTouchStart?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
86
+ onTouchStartCapture?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
87
+ }>, "id" | "onClick" | "nativeBackgroundAndroid" | "nativeForegroundAndroid" | "renderToHardwareTextureAndroid" | "hasTVPreferredFocus" | "nextFocusDown" | "nextFocusForward" | "nextFocusLeft" | "nextFocusRight" | "nextFocusUp" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "importantForAccessibility" | "screenReaderFocusable" | "children" | "style" | "collapsable" | "collapsableChildren" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
88
+ nativeBackgroundAndroid?: import("react-native/types_generated/Libraries/Components/View/ViewPropTypes").AndroidDrawable | undefined;
89
+ nativeForegroundAndroid?: import("react-native/types_generated/Libraries/Components/View/ViewPropTypes").AndroidDrawable | undefined;
90
+ renderToHardwareTextureAndroid?: boolean | undefined;
91
+ hasTVPreferredFocus?: boolean | undefined;
92
+ nextFocusDown?: number | undefined;
93
+ nextFocusForward?: number | undefined;
94
+ nextFocusLeft?: number | undefined;
95
+ nextFocusRight?: number | undefined;
96
+ nextFocusUp?: number | undefined;
97
+ focusable?: boolean | undefined;
98
+ tabIndex?: 0 | -1;
99
+ onClick?: ((event: import("react-native").GestureResponderEvent) => unknown) | undefined;
100
+ }>, "id" | "shouldRasterizeIOS" | "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "importantForAccessibility" | "screenReaderFocusable" | "children" | "style" | "collapsable" | "collapsableChildren" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
101
+ shouldRasterizeIOS?: boolean | undefined;
102
+ }>, "id" | "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "importantForAccessibility" | "screenReaderFocusable" | "children" | "style" | "collapsable" | "collapsableChildren" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<Omit<Readonly<{
103
+ accessibilityLabelledBy?: (string | undefined) | (Array<string> | undefined);
104
+ "aria-labelledby"?: string | undefined;
105
+ accessibilityLiveRegion?: ("none" | "polite" | "assertive") | undefined;
106
+ "aria-live"?: ("polite" | "assertive" | "off") | undefined;
107
+ importantForAccessibility?: ("auto" | "yes" | "no" | "no-hide-descendants") | undefined;
108
+ screenReaderFocusable?: boolean;
109
+ }>, "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden"> & Omit<Readonly<{
110
+ accessibilityIgnoresInvertColors?: boolean | undefined;
111
+ accessibilityViewIsModal?: boolean | undefined;
112
+ accessibilityShowsLargeContentViewer?: boolean | undefined;
113
+ accessibilityLargeContentTitle?: string | undefined;
114
+ "aria-modal"?: boolean | undefined;
115
+ accessibilityElementsHidden?: boolean | undefined;
116
+ accessibilityLanguage?: string | undefined;
117
+ accessibilityRespondsToUserInteraction?: boolean | undefined;
118
+ }>, "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden"> & {
119
+ accessible?: boolean | undefined;
120
+ accessibilityLabel?: string | undefined;
121
+ accessibilityHint?: string | undefined;
122
+ "aria-label"?: string | undefined;
123
+ accessibilityRole?: import("react-native").AccessibilityRole | undefined;
124
+ role?: import("react-native").Role | undefined;
125
+ accessibilityState?: import("react-native").AccessibilityState | undefined;
126
+ accessibilityValue?: import("react-native").AccessibilityValue | undefined;
127
+ "aria-valuemax"?: import("react-native").AccessibilityValue["max"] | undefined;
128
+ "aria-valuemin"?: import("react-native").AccessibilityValue["min"] | undefined;
129
+ "aria-valuenow"?: import("react-native").AccessibilityValue["now"] | undefined;
130
+ "aria-valuetext"?: import("react-native").AccessibilityValue["text"] | undefined;
131
+ accessibilityActions?: ReadonlyArray<import("react-native/types_generated/Libraries/Components/View/ViewAccessibility").AccessibilityActionInfo> | undefined;
132
+ "aria-busy"?: boolean | undefined;
133
+ "aria-checked"?: (boolean | undefined) | "mixed";
134
+ "aria-disabled"?: boolean | undefined;
135
+ "aria-expanded"?: boolean | undefined;
136
+ "aria-selected"?: boolean | undefined;
137
+ "aria-hidden"?: boolean | undefined;
138
+ }>, "id" | "children" | "style" | "collapsable" | "collapsableChildren" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
139
+ children?: React.ReactNode;
140
+ style?: import("react-native/types_generated/Libraries/StyleSheet/StyleSheet").ViewStyleProp | undefined;
141
+ collapsable?: boolean | undefined;
142
+ collapsableChildren?: boolean | undefined;
143
+ id?: string;
144
+ testID?: string | undefined;
145
+ nativeID?: string | undefined;
146
+ needsOffscreenAlphaCompositing?: boolean | undefined;
147
+ hitSlop?: import("react-native/types_generated/Libraries/StyleSheet/EdgeInsetsPropType").EdgeInsetsOrSizeProp | undefined;
148
+ pointerEvents?: ("auto" | "box-none" | "box-only" | "none") | undefined;
149
+ removeClippedSubviews?: boolean | undefined;
150
+ experimental_accessibilityOrder?: Array<string> | undefined;
151
+ }>, never>> & {
152
+ controller: SmoothClipController;
153
+ children?: ReactNode;
154
+ } & import("react").RefAttributes<import("react-native/types_generated/src/private/webapis/dom/nodes/ReactNativeElement").default>>;
155
+ //# sourceMappingURL=SmoothClipBackdropView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SmoothClipBackdropView.d.ts","sourceRoot":"","sources":["../../../src/SmoothClipBackdropView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAmB,CAAC;AAE9D,OAAO,4BAA4B,MAAM,yCAAyC,CAAC;AAEnF,MAAM,MAAM,2BAA2B,GAAG,SAAS,GAAG;IACpD,UAAU,EAAE,oBAAoB,CAAC;IACjC,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CAAC;AAEF,wBAAgB,4BAA4B,CAC1C,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,SAAS,EAAE,EAAE,2BAA2B,EACnE,YAAY,EAAE,YAAY,CAAC,YAAY,CAAC,OAAO,4BAA4B,CAAC,CAAC,GAC5E,YAAY,CAYd;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAlCrB,oBAAoB;eACrB,SAAS;mIAsCpB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { type CodegenTypes, type HostComponent, type ViewProps } from 'react-native';
2
+ export interface NativeProps extends ViewProps {
3
+ /** The controller (driver) whose `backdrop` channel translates this view. */
4
+ driverId: CodegenTypes.Double;
5
+ }
6
+ declare const _default: HostComponent<NativeProps>;
7
+ export default _default;
8
+ //# sourceMappingURL=SmoothClipBackdropViewNativeComponent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SmoothClipBackdropViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../src/SmoothClipBackdropViewNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAEtB,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC5C,6EAA6E;IAC7E,QAAQ,EAAE,YAAY,CAAC,MAAM,CAAC;CAC/B;wBAII,aAAa,CAAC,WAAW,CAAC;AAF/B,wBAEgC"}
@@ -1,3 +1,3 @@
1
1
  export { SmoothClipView } from './SmoothClipView.ios.js';
2
- export type { SmoothClipViewProps } from './SmoothClipView.ios.js';
2
+ export type { SmoothClipShadowRendering, SmoothClipViewProps, } from './SmoothClipView.ios.js';
3
3
  //# sourceMappingURL=SmoothClipView.android.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SmoothClipView.android.d.ts","sourceRoot":"","sources":["../../../src/SmoothClipView.android.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAsB,CAAC;AACtD,YAAY,EAAE,mBAAmB,EAAE,MAAM,yBAAsB,CAAC"}
1
+ {"version":3,"file":"SmoothClipView.android.d.ts","sourceRoot":"","sources":["../../../src/SmoothClipView.android.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAsB,CAAC;AACtD,YAAY,EACV,yBAAyB,EACzB,mBAAmB,GACpB,MAAM,yBAAsB,CAAC"}
@@ -1,3 +1,3 @@
1
1
  export { renderSmoothClipView, sanitizeSmoothClipStyle, SmoothClipView, } from './SmoothClipView.ios.js';
2
- export type { SmoothClipViewProps } from './SmoothClipView.ios.js';
2
+ export type { SmoothClipShadowRendering, SmoothClipViewProps, } from './SmoothClipView.ios.js';
3
3
  //# sourceMappingURL=SmoothClipView.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SmoothClipView.d.ts","sourceRoot":"","sources":["../../../src/SmoothClipView.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACvB,cAAc,GACf,MAAM,yBAAsB,CAAC;AAC9B,YAAY,EAAE,mBAAmB,EAAE,MAAM,yBAAsB,CAAC"}
1
+ {"version":3,"file":"SmoothClipView.d.ts","sourceRoot":"","sources":["../../../src/SmoothClipView.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACvB,cAAc,GACf,MAAM,yBAAsB,CAAC;AAC9B,YAAY,EACV,yBAAyB,EACzB,mBAAmB,GACpB,MAAM,yBAAsB,CAAC"}
@@ -2,13 +2,26 @@ import { type ComponentRef, type ForwardedRef, type ReactElement, type ReactNode
2
2
  import { type ViewProps } from 'react-native';
3
3
  import type { SmoothClipController } from './controllerTypes.js';
4
4
  import NativeSmoothClipView from './SmoothClipViewNativeComponent';
5
+ /**
6
+ * How the host draws the presentation's `boxShadow`.
7
+ *
8
+ * - `'blur'` (default): a blurred path, rebuilt or animated on every frame the
9
+ * aperture moves.
10
+ * - `'baked'`: one pre-blurred tile per corner-radius step, stretched by the
11
+ * compositor, so an animated frame costs no blur. Needs uniform corner
12
+ * radii (unequal radii fall back to the blur path); the tile corner rounds
13
+ * up to the next 4 pt step, and a run that changes radius, blur or colour
14
+ * swaps tiles in steps. Drawn under the aperture on both platforms.
15
+ */
16
+ export type SmoothClipShadowRendering = 'blur' | 'baked';
5
17
  export type SmoothClipViewProps = ViewProps & {
6
18
  controller: SmoothClipController;
19
+ shadowRendering?: SmoothClipShadowRendering;
7
20
  children?: ReactNode;
8
21
  };
9
22
  /** Prevents React Native from installing a second, aperture-independent shadow. */
10
23
  export declare function sanitizeSmoothClipStyle(style: ViewProps['style']): ViewProps['style'];
11
- export declare function renderSmoothClipView({ controller, children, style, ...viewProps }: SmoothClipViewProps, forwardedRef: ForwardedRef<ComponentRef<typeof NativeSmoothClipView>>): ReactElement;
24
+ export declare function renderSmoothClipView({ controller, children, style, shadowRendering, ...viewProps }: SmoothClipViewProps, forwardedRef: ForwardedRef<ComponentRef<typeof NativeSmoothClipView>>): ReactElement;
12
25
  export declare const SmoothClipView: import("react").ForwardRefExoticComponent<Readonly<Omit<Readonly<{
13
26
  onAccessibilityAction?: ((event: import("react-native").AccessibilityActionEvent) => unknown) | undefined;
14
27
  onAccessibilityTap?: (() => unknown) | undefined;
@@ -139,6 +152,7 @@ export declare const SmoothClipView: import("react").ForwardRefExoticComponent<R
139
152
  experimental_accessibilityOrder?: Array<string> | undefined;
140
153
  }>, never>> & {
141
154
  controller: SmoothClipController;
155
+ shadowRendering?: SmoothClipShadowRendering;
142
156
  children?: ReactNode;
143
157
  } & import("react").RefAttributes<import("react-native/types_generated/src/private/webapis/dom/nodes/ReactNativeElement").default>>;
144
158
  //# sourceMappingURL=SmoothClipView.ios.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SmoothClipView.ios.d.ts","sourceRoot":"","sources":["../../../src/SmoothClipView.ios.tsx"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAAc,KAAK,SAAS,EAAkB,MAAM,cAAc,CAAC;AAC1E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAmB,CAAC;AAG9D,OAAO,oBAEN,MAAM,iCAAiC,CAAC;AAEzC,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG;IAC5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F,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,SAAS,CAAC,OAAO,CAAC,GACxB,SAAS,CAAC,OAAO,CAAC,CAkCpB;AAED,wBAAgB,oBAAoB,CAClC,EACE,UAAU,EACV,QAAQ,EACR,KAAK,EACL,eAAe,EACf,GAAG,SAAS,EACb,EAAE,mBAAmB,EACtB,YAAY,EAAE,YAAY,CAAC,YAAY,CAAC,OAAO,oBAAoB,CAAC,CAAC,GACpE,YAAY,CA2Cd;AAED,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAtJb,oBAAoB;sBACd,yBAAyB;eAChC,SAAS;mIA0JpB,CAAC"}
@@ -24,6 +24,10 @@ export interface NativeProps extends ViewProps {
24
24
  initialClipBoxShadowOffsetY: CodegenTypes.Double;
25
25
  initialClipBoxShadowBlurRadius: CodegenTypes.Double;
26
26
  initialClipBoxShadowSpreadDistance: CodegenTypes.Double;
27
+ /** 0 = blur the shadow path each frame, 1 = stretch a baked tile. */
28
+ shadowRendering?: CodegenTypes.WithDefault<CodegenTypes.Int32, 0>;
29
+ initialBackdropTranslateX?: CodegenTypes.WithDefault<CodegenTypes.Double, 0>;
30
+ initialBackdropTranslateY?: CodegenTypes.WithDefault<CodegenTypes.Double, 0>;
27
31
  }
28
32
  interface NativeCommands {
29
33
  setClipPresentation: (viewRef: React.ElementRef<HostComponent<NativeProps>>, x: CodegenTypes.Double, y: CodegenTypes.Double, width: CodegenTypes.Double, height: CodegenTypes.Double, topLeftRadius: CodegenTypes.Double, topRightRadius: CodegenTypes.Double, bottomRightRadius: CodegenTypes.Double, bottomLeftRadius: CodegenTypes.Double, curveCode: CodegenTypes.Int32, contentTranslateX: CodegenTypes.Double, contentTranslateY: CodegenTypes.Double, contentScale: CodegenTypes.Double, shadowEnabled: boolean, shadowRed: CodegenTypes.Double, shadowGreen: CodegenTypes.Double, shadowBlue: CodegenTypes.Double, shadowAlpha: CodegenTypes.Double, shadowOffsetX: CodegenTypes.Double, shadowOffsetY: CodegenTypes.Double, shadowBlurRadius: CodegenTypes.Double, shadowSpreadDistance: CodegenTypes.Double, rotation: CodegenTypes.Double, opacity: CodegenTypes.Double) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"SmoothClipViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../src/SmoothClipViewNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAEtB,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC5C,QAAQ,EAAE,YAAY,CAAC,MAAM,CAAC;IAC9B,YAAY,EAAE,YAAY,CAAC,MAAM,CAAC;IAClC,YAAY,EAAE,YAAY,CAAC,MAAM,CAAC;IAClC,gBAAgB,EAAE,YAAY,CAAC,MAAM,CAAC;IACtC,iBAAiB,EAAE,YAAY,CAAC,MAAM,CAAC;IACvC,wBAAwB,EAAE,YAAY,CAAC,MAAM,CAAC;IAC9C,yBAAyB,EAAE,YAAY,CAAC,MAAM,CAAC;IAC/C,4BAA4B,EAAE,YAAY,CAAC,MAAM,CAAC;IAClD,2BAA2B,EAAE,YAAY,CAAC,MAAM,CAAC;IACjD,gBAAgB,EAAE,YAAY,CAAC,KAAK,CAAC;IACrC,wBAAwB,EAAE,YAAY,CAAC,MAAM,CAAC;IAC9C,wBAAwB,EAAE,YAAY,CAAC,MAAM,CAAC;IAC9C,mBAAmB,EAAE,YAAY,CAAC,MAAM,CAAC;IACzC,eAAe,EAAE,YAAY,CAAC,MAAM,CAAC;IACrC,cAAc,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IAClE,2BAA2B,EAAE,OAAO,CAAC;IACrC,uBAAuB,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AAM,EAChC,UAAU,EAAE,YAAY,CAAC,MAAM,EAC/B,WAAW,EAAE,YAAY,CAAC,MAAM,EAChC,aAAa,EAAE,YAAY,CAAC,MAAM,EAClC,aAAa,EAAE,YAAY,CAAC,MAAM,EAClC,gBAAgB,EAAE,YAAY,CAAC,MAAM,EACrC,oBAAoB,EAAE,YAAY,CAAC,MAAM,EACzC,QAAQ,EAAE,YAAY,CAAC,MAAM,EAC7B,OAAO,EAAE,YAAY,CAAC,MAAM,KACzB,IAAI,CAAC;CACX;AAED,eAAO,MAAM,QAAQ,EAAE,cAErB,CAAC;wBAIE,aAAa,CAAC,WAAW,CAAC;AAF/B,wBAEgC"}
@@ -44,6 +44,16 @@ export type CanonicalClipGeometry = Readonly<{
44
44
  bottomLeftRadius: number;
45
45
  curve: ClipCurve;
46
46
  }>;
47
+ /**
48
+ * Translation, in host points, of every `SmoothClipBackdropView` bound to the
49
+ * clip's controller. It rides the same native run and `setFrame` stream as
50
+ * the aperture, so content that must stay locked to the window (a canvas
51
+ * centred in it) is sampled by the same clock as the clip.
52
+ */
53
+ export type ClipBackdrop = Readonly<{
54
+ translateX: number;
55
+ translateY: number;
56
+ }>;
47
57
  export type SmoothClipPresentation = Readonly<{
48
58
  clip: ClipGeometry;
49
59
  contentTranslateX: number;
@@ -55,6 +65,8 @@ export type SmoothClipPresentation = Readonly<{
55
65
  /** Opacity of the complete clipped object; defaults to 1. */
56
66
  opacity?: number;
57
67
  boxShadow?: ClipBoxShadow;
68
+ /** Defaults to no translation when omitted. */
69
+ backdrop?: ClipBackdrop;
58
70
  }>;
59
71
  export type CanonicalSmoothClipPresentation = Readonly<{
60
72
  clip: CanonicalClipGeometry;
@@ -64,6 +76,7 @@ export type CanonicalSmoothClipPresentation = Readonly<{
64
76
  rotation: `${number}rad`;
65
77
  opacity: number;
66
78
  boxShadow?: CanonicalClipBoxShadow;
79
+ backdrop: ClipBackdrop;
67
80
  }>;
68
81
  /** Numeric native angle. Invalid input remains NaN for atomic validation. */
69
82
  export declare function rotationRadians(rotation: ClipRotation | undefined): number;
@@ -75,6 +88,12 @@ export declare function clipPresentationEquals(first: SmoothClipPresentation | n
75
88
  * Expands presentation defaults and applies CSS proportional corner scaling.
76
89
  */
77
90
  export declare function canonicalizeClipGeometry(geometry: ClipGeometry): CanonicalClipGeometry | null;
91
+ /**
92
+ * Validates and canonicalizes in one pass: this runs on the UI runtime for
93
+ * every `setFrame` of a drag, so the geometry is checked once, the shadow
94
+ * colour is parsed once and the rotation is parsed once. The result is null
95
+ * exactly when `isFiniteClipPresentation` is false.
96
+ */
78
97
  export declare function canonicalizeClipPresentation(presentation: SmoothClipPresentation): CanonicalSmoothClipPresentation | null;
79
98
  export declare function createClipPresentation(clip: ClipGeometry, contentTranslateX?: number, contentTranslateY?: number, contentScale?: number, boxShadow?: ClipBoxShadow): CanonicalSmoothClipPresentation;
80
99
  //# sourceMappingURL=geometry.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"geometry.d.ts","sourceRoot":"","sources":["../../../src/geometry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG/C,MAAM,MAAM,YAAY,GAAG,GAAG,MAAM,KAAK,GAAG,GAAG,MAAM,KAAK,CAAC;AAE3D,MAAM,MAAM,SAAS,GAAG,UAAU,GAAG,YAAY,CAAC;AAElD,kFAAkF;AAClF,MAAM,MAAM,aAAa,GAAG,QAAQ,CAAC;IACnC,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,2EAA2E;IAC3E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,QAAQ,CAAC;IAC5C,2EAA2E;IAC3E,KAAK,EAAE,UAAU,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,O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,kBAAkB,CAChC,KAAK,EAAE,YAAY,GAAG,IAAI,EAC1B,MAAM,EAAE,YAAY,GACnB,OAAO,CAeT;AAOD,wBAAgB,wBAAwB,CACtC,YAAY,EAAE,sBAAsB,GACnC,OAAO,CAeT;AAED,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,sBAAsB,GAAG,IAAI,EACpC,MAAM,EAAE,sBAAsB,GAC7B,OAAO,CAgBT;AAsDD;;GAEG;AACH,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,YAAY,GACrB,qBAAqB,GAAG,IAAI,CAa9B;AAED;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAC1C,YAAY,EAAE,sBAAsB,GACnC,+BAA+B,GAAG,IAAI,CAkCxC;AAID,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,YAAY,EAClB,iBAAiB,SAAI,EACrB,iBAAiB,SAAI,EACrB,YAAY,SAAI,EAChB,SAAS,CAAC,EAAE,aAAa,GACxB,+BAA+B,CAiCjC"}
@@ -1 +1 @@
1
- {"version":3,"file":"groups.native.d.ts","sourceRoot":"","sources":["../../../src/groups.native.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EACV,eAAe,EAEf,sBAAsB,EAGvB,MAAM,iBAAc,CAAC;AAibtB,wBAAgB,kBAAkB,CAChC,OAAO,GAAE,sBAA2B,GACnC,eAAe,CAiJjB"}
1
+ {"version":3,"file":"groups.native.d.ts","sourceRoot":"","sources":["../../../src/groups.native.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EACV,eAAe,EAEf,sBAAsB,EAGvB,MAAM,iBAAc,CAAC;AAwbtB,wBAAgB,kBAAkB,CAChC,OAAO,GAAE,sBAA2B,GACnC,eAAe,CAiJjB"}
@@ -1,5 +1,7 @@
1
1
  export { SmoothClipView } from './SmoothClipView';
2
- export type { SmoothClipViewProps } from './SmoothClipView';
2
+ export type { SmoothClipShadowRendering, SmoothClipViewProps, } from './SmoothClipView';
3
+ export { SmoothClipBackdropView } from './SmoothClipBackdropView.js';
4
+ export type { SmoothClipBackdropViewProps } from './SmoothClipBackdropView.js';
3
5
  export { useSmoothClipController } from './controllers';
4
6
  export { useSmoothClipGroup } from './groups';
5
7
  export { getSmoothClipCapabilities } from './capabilities';
@@ -8,5 +10,5 @@ export type { ClipReduceMotion, SpringClipAnimation, TimingClipAnimation, Smooth
8
10
  export type { SmoothClipGroup, SmoothClipGroupFrame, SmoothClipGroupOptions, SmoothClipGroupSnapshot, SmoothClipGroupTarget, } from './groupTypes.js';
9
11
  export { ClipEasings } from './easings.js';
10
12
  export { canonicalizeClipGeometry, canonicalizeClipPresentation, createClipPresentation, } from './geometry.js';
11
- export type { CanonicalClipGeometry, CanonicalClipBoxShadow, CanonicalSmoothClipPresentation, ClipCurve, ClipRotation, ClipGeometry, ClipBoxShadow, SmoothClipPresentation, } from './geometry.js';
13
+ export type { CanonicalClipGeometry, CanonicalClipBoxShadow, CanonicalSmoothClipPresentation, ClipBackdrop, ClipCurve, ClipRotation, ClipGeometry, ClipBoxShadow, SmoothClipPresentation, } from './geometry.js';
12
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAC3D,YAAY,EAAE,sBAAsB,EAAE,MAAM,sBAAmB,CAAC;AAChE,YAAY,EACV,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,2BAA2B,EAC3B,yBAAyB,EACzB,sBAAsB,EAC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tB,uBAAuB,EACvB,qBAAqB,GACtB,MAAM,iBAAc,CAAC;AACtB,OAAO,EAAE,WAAW,EAAE,MAAM,cAAW,CAAC;AACxC,OAAO,EACL,wBAAwB,EACxB,4BAA4B,EAC5B,sBAAsB,GACvB,MAAM,eAAY,CAAC;AACpB,YAAY,EACV,qBAAqB,EACrB,sBAAsB,EACtB,+BAA+B,EAC/B,YAAY,EACZ,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,sBAAsB,GACvB,MAAM,eAAY,CAAC"}
@@ -3,7 +3,7 @@ import type { CanonicalSmoothClipPresentation } from './geometry.js';
3
3
  * Versionless native packet layout. Keep this as the single JS codec used by
4
4
  * drivers, groups, snapshots, and cancellation.
5
5
  */
6
- export declare const PRESENTATION_STRIDE = 23;
6
+ export declare const PRESENTATION_STRIDE = 25;
7
7
  export declare function appendPresentationPacket(values: number[], presentation: CanonicalSmoothClipPresentation): void;
8
8
  export declare function presentationPacket(presentation: CanonicalSmoothClipPresentation): number[];
9
9
  export declare function presentationFromPacket(values: readonly number[], offset?: number): CanonicalSmoothClipPresentation | null;
@@ -1 +1 @@
1
- {"version":3,"file":"presentationCodec.d.ts","sourceRoot":"","sources":["../../../src/presentationCodec.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,eAAY,CAAC;AAElE;;;GAGG;AACH,eAAO,MAAM,mBAAmB,KAAK,CAAC;AAEtC,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,MAAM,EAAE,EAChB,YAAY,EAAE,+BAA+B,GAC5C,IAAI,CAmCN;AAED,wBAAgB,kBAAkB,CAChC,YAAY,EAAE,+BAA+B,GAC5C,MAAM,EAAE,CAKV;AAED,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,SAAS,MAAM,EAAE,EACzB,MAAM,SAAI,GACT,+BAA+B,GAAG,IAAI,CA8ExC"}
1
+ {"version":3,"file":"presentationCodec.d.ts","sourceRoot":"","sources":["../../../src/presentationCodec.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,eAAY,CAAC;AAElE;;;GAGG;AACH,eAAO,MAAM,mBAAmB,KAAK,CAAC;AAEtC,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,MAAM,EAAE,EAChB,YAAY,EAAE,+BAA+B,GAC5C,IAAI,CAqCN;AAED,wBAAgB,kBAAkB,CAChC,YAAY,EAAE,+BAA+B,GAC5C,MAAM,EAAE,CAKV;AAED,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,SAAS,MAAM,EAAE,EACzB,MAAM,SAAI,GACT,+BAA+B,GAAG,IAAI,CAkFxC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-smooth-clip-view",
3
- "version": "0.4.6",
3
+ "version": "0.5.0",
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",
@@ -141,6 +141,9 @@
141
141
  "components": {
142
142
  "SmoothClipView": {
143
143
  "className": "SmoothClipView"
144
+ },
145
+ "SmoothClipBackdropView": {
146
+ "className": "SmoothClipBackdropView"
144
147
  }
145
148
  },
146
149
  "modulesProvider": {
@@ -0,0 +1,53 @@
1
+ import {
2
+ forwardRef,
3
+ type ComponentRef,
4
+ type ForwardedRef,
5
+ type ReactElement,
6
+ type ReactNode,
7
+ } from 'react';
8
+ import type { ViewProps } from 'react-native';
9
+ import type { SmoothClipController } from './controllerTypes';
10
+ import { getControllerRef, unwrapSmoothClipRef } from './controllerInternals';
11
+ import NativeSmoothClipBackdropView from './SmoothClipBackdropViewNativeComponent';
12
+
13
+ export type SmoothClipBackdropViewProps = ViewProps & {
14
+ controller: SmoothClipController;
15
+ children?: ReactNode;
16
+ };
17
+
18
+ export function renderSmoothClipBackdropView(
19
+ { controller, children, ...viewProps }: SmoothClipBackdropViewProps,
20
+ forwardedRef: ForwardedRef<ComponentRef<typeof NativeSmoothClipBackdropView>>
21
+ ): ReactElement {
22
+ const { ref } = getControllerRef(controller);
23
+ const driverId = unwrapSmoothClipRef(ref)?.id ?? 0;
24
+ return (
25
+ <NativeSmoothClipBackdropView
26
+ ref={forwardedRef}
27
+ {...viewProps}
28
+ driverId={driverId}
29
+ >
30
+ {children}
31
+ </NativeSmoothClipBackdropView>
32
+ );
33
+ }
34
+
35
+ /**
36
+ * A view translated by its controller's `backdrop` channel: every `setFrame`
37
+ * and native run that moves the clip moves this view's content by the
38
+ * presentation's `backdrop.translateX/Y` in the same native frame, with the
39
+ * same clock and epoch as the aperture. Content that must stay locked to the
40
+ * window (a canvas centred in it) belongs here rather than on a Reanimated
41
+ * mapper, which can land a frame later than the clip.
42
+ *
43
+ * Any number of backdrop views may bind to one controller, anywhere in the
44
+ * tree. One that mounts while a run is in flight adopts the driver's current
45
+ * value and follows from the next run. The channel owns the content's
46
+ * transform: do not put a `transform` style on this view.
47
+ */
48
+ export const SmoothClipBackdropView = forwardRef<
49
+ ComponentRef<typeof NativeSmoothClipBackdropView>,
50
+ SmoothClipBackdropViewProps
51
+ >(function SmoothClipBackdropViewComponent(props, forwardedRef) {
52
+ return renderSmoothClipBackdropView(props, forwardedRef);
53
+ });
@@ -0,0 +1,15 @@
1
+ import {
2
+ codegenNativeComponent,
3
+ type CodegenTypes,
4
+ type HostComponent,
5
+ type ViewProps,
6
+ } from 'react-native';
7
+
8
+ export interface NativeProps extends ViewProps {
9
+ /** The controller (driver) whose `backdrop` channel translates this view. */
10
+ driverId: CodegenTypes.Double;
11
+ }
12
+
13
+ export default codegenNativeComponent<NativeProps>(
14
+ 'SmoothClipBackdropView'
15
+ ) as HostComponent<NativeProps>;
@@ -1,2 +1,5 @@
1
1
  export { SmoothClipView } from './SmoothClipView.ios';
2
- export type { SmoothClipViewProps } from './SmoothClipView.ios';
2
+ export type {
3
+ SmoothClipShadowRendering,
4
+ SmoothClipViewProps,
5
+ } from './SmoothClipView.ios';
@@ -15,8 +15,22 @@ import NativeSmoothClipView, {
15
15
  type NativeProps,
16
16
  } from './SmoothClipViewNativeComponent';
17
17
 
18
+ /**
19
+ * How the host draws the presentation's `boxShadow`.
20
+ *
21
+ * - `'blur'` (default): a blurred path, rebuilt or animated on every frame the
22
+ * aperture moves.
23
+ * - `'baked'`: one pre-blurred tile per corner-radius step, stretched by the
24
+ * compositor, so an animated frame costs no blur. Needs uniform corner
25
+ * radii (unequal radii fall back to the blur path); the tile corner rounds
26
+ * up to the next 4 pt step, and a run that changes radius, blur or colour
27
+ * swaps tiles in steps. Drawn under the aperture on both platforms.
28
+ */
29
+ export type SmoothClipShadowRendering = 'blur' | 'baked';
30
+
18
31
  export type SmoothClipViewProps = ViewProps & {
19
32
  controller: SmoothClipController;
33
+ shadowRendering?: SmoothClipShadowRendering;
20
34
  children?: ReactNode;
21
35
  };
22
36
 
@@ -112,7 +126,13 @@ export function sanitizeSmoothClipStyle(
112
126
  }
113
127
 
114
128
  export function renderSmoothClipView(
115
- { controller, children, style, ...viewProps }: SmoothClipViewProps,
129
+ {
130
+ controller,
131
+ children,
132
+ style,
133
+ shadowRendering,
134
+ ...viewProps
135
+ }: SmoothClipViewProps,
116
136
  forwardedRef: ForwardedRef<ComponentRef<typeof NativeSmoothClipView>>
117
137
  ): ReactElement {
118
138
  const { ref, initialFrame: canonical } = getControllerRef(controller);
@@ -147,6 +167,9 @@ export function renderSmoothClipView(
147
167
  initialClipBoxShadowOffsetY: shadow?.offsetY ?? 0,
148
168
  initialClipBoxShadowBlurRadius: shadow?.blurRadius ?? 0,
149
169
  initialClipBoxShadowSpreadDistance: shadow?.spreadDistance ?? 0,
170
+ shadowRendering: shadowRendering === 'baked' ? 1 : 0,
171
+ initialBackdropTranslateX: canonical.backdrop.translateX,
172
+ initialBackdropTranslateY: canonical.backdrop.translateY,
150
173
  };
151
174
 
152
175
  return (
@@ -3,4 +3,7 @@ export {
3
3
  sanitizeSmoothClipStyle,
4
4
  SmoothClipView,
5
5
  } from './SmoothClipView.ios';
6
- export type { SmoothClipViewProps } from './SmoothClipView.ios';
6
+ export type {
7
+ SmoothClipShadowRendering,
8
+ SmoothClipViewProps,
9
+ } from './SmoothClipView.ios';
@@ -31,6 +31,10 @@ export interface NativeProps extends ViewProps {
31
31
  initialClipBoxShadowOffsetY: CodegenTypes.Double;
32
32
  initialClipBoxShadowBlurRadius: CodegenTypes.Double;
33
33
  initialClipBoxShadowSpreadDistance: CodegenTypes.Double;
34
+ /** 0 = blur the shadow path each frame, 1 = stretch a baked tile. */
35
+ shadowRendering?: CodegenTypes.WithDefault<CodegenTypes.Int32, 0>;
36
+ initialBackdropTranslateX?: CodegenTypes.WithDefault<CodegenTypes.Double, 0>;
37
+ initialBackdropTranslateY?: CodegenTypes.WithDefault<CodegenTypes.Double, 0>;
34
38
  }
35
39
 
36
40
  interface NativeCommands {