react-native-reanimated 3.5.3 → 3.5.4

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.
@@ -1,9 +1,12 @@
1
1
  import { Platform } from 'react-native';
2
+
3
+ // This type is necessary since some libraries tend to do a lib check
4
+ // and this file causes type errors on `global` access.
2
5
  export function isJest() {
3
6
  return !!process.env.JEST_WORKER_ID;
4
7
  }
5
8
  export function isChromeDebugger() {
6
- return !global.nativeCallSyncHook || global.__REMOTEDEV__;
9
+ return !global.nativeCallSyncHook || !!global.__REMOTEDEV__;
7
10
  }
8
11
  export function isWeb() {
9
12
  return Platform.OS === 'web';
@@ -24,9 +27,12 @@ export function isWindowAvailable() {
24
27
  // the window object is unavailable when building the server portion of a site that uses SSG
25
28
  // this function shouldn't be used to conditionally render components
26
29
  // https://www.joshwcomeau.com/react/the-perils-of-rehydration/
30
+ // @ts-ignore Fallback if `window` is undefined.
27
31
  return typeof window !== 'undefined';
28
32
  }
29
33
  export function isReducedMotion() {
30
- return isWeb() ? isWindowAvailable() ? !window.matchMedia('(prefers-reduced-motion: no-preference)').matches : false : global._REANIMATED_IS_REDUCED_MOTION ?? false;
34
+ return isWeb() ? isWindowAvailable() ?
35
+ // @ts-ignore Fallback if `window` is undefined.
36
+ !window.matchMedia('(prefers-reduced-motion: no-preference)').matches : false : global._REANIMATED_IS_REDUCED_MOTION ?? false;
31
37
  }
32
38
  //# sourceMappingURL=PlatformChecker.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["Platform","isJest","process","env","JEST_WORKER_ID","isChromeDebugger","global","nativeCallSyncHook","__REMOTEDEV__","isWeb","OS","isAndroid","isWindows","shouldBeUseWeb","nativeShouldBeMock","isWindowAvailable","window","isReducedMotion","matchMedia","matches","_REANIMATED_IS_REDUCED_MOTION"],"sources":["PlatformChecker.ts"],"sourcesContent":["import { Platform } from 'react-native';\n\nexport function isJest(): boolean {\n return !!process.env.JEST_WORKER_ID;\n}\n\nexport function isChromeDebugger(): boolean {\n return !(global as any).nativeCallSyncHook || (global as any).__REMOTEDEV__;\n}\n\nexport function isWeb(): boolean {\n return Platform.OS === 'web';\n}\n\nexport function isAndroid(): boolean {\n return Platform.OS === 'android';\n}\n\nfunction isWindows(): boolean {\n return Platform.OS === 'windows';\n}\n\nexport function shouldBeUseWeb() {\n return isJest() || isChromeDebugger() || isWeb() || isWindows();\n}\n\nexport function nativeShouldBeMock() {\n return isJest() || isChromeDebugger() || isWindows();\n}\n\nexport function isWindowAvailable() {\n // the window object is unavailable when building the server portion of a site that uses SSG\n // this function shouldn't be used to conditionally render components\n // https://www.joshwcomeau.com/react/the-perils-of-rehydration/\n return typeof window !== 'undefined';\n}\n\nexport function isReducedMotion() {\n return isWeb()\n ? isWindowAvailable()\n ? !window.matchMedia('(prefers-reduced-motion: no-preference)').matches\n : false\n : global._REANIMATED_IS_REDUCED_MOTION ?? false;\n}\n"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,cAAc;AAEvC,OAAO,SAASC,MAAMA,CAAA,EAAY;EAChC,OAAO,CAAC,CAACC,OAAO,CAACC,GAAG,CAACC,cAAc;AACrC;AAEA,OAAO,SAASC,gBAAgBA,CAAA,EAAY;EAC1C,OAAO,CAAEC,MAAM,CAASC,kBAAkB,IAAKD,MAAM,CAASE,aAAa;AAC7E;AAEA,OAAO,SAASC,KAAKA,CAAA,EAAY;EAC/B,OAAOT,QAAQ,CAACU,EAAE,KAAK,KAAK;AAC9B;AAEA,OAAO,SAASC,SAASA,CAAA,EAAY;EACnC,OAAOX,QAAQ,CAACU,EAAE,KAAK,SAAS;AAClC;AAEA,SAASE,SAASA,CAAA,EAAY;EAC5B,OAAOZ,QAAQ,CAACU,EAAE,KAAK,SAAS;AAClC;AAEA,OAAO,SAASG,cAAcA,CAAA,EAAG;EAC/B,OAAOZ,MAAM,EAAE,IAAII,gBAAgB,EAAE,IAAII,KAAK,EAAE,IAAIG,SAAS,EAAE;AACjE;AAEA,OAAO,SAASE,kBAAkBA,CAAA,EAAG;EACnC,OAAOb,MAAM,EAAE,IAAII,gBAAgB,EAAE,IAAIO,SAAS,EAAE;AACtD;AAEA,OAAO,SAASG,iBAAiBA,CAAA,EAAG;EAClC;EACA;EACA;EACA,OAAO,OAAOC,MAAM,KAAK,WAAW;AACtC;AAEA,OAAO,SAASC,eAAeA,CAAA,EAAG;EAChC,OAAOR,KAAK,EAAE,GACVM,iBAAiB,EAAE,GACjB,CAACC,MAAM,CAACE,UAAU,CAAC,yCAAyC,CAAC,CAACC,OAAO,GACrE,KAAK,GACPb,MAAM,CAACc,6BAA6B,IAAI,KAAK;AACnD"}
1
+ {"version":3,"names":["Platform","isJest","process","env","JEST_WORKER_ID","isChromeDebugger","global","nativeCallSyncHook","__REMOTEDEV__","isWeb","OS","isAndroid","isWindows","shouldBeUseWeb","nativeShouldBeMock","isWindowAvailable","window","isReducedMotion","matchMedia","matches","_REANIMATED_IS_REDUCED_MOTION"],"sources":["PlatformChecker.ts"],"sourcesContent":["import { Platform } from 'react-native';\n\n// This type is necessary since some libraries tend to do a lib check\n// and this file causes type errors on `global` access.\ntype localGlobal = typeof global & Record<string, unknown>;\n\nexport function isJest(): boolean {\n return !!process.env.JEST_WORKER_ID;\n}\n\nexport function isChromeDebugger(): boolean {\n return (\n !(global as localGlobal).nativeCallSyncHook ||\n !!(global as localGlobal).__REMOTEDEV__\n );\n}\n\nexport function isWeb(): boolean {\n return Platform.OS === 'web';\n}\n\nexport function isAndroid(): boolean {\n return Platform.OS === 'android';\n}\n\nfunction isWindows(): boolean {\n return Platform.OS === 'windows';\n}\n\nexport function shouldBeUseWeb() {\n return isJest() || isChromeDebugger() || isWeb() || isWindows();\n}\n\nexport function nativeShouldBeMock() {\n return isJest() || isChromeDebugger() || isWindows();\n}\n\nexport function isWindowAvailable() {\n // the window object is unavailable when building the server portion of a site that uses SSG\n // this function shouldn't be used to conditionally render components\n // https://www.joshwcomeau.com/react/the-perils-of-rehydration/\n // @ts-ignore Fallback if `window` is undefined.\n return typeof window !== 'undefined';\n}\n\nexport function isReducedMotion() {\n return isWeb()\n ? isWindowAvailable()\n ? // @ts-ignore Fallback if `window` is undefined.\n !window.matchMedia('(prefers-reduced-motion: no-preference)').matches\n : false\n : (global as localGlobal)._REANIMATED_IS_REDUCED_MOTION ?? false;\n}\n"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,cAAc;;AAEvC;AACA;AAGA,OAAO,SAASC,MAAMA,CAAA,EAAY;EAChC,OAAO,CAAC,CAACC,OAAO,CAACC,GAAG,CAACC,cAAc;AACrC;AAEA,OAAO,SAASC,gBAAgBA,CAAA,EAAY;EAC1C,OACE,CAAEC,MAAM,CAAiBC,kBAAkB,IAC3C,CAAC,CAAED,MAAM,CAAiBE,aAAa;AAE3C;AAEA,OAAO,SAASC,KAAKA,CAAA,EAAY;EAC/B,OAAOT,QAAQ,CAACU,EAAE,KAAK,KAAK;AAC9B;AAEA,OAAO,SAASC,SAASA,CAAA,EAAY;EACnC,OAAOX,QAAQ,CAACU,EAAE,KAAK,SAAS;AAClC;AAEA,SAASE,SAASA,CAAA,EAAY;EAC5B,OAAOZ,QAAQ,CAACU,EAAE,KAAK,SAAS;AAClC;AAEA,OAAO,SAASG,cAAcA,CAAA,EAAG;EAC/B,OAAOZ,MAAM,EAAE,IAAII,gBAAgB,EAAE,IAAII,KAAK,EAAE,IAAIG,SAAS,EAAE;AACjE;AAEA,OAAO,SAASE,kBAAkBA,CAAA,EAAG;EACnC,OAAOb,MAAM,EAAE,IAAII,gBAAgB,EAAE,IAAIO,SAAS,EAAE;AACtD;AAEA,OAAO,SAASG,iBAAiBA,CAAA,EAAG;EAClC;EACA;EACA;EACA;EACA,OAAO,OAAOC,MAAM,KAAK,WAAW;AACtC;AAEA,OAAO,SAASC,eAAeA,CAAA,EAAG;EAChC,OAAOR,KAAK,EAAE,GACVM,iBAAiB,EAAE;EACjB;EACA,CAACC,MAAM,CAACE,UAAU,CAAC,yCAAyC,CAAC,CAACC,OAAO,GACrE,KAAK,GACNb,MAAM,CAAiBc,6BAA6B,IAAI,KAAK;AACpE"}
@@ -1 +1 @@
1
- {"version":3,"names":["useEvent","useHandler","useAnimatedScrollHandler","handlers","dependencies","scrollHandlers","onScroll","context","doDependenciesDiffer","subscribeForEvents","onBeginDrag","undefined","push","onEndDrag","onMomentumBegin","onMomentumEnd","event","eventName","endsWith"],"sources":["useAnimatedScrollHandler.ts"],"sourcesContent":["import type { RefObject } from 'react';\nimport type { NativeScrollEvent, NativeSyntheticEvent } from 'react-native';\nimport type { __Context, NativeEvent, __WorkletFunction } from '../commonTypes';\nimport type WorkletEventHandler from '../WorkletEventHandler';\nimport type { DependencyList } from './commonTypes';\nimport { useEvent, useHandler } from './Hooks';\n\nexport interface ScrollHandler<TContext extends __Context>\n extends __WorkletFunction {\n (event: NativeScrollEvent, context?: TContext): void;\n}\n\nexport interface ScrollEvent\n extends NativeScrollEvent,\n NativeEvent<ScrollEvent> {\n eventName: string;\n}\nexport interface ScrollHandlers<TContext extends __Context> {\n [key: string]: ScrollHandler<TContext> | undefined;\n onScroll?: ScrollHandler<TContext>;\n onBeginDrag?: ScrollHandler<TContext>;\n onEndDrag?: ScrollHandler<TContext>;\n onMomentumBegin?: ScrollHandler<TContext>;\n onMomentumEnd?: ScrollHandler<TContext>;\n}\n\n// TODO TYPESCRIPT This is a temporary type to get rid of .d.ts file.\ntype OnScroll = (event: NativeSyntheticEvent<NativeScrollEvent>) => void;\n\n// TODO TYPESCRIPT This is a temporary type to get rid of .d.ts file.\nexport type useAnimatedScrollHandler = <\n TContext extends __Context = Record<string, never>\n>(\n handlers: ScrollHandlers<TContext> | ScrollHandler<TContext>,\n deps?: DependencyList\n) => OnScroll;\n\nexport const useAnimatedScrollHandler = function <TContext extends __Context>(\n handlers: ScrollHandlers<TContext> | ScrollHandler<TContext>,\n dependencies?: DependencyList\n): RefObject<WorkletEventHandler<ScrollEvent>> {\n // case when handlers is a function\n const scrollHandlers: ScrollHandlers<TContext> =\n typeof handlers === 'function' ? { onScroll: handlers } : handlers;\n const { context, doDependenciesDiffer } = useHandler<ScrollEvent, TContext>(\n scrollHandlers,\n dependencies\n );\n\n // build event subscription array\n const subscribeForEvents = ['onScroll'];\n if (scrollHandlers.onBeginDrag !== undefined) {\n subscribeForEvents.push('onScrollBeginDrag');\n }\n if (scrollHandlers.onEndDrag !== undefined) {\n subscribeForEvents.push('onScrollEndDrag');\n }\n if (scrollHandlers.onMomentumBegin !== undefined) {\n subscribeForEvents.push('onMomentumScrollBegin');\n }\n if (scrollHandlers.onMomentumEnd !== undefined) {\n subscribeForEvents.push('onMomentumScrollEnd');\n }\n\n return useEvent<ScrollEvent>(\n (event: ScrollEvent) => {\n 'worklet';\n const {\n onScroll,\n onBeginDrag,\n onEndDrag,\n onMomentumBegin,\n onMomentumEnd,\n } = scrollHandlers;\n if (onScroll && event.eventName.endsWith('onScroll')) {\n onScroll(event, context);\n } else if (onBeginDrag && event.eventName.endsWith('onScrollBeginDrag')) {\n onBeginDrag(event, context);\n } else if (onEndDrag && event.eventName.endsWith('onScrollEndDrag')) {\n onEndDrag(event, context);\n } else if (\n onMomentumBegin &&\n event.eventName.endsWith('onMomentumScrollBegin')\n ) {\n onMomentumBegin(event, context);\n } else if (\n onMomentumEnd &&\n event.eventName.endsWith('onMomentumScrollEnd')\n ) {\n onMomentumEnd(event, context);\n }\n },\n subscribeForEvents,\n doDependenciesDiffer\n // TODO TYPESCRIPT This temporary cast is to get rid of .d.ts file.\n ) as any;\n // TODO TYPESCRIPT This temporary cast is to get rid of .d.ts file.\n} as unknown as useAnimatedScrollHandler;\n"],"mappings":"AAKA,SAASA,QAAQ,EAAEC,UAAU,QAAQ,SAAS;;AAqB9C;;AAGA;;AAQA,OAAO,MAAMC,wBAAwB,GAAG,SAAAA,CACtCC,QAA4D,EAC5DC,YAA6B,EACgB;EAC7C;EACA,MAAMC,cAAwC,GAC5C,OAAOF,QAAQ,KAAK,UAAU,GAAG;IAAEG,QAAQ,EAAEH;EAAS,CAA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ACAJ,eAAe,CAACE,KAAK,EAAET,OAAO,CAAC;IACjC,CAAC,MAAM,IACLQ,aAAa,IACbC,KAAK,CAACC,SAAS,CAACC,QAAQ,CAAC,qBAAqB,CAAC,EAC/C;MACAH,aAAa,CAACC,KAAK,EAAET,OAAO,CAAC;IAC/B;EACF,CAAC,EACDE,kBAAkB,EAClBD;EACA;EAAA,CACD;EACD;AACF,CAAwC"}
1
+ {"version":3,"names":["useEvent","useHandler","useAnimatedScrollHandler","handlers","dependencies","scrollHandlers","onScroll","context","doDependenciesDiffer","subscribeForEvents","onBeginDrag","undefined","push","onEndDrag","onMomentumBegin","onMomentumEnd","event","eventName","endsWith"],"sources":["useAnimatedScrollHandler.ts"],"sourcesContent":["import type { RefObject } from 'react';\nimport type { NativeScrollEvent, NativeSyntheticEvent } from 'react-native';\nimport type { __Context, NativeEvent, __WorkletFunction } from '../commonTypes';\nimport type WorkletEventHandler from '../WorkletEventHandler';\nimport type { DependencyList } from './commonTypes';\nimport { useEvent, useHandler } from './Hooks';\n\nexport interface ScrollHandler<TContext extends __Context>\n extends __WorkletFunction {\n (event: NativeScrollEvent, context?: TContext): void;\n}\n\nexport interface ScrollEvent\n extends NativeScrollEvent,\n NativeEvent<ScrollEvent> {\n eventName: string;\n}\nexport interface ScrollHandlers<TContext extends __Context> {\n [key: string]: ScrollHandler<TContext> | undefined;\n onScroll?: ScrollHandler<TContext>;\n onBeginDrag?: ScrollHandler<TContext>;\n onEndDrag?: ScrollHandler<TContext>;\n onMomentumBegin?: ScrollHandler<TContext>;\n onMomentumEnd?: ScrollHandler<TContext>;\n}\n\n// TODO TYPESCRIPT This is a temporary type to get rid of .d.ts file.\ntype OnScroll = (event: NativeSyntheticEvent<NativeScrollEvent>) => void;\n\n// TODO TYPESCRIPT This is a temporary type to get rid of .d.ts file.\ntype useAnimatedScrollHandlerType = <\n TContext extends __Context = Record<string, never>\n>(\n handlers: ScrollHandlers<TContext> | ScrollHandler<TContext>,\n deps?: DependencyList\n) => OnScroll;\n\nexport const useAnimatedScrollHandler = function <TContext extends __Context>(\n handlers: ScrollHandlers<TContext> | ScrollHandler<TContext>,\n dependencies?: DependencyList\n): RefObject<WorkletEventHandler<ScrollEvent>> {\n // case when handlers is a function\n const scrollHandlers: ScrollHandlers<TContext> =\n typeof handlers === 'function' ? { onScroll: handlers } : handlers;\n const { context, doDependenciesDiffer } = useHandler<ScrollEvent, TContext>(\n scrollHandlers,\n dependencies\n );\n\n // build event subscription array\n const subscribeForEvents = ['onScroll'];\n if (scrollHandlers.onBeginDrag !== undefined) {\n subscribeForEvents.push('onScrollBeginDrag');\n }\n if (scrollHandlers.onEndDrag !== undefined) {\n subscribeForEvents.push('onScrollEndDrag');\n }\n if (scrollHandlers.onMomentumBegin !== undefined) {\n subscribeForEvents.push('onMomentumScrollBegin');\n }\n if (scrollHandlers.onMomentumEnd !== undefined) {\n subscribeForEvents.push('onMomentumScrollEnd');\n }\n\n return useEvent<ScrollEvent>(\n (event: ScrollEvent) => {\n 'worklet';\n const {\n onScroll,\n onBeginDrag,\n onEndDrag,\n onMomentumBegin,\n onMomentumEnd,\n } = scrollHandlers;\n if (onScroll && event.eventName.endsWith('onScroll')) {\n onScroll(event, context);\n } else if (onBeginDrag && event.eventName.endsWith('onScrollBeginDrag')) {\n onBeginDrag(event, context);\n } else if (onEndDrag && event.eventName.endsWith('onScrollEndDrag')) {\n onEndDrag(event, context);\n } else if (\n onMomentumBegin &&\n event.eventName.endsWith('onMomentumScrollBegin')\n ) {\n onMomentumBegin(event, context);\n } else if (\n onMomentumEnd &&\n event.eventName.endsWith('onMomentumScrollEnd')\n ) {\n onMomentumEnd(event, context);\n }\n },\n subscribeForEvents,\n doDependenciesDiffer\n // TODO TYPESCRIPT This temporary cast is to get rid of .d.ts file.\n ) as any;\n // TODO TYPESCRIPT This temporary cast is to get rid of .d.ts file.\n} as unknown as useAnimatedScrollHandlerType;\n"],"mappings":"AAKA,SAASA,QAAQ,EAAEC,UAAU,QAAQ,SAAS;;A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AACC,SAAS,CAACC,QAAQ,CAAC,iBAAiB,CAAC,EAAE;MACnEL,SAAS,CAACG,KAAK,EAAET,OAAO,CAAC;IAC3B,CAAC,MAAM,IACLO,eAAe,IACfE,KAAK,CAACC,SAAS,CAACC,QAAQ,CAAC,uBAAuB,CAAC,EACjD;MACAJ,eAAe,CAACE,KAAK,EAAET,OAAO,CAAC;IACjC,CAAC,MAAM,IACLQ,aAAa,IACbC,KAAK,CAACC,SAAS,CAACC,QAAQ,CAAC,qBAAqB,CAAC,EAC/C;MACAH,aAAa,CAACC,KAAK,EAAET,OAAO,CAAC;IAC/B;EACF,CAAC,EACDE,kBAAkB,EAClBD;EACA;EAAA,CACD;EACD;AACF,CAA4C"}
@@ -2,8 +2,8 @@ import './publicGlobals';
2
2
  export { runOnJS, runOnUI, createWorkletRuntime, makeMutable, makeShareableCloneRecursive, isReanimated3, isConfigured, enableLayoutAnimations, getViewProp } from './core';
3
3
  export { useAnimatedProps, useEvent, useHandler, useWorkletCallback, useSharedValue, useReducedMotion, useAnimatedStyle, useAnimatedGestureHandler, useAnimatedReaction, useAnimatedRef, useAnimatedScrollHandler, useDerivedValue, useAnimatedSensor, useFrameCallback, useAnimatedKeyboard, useScrollViewOffset } from './hook';
4
4
  export { cancelAnimation, defineAnimation, withTiming, withSpring, withDecay, withDelay, withRepeat, withSequence } from './animation';
5
- export { interpolate, clamp } from './interpolation';
6
- export { Extrapolate, interpolateColor, useInterpolateConfig } from './interpolateColor';
5
+ export { Extrapolation, interpolate, clamp } from './interpolation';
6
+ export { Extrapolate, ColorSpace, interpolateColor, useInterpolateConfig } from './interpolateColor';
7
7
  export { Easing } from './Easing';
8
8
  export { measure, dispatchCommand, scrollTo, setGestureState } from './NativeMethods';
9
9
  export { setNativeProps } from './SetNativeProps';
@@ -1 +1 @@
1
- {"version":3,"names":["runOnJS","runOnUI","createWorkletRuntime","makeMutable","makeShareableCloneRecursive","isReanimated3","isConfigured","enableLayoutAnimations","getViewProp","useAnimatedProps","useEvent","useHandler","useWorkletCallback","useSharedValue","useReducedMotion","useAnimatedStyle","useAnimatedGestureHandler","useAnimatedReaction","useAnimatedRef","useAnimatedScrollHandler","useDerivedValue","useAnimatedSensor","useFrameCallback","useAnimatedKeyboard","useScrollViewOffset","cancelAnimation","defineAnimation","withTiming","withSpring","withDecay","withDelay","withRepeat","withSequence","interpolate","clamp","Extrapolate","interpolateColor","useInterpolateConfig","Easing","measure","dispatchCommand","scrollTo","setGestureState","setNativeProps","isColor","processColor","convertToRGBA","createAnimatedPropAdapter","BaseAnimationBuilder","ComplexAnimationBuilder","Keyframe","FlipInXUp","FlipInYLeft","FlipInXDown","FlipInYRight","FlipInEasyX","FlipInEasyY","FlipOutXUp","FlipOutYLeft","FlipOutXDown","FlipOutYRight","FlipOutEasyX","FlipOutEasyY","StretchInX","StretchInY","StretchOutX","StretchOutY","FadeIn","FadeInRight","FadeInLeft","FadeInUp","FadeInDown","FadeOut","FadeOutRight","FadeOutLeft","FadeOutUp","FadeOutDown","SlideInRight","SlideInLeft","SlideOutRight","SlideOutLeft","SlideInUp","SlideInDown","SlideOutUp","SlideOutDown","ZoomIn","ZoomInRotate","ZoomInLeft","ZoomInRight","ZoomInUp","ZoomInDown","ZoomInEasyUp","ZoomInEasyDown","ZoomOut","ZoomOutRotate","ZoomOutLeft","ZoomOutRight","ZoomOutUp","ZoomOutDown","ZoomOutEasyUp","ZoomOutEasyDown","BounceIn","BounceInDown","BounceInUp","BounceInLeft","BounceInRight","BounceOut","BounceOutDown","BounceOutUp","BounceOutLeft","BounceOutRight","LightSpeedInRight","LightSpeedInLeft","LightSpeedOutRight","LightSpeedOutLeft","PinwheelIn","PinwheelOut","RotateInDownLeft","RotateInDownRight","RotateInUpLeft","RotateInUpRight","RotateOutDownLeft","RotateOutDownRight","RotateOutUpLeft","RotateOutUpRight","RollInLeft","RollInRight","RollOutLeft","RollOutRight","Layout","LinearTransition","FadingTransition","SequencedTransition","JumpingTransition","CurvedTransition","EntryExitTransition","combineTransition","SharedTransition","SharedTransitionType","getRelativeCoords","isSharedValue","SensorType","IOSReferenceFrame","InterfaceOrientation","KeyboardState","ReduceMotion","getUseOfValueInStyleWarning","withReanimatedTimer","advanceAnimationByTime","advanceAnimationByFrame","setUpTests","getAnimatedStyle","startMapper","stopMapper"],"sources":["index.ts"],"sourcesContent":["import './publicGlobals';\n\nexport type { WorkletRuntime } from './core';\nexport {\n runOnJS,\n runOnUI,\n createWorkletRuntime,\n makeMutable,\n makeShareableCloneRecursive,\n isReanimated3,\n isConfigured,\n enableLayoutAnimations,\n getViewProp,\n} from './core';\nexport type {\n GestureHandlers,\n AnimatedRef,\n ScrollHandler,\n ScrollHandlers,\n DerivedValue,\n FrameCallback,\n} from './hook';\nexport {\n useAnimatedProps,\n useEvent,\n useHandler,\n useWorkletCallback,\n useSharedValue,\n useReducedMotion,\n useAnimatedStyle,\n useAnimatedGestureHandler,\n useAnimatedReaction,\n useAnimatedRef,\n useAnimatedScrollHandler,\n useDerivedValue,\n useAnimatedSensor,\n useFrameCallback,\n useAnimatedKeyboard,\n useScrollViewOffset,\n} from './hook';\nexport type {\n DelayAnimation,\n RepeatAnimation,\n SequenceAnimation,\n StyleLayoutAnimation,\n WithTimingConfig,\n TimingAnimation,\n WithSpringConfig,\n SpringAnimation,\n WithDecayConfig,\n DecayAnimation,\n} from './animation';\nexport {\n cancelAnimation,\n defineAnimation,\n withTiming,\n withSpring,\n withDecay,\n withDelay,\n withRepeat,\n withSequence,\n} from './animation';\nexport type {\n Extrapolation,\n ExtrapolationConfig,\n ExtrapolationType,\n} from './interpolation';\nexport { interpolate, clamp } from './interpolation';\nexport type {\n InterpolationOptions,\n ColorSpace,\n InterpolateConfig,\n InterpolateRGB,\n InterpolateHSV,\n} from './interpolateColor';\nexport {\n Extrapolate,\n interpolateColor,\n useInterpolateConfig,\n} from './interpolateColor';\nexport type {\n EasingFunction,\n EasingFn,\n EasingFunctionFactory,\n EasingFactoryFn,\n} from './Easing';\nexport { Easing } from './Easing';\nexport {\n measure,\n dispatchCommand,\n scrollTo,\n setGestureState,\n} from './NativeMethods';\nexport { setNativeProps } from './SetNativeProps';\nexport type { ParsedColorArray } from './Colors';\nexport { isColor, processColor, convertToRGBA } from './Colors';\nexport { createAnimatedPropAdapter } from './PropAdapters';\nexport type {\n LayoutAnimation,\n EntryAnimationsValues,\n ExitAnimationsValues,\n EntryExitAnimationFunction,\n LayoutAnimationsValues,\n LayoutAnimationFunction,\n ILayoutAnimationBuilder,\n IEntryExitAnimationBuilder,\n} from './layoutReanimation';\nexport {\n BaseAnimationBuilder,\n ComplexAnimationBuilder,\n Keyframe,\n // Flip\n FlipInXUp,\n FlipInYLeft,\n FlipInXDown,\n FlipInYRight,\n FlipInEasyX,\n FlipInEasyY,\n FlipOutXUp,\n FlipOutYLeft,\n FlipOutXDown,\n FlipOutYRight,\n FlipOutEasyX,\n FlipOutEasyY,\n // Stretch\n StretchInX,\n StretchInY,\n StretchOutX,\n StretchOutY,\n // Fade\n FadeIn,\n FadeInRight,\n FadeInLeft,\n FadeInUp,\n FadeInDown,\n FadeOut,\n FadeOutRight,\n FadeOutLeft,\n FadeOutUp,\n FadeOutDown,\n // Slide\n SlideInRight,\n SlideInLeft,\n SlideOutRight,\n SlideOutLeft,\n SlideInUp,\n SlideInDown,\n SlideOutUp,\n SlideOutDown,\n // Zoom\n ZoomIn,\n ZoomInRotate,\n ZoomInLeft,\n ZoomInRight,\n ZoomInUp,\n ZoomInDown,\n ZoomInEasyUp,\n ZoomInEasyDown,\n ZoomOut,\n ZoomOutRotate,\n ZoomOutLeft,\n ZoomOutRight,\n ZoomOutUp,\n ZoomOutDown,\n ZoomOutEasyUp,\n ZoomOutEasyDown,\n // Bounce\n BounceIn,\n BounceInDown,\n BounceInUp,\n BounceInLeft,\n BounceInRight,\n BounceOut,\n BounceOutDown,\n BounceOutUp,\n BounceOutLeft,\n BounceOutRight,\n // Lightspeed\n LightSpeedInRight,\n LightSpeedInLeft,\n LightSpeedOutRight,\n LightSpeedOutLeft,\n // Pinwheel\n PinwheelIn,\n PinwheelOut,\n // Rotate\n RotateInDownLeft,\n RotateInDownRight,\n RotateInUpLeft,\n RotateInUpRight,\n RotateOutDownLeft,\n RotateOutDownRight,\n RotateOutUpLeft,\n RotateOutUpRight,\n // Roll\n RollInLeft,\n RollInRight,\n RollOutLeft,\n RollOutRight,\n // Transitions\n Layout,\n LinearTransition,\n FadingTransition,\n SequencedTransition,\n JumpingTransition,\n CurvedTransition,\n EntryExitTransition,\n combineTransition,\n // SET\n SharedTransition,\n SharedTransitionType,\n} from './layoutReanimation';\nexport type { ComponentCoords } from './utils';\nexport { getRelativeCoords, isSharedValue } from './utils';\nexport type {\n StyleProps,\n SharedValue,\n AnimatableValueObject,\n AnimatableValue,\n AnimationObject,\n SensorConfig,\n Animation,\n AnimatedSensor,\n AnimationCallback,\n Value3D,\n ValueRotation,\n AnimatedKeyboardInfo,\n AnimatedKeyboardOptions,\n MeasuredDimensions,\n} from './commonTypes';\nexport {\n SensorType,\n IOSReferenceFrame,\n InterfaceOrientation,\n KeyboardState,\n ReduceMotion,\n} from './commonTypes';\nexport type { FrameInfo } from './frameCallback';\nexport { getUseOfValueInStyleWarning } from './pluginUtils';\nexport {\n withReanimatedTimer,\n advanceAnimationByTime,\n advanceAnimationByFrame,\n setUpTests,\n getAnimatedStyle,\n} from './jestUtils';\nexport type {\n Adaptable,\n AdaptTransforms,\n AnimateProps,\n AnimatedProps,\n AnimatedTransform,\n TransformStyleTypes,\n TransformArrayItem,\n AnimateStyle,\n AnimatedStyle,\n AnimatedStyleProp,\n StylesOrDefault,\n} from './helperTypes';\nexport type { AnimatedScrollViewProps } from './component/ScrollView';\nexport type { FlatListPropsWithLayout } from './component/FlatList';\nexport { startMapper, stopMapper } from './mappers';\n"],"mappings":"AAAA,OAAO,iBAAiB;AAGxB,SACEA,OAAO,EACPC,OAAO,EACPC,oBAAoB,EACpBC,WAAW,EACXC,2BAA2B,EAC3BC,aAAa,EACbC,YAAY,EACZ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C,MAAM,EACNC,YAAY,EACZC,UAAU,EACVC,WAAW,EACXC,QAAQ,EACRC,UAAU,EACVC,YAAY,EACZC,cAAc,EACdC,OAAO,EACPC,aAAa,EACbC,WAAW,EACXC,YAAY,EACZC,SAAS,EACTC,WAAW,EACXC,aAAa,EACbC,eAAe;AACf;AACAC,QAAQ,EACRC,YAAY,EACZC,UAAU,EACVC,YAAY,EACZC,aAAa,EACbC,SAAS,EACTC,aAAa,EACbC,WAAW,EACXC,aAAa,EACbC,cAAc;AACd;AACAC,iBAAiB,EACjBC,gBAAgB,EAChBC,kBAAkB,EAClBC,iBAAiB;AACjB;AACAC,UAAU,EACVC,WAAW;AACX;AACAC,gBAAgB,EAChBC,iBAAiB,EACjBC,cAAc,EACdC,eAAe,EACfC,iBAAiB,EACjBC,kBAAkB,EAClBC,eAAe,EACfC,gBAAgB;AAChB;AACAC,UAAU,EACVC,WAAW,EACXC,WAAW,EACXC,YAAY;AACZ;AACAC,MAAM,EACNC,gBAAgB,EAChBC,gBAAgB,EAChBC,mBAAmB,EACnBC,iBAAiB,EACjBC,gBAAgB,EAChBC,mBAAmB,EACnBC,iBAAiB;AACjB;AACAC,gBAAgB,EAChBC,oBAAoB,QACf,qBAAqB;AAE5B,SAASC,iBAAiB,EAAEC,aAAa,QAAQ,SAAS;AAiB1D,SACEC,UAAU,EACVC,iBAAiB,EACjBC,oBAAoB,EACpBC,aAAa,EACbC,YAAY,QACP,eAAe;AAEtB,SAASC,2BAA2B,QAAQ,eAAe;AAC3D,SACEC,mBAAmB,EACnBC,sBAAsB,EACtBC,uBAAuB,EACvBC,UAAU,EACVC,gBAAgB,QACX,aAAa;AAgBpB,SAASC,WAAW,EAAEC,UAAU,QAAQ,WAAW"}
1
+ {"version":3,"names":["runOnJS","runOnUI","createWorkletRuntime","makeMutable","makeShareableCloneRecursive","isReanimated3","isConfigured","enableLayoutAnimations","getViewProp","useAnimatedProps","useEvent","useHandler","useWorkletCallback","useSharedValue","useReducedMotion","useAnimatedStyle","useAnimatedGestureHandler","useAnimatedReaction","useAnimatedRef","useAnimatedScrollHandler","useDerivedValue","useAnimatedSensor","useFrameCallback","useAnimatedKeyboard","useScrollViewOffset","cancelAnimation","defineAnimation","withTiming","withSpring","withDecay","withDelay","withRepeat","withSequence","Extrapolation","interpolate","clamp","Extrapolate","ColorSpace","interpolateColor","useInterpolateConfig","Easing","measure","dispatchCommand","scrollTo","setGestureState","setNativeProps","isColor","processColor","convertToRGBA","createAnimatedPropAdapter","BaseAnimationBuilder","ComplexAnimationBuilder","Keyframe","FlipInXUp","FlipInYLeft","FlipInXDown","FlipInYRight","FlipInEasyX","FlipInEasyY","FlipOutXUp","FlipOutYLeft","FlipOutXDown","FlipOutYRight","FlipOutEasyX","FlipOutEasyY","StretchInX","StretchInY","StretchOutX","StretchOutY","FadeIn","FadeInRight","FadeInLeft","FadeInUp","FadeInDown","FadeOut","FadeOutRight","FadeOutLeft","FadeOutUp","FadeOutDown","SlideInRight","SlideInLeft","SlideOutRight","SlideOutLeft","SlideInUp","SlideInDown","SlideOutUp","SlideOutDown","ZoomIn","ZoomInRotate","ZoomInLeft","ZoomInRight","ZoomInUp","ZoomInDown","ZoomInEasyUp","ZoomInEasyDown","ZoomOut","ZoomOutRotate","ZoomOutLeft","ZoomOutRight","ZoomOutUp","ZoomOutDown","ZoomOutEasyUp","ZoomOutEasyDown","BounceIn","BounceInDown","BounceInUp","BounceInLeft","BounceInRight","BounceOut","BounceOutDown","BounceOutUp","BounceOutLeft","BounceOutRight","LightSpeedInRight","LightSpeedInLeft","LightSpeedOutRight","LightSpeedOutLeft","PinwheelIn","PinwheelOut","RotateInDownLeft","RotateInDownRight","RotateInUpLeft","RotateInUpRight","RotateOutDownLeft","RotateOutDownRight","RotateOutUpLeft","RotateOutUpRight","RollInLeft","RollInRight","RollOutLeft","RollOutRight","Layout","LinearTransition","FadingTransition","SequencedTransition","JumpingTransition","CurvedTransition","EntryExitTransition","combineTransition","SharedTransition","SharedTransitionType","getRelativeCoords","isSharedValue","SensorType","IOSReferenceFrame","InterfaceOrientation","KeyboardState","ReduceMotion","getUseOfValueInStyleWarning","withReanimatedTimer","advanceAnimationByTime","advanceAnimationByFrame","setUpTests","getAnimatedStyle","startMapper","stopMapper"],"sources":["index.ts"],"sourcesContent":["import './publicGlobals';\n\nexport type { WorkletRuntime } from './core';\nexport {\n runOnJS,\n runOnUI,\n createWorkletRuntime,\n makeMutable,\n makeShareableCloneRecursive,\n isReanimated3,\n isConfigured,\n enableLayoutAnimations,\n getViewProp,\n} from './core';\nexport type {\n GestureHandlers,\n AnimatedRef,\n ScrollHandler,\n ScrollHandlers,\n DerivedValue,\n FrameCallback,\n} from './hook';\nexport {\n useAnimatedProps,\n useEvent,\n useHandler,\n useWorkletCallback,\n useSharedValue,\n useReducedMotion,\n useAnimatedStyle,\n useAnimatedGestureHandler,\n useAnimatedReaction,\n useAnimatedRef,\n useAnimatedScrollHandler,\n useDerivedValue,\n useAnimatedSensor,\n useFrameCallback,\n useAnimatedKeyboard,\n useScrollViewOffset,\n} from './hook';\nexport type {\n DelayAnimation,\n RepeatAnimation,\n SequenceAnimation,\n StyleLayoutAnimation,\n WithTimingConfig,\n TimingAnimation,\n WithSpringConfig,\n SpringAnimation,\n WithDecayConfig,\n DecayAnimation,\n} from './animation';\nexport {\n cancelAnimation,\n defineAnimation,\n withTiming,\n withSpring,\n withDecay,\n withDelay,\n withRepeat,\n withSequence,\n} from './animation';\nexport type { ExtrapolationConfig, ExtrapolationType } from './interpolation';\nexport { Extrapolation, interpolate, clamp } from './interpolation';\nexport type {\n InterpolationOptions,\n InterpolateConfig,\n InterpolateRGB,\n InterpolateHSV,\n} from './interpolateColor';\nexport {\n Extrapolate,\n ColorSpace,\n interpolateColor,\n useInterpolateConfig,\n} from './interpolateColor';\nexport type {\n EasingFunction,\n EasingFn,\n EasingFunctionFactory,\n EasingFactoryFn,\n} from './Easing';\nexport { Easing } from './Easing';\nexport {\n measure,\n dispatchCommand,\n scrollTo,\n setGestureState,\n} from './NativeMethods';\nexport { setNativeProps } from './SetNativeProps';\nexport type { ParsedColorArray } from './Colors';\nexport { isColor, processColor, convertToRGBA } from './Colors';\nexport { createAnimatedPropAdapter } from './PropAdapters';\nexport type {\n LayoutAnimation,\n EntryAnimationsValues,\n ExitAnimationsValues,\n EntryExitAnimationFunction,\n LayoutAnimationsValues,\n LayoutAnimationFunction,\n ILayoutAnimationBuilder,\n IEntryExitAnimationBuilder,\n} from './layoutReanimation';\nexport {\n BaseAnimationBuilder,\n ComplexAnimationBuilder,\n Keyframe,\n // Flip\n FlipInXUp,\n FlipInYLeft,\n FlipInXDown,\n FlipInYRight,\n FlipInEasyX,\n FlipInEasyY,\n FlipOutXUp,\n FlipOutYLeft,\n FlipOutXDown,\n FlipOutYRight,\n FlipOutEasyX,\n FlipOutEasyY,\n // Stretch\n StretchInX,\n StretchInY,\n StretchOutX,\n StretchOutY,\n // Fade\n FadeIn,\n FadeInRight,\n FadeInLeft,\n FadeInUp,\n FadeInDown,\n FadeOut,\n FadeOutRight,\n FadeOutLeft,\n FadeOutUp,\n FadeOutDown,\n // Slide\n SlideInRight,\n SlideInLeft,\n SlideOutRight,\n SlideOutLeft,\n SlideInUp,\n SlideInDown,\n SlideOutUp,\n SlideOutDown,\n // Zoom\n ZoomIn,\n ZoomInRotate,\n ZoomInLeft,\n ZoomInRight,\n ZoomInUp,\n ZoomInDown,\n ZoomInEasyUp,\n ZoomInEasyDown,\n ZoomOut,\n ZoomOutRotate,\n ZoomOutLeft,\n ZoomOutRight,\n ZoomOutUp,\n ZoomOutDown,\n ZoomOutEasyUp,\n ZoomOutEasyDown,\n // Bounce\n BounceIn,\n BounceInDown,\n BounceInUp,\n BounceInLeft,\n BounceInRight,\n BounceOut,\n BounceOutDown,\n BounceOutUp,\n BounceOutLeft,\n BounceOutRight,\n // Lightspeed\n LightSpeedInRight,\n LightSpeedInLeft,\n LightSpeedOutRight,\n LightSpeedOutLeft,\n // Pinwheel\n PinwheelIn,\n PinwheelOut,\n // Rotate\n RotateInDownLeft,\n RotateInDownRight,\n RotateInUpLeft,\n RotateInUpRight,\n RotateOutDownLeft,\n RotateOutDownRight,\n RotateOutUpLeft,\n RotateOutUpRight,\n // Roll\n RollInLeft,\n RollInRight,\n RollOutLeft,\n RollOutRight,\n // Transitions\n Layout,\n LinearTransition,\n FadingTransition,\n SequencedTransition,\n JumpingTransition,\n CurvedTransition,\n EntryExitTransition,\n combineTransition,\n // SET\n SharedTransition,\n SharedTransitionType,\n} from './layoutReanimation';\nexport type { ComponentCoords } from './utils';\nexport { getRelativeCoords, isSharedValue } from './utils';\nexport type {\n StyleProps,\n SharedValue,\n AnimatableValueObject,\n AnimatableValue,\n AnimationObject,\n SensorConfig,\n Animation,\n AnimatedSensor,\n AnimationCallback,\n Value3D,\n ValueRotation,\n AnimatedKeyboardInfo,\n AnimatedKeyboardOptions,\n MeasuredDimensions,\n} from './commonTypes';\nexport {\n SensorType,\n IOSReferenceFrame,\n InterfaceOrientation,\n KeyboardState,\n ReduceMotion,\n} from './commonTypes';\nexport type { FrameInfo } from './frameCallback';\nexport { getUseOfValueInStyleWarning } from './pluginUtils';\nexport {\n withReanimatedTimer,\n advanceAnimationByTime,\n advanceAnimationByFrame,\n setUpTests,\n getAnimatedStyle,\n} from './jestUtils';\nexport type {\n Adaptable,\n AdaptTransforms,\n AnimateProps,\n AnimatedProps,\n AnimatedTransform,\n TransformStyleTypes,\n TransformArrayItem,\n AnimateStyle,\n AnimatedStyle,\n AnimatedStyleProp,\n StylesOrDefault,\n} from './helperTypes';\nexport type { AnimatedScrollViewProps } from './component/ScrollView';\nexport type { FlatListPropsWithLayout } from './component/FlatList';\nexport { startMapper, stopMapper } from './mappers';\n"],"mappings":"AAAA,OAAO,iBAAiB;AAGxB,SACEA,OAAO,EACPC,OAAO,EACPC,oBAAoB,EACpBC,WAAW,EACXC,2BAA2B,EAC3BC,aAAa,EACbC,YAAY,EACZC,sBAAsB,EACtBC,WAAW,QACN,QAAQ;AASf,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AAY,EACZC,UAAU,EACVC,WAAW,EACXC,QAAQ,EACRC,UAAU,EACVC,YAAY,EACZC,cAAc,EACdC,OAAO,EACPC,aAAa,EACbC,WAAW,EACXC,YAAY,EACZC,SAAS,EACTC,WAAW,EACXC,aAAa,EACbC,eAAe;AACf;AACAC,QAAQ,EACRC,YAAY,EACZC,UAAU,EACVC,YAAY,EACZC,aAAa,EACbC,SAAS,EACTC,aAAa,EACbC,WAAW,EACXC,aAAa,EACbC,cAAc;AACd;AACAC,iBAAiB,EACjBC,gBAAgB,EAChBC,kBAAkB,EAClBC,iBAAiB;AACjB;AACAC,UAAU,EACVC,WAAW;AACX;AACAC,gBAAgB,EAChBC,iBAAiB,EACjBC,cAAc,EACdC,eAAe,EACfC,iBAAiB,EACjBC,kBAAkB,EAClBC,eAAe,EACfC,gBAAgB;AAChB;AACAC,UAAU,EACVC,WAAW,EACXC,WAAW,EACXC,YAAY;AACZ;AACAC,MAAM,EACNC,gBAAgB,EAChBC,gBAAgB,EAChBC,mBAAmB,EACnBC,iBAAiB,EACjBC,gBAAgB,EAChBC,mBAAmB,EACnBC,iBAAiB;AACjB;AACAC,gBAAgB,EAChBC,oBAAoB,QACf,qBAAqB;AAE5B,SAASC,iBAAiB,EAAEC,aAAa,QAAQ,SAAS;AAiB1D,SACEC,UAAU,EACVC,iBAAiB,EACjBC,oBAAoB,EACpBC,aAAa,EACbC,YAAY,QACP,eAAe;AAEtB,SAASC,2BAA2B,QAAQ,eAAe;AAC3D,SACEC,mBAAmB,EACnBC,sBAAsB,EACtBC,uBAAuB,EACvBC,UAAU,EACVC,gBAAgB,QACX,aAAa;AAgBpB,SAASC,WAAW,EAAEC,UAAU,QAAQ,WAAW"}
@@ -3,5 +3,5 @@
3
3
  * with the version used to build the native part of the library in runtime.
4
4
  * Remember to keep this in sync with the version declared in `package.json`
5
5
  */
6
- export const jsVersion = '3.5.3';
6
+ export const jsVersion = '3.5.4';
7
7
  //# sourceMappingURL=jsVersion.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["jsVersion"],"sources":["jsVersion.ts"],"sourcesContent":["/**\n * We hardcode the version of Reanimated here in order to compare it\n * with the version used to build the native part of the library in runtime.\n * Remember to keep this in sync with the version declared in `package.json`\n */\nexport const jsVersion = '3.5.3';\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,SAAS,GAAG,OAAO"}
1
+ {"version":3,"names":["jsVersion"],"sources":["jsVersion.ts"],"sourcesContent":["/**\n * We hardcode the version of Reanimated here in order to compare it\n * with the version used to build the native part of the library in runtime.\n * Remember to keep this in sync with the version declared in `package.json`\n */\nexport const jsVersion = '3.5.4';\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,SAAS,GAAG,OAAO"}
@@ -16,6 +16,6 @@ export interface ScrollHandlers<TContext extends __Context> {
16
16
  onMomentumEnd?: ScrollHandler<TContext>;
17
17
  }
18
18
  type OnScroll = (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
19
- export type useAnimatedScrollHandler = <TContext extends __Context = Record<string, never>>(handlers: ScrollHandlers<TContext> | ScrollHandler<TContext>, deps?: DependencyList) => OnScroll;
20
- export declare const useAnimatedScrollHandler: useAnimatedScrollHandler;
19
+ type useAnimatedScrollHandlerType = <TContext extends __Context = Record<string, never>>(handlers: ScrollHandlers<TContext> | ScrollHandler<TContext>, deps?: DependencyList) => OnScroll;
20
+ export declare const useAnimatedScrollHandler: useAnimatedScrollHandlerType;
21
21
  export {};
@@ -5,10 +5,10 @@ export type { GestureHandlers, AnimatedRef, ScrollHandler, ScrollHandlers, Deriv
5
5
  export { useAnimatedProps, useEvent, useHandler, useWorkletCallback, useSharedValue, useReducedMotion, useAnimatedStyle, useAnimatedGestureHandler, useAnimatedReaction, useAnimatedRef, useAnimatedScrollHandler, useDerivedValue, useAnimatedSensor, useFrameCallback, useAnimatedKeyboard, useScrollViewOffset, } from './hook';
6
6
  export type { DelayAnimation, RepeatAnimation, SequenceAnimation, StyleLayoutAnimation, WithTimingConfig, TimingAnimation, WithSpringConfig, SpringAnimation, WithDecayConfig, DecayAnimation, } from './animation';
7
7
  export { cancelAnimation, defineAnimation, withTiming, withSpring, withDecay, withDelay, withRepeat, withSequence, } from './animation';
8
- export type { Extrapolation, ExtrapolationConfig, ExtrapolationType, } from './interpolation';
9
- export { interpolate, clamp } from './interpolation';
10
- export type { InterpolationOptions, ColorSpace, InterpolateConfig, InterpolateRGB, InterpolateHSV, } from './interpolateColor';
11
- export { Extrapolate, interpolateColor, useInterpolateConfig, } from './interpolateColor';
8
+ export type { ExtrapolationConfig, ExtrapolationType } from './interpolation';
9
+ export { Extrapolation, interpolate, clamp } from './interpolation';
10
+ export type { InterpolationOptions, InterpolateConfig, InterpolateRGB, InterpolateHSV, } from './interpolateColor';
11
+ export { Extrapolate, ColorSpace, interpolateColor, useInterpolateConfig, } from './interpolateColor';
12
12
  export type { EasingFunction, EasingFn, EasingFunctionFactory, EasingFactoryFn, } from './Easing';
13
13
  export { Easing } from './Easing';
14
14
  export { measure, dispatchCommand, scrollTo, setGestureState, } from './NativeMethods';
@@ -3,4 +3,4 @@
3
3
  * with the version used to build the native part of the library in runtime.
4
4
  * Remember to keep this in sync with the version declared in `package.json`
5
5
  */
6
- export declare const jsVersion = "3.5.3";
6
+ export declare const jsVersion = "3.5.4";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-reanimated",
3
- "version": "3.5.3",
3
+ "version": "3.5.4",
4
4
  "description": "More powerful alternative to Animated library for React Native.",
5
5
  "scripts": {
6
6
  "test": "yarn run format:js && yarn run lint:js && yarn run test:unit",
@@ -1,11 +1,18 @@
1
1
  import { Platform } from 'react-native';
2
2
 
3
+ // This type is necessary since some libraries tend to do a lib check
4
+ // and this file causes type errors on `global` access.
5
+ type localGlobal = typeof global & Record<string, unknown>;
6
+
3
7
  export function isJest(): boolean {
4
8
  return !!process.env.JEST_WORKER_ID;
5
9
  }
6
10
 
7
11
  export function isChromeDebugger(): boolean {
8
- return !(global as any).nativeCallSyncHook || (global as any).__REMOTEDEV__;
12
+ return (
13
+ !(global as localGlobal).nativeCallSyncHook ||
14
+ !!(global as localGlobal).__REMOTEDEV__
15
+ );
9
16
  }
10
17
 
11
18
  export function isWeb(): boolean {
@@ -32,13 +39,15 @@ export function isWindowAvailable() {
32
39
  // the window object is unavailable when building the server portion of a site that uses SSG
33
40
  // this function shouldn't be used to conditionally render components
34
41
  // https://www.joshwcomeau.com/react/the-perils-of-rehydration/
42
+ // @ts-ignore Fallback if `window` is undefined.
35
43
  return typeof window !== 'undefined';
36
44
  }
37
45
 
38
46
  export function isReducedMotion() {
39
47
  return isWeb()
40
48
  ? isWindowAvailable()
41
- ? !window.matchMedia('(prefers-reduced-motion: no-preference)').matches
49
+ ? // @ts-ignore Fallback if `window` is undefined.
50
+ !window.matchMedia('(prefers-reduced-motion: no-preference)').matches
42
51
  : false
43
- : global._REANIMATED_IS_REDUCED_MOTION ?? false;
52
+ : (global as localGlobal)._REANIMATED_IS_REDUCED_MOTION ?? false;
44
53
  }
@@ -28,7 +28,7 @@ export interface ScrollHandlers<TContext extends __Context> {
28
28
  type OnScroll = (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
29
29
 
30
30
  // TODO TYPESCRIPT This is a temporary type to get rid of .d.ts file.
31
- export type useAnimatedScrollHandler = <
31
+ type useAnimatedScrollHandlerType = <
32
32
  TContext extends __Context = Record<string, never>
33
33
  >(
34
34
  handlers: ScrollHandlers<TContext> | ScrollHandler<TContext>,
@@ -95,4 +95,4 @@ export const useAnimatedScrollHandler = function <TContext extends __Context>(
95
95
  // TODO TYPESCRIPT This temporary cast is to get rid of .d.ts file.
96
96
  ) as any;
97
97
  // TODO TYPESCRIPT This temporary cast is to get rid of .d.ts file.
98
- } as unknown as useAnimatedScrollHandler;
98
+ } as unknown as useAnimatedScrollHandlerType;
@@ -60,21 +60,17 @@ export {
60
60
  withRepeat,
61
61
  withSequence,
62
62
  } from './animation';
63
- export type {
64
- Extrapolation,
65
- ExtrapolationConfig,
66
- ExtrapolationType,
67
- } from './interpolation';
68
- export { interpolate, clamp } from './interpolation';
63
+ export type { ExtrapolationConfig, ExtrapolationType } from './interpolation';
64
+ export { Extrapolation, interpolate, clamp } from './interpolation';
69
65
  export type {
70
66
  InterpolationOptions,
71
- ColorSpace,
72
67
  InterpolateConfig,
73
68
  InterpolateRGB,
74
69
  InterpolateHSV,
75
70
  } from './interpolateColor';
76
71
  export {
77
72
  Extrapolate,
73
+ ColorSpace,
78
74
  interpolateColor,
79
75
  useInterpolateConfig,
80
76
  } from './interpolateColor';
@@ -3,4 +3,4 @@
3
3
  * with the version used to build the native part of the library in runtime.
4
4
  * Remember to keep this in sync with the version declared in `package.json`
5
5
  */
6
- export const jsVersion = '3.5.3';
6
+ export const jsVersion = '3.5.4';