react-native-reanimated 4.4.0 → 4.4.2
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/Common/cpp/reanimated/CSS/interpolation/transforms/TransformOperationInterpolator.cpp +12 -5
- package/Common/cpp/reanimated/CSS/misc/ViewStylesRepository.cpp +63 -36
- package/Common/cpp/reanimated/CSS/misc/ViewStylesRepository.h +6 -8
- package/Common/cpp/reanimated/CSS/svg/values/SVGStrokeDashArray.cpp +5 -0
- package/Common/cpp/reanimated/Fabric/ReanimatedMountHook.cpp +25 -12
- package/Common/cpp/reanimated/Fabric/ReanimatedMountHook.h +3 -0
- package/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxyCommon.cpp +6 -2
- package/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxyCommon.h +44 -1
- package/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxy_Experimental.cpp +125 -43
- package/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxy_Legacy.cpp +189 -102
- package/Common/cpp/reanimated/LayoutAnimations/SharedTransitions.cpp +8 -3
- package/Common/cpp/reanimated/NativeModules/ReanimatedModuleProxy.cpp +4 -16
- package/Common/cpp/reanimated/NativeModules/ReanimatedModuleProxy.h +0 -16
- package/android/CMakeLists.txt +6 -0
- package/android/build.gradle.kts +12 -1
- package/android/src/main/java/com/swmansion/reanimated/NativeProxy.kt +46 -2
- package/android/src/main/java/com/swmansion/reanimated/keyboard/KeyboardAnimationCallback.kt +8 -1
- package/apple/reanimated/apple/ReanimatedModule.mm +12 -1
- package/compatibility.json +1 -1
- package/lib/module/common/constants/platform.js +4 -4
- package/lib/module/common/constants/platform.js.map +1 -1
- package/lib/module/core.js +27 -5
- package/lib/module/core.js.map +1 -1
- package/lib/module/createAnimatedComponent/getViewInfo.js +3 -1
- package/lib/module/createAnimatedComponent/getViewInfo.js.map +1 -1
- package/lib/module/css/component/AnimatedComponent.js +0 -2
- package/lib/module/css/component/AnimatedComponent.js.map +1 -1
- package/lib/module/css/native/managers/CSSManager.js +5 -5
- package/lib/module/css/native/managers/CSSManager.js.map +1 -1
- package/lib/module/css/native/managers/CSSTransitionsManager.js +8 -1
- package/lib/module/css/native/managers/CSSTransitionsManager.js.map +1 -1
- package/lib/module/css/svg/native/processors/stroke.js +9 -5
- package/lib/module/css/svg/native/processors/stroke.js.map +1 -1
- package/lib/module/layoutReanimation/animationBuilder/ComplexAnimationBuilder.js +6 -3
- package/lib/module/layoutReanimation/animationBuilder/ComplexAnimationBuilder.js.map +1 -1
- package/lib/module/layoutReanimation/animationsManager.js +31 -6
- package/lib/module/layoutReanimation/animationsManager.js.map +1 -1
- package/lib/module/mappers.js +1 -1
- package/lib/module/mappers.js.map +1 -1
- package/lib/module/platform-specific/findHostInstance.js +8 -5
- package/lib/module/platform-specific/findHostInstance.js.map +1 -1
- package/lib/module/platform-specific/jsVersion.js +1 -1
- package/lib/module/updateProps/updateProps.js +3 -2
- package/lib/module/updateProps/updateProps.js.map +1 -1
- package/lib/module/valueSetter.js +6 -7
- package/lib/module/valueSetter.js.map +1 -1
- package/lib/typescript/common/constants/platform.d.ts.map +1 -1
- package/lib/typescript/core.d.ts.map +1 -1
- package/lib/typescript/createAnimatedComponent/commonTypes.d.ts +0 -1
- package/lib/typescript/createAnimatedComponent/commonTypes.d.ts.map +1 -1
- package/lib/typescript/createAnimatedComponent/getViewInfo.d.ts.map +1 -1
- package/lib/typescript/css/component/AnimatedComponent.d.ts +0 -1
- package/lib/typescript/css/component/AnimatedComponent.d.ts.map +1 -1
- package/lib/typescript/css/native/managers/CSSTransitionsManager.d.ts +5 -1
- package/lib/typescript/css/native/managers/CSSTransitionsManager.d.ts.map +1 -1
- package/lib/typescript/css/svg/native/processors/stroke.d.ts.map +1 -1
- package/lib/typescript/layoutReanimation/animationBuilder/ComplexAnimationBuilder.d.ts +17 -14
- package/lib/typescript/layoutReanimation/animationBuilder/ComplexAnimationBuilder.d.ts.map +1 -1
- package/lib/typescript/layoutReanimation/animationsManager.d.ts.map +1 -1
- package/lib/typescript/platform-specific/findHostInstance.d.ts.map +1 -1
- package/lib/typescript/platform-specific/jsVersion.d.ts +1 -1
- package/lib/typescript/platform-specific/types.d.ts +1 -0
- package/lib/typescript/platform-specific/types.d.ts.map +1 -1
- package/lib/typescript/updateProps/updateProps.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/common/constants/platform.ts +4 -4
- package/src/core.ts +27 -5
- package/src/createAnimatedComponent/commonTypes.ts +0 -1
- package/src/createAnimatedComponent/getViewInfo.ts +3 -1
- package/src/css/component/AnimatedComponent.tsx +0 -2
- package/src/css/native/managers/CSSManager.ts +8 -8
- package/src/css/native/managers/CSSTransitionsManager.ts +9 -2
- package/src/css/svg/native/processors/stroke.ts +9 -6
- package/src/layoutReanimation/animationBuilder/ComplexAnimationBuilder.ts +39 -36
- package/src/layoutReanimation/animationsManager.ts +33 -5
- package/src/mappers.ts +1 -1
- package/src/platform-specific/findHostInstance.ts +7 -7
- package/src/platform-specific/jsVersion.ts +1 -1
- package/src/platform-specific/types.ts +2 -0
- package/src/updateProps/updateProps.ts +3 -2
- package/src/valueSetter.ts +7 -7
|
@@ -322,9 +322,9 @@ void ReanimatedModuleProxy::init(const PlatformDepMethodsHolder &platformDepMeth
|
|
|
322
322
|
if (!surfaceId) {
|
|
323
323
|
return;
|
|
324
324
|
}
|
|
325
|
+
// The flush set is drained by `executeLayoutAnimationsRequests`, driven
|
|
326
|
+
// by `runGrandCallback` (backend) or a JS `requestAnimationFrameFinalizer` (non-backend).
|
|
325
327
|
strongThis->layoutAnimationFlushRequests_.insert(*surfaceId);
|
|
326
|
-
|
|
327
|
-
strongThis->requestRenderForLayoutAnimations();
|
|
328
328
|
};
|
|
329
329
|
|
|
330
330
|
EndLayoutAnimationFunction endLayoutAnimation = [weakThis = weak_from_this()](int tag, bool shouldRemove) {
|
|
@@ -335,14 +335,6 @@ void ReanimatedModuleProxy::init(const PlatformDepMethodsHolder &platformDepMeth
|
|
|
335
335
|
}
|
|
336
336
|
|
|
337
337
|
auto surfaceId = strongThis->layoutAnimationsProxy_->endLayoutAnimation(tag, shouldRemove);
|
|
338
|
-
|
|
339
|
-
if constexpr (StaticFeatureFlags::getFlag("USE_ANIMATION_BACKEND")) {
|
|
340
|
-
// in the backend path this is called from runGrandCallback,
|
|
341
|
-
// we are guaranteed to have the changes flushed
|
|
342
|
-
} else {
|
|
343
|
-
strongThis->requestRenderForLayoutAnimations();
|
|
344
|
-
}
|
|
345
|
-
|
|
346
338
|
if (!surfaceId) {
|
|
347
339
|
return;
|
|
348
340
|
}
|
|
@@ -808,11 +800,6 @@ void ReanimatedModuleProxy::performOperations() {
|
|
|
808
800
|
}
|
|
809
801
|
|
|
810
802
|
commitUpdates(uiRuntime, updatesBatch);
|
|
811
|
-
|
|
812
|
-
// Clear the entire cache after the commit
|
|
813
|
-
// (we don't know if the view is updated from outside of Reanimated
|
|
814
|
-
// so we have to clear the entire cache)
|
|
815
|
-
viewStylesRepository_->clearNodesCache();
|
|
816
803
|
}
|
|
817
804
|
|
|
818
805
|
void ReanimatedModuleProxy::performNonLayoutOperations() {
|
|
@@ -1206,7 +1193,8 @@ void ReanimatedModuleProxy::initializeFabric(const std::shared_ptr<UIManager> &u
|
|
|
1206
1193
|
// TODO: we don't use the mount hook here, but we still need a way to handleNodeRemovals
|
|
1207
1194
|
// for now we leave this to leak the memory, a fix will come in a follow-up
|
|
1208
1195
|
} else {
|
|
1209
|
-
mountHook_ =
|
|
1196
|
+
mountHook_ =
|
|
1197
|
+
std::make_shared<ReanimatedMountHook>(uiManager_, updatesRegistryManager_, viewStylesRepository_, request);
|
|
1210
1198
|
}
|
|
1211
1199
|
|
|
1212
1200
|
commitHook_ = std::make_shared<ReanimatedCommitHook>(uiManager_, updatesRegistryManager_, layoutAnimationsProxy_);
|
|
@@ -201,20 +201,6 @@ class ReanimatedModuleProxy : public std::enable_shared_from_this<ReanimatedModu
|
|
|
201
201
|
void commitUpdates(jsi::Runtime &rt, const UpdatesBatch &updatesBatch);
|
|
202
202
|
void applySynchronousUpdates(UpdatesBatch &updatesBatch, bool allowPartialUpdates);
|
|
203
203
|
|
|
204
|
-
/** Use only on the UI thread. */
|
|
205
|
-
void requestRenderForLayoutAnimations() {
|
|
206
|
-
if (layoutAnimationRenderRequested_) [[likely]] {
|
|
207
|
-
return;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
layoutAnimationRenderRequested_ = true;
|
|
211
|
-
requestRender_([weakThis = weak_from_this()](double) {
|
|
212
|
-
if (auto strongThis = weakThis.lock()) {
|
|
213
|
-
strongThis->layoutAnimationRenderRequested_ = false;
|
|
214
|
-
}
|
|
215
|
-
});
|
|
216
|
-
}
|
|
217
|
-
|
|
218
204
|
#if REACT_NATIVE_VERSION_MINOR >= 85
|
|
219
205
|
std::shared_ptr<UIManagerAnimationBackend> getAnimationBackend();
|
|
220
206
|
AnimationMutations runGrandCallback(AnimationTimestamp timestamp, GrandCallbackSource source);
|
|
@@ -279,8 +265,6 @@ class ReanimatedModuleProxy : public std::enable_shared_from_this<ReanimatedModu
|
|
|
279
265
|
std::shared_ptr<ReanimatedMountHook> mountHook_;
|
|
280
266
|
/// Access only on UI thread.
|
|
281
267
|
std::set<SurfaceId> layoutAnimationFlushRequests_;
|
|
282
|
-
/// Access only on UI thread.
|
|
283
|
-
bool layoutAnimationRenderRequested_;
|
|
284
268
|
|
|
285
269
|
const KeyboardEventSubscribeFunction subscribeForKeyboardEventsFunction_;
|
|
286
270
|
const KeyboardEventUnsubscribeFunction unsubscribeFromKeyboardEventsFunction_;
|
package/android/CMakeLists.txt
CHANGED
|
@@ -49,6 +49,12 @@ add_library(reanimated SHARED ${REANIMATED_COMMON_CPP_SOURCES}
|
|
|
49
49
|
target_precompile_headers(reanimated PRIVATE
|
|
50
50
|
"${ANDROID_CPP_DIR}/ReanimatedPCH.h")
|
|
51
51
|
|
|
52
|
+
# Stop Clang from embedding a build timestamp in the .pch. Without this the PCH
|
|
53
|
+
# is non-reproducible across builds, so ccache can't reuse it and translation
|
|
54
|
+
# units reject a restored PCH as "modified since built".
|
|
55
|
+
target_compile_options(reanimated PRIVATE
|
|
56
|
+
"$<$<COMPILE_LANGUAGE:CXX>:-Xclang;-fno-pch-timestamp>")
|
|
57
|
+
|
|
52
58
|
if(ReactAndroid_VERSION_MINOR GREATER_EQUAL 80)
|
|
53
59
|
include(
|
|
54
60
|
"${REACT_NATIVE_DIR}/ReactCommon/cmake-utils/react-native-flags.cmake")
|
package/android/build.gradle.kts
CHANGED
|
@@ -109,6 +109,12 @@ if (project != rootProject) {
|
|
|
109
109
|
val packageDir: File = project.projectDir.parentFile
|
|
110
110
|
val reactNativeRootDir: File = resolveReactNativeDirectory()
|
|
111
111
|
val REACT_NATIVE_VERSION: String = getReactNativeVersion()
|
|
112
|
+
val IS_REACT_NATIVE_86_OR_NEWER: Boolean = run {
|
|
113
|
+
val parts = REACT_NATIVE_VERSION.split(".")
|
|
114
|
+
val major = parts.getOrNull(0)?.toIntOrNull() ?: 0
|
|
115
|
+
val minor = parts.getOrNull(1)?.toIntOrNull() ?: 0
|
|
116
|
+
major > 0 || minor >= 86
|
|
117
|
+
}
|
|
112
118
|
val REANIMATED_VERSION: String = getReanimatedVersion()
|
|
113
119
|
val IS_REANIMATED_EXAMPLE_APP: Boolean = safeAppExtGet("isReanimatedExampleApp", false)?.toString()?.toBoolean() ?: false
|
|
114
120
|
val REANIMATED_PROFILING: Boolean = safeAppExtGet("enableReanimatedProfiling", false)?.toString()?.toBoolean() ?: false
|
|
@@ -121,7 +127,11 @@ val reanimatedPrefabHeadersDir: File = project.file("${layout.buildDirectory.get
|
|
|
121
127
|
|
|
122
128
|
fun reactNativeArchitectures(): List<String> {
|
|
123
129
|
val value = project.findProperty("reactNativeArchitectures") as String?
|
|
124
|
-
return value?.split(",")
|
|
130
|
+
return value?.split(",")
|
|
131
|
+
?.map { it.trim() }
|
|
132
|
+
?.filter { it.isNotEmpty() }
|
|
133
|
+
?.ifEmpty { null }
|
|
134
|
+
?: listOf("armeabi-v7a", "x86", "x86_64", "arm64-v8a")
|
|
125
135
|
}
|
|
126
136
|
|
|
127
137
|
if (project == rootProject) {
|
|
@@ -168,6 +178,7 @@ android {
|
|
|
168
178
|
buildConfigField("String", "REANIMATED_VERSION_JAVA", "\"$REANIMATED_VERSION\"")
|
|
169
179
|
buildConfigField("boolean", "IS_INTERNAL_BUILD", "false")
|
|
170
180
|
buildConfigField("int", "EXOPACKAGE_FLAGS", "0")
|
|
181
|
+
buildConfigField("boolean", "IS_REACT_NATIVE_86_OR_NEWER", IS_REACT_NATIVE_86_OR_NEWER.toString())
|
|
171
182
|
|
|
172
183
|
@Suppress("UnstableApiUsage")
|
|
173
184
|
externalNativeBuild {
|
|
@@ -3,6 +3,7 @@ package com.swmansion.reanimated
|
|
|
3
3
|
import android.content.ContentResolver
|
|
4
4
|
import android.os.SystemClock
|
|
5
5
|
import android.provider.Settings
|
|
6
|
+
import android.util.Log
|
|
6
7
|
import com.facebook.jni.HybridData
|
|
7
8
|
import com.facebook.proguard.annotations.DoNotStrip
|
|
8
9
|
import com.facebook.react.bridge.NativeModule
|
|
@@ -11,6 +12,7 @@ import com.facebook.react.bridge.UiThreadUtil
|
|
|
11
12
|
import com.facebook.react.common.annotations.FrameworkAPI
|
|
12
13
|
import com.facebook.react.fabric.FabricUIManager
|
|
13
14
|
import com.facebook.react.turbomodule.core.CallInvokerHolderImpl
|
|
15
|
+
import com.facebook.react.uimanager.IllegalViewOperationException
|
|
14
16
|
import com.facebook.react.uimanager.UIManagerHelper
|
|
15
17
|
import com.facebook.react.uimanager.common.UIManagerType
|
|
16
18
|
import com.facebook.soloader.SoLoader
|
|
@@ -201,7 +203,19 @@ open class NativeProxy {
|
|
|
201
203
|
}
|
|
202
204
|
|
|
203
205
|
for (i in tags.indices) {
|
|
204
|
-
|
|
206
|
+
try {
|
|
207
|
+
if (mFabricUIManager.resolveView(tags[i]) == null) {
|
|
208
|
+
tags[i] = -1
|
|
209
|
+
}
|
|
210
|
+
} catch (e: IllegalViewOperationException) {
|
|
211
|
+
// `resolveView` is expected to return `null` for a tag without a
|
|
212
|
+
// mounted view, but it instead throws when the tag's `ViewState` is
|
|
213
|
+
// already registered while the Android view hasn't been created yet.
|
|
214
|
+
// This happens when a view is mid-preallocation and a third-party view
|
|
215
|
+
// manager (e.g. lottie-react-native) dispatches an event synchronously
|
|
216
|
+
// from within `createView`, re-entering this code path. Treat it the
|
|
217
|
+
// same as a missing view.
|
|
218
|
+
// See https://github.com/software-mansion/react-native-reanimated/issues/9636.
|
|
205
219
|
tags[i] = -1
|
|
206
220
|
}
|
|
207
221
|
}
|
|
@@ -209,13 +223,43 @@ open class NativeProxy {
|
|
|
209
223
|
return true
|
|
210
224
|
}
|
|
211
225
|
|
|
226
|
+
// TODO(#9681): Temporary workaround for RN >= 0.86. Since RN 0.86,
|
|
227
|
+
// overrideBySynchronousMountPropsAtMountingAndroid defaults on, so RN's only public
|
|
228
|
+
// synchronous-update API (synchronouslyUpdateViewOnUIThread) seeds the tagToSynchronousMountProps
|
|
229
|
+
// cache that then clamps later commits and freezes animations. On RN >= 0.86 we instead call
|
|
230
|
+
// MountingManager.updatePropsSynchronously directly (apply without cache seeding) via reflection, since
|
|
231
|
+
// MountingManager is internal. On older RN the flag is off, so we keep the original RN path
|
|
232
|
+
// unchanged (gated by BuildConfig.IS_REACT_NATIVE_86_OR_NEWER, derived from the RN version at
|
|
233
|
+
// build time). Remove once RN exposes a non-seeding synchronous-update API.
|
|
234
|
+
private val mountingManager: Any by lazy {
|
|
235
|
+
FabricUIManager::class.java.getDeclaredField("mMountingManager").run {
|
|
236
|
+
isAccessible = true
|
|
237
|
+
get(mFabricUIManager)
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
private val updatePropsSynchronouslyMethod by lazy {
|
|
242
|
+
mountingManager.javaClass.methods
|
|
243
|
+
.first {
|
|
244
|
+
it.name.startsWith("updatePropsSynchronously") && it.parameterTypes.size == 2
|
|
245
|
+
}.apply { isAccessible = true }
|
|
246
|
+
}
|
|
247
|
+
|
|
212
248
|
@DoNotStrip
|
|
213
249
|
fun synchronouslyUpdateUIProps(
|
|
214
250
|
intBuffer: IntArray,
|
|
215
251
|
doubleBuffer: DoubleArray,
|
|
216
252
|
) {
|
|
217
253
|
SynchronousPropsBufferParser.parse(intBuffer, doubleBuffer) { viewTag, props ->
|
|
218
|
-
|
|
254
|
+
if (BuildConfig.IS_REACT_NATIVE_86_OR_NEWER) {
|
|
255
|
+
try {
|
|
256
|
+
updatePropsSynchronouslyMethod.invoke(mountingManager, viewTag, props)
|
|
257
|
+
} catch (e: Exception) {
|
|
258
|
+
Log.w("Reanimated", "synchronouslyUpdateUIProps failed for tag $viewTag", e)
|
|
259
|
+
}
|
|
260
|
+
} else {
|
|
261
|
+
mFabricUIManager.synchronouslyUpdateViewOnUIThread(viewTag, props)
|
|
262
|
+
}
|
|
219
263
|
}
|
|
220
264
|
}
|
|
221
265
|
|
package/android/src/main/java/com/swmansion/reanimated/keyboard/KeyboardAnimationCallback.kt
CHANGED
|
@@ -12,6 +12,8 @@ class KeyboardAnimationCallback(
|
|
|
12
12
|
private val CONTENT_TYPE_MASK = WindowInsetsCompat.Type.ime()
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
private var mPendingStartDispatch = false
|
|
16
|
+
|
|
15
17
|
override fun onStart(
|
|
16
18
|
animation: WindowInsetsAnimationCompat,
|
|
17
19
|
bounds: WindowInsetsAnimationCompat.BoundsCompat,
|
|
@@ -20,7 +22,7 @@ class KeyboardAnimationCallback(
|
|
|
20
22
|
return bounds
|
|
21
23
|
}
|
|
22
24
|
mKeyboard.onAnimationStart()
|
|
23
|
-
|
|
25
|
+
mPendingStartDispatch = true
|
|
24
26
|
return super.onStart(animation, bounds)
|
|
25
27
|
}
|
|
26
28
|
|
|
@@ -36,6 +38,7 @@ class KeyboardAnimationCallback(
|
|
|
36
38
|
}
|
|
37
39
|
}
|
|
38
40
|
if (isAnyKeyboardAnimationRunning) {
|
|
41
|
+
mPendingStartDispatch = false
|
|
39
42
|
mKeyboard.updateHeight(insets, mIsNavigationBarTranslucent)
|
|
40
43
|
mNotifyAboutKeyboardChange.call()
|
|
41
44
|
}
|
|
@@ -44,6 +47,10 @@ class KeyboardAnimationCallback(
|
|
|
44
47
|
|
|
45
48
|
override fun onEnd(animation: WindowInsetsAnimationCompat) {
|
|
46
49
|
if (isKeyboardAnimation(animation)) {
|
|
50
|
+
if (mPendingStartDispatch) {
|
|
51
|
+
mNotifyAboutKeyboardChange.call()
|
|
52
|
+
}
|
|
53
|
+
mPendingStartDispatch = false
|
|
47
54
|
mKeyboard.onAnimationEnd()
|
|
48
55
|
mNotifyAboutKeyboardChange.call()
|
|
49
56
|
}
|
|
@@ -163,7 +163,18 @@ RCT_EXPORT_MODULE(ReanimatedModule);
|
|
|
163
163
|
- (BOOL)hasReactNativeFailedReload
|
|
164
164
|
{
|
|
165
165
|
id workletsModule = [_moduleRegistry moduleForName:"WorkletsModule"];
|
|
166
|
-
|
|
166
|
+
if (![_moduleRegistry moduleIsInitialized:[workletsModule class]]) {
|
|
167
|
+
return YES;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
// On a double reload React Native can momentarily leave the surface presenter without
|
|
171
|
+
// a scheduler. This is another manifestation of the same non-fatal reload race, so we
|
|
172
|
+
// bail on it here instead of asserting on a nil scheduler later in installTurboModule.
|
|
173
|
+
if ([_surfacePresenter scheduler] == nil) {
|
|
174
|
+
return YES;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
return NO;
|
|
167
178
|
}
|
|
168
179
|
|
|
169
180
|
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(installTurboModule)
|
package/compatibility.json
CHANGED
|
@@ -8,12 +8,12 @@ function isWindowAvailable() {
|
|
|
8
8
|
// @ts-ignore Fallback if `window` is undefined.
|
|
9
9
|
return typeof window !== 'undefined';
|
|
10
10
|
}
|
|
11
|
-
export const IS_ANDROID = /* @__PURE__ */(() => Platform
|
|
12
|
-
export const IS_IOS = /* @__PURE__ */(() => Platform
|
|
13
|
-
export const IS_WEB = Platform
|
|
11
|
+
export const IS_ANDROID = /* @__PURE__ */(() => Platform?.OS === 'android')();
|
|
12
|
+
export const IS_IOS = /* @__PURE__ */(() => Platform?.OS === 'ios')();
|
|
13
|
+
export const IS_WEB = Platform?.OS === 'web';
|
|
14
14
|
export const IS_JEST = !!process.env.JEST_WORKER_ID;
|
|
15
15
|
/** @knipIgnore */
|
|
16
|
-
export const IS_WINDOWS = Platform
|
|
16
|
+
export const IS_WINDOWS = Platform?.OS === 'windows';
|
|
17
17
|
export const IS_WINDOW_AVAILABLE = isWindowAvailable();
|
|
18
18
|
export const SHOULD_BE_USE_WEB = IS_JEST || IS_WEB || IS_WINDOWS;
|
|
19
19
|
//# sourceMappingURL=platform.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Platform","isWindowAvailable","window","IS_ANDROID","OS","IS_IOS","IS_WEB","IS_JEST","process","env","JEST_WORKER_ID","IS_WINDOWS","IS_WINDOW_AVAILABLE","SHOULD_BE_USE_WEB"],"sourceRoot":"../../../../src","sources":["common/constants/platform.ts"],"mappings":"AAAA,YAAY;;AACZ,SAASA,QAAQ,QAAQ,cAAc;AAEvC,SAASC,iBAAiBA,CAAA,EAAG;EAC3B;EACA;EACA;EACA;EACA,OAAO,OAAOC,MAAM,KAAK,WAAW;AACtC;AAEA,OAAO,MAAMC,UAAmB,GAAG,eAAgB,CAAC,MAClDH,QAAQ,
|
|
1
|
+
{"version":3,"names":["Platform","isWindowAvailable","window","IS_ANDROID","OS","IS_IOS","IS_WEB","IS_JEST","process","env","JEST_WORKER_ID","IS_WINDOWS","IS_WINDOW_AVAILABLE","SHOULD_BE_USE_WEB"],"sourceRoot":"../../../../src","sources":["common/constants/platform.ts"],"mappings":"AAAA,YAAY;;AACZ,SAASA,QAAQ,QAAQ,cAAc;AAEvC,SAASC,iBAAiBA,CAAA,EAAG;EAC3B;EACA;EACA;EACA;EACA,OAAO,OAAOC,MAAM,KAAK,WAAW;AACtC;AAEA,OAAO,MAAMC,UAAmB,GAAG,eAAgB,CAAC,MAClDH,QAAQ,EAAEI,EAAE,KAAK,SAAS,EAAE,CAAC;AAC/B,OAAO,MAAMC,MAAe,GAAG,eAAgB,CAAC,MAAML,QAAQ,EAAEI,EAAE,KAAK,KAAK,EAAE,CAAC;AAC/E,OAAO,MAAME,MAAe,GAAGN,QAAQ,EAAEI,EAAE,KAAK,KAAK;AACrD,OAAO,MAAMG,OAAgB,GAAG,CAAC,CAACC,OAAO,CAACC,GAAG,CAACC,cAAc;AAC5D;AACA,OAAO,MAAMC,UAAmB,GAAGX,QAAQ,EAAEI,EAAE,KAAK,SAAS;AAE7D,OAAO,MAAMQ,mBAA4B,GAAGX,iBAAiB,CAAC,CAAC;AAE/D,OAAO,MAAMY,iBAAiB,GAAGN,OAAO,IAAID,MAAM,IAAIK,UAAU","ignoreList":[]}
|
package/lib/module/core.js
CHANGED
|
@@ -45,10 +45,10 @@ export function getViewProp(viewTag, propName, component) {
|
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
47
|
function getSensorContainer() {
|
|
48
|
-
if (!
|
|
49
|
-
|
|
48
|
+
if (!globalThis.__sensorContainer) {
|
|
49
|
+
globalThis.__sensorContainer = new SensorContainer();
|
|
50
50
|
}
|
|
51
|
-
return
|
|
51
|
+
return globalThis.__sensorContainer;
|
|
52
52
|
}
|
|
53
53
|
export function registerEventHandler(eventHandler, eventName, emitterReactTag = -1) {
|
|
54
54
|
function handleEvent(_eventTimestamp, event) {
|
|
@@ -56,7 +56,18 @@ export function registerEventHandler(eventHandler, eventName, emitterReactTag =
|
|
|
56
56
|
|
|
57
57
|
eventHandler(event);
|
|
58
58
|
// We call mappers here to make sure view updates can be applied in the same frame after an event.
|
|
59
|
-
|
|
59
|
+
if (globalThis.__mapperRun) {
|
|
60
|
+
globalThis.__mapperRun();
|
|
61
|
+
} else {
|
|
62
|
+
function runMappers() {
|
|
63
|
+
if (globalThis.__mapperRun) {
|
|
64
|
+
globalThis.__mapperRun();
|
|
65
|
+
} else {
|
|
66
|
+
requestAnimationFrame(runMappers);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
requestAnimationFrame(runMappers);
|
|
70
|
+
}
|
|
60
71
|
}
|
|
61
72
|
return ReanimatedModule.registerEventHandler(createSerializable(handleEvent), eventName, emitterReactTag);
|
|
62
73
|
}
|
|
@@ -71,7 +82,18 @@ export function subscribeForKeyboardEvents(eventHandler, options) {
|
|
|
71
82
|
|
|
72
83
|
eventHandler(state, height);
|
|
73
84
|
// We call mappers here to make sure view updates can be applied in the same frame after an event.
|
|
74
|
-
|
|
85
|
+
if (globalThis.__mapperRun) {
|
|
86
|
+
globalThis.__mapperRun();
|
|
87
|
+
} else {
|
|
88
|
+
function runMappers() {
|
|
89
|
+
if (globalThis.__mapperRun) {
|
|
90
|
+
globalThis.__mapperRun();
|
|
91
|
+
} else {
|
|
92
|
+
requestAnimationFrame(runMappers);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
requestAnimationFrame(runMappers);
|
|
96
|
+
}
|
|
75
97
|
}
|
|
76
98
|
if (__DEV__) {
|
|
77
99
|
controlEdgeToEdgeValues({
|
package/lib/module/core.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["controlEdgeToEdgeValues","isEdgeToEdge","createSerializable","logger","ReanimatedModule","SensorContainer","startMapper","stopMapper","makeMutable","EDGE_TO_EDGE","isReanimated3","warn","isConfigured","getViewProp","viewTag","propName","component","Error","Promise","resolve","reject","result","slice","getSensorContainer","
|
|
1
|
+
{"version":3,"names":["controlEdgeToEdgeValues","isEdgeToEdge","createSerializable","logger","ReanimatedModule","SensorContainer","startMapper","stopMapper","makeMutable","EDGE_TO_EDGE","isReanimated3","warn","isConfigured","getViewProp","viewTag","propName","component","Error","Promise","resolve","reject","result","slice","getSensorContainer","globalThis","__sensorContainer","registerEventHandler","eventHandler","eventName","emitterReactTag","handleEvent","_eventTimestamp","event","__mapperRun","runMappers","requestAnimationFrame","unregisterEventHandler","id","subscribeForKeyboardEvents","options","state","height","__DEV__","isStatusBarTranslucentAndroid","isNavigationBarTranslucentAndroid","unsubscribeFromKeyboardEvents","listenerId","registerSensor","sensorType","config","sensorContainer","initializeSensor","unregisterSensor","sensorId","enableLayoutAnimations","_flag","_isCallByUser","configureLayoutAnimationBatch","layoutAnimationsBatch","setShouldAnimateExitingForTag","shouldAnimate"],"sourceRoot":"../../src","sources":["core.ts"],"mappings":"AAAA,YAAY;;AACZ,SACEA,uBAAuB,EACvBC,YAAY,QACP,8BAA8B;AAErC,SAASC,kBAAkB,QAAQ,uBAAuB;AAE1D,SAASC,MAAM,QAAQ,mBAAU;AAWjC,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,eAAe,QAAQ,sBAAmB;AAEnD,SAASC,WAAW,EAAEC,UAAU,QAAQ,cAAW;AACnD,SAASC,WAAW,QAAQ,eAAY;AAExC,MAAMC,YAAY,GAAG,eAAgBR,YAAY,CAAC,CAAC;;AAEnD;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMS,aAAa,GAAGA,CAAA,KAAM;EACjCP,MAAM,CAACQ,IAAI,CACT,2GACF,CAAC;EACD,OAAO,KAAK;AACd,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,YAAY,GAAGF,aAAa;AAEzC,OAAO,SAASG,WAAWA,CACzBC,OAAe,EACfC,QAAgB,EAChBC,SAAuC,EAC3B;EACZ,IAAI,CAACA,SAAS,EAAE;IACd,MAAM,IAAIC,KAAK,CACb,iGACF,CAAC;EACH;;EAEA;EACA,OAAO,IAAIC,OAAO,CAAC,CAACC,OAAO,EAAEC,MAAM,KAAK;IACtC,OAAOhB,gBAAgB,CAACS,WAAW,CACjCC,OAAO,EACPC,QAAQ,EACRC,SAAS,EACRK,MA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C;EAC5C,OAAO2B,eAAe,CAACC,gBAAgB,CAACH,UAAU,EAAEC,MAAM,CAAC;AAC7D;AAEA,OAAO,SAASG,gBAAgBA,CAACC,QAAgB,EAAQ;EACvD,MAAMH,eAAe,GAAG3B,kBAAkB,CAAC,CAAC;EAC5C,OAAO2B,eAAe,CAACE,gBAAgB,CAACC,QAAQ,CAAC;AACnD;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASC,sBAAsBA,CACpCC,KAAc,EACdC,aAAa,GAAG,IAAI,EACd;EACNrD,MAAM,CAACQ,IAAI,CACT,2EACF,CAAC;AACH;AAEA,OAAO,SAAS8C,6BAA6BA,CAC3CC,qBAAiD,EAC3C;EACNtD,gBAAgB,CAACqD,6BAA6B,CAACC,qBAAqB,CAAC;AACvE;AAEA,OAAO,SAASC,6BAA6BA,CAC3C7C,OAA6B,EAC7B8C,aAAsB,EACtB;EACAxD,gBAAgB,CAACuD,6BAA6B,CAC5C7C,OAAO,EACP8C,aACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -15,7 +15,9 @@
|
|
|
15
15
|
// reactViewName via componentNameByReactViewName().
|
|
16
16
|
export function getViewInfo(element) {
|
|
17
17
|
return {
|
|
18
|
-
reactViewName: element?.
|
|
18
|
+
reactViewName: element?.__viewConfig?.uiViewClassName ??
|
|
19
|
+
// ReactFabricHostComponent (e.g. react-native-macos) exposes `_viewConfig`.
|
|
20
|
+
element?._viewConfig?.uiViewClassName ?? element?.__internalInstanceHandle?.type ?? element?.__internalInstanceHandle?.elementType,
|
|
19
21
|
viewTag: element?.__nativeTag
|
|
20
22
|
};
|
|
21
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getViewInfo","element","reactViewName","
|
|
1
|
+
{"version":3,"names":["getViewInfo","element","reactViewName","__viewConfig","uiViewClassName","_viewConfig","__internalInstanceHandle","type","elementType","viewTag","__nativeTag"],"sourceRoot":"../../../src","sources":["createAnimatedComponent/getViewInfo.ts"],"mappings":"AAAA,YAAY;;AAIZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,WAAWA,CAACC,OAAqB,EAG/C;EACA,OAAO;IACLC,aAAa,EAAGD,OAAO,EAAEE,YAAY,EAAEC,eAAe;IACpD;IACAH,OAAO,EAAEI,WAAW,EAAED,eAAe,IACrCH,OAAO,EAAEK,wBAAwB,EAAEC,IAAI,IACvCN,OAAO,EAAEK,wBAAwB,EAAEE,WAAsB;IAC3DC,OAAO,EAAER,OAAO,EAAES;EACpB,CAAC;AACH","ignoreList":[]}
|
|
@@ -16,7 +16,6 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
16
16
|
export default class AnimatedComponent extends Component {
|
|
17
17
|
_cssStyle = {}; // RN style object with Reanimated CSS properties
|
|
18
18
|
_componentRef = null;
|
|
19
|
-
_hasAnimatedRef = false;
|
|
20
19
|
// Used only on web
|
|
21
20
|
_componentDOMRef = null;
|
|
22
21
|
_willUnmount = false;
|
|
@@ -95,7 +94,6 @@ export default class AnimatedComponent extends Component {
|
|
|
95
94
|
// Component can specify ref which should be animated when animated version of the component is created.
|
|
96
95
|
// Otherwise, we animate the component itself.
|
|
97
96
|
if (componentRef && componentRef.getAnimatableRef) {
|
|
98
|
-
this._hasAnimatedRef = true;
|
|
99
97
|
return componentRef.getAnimatableRef();
|
|
100
98
|
}
|
|
101
99
|
// Case for SVG components on Web
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Component","Platform","StyleSheet","IS_JEST","SHOULD_BE_USE_WEB","getViewInfo","getShadowNodeWrapperFromRef","findHostInstance","markNodeAsRemovable","unmarkNodeAsRemovable","CSSManager","filterNonCSSStyleProps","jsx","_jsx","AnimatedComponent","_cssStyle","_componentRef","
|
|
1
|
+
{"version":3,"names":["Component","Platform","StyleSheet","IS_JEST","SHOULD_BE_USE_WEB","getViewInfo","getShadowNodeWrapperFromRef","findHostInstance","markNodeAsRemovable","unmarkNodeAsRemovable","CSSManager","filterNonCSSStyleProps","jsx","_jsx","AnimatedComponent","_cssStyle","_componentRef","_componentDOMRef","_willUnmount","constructor","ChildComponent","props","getComponentViewTag","_getViewInfo","viewTag","_onSetLocalRef","_viewInfo","undefined","shadowNodeWrapper","DOMElement","reactViewName","hostInstance","Error","viewInfo","_setComponentRef","ref","forwardedRef","current","_resolveComponentRef","componentRef","getAnimatableRef","elementRef","_updateStyles","flatten","style","componentDidMount","_CSSManager","displayName","update","componentWillUnmount","unmountCleanup","wrapper","shouldComponentUpdate","nextProps","render","platformProps","select","web","default","collapsable"],"sourceRoot":"../../../../src","sources":["css/component/AnimatedComponent.tsx"],"mappings":"AAAA,YAAY;;AAEZ,SAASA,SAAS,QAAQ,OAAO;AAEjC,SAASC,QAAQ,EAAEC,UAAU,QAAQ,cAAc;AAGnD,SAASC,OAAO,EAAEC,iBAAiB,QAAQ,uBAAc;AAUzD,SAASC,WAAW,QAAQ,8CAA2C;AACvE,SAASC,2BAA2B,QAAQ,mBAAmB;AAC/D,SAASC,gBAAgB,QAAQ,0CAA0C;AAC3E,SAASC,mBAAmB,EAAEC,qBAAqB,QAAQ,oBAAW;AACtE,SAASC,UAAU,QAAQ,aAAa;AAExC,SAASC,sBAAsB,QAAQ,YAAS;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAOjD;AACA;AACA;AACA,eAAe,MAAMC,iBAAiB,SAI5Bd,SAAS,CAEnB;EAMEe,SAAS,GAAa,CAAC,CAAC,CAAC,CAAC;EAC1BC,aAAa,GAA8C,IAAI;EAC/D;EACAC,gBAAgB,GAAuB,IAAI;EAC3CC,YAAY,GAAY,KAAK;EAE7BC,WAAWA,CAACC,cAA4B,EAAEC,KAAQ,EAAE;IAClD,KAAK,CAACA,KAAK,CAAC;IACZ,IAAI,CAACD,cAAc,GAAGA,cAAc;EACtC;EAEAE,mBAAmBA,CAAA,EAAG;IACpB,OAAO,IAAI,CAACC,YAAY,CAAC,CAAC,CAACC,OAAO;EACpC;E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AAI,CAACD;IAA6C,CACxD,CAAC;EAEN;AACF","ignoreList":[]}
|
|
@@ -30,13 +30,13 @@ export default class CSSManager {
|
|
|
30
30
|
const hasAnimation = animationProperties !== null;
|
|
31
31
|
const hasTransition = transitionProperties !== null;
|
|
32
32
|
const normalizedStyle = hasAnimation || hasTransition || IS_ANDROID && this.hadTransitionLastUpdate ? this.propsBuilder.build(filteredStyle) : undefined;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
//
|
|
36
|
-
|
|
33
|
+
const transitionDetached = this.cssTransitionsManager.update(transitionProperties, normalizedStyle ?? {});
|
|
34
|
+
|
|
35
|
+
// Record the committed style as the base so animations and (on Android) a
|
|
36
|
+
// detaching transition can revert to it instead of interpolator defaults.
|
|
37
|
+
if (normalizedStyle && (hasAnimation || IS_ANDROID && transitionDetached)) {
|
|
37
38
|
setViewStyle(this.viewTag, normalizedStyle);
|
|
38
39
|
}
|
|
39
|
-
this.cssTransitionsManager.update(transitionProperties, normalizedStyle ?? {});
|
|
40
40
|
this.cssAnimationsManager.update(animationProperties);
|
|
41
41
|
this.hadTransitionLastUpdate = hasTransition;
|
|
42
42
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getCompoundComponentName","getPropsBuilder","IS_ANDROID","filterCSSAndStyleProperties","setViewStyle","CSSAnimationsManager","CSSTransitionsManager","CSSManager","hadTransitionLastUpdate","constructor","shadowNodeWrapper","viewTag","reactViewName","componentDisplayName","tag","wrapper","compoundComponentName","propsBuilder","cssAnimationsManager","cssTransitionsManager","update","style","animationProperties","transitionProperties","filteredStyle","hasAnimation","hasTransition","normalizedStyle","build","undefined","unmountCleanup"],"sourceRoot":"../../../../../src","sources":["css/native/managers/CSSManager.ts"],"mappings":"AAAA,YAAY;;AACZ,SACEA,wBAAwB,EACxBC,eAAe,EACfC,UAAU,QACL,0BAAiB;AAKxB,SAASC,2BAA2B,QAAQ,sBAAa;AACzD,SAASC,YAAY,QAAQ,aAAU;AACvC,OAAOC,oBAAoB,MAAM,2BAAwB;AACzD,OAAOC,qBAAqB,MAAM,4BAAyB;AAE3D,eAAe,MAAMC,UAAU,CAAwB;EAKrD;AACF;AACA;AACA;AACA;AACA;EACUC,uBAAuB,GAAG,KAAK;EAEvCC,WAAWA,CACT;IAAEC,iBAAiB;IAAEC,OAAO;IAAEC,aAAa,GAAG;EAAoB,CAAC,EACnEC,oBAAoB,GAAG,EAAE,EACzB;IACA,MAAMC,GAAG,GAAI,IAAI,CAACH,OAAO,GAAGA,OAAkB;IAC9C,MAAMI,OAAO,GAAGL,iBAAsC;IAEtD,MAAMM,qBAAqB,GAAGhB,wBAAwB,CACpDY,aAAa,EACbC,oBACF,CAAC;IAED,IAAI,CAACI,YAAY,GAAGhB,eAAe,CAACe,qBAAqB,CAAC;IAC1D,IAAI,CAACE,oBAAoB,GAAG,IAAIb,oBAAoB,CAClDU,OAAO,EACPD,GAAG,EACHE,qBACF,CAAC;IACD,IAAI,CAACG,qBAAqB,GAAG,IAAIb,qBAAqB,CAACS,OAAO,EAAED,GAAG,CAAC;EACtE;EAEAM,MAAMA,CAACC,KAAe,EAAQ;IAC5B,MAAM,CAACC,mBAAmB,EAAEC,oBAAoB,EAAEC,aAAa,CAAC,GAC9DrB,2BAA2B,CAACkB,KAAK,CAAC;IAEpC,MAAMI,YAAY,GAAGH,mBAAmB,KAAK,IAAI;IACjD,MAAMI,aAAa,GAAGH,oBAAoB,KAAK,IAAI;IAEnD,MAAMI,eAAe,GACnBF,YAAY,IACZC,aAAa,IACZxB,UAAU,IAAI,IAAI,CAACM,uBAAwB,GACxC,IAAI,CAACS,YAAY,CAACW,KAAK,CAACJ,aAAa,CAAC,GACtCK,SAAS;IAEf,
|
|
1
|
+
{"version":3,"names":["getCompoundComponentName","getPropsBuilder","IS_ANDROID","filterCSSAndStyleProperties","setViewStyle","CSSAnimationsManager","CSSTransitionsManager","CSSManager","hadTransitionLastUpdate","constructor","shadowNodeWrapper","viewTag","reactViewName","componentDisplayName","tag","wrapper","compoundComponentName","propsBuilder","cssAnimationsManager","cssTransitionsManager","update","style","animationProperties","transitionProperties","filteredStyle","hasAnimation","hasTransition","normalizedStyle","build","undefined","transitionDetached","unmountCleanup"],"sourceRoot":"../../../../../src","sources":["css/native/managers/CSSManager.ts"],"mappings":"AAAA,YAAY;;AACZ,SACEA,wBAAwB,EACxBC,eAAe,EACfC,UAAU,QACL,0BAAiB;AAKxB,SAASC,2BAA2B,QAAQ,sBAAa;AACzD,SAASC,YAAY,QAAQ,aAAU;AACvC,OAAOC,oBAAoB,MAAM,2BAAwB;AACzD,OAAOC,qBAAqB,MAAM,4BAAyB;AAE3D,eAAe,MAAMC,UAAU,CAAwB;EAKrD;AACF;AACA;AACA;AACA;AACA;EACUC,uBAAuB,GAAG,KAAK;EAEvCC,WAAWA,CACT;IAAEC,iBAAiB;IAAEC,OAAO;IAAEC,aAAa,GAAG;EAAoB,CAAC,EACnEC,oBAAoB,GAAG,EAAE,EACzB;IACA,MAAMC,GAAG,GAAI,IAAI,CAACH,OAAO,GAAGA,OAAkB;IAC9C,MAAMI,OAAO,GAAGL,iBAAsC;IAEtD,MAAMM,qBAAqB,GAAGhB,wBAAwB,CACpDY,aAAa,EACbC,oBACF,CAAC;IAED,IAAI,CAACI,YAAY,GAAGhB,eAAe,CAACe,qBAAqB,CAAC;IAC1D,IAAI,CAACE,oBAAoB,GAAG,IAAIb,oBAAoB,CAClDU,OAAO,EACPD,GAAG,EACHE,qBACF,CAAC;IACD,IAAI,CAACG,qBAAqB,GAAG,IAAIb,qBAAqB,CAACS,OAAO,EAAED,GAAG,CAAC;EACtE;EAEAM,MAAMA,CAACC,KAAe,EAAQ;IAC5B,MAAM,CAACC,mBAAmB,EAAEC,oBAAoB,EAAEC,aAAa,CAAC,GAC9DrB,2BAA2B,CAACkB,KAAK,CAAC;IAEpC,MAAMI,YAAY,GAAGH,mBAAmB,KAAK,IAAI;IACjD,MAAMI,aAAa,GAAGH,oBAAoB,KAAK,IAAI;IAEnD,MAAMI,eAAe,GACnBF,YAAY,IACZC,aAAa,IACZxB,UAAU,IAAI,IAAI,CAACM,uBAAwB,GACxC,IAAI,CAACS,YAAY,CAACW,KAAK,CAACJ,aAAa,CAAC,GACtCK,SAAS;IAEf,MAAMC,kBAAkB,GAAG,IAAI,CAACX,qBAAqB,CAACC,MAAM,CAC1DG,oBAAoB,EACpBI,eAAe,IAAI,CAAC,CACtB,CAAC;;IAED;IACA;IACA,IACEA,eAAe,KACdF,YAAY,IAAKvB,UAAU,IAAI4B,kBAAmB,CAAC,EACpD;MACA1B,YAAY,CAAC,IAAI,CAACO,OAAO,EAAEgB,eAAe,CAAC;IAC7C;IAEA,IAAI,CAACT,oBAAoB,CAACE,MAAM,CAACE,mBAAmB,CAAC;IAErD,IAAI,CAACd,uBAAuB,GAAGkB,aAAa;EAC9C;EAEAK,cAAcA,CAAA,EAAS;IACrB,IAAI,CAACb,oBAAoB,CAACa,cAAc,CAAC,CAAC;IAC1C,IAAI,CAACZ,qBAAqB,CAACY,cAAc,CAAC,CAAC;EAC7C;AACF","ignoreList":[]}
|
|
@@ -15,6 +15,11 @@ export default class CSSTransitionsManager {
|
|
|
15
15
|
this.viewTag = viewTag;
|
|
16
16
|
this.shadowNodeWrapper = shadowNodeWrapper;
|
|
17
17
|
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @returns Whether this update detached a running transition (its props were
|
|
21
|
+
* removed, or normalized to an empty config, e.g. when duration is 0).
|
|
22
|
+
*/
|
|
18
23
|
update(transitionProperties, nextProps = {}) {
|
|
19
24
|
const transitionConfig = transitionProperties && normalizeCSSTransitionProperties(transitionProperties);
|
|
20
25
|
const prevProps = this.prevProps;
|
|
@@ -26,8 +31,9 @@ export default class CSSTransitionsManager {
|
|
|
26
31
|
if (!prevProps || !transitionConfig) {
|
|
27
32
|
if (this.hasTransition) {
|
|
28
33
|
this.detach();
|
|
34
|
+
return true;
|
|
29
35
|
}
|
|
30
|
-
return;
|
|
36
|
+
return false;
|
|
31
37
|
}
|
|
32
38
|
|
|
33
39
|
// Trigger transition for changed properties only
|
|
@@ -36,6 +42,7 @@ export default class CSSTransitionsManager {
|
|
|
36
42
|
runCSSTransition(this.shadowNodeWrapper, config);
|
|
37
43
|
this.hasTransition = true;
|
|
38
44
|
}
|
|
45
|
+
return false;
|
|
39
46
|
}
|
|
40
47
|
unmountCleanup() {
|
|
41
48
|
// noop
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["deepEqual","normalizeCSSTransitionProperties","runCSSTransition","unregisterCSSTransition","CSSTransitionsManager","prevProps","propsWithTransitions","Set","hasTransition","constructor","shadowNodeWrapper","viewTag","update","transitionProperties","nextProps","transitionConfig","detach","config","processTransitionConfig","Object","keys","length","unmountCleanup","clear","oldProps","newProps","newTransitionConfig","result","specificProperties","isAllowedProperty","property","has","getPropertySettings","settings","all","triggerTransition","value","add","key","delete"],"sourceRoot":"../../../../../src","sources":["css/native/managers/CSSTransitionsManager.ts"],"mappings":"AAAA,YAAY;;AAOZ,SAASA,SAAS,QAAQ,sBAAa;AACvC,SAASC,gCAAgC,QAAQ,2BAAkB;AACnE,SAASC,gBAAgB,EAAEC,uBAAuB,QAAQ,aAAU;AAMpE,eAAe,MAAMC,qBAAqB,CAAmC;EAI3E;EACQC,SAAS,GAAyB,IAAI;EAC9C;EACA;EACQC,oBAAoB,GAAG,IAAIC,GAAG,CAAS,CAAC;EAChD;EACQC,aAAa,GAAG,KAAK;EAE7BC,WAAWA,CAACC,iBAAoC,EAAEC,OAAe,EAAE;IACjE,IAAI,CAACA,OAAO,GAAGA,OAAO;IACtB,IAAI,CAACD,iBAAiB,GAAGA,iBAAiB;EAC5C;
|
|
1
|
+
{"version":3,"names":["deepEqual","normalizeCSSTransitionProperties","runCSSTransition","unregisterCSSTransition","CSSTransitionsManager","prevProps","propsWithTransitions","Set","hasTransition","constructor","shadowNodeWrapper","viewTag","update","transitionProperties","nextProps","transitionConfig","detach","config","processTransitionConfig","Object","keys","length","unmountCleanup","clear","oldProps","newProps","newTransitionConfig","result","specificProperties","isAllowedProperty","property","has","getPropertySettings","settings","all","triggerTransition","value","add","key","delete"],"sourceRoot":"../../../../../src","sources":["css/native/managers/CSSTransitionsManager.ts"],"mappings":"AAAA,YAAY;;AAOZ,SAASA,SAAS,QAAQ,sBAAa;AACvC,SAASC,gCAAgC,QAAQ,2BAAkB;AACnE,SAASC,gBAAgB,EAAEC,uBAAuB,QAAQ,aAAU;AAMpE,eAAe,MAAMC,qBAAqB,CAAmC;EAI3E;EACQC,SAAS,GAAyB,IAAI;EAC9C;EACA;EACQC,oBAAoB,GAAG,IAAIC,GAAG,CAAS,CAAC;EAChD;EACQC,aAAa,GAAG,KAAK;EAE7BC,WAAWA,CAACC,iBAAoC,EAAEC,OAAe,EAAE;IACjE,IAAI,CAACA,OAAO,GAAGA,OAAO;IACtB,IAAI,CAACD,iBAAiB,GAAGA,iBAAiB;EAC5C;;EAEA;AACF;AACA;AACA;EACEE,MAAMA,CACJC,oBAAoD,EACpDC,SAAwB,GAAG,CAAC,CAAC,EACpB;IACT,MAAMC,gBAAgB,GACpBF,oBAAoB,IACpBZ,gCAAgC,CAACY,oBAAoB,CAAC;IAExD,MAAMR,SAAS,GAAG,IAAI,CAACA,SAAS;IAChC,IAAI,CAACA,SAAS,GAAGS,SAAS;;IAE1B;IACA;IACA;IACA,IAAI,CAACT,SAAS,IAAI,CAACU,gBAAgB,EAAE;MACnC,IAAI,IAAI,CAACP,aAAa,EAAE;QACtB,IAAI,CAACQ,MAAM,CAAC,CAAC;QACb,OAAO,IAAI;MACb;MACA,OAAO,KAAK;IACd;;IAEA;IACA,MAAMC,MAAM,GAAG,IAAI,CAACC,uBAAuB,CACzCb,SAAS,EACTS,SAAS,EACTC,gBACF,CAAC;IAED,IAAII,MAAM,CAACC,IAAI,CAACH,MAAM,CAAC,CAACI,MAAM,EAAE;MAC9BnB,gBAAgB,CAAC,IAAI,CAACQ,iBAAiB,EAAEO,MAAM,CAAC;MA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AAId,QAAQ,EAAE;MAC1B,IAAI,CAACK,iBAAiB,CAACS,GAAG,CAAC,EAAE;QAC3B,IAAI,IAAI,CAAChC,oBAAoB,CAACyB,GAAG,CAACO,GAAG,CAAC,EAAE;UACtC;UACA;UACAX,MAAM,CAACW,GAAG,CAAC,GAAG,IAAI;UAClB,IAAI,CAAChC,oBAAoB,CAACiC,MAAM,CAACD,GAAG,CAAC;QACvC;MACF,CAAC,MAAM,IAAI,EAAEA,GAAG,IAAIb,QAAQ,CAAC,EAAE;QAC7B;QACAU,iBAAiB,CAACG,GAAG,CAAC;MACxB;IACF;IAEA,OAAOX,MAAM;EACf;AACF","ignoreList":[]}
|
|
@@ -9,16 +9,20 @@ export const processStrokeDashArray = value => {
|
|
|
9
9
|
if (isLength(value)) {
|
|
10
10
|
result = [value];
|
|
11
11
|
} else if (Array.isArray(value)) {
|
|
12
|
-
|
|
13
|
-
// "If the number of values is odd, the pattern behaves as if it was duplicated
|
|
14
|
-
// to yield an even number of values"
|
|
15
|
-
// (https://www.w3.org/TR/fill-stroke-3/#valdef-stroke-dasharray-length-percentage)
|
|
16
|
-
result = value.length % 2 === 0 || value.length < 3 ? value : value.concat(value);
|
|
12
|
+
result = [...value];
|
|
17
13
|
} else if (value === 'none') {
|
|
18
14
|
return 'none';
|
|
19
15
|
} else {
|
|
20
16
|
throw new Error(`[Reanimated] ${ERROR_MESSAGES.invalidDashArray(value)}`);
|
|
21
17
|
}
|
|
18
|
+
|
|
19
|
+
// Per the SVG spec an odd-length dash array is repeated to an even length.
|
|
20
|
+
// react-native-svg's extractStroke does this, but animated values bypass it
|
|
21
|
+
// and an odd-length array crashes Android's DashPathEffect, so we repeat here.
|
|
22
|
+
// https://www.w3.org/TR/fill-stroke-3/#valdef-stroke-dasharray-length-percentage
|
|
23
|
+
if (result.length % 2 === 1) {
|
|
24
|
+
result = result.concat(result);
|
|
25
|
+
}
|
|
22
26
|
if (__DEV__) {
|
|
23
27
|
isValidDashArray(result);
|
|
24
28
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["isLength","ERROR_MESSAGES","invalidDashArray","value","JSON","stringify","processStrokeDashArray","result","Array","isArray","
|
|
1
|
+
{"version":3,"names":["isLength","ERROR_MESSAGES","invalidDashArray","value","JSON","stringify","processStrokeDashArray","result","Array","isArray","Error","length","concat","__DEV__","isValidDashArray","every"],"sourceRoot":"../../../../../../src","sources":["css/svg/native/processors/stroke.ts"],"mappings":"AAAA,YAAY;;AAIZ,SAASA,QAAQ,QAAQ,yBAAgB;AAEzC,OAAO,MAAMC,cAAc,GAAG;EAC5BC,gBAAgB,EAAGC,KAAc,IAC/B,oCAAoCC,IAAI,CAACC,SAAS,CAACF,KAAK,CAAC;AAC7D,CAAC;AAED,OAAO,MAAMG,sBAGZ,GAAIH,KAAK,IAAK;EACb,IAAII,MAAoB,GAAG,EAAE;EAE7B,IAAIP,QAAQ,CAACG,KAAK,CAAC,EAAE;IACnBI,MAAM,GAAG,CAACJ,KAAK,CAAC;EAClB,CAAC,MAAM,IAAIK,KAAK,CAACC,OAAO,CAACN,KAAK,CAAC,EAAE;IAC/BI,MAAM,GAAG,CAAC,GAAGJ,KAAK,CAAC;EACrB,CAAC,MAAM,IAAIA,KAAK,KAAK,MAAM,EAAE;IAC3B,OAAO,MAAM;EACf,CAAC,MAAM;IACL,MAAM,IAAIO,KAAK,CAAC,gBAAgBT,cAAc,CAACC,gBAAgB,CAACC,KAAK,CAAC,EAAE,CAAC;EAC3E;;EAEA;EACA;EACA;EACA;EACA,IAAII,MAAM,CAACI,MAAM,GAAG,CAAC,KAAK,CAAC,EAAE;IAC3BJ,MAAM,GAAGA,MAAM,CAACK,MAAM,CAACL,MAAM,CAAC;EAChC;EAEA,IAAIM,OAAO,EAAE;IACXC,gBAAgB,CAACP,MAAM,CAAC;EAC1B;EAEA,OAAOA,MAAM;AACf,CAAC;AAED,MAAMO,gBAAgB,GAAIX,KAAmB,IAAK;EAChD,IAAI,CAACA,KAAK,CAACY,KAAK,CAACf,QAAQ,CAAC,EAAE;IAC1B,MAAM,IAAIU,KAAK,CAAC,gBAAgBT,cAAc,CAACC,gBAAgB,CAACC,KAAK,CAAC,EAAE,CAAC;EAC3E;AACF,CAAC","ignoreList":[]}
|
|
@@ -5,9 +5,12 @@ import { assertEasingIsWorklet } from "../../animation/util.js";
|
|
|
5
5
|
import { BaseAnimationBuilder } from "./BaseAnimationBuilder.js";
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* `this`
|
|
9
|
-
* subclass constructor exposing the shared config-only static API
|
|
10
|
-
* from {@link BaseAnimationBuilder}.
|
|
8
|
+
* `this` constraint for static modifiers on {@link AnimationConfigBuilder}.
|
|
9
|
+
* Represents a subclass constructor exposing the shared config-only static API
|
|
10
|
+
* inherited from {@link BaseAnimationBuilder}. The modifiers bind `this` to a
|
|
11
|
+
* concrete subtype of this so the chain preserves the receiver's instance type
|
|
12
|
+
* (e.g. `SharedTransition.springify(...)` stays a `SharedTransition`) instead
|
|
13
|
+
* of collapsing to `AnimationConfigBuilder`.
|
|
11
14
|
*/
|
|
12
15
|
|
|
13
16
|
export class AnimationConfigBuilder extends BaseAnimationBuilder {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["withSpring","withTiming","assertEasingIsWorklet","BaseAnimationBuilder","AnimationConfigBuilder","easing","easingFunction","instance","createInstance","__DEV__","easingV","rotate","degree","rotateV","springify","duration","durationV","type","dampingRatio","value","dampingRatioV","damping","dampingV","mass","massV","stiffness","stiffnessV","overshootClamping","overshootClampingV","restDisplacementThreshold","_restDisplacementThreshold","restSpeedThreshold","_restSpeedThreshold","energyThreshold","energyThresholdV","getAnimationAndConfig","animation","config","maybeSetConfigValue","variableName","forEach","ComplexAnimationBuilder","withInitialValues","values","initialValues","withTargetValues","targetValues"],"sourceRoot":"../../../../src","sources":["layoutReanimation/animationBuilder/ComplexAnimationBuilder.ts"],"mappings":"AAAA,YAAY;;AACZ,SAASA,UAAU,EAAEC,UAAU,QAAQ,0BAAiB;AACxD,SAASC,qBAAqB,QAAQ,yBAAsB;AAS5D,SAASC,oBAAoB,QAAQ,2BAAwB;;AAE7D;AACA;AACA;AACA;AACA;;AAIA,OAAO,MAAMC,sBAAsB,SAASD,oBAAoB,CAAC;EAc/D;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACE,OAAOE,MAAMA,CAEXC,cAAsD,
|
|
1
|
+
{"version":3,"names":["withSpring","withTiming","assertEasingIsWorklet","BaseAnimationBuilder","AnimationConfigBuilder","easing","easingFunction","instance","createInstance","__DEV__","easingV","rotate","degree","rotateV","springify","duration","durationV","type","dampingRatio","value","dampingRatioV","damping","dampingV","mass","massV","stiffness","stiffnessV","overshootClamping","overshootClampingV","restDisplacementThreshold","_restDisplacementThreshold","restSpeedThreshold","_restSpeedThreshold","energyThreshold","energyThresholdV","getAnimationAndConfig","animation","config","maybeSetConfigValue","variableName","forEach","ComplexAnimationBuilder","withInitialValues","values","initialValues","withTargetValues","targetValues"],"sourceRoot":"../../../../src","sources":["layoutReanimation/animationBuilder/ComplexAnimationBuilder.ts"],"mappings":"AAAA,YAAY;;AACZ,SAASA,UAAU,EAAEC,UAAU,QAAQ,0BAAiB;AACxD,SAASC,qBAAqB,QAAQ,yBAAsB;AAS5D,SAASC,oBAAoB,QAAQ,2BAAwB;;AAE7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,OAAO,MAAMC,sBAAsB,SAASD,oBAAoB,CAAC;EAc/D;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACE,OAAOE,MAAMA,CAEXC,cAAsD,EACrC;IACjB,MAAMC,QAAQ,GAAG,IAAI,CAACC,cAAc,CAAC,CAAC;IACtC,OAAOD,QAAQ,CAACF,MAAM,CAACC,cAAc,CAAC;EACxC;EAEAD,MAAMA,CAACC,cAAsD,EAAQ;IACnE,IAAIG,OAAO,EAAE;MACXP,qBAAqB,CAACI,cAAc,CAAC;IACvC;IACA,IAAI,CAACI,OAAO,GAAGJ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