@adia-ai/web-modules 0.6.6 → 0.6.7
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.
- package/CHANGELOG.md +14 -0
- package/generative/index.d.ts +11 -0
- package/generative/index.js +45 -0
- package/package.json +28 -1
- package/chat/chat-composer/chat-composer.examples.html +0 -28
- package/chat/chat-composer/chat-composer.html +0 -43
- package/chat/chat-empty/chat-empty.examples.html +0 -34
- package/chat/chat-empty/chat-empty.html +0 -42
- package/chat/chat-header/chat-header.examples.html +0 -30
- package/chat/chat-header/chat-header.html +0 -42
- package/chat/chat-shell/chat-shell.examples.html +0 -126
- package/chat/chat-shell/chat-shell.html +0 -42
- package/chat/chat-sidebar/chat-sidebar.examples.html +0 -36
- package/chat/chat-sidebar/chat-sidebar.html +0 -43
- package/chat/chat-status/chat-status.examples.html +0 -29
- package/chat/chat-status/chat-status.html +0 -42
- package/chat/chat-thread/chat-thread.examples.html +0 -36
- package/chat/chat-thread/chat-thread.html +0 -43
- package/editor/editor-canvas/editor-canvas.examples.html +0 -65
- package/editor/editor-canvas/editor-canvas.html +0 -43
- package/editor/editor-canvas-empty/editor-canvas-empty.examples.html +0 -65
- package/editor/editor-canvas-empty/editor-canvas-empty.html +0 -42
- package/editor/editor-canvas-toolbar/editor-canvas-toolbar.examples.html +0 -56
- package/editor/editor-canvas-toolbar/editor-canvas-toolbar.html +0 -42
- package/editor/editor-shell/editor-shell.examples.html +0 -71
- package/editor/editor-shell/editor-shell.html +0 -42
- package/editor/editor-sidebar/editor-sidebar.examples.html +0 -65
- package/editor/editor-sidebar/editor-sidebar.html +0 -43
- package/editor/editor-statusbar/editor-statusbar.examples.html +0 -65
- package/editor/editor-statusbar/editor-statusbar.html +0 -42
- package/editor/editor-toolbar/editor-toolbar.examples.html +0 -65
- package/editor/editor-toolbar/editor-toolbar.html +0 -43
- package/shell/admin-command/admin-command.examples.html +0 -83
- package/shell/admin-command/admin-command.html +0 -42
- package/shell/admin-content/admin-content.examples.html +0 -33
- package/shell/admin-content/admin-content.html +0 -42
- package/shell/admin-page/admin-page.examples.html +0 -37
- package/shell/admin-page/admin-page.html +0 -42
- package/shell/admin-page-body/admin-page-body.examples.html +0 -34
- package/shell/admin-page-body/admin-page-body.html +0 -42
- package/shell/admin-page-header/admin-page-header.examples.html +0 -34
- package/shell/admin-page-header/admin-page-header.html +0 -42
- package/shell/admin-scroll/admin-scroll.examples.html +0 -31
- package/shell/admin-scroll/admin-scroll.html +0 -42
- package/shell/admin-shell/admin-shell.examples.html +0 -181
- package/shell/admin-shell/admin-shell.html +0 -46
- package/shell/admin-sidebar/admin-sidebar.examples.html +0 -76
- package/shell/admin-sidebar/admin-sidebar.html +0 -47
- package/shell/admin-statusbar/admin-statusbar.examples.html +0 -29
- package/shell/admin-statusbar/admin-statusbar.html +0 -42
- package/shell/admin-topbar/admin-topbar.examples.html +0 -31
- package/shell/admin-topbar/admin-topbar.html +0 -42
- package/simple/simple-content/simple-content.examples.html +0 -13
- package/simple/simple-content/simple-content.html +0 -42
- package/simple/simple-hero/simple-hero.examples.html +0 -33
- package/simple/simple-hero/simple-hero.html +0 -42
- package/simple/simple-shell/simple-shell.examples.html +0 -42
- package/simple/simple-shell/simple-shell.html +0 -42
- package/theme/theme-panel/theme-panel.examples.html +0 -112
- package/theme/theme-panel/theme-panel.html +0 -75
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog — @adia-ai/web-modules
|
|
2
2
|
|
|
3
|
+
## [0.6.7] — 2026-05-19
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
- **`@adia-ai/web-modules/generative` subpath barrel** — single import
|
|
7
|
+
registers `<canvas-ui>` + `<a2ui-root>` for generative UI surfaces.
|
|
8
|
+
Closes the cold-start footgun where the barrel didn't include these
|
|
9
|
+
primitives (per ADR-0027 they compose cross-package so they're not in
|
|
10
|
+
the default barrel).
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- **Exclude authoring artifacts from npm tarball** — 28 `.examples.html`
|
|
14
|
+
files were leaking into the published package; now filtered via the
|
|
15
|
+
`files` field exclusion patterns (matches web-components convention).
|
|
16
|
+
|
|
3
17
|
## [0.6.6] — 2026-05-18
|
|
4
18
|
|
|
5
19
|
### Changed
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @adia-ai/web-modules/generative
|
|
3
|
+
*
|
|
4
|
+
* Convenience barrel for generative UI surfaces. See `index.js` for docs.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export { A2UIRoot } from '@adia-ai/web-modules/runtime';
|
|
8
|
+
export { UICanvas as Canvas } from '@adia-ai/web-components/components/canvas';
|
|
9
|
+
export {
|
|
10
|
+
registerResolver,
|
|
11
|
+
} from '@adia-ai/a2ui-runtime';
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @adia-ai/web-modules/generative
|
|
3
|
+
*
|
|
4
|
+
* Convenience barrel for generative UI surfaces. Imports + registers
|
|
5
|
+
* the two non-barrel primitives needed to render generated A2UI output:
|
|
6
|
+
*
|
|
7
|
+
* <a2ui-root> — A2UI protocol surface (stream + render)
|
|
8
|
+
* <canvas-ui> — High-level wrapper with history (back/forward/version)
|
|
9
|
+
*
|
|
10
|
+
* Why a separate barrel: per ADR-0027, primitives that compose
|
|
11
|
+
* cross-package primitives do NOT auto-register. canvas-ui composes
|
|
12
|
+
* a2ui-root + theme-ui across package boundaries, so neither is in
|
|
13
|
+
* the default barrels. This subpath bundles them for the common
|
|
14
|
+
* "I want to render generated UI in my app" use case.
|
|
15
|
+
*
|
|
16
|
+
* Usage:
|
|
17
|
+
*
|
|
18
|
+
* // Single import registers <canvas-ui> + <a2ui-root> + dependencies.
|
|
19
|
+
* import '@adia-ai/web-modules/generative';
|
|
20
|
+
*
|
|
21
|
+
* // Or import classes for programmatic construction:
|
|
22
|
+
* import { Canvas, A2UIRoot, registerResolver }
|
|
23
|
+
* from '@adia-ai/web-modules/generative';
|
|
24
|
+
*
|
|
25
|
+
* Pairs with the @adia-ai/a2ui-runtime registry (registerResolver, etc.)
|
|
26
|
+
* for wiring data sources to api:// + resource:// URIs.
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
// Side-effect: register <a2ui-root> custom element
|
|
30
|
+
import '@adia-ai/web-modules/runtime';
|
|
31
|
+
|
|
32
|
+
// Side-effect: register <canvas-ui> custom element
|
|
33
|
+
// (The "./components/*" subpath maps name -> components/name/name.js,
|
|
34
|
+
// so "components/canvas" resolves to "components/canvas/canvas.js".)
|
|
35
|
+
import '@adia-ai/web-components/components/canvas';
|
|
36
|
+
|
|
37
|
+
// Re-exports for programmatic use
|
|
38
|
+
export { A2UIRoot } from '@adia-ai/web-modules/runtime';
|
|
39
|
+
export { UICanvas as Canvas } from '@adia-ai/web-components/components/canvas';
|
|
40
|
+
|
|
41
|
+
// Re-export resolver registration so consumers can wire data sources
|
|
42
|
+
// without a second import.
|
|
43
|
+
export {
|
|
44
|
+
registerResolver,
|
|
45
|
+
} from '@adia-ai/a2ui-runtime';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adia-ai/web-modules",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.7",
|
|
4
4
|
"description": "AdiaUI composite custom elements \u2014 shell, chat, editor, runtime clusters built from @adia-ai/web-components primitives. Subpath exports per cluster.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -92,15 +92,42 @@
|
|
|
92
92
|
"./theme/*.css": "./theme/*/*.css",
|
|
93
93
|
"./theme/*/*.css": "./theme/*/*.css",
|
|
94
94
|
"./theme/*/css/*.css": "./theme/*/css/*.css",
|
|
95
|
+
"./generative": {
|
|
96
|
+
"types": "./generative/index.d.ts",
|
|
97
|
+
"import": "./generative/index.js",
|
|
98
|
+
"default": "./generative/index.js"
|
|
99
|
+
},
|
|
95
100
|
"./package.json": "./package.json"
|
|
96
101
|
},
|
|
97
102
|
"files": [
|
|
98
103
|
"shell/",
|
|
104
|
+
"!shell/**/*.examples.html",
|
|
105
|
+
"!shell/**/*.examples.js",
|
|
106
|
+
"!shell/**/*.html",
|
|
99
107
|
"chat/",
|
|
108
|
+
"!chat/**/*.examples.html",
|
|
109
|
+
"!chat/**/*.examples.js",
|
|
110
|
+
"!chat/**/*.html",
|
|
100
111
|
"editor/",
|
|
112
|
+
"!editor/**/*.examples.html",
|
|
113
|
+
"!editor/**/*.examples.js",
|
|
114
|
+
"!editor/**/*.html",
|
|
101
115
|
"simple/",
|
|
116
|
+
"!simple/**/*.examples.html",
|
|
117
|
+
"!simple/**/*.examples.js",
|
|
118
|
+
"!simple/**/*.html",
|
|
102
119
|
"runtime/",
|
|
120
|
+
"!runtime/**/*.examples.html",
|
|
121
|
+
"!runtime/**/*.examples.js",
|
|
122
|
+
"!runtime/**/*.html",
|
|
103
123
|
"theme/",
|
|
124
|
+
"!theme/**/*.examples.html",
|
|
125
|
+
"!theme/**/*.examples.js",
|
|
126
|
+
"!theme/**/*.html",
|
|
127
|
+
"generative/",
|
|
128
|
+
"!generative/**/*.examples.html",
|
|
129
|
+
"!generative/**/*.examples.js",
|
|
130
|
+
"!generative/**/*.html",
|
|
104
131
|
"index.js",
|
|
105
132
|
"README.md",
|
|
106
133
|
"CHANGELOG.md"
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
<header>
|
|
2
|
-
<div>
|
|
3
|
-
<h1>Chat Composer</h1>
|
|
4
|
-
<div data-actions>
|
|
5
|
-
<tag-ui size="sm">chat-composer</tag-ui>
|
|
6
|
-
<tag-ui size="sm" variant="ghost">JS-bearing</tag-ui>
|
|
7
|
-
</div>
|
|
8
|
-
</div>
|
|
9
|
-
<p>Module-tier chat composer wrapper — forwards submit events, propagates [disabled], slot vocabulary for future composer surfaces.</p>
|
|
10
|
-
</header>
|
|
11
|
-
|
|
12
|
-
<section data-section>
|
|
13
|
-
<h2 variant="section">Role</h2>
|
|
14
|
-
<p>Forwards inner submit events as <code>composer-submit</code>, propagates <code>[disabled]</code> to the inner input, slot vocabulary for future composer surfaces (file attach, autocomplete trigger, model picker). JS-bearing.</p>
|
|
15
|
-
</section>
|
|
16
|
-
|
|
17
|
-
<section data-section>
|
|
18
|
-
<h2 variant="section">Composition</h2>
|
|
19
|
-
<p>Typical placement inside <code><chat-shell></code>:</p>
|
|
20
|
-
<code-ui language="html"><chat-composer>
|
|
21
|
-
<chat-input-ui placeholder="Message…" submit-on-enter></chat-input-ui>
|
|
22
|
-
</chat-composer></code-ui>
|
|
23
|
-
</section>
|
|
24
|
-
|
|
25
|
-
<section data-section>
|
|
26
|
-
<h2 variant="section">Family</h2>
|
|
27
|
-
<p>Per <a href="../../../../.brain/adrs/0023-bespoke-shell-tier-children.md">ADR-0023</a>, the chat cluster's bespoke family — <code><chat-shell></code> (host), <code><chat-thread></code>, <code><chat-composer></code>, <code><chat-sidebar></code> (JS-bearing) + <code><chat-header></code>, <code><chat-status></code>, <code><chat-empty></code> (CSS-only). Mirrors the admin cluster's pattern.</p>
|
|
28
|
-
</section>
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en" data-theme="auto">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
-
<title>Chat Composer — AdiaUI</title>
|
|
7
|
-
|
|
8
|
-
<link rel="stylesheet" href="../../../web-components/styles/resets.css">
|
|
9
|
-
<link rel="stylesheet" href="../../../web-components/styles/tokens.css">
|
|
10
|
-
<link rel="stylesheet" href="../chat-shell/chat-shell.css">
|
|
11
|
-
<link rel="stylesheet" href="../../../web-components/components/code/code.css">
|
|
12
|
-
<link rel="stylesheet" href="../../../web-components/components/tag/tag.css">
|
|
13
|
-
|
|
14
|
-
<script type="module" src="../chat-shell/chat-shell.js"></script>
|
|
15
|
-
<script type="module" src="./chat-composer.js"></script>
|
|
16
|
-
<script type="module" src="../../../web-components/components/code/code.js"></script>
|
|
17
|
-
<script type="module" src="../../../web-components/components/tag/tag.js"></script>
|
|
18
|
-
|
|
19
|
-
<style>
|
|
20
|
-
:where(html, body) { margin: 0; min-height: 100vh; background: var(--a-bg); color: var(--a-fg); font-family: var(--a-font); }
|
|
21
|
-
main { max-width: 960px; margin-inline: auto; padding: var(--a-space-6) var(--a-space-5); }
|
|
22
|
-
</style>
|
|
23
|
-
</head>
|
|
24
|
-
<body>
|
|
25
|
-
|
|
26
|
-
<main id="demo-root">
|
|
27
|
-
<p>Loading examples…</p>
|
|
28
|
-
</main>
|
|
29
|
-
|
|
30
|
-
<script type="module">
|
|
31
|
-
const root = document.getElementById('demo-root');
|
|
32
|
-
try {
|
|
33
|
-
const res = await fetch('./chat-composer.examples.html');
|
|
34
|
-
if (!res.ok) throw new Error(`fetch failed (${res.status})`);
|
|
35
|
-
root.innerHTML = await res.text();
|
|
36
|
-
} catch (err) {
|
|
37
|
-
root.innerHTML = `<p style="color:var(--a-danger-strong);">Failed to load chat-composer.examples.html — ${err.message}</p>`;
|
|
38
|
-
console.error('[chat-composer.html]', err);
|
|
39
|
-
}
|
|
40
|
-
</script>
|
|
41
|
-
|
|
42
|
-
</body>
|
|
43
|
-
</html>
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
<header>
|
|
2
|
-
<div>
|
|
3
|
-
<h1>Chat Empty</h1>
|
|
4
|
-
<div data-actions>
|
|
5
|
-
<tag-ui size="sm">chat-empty</tag-ui>
|
|
6
|
-
<tag-ui size="sm" variant="ghost">CSS-only</tag-ui>
|
|
7
|
-
</div>
|
|
8
|
-
</div>
|
|
9
|
-
<p>Module-tier chat empty state. CSS-only. Visibility driven by parent <chat-thread>'s [empty] reflected attribute.</p>
|
|
10
|
-
</header>
|
|
11
|
-
|
|
12
|
-
<section data-section>
|
|
13
|
-
<h2 variant="section">Role</h2>
|
|
14
|
-
<p>Empty state placeholder. CSS-only. Visibility driven automatically by parent <code><chat-thread></code>'s <code>[empty]</code> reflected attribute — no JS toggling needed.</p>
|
|
15
|
-
</section>
|
|
16
|
-
|
|
17
|
-
<section data-section>
|
|
18
|
-
<h2 variant="section">Composition</h2>
|
|
19
|
-
<p>Typical placement inside <code><chat-shell></code>:</p>
|
|
20
|
-
<code-ui language="html"><chat-thread>
|
|
21
|
-
<chat-empty>
|
|
22
|
-
<empty-state-ui
|
|
23
|
-
icon="chat-circle"
|
|
24
|
-
heading="Hello!"
|
|
25
|
-
description="Ask me anything."></empty-state-ui>
|
|
26
|
-
</chat-empty>
|
|
27
|
-
<!-- Messages get appended here; chat-empty auto-hides -->
|
|
28
|
-
</chat-thread></code-ui>
|
|
29
|
-
</section>
|
|
30
|
-
|
|
31
|
-
<section data-section>
|
|
32
|
-
<h2 variant="section">Family</h2>
|
|
33
|
-
<p>Per <a href="../../../../.brain/adrs/0023-bespoke-shell-tier-children.md">ADR-0023</a>, the chat cluster's bespoke family — <code><chat-shell></code> (host), <code><chat-thread></code>, <code><chat-composer></code>, <code><chat-sidebar></code> (JS-bearing) + <code><chat-header></code>, <code><chat-status></code>, <code><chat-empty></code> (CSS-only). Mirrors the admin cluster's pattern.</p>
|
|
34
|
-
</section>
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en" data-theme="auto">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
-
<title>Chat Empty — AdiaUI</title>
|
|
7
|
-
|
|
8
|
-
<link rel="stylesheet" href="../../../web-components/styles/resets.css">
|
|
9
|
-
<link rel="stylesheet" href="../../../web-components/styles/tokens.css">
|
|
10
|
-
<link rel="stylesheet" href="../chat-shell/chat-shell.css">
|
|
11
|
-
<link rel="stylesheet" href="../../../web-components/components/code/code.css">
|
|
12
|
-
<link rel="stylesheet" href="../../../web-components/components/tag/tag.css">
|
|
13
|
-
|
|
14
|
-
<script type="module" src="../chat-shell/chat-shell.js"></script>
|
|
15
|
-
<script type="module" src="../../../web-components/components/code/code.js"></script>
|
|
16
|
-
<script type="module" src="../../../web-components/components/tag/tag.js"></script>
|
|
17
|
-
|
|
18
|
-
<style>
|
|
19
|
-
:where(html, body) { margin: 0; min-height: 100vh; background: var(--a-bg); color: var(--a-fg); font-family: var(--a-font); }
|
|
20
|
-
main { max-width: 960px; margin-inline: auto; padding: var(--a-space-6) var(--a-space-5); }
|
|
21
|
-
</style>
|
|
22
|
-
</head>
|
|
23
|
-
<body>
|
|
24
|
-
|
|
25
|
-
<main id="demo-root">
|
|
26
|
-
<p>Loading examples…</p>
|
|
27
|
-
</main>
|
|
28
|
-
|
|
29
|
-
<script type="module">
|
|
30
|
-
const root = document.getElementById('demo-root');
|
|
31
|
-
try {
|
|
32
|
-
const res = await fetch('./chat-empty.examples.html');
|
|
33
|
-
if (!res.ok) throw new Error(`fetch failed (${res.status})`);
|
|
34
|
-
root.innerHTML = await res.text();
|
|
35
|
-
} catch (err) {
|
|
36
|
-
root.innerHTML = `<p style="color:var(--a-danger-strong);">Failed to load chat-empty.examples.html — ${err.message}</p>`;
|
|
37
|
-
console.error('[chat-empty.html]', err);
|
|
38
|
-
}
|
|
39
|
-
</script>
|
|
40
|
-
|
|
41
|
-
</body>
|
|
42
|
-
</html>
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
<header>
|
|
2
|
-
<div>
|
|
3
|
-
<h1>Chat Header</h1>
|
|
4
|
-
<div data-actions>
|
|
5
|
-
<tag-ui size="sm">chat-header</tag-ui>
|
|
6
|
-
<tag-ui size="sm" variant="ghost">CSS-only</tag-ui>
|
|
7
|
-
</div>
|
|
8
|
-
</div>
|
|
9
|
-
<p>Module-tier chat top chrome bar. CSS-only. Holds chat name, status, and action clusters.</p>
|
|
10
|
-
</header>
|
|
11
|
-
|
|
12
|
-
<section data-section>
|
|
13
|
-
<h2 variant="section">Role</h2>
|
|
14
|
-
<p>Top chrome bar with slot vocabulary — name, status, action, action-leading clusters. Pure CSS-only stub styled by parent shell via tag-presence.</p>
|
|
15
|
-
</section>
|
|
16
|
-
|
|
17
|
-
<section data-section>
|
|
18
|
-
<h2 variant="section">Composition</h2>
|
|
19
|
-
<p>Typical placement inside <code><chat-shell></code>:</p>
|
|
20
|
-
<code-ui language="html"><chat-header>
|
|
21
|
-
<span slot="name">Claude</span>
|
|
22
|
-
<chat-status slot="status">Connected</chat-status>
|
|
23
|
-
<button-ui slot="action" icon="gear" variant="ghost"></button-ui>
|
|
24
|
-
</chat-header>
|
|
25
|
-
</section>
|
|
26
|
-
|
|
27
|
-
<section data-section>
|
|
28
|
-
<h2 variant="section">Family</h2>
|
|
29
|
-
<p>Per <a href="../../../../.brain/adrs/0023-bespoke-shell-tier-children.md">ADR-0023</a>, the chat cluster's bespoke family — <code><chat-shell></code> (host), <code><chat-thread></code>, <code><chat-composer></code>, <code><chat-sidebar></code> (JS-bearing) + <code><chat-header></code>, <code><chat-status></code>, <code><chat-empty></code> (CSS-only). Mirrors the admin cluster's pattern.</p>
|
|
30
|
-
</section>
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en" data-theme="auto">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
-
<title>Chat Header — AdiaUI</title>
|
|
7
|
-
|
|
8
|
-
<link rel="stylesheet" href="../../../web-components/styles/resets.css">
|
|
9
|
-
<link rel="stylesheet" href="../../../web-components/styles/tokens.css">
|
|
10
|
-
<link rel="stylesheet" href="../chat-shell/chat-shell.css">
|
|
11
|
-
<link rel="stylesheet" href="../../../web-components/components/code/code.css">
|
|
12
|
-
<link rel="stylesheet" href="../../../web-components/components/tag/tag.css">
|
|
13
|
-
|
|
14
|
-
<script type="module" src="../chat-shell/chat-shell.js"></script>
|
|
15
|
-
<script type="module" src="../../../web-components/components/code/code.js"></script>
|
|
16
|
-
<script type="module" src="../../../web-components/components/tag/tag.js"></script>
|
|
17
|
-
|
|
18
|
-
<style>
|
|
19
|
-
:where(html, body) { margin: 0; min-height: 100vh; background: var(--a-bg); color: var(--a-fg); font-family: var(--a-font); }
|
|
20
|
-
main { max-width: 960px; margin-inline: auto; padding: var(--a-space-6) var(--a-space-5); }
|
|
21
|
-
</style>
|
|
22
|
-
</head>
|
|
23
|
-
<body>
|
|
24
|
-
|
|
25
|
-
<main id="demo-root">
|
|
26
|
-
<p>Loading examples…</p>
|
|
27
|
-
</main>
|
|
28
|
-
|
|
29
|
-
<script type="module">
|
|
30
|
-
const root = document.getElementById('demo-root');
|
|
31
|
-
try {
|
|
32
|
-
const res = await fetch('./chat-header.examples.html');
|
|
33
|
-
if (!res.ok) throw new Error(`fetch failed (${res.status})`);
|
|
34
|
-
root.innerHTML = await res.text();
|
|
35
|
-
} catch (err) {
|
|
36
|
-
root.innerHTML = `<p style="color:var(--a-danger-strong);">Failed to load chat-header.examples.html — ${err.message}</p>`;
|
|
37
|
-
console.error('[chat-header.html]', err);
|
|
38
|
-
}
|
|
39
|
-
</script>
|
|
40
|
-
|
|
41
|
-
</body>
|
|
42
|
-
</html>
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
<header>
|
|
2
|
-
<div>
|
|
3
|
-
<h1>Chat Shell</h1>
|
|
4
|
-
<div data-actions>
|
|
5
|
-
<tag-ui size="sm">chat-shell</tag-ui>
|
|
6
|
-
<tag-ui size="sm" variant="ghost">module-tier</tag-ui>
|
|
7
|
-
</div>
|
|
8
|
-
</div>
|
|
9
|
-
<p>Behavior-only chat orchestrator (LLM-streaming module). Author supplies the DOM structure via <code>[data-chat-messages]</code>, <code>[data-chat-input]</code>, <code>[data-chat-empty]</code>, <code>[data-chat-status]</code> elements; chat-shell wires message streaming, markdown rendering, code-block upgrades, and an LLM integration path via <code>proxy-url</code> (or via external submit).</p>
|
|
10
|
-
</header>
|
|
11
|
-
|
|
12
|
-
<section data-section>
|
|
13
|
-
<h2 variant="section">Basic shape (legacy)</h2>
|
|
14
|
-
<p data-note>Author provides the structural DOM; the shell binds the LLM streaming behavior and renders chunks into the messages container. This is the original raw-HTML authoring shape — still fully supported.</p>
|
|
15
|
-
<code-ui language="html"><chat-shell provider="anthropic" model="claude-sonnet-4-7" proxy-url="/api/llm">
|
|
16
|
-
<header>
|
|
17
|
-
<span slot="heading">Chat</span>
|
|
18
|
-
<span slot="description">claude-sonnet-4-7</span>
|
|
19
|
-
</header>
|
|
20
|
-
|
|
21
|
-
<div data-chat-messages></div>
|
|
22
|
-
<div data-chat-empty>
|
|
23
|
-
<p>Send a message to start.</p>
|
|
24
|
-
</div>
|
|
25
|
-
|
|
26
|
-
<div data-chat-input>
|
|
27
|
-
<input-ui placeholder="Ask anything..." submit-on-enter></input-ui>
|
|
28
|
-
</div>
|
|
29
|
-
|
|
30
|
-
<div data-chat-status></div>
|
|
31
|
-
</chat-shell></code-ui>
|
|
32
|
-
</section>
|
|
33
|
-
|
|
34
|
-
<section data-section>
|
|
35
|
-
<h2 variant="section">Basic shape (bespoke — recommended)</h2>
|
|
36
|
-
<p data-note>The bespoke shape uses module-namespaced custom elements per <a href="../../../../.brain/adrs/0023-bespoke-shell-tier-children.md">ADR-0023</a>. Each child owns its own behavior + state attributes; queryable from outside via <code>:has(chat-thread[streaming])</code>.</p>
|
|
37
|
-
<code-ui language="html"><chat-shell provider="anthropic" model="claude-sonnet-4-7" proxy-url="/api/llm">
|
|
38
|
-
<chat-header>
|
|
39
|
-
<span slot="name">Claude</span>
|
|
40
|
-
<chat-status slot="status">Connected</chat-status>
|
|
41
|
-
</chat-header>
|
|
42
|
-
|
|
43
|
-
<chat-thread>
|
|
44
|
-
<chat-empty>
|
|
45
|
-
<empty-state-ui icon="chat-circle" heading="Hello!" description="Ask me anything."></empty-state-ui>
|
|
46
|
-
</chat-empty>
|
|
47
|
-
</chat-thread>
|
|
48
|
-
|
|
49
|
-
<chat-composer>
|
|
50
|
-
<chat-input-ui placeholder="Message…" submit-on-enter></chat-input-ui>
|
|
51
|
-
</chat-composer>
|
|
52
|
-
</chat-shell></code-ui>
|
|
53
|
-
</section>
|
|
54
|
-
|
|
55
|
-
<section data-section>
|
|
56
|
-
<h2 variant="section">State as attribute</h2>
|
|
57
|
-
<p>Every queryable state is reflected on the relevant child element. Style cross-cuts via <code>:has()</code>:</p>
|
|
58
|
-
<code-ui language="css">/* Subtle indicator while LLM is streaming */
|
|
59
|
-
chat-shell:has(chat-thread[streaming]) chat-header {
|
|
60
|
-
/* … */
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/* Disable composer style during streaming */
|
|
64
|
-
chat-shell:has(chat-composer[disabled]) {
|
|
65
|
-
/* … */
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/* Empty-state visibility — driven automatically */
|
|
69
|
-
chat-thread:not([empty]) > chat-empty {
|
|
70
|
-
display: none;
|
|
71
|
-
}</code-ui>
|
|
72
|
-
<p data-note>JS reads the same attributes — <code>shell.querySelector('chat-thread').streaming</code>. The host (<code><chat-shell></code>) propagates <code>[streaming]</code> to the bespoke <code><chat-thread></code> child automatically when an LLM response is in flight.</p>
|
|
73
|
-
</section>
|
|
74
|
-
|
|
75
|
-
<section data-section>
|
|
76
|
-
<h2 variant="section">Properties</h2>
|
|
77
|
-
<table>
|
|
78
|
-
<thead><tr><th>Prop</th><th>Type</th><th>Default</th><th>Description</th></tr></thead>
|
|
79
|
-
<tbody>
|
|
80
|
-
<tr><td><code>provider</code></td><td>string</td><td>—</td><td>LLM provider name: <code>anthropic | openai | google | stub</code>.</td></tr>
|
|
81
|
-
<tr><td><code>model</code></td><td>string</td><td>—</td><td>Model identifier (e.g. <code>claude-sonnet-4-7</code>, <code>gpt-4o</code>, <code>gemini-1.5-pro</code>).</td></tr>
|
|
82
|
-
<tr><td><code>system</code></td><td>string</td><td>—</td><td>System prompt prepended to conversations.</td></tr>
|
|
83
|
-
<tr><td><code>proxy-url</code></td><td>string</td><td>—</td><td>API proxy endpoint for LLM calls; enables self-contained chat without external submit handler.</td></tr>
|
|
84
|
-
<tr><td><code>thinking</code></td><td>boolean</td><td><code>false</code></td><td>Enable Anthropic extended-thinking mode.</td></tr>
|
|
85
|
-
<tr><td><code>streaming</code></td><td>boolean</td><td>—</td><td>Reflected — set while a response is streaming.</td></tr>
|
|
86
|
-
</tbody>
|
|
87
|
-
</table>
|
|
88
|
-
</section>
|
|
89
|
-
|
|
90
|
-
<section data-section>
|
|
91
|
-
<h2 variant="section">Events</h2>
|
|
92
|
-
<table>
|
|
93
|
-
<thead><tr><th>Event</th><th>Detail</th></tr></thead>
|
|
94
|
-
<tbody>
|
|
95
|
-
<tr><td><code>submit</code></td><td><code>{ text, model }</code> — fired on user message submit before LLM call begins.</td></tr>
|
|
96
|
-
<tr><td><code>chunk</code></td><td><code>{ text, role }</code> — fired for each streaming chunk.</td></tr>
|
|
97
|
-
<tr><td><code>complete</code></td><td><code>{ text }</code> — fired when streaming finishes.</td></tr>
|
|
98
|
-
<tr><td><code>error</code></td><td><code>{ error }</code> — fired on LLM call failures.</td></tr>
|
|
99
|
-
</tbody>
|
|
100
|
-
</table>
|
|
101
|
-
</section>
|
|
102
|
-
|
|
103
|
-
<section data-section>
|
|
104
|
-
<h2 variant="section">Behavior wiring</h2>
|
|
105
|
-
<table>
|
|
106
|
-
<thead><tr><th>Affordance</th><th>Author markup</th><th>What the shell does</th></tr></thead>
|
|
107
|
-
<tbody>
|
|
108
|
-
<tr><td>Message stream</td><td><code>[data-chat-messages]</code></td><td>Each LLM chunk appended; markdown rendered; <code>code-ui</code> upgraded for code blocks.</td></tr>
|
|
109
|
-
<tr><td>Input submit</td><td><code>[data-chat-input]</code> containing an <code><input-ui></code></td><td>Listens for input's submit event; calls LLM via <code>proxy-url</code> or fires <code>submit</code> for external handler.</td></tr>
|
|
110
|
-
<tr><td>Empty state</td><td><code>[data-chat-empty]</code></td><td>Hidden when messages are present; shown when empty.</td></tr>
|
|
111
|
-
<tr><td>Status indicator</td><td><code>[data-chat-status]</code></td><td>Updated with streaming/idle text.</td></tr>
|
|
112
|
-
</tbody>
|
|
113
|
-
</table>
|
|
114
|
-
</section>
|
|
115
|
-
|
|
116
|
-
<section data-section>
|
|
117
|
-
<h2 variant="section">Family pattern (forward-looking)</h2>
|
|
118
|
-
<p>Per <a href="../../../../.brain/adrs/0023-bespoke-shell-tier-children.md">ADR-0023</a>, future releases extend the bespoke-children family to the chat cluster. Planned children:</p>
|
|
119
|
-
<ul data-features>
|
|
120
|
-
<li><code><chat-thread></code> — replaces <code>[data-chat-messages]</code>; owns scroll-to-bottom, virtualization, message render</li>
|
|
121
|
-
<li><code><chat-composer></code> — replaces <code>[data-chat-input]</code>; owns file attach, autocomplete, submit-on-enter</li>
|
|
122
|
-
<li><code><chat-message></code> + <code><chat-message-list></code> — message-tier semantic markup</li>
|
|
123
|
-
<li><code><chat-sidebar></code> — conversation history rail (mirrors <code><admin-sidebar></code>)</li>
|
|
124
|
-
</ul>
|
|
125
|
-
<p data-note>Today's <code>data-*</code> shape is fully supported and will continue to work alongside the bespoke vocabulary when it lands.</p>
|
|
126
|
-
</section>
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en" data-theme="auto">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
-
<title>Chat Shell — AdiaUI</title>
|
|
7
|
-
|
|
8
|
-
<link rel="stylesheet" href="../../../web-components/styles/resets.css">
|
|
9
|
-
<link rel="stylesheet" href="../../../web-components/styles/tokens.css">
|
|
10
|
-
<link rel="stylesheet" href="./chat-shell.css">
|
|
11
|
-
<link rel="stylesheet" href="../../../web-components/components/code/code.css">
|
|
12
|
-
<link rel="stylesheet" href="../../../web-components/components/tag/tag.css">
|
|
13
|
-
|
|
14
|
-
<script type="module" src="./chat-shell.js"></script>
|
|
15
|
-
<script type="module" src="../../../web-components/components/code/code.js"></script>
|
|
16
|
-
<script type="module" src="../../../web-components/components/tag/tag.js"></script>
|
|
17
|
-
|
|
18
|
-
<style>
|
|
19
|
-
:where(html, body) { margin: 0; min-height: 100vh; background: var(--a-bg); color: var(--a-fg); font-family: var(--a-font); }
|
|
20
|
-
main { max-width: 960px; margin-inline: auto; padding: var(--a-space-6) var(--a-space-5); }
|
|
21
|
-
</style>
|
|
22
|
-
</head>
|
|
23
|
-
<body>
|
|
24
|
-
|
|
25
|
-
<main id="demo-root">
|
|
26
|
-
<p>Loading examples…</p>
|
|
27
|
-
</main>
|
|
28
|
-
|
|
29
|
-
<script type="module">
|
|
30
|
-
const root = document.getElementById('demo-root');
|
|
31
|
-
try {
|
|
32
|
-
const res = await fetch('./chat-shell.examples.html');
|
|
33
|
-
if (!res.ok) throw new Error(`fetch failed (${res.status})`);
|
|
34
|
-
root.innerHTML = await res.text();
|
|
35
|
-
} catch (err) {
|
|
36
|
-
root.innerHTML = `<p style="color:var(--a-danger-strong);">Failed to load chat-shell.examples.html — ${err.message}</p>`;
|
|
37
|
-
console.error('[chat-shell.html]', err);
|
|
38
|
-
}
|
|
39
|
-
</script>
|
|
40
|
-
|
|
41
|
-
</body>
|
|
42
|
-
</html>
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
<header>
|
|
2
|
-
<div>
|
|
3
|
-
<h1>Chat Sidebar</h1>
|
|
4
|
-
<div data-actions>
|
|
5
|
-
<tag-ui size="sm">chat-sidebar</tag-ui>
|
|
6
|
-
<tag-ui size="sm" variant="ghost">JS-bearing</tag-ui>
|
|
7
|
-
</div>
|
|
8
|
-
</div>
|
|
9
|
-
<p>Module-tier chat-cluster sidebar — mirrors admin-sidebar (resize + collapse + persist), cluster-namespaced for the chat family.</p>
|
|
10
|
-
</header>
|
|
11
|
-
|
|
12
|
-
<section data-section>
|
|
13
|
-
<h2 variant="section">Role</h2>
|
|
14
|
-
<p>Mirrors <code><admin-sidebar></code> — resize drag, snap-to-collapsed, localStorage persistence, ResizeObserver. Cluster-namespaced for the chat family. JS-bearing.</p>
|
|
15
|
-
</section>
|
|
16
|
-
|
|
17
|
-
<section data-section>
|
|
18
|
-
<h2 variant="section">Composition</h2>
|
|
19
|
-
<p>Typical placement inside <code><chat-shell></code>:</p>
|
|
20
|
-
<code-ui language="html"><chat-shell>
|
|
21
|
-
<chat-sidebar slot="leading" resizable collapsible>
|
|
22
|
-
<chat-header slot="header">
|
|
23
|
-
<span slot="name">Conversations</span>
|
|
24
|
-
</chat-header>
|
|
25
|
-
<list-ui>…conversation history…</list-ui>
|
|
26
|
-
<div data-resize></div>
|
|
27
|
-
</chat-sidebar>
|
|
28
|
-
<chat-thread>…</chat-thread>
|
|
29
|
-
<chat-composer>…</chat-composer>
|
|
30
|
-
</chat-shell></code-ui>
|
|
31
|
-
</section>
|
|
32
|
-
|
|
33
|
-
<section data-section>
|
|
34
|
-
<h2 variant="section">Family</h2>
|
|
35
|
-
<p>Per <a href="../../../../.brain/adrs/0023-bespoke-shell-tier-children.md">ADR-0023</a>, the chat cluster's bespoke family — <code><chat-shell></code> (host), <code><chat-thread></code>, <code><chat-composer></code>, <code><chat-sidebar></code> (JS-bearing) + <code><chat-header></code>, <code><chat-status></code>, <code><chat-empty></code> (CSS-only). Mirrors the admin cluster's pattern.</p>
|
|
36
|
-
</section>
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en" data-theme="auto">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
-
<title>Chat Sidebar — AdiaUI</title>
|
|
7
|
-
|
|
8
|
-
<link rel="stylesheet" href="../../../web-components/styles/resets.css">
|
|
9
|
-
<link rel="stylesheet" href="../../../web-components/styles/tokens.css">
|
|
10
|
-
<link rel="stylesheet" href="../chat-shell/chat-shell.css">
|
|
11
|
-
<link rel="stylesheet" href="../../../web-components/components/code/code.css">
|
|
12
|
-
<link rel="stylesheet" href="../../../web-components/components/tag/tag.css">
|
|
13
|
-
|
|
14
|
-
<script type="module" src="../chat-shell/chat-shell.js"></script>
|
|
15
|
-
<script type="module" src="./chat-sidebar.js"></script>
|
|
16
|
-
<script type="module" src="../../../web-components/components/code/code.js"></script>
|
|
17
|
-
<script type="module" src="../../../web-components/components/tag/tag.js"></script>
|
|
18
|
-
|
|
19
|
-
<style>
|
|
20
|
-
:where(html, body) { margin: 0; min-height: 100vh; background: var(--a-bg); color: var(--a-fg); font-family: var(--a-font); }
|
|
21
|
-
main { max-width: 960px; margin-inline: auto; padding: var(--a-space-6) var(--a-space-5); }
|
|
22
|
-
</style>
|
|
23
|
-
</head>
|
|
24
|
-
<body>
|
|
25
|
-
|
|
26
|
-
<main id="demo-root">
|
|
27
|
-
<p>Loading examples…</p>
|
|
28
|
-
</main>
|
|
29
|
-
|
|
30
|
-
<script type="module">
|
|
31
|
-
const root = document.getElementById('demo-root');
|
|
32
|
-
try {
|
|
33
|
-
const res = await fetch('./chat-sidebar.examples.html');
|
|
34
|
-
if (!res.ok) throw new Error(`fetch failed (${res.status})`);
|
|
35
|
-
root.innerHTML = await res.text();
|
|
36
|
-
} catch (err) {
|
|
37
|
-
root.innerHTML = `<p style="color:var(--a-danger-strong);">Failed to load chat-sidebar.examples.html — ${err.message}</p>`;
|
|
38
|
-
console.error('[chat-sidebar.html]', err);
|
|
39
|
-
}
|
|
40
|
-
</script>
|
|
41
|
-
|
|
42
|
-
</body>
|
|
43
|
-
</html>
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
<header>
|
|
2
|
-
<div>
|
|
3
|
-
<h1>Chat Status</h1>
|
|
4
|
-
<div data-actions>
|
|
5
|
-
<tag-ui size="sm">chat-status</tag-ui>
|
|
6
|
-
<tag-ui size="sm" variant="ghost">CSS-only</tag-ui>
|
|
7
|
-
</div>
|
|
8
|
-
</div>
|
|
9
|
-
<p>Module-tier chat status indicator. CSS-only. Inline content for connection/streaming state.</p>
|
|
10
|
-
</header>
|
|
11
|
-
|
|
12
|
-
<section data-section>
|
|
13
|
-
<h2 variant="section">Role</h2>
|
|
14
|
-
<p>Inline status indicator. Pure CSS-only stub. Authors set content directly; the host's streaming pipeline updates innerText.</p>
|
|
15
|
-
</section>
|
|
16
|
-
|
|
17
|
-
<section data-section>
|
|
18
|
-
<h2 variant="section">Composition</h2>
|
|
19
|
-
<p>Typical placement inside <code><chat-shell></code>:</p>
|
|
20
|
-
<code-ui language="html"><chat-status>
|
|
21
|
-
<icon-ui name="circle-fill" style="color: var(--a-success)"></icon-ui>
|
|
22
|
-
<span>Connected</span>
|
|
23
|
-
</chat-status></code-ui>
|
|
24
|
-
</section>
|
|
25
|
-
|
|
26
|
-
<section data-section>
|
|
27
|
-
<h2 variant="section">Family</h2>
|
|
28
|
-
<p>Per <a href="../../../../.brain/adrs/0023-bespoke-shell-tier-children.md">ADR-0023</a>, the chat cluster's bespoke family — <code><chat-shell></code> (host), <code><chat-thread></code>, <code><chat-composer></code>, <code><chat-sidebar></code> (JS-bearing) + <code><chat-header></code>, <code><chat-status></code>, <code><chat-empty></code> (CSS-only). Mirrors the admin cluster's pattern.</p>
|
|
29
|
-
</section>
|