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

@kruschdev/pascal-mep-kernel

v0.1.1

Published

Shared zero-dependency 3-layer spatial anatomy, legal-cavity MEP routing graph, and single-source declarative code constraint engine for Pascal Editor plugins.

Downloads

1,213

Readme

@kruschdev/pascal-mep-kernel

License: MIT npm version Zero Dependencies Kernel Tests Full Suite Purity Gate

A zero-dependency, framework-free TypeScript spatial anatomy, legal-cavity routing, and declarative code constraint kernel shared across my Pascal Editor Structural, MEP, and Architectural Surfaces plugins.

I built @kruschdev/pascal-mep-kernel so Structural (IRC), Plumbing (IPC), HVAC (IMC), Electrical (NEC), and Architectural Surfaces (IRC/GA-214/IECC/TCNA) all observe the exact same building geometry, route strictly inside legal building cavities, and enforce identical placement and audit thresholds from one single source of truth.

Aymeric House Finished Architecture vs 4-Trade Coordinated MEP Cutaway

Aymeric House 4-Trade Cutaway Showcase (Recorded Live in Pascal Editor)

Live Pascal Editor Cutaway Showcase on Aymeric House: Finished Two-Story Architecture peeling into Framing X-Ray and layering Structural (IRC), Plumbing (IPC), Dual-Wing HVAC (IMC), and Electrical (NEC) to 1,412 coordinated nodes with 0/0/0/0 audit errors

Watch 4-Trade Deep-Dive Walkthrough w/ Breaker Box & BOMs (assets/aymeric-house-4trade-deepdive-x.mp4) · Cutaway Showcase (assets/aymeric-house-4trade-cutaway.mp4) · Media Kit · Deep-Dive Script

On Aymeric House (two stories, 21 zones, U-shaped open Lanai courtyard with pool, pitched wing roofs, and central flat roof), one coordinated pass produces 1,412 nodes with 0 / 0 / 0 / 0 errors, zero ducts or electrical cables crossing the courtyard, and zero wires cutting any of the 30 door and window openings.

6-Plugin Pascal MEP, Surfaces & Catalog Ecosystem

All six MIT-licensed external plugins coordinate in real-world jobsite priority order (1 -> 2 -> 3 -> 4 -> 5) alongside the SolidCraft B-rep Manufacturer SKU Catalog on top of @kruschdev/pascal-mep-kernel:

| Priority | Plugin | Standards | Unit Tests | Role in Ecosystem | |---|---|---|---|---| | Core | @kruschdev/pascal-mep-kernel | 3-Layer Engine | 169 / 169 | Spatial anatomy, legal-cavity router, declarative rule evaluator | | #1 | @kruschdev/pascal-plugin-structural | IRC / AWC NDS / AISC | 104 / 104 | Framing skeleton, engineered beams/columns, connectors, fire blocking | | #2 | @kruschdev/pascal-plugin-plumbing | IPC / UPC / IFGC | 79 / 79 | Gravity-sloped DWV, dry vents, PEX manifolds, fuel gas, dryer vents | | #3 | @kruschdev/pascal-plugin-hvac | IMC / Manual J-D-S / IECC | 95 / 95 | Dual-wing split/mini-split HVAC, trunks, ERV, exhausts, condensate | | #4 | @kruschdev/pascal-plugin-electrical | NEC / NFPA 72 | 135 / 135 | Panels, 3D cover-off interior, circuits, opening-safe & courtyard-safe routing | | #5 | @kruschdev/pascal-plugin-surfaces | IRC / GA-214 / IECC / TCNA / NWFA / NSI | 57 / 57 | All 15 surface & envelope domains, Pool Surfaces, 44 recipes, 236 SKUs, 60 procedural GLBs + 28 B-rep swatches, 7 3D cutaways | | Catalog | @kruschdev/pascal-plugin-catalog | CSI MasterFormat / SolidCraft B-Rep | 19 / 19 | 606+ real-world manufacturer B-rep SKUs across 9 trades & 108 brands, + Real SKU registration, 16 Site-Built raw material takeoffs |

