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

@echelon-framework/embed

v0.7.1

Published

Lightweight embed script for mounting Echelon components in legacy apps via iframe + postMessage bridge. Zero dependencies, framework-agnostic.

Readme

@echelon-framework/embed

Lightweight embed script for mounting Echelon components in legacy apps. Zero dependencies, framework-agnostic, ~3KB.

Installation

npm install @echelon-framework/embed

Quick Start (Legacy App)

<!-- Load + auto-configure -->
<script src="https://echelon.company.com/embed.js" data-host="https://echelon.company.com"></script>

<!-- Mount by component ID (not URL) -->
<echelon-embed component="frm_abc123" data='{"clientId":"CLI-001"}'> </echelon-embed>

<!-- Listen for events -->
<script>
  document.querySelector('echelon-embed').addEventListener('echelon-event', (e) => {
    if (e.detail.type === 'submit') {
      saveToLegacySystem(e.detail.payload);
    }
  });
</script>

Programmatic API

import { EchelonEmbed } from '@echelon-framework/embed';

// Initialize once
EchelonEmbed.init({ host: 'https://echelon.company.com' });

// Mount component
const instance = await EchelonEmbed.mount('#container', {
  componentId: 'frm_abc123',
  data: { clientId: 'CLI-001' },
  onEvent: (event) => console.log(event.type, event.payload),
  onReady: (contract) => console.log('requires:', contract.requires),
  onError: (error) => console.error(error.message),
});

// Update data without reload
EchelonEmbed.update('frm_abc123', { clientId: 'CLI-002' });

// Fetch contract (requires/emits) before mounting
const contract = await EchelonEmbed.fetchContract('frm_abc123');

// Cleanup
instance.destroy();
EchelonEmbed.destroyAll();

Features

  • iframe + postMessage bridge — full CSS/JS isolation from legacy app
  • Contract validation — auto-validates requires before mounting, warns on missing data
  • Auto-resize — iframe height adapts to content (ResizeObserver)
  • Custom Element<echelon-embed> works in any framework (React, Vue, jQuery, plain HTML)
  • Update without reloadEchelonEmbed.update(id, newData) sends data via postMessage
  • Auto-initdata-host attribute on script tag configures automatically

PostMessage Protocol

| Direction | Type | Description | | ---------------- | ------------------ | ----------------------------------- | | legacy → echelon | echelon:init | Send initial data | | legacy → echelon | echelon:update | Update data | | echelon → legacy | echelon:ready | Component loaded | | echelon → legacy | echelon:event | Event (submit, change, cancel) | | echelon → legacy | echelon:resize | Auto-resize iframe height | | echelon → legacy | echelon:contract | Component contract (requires/emits) |

Host Bridge (Echelon App Side)

import { initEmbedHostBridge, emitToParent } from '@echelon-framework/embed/host-bridge';

initEmbedHostBridge({
  onInit: (componentId, data) => {
    /* parent sent initial data */
  },
  onUpdate: (componentId, data) => {
    /* parent updated data */
  },
});

// Send event to parent (legacy app)
emitToParent('submit', { clientId: 'CLI-001', name: 'Acme' });

Component Registry

import {
  registerEmbeddableComponent,
  registerFormsFromStore,
} from '@echelon-framework/embed/registry';

// Auto-register all forms
registerFormsFromStore(formStore.all());

// Manual registration
registerEmbeddableComponent({
  componentId: 'fx-spot-form',
  type: 'form',
  storeId: 'fx-spot-form',
  title: 'FX Spot Transaction',
  requires: [{ name: 'clientData', type: 'object', required: true }],
  emits: [{ event: 'submit', description: 'Transaction submitted' }],
});

License

BUSL-1.1