@adia-ai/web-modules 0.8.36 → 0.8.38

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 (90) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.md +4 -4
  3. package/agent-admin/admin-roster/admin-roster.js +1 -1
  4. package/agent-admin/admin-settings/admin-settings.js +1 -1
  5. package/agent-admin/agent-admin/agent-admin.js +1 -1
  6. package/billing/billing-overview/billing-overview.a2ui.json +281 -0
  7. package/billing/billing-overview/billing-overview.class.js +838 -0
  8. package/billing/billing-overview/billing-overview.css +223 -0
  9. package/billing/billing-overview/billing-overview.js +16 -0
  10. package/billing/billing-overview/billing-overview.yaml +441 -0
  11. package/billing/index.js +21 -0
  12. package/billing/invoice-detail/invoice-detail.a2ui.json +276 -0
  13. package/billing/invoice-detail/invoice-detail.class.js +711 -0
  14. package/billing/invoice-detail/invoice-detail.css +305 -0
  15. package/billing/invoice-detail/invoice-detail.js +16 -0
  16. package/billing/invoice-detail/invoice-detail.yaml +411 -0
  17. package/billing/invoice-history/invoice-history.a2ui.json +315 -0
  18. package/billing/invoice-history/invoice-history.class.js +672 -0
  19. package/billing/invoice-history/invoice-history.css +130 -0
  20. package/billing/invoice-history/invoice-history.js +16 -0
  21. package/billing/invoice-history/invoice-history.yaml +398 -0
  22. package/billing/payment-method-form/payment-method-form.a2ui.json +310 -0
  23. package/billing/payment-method-form/payment-method-form.class.js +886 -0
  24. package/billing/payment-method-form/payment-method-form.css +149 -0
  25. package/billing/payment-method-form/payment-method-form.js +16 -0
  26. package/billing/payment-method-form/payment-method-form.yaml +430 -0
  27. package/billing/payment-method-list/payment-method-list.a2ui.json +283 -0
  28. package/billing/payment-method-list/payment-method-list.class.js +705 -0
  29. package/billing/payment-method-list/payment-method-list.css +128 -0
  30. package/billing/payment-method-list/payment-method-list.js +16 -0
  31. package/billing/payment-method-list/payment-method-list.yaml +355 -0
  32. package/billing/plan-picker/plan-picker.a2ui.json +349 -0
  33. package/billing/plan-picker/plan-picker.class.js +635 -0
  34. package/billing/plan-picker/plan-picker.css +227 -0
  35. package/billing/plan-picker/plan-picker.js +16 -0
  36. package/billing/plan-picker/plan-picker.yaml +453 -0
  37. package/chat/README.md +2 -2
  38. package/chat/chat-composer/chat-composer.js +2 -2
  39. package/chat/chat-empty/chat-empty.js +2 -2
  40. package/chat/chat-shell/chat-shell.js +6 -6
  41. package/chat/chat-sidebar/chat-sidebar.js +2 -2
  42. package/chat/chat-surfaces/chat-surfaces.js +3 -3
  43. package/chat/chat-thread/chat-thread.js +2 -2
  44. package/dashboard/dashboard-layout/dashboard-layout.a2ui.json +254 -0
  45. package/dashboard/dashboard-layout/dashboard-layout.css +190 -0
  46. package/dashboard/dashboard-layout/dashboard-layout.js +289 -0
  47. package/dashboard/dashboard-layout/dashboard-layout.yaml +374 -0
  48. package/dashboard/date-range-selector/date-range-selector.a2ui.json +236 -0
  49. package/dashboard/date-range-selector/date-range-selector.css +84 -0
  50. package/dashboard/date-range-selector/date-range-selector.js +686 -0
  51. package/dashboard/date-range-selector/date-range-selector.yaml +358 -0
  52. package/dashboard/index.js +14 -0
  53. package/dist/chat/chat-shell.min.js +1 -1
  54. package/dist/everything.min.js +121 -102
  55. package/editor/editor-canvas/editor-canvas.js +2 -2
  56. package/editor/editor-shell/editor-shell.js +2 -2
  57. package/editor/editor-sidebar/editor-sidebar.js +2 -2
  58. package/editor/editor-toolbar/editor-toolbar.js +2 -2
  59. package/feedback/confirm-dialog/confirm-dialog.a2ui.json +206 -0
  60. package/feedback/confirm-dialog/confirm-dialog.css +157 -0
  61. package/feedback/confirm-dialog/confirm-dialog.js +383 -0
  62. package/feedback/confirm-dialog/confirm-dialog.yaml +297 -0
  63. package/feedback/index.js +10 -0
  64. package/form/form-popover/form-popover.js +1 -1
  65. package/generative/index.d.ts +1 -1
  66. package/generative/index.js +2 -2
  67. package/onboarding/index.js +1 -0
  68. package/onboarding/onboarding-checklist/onboarding-checklist.a2ui.json +263 -0
  69. package/onboarding/onboarding-checklist/onboarding-checklist.css +157 -0
  70. package/onboarding/onboarding-checklist/onboarding-checklist.js +428 -0
  71. package/onboarding/onboarding-checklist/onboarding-checklist.yaml +236 -0
  72. package/package.json +99 -6
  73. package/runtime/a2ui-root/a2ui-root.js +3 -3
  74. package/runtime/gen-root/gen-root.js +5 -5
  75. package/settings/index.js +12 -0
  76. package/settings/integrations-page/integrations-page.a2ui.json +274 -0
  77. package/settings/integrations-page/integrations-page.css +177 -0
  78. package/settings/integrations-page/integrations-page.d.ts +77 -0
  79. package/settings/integrations-page/integrations-page.js +413 -0
  80. package/settings/integrations-page/integrations-page.yaml +317 -0
  81. package/settings/notification-preferences/notification-preferences.a2ui.json +245 -0
  82. package/settings/notification-preferences/notification-preferences.css +204 -0
  83. package/settings/notification-preferences/notification-preferences.js +622 -0
  84. package/settings/notification-preferences/notification-preferences.yaml +358 -0
  85. package/shell/admin-command/admin-command.js +2 -2
  86. package/shell/admin-shell/admin-shell.js +2 -2
  87. package/shell/admin-sidebar/admin-sidebar.js +2 -2
  88. package/shell/embed-shell/embed-shell.js +3 -3
  89. package/simple/simple-shell/simple-shell.js +1 -1
  90. package/theme/theme-panel/theme-panel.js +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,30 @@
