react-native-smooth-clip-view 0.2.8 → 0.3.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.
- package/README.md +86 -21
- package/android/CMakeLists.txt +7 -0
- package/android/build.gradle +14 -2
- package/android/proguard-rules.pro +3 -3
- package/android/src/main/cpp/SmoothClipAndroid.h +10 -0
- package/android/src/main/cpp/SmoothClipBindings.cpp +896 -6
- package/android/src/main/cpp/SmoothClipRegistry.cpp +1067 -46
- package/android/src/main/cpp/SmoothClipTrace.h +25 -0
- package/android/src/main/java/com/smoothclipview/ClipGeometryNormalizer.kt +265 -0
- package/android/src/main/java/com/smoothclipview/SmoothClipBindings.kt +21 -0
- package/android/src/main/java/com/smoothclipview/SmoothClipModule.kt +283 -0
- package/android/src/main/java/com/smoothclipview/SmoothClipView.kt +385 -24
- package/android/src/main/java/com/smoothclipview/SmoothClipViewManager.kt +138 -24
- package/cpp/SmoothClipAnimationCurve.h +151 -122
- package/cpp/SmoothClipRegistry.h +102 -4
- package/cpp/SmoothClipSharedGeometry.h +146 -7
- package/cpp/SmoothClipVelocityTracker.h +13 -9
- package/ios/SmoothClipGeometry.h +184 -6
- package/ios/SmoothClipRegistry.mm +1033 -25
- package/ios/SmoothClipRegistrySnapshot.h +13 -0
- package/ios/SmoothClipTurboModule.cpp +857 -2
- package/ios/SmoothClipTurboModule.h +310 -0
- package/ios/SmoothClipView.mm +714 -183
- package/ios/SmoothClipViewRegistry.h +1 -0
- package/ios/reactnativesmoothclipview.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- package/ios/reactnativesmoothclipview.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/lib/module/NativeSmoothClipModule.js.map +1 -1
- package/lib/module/SmoothClipView.ios.js +22 -6
- package/lib/module/SmoothClipView.ios.js.map +1 -1
- package/lib/module/SmoothClipView.js +1 -46
- package/lib/module/SmoothClipView.js.map +1 -1
- package/lib/module/SmoothClipViewNativeComponent.ts +27 -1
- package/lib/module/capabilities.js +4 -0
- package/lib/module/capabilities.js.map +1 -0
- package/lib/module/capabilities.native.js +36 -0
- package/lib/module/capabilities.native.js.map +1 -0
- package/lib/module/capabilityTypes.js +11 -0
- package/lib/module/capabilityTypes.js.map +1 -0
- package/lib/module/driverState.js +0 -28
- package/lib/module/driverState.js.map +1 -1
- package/lib/module/drivers.js +1 -281
- package/lib/module/drivers.js.map +1 -1
- package/lib/module/drivers.native.js +340 -75
- package/lib/module/drivers.native.js.map +1 -1
- package/lib/module/geometry.js +147 -17
- package/lib/module/geometry.js.map +1 -1
- package/lib/module/groupDriverTypes.js +4 -0
- package/lib/module/groupDriverTypes.js.map +1 -0
- package/lib/module/groupDrivers.android.js +4 -0
- package/lib/module/groupDrivers.android.js.map +1 -0
- package/lib/module/groupDrivers.ios.js +4 -0
- package/lib/module/groupDrivers.ios.js.map +1 -0
- package/lib/module/groupDrivers.js +4 -0
- package/lib/module/groupDrivers.js.map +1 -0
- package/lib/module/groupDrivers.native.js +799 -0
- package/lib/module/groupDrivers.native.js.map +1 -0
- package/lib/module/index.js +3 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/presentationProtocol.js +15 -0
- package/lib/module/presentationProtocol.js.map +1 -0
- package/lib/typescript/src/NativeSmoothClipModule.d.ts +25 -0
- package/lib/typescript/src/NativeSmoothClipModule.d.ts.map +1 -1
- package/lib/typescript/src/SmoothClipView.d.ts +2 -10
- package/lib/typescript/src/SmoothClipView.d.ts.map +1 -1
- package/lib/typescript/src/SmoothClipView.ios.d.ts +133 -2
- package/lib/typescript/src/SmoothClipView.ios.d.ts.map +1 -1
- package/lib/typescript/src/SmoothClipViewNativeComponent.d.ts +8 -0
- package/lib/typescript/src/SmoothClipViewNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/capabilities.d.ts +3 -0
- package/lib/typescript/src/capabilities.d.ts.map +1 -0
- package/lib/typescript/src/capabilities.native.d.ts +3 -0
- package/lib/typescript/src/capabilities.native.d.ts.map +1 -0
- package/lib/typescript/src/capabilityTypes.d.ts +10 -0
- package/lib/typescript/src/capabilityTypes.d.ts.map +1 -0
- package/lib/typescript/src/driverState.d.ts +1 -6
- package/lib/typescript/src/driverState.d.ts.map +1 -1
- package/lib/typescript/src/driverTypes.d.ts +39 -11
- package/lib/typescript/src/driverTypes.d.ts.map +1 -1
- package/lib/typescript/src/drivers.d.ts +2 -4
- package/lib/typescript/src/drivers.d.ts.map +1 -1
- package/lib/typescript/src/drivers.native.d.ts.map +1 -1
- package/lib/typescript/src/geometry.d.ts +36 -2
- package/lib/typescript/src/geometry.d.ts.map +1 -1
- package/lib/typescript/src/groupDriverTypes.d.ts +66 -0
- package/lib/typescript/src/groupDriverTypes.d.ts.map +1 -0
- package/lib/typescript/src/groupDrivers.android.d.ts +2 -0
- package/lib/typescript/src/groupDrivers.android.d.ts.map +1 -0
- package/lib/typescript/src/groupDrivers.d.ts +2 -0
- package/lib/typescript/src/groupDrivers.d.ts.map +1 -0
- package/lib/typescript/src/groupDrivers.ios.d.ts +2 -0
- package/lib/typescript/src/groupDrivers.ios.d.ts.map +1 -0
- package/lib/typescript/src/groupDrivers.native.d.ts +4 -0
- package/lib/typescript/src/groupDrivers.native.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +6 -3
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/presentationProtocol.d.ts +4 -0
- package/lib/typescript/src/presentationProtocol.d.ts.map +1 -0
- package/package.json +10 -11
- package/src/NativeSmoothClipModule.ts +275 -0
- package/src/SmoothClipView.ios.tsx +30 -11
- package/src/SmoothClipView.tsx +2 -76
- package/src/SmoothClipViewNativeComponent.ts +27 -1
- package/src/capabilities.native.ts +69 -0
- package/src/capabilities.ts +2 -0
- package/src/capabilityTypes.ts +17 -0
- package/src/driverState.ts +1 -41
- package/src/driverTypes.ts +56 -11
- package/src/drivers.native.ts +921 -151
- package/src/drivers.ts +2 -423
- package/src/geometry.ts +231 -27
- package/src/groupDriverTypes.ts +117 -0
- package/src/groupDrivers.android.ts +1 -0
- package/src/groupDrivers.ios.ts +1 -0
- package/src/groupDrivers.native.ts +1189 -0
- package/src/groupDrivers.ts +1 -0
- package/src/index.ts +30 -2
- package/src/presentationProtocol.ts +28 -0
- package/lib/module/SmoothClipView.web.js +0 -54
- package/lib/module/SmoothClipView.web.js.map +0 -1
- package/lib/module/index.web.js +0 -8
- package/lib/module/index.web.js.map +0 -1
- package/lib/module/webClipPath.js +0 -25
- package/lib/module/webClipPath.js.map +0 -1
- package/lib/typescript/src/SmoothClipView.web.d.ts +0 -10
- package/lib/typescript/src/SmoothClipView.web.d.ts.map +0 -1
- package/lib/typescript/src/index.web.d.ts +0 -9
- package/lib/typescript/src/index.web.d.ts.map +0 -1
- package/lib/typescript/src/webClipPath.d.ts +0 -7
- package/lib/typescript/src/webClipPath.d.ts.map +0 -1
- package/src/SmoothClipView.web.tsx +0 -66
- package/src/index.web.ts +0 -23
- package/src/webClipPath.ts +0 -30
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SharedValue } from 'react-native-reanimated';
|
|
2
|
-
import type { SmoothClipPresentation } from './geometry.js';
|
|
2
|
+
import type { CanonicalSmoothClipPresentation, SmoothClipPresentation } from './geometry.js';
|
|
3
3
|
export type ClipReduceMotion = 'system' | 'always' | 'never';
|
|
4
4
|
/** Options shared by every animation kind. */
|
|
5
5
|
type ClipAnimationBase = Readonly<{
|
|
@@ -11,12 +11,11 @@ type ClipAnimationBase = Readonly<{
|
|
|
11
11
|
* reached native — a gated per-frame reaction may not have flushed it.
|
|
12
12
|
* Also re-grabs from a running animation (which an implicit interactive
|
|
13
13
|
* start would silently skip). Non-finite `from` rejects the whole call.
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* applies `from`, and starts the replacement from that native value.
|
|
14
|
+
* `driver.presentation.value` is not written from `from`; it stays stale
|
|
15
|
+
* until success sets it to the target. Against a held pending-animation
|
|
16
|
+
* latch, explicit `from` is newer intent: the fused write cancels that latch
|
|
17
|
+
* once unfinished, applies `from`, and starts the replacement from that
|
|
18
|
+
* native value.
|
|
20
19
|
*
|
|
21
20
|
* Keyframes interpolate absolutely, so pass `frames[0].presentation` —
|
|
22
21
|
* the seed renders it before the first animation frame, making the
|
|
@@ -57,9 +56,23 @@ export type ClipAnimationResult = Readonly<{
|
|
|
57
56
|
export type SmoothClipDriverOptions = Readonly<{
|
|
58
57
|
reduceMotion?: ClipReduceMotion;
|
|
59
58
|
onAnimationComplete?: (result: ClipAnimationResult) => void;
|
|
59
|
+
/**
|
|
60
|
+
* Android only; captured at driver creation. Records two-sample velocity
|
|
61
|
+
* history on `setScalars` hot writes so a spring `initialVelocity: 'inherit'`
|
|
62
|
+
* can project its launch speed from the live drag. Off by default: the
|
|
63
|
+
* recording (a clock read plus channel copies) rides the per-frame
|
|
64
|
+
* `setScalars` hot path, and drivers that never hand off into an inherit
|
|
65
|
+
* spring should not pay it. Without this flag, `'inherit'` inherits 0 after
|
|
66
|
+
* a `setScalars` drag on Android (each skipped write also invalidates older
|
|
67
|
+
* samples, so stale pre-drag motion never leaks in). `set()`, the fused
|
|
68
|
+
* `animateTo` `from` seed, and the declarative `presentation.value` channel
|
|
69
|
+
* always record regardless of the flag. iOS always records; the flag is a
|
|
70
|
+
* no-op there.
|
|
71
|
+
*/
|
|
72
|
+
velocityTracking?: boolean;
|
|
60
73
|
}>;
|
|
61
74
|
export type SmoothClipUIControls = Readonly<{
|
|
62
|
-
beginInteraction():
|
|
75
|
+
beginInteraction(): CanonicalSmoothClipPresentation;
|
|
63
76
|
set(presentation: SmoothClipPresentation): void;
|
|
64
77
|
/**
|
|
65
78
|
* Per-frame hot path: writes geometry straight to native without touching
|
|
@@ -74,20 +87,35 @@ export type SmoothClipUIControls = Readonly<{
|
|
|
74
87
|
* this call and the handoff into one.
|
|
75
88
|
*/
|
|
76
89
|
setScalars(x: number, y: number, width: number, height: number, radius: number, contentTranslateX: number, contentTranslateY: number): void;
|
|
90
|
+
/**
|
|
91
|
+
* V2 per-frame hot path. Curve code is 0 for circular and 1 for continuous;
|
|
92
|
+
* invalid codes reject the complete write.
|
|
93
|
+
*/
|
|
94
|
+
setPresentationScalars(x: number, y: number, width: number, height: number, topLeftRadius: number, topRightRadius: number, bottomRightRadius: number, bottomLeftRadius: number, curveCode: number, contentTranslateX: number, contentTranslateY: number, contentScale: number): void;
|
|
77
95
|
animateTo(presentation: SmoothClipPresentation, animation: SmoothClipAnimation): number;
|
|
78
|
-
cancel(animationId?: number, behavior?: 'current' | 'target'):
|
|
96
|
+
cancel(animationId?: number, behavior?: 'current' | 'target'): CanonicalSmoothClipPresentation;
|
|
79
97
|
}>;
|
|
80
98
|
export type SmoothClipReactControls = Readonly<{
|
|
81
|
-
beginInteraction(): Promise<
|
|
99
|
+
beginInteraction(): Promise<CanonicalSmoothClipPresentation>;
|
|
82
100
|
set(presentation: SmoothClipPresentation): Promise<void>;
|
|
83
101
|
animateTo(presentation: SmoothClipPresentation, animation: SmoothClipAnimation): Promise<number>;
|
|
84
|
-
cancel(animationId?: number, behavior?: 'current' | 'target'): Promise<
|
|
102
|
+
cancel(animationId?: number, behavior?: 'current' | 'target'): Promise<CanonicalSmoothClipPresentation>;
|
|
103
|
+
}>;
|
|
104
|
+
/** @internal Worklet-serializable driver identity used by atomic groups. */
|
|
105
|
+
export type SmoothClipDriverHandle = Readonly<{
|
|
106
|
+
driverId: number;
|
|
107
|
+
presentation: SharedValue<SmoothClipPresentation>;
|
|
108
|
+
ownership: SharedValue<number>;
|
|
109
|
+
activeAnimationId: SharedValue<number>;
|
|
110
|
+
disposed: SharedValue<number>;
|
|
85
111
|
}>;
|
|
86
112
|
export type SmoothClipDriver = Readonly<{
|
|
87
113
|
kind: 'hybrid';
|
|
88
114
|
presentation: SharedValue<SmoothClipPresentation>;
|
|
89
115
|
ui: SmoothClipUIControls;
|
|
90
116
|
react: SmoothClipReactControls;
|
|
117
|
+
/** @internal Do not read or mutate directly. */
|
|
118
|
+
__smoothClipHandle?: SmoothClipDriverHandle;
|
|
91
119
|
}>;
|
|
92
120
|
export {};
|
|
93
121
|
//# sourceMappingURL=driverTypes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"driverTypes.d.ts","sourceRoot":"","sources":["../../../src/driverTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"driverTypes.d.ts","sourceRoot":"","sources":["../../../src/driverTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,EACV,+BAA+B,EAC/B,sBAAsB,EACvB,MAAM,eAAY,CAAC;AAEpB,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE7D,8CAA8C;AAC9C,KAAK,iBAAiB,GAAG,QAAQ,CAAC;IAChC;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,IAAI,CAAC,EAAE,sBAAsB,CAAC;CAC/B,CAAC,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,iBAAiB,GACjD,QAAQ,CAAC;IACP,IAAI,EAAE,QAAQ,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;CAC1D,CAAC,CAAC;AAEL,MAAM,MAAM,mBAAmB,GAAG,iBAAiB,GACjD,QAAQ,CAAC;IACP,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS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CAAC,sBAAsB,CAAC,CAAC;IAClD,EAAE,EAAE,oBAAoB,CAAC;IACzB,KAAK,EAAE,uBAAuB,CAAC;IAC/B,gDAAgD;IAChD,kBAAkB,CAAC,EAAE,sBAAsB,CAAC;CAC7C,CAAC,CAAC"}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export declare function useSmoothClipDriver(initialValue: ClipGeometry | SmoothClipPresentation, options?: SmoothClipDriverOptions): SmoothClipDriver;
|
|
4
|
-
export type { KeyframedClipAnimation, SpringClipAnimation, TimingClipAnimation, };
|
|
1
|
+
export { useSmoothClipDriver } from './drivers.native.js';
|
|
2
|
+
export type { KeyframedClipAnimation, SpringClipAnimation, TimingClipAnimation, } from './drivers.native.js';
|
|
5
3
|
//# sourceMappingURL=drivers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drivers.d.ts","sourceRoot":"","sources":["../../../src/drivers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"drivers.d.ts","sourceRoot":"","sources":["../../../src/drivers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAkB,CAAC;AACvD,YAAY,EACV,sBAAsB,EACtB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,qBAAkB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drivers.native.d.ts","sourceRoot":"","sources":["../../../src/drivers.native.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"drivers.native.d.ts","sourceRoot":"","sources":["../../../src/drivers.native.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAEV,sBAAsB,EAEtB,gBAAgB,EAChB,uBAAuB,EACvB,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,kBAAe,CAAC;AAavB,OAAO,EAML,KAAK,YAAY,EACjB,KAAK,sBAAsB,EAC5B,MAAM,eAAY,CAAC;AAyWpB,wBAAgB,mBAAmB,CACjC,YAAY,EAAE,YAAY,GAAG,sBAAsB,EACnD,OAAO,GAAE,uBAA4B,GACpC,gBAAgB,CAqqClB;AAED,YAAY,EACV,sBAAsB,EACtB,mBAAmB,EACnB,mBAAmB,GACpB,CAAC"}
|
|
@@ -1,9 +1,29 @@
|
|
|
1
|
+
export type ClipCurve = 'circular' | 'continuous';
|
|
1
2
|
export type ClipGeometry = Readonly<{
|
|
2
3
|
x: number;
|
|
3
4
|
y: number;
|
|
4
5
|
width: number;
|
|
5
6
|
height: number;
|
|
7
|
+
/** Default for every corner without an explicit override. */
|
|
6
8
|
radius: number;
|
|
9
|
+
topLeftRadius?: number;
|
|
10
|
+
topRightRadius?: number;
|
|
11
|
+
bottomRightRadius?: number;
|
|
12
|
+
bottomLeftRadius?: number;
|
|
13
|
+
curve?: ClipCurve;
|
|
14
|
+
}>;
|
|
15
|
+
export type CanonicalClipGeometry = Readonly<{
|
|
16
|
+
x: number;
|
|
17
|
+
y: number;
|
|
18
|
+
width: number;
|
|
19
|
+
height: number;
|
|
20
|
+
/** Normalized legacy all-corners value retained for V1 compatibility. */
|
|
21
|
+
radius: number;
|
|
22
|
+
topLeftRadius: number;
|
|
23
|
+
topRightRadius: number;
|
|
24
|
+
bottomRightRadius: number;
|
|
25
|
+
bottomLeftRadius: number;
|
|
26
|
+
curve: ClipCurve;
|
|
7
27
|
}>;
|
|
8
28
|
export type ClipBounds = Readonly<{
|
|
9
29
|
width: number;
|
|
@@ -13,15 +33,29 @@ export type SmoothClipPresentation = Readonly<{
|
|
|
13
33
|
clip: ClipGeometry;
|
|
14
34
|
contentTranslateX: number;
|
|
15
35
|
contentTranslateY: number;
|
|
36
|
+
/** Defaults to 1 when omitted. */
|
|
37
|
+
contentScale?: number;
|
|
38
|
+
}>;
|
|
39
|
+
export type CanonicalSmoothClipPresentation = Readonly<{
|
|
40
|
+
clip: CanonicalClipGeometry;
|
|
41
|
+
contentTranslateX: number;
|
|
42
|
+
contentTranslateY: number;
|
|
43
|
+
contentScale: number;
|
|
16
44
|
}>;
|
|
17
|
-
export declare function createClipPresentation(clip: ClipGeometry, contentTranslateX?: number, contentTranslateY?: number): SmoothClipPresentation;
|
|
18
45
|
export declare function isFiniteClipGeometry(geometry: ClipGeometry): boolean;
|
|
19
46
|
export declare function clipGeometryEquals(first: ClipGeometry | null, second: ClipGeometry): boolean;
|
|
20
47
|
export declare function isFiniteClipPresentation(presentation: SmoothClipPresentation): boolean;
|
|
21
48
|
export declare function clipPresentationEquals(first: SmoothClipPresentation | null, second: SmoothClipPresentation): boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Expands presentation defaults and applies CSS proportional corner scaling.
|
|
51
|
+
*/
|
|
52
|
+
export declare function canonicalizeClipGeometry(geometry: ClipGeometry): CanonicalClipGeometry | null;
|
|
53
|
+
export declare function canonicalizeClipPresentation(presentation: SmoothClipPresentation): CanonicalSmoothClipPresentation | null;
|
|
54
|
+
export declare function createClipPresentation(clip: ClipGeometry, contentTranslateX?: number, contentTranslateY?: number, contentScale?: number): CanonicalSmoothClipPresentation;
|
|
22
55
|
/**
|
|
23
56
|
* Mirrors the native geometry contract for tests and non-native fallbacks.
|
|
24
57
|
* Native remains authoritative because its bounds are the actual rendered size.
|
|
25
58
|
*/
|
|
26
|
-
export declare function normalizeClipGeometry(geometry: ClipGeometry, bounds: ClipBounds):
|
|
59
|
+
export declare function normalizeClipGeometry(geometry: ClipGeometry, bounds: ClipBounds): CanonicalClipGeometry | null;
|
|
60
|
+
export declare function normalizeClipPresentation(presentation: SmoothClipPresentation, bounds: ClipBounds): CanonicalSmoothClipPresentation | null;
|
|
27
61
|
//# sourceMappingURL=geometry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geometry.d.ts","sourceRoot":"","sources":["../../../src/geometry.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG,QAAQ,CAAC;IAClC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAA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ClipReduceMotion, SmoothClipDriver, SpringClipAnimation, TimingClipAnimation } from './driverTypes.js';
|
|
2
|
+
import type { CanonicalSmoothClipPresentation, SmoothClipPresentation } from './geometry.js';
|
|
3
|
+
export type SmoothClipGroupAnimationResult = Readonly<{
|
|
4
|
+
groupId: number;
|
|
5
|
+
finished: boolean;
|
|
6
|
+
}>;
|
|
7
|
+
export type SmoothClipGroupSnapshot = Readonly<{
|
|
8
|
+
driver: SmoothClipDriver;
|
|
9
|
+
presentation: CanonicalSmoothClipPresentation;
|
|
10
|
+
ready: boolean;
|
|
11
|
+
}>;
|
|
12
|
+
export type SmoothClipBatchEntry = Readonly<{
|
|
13
|
+
driver: SmoothClipDriver;
|
|
14
|
+
presentation: SmoothClipPresentation;
|
|
15
|
+
}>;
|
|
16
|
+
export type SmoothClipGroupMotionEntry = Readonly<{
|
|
17
|
+
driver: SmoothClipDriver;
|
|
18
|
+
target: SmoothClipPresentation;
|
|
19
|
+
from?: SmoothClipPresentation;
|
|
20
|
+
}>;
|
|
21
|
+
export type SmoothClipGroupKeyframeEntry = SmoothClipGroupMotionEntry & Readonly<{
|
|
22
|
+
frames: readonly Readonly<{
|
|
23
|
+
offset: number;
|
|
24
|
+
presentation: SmoothClipPresentation;
|
|
25
|
+
}>[];
|
|
26
|
+
}>;
|
|
27
|
+
export type SmoothClipGroupSuspensionPolicy = 'pause' | 'finish';
|
|
28
|
+
export type SmoothClipGroupCancelBehavior = 'freeze' | 'finish';
|
|
29
|
+
type SmoothClipGroupAnimationBase = Readonly<{
|
|
30
|
+
suspensionPolicy?: SmoothClipGroupSuspensionPolicy;
|
|
31
|
+
}>;
|
|
32
|
+
export type SmoothClipGroupTimingAnimation = Omit<TimingClipAnimation, 'from'> & SmoothClipGroupAnimationBase;
|
|
33
|
+
export type SmoothClipGroupSpringAnimation = Omit<SpringClipAnimation, 'from'> & SmoothClipGroupAnimationBase;
|
|
34
|
+
export type SmoothClipGroupKeyframeAnimation = Readonly<{
|
|
35
|
+
type: 'keyframes';
|
|
36
|
+
duration: number;
|
|
37
|
+
suspensionPolicy?: SmoothClipGroupSuspensionPolicy;
|
|
38
|
+
}>;
|
|
39
|
+
export type SmoothClipGroupMotionAnimation = SmoothClipGroupTimingAnimation | SmoothClipGroupSpringAnimation;
|
|
40
|
+
export type SmoothClipGroupDriverOptions = Readonly<{
|
|
41
|
+
reduceMotion?: ClipReduceMotion;
|
|
42
|
+
onAnimationComplete?: (result: SmoothClipGroupAnimationResult) => void;
|
|
43
|
+
}>;
|
|
44
|
+
export interface SmoothClipGroupUIControls {
|
|
45
|
+
beginInteraction(drivers: readonly SmoothClipDriver[]): readonly SmoothClipGroupSnapshot[];
|
|
46
|
+
snapshotCurrent(drivers: readonly SmoothClipDriver[]): readonly SmoothClipGroupSnapshot[];
|
|
47
|
+
setBatch(entries: readonly SmoothClipBatchEntry[]): void;
|
|
48
|
+
animateTo(entries: readonly SmoothClipGroupMotionEntry[], animation: SmoothClipGroupMotionAnimation): number;
|
|
49
|
+
animateTo(entries: readonly SmoothClipGroupKeyframeEntry[], animation: SmoothClipGroupKeyframeAnimation): number;
|
|
50
|
+
cancel(groupId: number, behavior?: SmoothClipGroupCancelBehavior): readonly SmoothClipGroupSnapshot[];
|
|
51
|
+
}
|
|
52
|
+
export interface SmoothClipGroupReactControls {
|
|
53
|
+
beginInteraction(drivers: readonly SmoothClipDriver[]): Promise<readonly SmoothClipGroupSnapshot[]>;
|
|
54
|
+
snapshotCurrent(drivers: readonly SmoothClipDriver[]): Promise<readonly SmoothClipGroupSnapshot[]>;
|
|
55
|
+
setBatch(entries: readonly SmoothClipBatchEntry[]): Promise<void>;
|
|
56
|
+
animateTo(entries: readonly SmoothClipGroupMotionEntry[], animation: SmoothClipGroupMotionAnimation): Promise<number>;
|
|
57
|
+
animateTo(entries: readonly SmoothClipGroupKeyframeEntry[], animation: SmoothClipGroupKeyframeAnimation): Promise<number>;
|
|
58
|
+
cancel(groupId: number, behavior?: SmoothClipGroupCancelBehavior): Promise<readonly SmoothClipGroupSnapshot[]>;
|
|
59
|
+
}
|
|
60
|
+
export type SmoothClipGroupDriver = Readonly<{
|
|
61
|
+
kind: 'group';
|
|
62
|
+
ui: SmoothClipGroupUIControls;
|
|
63
|
+
react: SmoothClipGroupReactControls;
|
|
64
|
+
}>;
|
|
65
|
+
export {};
|
|
66
|
+
//# sourceMappingURL=groupDriverTypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"groupDriverTypes.d.ts","sourceRoot":"","sources":["../../../src/groupDriverTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,kBAAe,CAAC;AACvB,OAAO,KAAK,EACV,+BAA+B,EAC/B,sBAAsB,EACvB,MAAM,eAAY,CAAC;AAEpB,MAAM,MAAM,8BAA8B,GAAG,QAAQ,CAAC;IACpD,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,QAAQ,CAAC;IAC7C,MAAM,EAAE,gBAAgB,CAAC;IACzB,YAAY,EAAE,+BAA+B,CAAC;IAC9C,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,QAAQ,CAAC;IAC1C,MAAM,EAAE,gBAAgB,CAAC;IACzB,YAAY,EAAE,sBAAsB,CAAC;CACtC,CAAC,CAAC;AAEH,MAAM,MAAM,0BAA0B,GAAG,QAAQ,CAAC;IAChD,MAAM,EAAE,gBAAgB,CAAC;IACzB,MAAM,EAAE,sBAAsB,CAAC;IAC/B,IAAI,CAAC,EAAE,sBAAsB,CAAC;CAC/B,CAAC,CAAC;AAEH,MAAM,MAAM,4BAA4B,GAAG,0BAA0B,GACnE,QAAQ,CAAC;IACP,MAAM,EAAE,SAAS,QAAQ,CAAC;QACxB,MAAM,EAA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0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"groupDrivers.d.ts","sourceRoot":"","sources":["../../../src/groupDrivers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAAuB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"groupDrivers.ios.d.ts","sourceRoot":"","sources":["../../../src/groupDrivers.ios.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAAuB,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SmoothClipGroupAnimationResult, SmoothClipGroupDriver, SmoothClipGroupDriverOptions } from './groupDriverTypes.js';
|
|
2
|
+
export declare function useSmoothClipGroupDriver(options?: SmoothClipGroupDriverOptions): SmoothClipGroupDriver;
|
|
3
|
+
export type { SmoothClipGroupAnimationResult };
|
|
4
|
+
//# sourceMappingURL=groupDrivers.native.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"groupDrivers.native.d.ts","sourceRoot":"","sources":["../../../src/groupDrivers.native.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAEV,8BAA8B,EAE9B,qBAAqB,EACrB,4BAA4B,EAM7B,MAAM,uBAAoB,CAAC;AAomB5B,wBAAgB,wBAAwB,CACtC,OAAO,GAAE,4BAAiC,GACzC,qBAAqB,CA2hBvB;AAgBD,YAAY,EAAE,8BAA8B,EAAE,CAAC"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
export { SmoothClipView } from './SmoothClipView';
|
|
2
2
|
export type { SmoothClipViewProps } from './SmoothClipView';
|
|
3
3
|
export { useSmoothClipDriver } from './drivers';
|
|
4
|
+
export { useSmoothClipGroupDriver } from './groupDrivers';
|
|
5
|
+
export { getSmoothClipCapabilities } from './capabilities';
|
|
6
|
+
export type { SmoothClipCapabilities } from './capabilityTypes.js';
|
|
4
7
|
export type { ClipAnimationResult, ClipReduceMotion, KeyframedClipAnimation, SmoothClipDriver, SmoothClipDriverOptions, SmoothClipReactControls, SmoothClipUIControls, SmoothClipAnimation, SpringClipAnimation, TimingClipAnimation, } from './driverTypes.js';
|
|
8
|
+
export type { SmoothClipBatchEntry, SmoothClipGroupAnimationResult, SmoothClipGroupCancelBehavior, SmoothClipGroupDriver, SmoothClipGroupDriverOptions, SmoothClipGroupKeyframeAnimation, SmoothClipGroupKeyframeEntry, SmoothClipGroupMotionAnimation, SmoothClipGroupMotionEntry, SmoothClipGroupReactControls, SmoothClipGroupSnapshot, SmoothClipGroupSpringAnimation, SmoothClipGroupSuspensionPolicy, SmoothClipGroupTimingAnimation, SmoothClipGroupUIControls, } from './groupDriverTypes.js';
|
|
5
9
|
export { ClipEasings } from './easings.js';
|
|
6
|
-
export { normalizeClipGeometry } from './geometry.js';
|
|
7
|
-
export {
|
|
8
|
-
export type { ClipBounds, ClipGeometry, SmoothClipPresentation, } from './geometry.js';
|
|
10
|
+
export { canonicalizeClipGeometry, canonicalizeClipPresentation, createClipPresentation, normalizeClipGeometry, normalizeClipPresentation, } from './geometry.js';
|
|
11
|
+
export type { CanonicalClipGeometry, CanonicalSmoothClipPresentation, ClipBounds, ClipCurve, ClipGeometry, SmoothClipPresentation, } from './geometry.js';
|
|
9
12
|
//# 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,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAChD,YAAY,EACV,mBAAmB,EACnB,gBAAgB,EAChB,sBAAsB,EACtB,gBAAgB,EAChB,uBAAuB,EACvB,uBAAuB,EACvB,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,kBAAe,CAAC;AACvB,
|
|
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,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAC3D,YAAY,EAAE,sBAAsB,EAAE,MAAM,sBAAmB,CAAC;AAChE,YAAY,EACV,mBAAmB,EACnB,gBAAgB,EAChB,sBAAsB,EACtB,gBAAgB,EAChB,uBAAuB,EACvB,uBAAuB,EACvB,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,kBAAe,CAAC;AACvB,YAAY,EACV,oBAAoB,EACpB,8BAA8B,EAC9B,6BAA6B,EAC7B,qBAAqB,EACrB,4BAA4B,EAC5B,gCAAgC,EAChC,4BAA4B,EAC5B,8BAA8B,EAC9B,0BAA0B,EAC1B,4BAA4B,EAC5B,uBAAuB,EACvB,8BAA8B,EAC9B,+BAA+B,EAC/B,8BAA8B,EAC9B,yBAAyB,GAC1B,MAAM,uBAAoB,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,MAAM,cAAW,CAAC;AACxC,OAAO,EACL,wBAAwB,EACxB,4BAA4B,EAC5B,sBAAsB,EACtB,qBAAqB,EACrB,yBAAyB,GAC1B,MAAM,eAAY,CAAC;AACpB,YAAY,EACV,qBAAqB,EACrB,+BAA+B,EAC/B,UAAU,EACV,SAAS,EACT,YAAY,EACZ,sBAAsB,GACvB,MAAM,eAAY,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { CanonicalSmoothClipPresentation } from './geometry.js';
|
|
2
|
+
export declare function isV1CompatiblePresentation(presentation: CanonicalSmoothClipPresentation): boolean;
|
|
3
|
+
export declare function assertInitialPresentationProtocol(presentation: CanonicalSmoothClipPresentation, protocolVersion: 1 | 2): void;
|
|
4
|
+
//# sourceMappingURL=presentationProtocol.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentationProtocol.d.ts","sourceRoot":"","sources":["../../../src/presentationProtocol.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,eAAY,CAAC;AAElE,wBAAgB,0BAA0B,CACxC,YAAY,EAAE,+BAA+B,GAC5C,OAAO,CAUT;AAED,wBAAgB,iCAAiC,CAC/C,YAAY,EAAE,+BAA+B,EAC7C,eAAe,EAAE,CAAC,GAAG,CAAC,GACrB,IAAI,CAQN"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-smooth-clip-view",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.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",
|
|
@@ -51,8 +51,7 @@
|
|
|
51
51
|
"clipping",
|
|
52
52
|
"fabric",
|
|
53
53
|
"ios",
|
|
54
|
-
"android"
|
|
55
|
-
"web"
|
|
54
|
+
"android"
|
|
56
55
|
],
|
|
57
56
|
"repository": {
|
|
58
57
|
"type": "git",
|
|
@@ -75,10 +74,10 @@
|
|
|
75
74
|
"@eslint/eslintrc": "^3.3.5",
|
|
76
75
|
"@eslint/js": "^9.39.4",
|
|
77
76
|
"@jest/globals": "^29.7.0",
|
|
78
|
-
"@react-native/babel-preset": "0.86.
|
|
79
|
-
"@react-native/eslint-config": "0.86.
|
|
80
|
-
"@react-native/jest-preset": "0.86.
|
|
81
|
-
"@react-native/metro-config": "0.86.
|
|
77
|
+
"@react-native/babel-preset": "0.86.2",
|
|
78
|
+
"@react-native/eslint-config": "0.86.2",
|
|
79
|
+
"@react-native/jest-preset": "0.86.2",
|
|
80
|
+
"@react-native/metro-config": "0.86.2",
|
|
82
81
|
"@release-it/conventional-changelog": "^11.0.1",
|
|
83
82
|
"@types/react": "^19.2.0",
|
|
84
83
|
"commitlint": "^21.0.2",
|
|
@@ -92,16 +91,16 @@
|
|
|
92
91
|
"lefthook": "^2.1.9",
|
|
93
92
|
"prettier": "^3.8.3",
|
|
94
93
|
"react": "19.2.3",
|
|
95
|
-
"react-native": "0.86.
|
|
94
|
+
"react-native": "0.86.2",
|
|
96
95
|
"react-native-builder-bob": "^0.43.0",
|
|
97
|
-
"react-native-reanimated": "4.5.
|
|
98
|
-
"react-native-worklets": "0.10.
|
|
96
|
+
"react-native-reanimated": "4.5.1",
|
|
97
|
+
"react-native-worklets": "0.10.4",
|
|
99
98
|
"release-it": "^20.2.0",
|
|
100
99
|
"turbo": "^2.9.16",
|
|
101
100
|
"typescript": "^6.0.3"
|
|
102
101
|
},
|
|
103
102
|
"peerDependencies": {
|
|
104
|
-
"react": "
|
|
103
|
+
"react": ">=19.2.0",
|
|
105
104
|
"react-native": ">=0.86.0",
|
|
106
105
|
"react-native-reanimated": ">=4.5.0",
|
|
107
106
|
"react-native-worklets": ">=0.10.0"
|