hunk.code_window: export const mergeDefaultProps = (
     defaultProps: Lookup,
     props: Lookup & { default?: boolean | Lookup }
   ) => {
     if (props.default === true) {
       each(DEFAULT_PROPS, key => {
  
hunk.labels: keep keep keep replace keep keep keep
hunk.after_edit:   props: Lookup & { default?: boolean | Lookup },
     omitKeys: string[] = []
  
hunk.file_path: packages/core/src/helpers.ts
hunk.type: replace
file: import { is, each, Lookup } from 'shared'
  import { AnimatableComponent, withAnimated } from './withAnimated'
  import { Animated } from './Animated'
  import { AnimatedObject } from './AnimatedObject'
  
  export interface HostConfig {
    /** Provide custom logic for native updates */
    applyAnimatedValues: (node: any, props: Lookup) => boolean | void
    /** Wrap the `style` prop with an animated node */
    createAnimatedStyle: (style: Lookup) => Animated
    /** Intercept props before they're passed to an animated component */
    getComponentProps: (props: Lookup) => typeof props
  }
  
  // A stub type that gets replaced by @react-spring/web and others.
  type WithAnimated = {
    (Component: AnimatableComponent): any
    [key: string]: any
  }
  
  // For storing the animated version on the original component
  const cacheKey = Symbol.for('AnimatedComponent')
  
  export const createHost = (
    components: AnimatableComponent[] | { [key: string]: AnimatableComponent },
    {
      applyAnimatedValues = () => false,
      createAnimatedStyle = style => new AnimatedObject(style),
      getComponentProps = props => props,
    }: Partial<HostConfig> = {}
  ) => {
    const hostConfig: HostConfig = {
      applyAnimatedValues,
      createAnimatedStyle,
      getComponentProps,
    }
  
    const animated: WithAnimated = (Component: any) => {
      const displayName = getDisplayName(Component) || 'Anonymous'
  
      if (is.str(Component)) {
        Component = withAnimated(Component, hostConfig)
      } else {
        Component =
          Component[cacheKey] ||
          (Component[cacheKey] = withAnimated(Component, hostConfig))
      }
  
      Component.displayName = `Animated(${displayName})`
      return Component
    }
  
    each(components, (Component, key) => {
      if (!is.str(key)) {
        key = getDisplayName(Component)!
      }
      animated[key] = animated(Component)
    })
  
    return {
      animated,
    }
  }
  
  const getDisplayName = (arg: AnimatableComponent) =>
    is.str(arg)
      ? arg
      : arg && is.str(arg.displayName)
      ? arg.displayName
      : (is.fun(arg) && arg.name) || null
  