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

@thehoneyjar/sigil-diagnostics

v0.1.0

Published

Physics compliance checking and issue detection for Sigil

Downloads

110

Readme

@sigil/diagnostics

Physics compliance checking and issue detection for Sigil.

Installation

pnpm add @sigil/diagnostics

Usage

Quick Diagnosis

import { createDiagnosticsService } from '@sigil/diagnostics'

const diagnosticsService = createDiagnosticsService()

// Diagnose a symptom
const diagnosis = diagnosticsService.diagnose('dialog flickers on open')
console.log(diagnosis)
// **Found: Dialog/Modal Instability** (70% confidence)
// **Cause:** ResponsiveDialog hydration
// ...

Effect Detection

import { detectEffect, getExpectedPhysics } from '@sigil/diagnostics'

// Detect effect from keywords
const effect = detectEffect(['claim', 'button'])
console.log(effect) // 'financial'

// Get expected physics for effect
const physics = getExpectedPhysics('financial')
console.log(physics)
// { sync: 'pessimistic', timing: 800, confirmation: true }

Compliance Checking

import { checkCompliance, isFullyCompliant } from '@sigil/diagnostics'

const compliance = checkCompliance('financial', {
  behavioral: {
    sync: 'optimistic', // Wrong! Should be pessimistic
    timing: 200,
    confirmation: false,
  },
})

console.log(isFullyCompliant(compliance)) // false
console.log(compliance.behavioral.reason)
// 'sync should be pessimistic, got optimistic; ...'

Pattern Matching

import { createDiagnosticsService } from '@sigil/diagnostics'

const diagnosticsService = createDiagnosticsService()

// Match symptoms to patterns
const matches = diagnosticsService.matchPatterns('hydration mismatch flicker')

for (const match of matches) {
  console.log(`${match.pattern.name}: ${match.confidence * 100}%`)
  console.log(match.matchedCause.solution)
}

API

Service

| Method | Description | |--------|-------------| | analyze(component, code?) | Analyze component for issues | | checkCompliance(effect, physics) | Check physics compliance | | detectEffect(keywords, types?) | Detect effect type | | matchPatterns(symptoms) | Match symptoms to patterns | | diagnose(symptom) | Get quick diagnosis |

Detection

| Function | Description | |----------|-------------| | detectEffect(keywords, types?) | Detect effect from keywords/types | | getExpectedPhysics(effect) | Get expected physics for effect |

Compliance

| Function | Description | |----------|-------------| | checkBehavioralCompliance(effect, actual) | Check behavioral physics | | checkAnimationCompliance(effect, actual) | Check animation physics | | checkMaterialCompliance(effect, actual) | Check material physics | | checkCompliance(effect, physics) | Check all physics | | isFullyCompliant(compliance) | Check if fully compliant |

Patterns

| Function | Description | |----------|-------------| | PATTERNS | Array of all diagnostic patterns | | getPatterns() | Get all patterns | | getPatternsByCategory(category) | Get patterns by category | | getPatternById(id) | Get pattern by ID |

Built-in Patterns

  • hydration-media-query - useMediaQuery hydration mismatch
  • dialog-instability - Dialog/modal glitches
  • render-performance - Performance issues
  • layout-shift - CLS issues
  • server-component-error - Server component hook errors
  • react-19-changes - React 19 breaking changes
  • physics-financial-optimistic - Financial with wrong sync
  • physics-destructive-no-confirm - Destructive without confirm

License

MIT