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

@astralibx/rule-engine-ui

v1.0.2

Published

Shared Lit Web Components for @astralibx rule engine admin UIs

Downloads

323

Readme

@astralibx/rule-engine-ui

Shared Lit Web Components for rule engine admin interfaces. Platform-agnostic — works with email, telegram, whatsapp, or any channel.

Install

npm install @astralibx/rule-engine-ui

Peer dependency: lit ^3.0.0

Components

| Component | Description | |-----------|-------------| | <alx-rule-engine-dashboard> | Pre-built tabbed dashboard with all components | | <alx-template-editor> | Template CRUD with slot-based content editor | | <alx-rule-editor> | Rule CRUD with condition builder and preview | | <alx-template-list> | Templates table with filters and actions | | <alx-rule-list> | Rules table with dry run and actions | | <alx-run-history> | Run history with real-time progress | | <alx-throttle-settings> | Throttle and send window configuration | | <alx-send-log> | Send log viewer with filters | | <alx-drawer> | Right-side drawer for forms |

Quick Start

Full Dashboard

<script type="module">
  import '@astralibx/rule-engine-ui';
</script>

<alx-rule-engine-dashboard
  baseUrl="/api/rules"
  .platforms=${['email', 'telegram']}
  .audiences=${['customer', 'provider']}
  .categories=${['onboarding', 'engagement']}
></alx-rule-engine-dashboard>

Individual Components

<alx-rule-editor baseUrl="/api/rules" ruleId="abc123"></alx-rule-editor>
<alx-template-list baseUrl="/api/rules" .platforms=${['email']}></alx-template-list>

Slot-Based Template Editor

<alx-template-editor baseUrl="/api/rules">
  <!-- Your platform-specific editor fills this slot -->
  <my-mjml-editor slot="content"
    .bodies=${bodies}
    .subjects=${subjects}
    @content-changed=${handleChange}>
  </my-mjml-editor>
</alx-template-editor>

Theming

Override CSS custom properties:

alx-rule-engine-dashboard {
  --alx-primary: #0ea5e9;
  --alx-radius: 8px;
  --alx-bg: #ffffff;
  --alx-text: #1f2937;
  --alx-border: #e5e7eb;
}

API Connection

Components connect via baseUrl prop (built-in HTTP client) or custom API instance:

import { RuleEngineAPI, HttpClient } from '@astralibx/rule-engine-ui';

const api = new RuleEngineAPI(new HttpClient('/api/rules'));
// Pass to any component:
document.querySelector('alx-rule-editor').api = api;

Core Documentation

For backend setup, adapters, collections, templates, rules, throttling, and hooks, see the core package documentation:

Plain HTML / No Framework

Components are standard custom elements and work without any framework. Import the module once — it self-registers all alx-* elements.

<!-- Just import the module — components auto-register -->
<script type="module">
  import 'https://unpkg.com/@astralibx/rule-engine-ui';
</script>

<!-- Use as standard HTML elements -->
<alx-rule-engine-dashboard
  baseUrl="/api/rules"
  platforms='["email","telegram"]'
  audiences='["customer","provider"]'
  categories='["onboarding","engagement"]'
></alx-rule-engine-dashboard>

Note: array props must be JSON strings when used as HTML attributes.

Vanilla JS alternative — create elements programmatically:

const dashboard = document.createElement('alx-rule-engine-dashboard');
dashboard.baseUrl = '/api/rules';
dashboard.platforms = ['email', 'telegram'];
document.body.appendChild(dashboard);

License

MIT