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

@invinite-org/chartlang-adapter-kit

v1.9.0

Published

SDK for writing chartlang adapters in consumer repos

Readme

@invinite-org/chartlang-adapter-kit

experimental

SDK for writing chartlang adapters in consumer repos. It ships the adapter contract, capabilities model, emission validators, mock candles, and test base classes.

Install

pnpm add @invinite-org/chartlang-adapter-kit

Public surface

  • defineAdapter(opts) -> Adapter — factory preserving optional hooks such as symInfo and resolveInputs.
  • capabilities — builders for plots, alerts, 61 drawing kinds, drawing groups, and Phase 4 capability fields: intervals(...), multiTimeframe(...), subPanes(...), symInfoFields(...), maxDrawingsPerScript(...), alertConditions(...), and logs(...).
  • validateEmission(e) -> ValidationResult — validates plot, alert, drawing, diagnostic, log, and alert-condition payloads.
  • decodeDrawing(e) -> DrawingState | null.
  • groupInputs(manifest.inputs) -> GroupedInputSection[] — ordered settings panel sections and inline rows.
  • bucketFor(kind), KIND_BUCKET, and drawing kind maps from core.
  • mockCandleSource(bars, opts) for tests, conformance scenarios, and demos. opts.mode selects "history" (default), "stream", or "history-then-stream" (one history batch followed by per-bar close events for the trailing streamTail bars).
  • PassThroughAdapter, BufferingAdapter.
  • Types: Adapter, Capabilities, CandleEvent, emissions, diagnostics, input kinds, SymInfoField, RunnerEmissions, and DefineAdapterOpts.
  • Phase 7 indicator-composition diagnostics: DiagnosticCode widens with dep-error, dep-cycle, dep-unknown-output, dep-invalid-input-override, dep-dynamic, dep-output-not-titled for the new .output(...) / .withInputs(...) surface.
  • Geometry layer: timeToX, priceToY, worldPointToPixel, decomposeDrawing(emission, viewport) -> DrawPrimitive[] (covers the basic drawing kinds today; the rest land incrementally), plus the Viewport, Point2, DrawPrimitive, StrokeStyle, and FillStyle types.
  • Canvas sink (@invinite-org/chartlang-adapter-kit/canvas): RenderCtx, paintPrimitive(ctx, prim), MockCanvasContext, RecordedCall, and hashCallLog(mock.calls) for deterministic, headless call-log hashing.

Minimum-viable API call

import { capabilities, defineAdapter, mockCandleSource } from "@invinite-org/chartlang-adapter-kit";

export default defineAdapter({
    id: "demo",
    name: "Demo",
    capabilities: {
        plots: capabilities.allLines(),
        drawings: new Set(),
        alerts: capabilities.alerts("toast"),
        alertConditions: false,
        logs: false,
        inputs: new Set(),
        intervals: capabilities.intervals([{ value: "1D", label: "1 day", group: "daily" }]).intervals,
        multiTimeframe: false,
        subPanes: 0,
        symInfoFields: new Set(),
        maxDrawingsPerScript: { lines: 0, labels: 0, boxes: 0, polylines: 0, other: 0 },
        maxLookback: 5000,
        maxTickHz: 10,
    },
    candles: () => mockCandleSource([], { interval: "1D" }),
    onEmissions: () => {},
});

Docs

See docs/adapters/contract.md.

License

MIT