[{"name":"Curtissimo.IntertialScrollDetector","comment":" This module implements an inertial scroll detector to provide\nan event-driven mechanism to know when inertial scrolling occurs.\n\nThis is the directed state diagram for the inertial scroll detector.\n\n![State Diagram](https://www.plantuml.com/plantuml/svg/TOynJmCn38Nt_0fBB81qOk-0YaG7XYAaCe0GGxXOEOl4hdm-4F-UL6hTBDsIzvwVFwzdYsfBBM6YX81rRt-GS1wLzaR28JoAriW6AzWPbH8UVkCt-czJADDNEGjROJ9HuknIQ3iCuObHZMA1gpOpMLP43Ywku4LcClf148LdpF7mxlqtY9pkclaUmiVj9mptS6Hpng5f9xvNMSQf4KIr8_Dmdd1_mwbpJzUulPN6u6fBTEVr5PrywEceTwDAAN1DjMAYQ7ZJXIy2Uq7Fx6LjeoSkLgoHqrBBFm00)\n\n\n# Setting up\n\n@docs onInertialScroll, init, update\n\n\n# Usage\n\n@docs InertialDirection, inertialX, inertialY, stickyX, stickyY, scrollLeft, scrollTop\n\n\n# Opaque types\n\n@docs Msg, ScrollState\n\n","unions":[{"name":"InertialDirection","comment":" The direction of the inertial scroll.\n\n  - **Negative** means the scroll top (or left) is decreasing.\n  - **Positive** means the scroll top (or left) is increasing.\n  - **Still** means there is no movement.\n\n","args":[],"cases":[["Negative",[]],["Positive",[]],["Still",[]]]},{"name":"Msg","comment":" The messages used to monitor the scrollable area.\n","args":[],"cases":[]},{"name":"ScrollState","comment":" The state maintained by the detector.\n","args":[],"cases":[]}],"aliases":[],"values":[{"name":"inertialX","comment":" Get the current inertial scroll in the X (horizontal) direction.\n","type":"Curtissimo.IntertialScrollDetector.ScrollState -> Curtissimo.IntertialScrollDetector.InertialDirection"},{"name":"inertialY","comment":" Get the current inertial scroll in the Y (vertical) direction.\n","type":"Curtissimo.IntertialScrollDetector.ScrollState -> Curtissimo.IntertialScrollDetector.InertialDirection"},{"name":"init","comment":" Initialize a [`ScrollState`](#ScrollState) from current\nscroll offset left and top values.\n\n    import Curtissimo.IntertialScrollDetector as Detector\n\n    type alias Model =\n        { scrollState : Detector.ScrollState }\n\n    init =\n        ( scrollState = Detector.init 0 0\n        , Cmd.none\n        )\n\n","type":"Basics.Int -> Basics.Int -> Curtissimo.IntertialScrollDetector.ScrollState"},{"name":"onInertialScroll","comment":" Adds the following passive event listeners to the scrollable area.\n\n  - `scroll` to monitor for scroll events after touch-end\n  - `scrollend` to monitor for when inertial scrolling ends\n  - `touchstart` to activate that detector\n  - `touchmove` to transition the detector to an eligible state for inertial scrolling\n  - `touchend` to transition the detector to a montoring state for inertial scrolling\n\n```\nimport Curtissimo.IntertialScrollDetector as Detector\nimport Html\nimport Html.Attributes as Attrs\n\ntype Msg\n    = InertialScroll Detector.Msg\n\nview =\n    Html.div\n        [ Attrs.class \"scrollable\"\n        , Detector.onInertialScroll InertialScroll\n        ]\n        [ Html.p [] [ Html.text \"Scroll me!\" ] ]\n```\n\n","type":"(Curtissimo.IntertialScrollDetector.Msg -> msg) -> List.List (Html.Attribute msg)"},{"name":"scrollLeft","comment":" Get the current left scroll position from the latest inertial scroll.\n","type":"Curtissimo.IntertialScrollDetector.ScrollState -> Basics.Int"},{"name":"scrollTop","comment":" Get the current top scroll position from the latest inertial scroll.\n","type":"Curtissimo.IntertialScrollDetector.ScrollState -> Basics.Int"},{"name":"stickyX","comment":" Get the last non-`Still` inertial scroll in the X (horizontal) direction.\n\nWill return `Still` if the scrollable area has never moved.\n\n","type":"Curtissimo.IntertialScrollDetector.ScrollState -> Curtissimo.IntertialScrollDetector.InertialDirection"},{"name":"stickyY","comment":" Get the last non-`Still` inertial scroll in the Y (vertical) direction.\n\nWill return `Still` if the scrollable area has never moved.\n\n","type":"Curtissimo.IntertialScrollDetector.ScrollState -> Curtissimo.IntertialScrollDetector.InertialDirection"},{"name":"update","comment":" Update the detector from the events occurring in the window.\n\nSee [`onInertialScroll`](#onInertialScroll) for the events the detector uses to monitor for inertial scrolling.\n\n    import Curtissimo.IntertialScrollDetector as Detector\n\n    update msg model =\n        case msg of\n            InertialScroll scrollMsg ->\n                ( { model\n                    | scrollState = Detector.update scrollMsg\n                  }\n                , Cmd.none\n                )\n\n","type":"Curtissimo.IntertialScrollDetector.Msg -> Curtissimo.IntertialScrollDetector.ScrollState -> Curtissimo.IntertialScrollDetector.ScrollState"}],"binops":[]}]