components/scroll-to-bottom-blob-state
@fungi.computer/caps / components/scroll-to-bottom-blob-state
components/scroll-to-bottom-blob-state
Section titled “components/scroll-to-bottom-blob-state”Type Aliases
Section titled “Type Aliases”ScrollDirection
Section titled “ScrollDirection”ScrollDirection =
"forward"|"reverse"
Direction used to interpret forward and column-reverse scroll geometry.
ScrollGeometry
Section titled “ScrollGeometry”ScrollGeometry =
Readonly<{clientHeight:number;scrollHeight:number;scrollTop:number; }>
Host geometry needed to derive distance from the bottom edge.
ScrollFact
Section titled “ScrollFact”ScrollFact =
Readonly<{distance:number;at:number; }>
A timestamped distance observation from the host scroller.
ScrollMotionState
Section titled “ScrollMotionState”ScrollMotionState =
Readonly<{intensity:number;samples: readonlyScrollFact[]; }>
Pure controller state passed between scroll-fact updates.
Variables
Section titled “Variables”SCROLL_SETTLE_MS
Section titled “SCROLL_SETTLE_MS”
constSCROLL_SETTLE_MS:400=400
Quiet-period duration that returns the selector to rest, in milliseconds.
SCROLL_WOBBLE_INTENSITY
Section titled “SCROLL_WOBBLE_INTENSITY”
constSCROLL_WOBBLE_INTENSITY:number
Intensity boundary at which the visual begins wobbling.
SCROLL_SHED_INTENSITY
Section titled “SCROLL_SHED_INTENSITY”
constSCROLL_SHED_INTENSITY:number
Intensity boundary at which the visual begins shedding.
Functions
Section titled “Functions”distanceToBottom()
Section titled “distanceToBottom()”distanceToBottom(
geometry,direction):number
Distance from the visual end, including column-reverse’s negative scrollTop.
Parameters
Section titled “Parameters”geometry
Section titled “geometry”direction
Section titled “direction”Returns
Section titled “Returns”number
createScrollMotionState()
Section titled “createScrollMotionState()”createScrollMotionState():
ScrollMotionState
Create a stable, idle controller state before the first host fact.
Returns
Section titled “Returns”stepScrollMotion()
Section titled “stepScrollMotion()”stepScrollMotion(
state,fact):ScrollMotionState
Advance the controller from one host scroll fact.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”settleScrollMotion()
Section titled “settleScrollMotion()”settleScrollMotion(
state):ScrollMotionState
The 400ms quiet period returns the controller to its stable presentation.