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

@kyralabs/m3e-motion

v1.8.0

Published

Spring and easing math for m3exp-web (internal-first).

Readme

@kyralabs/m3e-motion

Spring math for m3exp-web: TypeScript ports of Compose's SpringSimulation and spring duration estimate (float32-exact against the JVM), FloatSpringSpec helpers, a CSS linear() sampler and the top app bar scroll state. Mostly used by the other @kyralabs packages; no DOM access.

npm install @kyralabs/m3e-motion

Usage

import { springDurationMillis, springToLinear, springValue } from '@kyralabs/m3e-motion';

const spec = { dampingRatio: 0.9, stiffness: 700 };
springValue(spec, 100, 0, 1); // position after 100 ms, animating 0 → 1
springDurationMillis(spec, 0, 1); // settle time in ms
springToLinear(spec); // CSS linear() easing plus its duration

Window size classes (ports of androidx window-core WindowSizeClass and Compose Material3 adaptive; sizes in CSS px):

import {
  isWidthAtLeastBreakpoint,
  navigationSuiteType,
  paneScaffoldDirective,
  windowSizeClass,
} from '@kyralabs/m3e-motion';

const sizeClass = windowSizeClass({ width: 1280, height: 800 });
// { widthClass: 'large', heightClass: 'medium', minWidth: 1200, minHeight: 480 }
isWidthAtLeastBreakpoint(sizeClass, 'expanded'); // true
paneScaffoldDirective(sizeClass).maxHorizontalPartitions; // 3 (calculatePaneScaffoldDirective)
navigationSuiteType(sizeClass); // 'wide-navigation-rail-collapsed' (Compose's default rule)
navigationSuiteType(sizeClass, { expandedFrom: 'large' }); // 'wide-navigation-rail-expanded'

expandedFrom (a width class or px bound) expands the collapsed rail from that width (the navigation suite scaffold's default is NAVIGATION_SUITE_EXPANDED_FROM, 'large'), to the expanded rail or, with expandedType: 'navigation-drawer', a drawer. NavigationSuiteScaffoldAnimation ports Compose's NavigationSuiteScaffoldState show / hide with its layout progress.

windowWidthSizeClass / windowHeightSizeClass classify one axis; { largeAndExtraLargeWidth: false } keeps Compose's V1 width set (every width from 840 is expanded).

Three-pane scaffolds (ports of Compose Material3 adaptive ThreePaneScaffold, the list-detail and supporting-pane scaffolds and their navigator): calculateThreePaneScaffoldValue, ThreePaneScaffoldNavigator (navigateTo, navigateBack with the four back behaviors), threePaneScaffoldDirective (m3.material.io's pane counts by default, two at large; paneRule: 'compose' keeps Compose's three), threePaneScaffoldLayout (pane bounds), calculatePaneMotion / paneTransitions / ThreePaneScaffoldAnimation (pane motion) and the pane expansion anchors.

Apache-2.0; see LICENSE and NOTICE.