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

ui-opera-pd

v1.0.1

Published

Libreria de componentes visuales para Opera PD. La idea es que `admin-opera-pd` y `site-opera-pd` usen exactamente los mismos componentes:

Readme

ui-opera-pd

Libreria de componentes visuales para Opera PD. La idea es que admin-opera-pd y site-opera-pd usen exactamente los mismos componentes:

  • site-opera-pd los renderiza como web publica.
  • admin-opera-pd los renderiza dentro del editor/preview.
  • ui-opera-pd concentra el catalogo, los temas y el renderer.

Desarrollo local

npm install
npm run showcase

El showcase corre con Next y permite revisar los componentes de la libreria sin entrar a admin o site.

Para compilar la libreria:

npm run build

El build genera dist/index.mjs, dist/index.js y dist/index.d.ts.

Uso en admin y site

import { ThemeProvider, SectionRenderer } from 'ui-opera-pd';

<ThemeProvider theme={site.theme}>
  {layout.map((section) => (
    <SectionRenderer
      key={section.id}
      type={section.type}
      theme={section.theme}
      props={{ ...section.props, config: site, products }}
    />
  ))}
</ThemeProvider>

En Next, mantener esto en next.config.ts:

const nextConfig = {
  transpilePackages: ['ui-opera-pd'],
};

Y en src/app/globals.css de cada app que consume la libreria:

@import "tailwindcss";
@source "../../node_modules/ui-opera-pd";

Para mantener Turbopack rapido y estable, admin-opera-pd y site-opera-pd deben consumir la libreria desde node_modules, no desde un alias local a ../ui-opera-pd/src. Cuando cambies la libreria localmente, compila/empaca la libreria y reinstala el paquete en la app consumidora.

cd ui-opera-pd
npm run pack:local

cd ../admin-opera-pd
npm_config_cache=../.npm-cache npm install --no-save ../.packages/ui-opera-pd-1.0.1.tgz

cd ../site-opera-pd
npm_config_cache=../.npm-cache npm install --no-save ../.packages/ui-opera-pd-1.0.1.tgz

Esto evita que Turbopack tenga que resolver codigo fuente fuera de la app. Para produccion, usa siempre un paquete publicado en un registry.

Publicacion recomendada

Para produccion, no uses git+ssh. Publica la libreria en npm y consume una version normal:

"ui-opera-pd": "^1.0.1"

Para publicar necesitas estar logueado en npm:

npm login
npm whoami

Publicar una nueva version:

cd ui-opera-pd
npm version patch
npm publish --access public

Instalar/actualizar en las apps:

cd ../admin-opera-pd
npm install ui-opera-pd@latest

cd ../site-opera-pd
npm install ui-opera-pd@latest

En deploy, si el paquete es publico no necesitas llave SSH ni token para instalarlo.

Contrato de componentes

La unidad que viaja entre API, admin y site es una seccion:

type PageSection = {
  id: string;
  type: 'NAVIGATION' | 'HERO' | 'BRANDS_BAR' | 'PRODUCTS_GRID' | 'CONFIGURATOR' | 'FOOTER';
  theme?: 'automotive' | 'minimal';
  props?: Record<string, unknown>;
};

COMPONENTS_CATALOG define que puede agregar el editor. SectionRenderer decide que componente renderizar segun type y theme.