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

@expertrees/angular

v0.1.1

Published

Angular component for @expertrees/core

Readme

@expertrees/angular

Angular standalone component for @expertrees/core — a hierarchical knowledge graph visualizer with a star map aesthetic.

Install

npm add @expertrees/core @expertrees/angular

Usage

import { Component } from '@angular/core'
import { ExpertreeCanvasComponent } from '@expertrees/angular'
import type { SkillGraph, SkillNode, NavigationFrame } from '@expertrees/core'

const graph: SkillGraph = {
  id: 'my-skills',
  label: 'My Skills',
  nodes: [
    { id: 'eng',     label: 'Engineering', depth: 0, childIds: ['fe', 'be'] },
    { id: 'fe',      label: 'Frontend',    depth: 1, parentId: 'eng', childIds: ['ng'] },
    { id: 'be',      label: 'Backend',     depth: 1, parentId: 'eng' },
    { id: 'ng',      label: 'Angular',     depth: 2, parentId: 'fe' },
  ],
  edges: [],
}

@Component({
  standalone: true,
  imports: [ExpertreeCanvasComponent],
  template: `
    <expertree-canvas
      [data]="graph"
      width="100%"
      height="600px"
      (nodeClick)="onNodeClick($event)"
      (contextEnter)="onContextEnter($event)"
    />
  `,
})
export class AppComponent {
  graph = graph

  onNodeClick(node: SkillNode) {
    console.log('clicked', node.label)
  }

  onContextEnter({ node, stack }: { node: SkillNode; stack: readonly NavigationFrame[] }) {
    console.log('entered', node.label, stack)
  }
}

Inputs

| Input | Type | Default | Description | |-------|------|---------|-------------| | data | SkillGraph | required | Graph data | | theme | ThemeInput | — | Visual theme overrides | | lod | LodThreshold[] | — | Level-of-detail config | | initialContextNodeId | string | — | Start inside a specific bubble | | width | string | '100%' | Canvas width (CSS) | | height | string | '100%' | Canvas height (CSS) |

Outputs

| Output | Payload | When | |--------|---------|------| | nodeClick | SkillNode | User clicks a node | | nodeHover | SkillNode | Mouse enters a node | | nodeBlur | SkillNode | Mouse leaves a node | | canvasClick | void | Click on empty canvas | | zoomChange | number | Every zoom frame | | contextEnter | { node: SkillNode, stack: readonly NavigationFrame[] } | Entering a bubble | | contextExit | { frame: NavigationFrame, stack: readonly NavigationFrame[] } | Exiting a bubble | | graphReady | SkillGraph | Engine mounted and ready |

Imperative API via template ref

Access engine methods directly through a template reference variable.

@Component({
  standalone: true,
  imports: [ExpertreeCanvasComponent],
  template: `
    <expertree-canvas #tree [data]="graph" width="100%" height="600px" />

    <!-- Breadcrumbs -->
    <nav>
      <button
        *ngFor="let frame of navStack; let i = index"
        (click)="tree.jumpToNavDepth(i + 1)"
      >
        {{ frame.label }}
      </button>
    </nav>

    <button (click)="tree.setNodeState('ng', 'unlocked')">Unlock Angular</button>
    <button (click)="tree.goBack()">Back</button>
  `,
})
export class AppComponent {
  graph = graph
  navStack: NavigationFrame[] = []
}

Template ref methods

| Method | Signature | Description | |--------|-----------|-------------| | setNodeState | (id, NodeState) => void | Update a node's semantic state | | addEvidence | (id, Evidence) => void | Attach evidence to a node | | removeEvidence | (id, evidenceId) => void | Remove evidence | | updateTheme | (ThemeInput) => void | Hot-swap the visual theme | | zoomIn | () => void | Programmatic zoom in | | zoomOut | () => void | Programmatic zoom out | | goBack | () => void | Exit to parent context | | enterContext | (nodeId) => void | Programmatically enter a bubble | | jumpToNavDepth | (targetLength) => void | Jump to stack depth in one animation | | getGraph | () => SkillGraph | Serialize current graph state | | getNavigationStack | () => readonly NavigationFrame[] | Current navigation stack |

NgModule setup

If you are not using standalone components, import via a module:

import { NgModule } from '@angular/core'
import { ExpertreeCanvasComponent } from '@expertrees/angular'

@NgModule({
  imports: [ExpertreeCanvasComponent],
  // ...
})
export class AppModule {}

License

MIT — github.com/0xMack/expertrees