1
1
  # Changelog — @adia-ai/web-modules
2
2
 
3
+ ## [0.8.38] — 2026-08-15
4
+
5
+ ### Maintenance
6
+ - **Lockstep version bump only.** No source changes in this package; bumped to maintain the lockstep version coherence enforced by `scripts/release/check-lockstep.mjs`. Substantive v0.8.38 work shipped in clean-world cut: five-family layout (ADR-0049), tiered-catalog contract phase 1 (ADR-0050), factory MCP server (ADR-0051), drilldown-ui, nav/view-transition/page fixes. See `packages/gen-ui/mcp/CHANGELOG.md#0838--2026-08-15` for details.
7
+ - **`agent-admin/` touched in this release window** (2 file(s), e.g. `admin-settings/admin-settings.examples.html`) — carried by the entries above.
8
+ - **`chat/` touched in this release window** (4 file(s), e.g. `chat/README.md`) — carried by the entries above.
9
+ - **`dist/` bundles rebuilt** in this cut's window (2 file(s)) — regenerated from the source changes described above, not independent edits.
10
+
11
+ ## [0.8.37] — 2026-08-14
12
+
13
+ ### Fixed
14
+ - **All 44 `escaped-root` packed-import violations resolved (gh#1191, gh#1186's biggest sibling).** Every relative specifier that walked out of this package's root (`../../../web-components/core/element.js` and its neighbors) now routes through `@adia-ai/web-components`'s own npm subpaths (`core/element`, `core/register`, `core/markdown`, `core/form`, `core/signals`, `components/code`, `components/agent-reasoning`, `components/canvas`, `components/chat-thread`, `components/inspector`). `shell/embed-shell/embed-shell.js`'s `resizable` trait registration is the one exception: `web-components`' `./traits/*` export only maps to a flat `./traits/*.js`, and the trait lives at `traits/resizable/resizable.js` — it now imports the `@adia-ai/web-components/traits` barrel instead, the same "consumers who use the trait library at all get declarative composition for free" pattern that module's own doc comment already describes.
15
+ - **`billing/`, `dashboard/`, `feedback/`, `onboarding/`, `settings/` — 5 cluster barrels were never packed (gh#1191).** All five directories existed on disk (and were already listed in `sideEffects`) but `package.json`'s `files` field never shipped them, so `import '@adia-ai/web-modules'` 404'd on its own root barrel outside this repo. Added to `files`, plus matching `exports` subpaths (`./billing`, `./billing/*`, `./billing/*.css`, and the same for the other four) mirroring the existing `agent-admin`/`form` cluster shape. Fixing this surfaced 9 more `escaped-root` violations inside those clusters that the gate had never scanned — fixed alongside.
16
+
17
+ ### Added
18
+ - **`npm run probe:packed-boot:web-modules`** proves the fix end-to-end: packs this package + its 5 first-party peers, installs the tarballs into a scratch dir outside the repo, and imports all 15 cluster barrels from that install. See root `CHANGELOG.md` `[Unreleased]` for the full description.
19
+
20
+ ### Maintenance
21
+ - **`dist/` bundles rebuilt** in this cut's window (1 file(s)) — regenerated from the source changes described above, not independent edits.
22
+ - **`editor/` touched in this release window** (11 file(s), e.g. `editor-canvas-empty/editor-canvas-empty.examples.html`) — carried by the entries above.
23
+ - **`generative/` touched in this release window** (2 file(s), e.g. `generative/index.d.ts`) — carried by the entries above.
24
+ - **`runtime/` touched in this release window** (2 file(s), e.g. `a2ui-root/a2ui-root.js`) — carried by the entries above.
25
+ - **`simple/` touched in this release window** (1 file(s), e.g. `simple-shell/simple-shell.js`) — carried by the entries above.
26
+ - **`theme/` touched in this release window** (2 file(s), e.g. `theme-panel/theme-panel.examples.html`) — carried by the entries above.
27
+
3
28
  ## [0.8.36] — 2026-08-13
4
29
 
5
30
  ### Maintenance
package/README.md CHANGED
@@ -112,7 +112,7 @@ See the [CDN usage guide](https://ui-kit.exe.xyz/site/cdn-usage) for a full Code
112
112
 
113
113
  ### Using with AI agents
114
114
 
115
- When composing UI with an AI coding agent (Claude Code / Cursor / Windsurf / Claude Desktop), load the **`adia-ui-kit` skill** in the harness — it encodes the 95-primitive catalog, composition patterns for all shells (admin / chat / editor / simple), and the Plan-Execute-Verify discipline that renders the composed surface in a real demo to verify intent. Skill lives at [`.agents/skills/adia-compose/`](https://github.com/adiahealth/gen-ui-kit/tree/main/.agents/skills/adia-ui-kit) in the repo.
115
+ When composing UI with an AI coding agent (Claude Code / Cursor / Windsurf / Claude Desktop), load the **`adia-ui-kit` skill** in the harness — it encodes the 95-primitive catalog, composition patterns for all shells (admin / chat / editor / simple), and the Plan-Execute-Verify discipline that renders the composed surface in a real demo to verify intent. Skill lives at [`.agents/skills/screen-composition/`](https://github.com/adiahealth/gen-ui-kit/tree/main/.agents/skills/adia-ui-kit) in the repo.
116
116
 
117
117
  `@adia-ai/web-components` is **always required** (modules compose primitives at runtime). Two additional peer dependencies are declared but **only needed for specific clusters**:
118
118
 
@@ -234,7 +234,7 @@ hunt for it:
234
234
  Future clusters on the strategic horizon: `data` (kanban, filters,
235
235
  table-toolbar), `agent` (agent-trace, reasoning panels).
236
236
 
237
- See [`adia-ui-authoring` skill, `references/shell-patterns.md`](../../.agents/skills/adia-author/references/shell-patterns.md) (absorbed `bespoke-shell-children`) for the canonical decomposition recipe used by all three families.
237
+ See [`adia-ui-authoring` skill, `references/shell-patterns.md`](../../.agents/skills/primitive-authoring/references/shell-patterns.md) (absorbed `bespoke-shell-children`) for the canonical decomposition recipe used by all three families.
238
238
 
239
239
  ## Quick start
240
240
 
@@ -349,7 +349,7 @@ web-modules/
349
349
  └── index.js barrel re-export of every cluster
350
350
  ```
351
351
 
352
- Each element directory carries its `.js`, `.css`, `.yaml`, and `.a2ui.json` files — same shape as `web-components/components/<x>/`. The yaml + a2ui.json contracts feed the gen-UI catalog at `packages/a2ui/corpus/catalog-a2ui_0_9.json`; the build script at `scripts/build/components.mjs` scans both `web-components/components/` and `web-modules/<cluster>/`.
352
+ Each element directory carries its `.js`, `.css`, `.yaml`, and `.a2ui.json` files — same shape as `web-components/components/<x>/`. The yaml + a2ui.json contracts feed the gen-UI catalog at `packages/gen-ui/a2ui/corpus/catalog-a2ui_0_9.json`; the build script at `scripts/build/components.mjs` scans both `web-components/components/` and `web-modules/<cluster>/`.
353
353
 
354
354
  ## Behavior contract
355
355
 
@@ -358,7 +358,7 @@ All `<*-shell>` hosts are **behavior-only orchestrators** — they reflect state
358
358
  - **JS-bearing children** carry `connected()`/`disconnected()` lifecycle for interactive behavior (`admin-sidebar` resize, `admin-command` palette, `chat-thread` streaming scroll, `editor-canvas` zoom, etc.).
359
359
  - **CSS-only children** (no `.js` file — only `.yaml` + `.css` + `.a2ui.json`) declare slot intent for the host's styling system to attach against. Don't author a `.js` for these; the host handles their behavior via attribute selectors.
360
360
 
361
- The decomposition recipe (when to JS-bearing vs CSS-only, how to namespace state attributes, slot vocabulary conventions) is captured in the [`adia-ui-authoring` skill, `references/shell-patterns.md`](../../.agents/skills/adia-author/references/shell-patterns.md) (absorbed `bespoke-shell-children`).
361
+ The decomposition recipe (when to JS-bearing vs CSS-only, how to namespace state attributes, slot vocabulary conventions) is captured in the [`adia-ui-authoring` skill, `references/shell-patterns.md`](../../.agents/skills/primitive-authoring/references/shell-patterns.md) (absorbed `bespoke-shell-children`).
362
362
 
363
363
  ## License
364
364
 
@@ -31,7 +31,7 @@
31
31
  * <button-ui> + <icon-ui> + <menu-item-ui> (menu.js) alongside this module.
32
32
  */
33
33
 
34
- import { UIElement, html } from '../../../web-components/core/element.js';
34
+ import { UIElement, html } from '@adia-ai/web-components/core/element';
35
35
  import { exportPersona, importPersona } from '@adia-ai/persona';
36
36
 
37
37
  class UIAdminRoster extends UIElement {
@@ -30,7 +30,7 @@
30
30
  * <switch-ui>, <textarea-ui>, <text-ui>, <icon-ui>, <button-ui> alongside this module.
31
31
  */
32
32
 
33
- import { UIElement, html } from '../../../web-components/core/element.js';
33
+ import { UIElement, html } from '@adia-ai/web-components/core/element';
34
34
  import { KNOWN_KINDS } from '@adia-ai/persona';
35
35
  import { entryStoreKey } from '../live-persona.js';
36
36
 
@@ -49,7 +49,7 @@
49
49
  * and <chat-shell> (+ its own bespoke children) alongside this module.
50
50
  */
51
51
 
52
- import { UIElement } from '../../../web-components/core/element.js';
52
+ import { UIElement } from '@adia-ai/web-components/core/element';
53
53
  import { compilePersona, personaStore } from '@adia-ai/persona';
54
54
  import { createSession, composeSystem } from '@adia-ai/agent';
55
55
  import { createSurfaceRegistry, wireAgentEvents } from '../../chat/chat-surfaces/chat-surfaces.js';
@@ -0,0 +1,281 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://adiaui.dev/a2ui/v0_9/components/BillingOverview.json",
4
+ "title": "BillingOverview",
5
+ "description": "Module-tier billing dashboard that stitches the seven Wave A+B\nbilling primitives into the canonical \"all-billing-on-one-page\"\nsurface — current plan + status header, a KPI strip (monthly\nspend · seats · next invoice), an optional dunning banner when the\naccount is past-due, a plan-picker section for in-app plan changes,\na payment-method-list section, and an invoice-history section.\n\nData-driven via the `account` property — an aggregate snapshot of\nthe customer's billing state ({plan, status, billingCycle,\ncurrentSpend, seats, nextInvoiceDate, paymentMethods[],\ninvoices[], dunning?}). The composite stamps a fixed five-region\nskeleton once on first connect — header · kpis · dunning ·\nplan-picker · payment-methods · invoice-history — then mutates\nper-region nodes via id-keyed in-place diff on every property\nchange. Children primitives (plan-picker, payment-method-list,\ninvoice-history, alert-ui) are stamped as composed tags; this\ncomposite owns the orchestration, not the row chrome.\n\nHigher-level account-action event surfaces consumer-actionable\nintents from descendant primitives. Children carrying\n[data-account-action=\"X\"] or descendant events\n(`plan-action`, `payment-action`, `invoice-action`, `dunning-action`)\nare normalised into a single `account-action` event with\n`detail.action` ∈ {change-plan, add-payment-method, pay-now,\ndownload-invoice, update-card, retry, custom}. The composite\ndoes NOT mutate the data source; consumers wire `account-action`\nagainst their billing backend.\n\nDisplay surface. Extends UIElement, not UIFormElement — child\nprimitives are individually form-bearing (plan-picker,\npayment-method-list) while the host is not.\n\nSpec: .claude/docs/specs/implementation-ready/SPEC-004-billing-overview.md.\n",
6
+ "type": "object",
7
+ "allOf": [
8
+ {
9
+ "$ref": "common_types.json#/$defs/ComponentCommon"
10
+ },
11
+ {
12
+ "$ref": "common_types.json#/$defs/CatalogComponentCommon"
13
+ }
14
+ ],
15
+ "properties": {
16
+ "account": {
17
+ "description": "Aggregate billing snapshot — source of truth for the whole\ndashboard. Shape:\n {plan: {id, name, price, cycle, currency, status},\n status: \"active\" | \"trialing\" | \"past_due\" | \"canceled\" | \"paused\",\n billingCycle: \"month\" | \"year\",\n currentSpend: number,\n seats: {used: number, total: number},\n nextInvoiceDate: ISO 8601 date string,\n paymentMethods: [...], // forwarded to payment-method-list\n invoices: [...], // forwarded to invoice-history\n plans?: [...], // forwarded to plan-picker; omitted when planSection is \"hidden\"\n dunning?: {amount, currency, dueAt, cardLast4?, reason?}}\nNull + no `data-stream-src` renders the empty state.\n",
18
+ "type": "object",
19
+ "default": null
20
+ },
21
+ "component": {
22
+ "const": "BillingOverview"
23
+ },
24
+ "currency": {
25
+ "description": "Default ISO 4217 currency for all amount formatting. Overridable\nper-record (plan.currency, invoice.currency, etc.).\n",
26
+ "type": "string",
27
+ "default": "USD"
28
+ },
29
+ "data-stream-src": {
30
+ "description": "Optional endpoint returning the full account snapshot. On\nsuccessful load, `account` is replaced and a `load` event fires;\non failure an `error` event fires.\n",
31
+ "type": "string",
32
+ "default": ""
33
+ },
34
+ "loading": {
35
+ "description": "Renders skeleton placeholders in the header + KPI strip while\ndata is fetching. Sets aria-busy on the host. Forwarded to\nchild composites that accept [loading] (plan-picker,\npayment-method-list, invoice-history).\n",
36
+ "$ref": "common_types.json#/$defs/DynamicBoolean"
37
+ },
38
+ "locale": {
39
+ "description": "Locale for Intl.NumberFormat (currency) and Intl.DateTimeFormat\n(dates). Defaults to document.documentElement.lang (or \"en-US\"\nwhen absent).\n",
40
+ "type": "string",
41
+ "default": ""
42
+ },
43
+ "variant": {
44
+ "description": "Layout variant. `full` shows every section. `compact` collapses\nthe plan-picker section and renders only the KPI strip + payment\nmethods + invoice history (the canonical \"settings billing\"\nshape). `enterprise` hides plan-picker entirely (no self-serve\nplan changes) and keeps the rest.\n",
45
+ "type": "string",
46
+ "enum": [
47
+ "full",
48
+ "compact",
49
+ "enterprise"
50
+ ],
51
+ "default": "full"
52
+ }
53
+ },
54
+ "required": [
55
+ "component",
56
+ "account"
57
+ ],
58
+ "unevaluatedProperties": false,
59
+ "x-adiaui": {
60
+ "anti_patterns": [
61
+ {
62
+ "fix": "{\"component\": \"BillingOverview\", \"account\":\n {\"plan\": {\"id\":\"p_pro\",\"name\":\"Pro\",\"price\":48,\"cycle\":\"month\",\"currency\":\"USD\",\"status\":\"active\"},\n \"status\": \"active\",\n \"billingCycle\": \"month\",\n \"currentSpend\": 48,\n \"seats\": {\"used\": 4, \"total\": 10},\n \"nextInvoiceDate\": \"2026-06-01\",\n \"paymentMethods\": [...],\n \"invoices\": [...]}}\n",
63
+ "why": "Missing the required `account` prop. The composite renders the\nempty state. A dashboard without data has nothing to show.\n",
64
+ "wrong": "{\"component\": \"BillingOverview\"}\n"
65
+ },
66
+ {
67
+ "fix": "Render the BillingOverview composite on its own route\n(typically `/settings/billing` or `/billing`).\n",
68
+ "why": "The dashboard is a route, not a modal. Modal traps focus + clips\ncontent; the composite is designed for the full /billing page.\n",
69
+ "wrong": "{\"component\": \"Modal\", \"children\":\n [{\"component\": \"BillingOverview\", \"account\": {...}}]}\n"
70
+ },
71
+ {
72
+ "fix": "Provide a dunning object alongside the past_due status:\n<billing-overview-ui account='{\"status\":\"past_due\",\"dunning\":{\"amount\":48,\"currency\":\"USD\",\"dueAt\":\"2026-05-20\"}}'></billing-overview-ui>\n",
73
+ "why": "Past-due status without an `account.dunning` payload. The\ncomposite cannot render the dunning banner (it needs amount +\ndue-at + currency to format the alert message).\n",
74
+ "wrong": "<billing-overview-ui account='{\"status\":\"past_due\"}'></billing-overview-ui>\n"
75
+ },
76
+ {
77
+ "fix": "Either pass `account.plans` OR set `variant=\"compact\"` to hide\nthe plan-picker section entirely.\n",
78
+ "why": "`variant=full` requires `account.plans` so the plan-picker\nsection has rows to render. Without plans, the section renders\nits own empty-state and looks broken.\n",
79
+ "wrong": "<billing-overview-ui variant=\"full\" account='{\"plan\":{...},\"status\":\"active\"}'></billing-overview-ui>\n"
80
+ }
81
+ ],
82
+ "category": "container",
83
+ "composes": [
84
+ "card-ui",
85
+ "stat-ui",
86
+ "tag-ui",
87
+ "text-ui",
88
+ "alert-ui",
89
+ "plan-picker-ui",
90
+ "payment-method-list-ui",
91
+ "invoice-history-ui",
92
+ "button-ui",
93
+ "icon-ui"
94
+ ],
95
+ "events": {
96
+ "account-action": {
97
+ "description": "Unified account-action event — normalises every actionable\nintent from descendant primitives into a single bubbling event.\nHandler can act on `detail.action` without subscribing to four\ndifferent child event names. Bubbles.\n",
98
+ "detail": {
99
+ "action": {
100
+ "description": "One of \"change-plan\" | \"add-payment-method\" | \"pay-now\" |\n\"download-invoice\" | \"update-card\" | \"retry\" | \"select-plan\"\n| \"remove-payment-method\" | \"set-default-payment-method\" |\nor any consumer-defined value carried on a descendant\n[data-account-action] attribute.\n",
101
+ "type": "string"
102
+ },
103
+ "payload": {
104
+ "description": "Forwarded detail from the originating event (e.g. the\ninvoice record, the plan id, the dunning amount). Shape\nvaries by source.\n",
105
+ "type": "object"
106
+ },
107
+ "source": {
108
+ "description": "The originating primitive — \"plan-picker\" | \"payment-method-list\"\n| \"invoice-history\" | \"alert-dunning\" | \"header\" | \"custom\".\n",
109
+ "type": "string"
110
+ }
111
+ }
112
+ },
113
+ "error": {
114
+ "description": "Fired when a `data-stream-src` fetch fails. Bubbles.\n",
115
+ "detail": {
116
+ "reason": {
117
+ "description": "One of `fetch-failed`.",
118
+ "type": "string"
119
+ }
120
+ }
121
+ },
122
+ "load": {
123
+ "description": "Fired when `data-stream-src` finishes a successful fetch and\n`account` is populated. Bubbles.\n",
124
+ "detail": {
125
+ "account": {
126
+ "description": "The loaded account snapshot.",
127
+ "type": "object"
128
+ }
129
+ }
130
+ }
131
+ },
132
+ "examples": [
133
+ {
134
+ "description": "Active Pro plan with 4 saved cards + 3 invoices.",
135
+ "a2ui": "[\n {\n \"id\": \"bo-pro\",\n \"component\": \"BillingOverview\",\n \"variant\": \"full\",\n \"currency\": \"USD\",\n \"account\": {\n \"plan\": {\n \"id\": \"p_pro\",\n \"name\": \"Pro\",\n \"price\": 48,\n \"cycle\": \"month\",\n \"currency\": \"USD\",\n \"status\": \"active\"\n },\n \"status\": \"active\",\n \"billingCycle\": \"month\",\n \"currentSpend\": 48,\n \"seats\": {\"used\": 4, \"total\": 10},\n \"nextInvoiceDate\": \"2026-06-01\",\n \"plans\": [],\n \"paymentMethods\": [],\n \"invoices\": []\n }\n }\n]\n",
136
+ "name": "active-pro-account"
137
+ },
138
+ {
139
+ "description": "Past-due account with dunning banner above plan section.",
140
+ "a2ui": "[\n {\n \"id\": \"bo-past-due\",\n \"component\": \"BillingOverview\",\n \"variant\": \"full\",\n \"currency\": \"USD\",\n \"account\": {\n \"plan\": {\n \"id\": \"p_pro\",\n \"name\": \"Pro\",\n \"price\": 48,\n \"cycle\": \"month\",\n \"currency\": \"USD\",\n \"status\": \"past_due\"\n },\n \"status\": \"past_due\",\n \"billingCycle\": \"month\",\n \"currentSpend\": 48,\n \"seats\": {\"used\": 4, \"total\": 10},\n \"nextInvoiceDate\": \"2026-05-20\",\n \"dunning\": {\n \"amount\": 48,\n \"currency\": \"USD\",\n \"dueAt\": \"2026-05-20\",\n \"cardLast4\": \"4242\",\n \"reason\": \"declined\"\n },\n \"plans\": [],\n \"paymentMethods\": [],\n \"invoices\": []\n }\n }\n]\n",
141
+ "name": "past-due-account"
142
+ }
143
+ ],
144
+ "keywords": [
145
+ "billing",
146
+ "overview",
147
+ "dashboard",
148
+ "account",
149
+ "subscription",
150
+ "plan",
151
+ "invoice",
152
+ "payment-method",
153
+ "usage",
154
+ "dunning",
155
+ "past-due"
156
+ ],
157
+ "name": "UIBillingOverview",
158
+ "related": [
159
+ "PlanPicker",
160
+ "PaymentMethodList",
161
+ "InvoiceHistory",
162
+ "InvoiceDetail",
163
+ "PaymentMethodForm",
164
+ "Alert",
165
+ "Stat"
166
+ ],
167
+ "slots": {
168
+ "after-invoice-history": {
169
+ "description": "Optional content slotted below the invoice-history section\n(e.g. tax-document download row, billing-contact form).\n"
170
+ },
171
+ "before-plan-picker": {
172
+ "description": "Optional content slotted above the plan-picker section (e.g. a\npromo banner, an annual-savings callout).\n"
173
+ },
174
+ "empty": {
175
+ "description": "Custom empty-state content when there's no account snapshot\nAND no data-stream-src. Falls back to a default empty-state\nmessage.\n"
176
+ },
177
+ "header-actions": {
178
+ "description": "Optional action row in the dashboard header (top-right). Used\nfor consumer-authored \"Contact sales\", \"Cancel subscription\",\netc. The composite NEVER stamps a default toolbar.\n"
179
+ }
180
+ },
181
+ "states": [
182
+ {
183
+ "description": "Default — account rendered, ready for interaction.",
184
+ "name": "idle"
185
+ },
186
+ {
187
+ "description": "A `data-stream-src` fetch is in flight or [loading] is set.",
188
+ "attribute": "loading",
189
+ "name": "loading"
190
+ },
191
+ {
192
+ "description": "No account snapshot + no data-stream-src.",
193
+ "attribute": "empty",
194
+ "name": "empty"
195
+ },
196
+ {
197
+ "description": "Account is past-due (computed from `account.status === \"past_due\"`).\nStamps the dunning banner if `account.dunning` is present.\n",
198
+ "attribute": "past-due",
199
+ "name": "past-due"
200
+ },
201
+ {
202
+ "description": "Account is trialing (computed from `account.status === \"trialing\"`).\n",
203
+ "attribute": "trial",
204
+ "name": "trial"
205
+ },
206
+ {
207
+ "description": "Last `data-stream-src` fetch failed.",
208
+ "attribute": "error",
209
+ "name": "error"
210
+ }
211
+ ],
212
+ "status": "experimental",
213
+ "synonyms": {
214
+ "account": [
215
+ "subscription",
216
+ "membership"
217
+ ],
218
+ "billing": [
219
+ "subscription",
220
+ "account-billing"
221
+ ],
222
+ "overview": [
223
+ "dashboard",
224
+ "summary"
225
+ ]
226
+ },
227
+ "tag": "billing-overview-ui",
228
+ "tokens": {
229
+ "--billing-overview-bg": {
230
+ "description": "Host page background. Defaults to transparent.",
231
+ "default": "transparent"
232
+ },
233
+ "--billing-overview-gap": {
234
+ "description": "Vertical gap between dashboard sections.",
235
+ "default": "var(--a-space-5)"
236
+ },
237
+ "--billing-overview-header-gap": {
238
+ "description": "Gap between the plan title block and the status badge cluster.",
239
+ "default": "var(--a-space-3)"
240
+ },
241
+ "--billing-overview-kpi-columns": {
242
+ "description": "Grid column template for the KPI strip. Falls back to a 3-column\nauto-fit when narrowed below 40rem (container query).\n",
243
+ "default": "repeat(3, minmax(0, 1fr))"
244
+ },
245
+ "--billing-overview-kpi-gap": {
246
+ "description": "Gap between KPI stat cards.",
247
+ "default": "var(--a-space-3)"
248
+ },
249
+ "--billing-overview-meta-fg": {
250
+ "description": "Foreground color for secondary metadata in the header.",
251
+ "default": "var(--a-fg-muted)"
252
+ },
253
+ "--billing-overview-px": {
254
+ "description": "Horizontal padding around dashboard content.",
255
+ "default": "var(--a-space-5)"
256
+ },
257
+ "--billing-overview-py": {
258
+ "description": "Vertical padding around dashboard content.",
259
+ "default": "var(--a-space-5)"
260
+ },
261
+ "--billing-overview-section-heading-fg": {
262
+ "description": "Foreground color for section heading labels.",
263
+ "default": "var(--a-fg)"
264
+ },
265
+ "--billing-overview-section-heading-size": {
266
+ "description": "Font size for section heading labels.",
267
+ "default": "var(--a-text-base, 1rem)"
268
+ },
269
+ "--billing-overview-section-heading-weight": {
270
+ "description": "Font weight for section heading labels.",
271
+ "default": "var(--a-weight-semibold, 600)"
272
+ },
273
+ "--billing-overview-section-radius": {
274
+ "description": "Section card corner radius.",
275
+ "default": "var(--a-radius-lg)"
276
+ }
277
+ },
278
+ "traits": [],
279
+ "version": 1
280
+ }
281
+ }