@adia-ai/adia-ui-factory 0.2.2 → 0.2.4

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 (95) hide show
  1. package/.claude-plugin/plugin.json +12 -3
  2. package/.mcp.json +1 -1
  3. package/CHANGELOG.md +12 -0
  4. package/README.md +24 -1
  5. package/bin/adia-scaffold +93 -13
  6. package/package.json +1 -1
  7. package/references/shell-embed.md +10 -0
  8. package/references/spa-architecture.md +7 -0
  9. package/skills/adia-ui-kit/CHANGELOG.md +41 -0
  10. package/skills/adia-ui-kit/SKILL.md +442 -0
  11. package/skills/adia-ui-kit/assets/figma-make/guidelines/Guidelines.md +87 -0
  12. package/skills/adia-ui-kit/assets/figma-make/guidelines/components.md +142 -0
  13. package/skills/adia-ui-kit/assets/figma-make/guidelines/styles.md +118 -0
  14. package/skills/adia-ui-kit/assets/figma-make/guidelines/tokens.md +120 -0
  15. package/skills/adia-ui-kit/assets/team-scaffold/archive-README.md +30 -0
  16. package/skills/adia-ui-kit/assets/team-scaffold/drafts-README.md +57 -0
  17. package/skills/adia-ui-kit/assets/team-scaffold/inbox-README.md +76 -0
  18. package/skills/adia-ui-kit/assets/team-scaffold/outbox-README.md +46 -0
  19. package/skills/adia-ui-kit/assets/team-scaffold/team-root.README.md +51 -0
  20. package/skills/adia-ui-kit/assets/team-scaffold/tickets-README.md +208 -0
  21. package/skills/adia-ui-kit/assets/team-scaffold/tickets-REGISTRY.md +81 -0
  22. package/skills/adia-ui-kit/assets/templates/AGENTS.template.md +128 -0
  23. package/skills/adia-ui-kit/assets/templates/CLAUDE.template.md +1 -0
  24. package/skills/adia-ui-kit/assets/templates/FEEDBACK-OMISSIONS-DEFENSE.template.md +150 -0
  25. package/skills/adia-ui-kit/assets/templates/FEEDBACK.template.md +213 -0
  26. package/skills/adia-ui-kit/assets/templates/RESPONSE.template.md +114 -0
  27. package/skills/adia-ui-kit/assets/templates/figma-make-guidelines.md +90 -0
  28. package/skills/adia-ui-kit/evals/adversarial-content-trust.json +83 -0
  29. package/skills/adia-ui-kit/evals/evals.json +55 -0
  30. package/skills/adia-ui-kit/evals/routing-corpus.json +121 -0
  31. package/skills/adia-ui-kit/evals/teach-routing-cases.json +92 -0
  32. package/skills/adia-ui-kit/references/capabilities.md +245 -0
  33. package/skills/adia-ui-kit/references/catalog-lookup.md +186 -0
  34. package/skills/adia-ui-kit/references/changelog-archive/CHANGELOG-v1.md +8 -0
  35. package/skills/adia-ui-kit/references/changelog-archive/CHANGELOG-v2.md +3585 -0
  36. package/skills/adia-ui-kit/references/changelog-archive/CHANGELOG-v3.md +1899 -0
  37. package/skills/adia-ui-kit/references/common-gotchas-consumer.md +522 -0
  38. package/skills/adia-ui-kit/references/component-literacy.md +291 -0
  39. package/skills/adia-ui-kit/references/composition.md +245 -0
  40. package/skills/adia-ui-kit/references/correction-loop.md +462 -0
  41. package/skills/adia-ui-kit/references/css-policy.md +343 -0
  42. package/skills/adia-ui-kit/references/decision-model.md +158 -0
  43. package/skills/adia-ui-kit/references/diagnostic-output.md +57 -0
  44. package/skills/adia-ui-kit/references/docs-catalog.md +239 -0
  45. package/skills/adia-ui-kit/references/exclusions.md +225 -0
  46. package/skills/adia-ui-kit/references/feedback-authoring.md +466 -0
  47. package/skills/adia-ui-kit/references/figma-make.md +244 -0
  48. package/skills/adia-ui-kit/references/flows-auth.md +307 -0
  49. package/skills/adia-ui-kit/references/flows-content.md +206 -0
  50. package/skills/adia-ui-kit/references/flows-data.md +348 -0
  51. package/skills/adia-ui-kit/references/flows-interaction.md +181 -0
  52. package/skills/adia-ui-kit/references/flows-shells.md +336 -0
  53. package/skills/adia-ui-kit/references/gap-detection.md +266 -0
  54. package/skills/adia-ui-kit/references/harness.md +284 -0
  55. package/skills/adia-ui-kit/references/loading-protocol.md +406 -0
  56. package/skills/adia-ui-kit/references/local-link.md +198 -0
  57. package/skills/adia-ui-kit/references/mcp.md +401 -0
  58. package/skills/adia-ui-kit/references/migration.md +116 -0
  59. package/skills/adia-ui-kit/references/mission.md +194 -0
  60. package/skills/adia-ui-kit/references/mode-routing.md +298 -0
  61. package/skills/adia-ui-kit/references/patterns-agent.md +223 -0
  62. package/skills/adia-ui-kit/references/patterns-data.md +1065 -0
  63. package/skills/adia-ui-kit/references/patterns-forms.md +223 -0
  64. package/skills/adia-ui-kit/references/patterns-layout.md +326 -0
  65. package/skills/adia-ui-kit/references/patterns-recipes.md +1416 -0
  66. package/skills/adia-ui-kit/references/patterns-shells.md +1097 -0
  67. package/skills/adia-ui-kit/references/patterns-traits.md +259 -0
  68. package/skills/adia-ui-kit/references/patterns-wiring.md +339 -0
  69. package/skills/adia-ui-kit/references/pev-rationale.md +137 -0
  70. package/skills/adia-ui-kit/references/reasoning-gate.md +146 -0
  71. package/skills/adia-ui-kit/references/reasoning-methodologies.md +112 -0
  72. package/skills/adia-ui-kit/references/recon.md +192 -0
  73. package/skills/adia-ui-kit/references/rendering-model.md +431 -0
  74. package/skills/adia-ui-kit/references/response-authoring.md +398 -0
  75. package/skills/adia-ui-kit/references/session-log-schema.md +203 -0
  76. package/skills/adia-ui-kit/references/session-log-template.md +118 -0
  77. package/skills/adia-ui-kit/references/setup.md +652 -0
  78. package/skills/adia-ui-kit/references/skill-hygiene.md +135 -0
  79. package/skills/adia-ui-kit/references/spec-to-ui-reasoning.md +394 -0
  80. package/skills/adia-ui-kit/references/state.md +229 -0
  81. package/skills/adia-ui-kit/references/teach-protocol.md +421 -0
  82. package/skills/adia-ui-kit/references/theme.md +142 -0
  83. package/skills/adia-ui-kit/references/version-check.md +69 -0
  84. package/skills/adia-ui-kit/scripts/audit-decision-trace.mjs +198 -0
  85. package/skills/adia-ui-kit/scripts/audit-kit-roster.mjs +366 -0
  86. package/skills/adia-ui-kit/scripts/changelog-archive.mjs +126 -0
  87. package/skills/adia-ui-kit/scripts/check-adia-versions.py +404 -0
  88. package/skills/adia-ui-kit/scripts/run-skill-evals.mjs +358 -0
  89. package/skills/adia-ui-kit/scripts/validate-session-log.mjs +242 -0
  90. package/skills/adia-ui-kit/skill.json +102 -0
  91. package/skills/adia-ui-migration/CHANGELOG.md +47 -0
  92. package/skills/adia-ui-migration/SKILL.md +381 -0
  93. package/skills/adia-ui-migration/skill.json +29 -0
  94. package/skills/adia-ui-spa/SKILL.md +1 -1
  95. package/skills/adia-ui-verify/SKILL.md +2 -2
