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

@arcpkg/mda-svgicons

v0.0.1-beta.0.1

Published

MDA-SVGICONS fournit les icônes MDA sous forme de composants React SVG (variantes solid et outline), avec import par sous-chemin pour un tree-shaking optimal et une taille (size) pouvant être responsive ou pilotée par le scroll.

Readme

@arcpkg/mda-svgicons

License TypeScript React

@arcpkg/mda-svgicons est un jeu d'icônes SVG React (DOM) optimisé et tree-shakeable, généré depuis mda-icons/icons.json (style FontAwesome, 2583 glyphes × 2 styles). Publié selon la convention des plugins @arcpkg/* : source TypeScript à la racine (main: index.ts) + miroir compilé js/.

📦 Installation

Via npm/yarn/pnpm

npm install @arcpkg/mda-svgicons react react-dom
# ou
yarn add @arcpkg/mda-svgicons react react-dom
# ou
pnpm add @arcpkg/mda-svgicons react react-dom

Dépendances requises

  • React 18+
  • React DOM 18+
  • TypeScript 5.0+ (recommandé)
  • Un bundler (Vite recommandé) — le chargement paresseux par nom utilise import.meta.glob

🚀 Démarrage rapide

import { SvgIcon } from '@arcpkg/mda-svgicons';
import home from '@arcpkg/mda-svgicons/icons/home';        // tree-shaking : seul `home` est inclus

export function Demo() {
  return (
    <>
      <SvgIcon icon={home} />                       {/* 13px, currentColor, solid */}
      <SvgIcon icon={home} size={13} color="#1976d2" />
      <SvgIcon icon={home} variant="outline" title="Accueil" />
    </>
  );
}

Par nom (paresseux — icônes data-driven / sélecteurs)

import { DynamicIcon } from '@arcpkg/mda-svgicons';

<DynamicIcon name="home" size={18} />
<DynamicIcon name="st-home" />          {/* préfixe st- → variant outline */}

Registre complet (lourd — tire toutes les icônes)

import { getIcon, ALL_ICONS } from '@arcpkg/mda-svgicons/all';
import { ICON_NAMES } from '@arcpkg/mda-svgicons/names';     // string[] pour parcourir le set

Le chargement paresseux (loadIcon/DynamicIcon) repose sur import.meta.glob et nécessite un bundler Vite.

Props de SvgIcon

| Prop | Type | Défaut | Description | |------|------|--------|-------------| | icon | IconData | — | Données importées (import home from '@arcpkg/mda-svgicons/icons/home') | | size | number | 15 | Hauteur visuelle en px (largeur au ratio du glyphe) | | color | string | currentColor | Couleur (hérite du color CSS par défaut) | | variant | 'solid' \| 'outline' | 'solid' | Plein ou contour (reproduit les jumelles st-*) | | strokeWidth | number | 32 | Épaisseur du trait en unités viewBox (outline) | | title | string | — | Libellé d'accessibilité (sinon aria-hidden) |

✨ Pourquoi c'est optimisé

  • Un module de données par icône (icons/<name>.ts["<path d>", width]) : importer home ne tire que ~0,3 Ko, pas les 4,8 Mo de la source.
  • Solid + outline = une seule entrée : la source livre chaque glyphe deux fois (X plein et st-X contour) mais avec le path/viewBox identiques ; on stocke le path une fois et on reproduit le contour via variant.
  • currentColor + taille à ratio correct : hérite du color CSS ; size fixe la hauteur et la largeur suit le ratio réel (l'export brut forçait 24×24).
  • Chargement paresseux par nom : Vite import.meta.glob découpe chaque icône en chunk séparé.

🛠️ (Re)génération

Données et miroir js/ produits par le builder commun (hors package) :

npm run build     # node ../mda-icons/build-svgicons.mjs (alimente aussi @arcpkg/native-mda-svgicons)

📁 Structure (plugin npm)

@arcpkg/mda-svgicons/
  package.json        # main: index.ts, publishConfig.access: public, MIT
  index.ts            # API publique
  SvgIcon.tsx  DynamicIcon.tsx  loader.ts  types.ts
  names.ts  all.ts    # générés
  icons/<name>.ts     # 2583 modules de données générés
  js/                 # miroir compilé (esbuild) : index.js, *.js, icons/*.js
  README.md  tsconfig.json

📄 Licence

MIT © INICODE