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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@mui/x-charts-vendor

v7.16.0

Published

Vendored dependencies for MUI X Charts

Downloads

301,833

Readme

Charts Vendor

Vendored dependencies for @mui/x-charts.

An adaptation of the victory-vendor

Background

D3 has released most of its libraries as ESM-only. This means that consumers in Node.js applications can no longer just require() anything with a d3 transitive dependency, including much of @mui/x-charts.

To help provide an easy path to folks still using CommonJS in their Node.js applications that consume @mui/x-charts, we now provide this package to vendor in various d3-related packages.

Main difference with victory-vendor

Victory is using the d3-voronoid which is an archived project. Our chart library relies on the d3-delaunay which is also ESM only and reuse robust-predicates which is also ESM only

Packages

We presently provide the following top-level libraries:

  • d3-color
  • d3-delaunay
  • d3-interpolate
  • d3-scale
  • d3-shape
  • d3-time
  • delaunator
  • robust-predicate

This is the total list of top and transitive libraries we vendor:

  • d3-array
  • d3-color
  • d3-delaunay
  • d3-format
  • d3-interpolate
  • d3-path
  • d3-scale
  • d3-shape
  • d3-time
  • d3-time-format
  • delaunator
  • internmap
  • robust-predicates

How it works

We provide two alternate paths and behaviors -- for ESM and CommonJS

ESM

If you do a Node.js import like:

import { interpolate } from '@mui/x-charts-vendor/d3-interpolate';

under the hood it's going to just re-export and pass you through to node_modules/d3-interpolate, the real ESM library from D3.

CommonJS

If you do a Node.js import like:

const { interpolate } = require('@mui/x-charts-vendor/d3-interpolate');

under the hood, it will go to an alternate path that contains the transpiled version of the underlying d3 library found at x-charts-vendor/lib-vendor/d3-interpolate/**/*.js. This further has internally consistent import references to other x-charts-vendor/lib-vendor/<pkg-name> paths.

Note that for some tooling (like Jest) that doesn't play well with package.json:exports routing to this CommonJS path, we also output a root file in the form of x-charts-vendor/d3-interpolate.js.

Licenses

This project is released under the MIT license, but the vendored in libraries include other licenses (e.g. ISC) that we enumerate in our package.json:license field.