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

@chemx/o-command-palette

v0.1.0

Published

Chemical X Protocol: Universal command palette and site-indexing drop-in organism

Downloads

101

Readme

@chemx/o-command-palette

Universal command palette and site-indexing drop-in organism for the Chemical X ecosystem. Unifies the sovereign command execution patterns from MyCompass Admin and xophz.com into a crystalline, multi-framework component.


Features

  • Universal Site & Command Indexing: Search static routes, database items, dynamic APIs, and action callbacks through a single interface.
  • Autonomous Teardown: Actions registered via useCommandRegistry cleanly unmount when page components tear down via onScopeDispose.
  • Global Shortcut Trapping: Native Cmd+K / Ctrl+K and / quick-focus handlers with input avoidance.
  • Crystalline Organism Capsule: Strictly decoupled layout, pure controller state, and glassmorphic styling.
  • Zero Inline Styles: Designed with Starship glass styling tokens and Neon Cyan (#62c9ff) accents.

Installation & Setup

pnpm add @chemx/o-command-palette

Quickstart

1. Mount the Organism Component

Add the palette anywhere in your root application layout:

<template>
  <div id="app">
    <!-- Main content -->
    <router-view />

    <!-- Drop-in Command Palette -->
    <o-command-palette
      v-model="isPaletteOpen"
      :navigate="handleNavigate"
      brand-color="#62c9ff"
    />
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue';
import { useRouter } from 'vue-router';
import { OCommandPalette } from '@chemx/o-command-palette';

const router = useRouter();
const isPaletteOpen = ref(false);

const handleNavigate = (route: string) => {
  router.push(route);
};
</script>

2. Register Actions & Search Items from Any App / Page

Within any page, spark, or view component, call useCommandRegistry:

<script setup lang="ts">
import { useCommandRegistry } from '@chemx/o-command-palette';

const { registerCommands } = useCommandRegistry();

// Commands automatically deregister when this component unmounts
registerCommands([
  {
    id: 'action-export-csv',
    title: 'Export Active Records',
    subtitle: 'Download current filtered table as CSV',
    category: 'actions',
    categoryLabel: 'Action',
    icon: 'fad fa-file-csv',
    iconColor: '#10b981',
    keywords: ['export', 'csv', 'download', 'table'],
    action: async () => {
      await triggerCsvExport();
    }
  },
  {
    id: 'nav-settings',
    title: 'System Settings',
    subtitle: 'Manage theme and sovereign credentials',
    category: 'pages',
    categoryLabel: 'Page',
    icon: 'fad fa-cog',
    route: '/settings'
  }
]);
</script>

CommandItem Specification

export interface CommandItem {
  readonly id: string;
  readonly title: string;
  readonly subtitle?: string;
  readonly category: string;
  readonly categoryLabel: string;
  readonly icon?: string;
  readonly iconColor?: string;
  readonly logoUrl?: string;
  readonly badge?: string;
  readonly keywords?: string[];

  // Action / Navigation Handlers
  readonly action?: (item: CommandItem) => void | Promise<void>;
  readonly route?: string;
  readonly href?: string;
  readonly target?: '_blank' | '_self';

  // Behavior
  readonly closeOnSelect?: boolean; // Defaults to true
}

Directory Capsule Layout

o-command-palette/
├── o-command-palette.vue          # Declarative slot-based template (< 200 lines)
├── o-command-palette.controller.ts # Pure reactive state & 2-stage atomic booleans
├── _o-command-palette.scss        # Scoped glass styling
├── types.d.ts                     # Component Props & Emits declarations
└── index.ts                       # Entrypoint

License

MIT - Chemical X Protocol