agentui-wc 0.1.52 → 0.1.56

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/AGENTS.md +11 -11
  2. package/README.md +42 -10
  3. package/dist/AGENTS.md +11 -11
  4. package/dist/README.md +42 -10
  5. package/dist/agentui.esm.js +210 -222
  6. package/dist/agentui.esm.js.map +10 -11
  7. package/dist/agentui.min.js +210 -222
  8. package/dist/agentui.min.js.map +10 -11
  9. package/dist/chunks/advanced.js +3 -3
  10. package/dist/chunks/chunk-m5sq043j.js +5 -0
  11. package/dist/chunks/core.js +1 -1
  12. package/dist/chunks/feedback.js +1 -1
  13. package/dist/chunks/layout.js +2 -2
  14. package/dist/component-schema.json +1 -1
  15. package/dist/components/au-code.js +5 -5
  16. package/dist/components/au-error-boundary.js +1 -1
  17. package/dist/components/au-prompt-ui.js +5 -5
  18. package/dist/components/au-sidebar.js +1 -1
  19. package/dist/components/au-theme-toggle.js +1 -1
  20. package/dist/components/au-toast.js +1 -1
  21. package/dist/components/chunk-yh93vx74.js +2 -0
  22. package/dist/routes/alerts.js +1 -1
  23. package/dist/routes/avatars.js +1 -1
  24. package/dist/routes/badges.js +1 -1
  25. package/dist/routes/buttons.js +1 -1
  26. package/dist/routes/callouts.js +1 -1
  27. package/dist/routes/cards.js +1 -1
  28. package/dist/routes/checkboxes.js +1 -1
  29. package/dist/routes/chips.js +1 -1
  30. package/dist/routes/{chunk-9azcekgx.js → chunk-0g66jt6k.js} +3 -3
  31. package/dist/routes/{chunk-cc41mar1.js → chunk-32d29sak.js} +1 -1
  32. package/dist/routes/chunk-hfds909w.js +5 -0
  33. package/dist/routes/codeblocks.js +1 -1
  34. package/dist/routes/confirms.js +1 -1
  35. package/dist/routes/datatables.js +1 -1
  36. package/dist/routes/dividers.js +1 -1
  37. package/dist/routes/dropdowns.js +1 -1
  38. package/dist/routes/enterprise.js +2 -2
  39. package/dist/routes/icons.js +1 -1
  40. package/dist/routes/inputs.js +1 -1
  41. package/dist/routes/installation.js +1 -1
  42. package/dist/routes/layout.js +1 -1
  43. package/dist/routes/modals.js +1 -1
  44. package/dist/routes/navbar.js +1 -1
  45. package/dist/routes/progress.js +1 -1
  46. package/dist/routes/radios.js +1 -1
  47. package/dist/routes/shell-deferred.js +1 -1
  48. package/dist/routes/shell.js +3 -15
  49. package/dist/routes/skeletons.js +1 -1
  50. package/dist/routes/spinners.js +1 -1
  51. package/dist/routes/src/chunks/core.js +13 -25
  52. package/dist/routes/switches.js +1 -1
  53. package/dist/routes/tables.js +1 -1
  54. package/dist/routes/tabs.js +1 -1
  55. package/dist/routes/toasts.js +1 -1
  56. package/dist/routes/tooltips.js +1 -1
  57. package/dist/routes/virtual-lists.js +1 -1
  58. package/llms.txt +2 -2
  59. package/package.json +3 -5
  60. package/dist/chunks/chunk-0srq5wj4.js +0 -14
  61. package/dist/chunks/chunk-6b7h9kd0.js +0 -5
  62. package/dist/components/chunk-bskq7gk9.js +0 -14
  63. package/dist/routes/chunk-t3k7hp3s.js +0 -17
package/AGENTS.md CHANGED
@@ -448,7 +448,7 @@ AgentUI is optimized for AI Agents with deep introspection, runtime feedback, en
448
448
  A `custom-elements.json` manifest is included in the root. Agents can read this to understand:
449
449
  - Component Attributes (names, types, defaults)
450
450
  - Events and payloads
451
- - CSS Shadow Parts
451
+ - CSS Custom Properties (theming)
452
452
 
