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 🙏

© 2025 – Pkg Stats / Ryan Hefner

hotwire-native-bolt

v0.1.3

Published

A lightweight JavaScript bridge for Hotwire-powered native applications

Readme

Hotwire Native Bolt

CI License: MIT npm version

A lightweight library to enable native navigation using Hotwire Native for your modern web framework based applications. You can use it with your choice of web framework like React, Vue, Svelte, etc.

Installation

npm install hotwire-native-bolt
# or
yarn add hotwire-native-bolt

Usage

Basic Setup

// The library automatically sets up the bridge when imported
import 'hotwire-native-bolt'

// Access the navigator
const navigator = window.HotwireNavigator

// Set up visit handlers
navigator.setStartVisitHandler(async (location, restorationId, options) => {
	// Navigate and render content
})

// Optional
navigator.setCancelVisitHandler(async (location, restorationId, options) => {
	// Handle visit cancellation
})

Usage

// Check if the navigator is enabled
const url = new URL('/path/to/page')
if (window.HotwireNavigator.canNavigate(url)) {
	// Propose a visit to the native app
	window.HotwireNavigator.visitProposedToLocation(url, { action: 'advance' })
}

API Reference

  • HotwireNavigator.enabled: Boolean indicating if a native adapter is registered
  • HotwireNavigator.canNavigate(location: URL): Checks if the location can be navigated to. It returns false for file URLs and external URLs. You can decide to manually handle the navigation in such cases.
  • HotwireNavigator.setStartVisitHandler(handler): Sets the handler for starting visits. You should use your framework's helpers to navigate in this handler.
  • HotwireNavigator.setCancelVisitHandler(handler): Sets the handler for cancelling visits. Optional.
  • HotwireNavigator.visitProposedToLocation(location, options): Proposes a visit to the native adapter. You should check if HotwireNavigator can navigate to the location before calling this method. This method will inform the native app to begin screen transitions, and the native app will then call the visit handler you set up where you would do the actual navigation.
  • HotwireNavigator.formSubmissionStarted(location): Notifies the app that a form submission has started
  • HotwireNavigator.formSubmissionFinished(location): Notifies the app that a form submission has finished
  • HotwireNative.web.send(component, event, data, callback): Sends a message to the native app. The callback will be called with the response from the native app.

Contributing

Contributions are welcome! Please start a discussion if you plan to add a new feature. Once we decide that a feature is a good fit for the library, you can proceed with the following steps:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.