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

@rasamjs/connectors

v0.4.0

Published

Attached straight and elbow connectors for rasam SVG drawings.

Readme

@rasamjs/connectors

The optional editor adapter packages connector services and registered straight/elbow tools, including live paint and input cleanup.

Attached straight and elbow lines and marker arrows for rasam SVG drawings. Core is the only runtime peer. Version 0.3.0 requires @rasamjs/core@^0.3.0 for named ports, loose-end persistence and indexed routing. Source manifests stay private between releases.

npm install @rasamjs/core@^0.3.0 @rasamjs/connectors@^0.3.0

The custom routing option, added in 0.3.0, lets an app supply its own polyline routing without a second path write. The unreleased reroute(path) method lets external routing dependencies, such as obstacles, refresh geometry inside the current edit. See the same API section for its return value and history behavior.

import { SVG } from '@rasamjs/core';
import { Connectors } from '@rasamjs/connectors';
import { ConnectorTool } from '@rasamjs/connectors/tool';

const drawing = SVG(host, { width: 700, height: 500 });
const a = drawing.rect({ x: 40, y: 40, width: 80, height: 50 });
const b = drawing.rect({ x: 300, y: 180, width: 80, height: 50 });
const connectors = new Connectors(drawing);
const path = connectors.create({
  start: { target: a, anchor: 'right' },
  end: { target: b, anchor: 'auto' },
  routing: 'elbow',
});
const tool = new ConnectorTool(connectors, { routing: 'straight' });
tool.enabled = true;

Ends can also attach to a component's named ports, { target: chip, port: 'p3' }, and connectors.links(chip) lists the connectors on it. Deleting a target keeps its connectors, with a loose end where it was.

Moving or resizing an endpoint, or its parent, updates the connector inside the same model operation and change group. History records one undo step for a move and all its attached lines. Replay restores stored geometry without routing again.

The optional tool previews on an overlay, shows side anchors on hover, and writes one connector on release. Escape, pointer cancellation and blur discard the preview. The playground exposes Connector (C) and Elbow connector (Shift+C) tools.

Attachments are typed references on ordinary paths, so saved SVG, clones, imports, clipboard and history retain them. No custom element registration is needed. Both entries can be imported without a document. See API.md for anchor coordinates, lifecycle, routing limits and persistence behavior.

bun run --cwd packages/connectors test
bun run --cwd packages/connectors test:browser
bun run --cwd packages/connectors typecheck
bun run --cwd packages/connectors build
bun run --cwd packages/connectors bench