[{"name":"InView","comment":"\n\n\n# Detect\n\nDetect if an element is visible in the current viewport.\n\n@docs check\n@docs checkWithOffset\n@docs checkAlt\n@docs checkAltWithOffset\n\n\n# Definitions\n\n@docs State\n@docs Msg\n\n\n# Init\n\n@docs init\n\n\n# Update\n\n@docs update\n@docs updateViewportOffset\n@docs subscriptions\n@docs addElements\n\n","unions":[{"name":"Msg","comment":" A message type for the state to update.\n","args":[],"cases":[]},{"name":"State","comment":" Keeps track of viewport position, viewport dimensions and element positions.\n","args":[],"cases":[]}],"aliases":[],"values":[{"name":"addElements","comment":" Add elements you'd like to be able to detect after you've initialized the state.\n","type":"List.List String.String -> Platform.Cmd.Cmd InView.Msg"},{"name":"check","comment":" True if the element with the given id is in the current viewport.\n\n_note: this is a Maybe because the element might not be on the page at all._\n\n![check](https://rl-king.github.io/elm-inview-example/illustrations/inView.svg)\n\n","type":"String.String -> InView.State -> Maybe.Maybe Basics.Bool"},{"name":"checkAlt","comment":" True if the element with the given id is in _or_ above the current viewport.\n\n_note: this is a Maybe because the element might not be on the page at all._\n\n![checkAlt](https://rl-king.github.io/elm-inview-example/illustrations/inViewAlt.svg)\n\n","type":"String.String -> InView.State -> Maybe.Maybe Basics.Bool"},{"name":"checkAltWithOffset","comment":" True if the element with the given id is in _or_ above the current viewport but with an x and y offset.\nA positive offset will make the viewport smaller and vice versa.\n\n_note: this is a Maybe because the element might not be on the page at all._\n\n![checkAltWithOffset](https://rl-king.github.io/elm-inview-example/illustrations/inViewAltWithOffset.svg)\n\n","type":"String.String -> Basics.Float -> Basics.Float -> InView.State -> Maybe.Maybe Basics.Bool"},{"name":"checkWithOffset","comment":" True if the element with the given id is in the current viewport but with an x and y offset.\nA positive offset will make the viewport smaller and vice versa.\n\n_note: this is a Maybe because the element might not be on the page at all._\n\n![checkWithOffset](https://rl-king.github.io/elm-inview-example/illustrations/inViewWithOffset.svg)\n\n","type":"String.String -> Basics.Float -> Basics.Float -> InView.State -> Maybe.Maybe Basics.Bool"},{"name":"init","comment":" Takes the list of element ids you want to keep track of and attempts to find them\nin the DOM.\n","type":"List.List String.String -> ( InView.State, Platform.Cmd.Cmd InView.Msg )"},{"name":"subscriptions","comment":" Subscribes to browser resize events and recalculates element positions.\n","type":"InView.State -> Platform.Sub.Sub InView.Msg"},{"name":"update","comment":" Update viewport size and element positions.\n","type":"InView.Msg -> InView.State -> ( InView.State, Platform.Cmd.Cmd InView.Msg )"},{"name":"updateViewportOffset","comment":" Update current viewport x and y offset. Use this function to update the viewport\nscroll position.\n","type":"Basics.Float -> Basics.Float -> InView.State -> InView.State"}],"binops":[]}]