npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@proto.ui/module-scroll

v0.3.0

Published

Proto UI module that provides host-mediated scroll capability for adapters.

Readme

@proto.ui/module-scroll

Proto UI module that provides host-mediated scroll capability for adapters.

Purpose

Owns stable logical surface identity, observed normalized facts, requests and system/composed projection negotiation. State stores facts; Context and Anatomy bind composed Scrollbar/Thumb controls to the same session. The host owns geometry, scrolling engine, physics and input integration.

Only current mounted session facts are accepted. Host replacement, detach and terminal disposal invalidate previous callbacks and release the lease. Missing host support leaves projection unresolved; an unavailable required projection diagnoses rather than silently downgrading.

The draft M-SCROLL-0001, HC-SCROLL-SURFACE-0001 and T-SCROLL-0001 graph covers four Web Adapters, including composed Thumb Move Gesture. Simulated geometry evidence does not certify browser physics or non-Web accessibility. Virtualization and A11y API redesign remain separate work.

Optional end-follow

Prototype and composition authors reach end-follow through the privileged asScrollSurface() handle:

const scroll = asScrollSurface();
scroll.configure({
  axes: 'vertical',
  projection: 'auto',
  endFollow: { mode: 'while-at-end', axis: 'vertical' },
});

The handle exposes per-axis atEnd plus read-only endFollow.state and endFollow.requestStatus facts. A jump control sends scroll.request({ kind: 'to-end', axis: 'vertical' }); it never receives a DOM node, offset, extent, or pixel threshold.

A reader interaction or restoration of an application-owned history anchor can call scroll.pauseFollowing(). This cancels pending end movement and reports paused without moving the viewport, changing focus, or modifying the application's anchor. A layout notification at the end does not undo the pause. Real reader arrival or an explicit to-end request resumes following. Ordinary programmatic position or reveal requests retain this pause even when they reach the end; a host control must establish actual reader movement on the followed axis to resume it. The command returns the same delivery outcome vocabulary as request; unsupported, disabled, detached, and retired leases reject it. Requests during attachment preserve their order and retire with that attachment's epoch. The Base and design-family MessageScroller viewport exposes this method as pauseFollowing alongside jumpToEnd and the observed follow facts.

The policy is off by default. The host owns proximity, layout observation, coalescing, input interruption, and direct end movement. Message counts, unread state, focus, announcements, visual-anchor preservation, and virtualization remain separate owners.

Target reveal (draft Web runtime)

The draft C-SCROLL-TARGET-REVEAL-0001 profile adds a vertical request through the same handle. The caller passes the current AnatomyFamily and AnatomyPartView obtained from its logical composition:

scroll.request({ kind: 'reveal', axis: 'vertical', family, part });

The target must be a current descendant in the same family whose nearest ancestor with the surface's role is this surface. The Module validates this membership and the mounted lease; the Web host resolves the physical target and performs the nearest movement within that surface. It preserves input focus, horizontal position and ancestor scroll positions. Scroll padding and target scroll margins affect the preferred alignment, which is clamped to the native range. A row taller than the viewport can expose its nearest edge without becoming fully visible.

Unavailable, pending, unsupported or retired targets are rejected. Reveal requests are never queued or replayed onto a later view. A dispatched outcome confirms current host delivery; it does not guarantee visibility through external clipping. Callers still own a usable bounded layout and the decision to request reveal after an accepted navigation change.

This profile currently covers the Web runtime path. Compiler lowering, non-Web hosts and horizontal reveal require separate implementation and acceptance evidence. T-SCROLL-TARGET-REVEAL-0001 distinguishes model regressions from the native Search consumer journeys; the draft status is not a cross-target compatibility guarantee.

Package Role

Adapter-facing module package used by the Proto UI runtime and adapter layer.

Install

Unpublished release preparation: 0.3.0 has not been published. The command below is an example for use after publication; it is not currently an installable version.

npm install @proto.ui/[email protected]

Internal Structure

  • src/caps.ts
  • src/create.ts
  • src/impl.ts
  • src/index.ts
  • src/projection.ts
  • src/types.ts
  • src/web/

Related Internal Packages

  • @proto.ui/core
  • @proto.ui/module-anatomy
  • @proto.ui/module-base
  • @proto.ui/module-context
  • @proto.ui/module-state
  • @proto.ui/types

License

MIT