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

@solid-gpui/router

v0.5.2

Published

TanStack Router integration for native Solid GPUI surfaces.

Readme

@solid-gpui/router

TanStack Router Core integration for Solid GPUI, with native links and memory history for each surface.

Native history supports synchronous and asynchronous navigation blockers in Bun and QuickJS, including back/forward/go. See the blocking contract for cancellation, concurrent requests, ignoreBlocker, and window-close boundaries.

bun add --exact @solid-gpui/router

Use the same npm release as the application's @solid-gpui/core package.

File-based routing

Use solidGpuiRouter() from @solid-gpui/router/vite before the Solid GPUI JSX plugin. It uses TanStack's generator to turn src/routes into a typed src/routeTree.gen.ts, including updates when route files move. Import runtime APIs such as createFileRoute and createLazyFileRoute from @solid-gpui/router. For non-Vite builds and standalone type checking, run generateRoutes() from @solid-gpui/router/generator first.

The generator processes file events in order, including deletions arriving alongside notifications for unchanged generated files.

Follow the Router guide for installation, route files, native navigation, lazy routes, and platform limits. Refer to the TanStack Router Solid documentation for general routing patterns.

Routing and shared application state

Create one router per native surface. Each router owns its location, history, params, search state, and route lifecycle. Routers may reuse the same finalized route tree; do not mutate route options or children after creating the first router.

Application-global data is separate from routing. Create stores, query clients, and services once in the application's JavaScript runtime, then pass the same object references through each router context. Add per-window dependencies such as windowId beside that shared object:

import { Outlet, createRootRouteWithContext, createRoute, createRouter } from "@solid-gpui/router";

interface RouterContext {
  app: {
    session: { userId: string | undefined };
  };
  windowId: string;
}

const app: RouterContext["app"] = {
  session: { userId: undefined },
};
const rootRoute = createRootRouteWithContext<RouterContext>()({ component: Outlet });
const homeRoute = createRoute({
  getParentRoute: () => rootRoute,
  path: "/",
});
const routeTree = rootRoute.addChildren([homeRoute]);

export function createWindowRouter(windowId: string) {
  return createRouter({
    routeTree,
    context: { app, windowId },
  });
}

Solid contexts belong to one owner root and therefore do not cross windows. The shared app reference above is the explicit application scope; each router context remains a distinct window scope. TanStack Query, if used, stays a separate data-cache concern and can be placed in app rather than coupled to navigation.

See the shared website router for a complete application and the website guide for browser hash URLs and native navigation.