react-native-smooth-clip-view 0.2.4 → 0.2.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/README.md CHANGED
@@ -2,14 +2,13 @@
2
2
 
3
3
  [![npm version](https://img.shields.io/npm/v/react-native-smooth-clip-view.svg)](https://www.npmjs.com/package/react-native-smooth-clip-view)
4
4
 
5
- Layout-free animated rounded clipping for React Native Fabric.
5
+ ## High-performance geometry animations for React Native
6
6
 
7
- `SmoothClipView` keeps a fixed maximum Yoga footprint while a reusable driver
8
- updates only the native clipping layer. It is
9
- useful for expanding cards, sheets, maps, media, zoom transitions, and other reveals where
10
- animating layout width and height cause lag because of yoga/fabric calculating layout every frame.
7
+ `react-native-smooth-clip-view` lets you animate `x`, `y`, `width`, `height`, and `borderRadius` with Reanimated without triggering expensive layout work on every frame.
11
8
 
12
- In other words, it makes animating width height on Reanimated a cheap operation.
9
+ Instead of resizing the Yoga layout, `SmoothClipView` keeps a fixed footprint and updates only the native clipping layer. This makes geometry-heavy animations smooth and inexpensive—even for shared-element transitions, zoom transitions, expanding cards, reveals, sheets, maps, and media.
10
+
11
+ Use it for transitions that previously struggled with performance when animating layout dimensions directly.
13
12
 
14
13
  ## Requirements
15
14
 
@@ -196,6 +195,10 @@ const gesture = Gesture.Pan()
196
195
  (< 4 ms apart, e.g. a release-sample `from` seed right after the last drag
197
196
  write) coalesce into one sample, and an identical re-write is ignored, so a
198
197
  fused handoff can neither zero nor inflate the inherited velocity.
198
+ `beginInteraction()` records the frozen presentation as a plain sample on
199
+ both platforms, so a grab-and-instant-refling inherits bounded recent
200
+ motion (the staleness guard still zeroes a stale pair) instead of
201
+ launching dead.
199
202
  - `driver.react` exposes `beginInteraction`, `set`, `animateTo`, and `cancel`
200
203
  as Promises (`setScalars` is UI-worklet-only). React code never blocks
201
204
  waiting for main/UI-thread work. An immediate animation request resolves
@@ -206,7 +209,10 @@ const gesture = Gesture.Pan()
206
209
  animation can run the identical curve without hand-deriving it; springs
207
210
  accept mass, stiffness, damping, and an
208
211
  explicit normalized velocity or `'inherit'` (the default). Keyframes accept
209
- validated, monotonically increasing offsets from zero through one. Every
212
+ validated, monotonically increasing offsets from zero through one; there is
213
+ deliberately no keyframe easing field — playback is linear between offsets
214
+ and the frames encode the curve, which also expresses per-channel-nonlinear
215
+ paths that no single time-warp could reproduce. Every
210
216
  kind accepts an optional `from` presentation — a fused take-ownership hot
211
217
  write issued immediately before the handoff, so the animation starts from
212
218
  exactly that value (pass `frames[0].presentation` for keyframes, which
@@ -230,6 +236,9 @@ const gesture = Gesture.Pan()
230
236
  animation: the remainder is re-latched and the next displayable host resumes
231
237
  it, so the completion arrives when it finishes there — or unfinished on
232
238
  replacement, cancellation, `beginInteraction()`, or driver destruction.
239
+ With multiple hosts on one driver, unregistering any participant mid-flight
240
+ makes the eventual completion `finished: false` — `finished: true` means
241
+ every participant ran the animation to its end.
233
242
  - An `animateTo` issued before any host view can produce a visible frame (for
234
243
  example from an effect in the same commit that mounts the host, or inside a
235
244
  modal route whose subtree attaches to its window late) is held pending and
@@ -228,9 +228,12 @@ constexpr double kSpringSettleVelocity = 1.0;
228
228
  // Settle-based termination is backed by a hard cap so a pathological
229
229
  // configuration cannot run the frame loop forever.
230
230
  constexpr double kSpringMaxDurationS = 10.0;
231
- // One vsync of slack for the post-stall run-ahead guard in advance():
232
- // frame-axis elapsed may lead wall elapsed by at most this much before the
233
- // animation is re-anchored onto honest wall time.
231
+ // Fixed slack for the post-stall run-ahead guard in advance(). The lead it
232
+ // bounds is a latency DIFFERENTIAL — the anchor frame's dispatch latency
233
+ // minus the current frame's — so the constant is refresh-rate independent
234
+ // (it is not one vsync period; at 120 Hz it spans two). 17 ms keeps the
235
+ // guard silent through normal callback jitter while capping post-stall
236
+ // run-ahead at one 60 Hz frame of curve time.
234
237
  constexpr double kMaxFrameLeadS = 0.017;
235
238
 
236
239
  // Semi-implicit Euler per channel, substepped: one frame-sized step is only
@@ -678,7 +681,12 @@ Presentation beginInteraction(uint64_t driverId) {
678
681
  state.latest = current;
679
682
  state.hasLatest = true;
680
683
  state.ownership = Ownership::Interactive;
681
- resetVelocitySamples(state.samples, toChannels(current), nowSeconds());
684
+ // Plain record, not a reset — iOS parity (smoothClipFreezePresentation
685
+ // records the frozen value). Pairing the frozen mid-flight presentation
686
+ // with the last real sample lets a grab-and-instant-refling inherit
687
+ // bounded recent motion instead of launching dead; an unchanged value
688
+ // dedupes to a no-op and ages out through the staleness guard.
689
+ recordVelocitySample(state.samples, toChannels(current), nowSeconds());
682
690
  applyToViews(state, current);
683
691
  emitCompletion(driverId, animationId, false);
684
692
  return current;
@@ -60,17 +60,12 @@ inline void recordVelocitySample(
60
60
  history.latestTimeS = nowS;
61
61
  }
62
62
 
63
- // beginInteraction semantics: history restarts from a single fresh sample;
64
- // one more record is needed before 'inherit' can measure motion.
65
- inline void resetVelocitySamples(
66
- VelocitySampleHistory &history,
67
- const std::array<double, 7> &channels,
68
- double nowS) {
69
- history.hasPrevious = false;
70
- history.hasLatest = true;
71
- history.latest = channels;
72
- history.latestTimeS = nowS;
73
- }
63
+ // beginInteraction on both platforms records the frozen presentation as a
64
+ // plain sample: a grab mid-animation pairs the frozen value with the last
65
+ // real sample, so an instant refling inherits bounded recent motion instead
66
+ // of launching dead, and a grab at an unchanged value dedupes to a no-op
67
+ // whose staleness keeps aging. There is deliberately no reset primitive —
68
+ // the 100 ms staleness guard is the forgetting mechanism.
74
69
 
75
70
  inline void clearVelocitySamples(VelocitySampleHistory &history) {
76
71
  history = VelocitySampleHistory{};
@@ -1,4 +1,6 @@
1
1
  "use strict";
2
2
 
3
- export { useSmoothClipDriver } from "./drivers.ios.js";
3
+ // Platform re-export only — the implementation is shared with iOS.
4
+ // Edit drivers.native.ts, not this file.
5
+ export { useSmoothClipDriver } from "./drivers.native.js";
4
6
  //# sourceMappingURL=drivers.android.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["useSmoothClipDriver"],"sourceRoot":"../../src","sources":["drivers.android.ts"],"mappings":";;AAAA,SAASA,mBAAmB,QAAQ,kBAAe","ignoreList":[]}
1
+ {"version":3,"names":["useSmoothClipDriver"],"sourceRoot":"../../src","sources":["drivers.android.ts"],"mappings":";;AAAA;AACA;AACA,SAASA,mBAAmB,QAAQ,qBAAkB","ignoreList":[]}
@@ -1,394 +1,6 @@
1
1
  "use strict";
2
2
 
3
- import { useEffect, useRef } from 'react';
4
- import { useSharedValue } from 'react-native-reanimated';
5
- import { isRNRuntime, scheduleOnRN, scheduleOnUI } from 'react-native-worklets';
6
- import NativeSmoothClipModule from './smoothClipNative';
7
- import { allocateDriverId, attachDriverState, createDriverState, detachDriverState, getDriverState, setDriverState } from "./driverState.js";
8
- import { completeNativeAnimation, synchronizeNativeCompletion } from "./nativeCompletion.js";
9
- import { clipPresentationEquals, createClipPresentation, isFiniteClipPresentation } from "./geometry.js";
10
- import { createReactRequest, rejectDriverRequests, resolveReactRequest } from "./reactRequests.js";
11
- const INTERACTIVE = 0;
12
- const NATIVE = 1;
13
- const setPresentationHostFunction = NativeSmoothClipModule.setClipPresentation;
14
- const beginInteractionHostFunction = NativeSmoothClipModule.beginInteraction;
15
- const animateTimingHostFunction = NativeSmoothClipModule.animateTiming;
16
- const animateSpringHostFunction = NativeSmoothClipModule.animateSpring;
17
- const animateKeyframesHostFunction = NativeSmoothClipModule.animateKeyframes;
18
- const rejectAnimationHostFunction = NativeSmoothClipModule.rejectAnimation;
19
- const cancelAnimationHostFunction = NativeSmoothClipModule.cancelAnimation;
20
- const destroyDriverHostFunction = NativeSmoothClipModule.destroyDriver;
21
-
22
- // Workaround for react-native-worklets 0.10: the RN-side serialization cache
23
- // hands out one remote-function registry id per function forever, but the
24
- // registry entry is deleted as soon as any transient UI-side proxy of that
25
- // function is garbage collected. A later scheduleOnRN for the same function
26
- // then reads `undefined` from the registry and aborts in Value::getObject.
27
- // Pinning one UI-side reference for the app lifetime keeps the proxy — and
28
- // with it the registry entry — alive. Remove once worklets decouples registry
29
- // cleanup from proxy lifetime.
30
- scheduleOnUI(resolver => {
31
- 'worklet';
32
-
33
- globalThis.__smoothClipPinnedResolver = resolver;
34
- }, resolveReactRequest);
35
- function reduceMotionCode(value) {
36
- switch (value) {
37
- case 'always':
38
- return 1;
39
- case 'never':
40
- return 2;
41
- default:
42
- return 0;
43
- }
44
- }
45
- function animationIsFinite(target, animation) {
46
- 'worklet';
47
-
48
- if (animation.from !== undefined && !isFiniteClipPresentation(animation.from)) {
49
- // Silently dropping an invalid explicit start would re-open the exact
50
- // stale-start handoff `from` exists to close — reject the whole call.
51
- return false;
52
- }
53
- if (animation.type === 'timing') {
54
- return Number.isFinite(animation.duration) && animation.controlPoints.every(Number.isFinite);
55
- }
56
- if (animation.type === 'spring') {
57
- return [animation.mass ?? 1, animation.stiffness ?? 100, animation.damping ?? 10, animation.initialVelocity === 'inherit' ? 0 : animation.initialVelocity ?? 0].every(Number.isFinite);
58
- }
59
- if (!Number.isFinite(animation.duration) || animation.frames.length < 2) {
60
- return false;
61
- }
62
- let previousOffset = -1;
63
- for (const frame of animation.frames) {
64
- if (!Number.isFinite(frame.offset) || frame.offset < 0 || frame.offset > 1 || frame.offset <= previousOffset || !isFiniteClipPresentation(frame.presentation)) {
65
- return false;
66
- }
67
- previousOffset = frame.offset;
68
- }
69
- return animation.frames[0]?.offset === 0 && previousOffset === 1 && clipPresentationEquals(animation.frames[animation.frames.length - 1]?.presentation ?? null, target);
70
- }
71
- function presentationFromNative(values, fallback, offset = 0) {
72
- 'worklet';
73
-
74
- if (values.length < offset + 7) return fallback;
75
- const presentation = {
76
- clip: {
77
- x: values[offset],
78
- y: values[offset + 1],
79
- width: values[offset + 2],
80
- height: values[offset + 3],
81
- radius: values[offset + 4]
82
- },
83
- contentTranslateX: values[offset + 5],
84
- contentTranslateY: values[offset + 6]
85
- };
86
- return isFiniteClipPresentation(presentation) ? presentation : fallback;
87
- }
88
- function flattenedKeyframes(animation) {
89
- 'worklet';
90
-
91
- const values = [];
92
- for (const frame of animation.frames) {
93
- const {
94
- clip,
95
- contentTranslateX,
96
- contentTranslateY
97
- } = frame.presentation;
98
- values.push(frame.offset, clip.x, clip.y, clip.width, clip.height, clip.radius, contentTranslateX, contentTranslateY);
99
- }
100
- return values;
101
- }
102
- function uiOnly() {
103
- 'worklet';
104
-
105
- throw new Error('[SmoothClipView] driver.ui methods must run on the UI runtime. Use driver.react from React code.');
106
- }
107
- export function useSmoothClipDriver(initialValue, options = {}) {
108
- const initialPresentation = 'clip' in initialValue ? initialValue : createClipPresentation(initialValue);
109
- const presentation = useSharedValue(initialPresentation);
110
- const ownership = useSharedValue(INTERACTIVE);
111
- const suppressDeliveries = useSharedValue(0);
112
- const activeAnimationId = useSharedValue(0);
113
- // Non-zero after a setScalars hot write: driver.presentation is then stale,
114
- // so animateTo must start from the native registry's latest value instead
115
- // of snapping back to the stale SharedValue.
116
- const scalarsStale = useSharedValue(0);
117
- const callbackRef = useRef(options.onAnimationComplete);
118
- const driverRef = useRef(null);
119
- callbackRef.current = options.onAnimationComplete;
120
- if (driverRef.current === null) {
121
- const driverId = allocateDriverId();
122
- const reduceMotion = reduceMotionCode(options.reduceMotion ?? 'system');
123
- const seedPresentation = next => {
124
- 'worklet';
125
-
126
- if (!clipPresentationEquals(presentation.value, next)) {
127
- suppressDeliveries.value += 1;
128
- presentation.value = next;
129
- }
130
- };
131
- const beginOnUI = () => {
132
- 'worklet';
133
-
134
- const current = presentationFromNative(beginInteractionHostFunction(driverId), presentation.value);
135
- activeAnimationId.value = 0;
136
- ownership.value = INTERACTIVE;
137
- scalarsStale.value = 0;
138
- seedPresentation(current);
139
- return current;
140
- };
141
- const setOnUI = next => {
142
- 'worklet';
143
-
144
- if (!isFiniteClipPresentation(next)) return;
145
- activeAnimationId.value = 0;
146
- ownership.value = INTERACTIVE;
147
- scalarsStale.value = 0;
148
- const {
149
- clip,
150
- contentTranslateX,
151
- contentTranslateY
152
- } = next;
153
- setPresentationHostFunction(driverId, clip.x, clip.y, clip.width, clip.height, clip.radius, contentTranslateX, contentTranslateY, true);
154
- seedPresentation(next);
155
- };
156
- const setScalarsOnUI = (x, y, width, height, radius, contentTranslateX, contentTranslateY) => {
157
- 'worklet';
158
-
159
- if (!Number.isFinite(x) || !Number.isFinite(y) || !Number.isFinite(width) || !Number.isFinite(height) || !Number.isFinite(radius) || !Number.isFinite(contentTranslateX) || !Number.isFinite(contentTranslateY)) {
160
- return;
161
- }
162
- if (activeAnimationId.value !== 0) activeAnimationId.value = 0;
163
- if (ownership.value !== INTERACTIVE) ownership.value = INTERACTIVE;
164
- if (scalarsStale.value === 0) scalarsStale.value = 1;
165
- setPresentationHostFunction(driverId, x, y, width, height, radius, contentTranslateX, contentTranslateY, true);
166
- };
167
- const animateOnUI = (target, animation) => {
168
- 'worklet';
169
-
170
- if (!isFiniteClipPresentation(target) || !animationIsFinite(target, animation)) {
171
- return rejectAnimationHostFunction(driverId);
172
- }
173
- const from = animation.from;
174
- if (from !== undefined) {
175
- // Fused hot write: exactly setScalars(from…) issued immediately
176
- // before the handoff, so native's latest value — the animation
177
- // start below — is the caller's explicit presentation. Also
178
- // re-grabs from a running animation, which the implicit
179
- // interactive-start path would silently skip.
180
- setScalarsOnUI(from.clip.x, from.clip.y, from.clip.width, from.clip.height, from.clip.radius, from.contentTranslateX, from.contentTranslateY);
181
- }
182
-
183
- // After a setScalars hot write the SharedValue no longer matches what
184
- // is on screen; passing it as the start would snap the animation back.
185
- // Without an interactive start, native resolves the start from its own
186
- // latest value instead.
187
- const scalarsWereStale = scalarsStale.value !== 0;
188
- const hasInteractiveStart = ownership.value === INTERACTIVE && !scalarsWereStale;
189
- const start = presentation.value;
190
- ownership.value = NATIVE;
191
- presentation.value = target;
192
- scalarsStale.value = 0;
193
- const startClip = start.clip;
194
- const targetClip = target.clip;
195
- let animationId;
196
- if (animation.type === 'timing') {
197
- const [x1, y1, x2, y2] = animation.controlPoints;
198
- animationId = animateTimingHostFunction(driverId, hasInteractiveStart, startClip.x, startClip.y, startClip.width, startClip.height, startClip.radius, start.contentTranslateX, start.contentTranslateY, targetClip.x, targetClip.y, targetClip.width, targetClip.height, targetClip.radius, target.contentTranslateX, target.contentTranslateY, Math.max(0, animation.duration), x1, y1, x2, y2, reduceMotion);
199
- } else if (animation.type === 'spring') {
200
- const inheritVelocity = animation.initialVelocity === undefined || animation.initialVelocity === 'inherit';
201
- animationId = animateSpringHostFunction(driverId, hasInteractiveStart, startClip.x, startClip.y, startClip.width, startClip.height, startClip.radius, start.contentTranslateX, start.contentTranslateY, targetClip.x, targetClip.y, targetClip.width, targetClip.height, targetClip.radius, target.contentTranslateX, target.contentTranslateY, Math.max(0.0001, animation.mass ?? 1), Math.max(0.0001, animation.stiffness ?? 100), Math.max(0, animation.damping ?? 10), inheritVelocity ? 0 : animation.initialVelocity, inheritVelocity, reduceMotion);
202
- } else {
203
- animationId = animateKeyframesHostFunction(driverId, hasInteractiveStart, startClip.x, startClip.y, startClip.width, startClip.height, startClip.radius, start.contentTranslateX, start.contentTranslateY, targetClip.x, targetClip.y, targetClip.width, targetClip.height, targetClip.radius, target.contentTranslateX, target.contentTranslateY, Math.max(0, animation.duration), flattenedKeyframes(animation), reduceMotion);
204
- }
205
- if (animationId === 0) {
206
- // Native rejected the transition after ownership was transferred.
207
- // Restore interactive ownership and the pre-animation value, then
208
- // emit a standalone finished:false completion so completion-driven
209
- // state machines observe exactly one result per animateTo call.
210
- ownership.value = INTERACTIVE;
211
- presentation.value = start;
212
- if (scalarsWereStale) scalarsStale.value = 1;
213
- activeAnimationId.value = 0;
214
- return rejectAnimationHostFunction(driverId);
215
- }
216
- activeAnimationId.value = animationId;
217
- return animationId;
218
- };
219
- const cancelOnUI = (animationId = 0, behavior = 'current') => {
220
- 'worklet';
221
-
222
- const values = cancelAnimationHostFunction(driverId, animationId, behavior === 'target' ? 1 : 0);
223
- if (values.length < 8 || values[0] !== 1) return presentation.value;
224
- const current = presentationFromNative(values, presentation.value, 1);
225
- activeAnimationId.value = 0;
226
- ownership.value = INTERACTIVE;
227
- scalarsStale.value = 0;
228
- seedPresentation(current);
229
- return current;
230
- };
231
- const driver = {
232
- kind: 'hybrid',
233
- presentation,
234
- ui: {
235
- beginInteraction() {
236
- 'worklet';
237
-
238
- if (isRNRuntime()) return uiOnly();
239
- return beginOnUI();
240
- },
241
- set(next) {
242
- 'worklet';
243
-
244
- if (isRNRuntime()) return uiOnly();
245
- setOnUI(next);
246
- },
247
- setScalars(x, y, width, height, radius, contentTranslateX, contentTranslateY) {
248
- 'worklet';
249
-
250
- if (isRNRuntime()) return uiOnly();
251
- setScalarsOnUI(x, y, width, height, radius, contentTranslateX, contentTranslateY);
252
- },
253
- animateTo(target, animation) {
254
- 'worklet';
255
-
256
- if (isRNRuntime()) return uiOnly();
257
- return animateOnUI(target, animation);
258
- },
259
- cancel(animationId = 0, behavior = 'current') {
260
- 'worklet';
261
-
262
- if (isRNRuntime()) return uiOnly();
263
- return cancelOnUI(animationId, behavior);
264
- }
265
- },
266
- react: {
267
- beginInteraction() {
268
- const {
269
- requestId,
270
- promise
271
- } = createReactRequest(driverId);
272
- scheduleOnUI(() => {
273
- 'worklet';
274
-
275
- const result = beginOnUI();
276
- scheduleOnRN(resolveReactRequest, driverId, requestId, result);
277
- });
278
- return promise;
279
- },
280
- set(next) {
281
- const {
282
- requestId,
283
- promise
284
- } = createReactRequest(driverId);
285
- scheduleOnUI(() => {
286
- 'worklet';
287
-
288
- setOnUI(next);
289
- scheduleOnRN(resolveReactRequest, driverId, requestId, undefined);
290
- });
291
- return promise;
292
- },
293
- animateTo(target, animation) {
294
- const {
295
- requestId,
296
- promise
297
- } = createReactRequest(driverId, true);
298
- scheduleOnUI(() => {
299
- 'worklet';
300
-
301
- const result = animateOnUI(target, animation);
302
- scheduleOnRN(resolveReactRequest, driverId, requestId, result, true);
303
- });
304
- return promise;
305
- },
306
- cancel(animationId = 0, behavior = 'current') {
307
- const {
308
- requestId,
309
- promise
310
- } = createReactRequest(driverId, true);
311
- scheduleOnUI(() => {
312
- 'worklet';
313
-
314
- const result = cancelOnUI(animationId, behavior);
315
- scheduleOnRN(resolveReactRequest, driverId, requestId, result, true);
316
- });
317
- return promise;
318
- }
319
- }
320
- };
321
- setDriverState(driver, createDriverState(driverId, initialPresentation, presentation, callbackRef, activeAnimationId, ownership));
322
- driverRef.current = driver;
323
- }
324
- const driver = driverRef.current;
325
- useEffect(() => {
326
- const currentDriver = driverRef.current;
327
- if (!currentDriver) return undefined;
328
- const state = getDriverState(currentDriver);
329
- const {
330
- driverId
331
- } = state;
332
- // Re-attach on every effect run: StrictMode/<Activity> replay the effect
333
- // after its cleanup detached this state and destroyed the native driver.
334
- // The authoritative seed below recreates the native entry in that case.
335
- attachDriverState(state);
336
- const subscription = NativeSmoothClipModule.onClipAnimationComplete(result => {
337
- if (result.driverId !== driverId) return;
338
- synchronizeNativeCompletion(activeAnimationId, ownership, result.animationId, result.finished);
339
- completeNativeAnimation(driverId, result.animationId, result.finished);
340
- });
341
- scheduleOnUI((source, listenerId, nativeDriverId, owner, suppressed, active, stale, setter) => {
342
- 'worklet';
343
-
344
- let last = null;
345
- const deliver = next => {
346
- if (!isFiniteClipPresentation(next) || clipPresentationEquals(last, next)) {
347
- return;
348
- }
349
- // Record `last` only for values native has actually observed:
350
- // deliveries dropped during native ownership must stay eligible
351
- // for re-delivery once interactive ownership returns.
352
- if (owner.value !== INTERACTIVE) return;
353
- if (suppressed.value > 0) {
354
- suppressed.value -= 1;
355
- last = next;
356
- return;
357
- }
358
- last = next;
359
- if (stale.value !== 0) stale.value = 0;
360
- const {
361
- clip,
362
- contentTranslateX,
363
- contentTranslateY
364
- } = next;
365
- setter(nativeDriverId, clip.x, clip.y, clip.width, clip.height, clip.radius, contentTranslateX, contentTranslateY, false);
366
- };
367
- source.addListener(listenerId, deliver);
368
- // Authoritative take-ownership seed. Creates the native entry before
369
- // any view mounts on the first run, and revives a driver destroyed by
370
- // an effect-replay cleanup (StrictMode/<Activity>) on later runs.
371
- const current = source.value;
372
- if (isFiniteClipPresentation(current)) {
373
- active.value = 0;
374
- owner.value = INTERACTIVE;
375
- stale.value = 0;
376
- last = current;
377
- setter(nativeDriverId, current.clip.x, current.clip.y, current.clip.width, current.clip.height, current.clip.radius, current.contentTranslateX, current.contentTranslateY, true);
378
- }
379
- }, presentation, driverId, driverId, ownership, suppressDeliveries, activeAnimationId, scalarsStale, setPresentationHostFunction);
380
- return () => {
381
- subscription.remove();
382
- rejectDriverRequests(driverId);
383
- detachDriverState(state);
384
- scheduleOnUI((source, listenerId, nativeDriverId, destroy) => {
385
- 'worklet';
386
-
387
- source.removeListener(listenerId);
388
- destroy(nativeDriverId);
389
- }, presentation, driverId, driverId, destroyDriverHostFunction);
390
- };
391
- }, [activeAnimationId, ownership, presentation, scalarsStale, suppressDeliveries]);
392
- return driver;
393
- }
3
+ // Platform re-export only — the implementation is shared with Android.
4
+ // Edit drivers.native.ts, not this file.
5
+ export { useSmoothClipDriver } from "./drivers.native.js";
394
6
  //# sourceMappingURL=drivers.ios.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["useEffect","useRef","useSharedValue","isRNRuntime","scheduleOnRN","scheduleOnUI","NativeSmoothClipModule","allocateDriverId","attachDriverState","createDriverState","detachDriverState","getDriverState","setDriverState","completeNativeAnimation","synchronizeNativeCompletion","clipPresentationEquals","createClipPresentation","isFiniteClipPresentation","createReactRequest","rejectDriverRequests","resolveReactRequest","INTERACTIVE","NATIVE","setPresentationHostFunction","setClipPresentation","beginInteractionHostFunction","beginInteraction","animateTimingHostFunction","animateTiming","animateSpringHostFunction","animateSpring","animateKeyframesHostFunction","animateKeyframes","rejectAnimationHostFunction","rejectAnimation","cancelAnimationHostFunction","cancelAnimation","destroyDriverHostFunction","destroyDriver","resolver","globalThis","__smoothClipPinnedResolver","reduceMotionCode","value","animationIsFinite","target","animation","from","undefined","type","Number","isFinite","duration","controlPoints","every","mass","stiffness","damping","initialVelocity","frames","length","previousOffset","frame","offset","presentation","presentationFromNative","values","fallback","clip","x","y","width","height","radius","contentTranslateX","contentTranslateY","flattenedKeyframes","push","uiOnly","Error","useSmoothClipDriver","initialValue","options","initialPresentation","ownership","suppressDeliveries","activeAnimationId","scalarsStale","callbackRef","onAnimationComplete","driverRef","current","driverId","reduceMotion","seedPresentation","next","beginOnUI","setOnUI","setScalarsOnUI","animateOnUI","scalarsWereStale","hasInteractiveStart","start","startClip","targetClip","animationId","x1","y1","x2","y2","Math","max","inheritVelocity","cancelOnUI","behavior","driver","kind","ui","set","setScalars","animateTo","cancel","react","requestId","promise","result","currentDriver","state","subscription","onClipAnimationComplete","finished","source","listenerId","nativeDriverId","owner","suppressed","active","stale","setter","last","deliver","addListener","remove","destroy","removeListener"],"sourceRoot":"../../src","sources":["drivers.ios.ts"],"mappings":";;AAAA,SAASA,SAAS,EAAEC,MAAM,QAAQ,OAAO;AACzC,SAASC,cAAc,QAA0B,yBAAyB;AAC1E,SAASC,WAAW,EAAEC,YAAY,EAAEC,YAAY,QAAQ,uBAAuB;AAC/E,OAAOC,sBAAsB,MAAM,oBAAoB;AAUvD,SACEC,gBAAgB,EAChBC,iBAAiB,EACjBC,iBAAiB,EACjBC,iBAAiB,EACjBC,cAAc,EACdC,cAAc,QACT,kBAAe;AACtB,SACEC,uBAAuB,EACvBC,2BAA2B,QACtB,uBAAoB;AAC3B,SACEC,sBAAsB,EACtBC,sBAAsB,EACtBC,wBAAwB,QAGnB,eAAY;AACnB,SACEC,kBAAkB,EAClBC,oBAAoB,EACpBC,mBAAmB,QACd,oBAAiB;AAExB,MAAMC,WAAW,GAAG,CAAC;AACrB,MAAMC,MAAM,GAAG,CAAC;AAEhB,MAAMC,2BAA2B,GAAGjB,sBAAsB,CAACkB,mBAAmB;AAC9E,MAAMC,4BAA4B,GAAGnB,sBAAsB,CAACoB,gBAAgB;AAC5E,MAAMC,yBAAyB,GAAGrB,sBAAsB,CAACsB,aAAa;AACtE,MAAMC,yBAAyB,GAAGvB,sBAAsB,CAACwB,aAAa;AACtE,MAAMC,4BAA4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cAAc,CAAC;MACzB,CAAC,EACDrE,YAAY,EACZ4B,QAAQ,EACRA,QAAQ,EACRvD,yBACF,CAAC;IACH,CAAC;EACH,CAAC,EAAE,CACDiD,iBAAiB,EACjBF,SAAS,EACTpB,YAAY,EACZuB,YAAY,EACZF,kBAAkB,CACnB,CAAC;EAEF,OAAO8B,MAAM;AACf","ignoreList":[]}
1
+ {"version":3,"names":["useSmoothClipDriver"],"sourceRoot":"../../src","sources":["drivers.ios.ts"],"mappings":";;AAAA;AACA;AACA,SAASA,mBAAmB,QAAQ,qBAAkB","ignoreList":[]}