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

@orbit-dev/sdk

v0.5.11

Published

Project Orbit browser SDK — config types, HTTP helpers, and selector utilities

Readme

@orbit-dev/sdk

Project Orbit browser SDK.

Install

npm i @orbit-dev/sdk

What it includes

  • Selector engine: safe CSS matching + optional open-shadow traversal
  • Runtime: bootOrbitRuntime — published guides, triggers, spotlight + tooltip, completions
  • Step graph: parsing, trigger evaluator, state machine, minimal renderer
  • Help launcher: floating “Help” button listing eligible guides
  • Beacons: pulsing rings anchored to selectors
  • Analytics client: batched POST to /analytics/events
  • Editor: visual picker, draft panel (WYSIWYG, branching, triggers), autosave, preview; bootOrbitEditorFromUrl with sessionStorage so the editor survives SPA / Next.js route changes after ?orbit_token=… is stripped from the URL

Next.js (App Router)

The SDK uses window / document. Use a Client Component ("use client") and start from useEffect (or dynamic import with ssr: false).

If the SDK is in the same monorepo (file: / workspace), add transpilePackages in next.config.ts:

const nextConfig = {
  transpilePackages: ["@orbit-dev/sdk"],
};
export default nextConfig;

Runtime (end users): bootOrbitRuntime

components/OrbitRuntime.tsx:

"use client";

import { useEffect, useRef } from "react";
import { usePathname } from "next/navigation";
import { bootOrbitRuntime, type OrbitRuntime } from "@orbit-dev/sdk";

const API_BASE = process.env.NEXT_PUBLIC_ORBIT_API_BASE!;
const APP_ID = process.env.NEXT_PUBLIC_ORBIT_APP_ID!;

export function OrbitRuntimeProvider() {
  const pathname = usePathname();
  const handleRef = useRef<OrbitRuntime | null>(null);

  useEffect(() => {
    if (!API_BASE || !APP_ID) return;

    const endUserId =
      /* stable per visitor, e.g. from auth/session */
      "anonymous";

    void bootOrbitRuntime({
      apiBase: API_BASE,
      appId: APP_ID,
      endUserId,
    }).then((h) => {
      handleRef.current = h;
    });

    return () => {
      handleRef.current?.destroy();
      handleRef.current = null;
    };
  }, []);

  // Re-evaluate triggers after client navigations
  useEffect(() => {
    void handleRef.current?.refresh();
  }, [pathname]);

  return null;
}

.env.local:

NEXT_PUBLIC_ORBIT_API_BASE=https://your-api.example.com
NEXT_PUBLIC_ORBIT_APP_ID=your-app-uuid-from-dashboard

Mount once in app/layout.tsx (inside <body>):

import { OrbitRuntimeProvider } from "@/components/OrbitRuntime";

export default function RootLayout({ children }: { children: React.ReactNode }) {
  return (
    <html lang="en">
      <body>
        {children}
        <OrbitRuntimeProvider />
      </body>
    </html>
  );
}

Use a real stable endUserId when the user is logged in (same id used for completion tracking).

Editor (dashboard “open in app”): bootOrbitEditorFromUrl

When the user lands with ?orbit_token=..., bootstrap the editor from a client component:

"use client";

import { useEffect } from "react";
import { bootOrbitEditorFromUrl } from "@orbit-dev/sdk";

const API_BASE = process.env.NEXT_PUBLIC_ORBIT_API_BASE!;

export function OrbitEditorBootstrap() {
  useEffect(() => {
    if (!API_BASE) return;
    void bootOrbitEditorFromUrl({ apiBase: API_BASE });
  }, []);
  return null;
}

Place <OrbitEditorBootstrap /> in the same root layout (or page) as your app. The token is stored in sessionStorage for the tab so the floating editor stays available after Next.js changes the URL; it is cleared when the user exits the editor.

Optional: lazy load (smaller first paint)

import dynamic from "next/dynamic";

const OrbitRuntimeProvider = dynamic(
  () => import("@/components/OrbitRuntime").then((m) => m.OrbitRuntimeProvider),
  { ssr: false }
);

Editor bootstrap (any host app)

import { bootOrbitEditorFromUrl } from "@orbit-dev/sdk";

void bootOrbitEditorFromUrl({
  apiBase: "https://your-api.example.com",
});

Runtime bootstrap (end users)

import { bootOrbitRuntime } from "@orbit-dev/sdk";

void bootOrbitRuntime({
  apiBase: "https://your-api.example.com",
  appId: "your-app-uuid",
  endUserId: "stable-user-id",
});

Script-tag / CDN usage (no bundler)

<script type="module">
  import { bootOrbitEditorFromUrl } from "https://unpkg.com/@orbit-dev/[email protected]/dist/index.js";
  void bootOrbitEditorFromUrl({ apiBase: "https://your-api.example.com" });
</script>

Update the version in the URL when you publish. For a local API, use apiBase: "http://localhost:3001".


Publishing notes

  • The npm package includes dist/ and this README.md.
  • To publish keywords/README changes, bump the version and republish:
cd sdk
npm version patch
npm publish --access public