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

@orsetra/wiki-ui

v0.12.0

Published

A React Wiki component

Readme

@orchestra/wiki-ui

Une solution UI de wiki légère en React avec support Markdown, inspirée du design IBM Carbon.

npm version License: MIT

Fonctionnalités

Visualisation

  • Sidebar avec liste des pages (Home + pages personnalisées)
  • Rendu Markdown avec support GFM (GitHub Flavored Markdown)
  • Cache intelligent via Zustand + sessionStorage
  • Navigation fluide entre les pages

Édition

  • Éditeur Markdown intégré
  • Mode édition/visualisation avec basculement facile
  • Sauvegarde avec confirmation
  • Discard pour annuler les modifications

Gestion des pages

  • Création de nouvelles pages via modal
  • Suppression avec confirmation (sauf page Home)
  • Affichage automatique de l'index après suppression de la page active

Installation

npm install @orchestra/wiki-ui

Ou avec yarn:

yarn add @orchestra/wiki-ui

Utilisation

Import du composant

import { Wiki } from '@orchestra/wiki-ui';
import '@orchestra/wiki-ui/dist/wiki.css';

const config = {
  index: 'index.md',
  pages: ['page1.md', 'page2.md']
};

const loadPage = async (pageName: string): Promise<string> => {
  // Votre logique de chargement
  return await fetch(`/api/pages/${pageName}`).then(r => r.text());
};

const savePage = async (pageName: string, content: string): Promise<void> => {
  // Votre logique de sauvegarde
  await fetch(`/api/pages/${pageName}`, {
    method: 'POST',
    body: content
  });
};

const deletePage = async (pageName: string): Promise<void> => {
  // Votre logique de suppression
  await fetch(`/api/pages/${pageName}`, { method: 'DELETE' });
};

<Wiki
  config={config}
  onLoadPage={loadPage}
  onSavePage={savePage}
  onDeletePage={deletePage}
/>

API

Props du composant Wiki

| Prop | Type | Description | |------|------|-------------| | config | WikiConfig | Configuration avec index, liste des pages et largeur du sidebar | | onLoadPage | (pageName: string) => Promise<string> | Fonction de chargement d'une page | | onSavePage | (pageName: string, content: string) => Promise<void> | Fonction de sauvegarde | | onDeletePage | (pageName: string) => Promise<void> | Fonction de suppression |

WikiConfig

interface WikiConfig {
  index: string;           // Page d'accueil (ex: 'index.md')
  pages: string[];         // Liste des pages
  sidebarWidth?: number;   // Largeur du sidebar en pixels (défaut: 256)
}

Composants exportés

  • Wiki - Composant principal
  • Sidebar - Barre latérale
  • MarkdownEditor - Éditeur Markdown
  • MarkdownViewer - Visualiseur Markdown
  • Modal - Composant modal
  • useWikiStore - Hook Zustand pour le state management

Structure du projet

src/
├── components/
│   ├── Wiki.tsx              # Composant principal
│   ├── Sidebar.tsx           # Barre latérale avec liste des pages
│   ├── MarkdownViewer.tsx    # Visualiseur Markdown
│   ├── MarkdownEditor.tsx    # Éditeur Markdown
│   └── Modal.tsx             # Composant modal réutilisable
├── store/
│   └── wikiStore.ts          # Store Zustand avec cache
├── styles/
│   └── wiki.css              # Styles IBM Carbon
├── types.ts                  # Définitions TypeScript
├── App.tsx                   # Application exemple
└── main.tsx                  # Point d'entrée

Fonctionnalités avancées

Sidebar personnalisable

const config = {
  index: 'index.md',
  pages: ['page1.md', 'page2.md'],
  sidebarWidth: 320, // Largeur personnalisée
};

Double-clic pour éditer

Double-cliquez sur le contenu en mode lecture pour passer en mode édition.

Retour à la ligne automatique

L'éditeur supporte le word wrap automatique sans scroll horizontal.

Cache intelligent

Le contenu des pages est mis en cache automatiquement pour une navigation fluide.

Technologies

  • React 18 - Framework UI
  • TypeScript - Typage statique
  • Zustand - Gestion d'état avec persistence
  • React Markdown - Rendu Markdown avec support GFM
  • @uiw/react-markdown-editor - Éditeur Markdown basé sur CodeMirror
  • Carbon Icons - Icônes IBM Carbon
  • Vite - Build tool

Style

Le design s'inspire du système IBM Carbon avec :

  • Palette de couleurs épurée
  • Typographie IBM Plex
  • Animations fluides (70ms cubic-bezier)
  • Espacement cohérent
  • Interface minimaliste et professionnelle

Développement

Pour contribuer au développement :

# Cloner le repository
git clone [email protected]:intergrations/orchestra/ui/wiki.git
cd wiki

# Installer les dépendances
npm install

# Démarrer en mode développement
npm run dev

# Build de la bibliothèque
npm run build:lib

Publication

Licence

MIT