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

@gridkit/core

v0.0.1

Published

Core table functionality for GridKit

Readme

@gridkit/core

Framework-agnostic core for GridKit Enhanced — event system, performance monitoring, validation, plugins

License npm

What Is It?

@gridkit/core is the framework-agnostic engine behind GridKit Enhanced. It provides:

  • 🔄 Event System — Pub/sub with middleware
  • 📊 Performance Monitoring — Metrics, budgets, leak detection
  • Validation Engine — Schema-based validation
  • 🔌 Plugin Manager — Type-safe plugin registry

Most users should use @gridkit/tanstack-adapter — it includes @gridkit/core and adds React integration.

Use @gridkit/core directly if you're building a custom adapter (Vue, Svelte, vanilla JS).

Installation

npm install @gridkit/core

Quick Start

Event System

import { EventBus } from '@gridkit/core'

const eventBus = new EventBus()

// Subscribe
eventBus.on('row:select', (event) => {
  console.log('Row selected:', event.payload)
})

// Emit
eventBus.emit('row:select', { rowId: '123', row: data })

// Middleware
eventBus.use((event, next) => {
  console.log('Event:', event.type)
  next(event)
})

Performance Monitoring

import { PerformanceMonitor } from '@gridkit/core'

const perf = new PerformanceMonitor({
  budgets: { rowModelBuild: 16, sorting: 50, filtering: 100 }
})

// Track operations
const result = perf.track('getRowModel', () => buildRowModel())

// Get metrics
const stats = perf.getOperationStats('getRowModel')
console.log(stats) // { operation: 'getRowModel', avgTime: 12.3ms }

// Budget violations
perf.on('budgetViolation', (event) => {
  console.warn(`${event.operation} exceeded budget: ${event.actual}ms > ${event.budget}ms`)
})

Validation

import { ValidationManager, createSchema, field } from '@gridkit/core'

const validation = new ValidationManager({ mode: 'strict' })

const userSchema = createSchema({
  name: field('string', { required: true, minLength: 1 }),
  email: field('string', { required: true, pattern: /^[^\s@]+@[^\s@]+\.[^\s@]+$/ }),
  age: field('number', { min: 0, max: 150 })
})

const result = await validation.validateRow(userData, userSchema)
if (!result.valid) {
  console.log(result.errors)
}

Plugin Manager

import { PluginManager } from '@gridkit/core'

const pluginManager = new PluginManager()

const myPlugin = {
  metadata: { id: 'my-plugin', name: 'My Plugin', version: '1.0.0' },
  initialize: async (config, context) => {
    context.eventBus.on('row:update', handleRowUpdate)
  },
  destroy: async () => {}
}

await pluginManager.register(myPlugin)
await pluginManager.initializePlugin('my-plugin', config)

API

EventBus

class EventBus {
  on(event: string, handler: (event: Event) => void): () => void
  off(event: string, handler: (event: Event) => void): void
  emit(event: string, payload: any): void
  use(middleware: Middleware): () => void
}

PerformanceMonitor

class PerformanceMonitor {
  track<T>(operation: string, fn: () => T): T
  getOperationStats(operation: string): OperationStats
  getMetrics(): Metrics
  on(event: 'budgetViolation', handler: (event: BudgetViolation) => void): void
}

ValidationManager

class ValidationManager {
  validateRow(data: any, schema: Schema): Promise<ValidationResult>
  validateAll(data: any[], schema: Schema): Promise<ValidationReport>
}

PluginManager

class PluginManager {
  register(plugin: Plugin): Promise<void>
  initializePlugin(id: string, config: any): Promise<void>
  unregisterPlugin(id: string): Promise<void>
  get(id: string): Plugin | undefined
}

Documentation

Related Packages

| Package | Description | |---------|-------------| | @gridkit/tanstack-adapter | React adapter — use this for React | | @gridkit/plugins | Official plugins |

License

MIT — see LICENSE


GitHub: github.com/gridkit/gridkit