Architecture (3 Layers)

  1. Layer 1: Shared Cross-Trade Spatial Anatomy (@kruschdev/pascal-mep-kernel/anatomy)

    • WeakMap-memoized compileBuildingAnatomy(nodes) so all four trades observe identical building geometry in O(1) amortized lookups.
    • Story and level hierarchy (resolveNodeLevelId, belongsToLevel, compareLevelsVertically, resolveLevelHeightM, isGroundOrLowestWalledLevel, isHighestWalledLevelInBuilding, findImmediateLowerWalledLevel) ranking explicit level ordinal before baseElevation.
    • 7-type canonical roof shell (flat, shed, gable, hip, dutch, mansard, conical) with multi-hop parent roof transform accumulation, per-segment spatial adoption, and upper-wing seating.
    • Unified wall and opening extraction (native door/window nodes plus wall-attached item openings) with unclamped rawSillYM for floor-to-ceiling storefront glass, framed framedSillYM, and exact 3D OrientedPrismY keepout prisms.
    • Concave building footprint enclosure (pointInPolygon2D, planar half-edge bounded faces, 16-ray fallback, NFD-normalized multilingual room polygons, outdoor courtyard exclusion, and footprint clustering).
    • Cross-trade spatial occupancy grid (TradeOccupancyGrid, exact rotated OBB beam/column clash detection, resolveMepRunExtents, and strict trade-priority ordering structural < plumbing < hvac < electrical).
  2. Layer 2: Legal-Space-First Routing Graph (@kruschdev/pascal-mep-kernel/router)

    • compileLegalCavityGraph builds navigable cavities by construction: solid wall stud bays minus 3D door/window/header keepout prisms, enclosed overhead plenums and attics clamped beneath roof surfaces, and under-slab/crawlspace trenches.
    • routeInLegalCavities solves constrained shortest paths across orthogonal, euclidean-cavity, gravity-slope, and non-descending-vent modes with TradeOccupancyGrid reservation and cumulative bend budgets.
  3. Layer 3: Single-Source Declarative Code Rule Engine (@kruschdev/pascal-mep-kernel/rules)

    • Typed DeclarativeRule schema and dual-projection evaluator (filterLegalCandidates for placement/routing generators and evaluateDeclarativeRules for live compliance auditors).
    • Enforces placement-vs-audit soundness (effectivePlacementThreshold + validateRuleTable) so placement rules are never looser than audit rules.

Installation and Subpath Exports

npm install @kruschdev/pascal-mep-kernel
# or
bun add @kruschdev/pascal-mep-kernel

The published npm tarball (77 KB) ships precompiled pure ESM + .d.ts with zero runtime dependencies and zero React/JSX, so Next.js, Turbopack, Vite, Bun, and Node hosts can consume it directly without extra transpilePackages configuration.

| Subpath | Purpose | Runtime Constraints | |---|---|---| | @kruschdev/pascal-mep-kernel | Unified barrel re-exporting types, anatomy, router, and rules | Zero deps, zero React/Three/@pascal-app/*/node:* | | @kruschdev/pascal-mep-kernel/types | Canonical Vec2, Vec3, OrientedPrismY, SceneNodeLike, and trade priority types | Pure TypeScript | | @kruschdev/pascal-mep-kernel/anatomy | compileBuildingAnatomy, roof shell, openings, concave footprints, TradeOccupancyGrid | Pure TypeScript | | @kruschdev/pascal-mep-kernel/router | compileLegalCavityGraph, routeInLegalCavities, gravity/vent/orthogonal/cavity modes | Pure TypeScript | | @kruschdev/pascal-mep-kernel/rules | DeclarativeRule schema, validateRuleTable, filterLegalCandidates, evaluateDeclarativeRules | Pure TypeScript |

Corpus and Suite Verification

  • Unit Tests: 169 / 169 kernel tests (135,888 assertions) and 658 / 658 tests across the full 7-repo stack (158,984 assertions, 0 failures).
  • Boundary Purity: 5 / 5 kernel subpaths verified 100% framework-free and zero-dependency (34 / 34 entry boundary gates across the full stack).
  • Real-World Corpus: Audited across 246 real public Pascal buildings (145 / 246 completely 0/0/0/0 clean across all four trades, PLB 245/246, HVC 222/246, ELC 198/246, STR 167/246, 0 crashes, 0 NaN geometry outputs).
bun install
bun run check # tsc --noEmit && bun test src && bun run check:purity && bun run build

License

MIT. Created by Kevin Ruschman (@kruschdev).