react-native-reanimated 2.9.1 → 2.11.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/Common/cpp/AnimatedSensor/AnimatedSensorModule.cpp +7 -4
- package/Common/cpp/{headers/AnimatedSensor → AnimatedSensor}/AnimatedSensorModule.h +0 -0
- package/Common/cpp/LayoutAnimations/LayoutAnimationsProxy.cpp +2 -0
- package/Common/cpp/{headers/LayoutAnimations → LayoutAnimations}/LayoutAnimationsProxy.h +0 -0
- package/Common/cpp/NativeModules/NativeReanimatedModule.cpp +40 -0
- package/Common/cpp/{headers/NativeModules → NativeModules}/NativeReanimatedModule.h +13 -0
- package/Common/cpp/NativeModules/NativeReanimatedModuleSpec.cpp +25 -0
- package/Common/cpp/{headers/NativeModules → NativeModules}/NativeReanimatedModuleSpec.h +9 -1
- package/Common/cpp/{headers/Registries → Registries}/EventHandlerRegistry.h +0 -0
- package/Common/cpp/Registries/MapperRegistry.cpp +3 -1
- package/Common/cpp/{headers/Registries → Registries}/MapperRegistry.h +0 -0
- package/Common/cpp/Registries/WorkletsCache.cpp +3 -0
- package/Common/cpp/{headers/Registries → Registries}/WorkletsCache.h +0 -0
- package/Common/cpp/{headers/SharedItems → SharedItems}/FrozenObject.h +0 -0
- package/Common/cpp/{headers/SharedItems → SharedItems}/HostFunctionHandler.h +0 -0
- package/Common/cpp/SharedItems/MutableValue.cpp +2 -0
- package/Common/cpp/{headers/SharedItems → SharedItems}/MutableValue.h +0 -0
- package/Common/cpp/{headers/SharedItems → SharedItems}/MutableValueSetterProxy.h +0 -0
- package/Common/cpp/{headers/SharedItems → SharedItems}/RemoteObject.h +0 -0
- package/Common/cpp/{headers/SharedItems → SharedItems}/RuntimeManager.h +0 -0
- package/Common/cpp/SharedItems/ShareableValue.cpp +7 -2
- package/Common/cpp/{headers/SharedItems → SharedItems}/ShareableValue.h +0 -0
- package/Common/cpp/{headers/SharedItems → SharedItems}/SharedParent.h +0 -0
- package/Common/cpp/{headers/SharedItems → SharedItems}/ValueWrapper.h +0 -0
- package/Common/cpp/{headers/SpecTools → SpecTools}/ErrorHandler.h +0 -0
- package/Common/cpp/{headers/Tools → Tools}/FeaturesConfig.h +0 -0
- package/Common/cpp/Tools/JSIStoreValueUser.cpp +2 -2
- package/Common/cpp/{headers/Tools → Tools}/JSIStoreValueUser.h +0 -0
- package/Common/cpp/{headers/Tools → Tools}/Mapper.h +0 -0
- package/Common/cpp/{headers/Tools → Tools}/PlatformDepMethodsHolder.h +5 -0
- package/Common/cpp/{headers/Tools → Tools}/ReanimatedHiddenHeaders.h +1 -1
- package/Common/cpp/{headers/Tools → Tools}/RuntimeDecorator.h +0 -0
- package/Common/cpp/{headers/Tools → Tools}/Scheduler.h +0 -0
- package/Common/cpp/Tools/SingleInstanceChecker.h +58 -0
- package/Common/cpp/{headers/Tools → Tools}/WorkletEventHandler.h +0 -0
- package/RNReanimated.podspec +18 -58
- package/android/.gradle/7.5.1/checksums/checksums.lock +0 -0
- package/android/.gradle/7.5.1/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/7.5.1/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/7.5.1/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/android/.gradle/{7.2 → 7.5.1}/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/7.5.1/executionHistory/executionHistory.bin +0 -0
- package/android/.gradle/7.5.1/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/{7.2 → 7.5.1}/fileChanges/last-build.bin +0 -0
- package/android/.gradle/7.5.1/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/7.5.1/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/{7.2 → 7.5.1}/fileHashes/resourceHashesCache.bin +0 -0
- package/android/.gradle/{7.2 → 7.5.1}/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -2
- package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
- package/android/.gradle/file-system.probe +0 -0
- package/android/CMakeLists.txt +223 -113
- package/android/build.gradle +480 -195
- package/android/gradle/wrapper/gradle-wrapper.properties +1 -1
- package/android/react-native-reanimated-66-hermes.aar +0 -0
- package/android/react-native-reanimated-66-jsc.aar +0 -0
- package/android/react-native-reanimated-67-hermes.aar +0 -0
- package/android/react-native-reanimated-67-jsc.aar +0 -0
- package/android/react-native-reanimated-68-hermes.aar +0 -0
- package/android/react-native-reanimated-68-jsc.aar +0 -0
- package/android/react-native-reanimated-69-hermes.aar +0 -0
- package/android/react-native-reanimated-69-jsc.aar +0 -0
- package/android/react-native-reanimated-70-hermes.aar +0 -0
- package/android/react-native-reanimated-70-jsc.aar +0 -0
- package/{lib/types/lib/reanimated2/platform-specific/RNRenderer.web.d.ts → android/rnVersionPatch/70/.gitkeep} +0 -0
- package/android/src/main/cpp/AndroidErrorHandler.cpp +3 -4
- package/android/src/main/cpp/{headers/AndroidErrorHandler.h → AndroidErrorHandler.h} +1 -4
- package/android/src/main/cpp/AndroidLogger.cpp +4 -1
- package/android/src/main/cpp/{headers/AndroidLogger.h → AndroidLogger.h} +0 -0
- package/android/src/main/cpp/{headers/AndroidScheduler.h → AndroidScheduler.h} +0 -0
- package/android/src/main/cpp/{headers/JNIHelper.h → JNIHelper.h} +0 -0
- package/android/src/main/cpp/{headers/LayoutAnimations.h → LayoutAnimations.h} +0 -0
- package/android/src/main/cpp/NativeProxy.cpp +60 -28
- package/android/src/main/cpp/{headers/NativeProxy.h → NativeProxy.h} +29 -0
- package/android/src/main/cpp/OnLoad.cpp +1 -0
- package/android/src/main/cpp/{headers/TurboModule.h → TurboModule.h} +0 -0
- package/android/src/main/java/com/swmansion/reanimated/NativeProxy.java +29 -5
- package/android/src/main/java/com/swmansion/reanimated/NodesManager.java +3 -1
- package/android/src/main/java/com/swmansion/reanimated/keyboardObserver/ReanimatedKeyboardEventListener.java +166 -0
- package/android/src/main/java/com/swmansion/reanimated/layoutReanimation/AnimationsManager.java +19 -16
- package/android/src/main/java/com/swmansion/reanimated/sensor/ReanimatedSensor.java +5 -1
- package/android/src/main/java/com/swmansion/reanimated/sensor/ReanimatedSensorType.java +1 -1
- package/ios/{REAModule.m → REAModule.mm} +12 -0
- package/ios/REANodesManager.m +31 -8
- package/ios/keyboardObserver/REAKeyboardEventObserver.h +17 -0
- package/ios/keyboardObserver/REAKeyboardEventObserver.m +198 -0
- package/ios/native/NativeProxy.mm +24 -3
- package/ios/native/REAInitializer.h +2 -2
- package/ios/native/REAInitializer.mm +10 -14
- package/ios/native/UIResponder+Reanimated.mm +1 -1
- package/ios/sensor/ReanimatedSensor.m +26 -17
- package/lib/index.js +11 -3
- package/lib/index.web.js +6 -0
- package/lib/reanimated2/Colors.js +1 -1
- package/lib/reanimated2/NativeMethods.js +34 -17
- package/lib/reanimated2/NativeReanimated/NativeReanimated.js +6 -0
- package/lib/reanimated2/animation/util.js +4 -1
- package/lib/reanimated2/commonTypes.js +8 -1
- package/lib/reanimated2/component/FlatList.js +5 -5
- package/lib/reanimated2/core.js +5 -4
- package/lib/reanimated2/frameCallback/FrameCallbackRegistryJS.js +32 -0
- package/lib/reanimated2/frameCallback/FrameCallbackRegistryUI.js +76 -0
- package/lib/reanimated2/globals.d.ts +5 -2
- package/lib/reanimated2/hook/index.js +3 -0
- package/lib/reanimated2/hook/useAnimatedKeyboard.js +31 -0
- package/lib/reanimated2/hook/useAnimatedSensor.js +3 -3
- package/lib/reanimated2/hook/useFrameCallback.js +23 -0
- package/lib/reanimated2/hook/useScrollViewOffset.js +26 -0
- package/lib/reanimated2/jestUtils.js +11 -3
- package/lib/reanimated2/js-reanimated/JSReanimated.js +7 -0
- package/lib/reanimated2/js-reanimated/global.js +33 -22
- package/lib/reanimated2/layoutReanimation/LayoutAnimationRepository.js +1 -1
- package/lib/reanimated2/utils.js +10 -3
- package/lib/types/{lib/Animated.d.ts → Animated.d.ts} +0 -0
- package/lib/types/{lib/ConfigHelper.d.ts → ConfigHelper.d.ts} +0 -0
- package/lib/types/{lib/ReanimatedEventEmitter.d.ts → ReanimatedEventEmitter.d.ts} +0 -0
- package/lib/types/{lib/ReanimatedModule.d.ts → ReanimatedModule.d.ts} +0 -0
- package/lib/types/{lib/ReanimatedModule.macos.d.ts → ReanimatedModule.macos.d.ts} +0 -0
- package/lib/types/{lib/ReanimatedModule.native.d.ts → ReanimatedModule.native.d.ts} +0 -0
- package/lib/types/{lib/ReanimatedModule.windows.d.ts → ReanimatedModule.windows.d.ts} +0 -0
- package/lib/types/{lib/ReanimatedModuleCompat.d.ts → ReanimatedModuleCompat.d.ts} +0 -0
- package/lib/types/{lib/createAnimatedComponent.d.ts → createAnimatedComponent.d.ts} +0 -0
- package/lib/types/index.d.ts +4 -0
- package/lib/types/{lib/index.d.ts → index.web.d.ts} +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/Bezier.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/Colors.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/Easing.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/NativeMethods.d.ts +3 -10
- package/lib/types/{lib/reanimated2 → reanimated2}/NativeReanimated/NativeReanimated.d.ts +3 -1
- package/lib/types/{lib/reanimated2 → reanimated2}/NativeReanimated/index.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/PlatformChecker.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/PropAdapters.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/UpdateProps.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/ViewDescriptorsSet.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/WorkletEventHandler.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/__mocks__/MutableValue.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/__mocks__/NativeReanimated.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/animation/commonTypes.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/animation/decay.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/animation/delay.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/animation/index.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/animation/repeat.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/animation/sequence.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/animation/spring.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/animation/styleAnimation.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/animation/timing.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/animation/util.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/commonTypes.d.ts +20 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/component/FlatList.d.ts +2 -2
- package/lib/types/{lib/reanimated2 → reanimated2}/component/Image.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/component/ScrollView.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/component/Text.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/component/View.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/core.d.ts +0 -0
- package/lib/types/reanimated2/frameCallback/FrameCallbackRegistryJS.d.ts +8 -0
- package/lib/types/reanimated2/frameCallback/FrameCallbackRegistryUI.d.ts +6 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/hook/Hooks.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/hook/commonTypes.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/hook/index.d.ts +4 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/hook/useAnimatedGestureHandler.d.ts +0 -0
- package/lib/types/reanimated2/hook/useAnimatedKeyboard.d.ts +2 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/hook/useAnimatedReaction.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/hook/useAnimatedRef.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/hook/useAnimatedScrollHandler.d.ts +1 -2
- package/lib/types/{lib/reanimated2 → reanimated2}/hook/useAnimatedSensor.d.ts +1 -1
- package/lib/types/{lib/reanimated2 → reanimated2}/hook/useAnimatedStyle.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/hook/useDerivedValue.d.ts +0 -0
- package/lib/types/reanimated2/hook/useFrameCallback.d.ts +7 -0
- package/lib/types/reanimated2/hook/useScrollViewOffset.d.ts +4 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/hook/useSharedValue.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/hook/utils.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/index.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/interpolateColor.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/interpolation.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/jestUtils.d.ts +1 -1
- package/lib/types/{lib/reanimated2 → reanimated2}/js-reanimated/JSReanimated.d.ts +3 -1
- package/lib/types/{lib/reanimated2 → reanimated2}/js-reanimated/Mapper.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/js-reanimated/MapperRegistry.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/js-reanimated/MutableValue.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/js-reanimated/commonTypes.d.ts +0 -0
- package/lib/types/reanimated2/js-reanimated/global.d.ts +2 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/js-reanimated/index.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/LayoutAnimationRepository.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/animationBuilder/BaseAnimationBuilder.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/animationBuilder/ComplexAnimationBuilder.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/animationBuilder/Keyframe.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/animationBuilder/commonTypes.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/animationBuilder/index.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/Bounce.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/Default.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/Fade.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/Flip.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/Lightspeed.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/Pinwheel.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/Roll.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/Rotate.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/Slide.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/Stretch.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/Zoom.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/index.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultTransitions/CurvedTransition.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultTransitions/EntryExitTransition.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultTransitions/FadingTransition.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultTransitions/JumpingTransition.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultTransitions/LinearTransition.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultTransitions/SequencedTransition.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultTransitions/index.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/index.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/mock.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/platform-specific/RNRenderer.d.ts +0 -0
- package/lib/types/reanimated2/platform-specific/RNRenderer.web.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/utils.d.ts +5 -1
- package/lib/types/{lib/setAndForwardRef.d.ts → setAndForwardRef.d.ts} +0 -0
- package/mock.js +1 -0
- package/package.json +8 -8
- package/plugin.js +8 -17
- package/react-native-reanimated.d.ts +67 -12
- package/scripts/reanimated_utils.rb +65 -0
- package/src/index.ts +11 -3
- package/src/index.web.ts +7 -0
- package/src/reanimated2/Colors.ts +1 -1
- package/src/reanimated2/NativeMethods.ts +47 -30
- package/src/reanimated2/NativeReanimated/NativeReanimated.ts +9 -0
- package/src/reanimated2/animation/util.ts +8 -1
- package/src/reanimated2/commonTypes.ts +24 -0
- package/src/reanimated2/component/FlatList.tsx +29 -19
- package/src/reanimated2/core.ts +8 -8
- package/src/reanimated2/frameCallback/FrameCallbackRegistryJS.ts +40 -0
- package/src/reanimated2/frameCallback/FrameCallbackRegistryUI.ts +115 -0
- package/src/reanimated2/globals.d.ts +5 -2
- package/src/reanimated2/hook/index.ts +4 -0
- package/src/reanimated2/hook/useAnimatedKeyboard.ts +35 -0
- package/src/reanimated2/hook/useAnimatedScrollHandler.ts +3 -1
- package/src/reanimated2/hook/useAnimatedSensor.ts +5 -5
- package/src/reanimated2/hook/useFrameCallback.ts +40 -0
- package/src/reanimated2/hook/useScrollViewOffset.ts +36 -0
- package/src/reanimated2/jestUtils.ts +11 -3
- package/src/reanimated2/js-reanimated/JSReanimated.ts +16 -1
- package/src/reanimated2/js-reanimated/global.ts +41 -29
- package/src/reanimated2/layoutReanimation/LayoutAnimationRepository.ts +1 -1
- package/src/reanimated2/utils.ts +12 -5
- package/android/.gradle/7.2/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/android/.gradle/7.2/executionHistory/executionHistory.bin +0 -0
- package/android/.gradle/7.2/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/7.2/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/7.2/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/checksums/checksums.lock +0 -0
- package/android/.gradle/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/checksums/sha1-checksums.bin +0 -0
- package/android/react-native-reanimated-65-hermes.aar +0 -0
- package/android/react-native-reanimated-65-jsc.aar +0 -0
- package/android/src/main/java/com/swmansion/reanimated/AndroidErrorHandler.java +0 -8
- package/lib/reanimated2/__mocks__/NativeReanimated.native.js +0 -20
- package/lib/types/lib/reanimated2/__mocks__/NativeReanimated.native.d.ts +0 -13
- package/lib/types/lib/reanimated2/js-reanimated/global.d.ts +0 -1
- package/lib/types/react-native-reanimated-tests.d.ts +0 -1
|
@@ -7,7 +7,7 @@ import { processColor } from '../Colors';
|
|
|
7
7
|
runOnUI(() => {
|
|
8
8
|
'worklet';
|
|
9
9
|
|
|
10
|
-
const configs: Record<string, any> =
|
|
10
|
+
const configs: Record<string, any> = Object.create(null);
|
|
11
11
|
const enteringAnimationForTag: Record<string, any> = {};
|
|
12
12
|
|
|
13
13
|
global.LayoutAnimationRepository = {
|
package/src/reanimated2/utils.ts
CHANGED
|
@@ -7,15 +7,22 @@ export interface ComponentCoords {
|
|
|
7
7
|
y: number;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* Given an absolute position and a component ref, returns the relative
|
|
12
|
+
* position in the component's local coordinate space.
|
|
13
|
+
*/
|
|
10
14
|
export function getRelativeCoords(
|
|
11
15
|
parentRef: RefObjectFunction<Component>,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
): ComponentCoords {
|
|
16
|
+
absoluteX: number,
|
|
17
|
+
absoluteY: number
|
|
18
|
+
): ComponentCoords | null {
|
|
15
19
|
'worklet';
|
|
16
20
|
const parentCoords = measure(parentRef);
|
|
21
|
+
if (parentCoords === null) {
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
17
24
|
return {
|
|
18
|
-
x:
|
|
19
|
-
y:
|
|
25
|
+
x: absoluteX - parentCoords.x,
|
|
26
|
+
y: absoluteY - parentCoords.y,
|
|
20
27
|
};
|
|
21
28
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
import MutableValue from './MutableValue';
|
|
4
|
-
global._setGlobalConsole = (_val) => {
|
|
5
|
-
// noop
|
|
6
|
-
};
|
|
7
|
-
const NOOP = () => {
|
|
8
|
-
// noop
|
|
9
|
-
};
|
|
10
|
-
export default {
|
|
11
|
-
installCoreFunctions: NOOP,
|
|
12
|
-
makeShareable: (worklet) => worklet,
|
|
13
|
-
makeMutable: (init) => new MutableValue(init),
|
|
14
|
-
makeRemote: NOOP,
|
|
15
|
-
startMapper: NOOP,
|
|
16
|
-
stopMapper: NOOP,
|
|
17
|
-
registerEventHandler: NOOP,
|
|
18
|
-
unregisterEventHandler: NOOP,
|
|
19
|
-
getViewProp: NOOP,
|
|
20
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import MutableValue from './MutableValue';
|
|
2
|
-
declare const _default: {
|
|
3
|
-
installCoreFunctions: () => void;
|
|
4
|
-
makeShareable: (worklet: any) => any;
|
|
5
|
-
makeMutable: (init: any) => MutableValue;
|
|
6
|
-
makeRemote: () => void;
|
|
7
|
-
startMapper: () => void;
|
|
8
|
-
stopMapper: () => void;
|
|
9
|
-
registerEventHandler: () => void;
|
|
10
|
-
unregisterEventHandler: () => void;
|
|
11
|
-
getViewProp: () => void;
|
|
12
|
-
};
|
|
13
|
-
export default _default;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|