@adia-ai/web-components 0.0.1 → 0.0.3
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/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.a2ui.json +14 -8
- package/components/agent-reasoning/agent-reasoning.css +1 -1
- package/components/agent-reasoning/agent-reasoning.js +9 -9
- package/components/agent-reasoning/agent-reasoning.yaml +9 -6
- 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.a2ui.json +0 -10
- package/components/avatar/avatar.css +1 -1
- package/components/avatar/avatar.js +1 -1
- package/components/avatar/avatar.yaml +0 -8
- package/components/badge/badge.a2ui.json +6 -6
- package/components/badge/badge.js +22 -1
- package/components/badge/badge.yaml +8 -5
- package/components/block/block.js +1 -1
- package/components/breadcrumb/breadcrumb.js +1 -1
- package/components/button/button.a2ui.json +0 -11
- package/components/button/button.css +1 -1
- package/components/button/button.js +3 -3
- package/components/button/button.yaml +0 -11
- package/components/calendar-picker/calendar-picker.js +25 -19
- package/components/canvas/canvas.js +3 -3
- package/components/card/card.a2ui.json +0 -21
- package/components/card/card.js +2 -2
- package/components/card/card.yaml +0 -14
- package/components/chart/chart.a2ui.json +9 -8
- package/components/chart/chart.js +1 -1
- package/components/chart/chart.yaml +7 -5
- package/components/chat/chat-input.js +1 -1
- package/components/chat/chat.js +2 -2
- package/components/check/check.css +1 -1
- package/components/check/check.js +2 -2
- package/components/code/code.a2ui.json +0 -5
- package/components/code/code.js +1 -1
- package/components/code/code.yaml +0 -4
- package/components/col/col.a2ui.json +0 -20
- package/components/col/col.js +1 -1
- package/components/col/col.yaml +0 -20
- package/components/color-picker/color-picker.a2ui.json +1 -1
- package/components/color-picker/color-picker.js +5 -2
- package/components/color-picker/color-picker.yaml +1 -1
- package/components/command/command.js +22 -11
- package/components/description-list/description-list.js +1 -1
- package/components/divider/divider.a2ui.json +0 -19
- package/components/divider/divider.js +1 -1
- package/components/divider/divider.yaml +0 -12
- package/components/drawer/drawer.a2ui.json +2 -2
- package/components/drawer/drawer.css +1 -1
- package/components/drawer/drawer.js +2 -2
- package/components/drawer/drawer.yaml +3 -3
- package/components/embed/embed.js +1 -1
- package/components/empty-state/empty-state.a2ui.json +0 -13
- package/components/empty-state/empty-state.js +1 -1
- package/components/empty-state/empty-state.yaml +0 -5
- package/components/footer/footer.a2ui.json +1 -1
- package/components/footer/footer.yaml +1 -1
- package/components/grid/grid.a2ui.json +0 -5
- package/components/grid/grid.js +1 -1
- package/components/grid/grid.yaml +0 -4
- package/components/header/header.a2ui.json +1 -1
- package/components/header/header.yaml +1 -1
- package/components/heatmap/heatmap.a2ui.json +4 -4
- package/components/heatmap/heatmap.js +4 -4
- package/components/heatmap/heatmap.yaml +4 -4
- package/components/icon/icon.a2ui.json +13 -0
- package/components/icon/icon.js +2 -2
- package/components/icon/icon.yaml +6 -0
- package/components/image/image.a2ui.json +10 -21
- package/components/image/image.js +1 -1
- package/components/image/image.yaml +8 -16
- package/components/input/input.a2ui.json +0 -15
- package/components/input/input.js +2 -2
- package/components/input/input.yaml +0 -12
- package/components/inspector/inspector.a2ui.json +0 -5
- package/components/inspector/inspector.js +2 -2
- package/components/inspector/inspector.yaml +0 -4
- package/components/kbd/kbd.js +1 -1
- package/components/list/list.a2ui.json +0 -33
- package/components/list/list.js +1 -1
- package/components/list/list.yaml +0 -27
- package/components/menu/menu.a2ui.json +0 -10
- package/components/menu/menu.js +9 -3
- package/components/menu/menu.yaml +0 -8
- package/components/modal/modal.a2ui.json +1 -25
- package/components/modal/modal.js +1 -1
- package/components/modal/modal.yaml +1 -22
- package/components/noodles/noodles.a2ui.json +0 -5
- package/components/noodles/noodles.js +1 -1
- package/components/noodles/noodles.yaml +0 -5
- package/components/otp-input/otp-input.a2ui.json +0 -5
- package/components/otp-input/otp-input.js +1 -1
- package/components/otp-input/otp-input.yaml +0 -4
- package/components/pagination/pagination.a2ui.json +3 -13
- package/components/pagination/pagination.css +1 -1
- package/components/pagination/pagination.js +1 -1
- package/components/pagination/pagination.yaml +5 -14
- package/components/pane/pane.a2ui.json +0 -10
- package/components/pane/pane.js +1 -1
- package/components/pane/pane.yaml +0 -9
- package/components/pipeline-status/pipeline-status.js +1 -1
- package/components/popover/popover.a2ui.json +0 -14
- package/components/popover/popover.js +9 -3
- package/components/popover/popover.yaml +0 -11
- package/components/progress/progress.a2ui.json +2 -12
- package/components/progress/progress.js +1 -1
- package/components/progress/progress.yaml +2 -11
- package/components/progress-row/progress-row.a2ui.json +3 -13
- package/components/progress-row/progress-row.js +1 -1
- package/components/progress-row/progress-row.yaml +3 -11
- package/components/radio/radio.css +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.a2ui.json +0 -5
- package/components/row/row.js +2 -2
- package/components/row/row.yaml +0 -4
- package/components/search/search.a2ui.json +0 -5
- package/components/search/search.js +1 -1
- package/components/search/search.yaml +0 -4
- package/components/section/section.a2ui.json +1 -1
- package/components/section/section.yaml +1 -1
- package/components/segment/segment.js +1 -1
- package/components/segmented/segmented.css +1 -1
- package/components/segmented/segmented.js +1 -1
- package/components/select/select.a2ui.json +5 -0
- package/components/select/select.js +13 -3
- package/components/select/select.yaml +5 -0
- package/components/skeleton/skeleton.a2ui.json +0 -11
- package/components/skeleton/skeleton.js +1 -1
- package/components/skeleton/skeleton.yaml +0 -5
- package/components/slider/slider.a2ui.json +0 -5
- package/components/slider/slider.js +1 -1
- package/components/slider/slider.yaml +0 -5
- 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.a2ui.json +7 -7
- package/components/swiper/swiper.js +2 -2
- package/components/swiper/swiper.yaml +8 -6
- package/components/switch/switch.css +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.a2ui.json +0 -5
- package/components/tag/tag.js +1 -1
- package/components/tag/tag.yaml +0 -4
- package/components/text/text.a2ui.json +5 -0
- package/components/text/text.css +2 -2
- package/components/text/text.js +1 -1
- package/components/text/text.yaml +5 -0
- package/components/textarea/textarea.js +1 -1
- package/components/timeline/timeline.a2ui.json +8 -13
- package/components/timeline/timeline.js +1 -1
- package/components/timeline/timeline.yaml +6 -11
- package/components/toast/toast.a2ui.json +0 -15
- package/components/toast/toast.js +1 -1
- package/components/toast/toast.yaml +0 -13
- package/components/toggle-group/toggle-group.js +1 -1
- package/components/toolbar/toolbar.a2ui.json +0 -23
- package/components/toolbar/toolbar.js +13 -3
- package/components/toolbar/toolbar.yaml +0 -19
- package/components/tooltip/tooltip.a2ui.json +0 -10
- package/components/tooltip/tooltip.js +2 -2
- package/components/tooltip/tooltip.yaml +0 -8
- 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.streaming.css +2 -2
- package/patterns/adia-editor/adia-editor.js +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/gen-ui/gen-ui.css +3 -3
- 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/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/a2ui/manifest-runtime.js
DELETED
|
@@ -1,226 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Manifest Runtime — Loads a surface manifest and manages cross-surface
|
|
3
|
-
* navigation, data flow, context sharing, and lifecycle dependencies.
|
|
4
|
-
*
|
|
5
|
-
* Bridges A008 (design-time manifest) to A007 (per-surface wiring engine).
|
|
6
|
-
* Consumes a SurfaceManifest and orchestrates the live application.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
import { sharedContextStore } from './context-store.js';
|
|
10
|
-
import { resolveData } from './wiring-registry.js';
|
|
11
|
-
|
|
12
|
-
export class ManifestRuntime {
|
|
13
|
-
/** @type {import('./surface-manifest.js').SurfaceManifest} */
|
|
14
|
-
#manifest;
|
|
15
|
-
|
|
16
|
-
/** @type {Map<string, { mounted: boolean, completed: boolean }>} */
|
|
17
|
-
#surfaceState = new Map();
|
|
18
|
-
|
|
19
|
-
/** @type {Map<string, Function[]>} */
|
|
20
|
-
#triggerListeners = new Map();
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* @param {import('./surface-manifest.js').SurfaceManifest} manifest
|
|
24
|
-
*/
|
|
25
|
-
constructor(manifest) {
|
|
26
|
-
this.#manifest = manifest;
|
|
27
|
-
this.#initSharedContexts();
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Initialize shared contexts from the manifest.
|
|
32
|
-
*/
|
|
33
|
-
#initSharedContexts() {
|
|
34
|
-
const json = this.#manifest.toJSON();
|
|
35
|
-
if (json.sharedContexts) {
|
|
36
|
-
for (const [name, config] of Object.entries(json.sharedContexts)) {
|
|
37
|
-
sharedContextStore.define(name, config);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Signal that a surface has mounted (rendered and wired).
|
|
44
|
-
* Joins shared contexts and checks lifecycle dependencies.
|
|
45
|
-
*
|
|
46
|
-
* @param {string} surfaceId
|
|
47
|
-
* @param {Record<string, string>} [params] — Resolved route params
|
|
48
|
-
*/
|
|
49
|
-
async onSurfaceMount(surfaceId, params = {}) {
|
|
50
|
-
this.#surfaceState.set(surfaceId, { mounted: true, completed: false });
|
|
51
|
-
|
|
52
|
-
// Join shared contexts
|
|
53
|
-
const descriptor = this.#manifest.getSurface(surfaceId);
|
|
54
|
-
if (descriptor?.consumes) {
|
|
55
|
-
for (const contextName of Object.keys(descriptor.consumes)) {
|
|
56
|
-
await sharedContextStore.join(contextName, surfaceId, resolveData, params);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
// Check depends-on: if this surface depends on another, verify it's ready
|
|
61
|
-
const deps = this.#manifest.getAssociationsTo(surfaceId, 'depends-on');
|
|
62
|
-
for (const dep of deps) {
|
|
63
|
-
const depState = this.#surfaceState.get(dep.from);
|
|
64
|
-
const condition = dep.condition || 'mounted';
|
|
65
|
-
|
|
66
|
-
let satisfied = false;
|
|
67
|
-
if (condition === 'mounted') satisfied = depState?.mounted === true;
|
|
68
|
-
if (condition === 'completed') satisfied = depState?.completed === true;
|
|
69
|
-
if (condition === 'has-data') satisfied = this.#hasContextData(surfaceId);
|
|
70
|
-
|
|
71
|
-
if (!satisfied && dep.fallback) {
|
|
72
|
-
this.#executeFallback(dep.fallback, params);
|
|
73
|
-
return false; // Surface should not proceed
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
return true;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* Signal that a surface has unmounted.
|
|
82
|
-
*
|
|
83
|
-
* @param {string} surfaceId
|
|
84
|
-
*/
|
|
85
|
-
onSurfaceUnmount(surfaceId) {
|
|
86
|
-
this.#surfaceState.set(surfaceId, { mounted: false, completed: false });
|
|
87
|
-
|
|
88
|
-
// Leave shared contexts
|
|
89
|
-
const descriptor = this.#manifest.getSurface(surfaceId);
|
|
90
|
-
if (descriptor?.consumes) {
|
|
91
|
-
for (const contextName of Object.keys(descriptor.consumes)) {
|
|
92
|
-
sharedContextStore.leave(contextName, surfaceId);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* Signal that a surface's primary action completed (e.g., form submitted).
|
|
99
|
-
* Fires cross-surface triggers.
|
|
100
|
-
*
|
|
101
|
-
* @param {string} surfaceId
|
|
102
|
-
* @param {string} actionName — The action that completed (e.g., "submit-checkin")
|
|
103
|
-
* @param {unknown} [result] — The action's return value
|
|
104
|
-
*/
|
|
105
|
-
async onActionComplete(surfaceId, actionName, result) {
|
|
106
|
-
const state = this.#surfaceState.get(surfaceId);
|
|
107
|
-
if (state) state.completed = true;
|
|
108
|
-
|
|
109
|
-
const trigger = `action:${actionName}`;
|
|
110
|
-
|
|
111
|
-
// Process routes-to associations
|
|
112
|
-
const routes = this.#manifest.getAssociationsFrom(surfaceId, 'routes-to')
|
|
113
|
-
.filter(a => a.trigger === trigger);
|
|
114
|
-
for (const route of routes) {
|
|
115
|
-
const target = this.#manifest.getSurface(route.to);
|
|
116
|
-
if (target?.route) {
|
|
117
|
-
let path = target.route;
|
|
118
|
-
const params = this.#resolveAssocParams(route.params, result);
|
|
119
|
-
for (const [key, value] of Object.entries(params)) {
|
|
120
|
-
path = path.replace(`:${key}`, encodeURIComponent(value));
|
|
121
|
-
}
|
|
122
|
-
location.hash = path;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
// Process feeds associations
|
|
127
|
-
const feeds = this.#manifest.getAssociationsFrom(surfaceId, 'feeds')
|
|
128
|
-
.filter(a => a.trigger === trigger);
|
|
129
|
-
for (const feed of feeds) {
|
|
130
|
-
if (feed.mapping) {
|
|
131
|
-
for (const [targetPath, source] of Object.entries(feed.mapping)) {
|
|
132
|
-
let value;
|
|
133
|
-
if (source.from === 'action-result') value = result;
|
|
134
|
-
else if (source.from === 'context') value = sharedContextStore.read(source.context, source.key);
|
|
135
|
-
else if (source.from === 'literal') value = source.value;
|
|
136
|
-
|
|
137
|
-
// Store for the target surface to consume when it mounts
|
|
138
|
-
sharedContextStore.update(`__feed_${feed.to}`, { [targetPath]: value });
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
// Process triggers associations
|
|
144
|
-
const triggers = this.#manifest.getAssociationsFrom(surfaceId, 'triggers')
|
|
145
|
-
.filter(a => a.trigger === trigger);
|
|
146
|
-
for (const trig of triggers) {
|
|
147
|
-
this.#executeTriggerEffect(trig.to, trig.effect, result);
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
/**
|
|
152
|
-
* Get navigation targets from a surface.
|
|
153
|
-
* @param {string} surfaceId
|
|
154
|
-
* @returns {{ surfaceId: string, route: string, trigger: string }[]}
|
|
155
|
-
*/
|
|
156
|
-
getNavigationTargets(surfaceId) {
|
|
157
|
-
return this.#manifest.getAssociationsFrom(surfaceId, 'routes-to')
|
|
158
|
-
.map(a => ({
|
|
159
|
-
surfaceId: a.to,
|
|
160
|
-
route: this.#manifest.getSurface(a.to)?.route || '',
|
|
161
|
-
trigger: a.trigger || '',
|
|
162
|
-
}));
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
/**
|
|
166
|
-
* Get the manifest.
|
|
167
|
-
*/
|
|
168
|
-
get manifest() { return this.#manifest; }
|
|
169
|
-
|
|
170
|
-
// ── Internal ──
|
|
171
|
-
|
|
172
|
-
#hasContextData(surfaceId) {
|
|
173
|
-
const descriptor = this.#manifest.getSurface(surfaceId);
|
|
174
|
-
if (!descriptor?.consumes) return true;
|
|
175
|
-
for (const contextName of Object.keys(descriptor.consumes)) {
|
|
176
|
-
if (!sharedContextStore.isPopulated(contextName)) return false;
|
|
177
|
-
}
|
|
178
|
-
return true;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
#executeFallback(fallback, params) {
|
|
182
|
-
if (fallback.startsWith('redirect:')) {
|
|
183
|
-
const targetId = fallback.slice('redirect:'.length);
|
|
184
|
-
const target = this.#manifest.getSurface(targetId);
|
|
185
|
-
if (target?.route) {
|
|
186
|
-
let path = target.route;
|
|
187
|
-
for (const [key, value] of Object.entries(params)) {
|
|
188
|
-
path = path.replace(`:${key}`, encodeURIComponent(value));
|
|
189
|
-
}
|
|
190
|
-
location.hash = path;
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
// Other fallbacks: show-error, wait (future)
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
#resolveAssocParams(paramSpec, actionResult) {
|
|
197
|
-
const params = {};
|
|
198
|
-
if (!paramSpec) return params;
|
|
199
|
-
for (const [name, spec] of Object.entries(paramSpec)) {
|
|
200
|
-
if (spec.from === 'event-detail' || spec.from === 'action-result') {
|
|
201
|
-
params[name] = spec.key ? actionResult?.[spec.key] : actionResult;
|
|
202
|
-
} else if (spec.from === 'param') {
|
|
203
|
-
// Read from current route
|
|
204
|
-
const hash = location.hash.slice(1);
|
|
205
|
-
const match = hash.match(new RegExp(`${spec.key}/([^/]+)`));
|
|
206
|
-
if (match) params[name] = match[1];
|
|
207
|
-
} else if (spec.from === 'literal') {
|
|
208
|
-
params[name] = spec.value;
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
return params;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
#executeTriggerEffect(targetSurfaceId, effect, data) {
|
|
215
|
-
if (!effect) return;
|
|
216
|
-
|
|
217
|
-
// Dispatch as a custom event that the target surface can listen for
|
|
218
|
-
document.dispatchEvent(new CustomEvent('a2ui-trigger', {
|
|
219
|
-
detail: {
|
|
220
|
-
targetSurface: targetSurfaceId,
|
|
221
|
-
effect,
|
|
222
|
-
data,
|
|
223
|
-
},
|
|
224
|
-
}));
|
|
225
|
-
}
|
|
226
|
-
}
|
package/a2ui/registry.js
DELETED
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A2UI Registry — maps A2UI type names to AdiaUI custom element tag names.
|
|
3
|
-
*
|
|
4
|
-
* Usage:
|
|
5
|
-
* import { registry, resolveTag } from './registry.js';
|
|
6
|
-
* resolveTag('Button') // → 'button-ui'
|
|
7
|
-
* resolveTag('ChoicePicker') // → 'select-ui'
|
|
8
|
-
* resolveTag('Toggle') // → 'switch-ui'
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
export const registry = new Map([
|
|
12
|
-
|
|
13
|
-
// ══════════════════════════════════════════════════════
|
|
14
|
-
// A2UI Protocol Types (standard catalog)
|
|
15
|
-
// ══════════════════════════════════════════════════════
|
|
16
|
-
|
|
17
|
-
// Layout
|
|
18
|
-
['Row', 'row-ui'],
|
|
19
|
-
['Column', 'col-ui'],
|
|
20
|
-
['List', 'list-ui'],
|
|
21
|
-
['Grid', 'grid-ui'],
|
|
22
|
-
['Stack', 'stack-ui'],
|
|
23
|
-
['Block', 'block-ui'],
|
|
24
|
-
|
|
25
|
-
// Display
|
|
26
|
-
['Text', 'text-ui'],
|
|
27
|
-
['Image', 'image-ui'],
|
|
28
|
-
['Icon', 'icon-ui'],
|
|
29
|
-
['Divider', 'divider-ui'],
|
|
30
|
-
['Badge', 'badge-ui'],
|
|
31
|
-
['Avatar', 'avatar-ui'],
|
|
32
|
-
['AvatarGroup', 'avatar-group-ui'],
|
|
33
|
-
['Progress', 'progress-ui'],
|
|
34
|
-
['Skeleton', 'skeleton-ui'],
|
|
35
|
-
['Code', 'code-ui'],
|
|
36
|
-
['Stat', 'stat-ui'],
|
|
37
|
-
['EmptyState', 'empty-state-ui'],
|
|
38
|
-
|
|
39
|
-
// Input
|
|
40
|
-
['Input', 'input-ui'],
|
|
41
|
-
['TextField', 'input-ui'],
|
|
42
|
-
['TextArea', 'textarea-ui'],
|
|
43
|
-
['CheckBox', 'check-ui'],
|
|
44
|
-
['Toggle', 'switch-ui'],
|
|
45
|
-
['Switch', 'switch-ui'],
|
|
46
|
-
['Slider', 'slider-ui'],
|
|
47
|
-
['Range', 'range-ui'],
|
|
48
|
-
['ChoicePicker', 'select-ui'],
|
|
49
|
-
['Select', 'select-ui'],
|
|
50
|
-
['Radio', 'radio-ui'],
|
|
51
|
-
['DateTimeInput', 'calendar-picker-ui'],
|
|
52
|
-
['CalendarPicker', 'calendar-picker-ui'],
|
|
53
|
-
['ColorPicker', 'color-picker-ui'],
|
|
54
|
-
// Search deprecated — use Input type="search" prefix="magnifying-glass"
|
|
55
|
-
['Upload', 'upload-ui'],
|
|
56
|
-
['OtpInput', 'otp-input-ui'],
|
|
57
|
-
|
|
58
|
-
// Action
|
|
59
|
-
['Button', 'button-ui'],
|
|
60
|
-
|
|
61
|
-
// System State
|
|
62
|
-
['LoadingIndicator', 'progress-ui'],
|
|
63
|
-
['ErrorContainer', 'card-ui'],
|
|
64
|
-
|
|
65
|
-
// Container
|
|
66
|
-
['Card', 'card-ui'],
|
|
67
|
-
['Tabs', 'tabs-ui'],
|
|
68
|
-
['Tab', 'tab-ui'],
|
|
69
|
-
['Panel', 'pane-ui'],
|
|
70
|
-
['Pane', 'pane-ui'],
|
|
71
|
-
['Modal', 'modal-ui'],
|
|
72
|
-
['Dialog', 'modal-ui'],
|
|
73
|
-
['Drawer', 'drawer-ui'],
|
|
74
|
-
['Toast', 'toast-ui'],
|
|
75
|
-
['Popover', 'popover-ui'],
|
|
76
|
-
['Accordion', 'accordion-ui'],
|
|
77
|
-
['AccordionItem', 'accordion-item-ui'],
|
|
78
|
-
['Alert', 'alert-ui'],
|
|
79
|
-
['Tooltip', 'tooltip-ui'],
|
|
80
|
-
['Menu', 'menu-ui'],
|
|
81
|
-
|
|
82
|
-
// Card children (native HTML elements styled by card.css)
|
|
83
|
-
['Section', 'section'],
|
|
84
|
-
['Header', 'header'],
|
|
85
|
-
['Footer', 'footer'],
|
|
86
|
-
|
|
87
|
-
// Agent / Specialized
|
|
88
|
-
['Stream', 'stream-ui'],
|
|
89
|
-
['Table', 'table-ui'],
|
|
90
|
-
['Chart', 'chart-ui'],
|
|
91
|
-
['Embed', 'embed-ui'],
|
|
92
|
-
['Swiper', 'swiper-ui'],
|
|
93
|
-
['Slideshow', 'swiper-ui'],
|
|
94
|
-
['Carousel', 'swiper-ui'],
|
|
95
|
-
|
|
96
|
-
// Navigation
|
|
97
|
-
['Breadcrumb', 'breadcrumb-ui'],
|
|
98
|
-
['Nav', 'nav-n'],
|
|
99
|
-
['Noodles', 'noodles-ui'],
|
|
100
|
-
['Pagination', 'pagination-ui'],
|
|
101
|
-
['SegmentedControl', 'segmented-ui'],
|
|
102
|
-
['Segment', 'segment-ui'],
|
|
103
|
-
['ToggleGroup', 'toggle-group-ui'],
|
|
104
|
-
|
|
105
|
-
// Utility
|
|
106
|
-
['Command', 'command-ui'],
|
|
107
|
-
['Kbd', 'kbd-ui'],
|
|
108
|
-
['Toolbar', 'toolbar-ui'],
|
|
109
|
-
['Tag', 'tag-ui'],
|
|
110
|
-
['Timeline', 'timeline-ui'],
|
|
111
|
-
['TimelineItem', 'timeline-item-ui'],
|
|
112
|
-
|
|
113
|
-
// ══════════════════════════════════════════════════════
|
|
114
|
-
// AgentUI Aliases (backwards compat with -ui tags)
|
|
115
|
-
// ══════════════════════════════════════════════════════
|
|
116
|
-
['button-ui', 'button-ui'],
|
|
117
|
-
['card-ui', 'card-ui'],
|
|
118
|
-
['text-ui', 'text-ui'],
|
|
119
|
-
['input-ui', 'input-ui'],
|
|
120
|
-
['text-field-ui', 'input-ui'],
|
|
121
|
-
['select-ui', 'select-ui'],
|
|
122
|
-
['toggle-ui', 'switch-ui'],
|
|
123
|
-
['check-ui', 'check-ui'],
|
|
124
|
-
['slider-ui', 'slider-ui'],
|
|
125
|
-
['badge-ui', 'badge-ui'],
|
|
126
|
-
['avatar-ui', 'avatar-ui'],
|
|
127
|
-
['icon-ui', 'icon-ui'],
|
|
128
|
-
['image-ui', 'image-ui'],
|
|
129
|
-
['divider-ui', 'divider-ui'],
|
|
130
|
-
['progress-ui', 'progress-ui'],
|
|
131
|
-
['skeleton-ui', 'skeleton-ui'],
|
|
132
|
-
['tabs-ui', 'tabs-ui'],
|
|
133
|
-
['tab-ui', 'tab-ui'],
|
|
134
|
-
['modal-ui', 'modal-ui'],
|
|
135
|
-
['dialog-ui', 'modal-ui'],
|
|
136
|
-
['drawer-ui', 'drawer-ui'],
|
|
137
|
-
['toast-ui', 'toast-ui'],
|
|
138
|
-
['popover-ui', 'popover-ui'],
|
|
139
|
-
['panel-ui', 'pane-ui'],
|
|
140
|
-
['accordion-ui', 'accordion-ui'],
|
|
141
|
-
['alert-ui', 'alert-ui'],
|
|
142
|
-
['tooltip-ui', 'tooltip-ui'],
|
|
143
|
-
['menu-ui', 'menu-ui'],
|
|
144
|
-
['table-ui', 'table-ui'],
|
|
145
|
-
['chart-ui', 'chart-ui'],
|
|
146
|
-
['code-ui', 'code-ui'],
|
|
147
|
-
['textarea-ui', 'textarea-ui'],
|
|
148
|
-
['radio-ui', 'radio-ui'],
|
|
149
|
-
['tag-ui', 'tag-ui'],
|
|
150
|
-
['search-ui', 'search-ui'],
|
|
151
|
-
['upload-ui', 'upload-ui'],
|
|
152
|
-
['breadcrumb-ui', 'breadcrumb-ui'],
|
|
153
|
-
['nav-ui', 'nav-n'],
|
|
154
|
-
['noodles-ui', 'noodles-ui'],
|
|
155
|
-
['pagination-ui', 'pagination-ui'],
|
|
156
|
-
['segmented-control-ui', 'segmented-ui'],
|
|
157
|
-
['segment-ui', 'segment-ui'],
|
|
158
|
-
['command-ui', 'command-ui'],
|
|
159
|
-
['calendar-picker-ui', 'calendar-picker-ui'],
|
|
160
|
-
['color-picker-ui', 'color-picker-ui'],
|
|
161
|
-
['kbd-ui', 'kbd-ui'],
|
|
162
|
-
['toolbar-ui', 'toolbar-ui'],
|
|
163
|
-
['otp-input-ui', 'otp-input-ui'],
|
|
164
|
-
['embed-ui', 'embed-ui'],
|
|
165
|
-
['stream-ui', 'stream-ui'],
|
|
166
|
-
['row-ui', 'row-ui'],
|
|
167
|
-
['col-ui', 'col-ui'],
|
|
168
|
-
['grid-ui', 'grid-ui'],
|
|
169
|
-
['stack-ui', 'stack-ui'],
|
|
170
|
-
['block-ui', 'block-ui'],
|
|
171
|
-
['list-ui', 'list-ui'],
|
|
172
|
-
['range-ui', 'range-ui'],
|
|
173
|
-
['datetime-ui', 'calendar-picker-ui'],
|
|
174
|
-
['timeline-ui', 'timeline-ui'],
|
|
175
|
-
['timeline-item-ui', 'timeline-item-ui'],
|
|
176
|
-
['avatar-group-ui', 'avatar-group-ui'],
|
|
177
|
-
|
|
178
|
-
// Aliases (alternate names)
|
|
179
|
-
['Keyboard', 'kbd-ui'],
|
|
180
|
-
['DatePicker', 'calendar-picker-ui'],
|
|
181
|
-
['CommandPalette', 'command-ui'],
|
|
182
|
-
['Segmented', 'segmented-ui'],
|
|
183
|
-
['OTP', 'otp-input-ui'],
|
|
184
|
-
]);
|
|
185
|
-
|
|
186
|
-
/**
|
|
187
|
-
* Resolve an A2UI component type to a AdiaUI tag name.
|
|
188
|
-
* @param {string} type — A2UI type name or AgentUI tag
|
|
189
|
-
* @returns {string|null} — AdiaUI tag name or null
|
|
190
|
-
*/
|
|
191
|
-
export function resolveTag(type) {
|
|
192
|
-
return registry.get(type) || null;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
/**
|
|
196
|
-
* Register a custom component type.
|
|
197
|
-
*/
|
|
198
|
-
export function registerType(type, tagName) {
|
|
199
|
-
registry.set(type, tagName);
|
|
200
|
-
}
|