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

@orbixdocs/sdk

v1.0.0

Published

Universal Component & Block SDK for Orbix OS — AI, Realtime State, Databases, RBAC, and Reactive Pipelines.

Readme

@orbixdocs/sdk

Universal Component & Block SDK for Orbix OS — Build stunning, collaborative, and AI-powered interactive blocks and widgets.


📦 Installation

npm install @orbixdocs/sdk
# or
pnpm add @orbixdocs/sdk
# or
yarn add @orbixdocs/sdk

🚀 Quick Start: Creating a Custom Block

import React from 'react';
import { defineBlock, useOrbixState, useOrbixAI } from '@orbixdocs/sdk';
import { Sparkles, Heart } from 'lucide-react';

// 1. Define Block Component
export const QuickPollerBlock = (props: any) => {
  // 1-line real-time synchronized state across Yjs & IndexedDB
  const [poll, setPoll] = useOrbixState(props, {
    question: 'Should we launch Orbix SDK today?',
    upvotes: 0
  });

  // Embedded block-level AI streaming
  const { generate, isGenerating } = useOrbixAI();

  const handleAiIdea = async () => {
    const suggestion = await generate('Suggest a fun poll question for a team meeting:');
    if (suggestion) setPoll({ ...poll, question: suggestion.trim() });
  };

  return (
    <div className="p-4 rounded-xl bg-[#101010] border border-white/[0.08] text-white">
      <h3 className="font-semibold text-sm mb-2">{poll.question}</h3>
      <div className="flex items-center gap-3">
        <button
          onClick={() => setPoll({ ...poll, upvotes: poll.upvotes + 1 })}
          className="flex items-center gap-1.5 px-3 py-1.5 bg-white text-black font-semibold rounded-lg text-xs"
        >
          <Heart size={14} className="text-red-500 fill-red-500" />
          <span>{poll.upvotes} Upvotes</span>
        </button>
        <button
          onClick={handleAiIdea}
          disabled={isGenerating}
          className="flex items-center gap-1.5 px-3 py-1.5 bg-[#181818] border border-white/[0.08] text-xs text-gray-300 rounded-lg"
        >
          <Sparkles size={13} className="text-amber-400" />
          <span>{isGenerating ? 'Thinking...' : 'AI Suggest'}</span>
        </button>
      </div>
    </div>
  );
};

// 2. Export Contract
export default defineBlock({
  manifest: {
    id: 'com.orbix.quick-poller',
    name: 'Quick Poller',
    version: '1.0.0',
    category: 'Interactive',
    description: 'Interactive real-time polling widget with AI question ideas.',
    icon: '📊'
  },
  component: QuickPollerBlock
});

🛠️ Core SDK Features

1. useOrbixState(props, initial)

Universal 1-line real-time state synchronization that automatically distributes state mutations across Yjs CRDTs, IndexedDB offline cache, and the cloud.

const [state, setState] = useOrbixState(props, { count: 0, title: '' });
setState({ count: state.count + 1 });

2. useOrbixAI(options)

Embedded block-level LLM streaming and generation.

const { generate, stream, isGenerating, error } = useOrbixAI({
  systemPrompt: 'You are a concise data analyst.'
});

const summary = await generate('Analyze these metrics: ' + JSON.stringify(data));

3. useOrbixDocument() & useOrbixDatabase()

Direct programmatic access to the host document AST and relational databases.

const { pageTitle, blockCount, appendBlock } = useOrbixDocument();
const { records, query, addRecord, updateRecord } = useOrbixDatabase();

4. Reactive Block Graph (useBlockInput, useBlockOutput, useBlockEvent)

Connect independent blocks in reactive event pipelines.

const input = useBlockInput('metrics_in');
const emit = useBlockOutput('filtered_out');
useBlockEvent('data_updated', (payload) => { ... });

5. Granular RBAC (useBlockPermissions, <PermissionGuard>)

Role-based access control (Host, Admin, Editor, Member, Guest).

const { isAdmin, hasPermission } = useBlockPermissions(props);

<PermissionGuard permission="ADMINISTRATOR" fallback={<p>Admin only</p>}>
  <AdminConfigPanel />
</PermissionGuard>

6. Secrets Vault (useOrbixEnv)

Secure per-block environment variable and API key storage.

const { OPENWEATHER_API_KEY, GITHUB_TOKEN } = useOrbixEnv(props);

7. Tiered Offline Storage (usePersistentStorage, useCache)

const [value, setValue] = usePersistentStorage('my_key', defaultValue);

📄 License

MIT © Orbix OS