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

@ocularsolution/astro

v0.1.1

Published

Integración Astro para el SDK de Ocular Solution.

Readme

@ocularsolution/astro

SDK oficial de Ocular Solution para integrar videollamadas en sitios Astro mediante islands de React.

Incluye una integración de Astro que expone la configuración del widget y re-exporta los componentes React del SDK para usarlos con client:load / client:idle.

Compatibilidad

| Componente | Versión | |---|---| | Astro | ≥ 4.0 | | @astrojs/react | requerido | | TypeScript (opcional) | ≥ 5.0 — tipos .d.ts incluidos |

1. Antes de empezar

Solicite a Ocular Solution sus datos de aprovisionamiento:

  1. widgetCode — código de organización de su widget. Configúrelo por variable de entorno; no lo incruste en el repositorio.
  2. widgetUrl — URL https del script del widget para su entorno.
  3. Autorización de su dominio — el origin desde el que su sitio usará el widget debe estar dado de alta por Ocular Solution. Sin este registro el widget no se inicializa (verá OCULAR_E_WIDGET_TIMEOUT).

2. Instalación

pnpm add @ocularsolution/astro @astrojs/react react react-dom
# o
npm install @ocularsolution/astro @astrojs/react react react-dom

3. Uso

Registrar la integración

// astro.config.mjs
import { defineConfig } from 'astro/config';
import react from '@astrojs/react';
import ocular from '@ocularsolution/astro';

export default defineConfig({
  integrations: [
    react(),
    ocular({
      widgetCode: process.env.PUBLIC_OCULAR_WIDGET_CODE,
      widgetUrl: process.env.PUBLIC_OCULAR_WIDGET_URL,
      appOrigin: process.env.PUBLIC_OCULAR_APP_ORIGIN,
    }),
  ],
});

Usar los componentes como islands

---
// src/pages/videollamada.astro
import { OcularProvider, OcularCall } from '@ocularsolution/astro';
---

<OcularProvider
  widgetCode={import.meta.env.PUBLIC_OCULAR_WIDGET_CODE}
  widgetUrl={import.meta.env.PUBLIC_OCULAR_WIDGET_URL}
  appOrigin={import.meta.env.PUBLIC_OCULAR_APP_ORIGIN}
  client:load
>
  <OcularCall client:load />
</OcularProvider>

Los componentes con estado de Ocular deben usar client:load o client:idle — no se renderizan en el servidor.

4. API

La integración re-exporta la API completa de @ocularsolution/react: OcularProvider, OcularCall, useOcular(), useOcularCall() y DomTransport. Consulte el README de @ocularsolution/react para la referencia de props, estados y eventos.

5. Errores comunes

| Código | Causa | Solución | |---|---|---| | OCULAR_E_WIDGET_TIMEOUT | Dominio no autorizado, widgetUrl/widgetCode incorrectos | Verifique el aprovisionamiento con Ocular Solution | | OCULAR_E_SCRIPT_LOAD | El navegador no pudo descargar el script (red/CSP) | Verifique la URL y su política CSP | | Hydration mismatch | Componentes de Ocular renderizados en servidor | Use client:load / client:idle |

Protección de datos

setCustomer() permite asociar datos del usuario a la sesión. No envíe datos personales sin base legal y consentimiento. Las videollamadas pueden ser grabadas según la configuración de su organización: informe al usuario conforme a la normativa aplicable.


© Ocular Solution. Soporte: a través de su canal de cuenta. Incidentes de seguridad: [email protected]