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

@atlasauth/vue

v0.1.1

Published

The official Atlas SDK for Vue 3 — the framework peer of [`@atlas/react`](../react). It reuses the framework-agnostic [`@atlas/js`](../js) client for every API call and the shared [`@atlas/authz`](../authz) primitive for permission checks, and mirrors the

Readme

@atlas/vue

The official Atlas SDK for Vue 3 — the framework peer of @atlas/react. It reuses the framework-agnostic @atlas/js client for every API call and the shared @atlas/authz primitive for permission checks, and mirrors the web surface as idiomatic Vue Composition API: a plugin, Ref/computed-based composables, and components that render in your host DOM (no iframe, so Tailwind/CSS just works).

Like @atlas/js's web binding, the session lives in an HttpOnly cookie the browser sends automatically; the short-lived JWT is held only in memory for the life of the tab. Nothing is written to localStorage.

Install

npm install @atlas/vue
# peer you already have in a Vue 3 app:
#   vue >= 3.3

Plugin

Install the plugin once, at app creation. It boots the session, completes any OAuth/hosted-page redirect, schedules proactive token refresh, and paints your appearance tokens onto the document root as CSS variables.

import { createApp } from 'vue';
import { createAtlas } from '@atlas/vue';
import App from './App.vue';

createApp(App)
  .use(
    createAtlas({
      publishableKey: 'pk_live_…',
      // frontendApi: 'https://your-instance.atlas.dev', // optional FAPI origin
      // appearance: { baseTheme: 'dark', elements: { formButtonPrimary: 'rounded-xl' } },
      // localization: myCatalog,
    }),
  )
  .mount('#app');

Composables

Every composable returns isLoaded alongside its data so you can tell "still booting" from "signed out" and avoid a flash of the sign-in form. Returned state is reactive (Ref / computed).

<script setup lang="ts">
import { useUser, useAuth, useSession, useOrganization } from '@atlas/vue';

const { isLoaded, isSignedIn, user } = useUser();
const { userId, orgRole, getToken, signOut, has } = useAuth();
const { session } = useSession();
const { organization, memberships, setActive } = useOrganization();

async function callApi() {
  const token = await getToken(); // always fresh; refreshes if near expiry
  // fetch('/api', { headers: { Authorization: `Bearer ${token}` } })
}

// A live token at a connected social provider (Google, GitHub, …):
const { getProviderToken } = useUser();
async function callGoogle() {
  const token = await getProviderToken('google'); // null if no linked account
}

// `has()` mirrors <Protect>, for logic that is not a render decision:
const canManage = has({ permission: 'org:billing:manage' });
</script>

| Composable | React peer | | ------------------- | ----------------- | | useAtlas() | useAtlas() | | useUser() | useUser() | | useSession() | useSession() | | useAuth() | useAuth() | | useOrganization() | useOrganization() | | useSignIn() | internal useFlow | | useSignUp() | internal useFlow |

Components

Drop-in components for the common flows. <SignIn> and <SignUp> are full multi-step flows driven entirely by the server-side attempt status — the client never decides what step comes next.

<script setup lang="ts">
import {
  SignedIn,
  SignedOut,
  Protect,
  SignIn,
  UserButton,
} from '@atlas/vue';
</script>

<template>
  <SignedOut>
    <SignIn />
  </SignedOut>

  <SignedIn>
    <UserButton />
    <Protect permission="org:billing:manage">
      <button>Manage billing</button>
      <template #fallback>
        <p>You don't have access.</p>
      </template>
    </Protect>
  </SignedIn>
</template>

| Component | React peer | | ----------------------- | ----------------------- | | <SignedIn> | <SignedIn> | | <SignedOut> | <SignedOut> | | <AtlasLoading> | <AtlasLoading> | | <AtlasLoaded> | <AtlasLoaded> | | <Protect> | <Protect> | | <SignIn> | <SignIn> | | <SignUp> | <SignUp> | | <UserButton> | <UserButton> | | <UserProfile> | <UserProfile> | | <OrganizationSwitcher>| <OrganizationSwitcher>| | <OrganizationProfile> | <OrganizationProfile> |

<Protect> is a rendering helper, never an authorization boundary. It decides what a user sees; the server checking the same permission on the request is what actually stops them acting.

Theming

The appearance option mirrors @atlas/react: design tokens (variables), per-element class overrides (elements), and prebuilt baseThemes (default, dark, neobrutalist). Overrides are appended to our base classes, so a Tailwind class you add makes a rounder button — not an unstyled one.

Localization

Every string passes through an i18n catalog. en-US ships; pass a partial localization catalog and it merges over en-US, so an untranslated key still renders.

Testing

pnpm --filter @atlas/vue test        # vitest + @vue/test-utils (happy-dom)
pnpm --filter @atlas/vue typecheck   # tsc --noEmit
pnpm --filter @atlas/vue build       # tsc -> dist

License

MIT — see LICENSE.