@@ -0,0 +1,181 @@
1
+ # §Flows — Modals, command palette, profile card, marketing hero
2
+
3
+ > **Loading note.** Reference bundle extracted from `SKILL.md` per the
4
+ > §LoadingProtocol inversion contract (v2.20.3+). Load via
5
+ > `skill_view(name='adia-ui-kit', file_path='references/flows-interaction.md')`
6
+ > When wiring transient/interactive surfaces — Cmd+K palette, destructive confirmation modal, editable profile card, landing-page hero. Skip if your task doesn't involve these surfaces — the
7
+ > seed has a stub naming each flow + the load invocation.
8
+
9
+ ### Command palette (Cmd+K)
10
+
11
+ The signature AdiaUI quick-action surface. Modal + autofocused search +
12
+ filterable command list. Almost always paired with admin shell.
13
+
14
+ ```html
15
+ <modal-ui id="cmdk">
16
+ <header>
17
+ <input-ui placeholder="Search commands..." prefix="magnifying-glass" autofocus></input-ui>
18
+ </header>
19
+ <section>
20
+ <command-ui></command-ui>
21
+ </section>
22
+ </modal-ui>
23
+ ```
24
+
25
+ ```html
26
+ <!-- Open via Cmd+K (admin-shell wires this automatically via <admin-command>) -->
27
+ <script type="module">
28
+ document.addEventListener('keydown', (e) => {
29
+ if ((e.metaKey || e.ctrlKey) && e.key === 'k') {
30
+ e.preventDefault();
31
+ document.getElementById('cmdk').open = true;
32
+ }
33
+ });
34
+ </script>
35
+ ```
36
+
37
+ Inside `<admin-shell>`, use `<admin-command>` as the slot — Cmd+K is wired
38
+ for you, no script needed.
39
+
40
+ ---
41
+
42
+
43
+ ### Destructive confirmation modal
44
+
45
+ The "type the name to confirm" pattern. Always use `<modal-ui>` not
46
+ `<drawer-ui>` for destructive actions.
47
+
48
+ ```html
49
+ <modal-ui id="confirm-delete">
50
+ <header>
51
+ <span slot="icon">
52
+ <avatar-ui icon="warning-circle"></avatar-ui>
53
+ </span>
54
+ <span slot="heading"><text-ui strong>Are you sure?</text-ui></span>
55
+ </header>
56
+ <section>
57
+ <col-ui gap="3">
58
+ <text-ui>
59
+ This action cannot be undone. Type the resource name below to confirm.
60
+ </text-ui>
61
+ <field-ui label="Resource name">
62
+ <input-ui id="confirm-name" placeholder="my-resource-123"></input-ui>
63
+ </field-ui>
64
+ </col-ui>
65
+ </section>
66
+ <footer>
67
+ <row-ui gap="2" justify="end">
68
+ <button-ui text="Cancel" variant="ghost"
69
+ onclick="this.closest('modal-ui').open = false"></button-ui>
70
+ <button-ui id="confirm-delete-btn" text="Delete" color="danger" disabled></button-ui>
71
+ </row-ui>
72
+ </footer>
73
+ </modal-ui>
74
+
75
+ <script type="module">
76
+ // Enable Delete only when typed name matches
77
+ const resourceName = 'my-resource-123';
78
+ const input = document.getElementById('confirm-name');
79
+ const btn = document.getElementById('confirm-delete-btn');
80
+ input.addEventListener('input', () => {
81
+ btn.disabled = input.value !== resourceName;
82
+ });
83
+ </script>
84
+ ```
85
+
86
+ ---
87
+
88
+
89
+ ### User profile card (editable)
90
+
91
+ Avatar + form fields + save/cancel. Common in settings, team management.
92
+
93
+ ```html
94
+ <card-ui style="max-width: 32rem">
95
+ <header>
96
+ <row-ui gap="3" align="center">
97
+ <avatar-ui text="Jane Doe" size="lg"></avatar-ui>
98
+ <col-ui gap="0">
99
+ <text-ui weight="semibold" size="lg">Jane Doe</text-ui>
100
+ <text-ui color="subtle">Product Designer</text-ui>
101
+ </col-ui>
102
+ </row-ui>
103
+ </header>
104
+ <section>
105
+ <col-ui gap="3">
106
+ <field-ui label="Email" inline>
107
+ <input-ui type="email" value="jane@example.com"></input-ui>
108
+ </field-ui>
109
+ <field-ui label="Role" inline>
110
+ <select-ui value="designer">
111
+ <option value="designer">Designer</option>
112
+ <option value="engineer">Engineer</option>
113
+ <option value="manager">Manager</option>
114
+ </select-ui>
115
+ </field-ui>
116
+ <field-ui label="Bio" inline>
117
+ <textarea-ui rows="2">Building design systems at AdiaUI</textarea-ui>
118
+ </field-ui>
119
+ </col-ui>
120
+ </section>
121
+ <footer>
122
+ <row-ui gap="2" justify="end">
123
+ <button-ui text="Cancel" variant="ghost" size="sm"></button-ui>
124
+ <button-ui text="Save" variant="primary" size="sm"></button-ui>
125
+ </row-ui>
126
+ </footer>
127
+ </card-ui>
128
+ ```
129
+
130
+
131
+ ---
132
+
133
+
134
+ ### Marketing hero + CTA
135
+
136
+ Centered headline, lede, two-button row. The canonical wrapper is
137
+ `<simple-shell>` + `<simple-hero>` (substrate ships this exactly for
138
+ marketing splashes). Use a bare `<section>` only when embedding inside
139
+ another shell (e.g. an `<admin-page-body>` content region).
140
+
141
+ ```html
142
+ <simple-shell>
143
+ <simple-hero>
144
+ <text-ui slot="heading" size="sm" color="accent" weight="semibold" style="letter-spacing:0.05em">ADIAUI v0.6</text-ui>
145
+ <h1 slot="heading">Build UIs with natural language</h1>
146
+ <p slot="lede">
147
+ Light-DOM web components + generative UI pipeline.
148
+ Ship faster, iterate smarter.
149
+ </p>
150
+ <div slot="actions">
151
+ <button-ui text="Get started" variant="primary" size="lg"></button-ui>
152
+ <button-ui text="See demo" size="lg" icon="play-circle"></button-ui>
153
+ </div>
154
+ </simple-hero>
155
+ </simple-shell>
156
+ ```
157
+
158
+ For an in-page hero **inside another shell**, fall back to the bare-section
159
+ form (no double-shell nesting):
160
+
161
+ ```html
162
+ <section>
163
+ <col-ui align="center" gap="5">
164
+ <col-ui align="center" gap="2">
165
+ <text-ui size="sm" color="accent" weight="semibold" style="letter-spacing:0.05em">ADIAUI v0.6</text-ui>
166
+ <h1>Build UIs with natural language</h1>
167
+ <text-ui size="lg" color="subtle" text-align="center">
168
+ Light-DOM web components + generative UI pipeline.<br>
169
+ Ship faster, iterate smarter.
170
+ </text-ui>
171
+ </col-ui>
172
+ <row-ui gap="3">
173
+ <button-ui text="Get started" variant="primary" size="lg"></button-ui>
174
+ <button-ui text="See demo" size="lg" icon="play-circle"></button-ui>
175
+ </row-ui>
176
+ </col-ui>
177
+ </section>
178
+ ```
179
+
180
+ ---
181
+
@@ -0,0 +1,336 @@
1
+ # §Flows — App-shell composition (admin, chat, editor, simple)
2
+
3
+ > **Loading note.** Reference bundle extracted from `SKILL.md` per the
4
+ > §LoadingProtocol inversion contract (v2.20.3+). Load via
5
+ > `skill_view(name='adia-ui-kit', file_path='references/flows-shells.md')`
6
+ > When composing the shell-tier of an application — admin-shell with sidebar+content, chat-shell with LLM streaming, editor-shell with canvas+panes, or simple-shell for marketing / error pages / single-card flows. Skip if your task doesn't involve these surfaces — the
7
+ > seed has a stub naming each flow + the load invocation.
8
+
9
+ ### App shells
10
+
11
+ **Admin shell — bespoke shape (recommended)**
12
+
13
+ > ⚠️ **Shell CSS is REQUIRED and not auto-imported.** Before the HTML
14
+ > below renders correctly, your entry file MUST contain the imports
15
+ > below. Omitting the `.css` line produces an unstyled stacked-divs
16
+ > layout with no error or warning. See §CSSPolicy + §Patterns → Admin
17
+ > shell anatomy for the full reasoning.
18
+
19
+ ```js
20
+ // In your entry file (src/main.js):
21
+ import '@adia-ai/web-components/css';
22
+ import '@adia-ai/web-components';
23
+ import '@adia-ai/web-modules/shell';
24
+ import '@adia-ai/web-modules/shell/admin-shell.css'; // REQUIRED — see §CSSPolicy
25
+ ```
26
+
27
+ ```html
28
+ <admin-shell>
29
+ <admin-sidebar slot="leading" resizable collapsible>
30
+ <admin-topbar slot="header">
31
+ <span slot="heading">App Name</span>
32
+ </admin-topbar>
33
+ <nav-ui>
34
+ <a href="/dashboard">Dashboard</a>
35
+ <a href="/users">Users</a>
36
+ <a href="/settings">Settings</a>
37
+ </nav-ui>
38
+ <admin-statusbar slot="footer">
39
+ <avatar-ui icon="user" size="sm"></avatar-ui>
40
+ <span>Jane Doe</span>
41
+ </admin-statusbar>
42
+ <div data-resize></div>
43
+ </admin-sidebar>
44
+
45
+ <admin-content>
46
+ <admin-topbar slot="header">
47
+ <button-ui data-sidebar-toggle="leading" icon="sidebar" variant="ghost" size="sm">
48
+ </button-ui>
49
+ <breadcrumb-ui></breadcrumb-ui>
50
+ </admin-topbar>
51
+ <admin-scroll>
52
+ <admin-page>
53
+ <admin-page-header>
54
+ <header-ui>
55
+ <span slot="heading">Page Title</span>
56
+ <button-ui slot="action" text="+ New" variant="primary"></button-ui>
57
+ </header-ui>
58
+ </admin-page-header>
59
+ <admin-page-body>
60
+ <!-- your router outlet here (vue-router, react-router, lit-router, etc.)
61
+ — see §Rendering Model → Routing ownership for the per-framework substitution -->
62
+ </admin-page-body>
63
+ </admin-page>
64
+ </admin-scroll>
65
+ <admin-statusbar slot="footer">Ready</admin-statusbar>
66
+ </admin-content>
67
+
68
+ <admin-command>
69
+ <command-ui placeholder="Search…"></command-ui>
70
+ </admin-command>
71
+ </admin-shell>
72
+
73
+ <script type="module">
74
+ document.querySelector('router-ui').routes = [
75
+ { path: '/dashboard', content: '/pages/dashboard.html', title: 'Dashboard' },
76
+ { path: '/users', content: '/pages/users.html', title: 'Users' },
77
+ { path: '/settings', content: '/pages/settings.html', title: 'Settings' },
78
+ ];
79
+ </script>
80
+ ```
81
+
82
+ #### Composition principles — what goes where in admin chrome (v0.6.13+)
83
+
84
+ The ADR-0023 cluster establishes a strict separation of concerns between
85
+ shell-tier chrome and page-tier content. Confusing the two is the most
86
+ common cause of layout regressions during the v0.6.x cycle. The canonical
87
+ allocation:
88
+
89
+ | Slot | Container | What lives here |
90
+ |---|---|---|
91
+ | Shell sidebar | `<admin-sidebar slot="leading">` | Primary navigation (links/sections). The `<admin-topbar slot="header">` inside hosts the app brand. The footer chrome bar (`<admin-statusbar slot="footer">`) hosts **user-account controls only** — avatar, account menu, sign-in. App-wide preference toggles (scheme / theme) do NOT go here — see the Shell topbar row. |
92
+ | Shell topbar | `<admin-topbar slot="header">` inside `<admin-content>` | Leading side: sidebar-toggle button + **breadcrumb** (location, not page title). Trailing `slot="action"` cluster: **persistent app-wide controls** — scheme / theme toggle, notifications, a global command trigger. NOT page actions, NOT page title, NOT global search (those are page-scoped — see the rows below). |
93
+ | Page header | `<admin-page-header>` inside `<admin-page>` | **Page title** (`<h1>`) + page-scoped action cluster (`+ New`, `Export`, etc.) via `slot="action"`. The header band shares the body content surface (`--page-content-header-bg` → `--a-canvas-0` as of v0.6.19) so it reads as a flush extension of `<admin-page-body>`, not as separate chrome. History: v0.6.14 canvas-2 (elevated-step); v0.6.16 canvas-1 (shell-chrome-continuation); v0.6.19 canvas-0 (flush). Override `--page-content-header-bg` per-product for a raised/contrasting band. |
94
+ | Page body | `<admin-page-body>` inside `<admin-page>` | The page's primary content. For dashboards, wrap stacked grid rows in `<col-ui gap="4">` to get correct vertical rhythm — DO NOT rely on docs-site CSS scoping; the chunk must be self-styling. |
95
+ | Table toolbar | `<table-toolbar-ui>` adjacent to `<table-ui>` | In-page search ("Search users by email…"), filter, sort, columns dropdown. Search is scoped to the table, not global — keep it inside the page, not in the shell topbar. |
96
+ | Statusbar | `<admin-statusbar slot="footer">` inside `<admin-content>` | App-wide status (sync state, row count, version). Optional. |
97
+
98
+ **Anti-patterns that broke claims-ui-v3 during cold-start:**
99
+
100
+ - ❌ Page title (`<h1>Dashboard</h1>`) placed in `<admin-topbar slot="header">` via `slot="heading"` — the topbar should carry a **breadcrumb showing location**, not the page's own title. The breadcrumb's terminal segment IS the page title (rendered by the breadcrumb's own typography).
101
+ - ❌ `+ New Claim` button placed in the shell topbar — page-scoped actions belong in `<admin-page-header>` so they only render on the pages that need them; the shell topbar persists across all routes.
102
+ - ❌ Global search input placed in the shell topbar — a search that's scoped to claims (not "the whole app") belongs in `<table-toolbar-ui>` inside the claims page. The shell topbar is for location + page navigation, not data filtering.
103
+ - ❌ Dashboard tab panels using `<div data-tab-panel>` + relying on `[data-template="dashboard"]` CSS — the rule fires only on the routed dashboard template; non-routed embeds (e.g. `/site/examples/admin-dashboard` under the standalone page template) collapse to zero vertical gap. Use `<col-ui data-tab-panel="…" gap="4">` so the chunk is self-styling.
104
+ - ❌ Scheme / theme toggle (`<toggle-scheme-ui>`) placed in the sidebar footer (`<admin-statusbar slot="footer">`) — a global app preference buried there reads as navigation and disappears when the sidebar collapses. Persistent app-wide controls belong in the shell topbar's trailing `slot="action"` cluster (top-right of the viewport).
105
+ - ❌ `size="sm"` on a **page-header** action button — chrome icon buttons (`data-sidebar-toggle`, theme toggle) are `sm` because the topbar is compact, but page-header action buttons (`+ New`, `Export`) take the **default `md`** size. `size="sm"` there renders a visibly undersized ~14px primary CTA.
106
+ - ❌ `<breadcrumb-ui slot="heading">` inside `<admin-topbar>` — `slot="heading"` applies `font-weight: 500; color: var(--a-fg)`, flattening the breadcrumb's own muted-ancestor / bold-terminal segment typography into one heavy label. Put `<breadcrumb-ui>` in the **default slot**; reserve `slot="heading"` for plain text labels.
107
+
108
+ **Canonical page-header markup:**
109
+
110
+ ```html
111
+ <admin-page>
112
+ <admin-page-header>
113
+ <header>
114
+ <div>
115
+ <h1>Page Title</h1>
116
+ <span slot="action">
117
+ <button-ui text="New" variant="primary" icon="plus"></button-ui>
118
+ <button-ui text="Export" icon="download"></button-ui>
119
+ </span>
120
+ </div>
121
+ </header>
122
+ </admin-page-header>
123
+ <admin-page-body>
124
+ <section>
125
+ <!-- Page content. For dashboards, wrap stacked grids in
126
+ <col-ui gap="4"> so each <grid-ui> row stacks with correct
127
+ vertical rhythm regardless of which template wraps the chunk. -->
128
+ </section>
129
+ </admin-page-body>
130
+ </admin-page>
131
+ ```
132
+
133
+ Either `<header>` (native HTML element) or `<header-ui>` (the AdiaUI primitive) work as the slot inside `<admin-page-header>` — CSS selectors target `:is(header, header-ui)`. Prefer native `<header>` for portable consumer chunks.
134
+
135
+ > **Anti-pattern — don't repeat the icon glyph in `text=`.** `icon="plus"`
136
+ > already renders a `+` glyph. Writing `text="+ New"` then produces a doubled
137
+ > `+` (`[+ icon] [+ New]`). Use `text="New"` with `icon="plus"` — the icon
138
+ > supplies the symbol. The same holds for `minus` / `x` / `check` / arrow
139
+ > icons; `button-ui` emits a one-shot `console.warn` when it detects the
140
+ > collision. A bare `text="+ New"` with **no** `icon` is fine — there the
141
+ > `+` is the label itself.
142
+
143
+ **Customizing the page-header band:**
144
+
145
+ ```css
146
+ /* In your app's CSS, override the token at any cascade layer.
147
+ Default since v0.6.19 is canvas-0 (flush with body); pick any
148
+ higher canvas step for a raised band. */
149
+ :root {
150
+ --page-content-header-bg: var(--a-canvas-1); /* subtle elevated */
151
+ /* or */
152
+ --page-content-header-bg: var(--a-canvas-2); /* original v0.6.14 elevated-step */
153
+ /* or */
154
+ --page-content-header-bg: var(--a-bg-elevated); /* match cards */
155
+ }
156
+ ```
157
+
158
+ Available canvas tokens (in dark mode; ΔL increases per step):
159
+ `--a-canvas-0` (0.15, body + **page-header default since v0.6.19**) → `--a-canvas-1` (0.19, shell-chrome) → `--a-canvas-2` (0.23) → `--a-canvas-3` (0.27) → `--a-canvas-4` (0.31).
160
+
161
+ **Editor shell — canvas + dual sidebars**
162
+
163
+ ```html
164
+ <editor-shell>
165
+ <editor-toolbar>
166
+ <span slot="action-leading"><icon-ui name="layers"></icon-ui></span>
167
+ <span slot="title">Untitled.fig</span>
168
+ <span slot="status">1920 × 1080</span>
169
+ <button-ui slot="action" icon="gear" variant="ghost"></button-ui>
170
+ <button-ui slot="action" text="Share" variant="primary"></button-ui>
171
+ </editor-toolbar>
172
+
173
+ <editor-sidebar slot="leading" collapsible persist="structure">
174
+ <pane-ui side="leading" resizable min-width="200">
175
+ <header>Layers</header>
176
+ <section><!-- tree / outline --></section>
177
+ </pane-ui>
178
+ </editor-sidebar>
179
+
180
+ <editor-canvas>
181
+ <editor-canvas-toolbar>
182
+ <tabs-ui value="preview" variant="underline">
183
+ <tab-ui value="preview" text="Preview"></tab-ui>
184
+ <tab-ui value="schema" text="Schema"></tab-ui>
185
+ <tab-ui value="dom" text="DOM"></tab-ui>
186
+ </tabs-ui>
187
+ </editor-canvas-toolbar>
188
+ <editor-canvas-empty>
189
+ <empty-state-ui icon="square" heading="New document"
190
+ description="Drop content to begin."></empty-state-ui>
191
+ </editor-canvas-empty>
192
+ </editor-canvas>
193
+
194
+ <editor-sidebar slot="trailing" collapsible persist="inspector">
195
+ <pane-ui side="trailing" resizable min-width="200">
196
+ <header>Inspector</header>
197
+ <section><!-- properties --></section>
198
+ </pane-ui>
199
+ </editor-sidebar>
200
+
201
+ <editor-statusbar>
202
+ <span slot="status">Saved</span>
203
+ <span slot="zoom">100%</span>
204
+ </editor-statusbar>
205
+ </editor-shell>
206
+ ```
207
+
208
+ **Editor cluster wiring contract**
209
+
210
+ - `<editor-toolbar>` slot vocabulary: `title` / `status` / `action` / `action-leading` (verified against `packages/web-modules/editor/editor-shell/css/editor-shell.bespoke.css`). Earlier kit revisions documented `icon` / `heading` / `description` (the `admin-topbar` vocabulary), but substrate CSS doesn't position those slot names on the editor cluster — they fall through to inline document-order positioning. Fixed v3.1.1.
211
+ - `<editor-sidebar persist="…">` is the localStorage key suffix; the sidebar writes pane width under `adia-editor-sidebar-{persist}`. The deprecated `name=` alias is kept for v0.4.x back-compat; new code uses `persist=`. Omit `persist=` and width won't survive a reload.
212
+ - `<editor-sidebar>` **WRAPS** `<pane-ui resizable>` — delegation pattern. The sidebar reflects `[collapsed]` + `[resizing]`, owns localStorage; the inner pane-ui owns the physical drag. Don't reimplement drag in the sidebar.
213
+ - `<editor-canvas-toolbar>` is **canvas-scope** (view-mode tabs, breadcrumbs, canvas-scoped actions); `<editor-toolbar>` is **app-scope** (document-wide actions). Place `<editor-canvas-toolbar>` as the first child of `<editor-canvas>`; it's sticky to the canvas scroll surface so tabs stay visible while the canvas body scrolls. Replaces the legacy `<div data-view-strip>` pattern.
214
+ - Host `[focus-mode]` automatically propagates to `<editor-toolbar>[full-screen]` and `<editor-canvas>[focused]` — don't toggle child attributes by hand.
215
+
216
+ **Nested shells — admin wrapping editor**
217
+
218
+ For editor-inside-admin pages (inline page builder, embedded canvas), place the editor shell inside `<admin-page-body>` with `flex: 1` and the `min-height: 0` chain:
219
+
220
+ ```html
221
+ <admin-page-body style="flex: 1; display: flex; flex-direction: column; min-height: 0;">
222
+ <editor-shell style="flex: 1; min-height: 0;">
223
+ <editor-toolbar><span slot="title">Page Builder</span></editor-toolbar>
224
+ <editor-canvas><!-- canvas content --></editor-canvas>
225
+ </editor-shell>
226
+ </admin-page-body>
227
+ ```
228
+
229
+ > **Pitfall — nested shell height collapse.** Shells use `height: 100%`
230
+ > internally. Every ancestor must form a flex column with `min-height: 0`.
231
+ > Without this the inner shell silently collapses to zero height.
232
+
233
+ ---
234
+
235
+ **Chat shell — LLM streaming with provider + thinking**
236
+
237
+ ```html
238
+ <chat-shell
239
+ proxy-url="/api/chat"
240
+ provider="anthropic"
241
+ model="claude-sonnet-4-7"
242
+ system="You are a helpful assistant."
243
+ thinking>
244
+ <chat-header>
245
+ <span slot="name">Assistant</span>
246
+ <chat-status slot="status" data-state="connected">Connected</chat-status>
247
+ </chat-header>
248
+
249
+ <chat-thread>
250
+ <chat-empty>
251
+ <empty-state-ui icon="chat-circle"
252
+ heading="How can I help?" description="Ask anything.">
253
+ </empty-state-ui>
254
+ </chat-empty>
255
+ </chat-thread>
256
+
257
+ <chat-composer>
258
+ <chat-input-ui placeholder="Message…" submit-on-enter></chat-input-ui>
259
+ </chat-composer>
260
+ </chat-shell>
261
+ ```
262
+
263
+ **Chat cluster wiring contract**
264
+
265
+ - `[proxy-url]` is the server-side endpoint that forwards to the model provider (keeps API keys server-side). For direct-provider mode set `[provider]` + provider-specific creds at the deployment layer.
266
+ - `[submit-on-enter]` on `<chat-input-ui>` is **required** for the composer-submit chain. Without it the form-submit path never fires and the host doesn't dispatch the LLM call.
267
+ - `<chat-composer>` forwards the inner `<chat-input-ui>` submit as `composer-submit` (de-duped); the host listens for `composer-submit` and fires the LLM call. Don't add your own submit handler on `<chat-input-ui>`.
268
+ - Host `[streaming]` propagates automatically to `<chat-thread>[streaming]` and `<chat-composer>[disabled]`. **Don't toggle these by hand.**
269
+ - 8 host events: `submit` (user message), `chunk` (each streaming token), `thinking` (extended-thinking content), `done` (response complete, has `{text, usage, stopReason}` detail), `error`, `abort`, `clear`, `message`.
270
+
271
+ **Conversation rail (optional sidebar pattern)**
272
+
273
+ ```html
274
+ <chat-shell proxy-url="/api/chat">
275
+ <chat-sidebar slot="leading" resizable collapsible name="conversations">
276
+ <pane-ui side="leading" resizable>
277
+ <header>Conversations</header>
278
+ <nav-ui variant="section">
279
+ <nav-item-ui text="Today's brainstorm" selected></nav-item-ui>
280
+ <nav-item-ui text="Spec review"></nav-item-ui>
281
+ </nav-ui>
282
+ </pane-ui>
283
+ </chat-sidebar>
284
+
285
+ <chat-thread>…</chat-thread>
286
+ <chat-composer><chat-input-ui submit-on-enter></chat-input-ui></chat-composer>
287
+ </chat-shell>
288
+ ```
289
+
290
+ `<chat-sidebar persist="…">` writes pane width under `adia-chat-sidebar-{persist}`. **Do not** put `<chat-sidebar slot="leading">` AND `<chat-sidebar slot="trailing">` simultaneously unless your conversation model genuinely needs two rails — most chat surfaces use one leading rail at most.
291
+
292
+ ---
293
+
294
+ **Simple shell — marketing / error pages / single-card flows**
295
+
296
+ ```html
297
+ <simple-shell centered>
298
+ <simple-hero>
299
+ <h1 slot="heading">404 — page not found</h1>
300
+ <p slot="lede">The page you're looking for doesn't exist (or moved).</p>
301
+ <div slot="actions">
302
+ <button-ui text="Back to home" variant="primary"></button-ui>
303
+ <button-ui text="Contact support" variant="ghost"></button-ui>
304
+ </div>
305
+ </simple-hero>
306
+ </simple-shell>
307
+ ```
308
+
309
+ **Simple cluster wiring contract**
310
+
311
+ - 3 cluster members: `<simple-shell>` (host), `<simple-hero>` (heading + lede + actions slot), `<simple-content>` (free-form body region, max-width constrained).
312
+ - `<simple-shell>` has two reflected boolean knobs:
313
+ - `[centered]` — vertically centers content in the viewport (use for 404 / 500 / maintenance / thank-you / sign-in card flows).
314
+ - `[full-bleed]` — drops the max-width constraint on `<simple-content>` children (use for marketing splashes where the hero should span edge-to-edge).
315
+ - `<simple-hero>` slots: `heading` (the `<h1>`), `lede` (a `<p>` description), `actions` (a `<div>` containing one or more buttons), default (any free-form content after the action row).
316
+ - `<simple-content>` has one default slot — drop arbitrary content; the wrapper constrains width unless `[full-bleed]` is set on the host.
317
+
318
+ **Use cases per substrate canonicals:** marketing splashes, error pages (404 / 500 / maintenance), thank-you / confirmation pages, single-card flows (sign-in, password reset). **Don't reach for simple-shell when:** the surface has a sidebar / topbar / multi-column layout — that's `admin-shell`. The simple shell exists exactly to avoid hand-rolling `<main style="display: grid; place-items: center">` for these 5 canonical cases.
319
+
320
+ ```html
321
+ <!-- Marketing splash with two regions -->
322
+ <simple-shell>
323
+ <simple-hero>
324
+ <h1 slot="heading">Build UI that ships itself</h1>
325
+ <p slot="lede">A2UI + AdiaUI — generative UI as a first-class substrate.</p>
326
+ <div slot="actions">
327
+ <button-ui text="Get started" variant="primary"></button-ui>
328
+ <button-ui text="View docs" variant="ghost"></button-ui>
329
+ </div>
330
+ </simple-hero>
331
+ <simple-content>
332
+ <!-- features grid, testimonials, etc. -->
333
+ </simple-content>
334
+ </simple-shell>
335
+ ```
336
+