@adia-ai/web-components 0.0.2 → 0.0.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.
- package/README.md +29 -22
- package/a2ui/index.js +23 -17
- package/components/accordion/accordion.js +1 -1
- package/components/action-list/action-list.js +1 -1
- package/components/agent-artifact/agent-artifact.js +1 -1
- package/components/agent-feedback-bar/agent-feedback-bar.js +1 -1
- package/components/agent-questions/agent-questions.js +1 -1
- package/components/agent-reasoning/agent-reasoning.js +1 -1
- package/components/agent-suggestions/agent-suggestions.js +1 -1
- package/components/agent-trace/agent-trace.js +1 -1
- package/components/alert/alert.js +1 -1
- package/components/avatar/avatar.js +1 -1
- package/components/badge/badge.js +1 -1
- package/components/block/block.js +1 -1
- package/components/breadcrumb/breadcrumb.js +1 -1
- package/components/button/button.js +2 -2
- package/components/calendar-picker/calendar-picker.js +2 -2
- package/components/canvas/canvas.js +2 -2
- package/components/card/card.js +2 -2
- package/components/chart/chart.js +1 -1
- package/components/chat/chat-input.js +1 -1
- package/components/chat/chat.css +1 -2
- package/components/chat/chat.js +2 -2
- package/components/check/check.js +2 -2
- package/components/code/code.css +2 -0
- package/components/code/code.js +1 -1
- package/components/col/col.js +1 -1
- package/components/color-picker/color-picker.js +1 -1
- package/components/command/command.js +1 -1
- package/components/description-list/description-list.js +1 -1
- package/components/divider/divider.js +1 -1
- package/components/drawer/drawer.js +1 -1
- package/components/embed/embed.js +1 -1
- package/components/empty-state/empty-state.js +1 -1
- package/components/grid/grid.js +1 -1
- package/components/heatmap/heatmap.js +1 -1
- package/components/icon/icon.js +2 -2
- package/components/image/image.js +1 -1
- package/components/input/input.js +2 -2
- package/components/inspector/inspector.js +2 -2
- package/components/kbd/kbd.js +1 -1
- package/components/list/list.js +1 -1
- package/components/menu/menu.js +2 -2
- package/components/modal/modal.js +1 -1
- package/components/noodles/noodles.js +1 -1
- package/components/otp-input/otp-input.js +1 -1
- package/components/pagination/pagination.js +1 -1
- package/components/pane/pane.css +2 -2
- package/components/pane/pane.js +1 -1
- package/components/pipeline-status/pipeline-status.js +1 -1
- package/components/popover/popover.js +2 -2
- package/components/progress/progress.js +1 -1
- package/components/progress-row/progress-row.js +1 -1
- package/components/radio/radio.js +2 -2
- package/components/range/range.js +1 -1
- package/components/rating/rating.js +1 -1
- package/components/richtext/richtext.js +2 -2
- package/components/row/row.js +2 -2
- package/components/search/search.js +1 -1
- package/components/segment/segment.js +1 -1
- package/components/segmented/segmented.js +1 -1
- package/components/select/select.js +2 -2
- package/components/skeleton/skeleton.js +1 -1
- package/components/slider/slider.js +1 -1
- package/components/stack/stack.js +1 -1
- package/components/stat/stat.js +1 -1
- package/components/stepper/stepper.js +1 -1
- package/components/stream/stream.js +1 -1
- package/components/swiper/swiper.js +1 -1
- package/components/switch/switch.js +2 -2
- package/components/table/table.js +1 -1
- package/components/tabs/tab.js +1 -1
- package/components/tabs/tabs.js +1 -1
- package/components/tag/tag.js +1 -1
- package/components/text/text.js +1 -1
- package/components/textarea/textarea.js +1 -1
- package/components/timeline/timeline.js +1 -1
- package/components/toast/toast.js +1 -1
- package/components/toggle-group/toggle-group.js +1 -1
- package/components/toolbar/toolbar.js +2 -2
- package/components/tooltip/tooltip.js +2 -2
- package/components/tree/tree.js +1 -1
- package/components/upload/upload.js +1 -1
- package/core/markdown.js +1 -1
- package/core/provider.js +2 -2
- package/package.json +7 -3
- package/patterns/a2ui-root/a2ui-root.a2ui.json +118 -0
- package/{a2ui/root.js → patterns/a2ui-root/a2ui-root.js} +9 -4
- package/patterns/a2ui-root/a2ui-root.yaml +76 -0
- package/patterns/adia-chat/adia-chat.js +3 -3
- package/patterns/adia-chat/css/adia-chat.tokens.css +1 -1
- package/patterns/adia-editor/adia-editor.a2ui.json +12 -0
- package/patterns/adia-editor/adia-editor.js +1 -1
- package/patterns/adia-editor/adia-editor.yaml +17 -0
- package/patterns/adia-editor/css/adia-editor.layout.css +70 -3
- package/patterns/adia-editor/css/adia-editor.tokens.css +1 -1
- package/patterns/app-nav/app-nav.js +1 -1
- package/patterns/app-nav-group/app-nav-group.js +2 -2
- package/patterns/app-nav-item/app-nav-item.js +1 -1
- package/patterns/app-shell/app-shell.js +1 -1
- package/patterns/app-shell/css/app-shell.tokens.css +1 -1
- package/patterns/gen-ui/gen-ui.js +1 -1
- package/patterns/index.js +1 -0
- package/patterns/section-nav/section-nav.js +1 -1
- package/patterns/section-nav-group/section-nav-group.js +1 -1
- package/patterns/section-nav-item/section-nav-item.js +1 -1
- package/styles/tokens.css +12 -0
- package/traits/define.js +1 -1
- package/a2ui/dockables/action.js +0 -152
- package/a2ui/dockables/base.js +0 -30
- package/a2ui/dockables/controller.js +0 -97
- package/a2ui/dockables/data-source.js +0 -103
- package/a2ui/dockables/index.js +0 -6
- package/a2ui/dockables/lifecycle.js +0 -84
- package/a2ui/dockables/provider.js +0 -59
- package/a2ui/manifest-runtime.js +0 -226
- package/a2ui/registry.js +0 -200
- package/a2ui/renderer.js +0 -361
- package/a2ui/stream.js +0 -243
- package/a2ui/surface-manifest.js +0 -294
- package/a2ui/surface.js +0 -222
- package/a2ui/wire-factory.js +0 -134
- package/a2ui/wiring-engine.js +0 -209
- package/a2ui/wiring-registry.js +0 -342
- package/patterns/adia-chat/index.html +0 -93
- package/patterns/adia-editor/index.html +0 -179
- package/patterns/app-shell/index.html +0 -112
package/README.md
CHANGED
|
@@ -44,40 +44,45 @@ web-components/
|
|
|
44
44
|
│ ├── markdown.js lightweight markdown renderer
|
|
45
45
|
│ └── transport.js SSE / streaming helpers for LLM adapters
|
|
46
46
|
│
|
|
47
|
-
├── components/ — 80 *-
|
|
47
|
+
├── components/ — 80 *-ui custom elements
|
|
48
48
|
│ └── <tag>/
|
|
49
49
|
│ ├── <tag>.js class definition (extends AdiaElement)
|
|
50
50
|
│ ├── <tag>.css @scope(tag-ui) two-block: tokens + styles
|
|
51
51
|
│ ├── <tag>.yaml authoring contract (props, slots, events, examples)
|
|
52
52
|
│ └── <tag>.a2ui.json generated — do NOT edit
|
|
53
53
|
│
|
|
54
|
-
├── patterns/ — Higher-level compositions
|
|
55
|
-
│ ├── app-shell, app-nav
|
|
56
|
-
│ ├── adia-chat, adia-editor, gen-ui
|
|
57
|
-
│
|
|
54
|
+
├── patterns/ — Higher-level compositions
|
|
55
|
+
│ ├── app-shell, app-nav*, section-nav* — admin layout scaffolding
|
|
56
|
+
│ ├── adia-chat, adia-editor, gen-ui — LLM + editor + gen-UI patterns
|
|
57
|
+
│ ├── a2ui-root — A2UI declarative host (moved
|
|
58
|
+
│ │ from a2ui/ in 0.0.4; pairs
|
|
59
|
+
│ │ with @adia-ai/a2ui-utils)
|
|
60
|
+
│ └── index.js — registers all patterns
|
|
58
61
|
│
|
|
59
62
|
├── traits/ — 40 composable behaviors via defineTrait()
|
|
60
63
|
│ (pressable, focusTrap, confetti, resizable, …)
|
|
61
64
|
│
|
|
62
|
-
├── a2ui/ —
|
|
63
|
-
│
|
|
64
|
-
│
|
|
65
|
-
│
|
|
66
|
-
│
|
|
67
|
-
│
|
|
68
|
-
│
|
|
69
|
-
│ └── manifest-runtime.js surface manifest loader
|
|
65
|
+
├── a2ui/ — deprecation shim for one release
|
|
66
|
+
│ └── index.js Re-exports @adia-ai/a2ui-utils with a
|
|
67
|
+
│ one-time console.warn. Removed in 0.1.0.
|
|
68
|
+
│ All actual A2UI runtime code (renderer,
|
|
69
|
+
│ registry, streams, surface manifest,
|
|
70
|
+
│ wiring, dockables, controllers) lives in
|
|
71
|
+
│ `@adia-ai/a2ui-utils` at packages/a2ui/utils/.
|
|
70
72
|
│
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
│
|
|
77
|
-
└── scripts/ — Build + dev utilities
|
|
78
|
-
└── build-components.mjs YAML → .a2ui.json per-component
|
|
73
|
+
└── styles/ — Global tokens and CSS layering
|
|
74
|
+
├── tokens.css all --a-* design tokens
|
|
75
|
+
├── colors/ primitives / semantics / scrims
|
|
76
|
+
├── typography.css, space.css, radius.css, shadow.css
|
|
77
|
+
└── themes/*.css 8 themes (ocean, forest, sunset, …)
|
|
79
78
|
```
|
|
80
79
|
|
|
80
|
+
Build + dev utilities (including `build-a2ui-data.mjs`, `qa-training.mjs`,
|
|
81
|
+
`a2ui-to-html.cjs`, `mcp-call.cjs`, `mcp-pipeline.cjs`, `screenshot.cjs`)
|
|
82
|
+
live at the repo-root `scripts/` directory rather than inside this
|
|
83
|
+
package — they span the monorepo (MCP server, gen-ui-training data,
|
|
84
|
+
component catalog) and aren't scoped to web-components alone.
|
|
85
|
+
|
|
81
86
|
## Component contract
|
|
82
87
|
|
|
83
88
|
Every component is a single-file class extending `AdiaElement` (or
|
|
@@ -133,7 +138,9 @@ examples.
|
|
|
133
138
|
## A2UI runtime
|
|
134
139
|
|
|
135
140
|
```javascript
|
|
136
|
-
import { A2UIRenderer } from '@adia-ai/
|
|
141
|
+
import { A2UIRenderer } from '@adia-ai/a2ui-utils';
|
|
142
|
+
// (The old `@adia-ai/web-components/a2ui` subpath still resolves in 0.0.4
|
|
143
|
+
// via a deprecation shim that prints a console.warn; removed in 0.1.0.)
|
|
137
144
|
|
|
138
145
|
const renderer = new A2UIRenderer({ target: document.getElementById('canvas') });
|
|
139
146
|
renderer.apply({
|
package/a2ui/index.js
CHANGED
|
@@ -1,19 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export
|
|
1
|
+
/**
|
|
2
|
+
* DEPRECATED — the `@adia-ai/web-components/a2ui` subpath.
|
|
3
|
+
*
|
|
4
|
+
* The A2UI runtime was extracted into its own package `@adia-ai/a2ui-utils`
|
|
5
|
+
* in 0.0.4. This file is a temporary re-export shim for one release so
|
|
6
|
+
* existing consumers don't break on upgrade. It will be removed in 0.1.0.
|
|
7
|
+
*
|
|
8
|
+
* Migrate:
|
|
9
|
+
* - import { A2UIRenderer } from '@adia-ai/web-components/a2ui';
|
|
10
|
+
* + import { A2UIRenderer } from '@adia-ai/a2ui-utils';
|
|
11
|
+
*
|
|
12
|
+
* The declarative `<a2ui-root>` custom element also moved — it now lives
|
|
13
|
+
* in the patterns directory. Import it via:
|
|
14
|
+
* import '@adia-ai/web-components/patterns/a2ui-root/a2ui-root.js';
|
|
15
|
+
*/
|
|
6
16
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export
|
|
17
|
+
if (typeof console !== 'undefined' && !globalThis.__a2ui_subpath_warned) {
|
|
18
|
+
globalThis.__a2ui_subpath_warned = true;
|
|
19
|
+
console.warn(
|
|
20
|
+
'[@adia-ai/web-components] The `/a2ui` subpath export is deprecated and will be removed in 0.1.0. ' +
|
|
21
|
+
'Import from `@adia-ai/a2ui-utils` instead.'
|
|
22
|
+
);
|
|
23
|
+
}
|
|
11
24
|
|
|
12
|
-
|
|
13
|
-
export { A2UIValidator } from './validator.js';
|
|
14
|
-
export { A2UIGenerator } from './generator.js';
|
|
15
|
-
export { savePattern, importPattern, buildPatternJSON } from './pattern-export.js';
|
|
16
|
-
export * from './retrieval/index.js';
|
|
17
|
-
|
|
18
|
-
// Learning
|
|
19
|
-
export { feedbackStore } from './retrieval/feedback-store.js';
|
|
25
|
+
export * from '@adia-ai/a2ui-utils';
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* or activated via keyboard (Enter / Space). Keyboard nav: ArrowUp/Down, Home/End.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
import { AdiaElement } from '
|
|
18
|
+
import { AdiaElement } from '../../core/element.js';
|
|
19
19
|
|
|
20
20
|
class AdiaActionList extends AdiaElement {
|
|
21
21
|
static properties = {};
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
* questions-answer — detail: { selected: string[], option: chosen | null }
|
|
27
27
|
*/
|
|
28
28
|
|
|
29
|
-
import { AdiaElement } from '
|
|
29
|
+
import { AdiaElement } from '../../core/element.js';
|
|
30
30
|
|
|
31
31
|
class AdiaAgentQuestions extends AdiaElement {
|
|
32
32
|
static properties = {
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
* reasoning-finish — .finish() was called (detail: { summary, status })
|
|
46
46
|
*/
|
|
47
47
|
|
|
48
|
-
import { AdiaElement } from '
|
|
48
|
+
import { AdiaElement } from '../../core/element.js';
|
|
49
49
|
|
|
50
50
|
// Status lifecycle for the reasoning surface as a whole.
|
|
51
51
|
// active — still thinking (default; renders the spinner)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AdiaElement, signal, html } from '
|
|
2
|
-
import { getIcon } from '
|
|
1
|
+
import { AdiaElement, signal, html } from '../../core/element.js';
|
|
2
|
+
import { getIcon } from '../../core/icons.js';
|
|
3
3
|
|
|
4
4
|
class AdiaButton extends AdiaElement {
|
|
5
5
|
static properties = {
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
* Keyboard: Arrow keys navigate days, Enter selects, Escape closes.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
import { AdiaFormElement } from '
|
|
19
|
-
import { anchorPopover } from '
|
|
18
|
+
import { AdiaFormElement } from '../../core/form.js';
|
|
19
|
+
import { anchorPopover } from '../../core/anchor.js';
|
|
20
20
|
|
|
21
21
|
const DAYS = ['S', 'M', 'T', 'W', 'T', 'F', 'S'];
|
|
22
22
|
const MONTHS_SHORT = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
|
package/components/card/card.js
CHANGED
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
* draggable — enables drag handle + cursor:grab; wires the draggable trait
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
|
-
import { AdiaElement } from '
|
|
27
|
-
import { draggable } from '
|
|
26
|
+
import { AdiaElement } from '../../core/element.js';
|
|
27
|
+
import { draggable } from '../../traits/draggable.js';
|
|
28
28
|
|
|
29
29
|
class AdiaCard extends AdiaElement {
|
|
30
30
|
static properties = {
|
package/components/chat/chat.css
CHANGED
|
@@ -10,8 +10,7 @@
|
|
|
10
10
|
--chat-messages-padding: var(--a-space-4);
|
|
11
11
|
--chat-messages-gap: var(--a-space-3);
|
|
12
12
|
--chat-footer-padding: var(--a-space-3);
|
|
13
|
-
|
|
14
|
-
--chat-footer-min-height: 36px;
|
|
13
|
+
--chat-footer-min-height: var(--a-chrome-pane-footer-height);
|
|
15
14
|
|
|
16
15
|
/* ── Motion ── */
|
|
17
16
|
--chat-cursor-duration: 0.8s;
|
package/components/chat/chat.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AdiaElement } from '
|
|
2
|
-
import { renderMarkdown } from '
|
|
1
|
+
import { AdiaElement } from '../../core/element.js';
|
|
2
|
+
import { renderMarkdown } from '../../core/markdown.js';
|
|
3
3
|
|
|
4
4
|
function escapeHTML(s) {
|
|
5
5
|
return s.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* Pure CSS checkmark via border trick on [slot="box"]::after. No SVG.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { AdiaFormElement } from '
|
|
7
|
-
import { html } from '
|
|
6
|
+
import { AdiaFormElement } from '../../core/form.js';
|
|
7
|
+
import { html } from '../../core/element.js';
|
|
8
8
|
|
|
9
9
|
class AdiaCheck extends AdiaFormElement {
|
|
10
10
|
static properties = {
|
package/components/code/code.css
CHANGED
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
flex-direction: row;
|
|
46
46
|
align-items: center;
|
|
47
47
|
justify-content: space-between;
|
|
48
|
+
min-height: var(--a-chrome-pane-header-height);
|
|
48
49
|
padding: var(--code-py) var(--code-px);
|
|
49
50
|
background: var(--code-header-bg);
|
|
50
51
|
border-bottom: 1px solid var(--code-border);
|
|
@@ -112,6 +113,7 @@
|
|
|
112
113
|
flex-direction: row;
|
|
113
114
|
align-items: center;
|
|
114
115
|
justify-content: space-between;
|
|
116
|
+
min-height: var(--a-chrome-pane-footer-height);
|
|
115
117
|
padding: var(--code-py) var(--code-px);
|
|
116
118
|
background: var(--code-header-bg);
|
|
117
119
|
border-top: 1px solid var(--code-border);
|
package/components/code/code.js
CHANGED
package/components/col/col.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* Note: Uses 'heading' attribute instead of 'title' to avoid native tooltip.
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
import { AdiaElement } from '
|
|
12
|
+
import { AdiaElement } from '../../core/element.js';
|
|
13
13
|
|
|
14
14
|
class AdiaEmptyState extends AdiaElement {
|
|
15
15
|
static properties = {
|
package/components/grid/grid.js
CHANGED
package/components/icon/icon.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AdiaElement, signal, html } from '
|
|
2
|
-
import { getIcon } from '
|
|
1
|
+
import { AdiaElement, signal, html } from '../../core/element.js';
|
|
2
|
+
import { getIcon } from '../../core/icons.js';
|
|
3
3
|
|
|
4
4
|
class AdiaIcon extends AdiaElement {
|
|
5
5
|
static properties = {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* Raw: strips chrome (no background, no radius) for edge-to-edge rendering
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import { AdiaElement } from '
|
|
17
|
+
import { AdiaElement } from '../../core/element.js';
|
|
18
18
|
|
|
19
19
|
class AdiaImage extends AdiaElement {
|
|
20
20
|
static properties = {
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
* <input-ui placeholder="Search" prefix="search"></input-ui>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import { AdiaFormElement } from '
|
|
11
|
-
import { isIconName } from '
|
|
10
|
+
import { AdiaFormElement } from '../../core/form.js';
|
|
11
|
+
import { isIconName } from '../../core/icons.js';
|
|
12
12
|
|
|
13
13
|
const renderAffix = (v) => isIconName(v)
|
|
14
14
|
? `<icon-ui name="${v}"></icon-ui>`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AdiaElement } from '
|
|
2
|
-
import { registry } from '
|
|
1
|
+
import { AdiaElement } from '../../core/element.js';
|
|
2
|
+
import { registry } from '@adia-ai/a2ui-utils';
|
|
3
3
|
import '../tabs/tabs.js';
|
|
4
4
|
import '../tabs/tab.js';
|
|
5
5
|
import '../code/code.js';
|
package/components/kbd/kbd.js
CHANGED
package/components/list/list.js
CHANGED
package/components/menu/menu.js
CHANGED
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
* • Roving focus + arrow/Home/End/Enter/Escape keyboard nav.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
import { AdiaElement } from '
|
|
19
|
-
import { anchorPopover } from '
|
|
18
|
+
import { AdiaElement } from '../../core/element.js';
|
|
19
|
+
import { anchorPopover } from '../../core/anchor.js';
|
|
20
20
|
|
|
21
21
|
class AdiaMenu extends AdiaElement {
|
|
22
22
|
static properties = {
|
package/components/pane/pane.css
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
--pane-border: var(--a-border-subtle);
|
|
6
6
|
--pane-radius: var(--a-radius-lg);
|
|
7
7
|
/* Component-intrinsic measurement; no --a-space-* equivalent */
|
|
8
|
-
--pane-bar-height:
|
|
8
|
+
--pane-bar-height: var(--a-chrome-pane-header-height);
|
|
9
9
|
--pane-header-px: var(--a-space-3);
|
|
10
10
|
--pane-header-py: var(--a-space-2);
|
|
11
11
|
--pane-header-fg: var(--a-fg);
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
|
|
77
77
|
/* Collapse indicator — stamped by JS as icon-ui */
|
|
78
78
|
> header > [slot="chevron"] {
|
|
79
|
-
--a-icon-size:
|
|
79
|
+
--a-icon-size: var(--a-caret-size);
|
|
80
80
|
flex-shrink: 0;
|
|
81
81
|
margin-inline-start: auto;
|
|
82
82
|
color: var(--pane-chevron-fg);
|
package/components/pane/pane.js
CHANGED