453
453
  **2. Runtime Debugging (Agent Logger)**
454
454
  Components validate usage and log structured errors to `window.__MICROUI_ERRORS__`.
@@ -526,7 +526,7 @@ AgentUI.getErrors(); // All caught errors
526
526
  ```html
527
527
  <!-- === ERROR BOUNDARIES === -->
528
528
  <!-- Catch errors with fallback UI - one error doesn't crash everything -->
529
- <au-error-boundary fallback="<p>Something went wrong</p>">
529
+ <au-error-boundary fallback="Something went wrong">
530
530
  <au-complex-widget></au-complex-widget>
531
531
  </au-error-boundary>
532
532
 
@@ -820,7 +820,7 @@ const current = Theme.get(); // 'dark' | 'light'
820
820
  **Why App Shell?**
821
821
  | Approach | Initial Load | Lighthouse | DX for Agents |
822
822
  |----------|--------------|------------|---------------|
823
- | Minimal (all-in-one) | ~59KB + content | 70-85 | Simple but suboptimal |
823
+ | Minimal (all-in-one) | ~60KB + content | 70-85 | Simple but suboptimal |
824
824
  | **App Shell (lazy)** | ~20KB shell → routes lazy | **100/100** | Optimal performance |
825
825
 
826
826
  #### Architecture Overview
@@ -1316,7 +1316,7 @@ count.update(n => n + 1); // Update with function
1316
1316
  count.peek(); // Read without tracking
1317
1317
  ```
1318
1318
 
1319
- ### EventBus (CrossBus)
1319
+ ### EventBus (LightBus)
1320
1320
  ```javascript
1321
1321
  import { bus } from 'agentui-wc';
1322
1322
 
@@ -1949,9 +1949,9 @@ element.innerHTML = `<span>${userName}</span>`; // XSS RISK!
1949
1949
  ## File Structure
1950
1950
  ```
1951
1951
  dist/
1952
- ├── agentui.esm.js # Full ESM bundle (215 KB)
1953
- ├── agentui.min.js # Full IIFE bundle (215 KB)
1954
- ├── agentui.css # Combined CSS (64 KB)
1952
+ ├── agentui.esm.js # Full ESM bundle (174 KB)
1953
+ ├── agentui.min.js # Full IIFE bundle (175 KB)
1954
+ ├── agentui.css # Combined CSS (92 KB)
1955
1955
  ├── agentui.d.ts # TypeScript definitions
1956
1956
  ├── routes/ # Route Bundles (Modern)
1957
1957
  │ ├── shell.js # App Shell (Navbar, Theme, Bus) - 5 KB
@@ -2080,21 +2080,21 @@ For Modern performance, use the **App Shell** pattern. Load the critical shell f
2080
2080
 
2081
2081
  | Bundle | Content | Size (gzip) |
2082
2082
  |--------|---------|-------------|
2083
- | `shell.js` | Navbar, Theme, CrossBus, Toasts | ~5 KB |
2083
+ | `shell.js` | Navbar, Theme, EventBus, Toasts | ~5 KB |
2084
2084
  | `home.js` | Landing page components | ~2 KB |
2085
2085
  | `forms.js` | (Example) Input, Button, Checkbox | ~7 KB |
2086
2086
 
2087
2087
  **Why this is Modern:**
2088
2088
  - The user only downloads `shell.js` (small) to see the UI.
2089
2089
  - Page bundles (`home.js`) are only downloaded when navigating to that page.
2090
- - Common code (CrossBus, BaseClass) is shared via `chunk-*.js` files automatically.
2090
+ - Common code (EventBus, BaseClass) is shared via `chunk-*.js` files automatically.
2091
2091
 
2092
2092
  ---
2093
2093
 
2094
2094
  ## Performance Metrics
2095
- - **Bundle size:** 215 KB full / 8 KB route-based (gzipped: 75 KB / 3 KB)
2095
+ - **Bundle size:** 178 KB full / 8 KB route-based (gzipped: 61 KB / 3 KB)
2096
2096
  - **Lighthouse:** 100% Performance, 100% Accessibility, 100% SEO, 100% Best Practices
