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 🙏

© 2024 – Pkg Stats / Ryan Hefner

ui-plugin

v3.0.0-alpha.5

Published

API for composable 3rd party UI plugins

Downloads

331

Readme

ui-plugin

ci status coverage status

API for composable 3rd party UI plugins

Goal

Enable a system of user interface plugins that meets the following criteria:

  • Plugins are authered, compiled and deployed independently, by anyone under any repository.
  • Plugins can also be authored locally, sharing modules and compilation with the host project.
  • Plugins can be installed at run time. This includes download from an external repository like npm.
  • Plugins can be enabled and disabled at run time, including newly installed ones. No restart of the host app required.
  • Plugins can manage visual components, app state, or both.
  • Plugins can emit events that other plugins can subscribe to.
  • Plugins expose public methods that other plugins can call synchronously.
  • Each plugin has read-write access to own its state.
  • Plugin state is private. State can be made available to other plugins though methods.
  • Plugins can define render slots that other plugins can plug into. More plugins can take up the same slot and can choose to compose or override each other.
  • Render slots derive their inputs from plugin state and method APIs, and update automatically whenever the state of a relevant plugin changes.
  • Renders slots are free to manage their own private state that isn't accessible at plugin level.
  • Plugin API is type-friendly.
  • Plugins can share common libraries (eg. React) by configuring the host app to attach those libraries to the global namespace and configuring the plugin build to map related imports to the global namespace.

Strategy

Use the global namespace to connect plugins from different script files. Expose declarative APIs for defining and registering plugins that abstracts the global namespace.

Design

  • Registered plugins are enabled by default. In the user land, this indirectly leads to using a disabled plugin list to configure the enabled state of installed plugins (ie. a deny list).
  • Enabling a plugin at run-time will reload all plugins. Other plugins' onLoad handlers might perform actions that are relevant to the newly enabled plugin. This leads to a deterministic collective plugin outcome, regardless of when a plugin is enabled. But while plugin execution resets, previous state is preserved.