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

@lastshotlabs/frontend-contract

v0.2.2

Published

Shared design tokens and frontend contract schemas for Last Shot Labs apps.

Readme

Frontend Contract

@lastshotlabs/frontend-contract is the canonical shared contract package for Snapshot and Pocketshot.

It owns the frontend data model that must mean the same thing across both apps. It does not own app-specific runtime behavior, renderer implementation details, or platform-specific component implementations.

Registry setup

@lastshotlabs/* packages are published to GitHub Packages, not the public npm registry. They're public, but GitHub still requires authentication to install them. One-time setup:

  1. Create a GitHub personal access token with the read:packages scope.

  2. Add to your project's .npmrc (or ~/.npmrc):

    @lastshotlabs:registry=https://npm.pkg.github.com
    //npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}
  3. Export the token where you install: export GITHUB_TOKEN=ghp_… (do the same in CI).

The default registry stays npmjs.org, so your other dependencies are unaffected.

Install

bun add @lastshotlabs/frontend-contract

What This Package Owns

  • Refs and dynamic value primitives
    • FromRef
    • ExprRef
    • FROM_REF_TRANSFORMS
    • shared ref helpers such as isFromRef, isExprRef, and nested ref traversal utilities
  • Shared manifest sections
    • state
    • resources
    • workflows
    • policies
    • i18n
  • Shared manifest leaf contracts
    • env refs
    • resource declarations
    • workflow declarations
    • policy declarations
    • i18n declarations
  • Shared token contract
    • token schema and token types
  • Shared action contract
    • action schemas and shared action types
  • Shared state declarations
    • StateValueConfig
    • StateConfigMap
    • StateScope
    • StatePersistConfig

What This Package Does Not Own

  • Snapshot manifest compilation
  • Snapshot route matching and runtime providers
  • Pocketshot screen rendering
  • Jotai registries and React providers
  • platform-specific action execution
  • component registries and component implementations
  • universal styling runtime implementation

Rule Of Thumb

If a shape must serialize the same way and carry the same meaning in Snapshot and Pocketshot, it belongs here.

If a piece of code exists to execute, render, mount, fetch, subscribe, animate, or integrate with a specific runtime, it belongs in the app package that owns that runtime.

Current Consumers

  • Snapshot uses this package as the canonical source for:
    • refs
    • env/resource/action/i18n/policy/workflow/token contracts
    • shared state declaration types
  • Pocketshot uses this package as the canonical source for:
    • refs
    • shared manifest section types
    • shared resource/workflow/policy/i18n/state contracts

Next Major Boundary

The next non-trivial extraction is not another leaf type.

The next major decision is how much of the manifest runtime layer should become shared:

  • shared manifest compiler input/output contracts only
  • shared workflow runtime contract
  • shared state runtime contract
  • shared component metadata contract

That work should happen intentionally and not be mixed into platform-specific styling or renderer changes.