2097
- - **EventBus:** 111M ops/sec (CrossBus emitSync)
2097
+ - **EventBus:** 111M ops/sec (LightBus emitSync)
2098
2098
  - **Virtual List:** Handles 10K+ items at 60fps
2099
2099
  - **First paint:** <100ms (precached assets)
2100
2100
 
package/README.md CHANGED
@@ -17,8 +17,9 @@
17
17
  <a href="https://www.npmjs.com/package/agentui-wc"><img src="https://img.shields.io/npm/v/agentui-wc?color=6750A4" alt="npm version"></a>
18
18
  <a href="LICENSE"><img src="https://img.shields.io/badge/license-Apache--2.0-blue" alt="License"></a>
19
19
  <img src="https://img.shields.io/badge/dependencies-0-brightgreen" alt="Zero Dependencies">
20
- <img src="https://img.shields.io/badge/types-TypeScript-3178C6" alt="TypeScript">
21
- <img src="https://img.shields.io/badge/web%20components-v1-E44D26" alt="Web Components">
20
+ <img src="https://img.shields.io/badge/60KB_gzipped-brightgreen" alt="Bundle Size">
21
+ <img src="https://img.shields.io/badge/Material_Design_3-6750A4?logo=materialdesign&logoColor=white" alt="MD3">
22
+ <a href="https://pagespeed.web.dev/analysis?url=https://giuseppescottolavina.github.io/AgentUI/demo/"><img src="https://img.shields.io/badge/Lighthouse-100%2F100%2F100%2F100-brightgreen" alt="Lighthouse"></a>
22
23
  <a href="https://github.com/GiuseppeScottoLavina/AgentUI/pulls"><img src="https://img.shields.io/badge/PRs-welcome-brightgreen" alt="PRs Welcome"></a>
23
24
  </p>
24
25
 
@@ -67,6 +68,19 @@ AgentUI is built on four ideas:
67
68
 
68
69
  ---
69
70
 
