{"_id":"@astralibx/rule-engine-ui","_rev":"3-8916d008c81ac041cd4bcd5ff8db66e6","name":"@astralibx/rule-engine-ui","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@astralibx/rule-engine-ui","version":"1.0.0","license":"MIT","_id":"@astralibx/rule-engine-ui@1.0.0","maintainers":[{"name":"astralib","email":"1997hariprakash@gmail.com"}],"homepage":"https://github.com/Hariprakash1997/astralib#readme","bugs":{"url":"https://github.com/Hariprakash1997/astralib/issues"},"dist":{"shasum":"9fcc1074a9b6f1e49671eb545e8eef2cbe932793","tarball":"https://registry.npmjs.org/@astralibx/rule-engine-ui/-/rule-engine-ui-1.0.0.tgz","fileCount":8,"integrity":"sha512-BHDEq4v8LTflkIBoAyu73XkpsvV4f2V9GrsE+XVEColSh1pqXS80mqTlo3cV7k+b5IyAUqom+b/zcq1ztpJ0jA==","signatures":[{"sig":"MEUCIQD4DoexhSNAQSBBVcOJ8HooWb5/TqOelgnQezJzLKwZzAIgKFRlcGTcSOdev9OJXpKzXdc1wpGSZqODWIIswUfW+fo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":396672},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"./api":{"import":{"types":"./dist/api.d.ts","default":"./dist/api.js"}}},"gitHead":"ae1365ff1004be6b7ef07ac5ca5a5d6d8d9a6fa6","scripts":{"dev":"vite","test":"vitest run","build":"vite build"},"_npmUser":{"name":"astralib","email":"1997hariprakash@gmail.com"},"repository":{"url":"git+https://github.com/Hariprakash1997/astralib.git","type":"git","directory":"packages/rule-engine/ui"},"_npmVersion":"10.9.4","description":"Shared Lit Web Components for @astralibx rule engine admin UIs","directories":{},"_nodeVersion":"22.22.1","dependencies":{"lit":"^3.0.0"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^6.0.0","vitest":"^3.0.0","typescript":"^5.8.0"},"_npmOperationalInternal":{"tmp":"tmp/rule-engine-ui_1.0.0_1773917002455_0.6095617426113982","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@astralibx/rule-engine-ui","version":"1.0.1","license":"MIT","_id":"@astralibx/rule-engine-ui@1.0.1","maintainers":[{"name":"astralib","email":"1997hariprakash@gmail.com"}],"homepage":"https://github.com/Hariprakash1997/astralib#readme","bugs":{"url":"https://github.com/Hariprakash1997/astralib/issues"},"dist":{"shasum":"a00bf3a4b50c72c5729e918d2fd0af7b4894ba24","tarball":"https://registry.npmjs.org/@astralibx/rule-engine-ui/-/rule-engine-ui-1.0.1.tgz","fileCount":8,"integrity":"sha512-IJ5itSh7UIQeVGIaFnKYoof9G4kAgd29Wz7rmbCBHnWmGp7uyljwmEgQm6rng8NuYyr408H3UzbiS4AxSfuUDQ==","signatures":[{"sig":"MEUCIAcDyWyYb0Wc2JBL9b0F0hSldNI9g4HNy8tun09GLJEaAiEAygXLV10dHEnIfOnzs5Ns8vXSXJxpxm4VvXJnbOwDFS8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":407190},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"./api":{"import":{"types":"./dist/api.d.ts","default":"./dist/api.js"}}},"gitHead":"4d2a55b3968e55f083d4a957eb2319acb1fa5ba3","scripts":{"dev":"vite","test":"vitest run","build":"vite build"},"_npmUser":{"name":"astralib","email":"1997hariprakash@gmail.com"},"repository":{"url":"git+https://github.com/Hariprakash1997/astralib.git","type":"git","directory":"packages/rule-engine/ui"},"_npmVersion":"10.9.4","description":"Shared Lit Web Components for @astralibx rule engine admin UIs","directories":{},"_nodeVersion":"22.22.1","dependencies":{"lit":"^3.0.0"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^6.0.0","vitest":"^3.0.0","typescript":"^5.8.0"},"_npmOperationalInternal":{"tmp":"tmp/rule-engine-ui_1.0.1_1773998151115_0.17757945075016957","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@astralibx/rule-engine-ui","version":"1.0.2","description":"Shared Lit Web Components for @astralibx rule engine admin UIs","repository":{"type":"git","url":"git+https://github.com/Hariprakash1997/astralib.git","directory":"packages/rule-engine/ui"},"type":"module","main":"dist/index.js","module":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"./api":{"import":{"types":"./dist/api.d.ts","default":"./dist/api.js"}}},"scripts":{"build":"vite build","dev":"vite","test":"vitest run"},"dependencies":{"lit":"^3.0.0"},"devDependencies":{"typescript":"^5.8.0","vite":"^6.0.0","vite-plugin-dts":"^4.5.4","vitest":"^3.0.0"},"license":"MIT","_id":"@astralibx/rule-engine-ui@1.0.2","gitHead":"a262056ce04db2d3bf6f81446845b04bacabf087","bugs":{"url":"https://github.com/Hariprakash1997/astralib/issues"},"homepage":"https://github.com/Hariprakash1997/astralib#readme","_nodeVersion":"22.22.1","_npmVersion":"10.9.4","dist":{"integrity":"sha512-P0bV8Vl+prsLmv0WuuGjJ0I1+wRsap1Edrb+gB3FMi87gyk/7FxuoewzULpSFd34x/aa5/a4H6S8SwCpFDy7RQ==","shasum":"02426ce2e8e97048634533472ca6126bd8d8cf80","tarball":"https://registry.npmjs.org/@astralibx/rule-engine-ui/-/rule-engine-ui-1.0.2.tgz","fileCount":10,"unpackedSize":425165,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIHzmRpyQDIbCSq45yNjVJ72V+xRc9AsVQaclXpLTjigdAiAVwEkwGf/uD62xDQhcaV45jZ/j4cYSicWb0gpjw7PvxA=="}]},"_npmUser":{"name":"astralib","email":"1997hariprakash@gmail.com"},"directories":{},"maintainers":[{"name":"astralib","email":"1997hariprakash@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/rule-engine-ui_1.0.2_1774004043861_0.05315862807559024"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-19T10:43:22.346Z","modified":"2026-03-20T10:54:04.413Z","1.0.0":"2026-03-19T10:43:22.615Z","1.0.1":"2026-03-20T09:15:51.256Z","1.0.2":"2026-03-20T10:54:03.992Z"},"bugs":{"url":"https://github.com/Hariprakash1997/astralib/issues"},"license":"MIT","homepage":"https://github.com/Hariprakash1997/astralib#readme","repository":{"type":"git","url":"git+https://github.com/Hariprakash1997/astralib.git","directory":"packages/rule-engine/ui"},"description":"Shared Lit Web Components for @astralibx rule engine admin UIs","maintainers":[{"name":"astralib","email":"1997hariprakash@gmail.com"}],"readme":"# @astralibx/rule-engine-ui\n\nShared Lit Web Components for rule engine admin interfaces. Platform-agnostic — works with email, telegram, whatsapp, or any channel.\n\n## Install\n\n```bash\nnpm install @astralibx/rule-engine-ui\n```\n\nPeer dependency: `lit ^3.0.0`\n\n## Components\n\n| Component | Description |\n|-----------|-------------|\n| `<alx-rule-engine-dashboard>` | Pre-built tabbed dashboard with all components |\n| `<alx-template-editor>` | Template CRUD with slot-based content editor |\n| `<alx-rule-editor>` | Rule CRUD with condition builder and preview |\n| `<alx-template-list>` | Templates table with filters and actions |\n| `<alx-rule-list>` | Rules table with dry run and actions |\n| `<alx-run-history>` | Run history with real-time progress |\n| `<alx-throttle-settings>` | Throttle and send window configuration |\n| `<alx-send-log>` | Send log viewer with filters |\n| `<alx-drawer>` | Right-side drawer for forms |\n\n## Quick Start\n\n### Full Dashboard\n\n```html\n<script type=\"module\">\n  import '@astralibx/rule-engine-ui';\n</script>\n\n<alx-rule-engine-dashboard\n  baseUrl=\"/api/rules\"\n  .platforms=${['email', 'telegram']}\n  .audiences=${['customer', 'provider']}\n  .categories=${['onboarding', 'engagement']}\n></alx-rule-engine-dashboard>\n```\n\n### Individual Components\n\n```html\n<alx-rule-editor baseUrl=\"/api/rules\" ruleId=\"abc123\"></alx-rule-editor>\n<alx-template-list baseUrl=\"/api/rules\" .platforms=${['email']}></alx-template-list>\n```\n\n### Slot-Based Template Editor\n\n```html\n<alx-template-editor baseUrl=\"/api/rules\">\n  <!-- Your platform-specific editor fills this slot -->\n  <my-mjml-editor slot=\"content\"\n    .bodies=${bodies}\n    .subjects=${subjects}\n    @content-changed=${handleChange}>\n  </my-mjml-editor>\n</alx-template-editor>\n```\n\n## Theming\n\nOverride CSS custom properties:\n\n```css\nalx-rule-engine-dashboard {\n  --alx-primary: #0ea5e9;\n  --alx-radius: 8px;\n  --alx-bg: #ffffff;\n  --alx-text: #1f2937;\n  --alx-border: #e5e7eb;\n}\n```\n\n## API Connection\n\nComponents connect via `baseUrl` prop (built-in HTTP client) or custom API instance:\n\n```typescript\nimport { RuleEngineAPI, HttpClient } from '@astralibx/rule-engine-ui';\n\nconst api = new RuleEngineAPI(new HttpClient('/api/rules'));\n// Pass to any component:\ndocument.querySelector('alx-rule-editor').api = api;\n```\n\n## Core Documentation\n\nFor backend setup, adapters, collections, templates, rules, throttling, and hooks, see the core package documentation:\n\n- [Quick Start Tutorial](https://github.com/Hariprakash1997/astralib/blob/main/packages/rule-engine/core/docs/quick-start-tutorial.md)\n- [Adapters Guide](https://github.com/Hariprakash1997/astralib/blob/main/packages/rule-engine/core/docs/adapters.md)\n- [Collections & Joins](https://github.com/Hariprakash1997/astralib/blob/main/packages/rule-engine/core/docs/collections-and-joins.md)\n- [Templates & Rules](https://github.com/Hariprakash1997/astralib/blob/main/packages/rule-engine/core/docs/templates-and-rules.md)\n- [Throttling & Hooks](https://github.com/Hariprakash1997/astralib/blob/main/packages/rule-engine/core/docs/throttling-and-hooks.md)\n\n## Plain HTML / No Framework\n\nComponents are standard custom elements and work without any framework. Import the module once — it self-registers all `alx-*` elements.\n\n```html\n<!-- Just import the module — components auto-register -->\n<script type=\"module\">\n  import 'https://unpkg.com/@astralibx/rule-engine-ui';\n</script>\n\n<!-- Use as standard HTML elements -->\n<alx-rule-engine-dashboard\n  baseUrl=\"/api/rules\"\n  platforms='[\"email\",\"telegram\"]'\n  audiences='[\"customer\",\"provider\"]'\n  categories='[\"onboarding\",\"engagement\"]'\n></alx-rule-engine-dashboard>\n```\n\nNote: array props must be JSON strings when used as HTML attributes.\n\nVanilla JS alternative — create elements programmatically:\n\n```javascript\nconst dashboard = document.createElement('alx-rule-engine-dashboard');\ndashboard.baseUrl = '/api/rules';\ndashboard.platforms = ['email', 'telegram'];\ndocument.body.appendChild(dashboard);\n```\n\n- [Changelog](https://github.com/Hariprakash1997/astralib/blob/main/packages/rule-engine/ui/CHANGELOG.md)\n\n## License\n\nMIT\n","readmeFilename":"README.md"}