react-native-smooth-clip-view 0.2.4 → 0.2.6
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/README.md +62 -25
- package/android/CMakeLists.txt +0 -1
- package/android/src/main/cpp/SmoothClipAndroid.h +5 -0
- package/android/src/main/cpp/SmoothClipBindings.cpp +28 -8
- package/android/src/main/cpp/SmoothClipRegistry.cpp +198 -189
- package/android/src/main/java/com/smoothclipview/ClipGeometryNormalizer.kt +61 -11
- package/android/src/main/java/com/smoothclipview/SmoothClipBindings.kt +20 -0
- package/android/src/main/java/com/smoothclipview/SmoothClipModule.kt +1 -0
- package/android/src/main/java/com/smoothclipview/SmoothClipView.kt +105 -34
- package/cpp/SmoothClipAnimationCurve.h +468 -0
- package/cpp/SmoothClipAnimationId.h +32 -0
- package/cpp/SmoothClipRegistry.h +11 -1
- package/cpp/SmoothClipVelocityTracker.h +32 -15
- package/ios/SmoothClipRegistry.mm +246 -97
- package/ios/SmoothClipTurboModule.cpp +4 -2
- package/ios/SmoothClipTurboModule.h +2 -1
- package/ios/SmoothClipView.mm +73 -16
- package/lib/module/NativeSmoothClipModule.js.map +1 -1
- package/lib/module/drivers.android.js +3 -1
- package/lib/module/drivers.android.js.map +1 -1
- package/lib/module/drivers.ios.js +3 -391
- package/lib/module/drivers.ios.js.map +1 -1
- package/lib/module/drivers.native.js +470 -0
- package/lib/module/drivers.native.js.map +1 -0
- package/lib/typescript/src/NativeSmoothClipModule.d.ts +1 -1
- package/lib/typescript/src/NativeSmoothClipModule.d.ts.map +1 -1
- package/lib/typescript/src/driverTypes.d.ts +6 -3
- package/lib/typescript/src/driverTypes.d.ts.map +1 -1
- package/lib/typescript/src/drivers.android.d.ts +2 -2
- package/lib/typescript/src/drivers.android.d.ts.map +1 -1
- package/lib/typescript/src/drivers.ios.d.ts +2 -4
- package/lib/typescript/src/drivers.ios.d.ts.map +1 -1
- package/lib/typescript/src/drivers.native.d.ts +5 -0
- package/lib/typescript/src/drivers.native.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/NativeSmoothClipModule.ts +2 -1
- package/src/driverTypes.ts +6 -3
- package/src/drivers.android.ts +4 -2
- package/src/drivers.ios.ts +4 -687
- package/src/drivers.native.ts +805 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drivers.ios.d.ts","sourceRoot":"","sources":["../../../src/drivers.ios.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"drivers.ios.d.ts","sourceRoot":"","sources":["../../../src/drivers.ios.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAkB,CAAC;AACvD,YAAY,EACV,sBAAsB,EACtB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,qBAAkB,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { KeyframedClipAnimation, SmoothClipDriver, SmoothClipDriverOptions, SpringClipAnimation, TimingClipAnimation } from './driverTypes.js';
|
|
2
|
+
import { type ClipGeometry, type SmoothClipPresentation } from './geometry.js';
|
|
3
|
+
export declare function useSmoothClipDriver(initialValue: ClipGeometry | SmoothClipPresentation, options?: SmoothClipDriverOptions): SmoothClipDriver;
|
|
4
|
+
export type { KeyframedClipAnimation, SpringClipAnimation, TimingClipAnimation, };
|
|
5
|
+
//# sourceMappingURL=drivers.native.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drivers.native.d.ts","sourceRoot":"","sources":["../../../src/drivers.native.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAEV,sBAAsB,EAEtB,gBAAgB,EAChB,uBAAuB,EACvB,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,kBAAe,CAAC;AAavB,OAAO,EAIL,KAAK,YAAY,EACjB,KAAK,sBAAsB,EAC5B,MAAM,eAAY,CAAC;AAiKpB,wBAAgB,mBAAmB,CACjC,YAAY,EAAE,YAAY,GAAG,sBAAsB,EACnD,OAAO,GAAE,uBAA4B,GACpC,gBAAgB,CAslBlB;AAED,YAAY,EACV,sBAAsB,EACtB,mBAAmB,EACnB,mBAAmB,GACpB,CAAC"}
|
package/package.json
CHANGED
|
@@ -18,7 +18,8 @@ export interface Spec extends TurboModule {
|
|
|
18
18
|
radius: CodegenTypes.Double,
|
|
19
19
|
contentTranslateX: CodegenTypes.Double,
|
|
20
20
|
contentTranslateY: CodegenTypes.Double,
|
|
21
|
-
takeOwnership: boolean
|
|
21
|
+
takeOwnership: boolean,
|
|
22
|
+
overridePendingAnimation: boolean
|
|
22
23
|
): void;
|
|
23
24
|
beginInteraction(
|
|
24
25
|
driverId: CodegenTypes.Double
|
package/src/driverTypes.ts
CHANGED
|
@@ -13,9 +13,12 @@ type ClipAnimationBase = Readonly<{
|
|
|
13
13
|
* reached native — a gated per-frame reaction may not have flushed it.
|
|
14
14
|
* Also re-grabs from a running animation (which an implicit interactive
|
|
15
15
|
* start would silently skip). Non-finite `from` rejects the whole call.
|
|
16
|
-
* `driver.presentation.value` is not written from
|
|
17
|
-
* until success sets it to the target)
|
|
18
|
-
*
|
|
16
|
+
* On the native drivers `driver.presentation.value` is not written from
|
|
17
|
+
* `from` (it stays stale until success sets it to the target); the web
|
|
18
|
+
* fallback does write it — its presentation SharedValue is the render
|
|
19
|
+
* channel itself. Against a held pending-animation latch, explicit `from`
|
|
20
|
+
* is newer intent: the fused write cancels that latch once unfinished,
|
|
21
|
+
* applies `from`, and starts the replacement from that native value.
|
|
19
22
|
*
|
|
20
23
|
* Keyframes interpolate absolutely, so pass `frames[0].presentation` —
|
|
21
24
|
* the seed renders it before the first animation frame, making the
|
package/src/drivers.android.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
export
|
|
1
|
+
// Platform re-export only — the implementation is shared with iOS.
|
|
2
|
+
// Edit drivers.native.ts, not this file.
|
|
3
|
+
export { useSmoothClipDriver } from './drivers.native';
|
|
2
4
|
export type {
|
|
3
5
|
KeyframedClipAnimation,
|
|
4
6
|
SpringClipAnimation,
|
|
5
7
|
TimingClipAnimation,
|
|
6
|
-
} from './drivers.
|
|
8
|
+
} from './drivers.native';
|