71
+ ## Built Different
72
+
73
+ | | AgentUI | Typical Framework |
74
+ |---|---|---|
75
+ | **Bundle** | 60KB gzipped (JS+CSS), all 50 components | Tree-shake to ~20KB, then add deps |
76
+ | **Performance** | Lighthouse 100/100/100/100 ([verify](https://pagespeed.web.dev/analysis?url=https://giuseppescottolavina.github.io/AgentUI/demo/)) | Varies |
77
+ | **Dependencies** | Zero. Forever. | npm audit anxiety |
78
+ | **Tests** | 1272 tests, 0 failures, isolated runner | Coverage varies |
79
+ | **Memory** | Managed listeners (AbortController), zero leaks verified | Framework-dependent |
80
+ | **Security** | Every component XSS-audited, CSP-compatible, no `eval()` | Trust your deps |
81
+ | **Stability** | W3C Web Components — no migration treadmill | React 16→17→18→19... |
82
+ | **Accessibility** | ARIA roles, 48px touch targets, keyboard navigation | Add-on library |
83
+
70
84
  ---
71
85
 
72
86
  ## Try It — Zero Setup
@@ -96,14 +110,32 @@ AgentUI is built on four ideas:
96
110
  AgentUI is in **alpha** (v0.1.x). Here's an honest look at where we are:
97
111
 
98
112
  ### What works today
99
- - 50 components (buttons, cards, inputs, modals, drawers, data tables, schema forms, virtual lists...)
100
- - Zero-build architecture (one `<script>` tag, no bundler needed)
101
- - Runtime component discovery (`describe()`, `discoverAll()`)
102
- - Lazy-loaded describe catalog zero performance cost for end users
103
- - XSS-safe rendering with `escapeHTML` across all user-facing components
104
- - Agent-optimized documentation ([AGENTS.md](./AGENTS.md), [llms.txt](./llms.txt))
105
- - Real apps built with it: Kanban boards, multiplayer games, OS installers
106
- - 1272 tests (isolated runner), Lighthouse 100/100/100/100 on demo site
113
+
114
+ **Components & Design**
115
+ - 50 Material Design 3 components — buttons, cards, inputs, modals, drawers, data tables, schema forms, virtual lists, toasts, and more
116
+ - Full MD3 token system with light/dark theming via CSS variables
117
+ - ARIA roles, keyboard navigation, and 48px minimum touch targets
118
+
119
+ **Performance**
120
+ - 60KB total gzipped (48KB JS + 13KB CSS) includes all 50 components
121
+ - Route-based lazy loading with Speculation Rules API prefetching
122
+ - Lighthouse 100/100/100/100 on demo site ([verify it yourself](https://pagespeed.web.dev/analysis?url=https://giuseppescottolavina.github.io/AgentUI/demo/))
123
+ - 500 component DOM instantiation in <8ms, 500 updates in <3ms
124
+
125
+ **Engineering**
126
+ - 1272 isolated tests, zero failures, across 75 test files
127
+ - Every component XSS-audited — `escapeHTML()` on all user-facing content
128
+ - Zero runtime dependencies — zero supply chain risk
129
+ - Managed event listeners via AbortController — verified zero memory leaks
130
+ - No `eval()`, no `document.write()`, CSP-compatible
131
+ - Agent-optimized documentation ([AGENTS.md](./AGENTS.md), [llms.txt](./llms.txt), [component-schema.json](./component-schema.json))
132
+
133
+ **Proven in Production**
134
+ - Project management tools
135
+ - Real-time multiplayer applications
136
+ - Desktop system utilities (Electron)
137
+
138
+ > 💡 **Long-term maintainability by design** — AgentUI is built on W3C Web Components, a browser standard — not a framework. There's no migration from v16 to v17. No breaking Hooks rewrite. No Composition API pivot. `querySelector` has worked the same since 1998 and will work the same in 2030. Zero dependencies means zero `npm audit` surprises, zero abandoned transitive packages, and zero "waiting for library X to support framework Y."
107
139
 
108
140
  ### What's missing (and we know it)
109
141
  - Larger community testing and feedback
package/dist/AGENTS.md CHANGED
@@ -448,7 +448,7 @@ AgentUI is optimized for AI Agents with deep introspection, runtime feedback, en
448
448
  A `custom-elements.json` manifest is included in the root. Agents can read this to understand:
449
449
  - Component Attributes (names, types, defaults)
450
450
  - Events and payloads
451
- - CSS Shadow Parts
451
+ - CSS Custom Properties (theming)
452
452
 
453
453
  **2. Runtime Debugging (Agent Logger)**
454
454
  Components validate usage and log structured errors to `window.__MICROUI_ERRORS__`.
@@ -526,7 +526,7 @@ AgentUI.getErrors(); // All caught errors
526
526
  ```html
527
527
  <!-- === ERROR BOUNDARIES === -->
528
528
  <!-- Catch errors with fallback UI - one error doesn't crash everything -->
529
- <au-error-boundary fallback="<p>Something went wrong</p>">
529
+ <au-error-boundary fallback="Something went wrong">
530
530
  <au-complex-widget></au-complex-widget>
531
531
  </au-error-boundary>
532
532
 
@@ -820,7 +820,7 @@ const current = Theme.get(); // 'dark' | 'light'
820
820
  **Why App Shell?**
821
821
  | Approach | Initial Load | Lighthouse | DX for Agents |
822
822
  |----------|--------------|------------|---------------|
823
- | Minimal (all-in-one) | ~59KB + content | 70-85 | Simple but suboptimal |
823
+ | Minimal (all-in-one) | ~60KB + content | 70-85 | Simple but suboptimal |
824
824
  | **App Shell (lazy)** | ~20KB shell → routes lazy | **100/100** | Optimal performance |
825
825
 
826
826
  #### Architecture Overview
@@ -1316,7 +1316,7 @@ count.update(n => n + 1); // Update with function
1316
1316
  count.peek(); // Read without tracking
1317
1317
  ```
1318
1318
 
1319
- ### EventBus (CrossBus)
1319
+ ### EventBus (LightBus)
1320
1320
  ```javascript
1321
1321
  import { bus } from 'agentui-wc';
1322
1322
 
@@ -1949,9 +1949,9 @@ element.innerHTML = `<span>${userName}</span>`; // XSS RISK!
1949
1949
  ## File Structure
1950
1950
  ```
1951
1951
  dist/
1952
- ├── agentui.esm.js # Full ESM bundle (215 KB)
1953
- ├── agentui.min.js # Full IIFE bundle (215 KB)
1954
- ├── agentui.css # Combined CSS (64 KB)
1952
+ ├── agentui.esm.js # Full ESM bundle (174 KB)
1953
+ ├── agentui.min.js # Full IIFE bundle (175 KB)
1954
+ ├── agentui.css # Combined CSS (92 KB)
1955
1955
  ├── agentui.d.ts # TypeScript definitions
1956
1956
  ├── routes/ # Route Bundles (Modern)
1957
1957
  │ ├── shell.js # App Shell (Navbar, Theme, Bus) - 5 KB
@@ -2080,21 +2080,21 @@ For Modern performance, use the **App Shell** pattern. Load the critical shell f
2080
2080
 
2081
2081
  | Bundle | Content | Size (gzip) |
2082
2082
  |--------|---------|-------------|
2083
- | `shell.js` | Navbar, Theme, CrossBus, Toasts | ~5 KB |
2083
+ | `shell.js` | Navbar, Theme, EventBus, Toasts | ~5 KB |
2084
2084
  | `home.js` | Landing page components | ~2 KB |
2085
2085
  | `forms.js` | (Example) Input, Button, Checkbox | ~7 KB |
2086
2086
 
2087
2087
  **Why this is Modern:**
2088
2088
  - The user only downloads `shell.js` (small) to see the UI.
2089
2089
  - Page bundles (`home.js`) are only downloaded when navigating to that page.
2090
- - Common code (CrossBus, BaseClass) is shared via `chunk-*.js` files automatically.
2090
+ - Common code (EventBus, BaseClass) is shared via `chunk-*.js` files automatically.
2091
2091
 
2092
2092
  ---
2093
2093
 
2094
2094
  ## Performance Metrics
2095
- - **Bundle size:** 215 KB full / 8 KB route-based (gzipped: 75 KB / 3 KB)
2095
+ - **Bundle size:** 178 KB full / 8 KB route-based (gzipped: 61 KB / 3 KB)
2096
2096
  - **Lighthouse:** 100% Performance, 100% Accessibility, 100% SEO, 100% Best Practices
2097
- - **EventBus:** 111M ops/sec (CrossBus emitSync)
2097
+ - **EventBus:** 111M ops/sec (LightBus emitSync)
2098
2098
  - **Virtual List:** Handles 10K+ items at 60fps
2099
2099
  - **First paint:** <100ms (precached assets)
2100
2100
 
package/dist/README.md CHANGED
@@ -17,8 +17,9 @@
17
17
  <a href="https://www.npmjs.com/package/agentui-wc"><img src="https://img.shields.io/npm/v/agentui-wc?color=6750A4" alt="npm version"></a>
18
18
  <a href="LICENSE"><img src="https://img.shields.io/badge/license-Apache--2.0-blue" alt="License"></a>
19
19
  <img src="https://img.shields.io/badge/dependencies-0-brightgreen" alt="Zero Dependencies">
20
- <img src="https://img.shields.io/badge/types-TypeScript-3178C6" alt="TypeScript">
21
- <img src="https://img.shields.io/badge/web%20components-v1-E44D26" alt="Web Components">
20
+ <img src="https://img.shields.io/badge/60KB_gzipped-brightgreen" alt="Bundle Size">
21
+ <img src="https://img.shields.io/badge/Material_Design_3-6750A4?logo=materialdesign&logoColor=white" alt="MD3">
22
+ <a href="https://pagespeed.web.dev/analysis?url=https://giuseppescottolavina.github.io/AgentUI/demo/"><img src="https://img.shields.io/badge/Lighthouse-100%2F100%2F100%2F100-brightgreen" alt="Lighthouse"></a>
22
23
  <a href="https://github.com/GiuseppeScottoLavina/AgentUI/pulls"><img src="https://img.shields.io/badge/PRs-welcome-brightgreen" alt="PRs Welcome"></a>
23
24
  </p>
24
25
 
@@ -67,6 +68,19 @@ AgentUI is built on four ideas:
67
68
 
68
69
  ---
69
70
 
71
+ ## Built Different
72
+
73
+ | | AgentUI | Typical Framework |
74
+ |---|---|---|
75
+ | **Bundle** | 60KB gzipped (JS+CSS), all 50 components | Tree-shake to ~20KB, then add deps |
76
+ | **Performance** | Lighthouse 100/100/100/100 ([verify](https://pagespeed.web.dev/analysis?url=https://giuseppescottolavina.github.io/AgentUI/demo/)) | Varies |
77
+ | **Dependencies** | Zero. Forever. | npm audit anxiety |
78
+ | **Tests** | 1272 tests, 0 failures, isolated runner | Coverage varies |
79
+ | **Memory** | Managed listeners (AbortController), zero leaks verified | Framework-dependent |
80
+ | **Security** | Every component XSS-audited, CSP-compatible, no `eval()` | Trust your deps |
81
+ | **Stability** | W3C Web Components — no migration treadmill | React 16→17→18→19... |
82
+ | **Accessibility** | ARIA roles, 48px touch targets, keyboard navigation | Add-on library |
83
+
70
84
  ---
71
85
 
72
86
  ## Try It — Zero Setup
@@ -96,14 +110,32 @@ AgentUI is built on four ideas:
96
110
  AgentUI is in **alpha** (v0.1.x). Here's an honest look at where we are:
97
111
 
98
112
  ### What works today
99
- - 50 components (buttons, cards, inputs, modals, drawers, data tables, schema forms, virtual lists...)
100
- - Zero-build architecture (one `<script>` tag, no bundler needed)
101
- - Runtime component discovery (`describe()`, `discoverAll()`)
102
- - Lazy-loaded describe catalog zero performance cost for end users
103
- - XSS-safe rendering with `escapeHTML` across all user-facing components
104
- - Agent-optimized documentation ([AGENTS.md](./AGENTS.md), [llms.txt](./llms.txt))
105
- - Real apps built with it: Kanban boards, multiplayer games, OS installers
106
- - 1272 tests (isolated runner), Lighthouse 100/100/100/100 on demo site
113
+
114
+ **Components & Design**
115
+ - 50 Material Design 3 components — buttons, cards, inputs, modals, drawers, data tables, schema forms, virtual lists, toasts, and more
116
+ - Full MD3 token system with light/dark theming via CSS variables
117
+ - ARIA roles, keyboard navigation, and 48px minimum touch targets
118
+
119
+ **Performance**
120
+ - 60KB total gzipped (48KB JS + 13KB CSS) includes all 50 components
121
+ - Route-based lazy loading with Speculation Rules API prefetching
122
+ - Lighthouse 100/100/100/100 on demo site ([verify it yourself](https://pagespeed.web.dev/analysis?url=https://giuseppescottolavina.github.io/AgentUI/demo/))
123
+ - 500 component DOM instantiation in <8ms, 500 updates in <3ms
124
+
125
+ **Engineering**
126
+ - 1272 isolated tests, zero failures, across 75 test files
127
+ - Every component XSS-audited — `escapeHTML()` on all user-facing content
128
+ - Zero runtime dependencies — zero supply chain risk
129
+ - Managed event listeners via AbortController — verified zero memory leaks
130
+ - No `eval()`, no `document.write()`, CSP-compatible
131
+ - Agent-optimized documentation ([AGENTS.md](./AGENTS.md), [llms.txt](./llms.txt), [component-schema.json](./component-schema.json))
132
+
133
+ **Proven in Production**
134
+ - Project management tools
135
+ - Real-time multiplayer applications
136
+ - Desktop system utilities (Electron)
137
+
138
+ > 💡 **Long-term maintainability by design** — AgentUI is built on W3C Web Components, a browser standard — not a framework. There's no migration from v16 to v17. No breaking Hooks rewrite. No Composition API pivot. `querySelector` has worked the same since 1998 and will work the same in 2030. Zero dependencies means zero `npm audit` surprises, zero abandoned transitive packages, and zero "waiting for library X to support framework Y."
107
139
 
108
140
  ### What's missing (and we know it)
109
141
  - Larger community testing and feedback