@adia-ai/web-components 0.0.29 → 0.0.33
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/components/accordion/accordion.a2ui.json +1 -1
- package/components/accordion/accordion.js +6 -6
- package/components/accordion/accordion.yaml +1 -1
- package/components/action-list/action-list.a2ui.json +1 -1
- package/components/action-list/action-list.js +6 -6
- package/components/action-list/action-list.yaml +1 -1
- package/components/agent-artifact/agent-artifact.a2ui.json +1 -1
- package/components/agent-artifact/agent-artifact.js +4 -4
- package/components/agent-artifact/agent-artifact.yaml +1 -1
- package/components/agent-feedback-bar/agent-feedback-bar.a2ui.json +1 -1
- package/components/agent-feedback-bar/agent-feedback-bar.js +4 -4
- package/components/agent-feedback-bar/agent-feedback-bar.yaml +1 -1
- package/components/agent-questions/agent-questions.a2ui.json +1 -1
- package/components/agent-questions/agent-questions.js +4 -4
- package/components/agent-questions/agent-questions.yaml +1 -1
- package/components/agent-reasoning/agent-reasoning.a2ui.json +3 -3
- package/components/agent-reasoning/agent-reasoning.js +4 -4
- package/components/agent-reasoning/agent-reasoning.yaml +3 -3
- package/components/agent-suggestions/agent-suggestions.a2ui.json +1 -1
- package/components/agent-suggestions/agent-suggestions.js +4 -4
- package/components/agent-suggestions/agent-suggestions.yaml +1 -1
- package/components/agent-trace/agent-trace.a2ui.json +1 -1
- package/components/agent-trace/agent-trace.js +4 -4
- package/components/agent-trace/agent-trace.yaml +1 -1
- package/components/alert/alert.a2ui.json +1 -1
- package/components/alert/alert.js +4 -4
- package/components/alert/alert.yaml +1 -1
- package/components/aside/aside.a2ui.json +1 -1
- package/components/aside/aside.yaml +1 -1
- package/components/avatar/avatar.a2ui.json +1 -1
- package/components/avatar/avatar.js +8 -8
- package/components/avatar/avatar.yaml +1 -1
- package/components/badge/badge.a2ui.json +1 -1
- package/components/badge/badge.js +4 -4
- package/components/badge/badge.yaml +1 -1
- package/components/block/block.a2ui.json +1 -1
- package/components/block/block.js +4 -4
- package/components/block/block.yaml +1 -1
- package/components/breadcrumb/breadcrumb.a2ui.json +1 -1
- package/components/breadcrumb/breadcrumb.js +4 -4
- package/components/breadcrumb/breadcrumb.yaml +1 -1
- package/components/button/button.a2ui.json +1 -1
- package/components/button/button.js +4 -4
- package/components/button/button.yaml +1 -1
- package/components/calendar-picker/calendar-picker.a2ui.json +1 -1
- package/components/calendar-picker/calendar-picker.js +6 -6
- package/components/calendar-picker/calendar-picker.yaml +1 -1
- package/components/canvas/canvas.a2ui.json +1 -1
- package/components/canvas/canvas.js +4 -4
- package/components/canvas/canvas.yaml +1 -1
- package/components/card/card.a2ui.json +1 -1
- package/components/card/card.js +4 -4
- package/components/card/card.yaml +1 -1
- package/components/chart/chart.a2ui.json +1 -1
- package/components/chart/chart.js +5 -5
- package/components/chart/chart.yaml +1 -1
- package/components/chart-legend/chart-legend.a2ui.json +1 -1
- package/components/chart-legend/chart-legend.js +7 -7
- package/components/chart-legend/chart-legend.yaml +1 -1
- package/components/{chat → chat-thread}/chat-input.js +5 -5
- package/components/{chat/chat.a2ui.json → chat-thread/chat-thread.a2ui.json} +6 -6
- package/components/{chat/chat.css → chat-thread/chat-thread.css} +2 -2
- package/components/{chat/chat.js → chat-thread/chat-thread.js} +7 -7
- package/components/{chat/chat.yaml → chat-thread/chat-thread.yaml} +4 -4
- package/components/check/check.a2ui.json +1 -1
- package/components/check/check.js +5 -5
- package/components/check/check.yaml +1 -1
- package/components/code/code.a2ui.json +1 -1
- package/components/code/code.js +4 -4
- package/components/code/code.yaml +1 -1
- package/components/col/col.a2ui.json +1 -1
- package/components/col/col.js +4 -4
- package/components/col/col.yaml +1 -1
- package/components/color-picker/color-picker.a2ui.json +1 -1
- package/components/color-picker/color-picker.js +6 -6
- package/components/color-picker/color-picker.yaml +1 -1
- package/components/command/command.a2ui.json +1 -1
- package/components/command/command.js +5 -5
- package/components/command/command.yaml +1 -1
- package/components/description-list/description-list.a2ui.json +1 -1
- package/components/description-list/description-list.js +4 -4
- package/components/description-list/description-list.yaml +1 -1
- package/components/divider/divider.a2ui.json +1 -1
- package/components/divider/divider.js +4 -4
- package/components/divider/divider.yaml +1 -1
- package/components/drawer/drawer.a2ui.json +1 -1
- package/components/drawer/drawer.js +4 -4
- package/components/drawer/drawer.yaml +1 -1
- package/components/embed/embed.a2ui.json +1 -1
- package/components/embed/embed.js +4 -4
- package/components/embed/embed.yaml +1 -1
- package/components/empty-state/empty-state.a2ui.json +1 -1
- package/components/empty-state/empty-state.js +4 -4
- package/components/empty-state/empty-state.yaml +1 -1
- package/components/feed/feed-item.yaml +2 -2
- package/components/feed/feed.a2ui.json +2 -2
- package/components/feed/feed.css +12 -3
- package/components/feed/feed.js +22 -22
- package/components/feed/feed.yaml +2 -2
- package/components/field/field.a2ui.json +1 -1
- package/components/field/field.js +10 -10
- package/components/field/field.yaml +2 -2
- package/components/footer/footer.a2ui.json +1 -1
- package/components/footer/footer.yaml +1 -1
- package/components/grid/grid.a2ui.json +1 -1
- package/components/grid/grid.js +4 -4
- package/components/grid/grid.yaml +1 -1
- package/components/header/header.a2ui.json +1 -1
- package/components/header/header.yaml +1 -1
- package/components/heatmap/heatmap.a2ui.json +1 -1
- package/components/heatmap/heatmap.js +4 -4
- package/components/heatmap/heatmap.yaml +1 -1
- package/components/icon/icon.a2ui.json +1 -1
- package/components/icon/icon.js +4 -4
- package/components/icon/icon.yaml +1 -1
- package/components/image/image.a2ui.json +1 -1
- package/components/image/image.js +4 -4
- package/components/image/image.yaml +1 -1
- package/components/index.js +88 -85
- package/components/input/input.a2ui.json +1 -1
- package/components/input/input.js +7 -7
- package/components/input/input.yaml +1 -1
- package/components/inspector/inspector.a2ui.json +1 -1
- package/components/inspector/inspector.js +4 -4
- package/components/inspector/inspector.yaml +1 -1
- package/components/kbd/kbd.a2ui.json +1 -1
- package/components/kbd/kbd.js +4 -4
- package/components/kbd/kbd.yaml +1 -1
- package/components/list/list.a2ui.json +1 -1
- package/components/list/list.js +6 -6
- package/components/list/list.yaml +1 -1
- package/components/menu/menu.a2ui.json +1 -1
- package/components/menu/menu.js +8 -8
- package/components/menu/menu.yaml +1 -1
- package/components/modal/modal.a2ui.json +1 -1
- package/components/modal/modal.js +4 -4
- package/components/modal/modal.yaml +1 -1
- package/components/nav/nav.a2ui.json +98 -0
- package/components/nav/nav.css +133 -0
- package/components/nav/nav.js +140 -0
- package/components/nav/nav.test.js +428 -0
- package/components/nav/nav.yaml +114 -0
- package/components/nav-group/nav-group.a2ui.json +100 -0
- package/components/nav-group/nav-group.css +317 -0
- package/components/nav-group/nav-group.js +142 -0
- package/components/nav-group/nav-group.yaml +69 -0
- package/components/nav-item/nav-item.a2ui.json +106 -0
- package/components/nav-item/nav-item.css +194 -0
- package/components/nav-item/nav-item.js +76 -0
- package/components/nav-item/nav-item.yaml +73 -0
- package/components/noodles/noodles.a2ui.json +1 -1
- package/components/noodles/noodles.js +4 -4
- package/components/noodles/noodles.yaml +1 -1
- package/components/option-card/option-card.a2ui.json +1 -1
- package/components/option-card/option-card.js +6 -6
- package/components/option-card/option-card.yaml +1 -1
- package/components/otp-input/otp-input.a2ui.json +1 -1
- package/components/otp-input/otp-input.js +5 -5
- package/components/otp-input/otp-input.yaml +1 -1
- package/components/page/page.a2ui.json +3 -3
- package/components/page/page.js +4 -4
- package/components/page/page.yaml +3 -3
- package/components/pagination/pagination.a2ui.json +1 -1
- package/components/pagination/pagination.js +4 -4
- package/components/pagination/pagination.yaml +1 -1
- package/components/pane/pane.a2ui.json +1 -1
- package/components/pane/pane.js +4 -4
- package/components/pane/pane.yaml +1 -1
- package/components/pipeline-status/pipeline-status.a2ui.json +1 -1
- package/components/pipeline-status/pipeline-status.js +4 -4
- package/components/pipeline-status/pipeline-status.yaml +1 -1
- package/components/popover/popover.a2ui.json +1 -1
- package/components/popover/popover.js +4 -4
- package/components/popover/popover.yaml +1 -1
- package/components/progress/progress.a2ui.json +1 -1
- package/components/progress/progress.js +4 -4
- package/components/progress/progress.yaml +1 -1
- package/components/progress-row/progress-row.a2ui.json +1 -1
- package/components/progress-row/progress-row.js +4 -4
- package/components/progress-row/progress-row.yaml +1 -1
- package/components/radio/radio.a2ui.json +1 -1
- package/components/radio/radio.js +5 -5
- package/components/radio/radio.yaml +1 -1
- package/components/range/range.a2ui.json +1 -1
- package/components/range/range.js +7 -7
- package/components/range/range.yaml +1 -1
- package/components/rating/rating.a2ui.json +1 -1
- package/components/rating/rating.js +6 -6
- package/components/rating/rating.yaml +1 -1
- package/components/richtext/richtext.a2ui.json +1 -1
- package/components/richtext/richtext.js +4 -4
- package/components/richtext/richtext.yaml +1 -1
- package/components/row/row.a2ui.json +1 -1
- package/components/row/row.js +4 -4
- package/components/row/row.yaml +1 -1
- package/components/search/search.a2ui.json +1 -1
- package/components/search/search.js +5 -5
- package/components/search/search.yaml +1 -1
- package/components/section/section.a2ui.json +1 -1
- package/components/section/section.yaml +1 -1
- package/components/segment/segment.a2ui.json +1 -1
- package/components/segment/segment.js +4 -4
- package/components/segment/segment.yaml +1 -1
- package/components/segmented/segmented.a2ui.json +1 -1
- package/components/segmented/segmented.css +6 -0
- package/components/segmented/segmented.js +7 -7
- package/components/segmented/segmented.yaml +1 -1
- package/components/select/select.a2ui.json +1 -1
- package/components/select/select.js +5 -5
- package/components/select/select.yaml +1 -1
- package/components/skeleton/skeleton.a2ui.json +1 -1
- package/components/skeleton/skeleton.js +4 -4
- package/components/skeleton/skeleton.yaml +1 -1
- package/components/slider/slider.a2ui.json +1 -1
- package/components/slider/slider.js +7 -7
- package/components/slider/slider.yaml +1 -1
- package/components/stack/stack.a2ui.json +1 -1
- package/components/stack/stack.js +4 -4
- package/components/stack/stack.yaml +1 -1
- package/components/stat/stat.a2ui.json +1 -1
- package/components/stat/stat.js +4 -4
- package/components/stat/stat.yaml +1 -1
- package/components/stepper/stepper.a2ui.json +1 -1
- package/components/stepper/stepper.js +6 -6
- package/components/stepper/stepper.yaml +1 -1
- package/components/stream/stream.a2ui.json +1 -1
- package/components/stream/stream.js +4 -4
- package/components/stream/stream.yaml +1 -1
- package/components/swatch/swatch.a2ui.json +1 -1
- package/components/swatch/swatch.js +4 -4
- package/components/swatch/swatch.yaml +1 -1
- package/components/swiper/swiper.a2ui.json +1 -1
- package/components/swiper/swiper.js +4 -4
- package/components/swiper/swiper.yaml +1 -1
- package/components/switch/switch.a2ui.json +1 -1
- package/components/switch/switch.js +5 -5
- package/components/switch/switch.yaml +1 -1
- package/components/table/table.a2ui.json +1 -1
- package/components/table/table.js +4 -4
- package/components/table/table.yaml +1 -1
- package/components/table-toolbar/table-toolbar.a2ui.json +1 -1
- package/components/table-toolbar/table-toolbar.js +4 -4
- package/components/table-toolbar/table-toolbar.yaml +1 -1
- package/components/tabs/tab.js +4 -4
- package/components/tabs/tabs.a2ui.json +1 -1
- package/components/tabs/tabs.js +5 -5
- package/components/tabs/tabs.yaml +1 -1
- package/components/tag/tag.a2ui.json +1 -1
- package/components/tag/tag.js +4 -4
- package/components/tag/tag.yaml +1 -1
- package/components/text/text.a2ui.json +1 -1
- package/components/text/text.js +4 -4
- package/components/text/text.yaml +1 -1
- package/components/textarea/textarea.a2ui.json +1 -1
- package/components/textarea/textarea.js +5 -5
- package/components/textarea/textarea.yaml +1 -1
- package/components/timeline/timeline.a2ui.json +1 -1
- package/components/timeline/timeline.js +6 -6
- package/components/timeline/timeline.yaml +1 -1
- package/components/toast/toast.a2ui.json +1 -1
- package/components/toast/toast.js +18 -18
- package/components/toast/toast.yaml +1 -1
- package/components/toggle-group/toggle-group.a2ui.json +1 -1
- package/components/toggle-group/toggle-group.js +6 -6
- package/components/toggle-group/toggle-group.yaml +1 -1
- package/components/toolbar/toolbar.a2ui.json +1 -1
- package/components/toolbar/toolbar.js +6 -6
- package/components/toolbar/toolbar.yaml +1 -1
- package/components/tooltip/tooltip.a2ui.json +1 -1
- package/components/tooltip/tooltip.js +7 -7
- package/components/tooltip/tooltip.yaml +1 -1
- package/components/tree/tree.a2ui.json +1 -1
- package/components/tree/tree.js +6 -6
- package/components/tree/tree.yaml +1 -1
- package/components/upload/upload.a2ui.json +1 -1
- package/components/upload/upload.js +6 -6
- package/components/upload/upload.yaml +1 -1
- package/core/element.js +4 -4
- package/core/element.test.js +18 -18
- package/core/form.js +9 -9
- package/core/index.js +2 -2
- package/core/provider.js +7 -7
- package/core/template.js +1 -1
- package/index.css +1 -1
- package/index.js +10 -8
- package/package.json +1 -1
- package/styles/components.css +10 -6
- package/styles/resets.css +1 -1
- package/traits/define.js +2 -2
- /package/components/{chat → chat-thread}/chat-input.css +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Generated by scripts/migrate-yamls-to-v1.mjs — migrated to v1 contract.
|
|
2
2
|
# Edit this file; run `npm run build:components` to regenerate a2ui.json.
|
|
3
3
|
$schema: ../../../../scripts/schemas/component.yaml.schema.json
|
|
4
|
-
name:
|
|
4
|
+
name: UIBreadcrumb
|
|
5
5
|
tag: breadcrumb-ui
|
|
6
6
|
component: Breadcrumb
|
|
7
7
|
category: navigation
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UIElement, signal, html } from '../../core/element.js';
|
|
2
2
|
import { getIcon } from '../../core/icons.js';
|
|
3
3
|
|
|
4
|
-
class
|
|
4
|
+
class UIButton extends UIElement {
|
|
5
5
|
static properties = {
|
|
6
6
|
text: { type: String, default: '', reflect: true },
|
|
7
7
|
variant: { type: String, default: 'solid', reflect: true },
|
|
@@ -59,6 +59,6 @@ class AdiaButton extends AdiaElement {
|
|
|
59
59
|
this.removeEventListener('keydown', this.#onKey);
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
customElements.define('button-ui',
|
|
62
|
+
customElements.define('button-ui', UIButton);
|
|
63
63
|
|
|
64
|
-
export {
|
|
64
|
+
export { UIButton };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Generated by scripts/migrate-yamls-to-v1.mjs — migrated to v1 contract.
|
|
2
2
|
# Edit this file; run `npm run build:components` to regenerate a2ui.json.
|
|
3
3
|
$schema: ../../../../scripts/schemas/component.yaml.schema.json
|
|
4
|
-
name:
|
|
4
|
+
name: UIButton
|
|
5
5
|
tag: button-ui
|
|
6
6
|
component: Button
|
|
7
7
|
category: action
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* <calendar-picker-ui label="Date" placeholder="Select date..." format="short"></calendar-picker-ui>
|
|
3
3
|
*
|
|
4
4
|
* Date picker with trigger button and popover calendar grid.
|
|
5
|
-
* Form-associated via
|
|
5
|
+
* Form-associated via UIFormElement + ElementInternals.
|
|
6
6
|
*
|
|
7
7
|
* Properties:
|
|
8
8
|
* label — field label (rendered via CSS ::before)
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* Keyboard: Arrow keys navigate days, Enter selects, Escape closes.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
import {
|
|
18
|
+
import { UIFormElement } from '../../core/form.js';
|
|
19
19
|
import { anchorPopover } from '../../core/anchor.js';
|
|
20
20
|
|
|
21
21
|
const DAYS = ['S', 'M', 'T', 'W', 'T', 'F', 'S'];
|
|
@@ -39,9 +39,9 @@ function sameDay(a, b) {
|
|
|
39
39
|
a.getDate() === b.getDate();
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
class
|
|
42
|
+
class UICalendarPicker extends UIFormElement {
|
|
43
43
|
static properties = {
|
|
44
|
-
...
|
|
44
|
+
...UIFormElement.properties,
|
|
45
45
|
label: { type: String, default: '', reflect: true },
|
|
46
46
|
placeholder: { type: String, default: 'Select date...', reflect: true },
|
|
47
47
|
format: { type: String, default: 'short', reflect: true },
|
|
@@ -336,6 +336,6 @@ class AdiaCalendarPicker extends AdiaFormElement {
|
|
|
336
336
|
this.#trigger = null;
|
|
337
337
|
}
|
|
338
338
|
}
|
|
339
|
-
customElements.define('calendar-picker-ui',
|
|
339
|
+
customElements.define('calendar-picker-ui', UICalendarPicker);
|
|
340
340
|
|
|
341
|
-
export {
|
|
341
|
+
export { UICalendarPicker };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Generated by scripts/migrate-yamls-to-v1.mjs — migrated to v1 contract.
|
|
2
2
|
# Edit this file; run `npm run build:components` to regenerate a2ui.json.
|
|
3
3
|
$schema: ../../../../scripts/schemas/component.yaml.schema.json
|
|
4
|
-
name:
|
|
4
|
+
name: UICalendarPicker
|
|
5
5
|
tag: calendar-picker-ui
|
|
6
6
|
component: CalendarPicker
|
|
7
7
|
category: input
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UIElement } from '../../core/element.js';
|
|
2
2
|
import '../../../web-modules/runtime/a2ui-root/a2ui-root.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -11,7 +11,7 @@ import '../../../web-modules/runtime/a2ui-root/a2ui-root.js';
|
|
|
11
11
|
* canvas-interaction — user interacts with rendered components.
|
|
12
12
|
* Detail: { type, targetTag, targetId, value }
|
|
13
13
|
*/
|
|
14
|
-
export class
|
|
14
|
+
export class UICanvas extends UIElement {
|
|
15
15
|
static properties = {
|
|
16
16
|
theme: { type: String, default: '', reflect: true },
|
|
17
17
|
};
|
|
@@ -130,7 +130,7 @@ export class AdiaCanvas extends AdiaElement {
|
|
|
130
130
|
this.#history = this.#history.slice(0, this.#historyIndex + 1);
|
|
131
131
|
}
|
|
132
132
|
this.#history.push(messages ? [...messages] : []);
|
|
133
|
-
if (this.#history.length >
|
|
133
|
+
if (this.#history.length > UICanvas.MAX_HISTORY) this.#history.shift();
|
|
134
134
|
this.#historyIndex = this.#history.length - 1;
|
|
135
135
|
}
|
|
136
136
|
|
|
@@ -176,4 +176,4 @@ export class AdiaCanvas extends AdiaElement {
|
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
178
|
|
|
179
|
-
customElements.define('canvas-ui',
|
|
179
|
+
customElements.define('canvas-ui', UICanvas);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Generated by scripts/migrate-yamls-to-v1.mjs — migrated to v1 contract.
|
|
2
2
|
# Edit this file; run `npm run build:components` to regenerate a2ui.json.
|
|
3
3
|
$schema: ../../../../scripts/schemas/component.yaml.schema.json
|
|
4
|
-
name:
|
|
4
|
+
name: UICanvas
|
|
5
5
|
tag: canvas-ui
|
|
6
6
|
component: Canvas
|
|
7
7
|
category: agent
|
package/components/card/card.js
CHANGED
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
* draggable — enables drag handle + cursor:grab; wires the draggable trait
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
|
-
import {
|
|
26
|
+
import { UIElement } from '../../core/element.js';
|
|
27
27
|
import { draggable } from '../../traits/draggable.js';
|
|
28
28
|
|
|
29
|
-
class
|
|
29
|
+
class UICard extends UIElement {
|
|
30
30
|
static properties = {
|
|
31
31
|
variant: { type: String, default: 'default', reflect: true },
|
|
32
32
|
size: { type: String, default: '', reflect: true },
|
|
@@ -54,5 +54,5 @@ class AdiaCard extends AdiaElement {
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
customElements.define('card-ui',
|
|
58
|
-
export {
|
|
57
|
+
customElements.define('card-ui', UICard);
|
|
58
|
+
export { UICard };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Generated by scripts/migrate-yamls-to-v1.mjs — migrated to v1 contract.
|
|
2
2
|
# Edit this file; run `npm run build:components` to regenerate a2ui.json.
|
|
3
3
|
$schema: ../../../../scripts/schemas/component.yaml.schema.json
|
|
4
|
-
name:
|
|
4
|
+
name: UICard
|
|
5
5
|
tag: card-ui
|
|
6
6
|
component: Card
|
|
7
7
|
category: container
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* .data = [{...}, ...] — array of data objects
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
|
-
import {
|
|
22
|
+
import { UIElement } from '../../core/element.js';
|
|
23
23
|
|
|
24
24
|
/* ── Helpers ────────────────────────────────────────────────────── */
|
|
25
25
|
|
|
@@ -198,7 +198,7 @@ const ASPECTS = {
|
|
|
198
198
|
|
|
199
199
|
/* ── Component ──────────────────────────────────────────────────── */
|
|
200
200
|
|
|
201
|
-
class
|
|
201
|
+
class UIChart extends UIElement {
|
|
202
202
|
static properties = {
|
|
203
203
|
type: { type: String, default: 'bar', reflect: true },
|
|
204
204
|
heading: { type: String, default: '', reflect: true },
|
|
@@ -281,7 +281,7 @@ class AdiaChart extends AdiaElement {
|
|
|
281
281
|
entry point is the `.data` property (set programmatically), but
|
|
282
282
|
consumers commonly try the same declarative attribute shape that
|
|
283
283
|
every other chart prop accepts — `<chart-ui data='[…]' x="m"
|
|
284
|
-
y="v">`.
|
|
284
|
+
y="v">`. UIElement's property system doesn't deserialize JSON
|
|
285
285
|
array attributes, so a static-HTML chart authored that way would
|
|
286
286
|
otherwise render empty. JSON-parse once at connect; malformed
|
|
287
287
|
payloads are ignored silently and a property assignment later
|
|
@@ -2135,6 +2135,6 @@ class AdiaChart extends AdiaElement {
|
|
|
2135
2135
|
return legend;
|
|
2136
2136
|
}
|
|
2137
2137
|
}
|
|
2138
|
-
customElements.define('chart-ui',
|
|
2138
|
+
customElements.define('chart-ui', UIChart);
|
|
2139
2139
|
|
|
2140
|
-
export {
|
|
2140
|
+
export { UIChart };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Generated by scripts/migrate-yamls-to-v1.mjs — migrated to v1 contract.
|
|
2
2
|
# Edit this file; run `npm run build:components` to regenerate a2ui.json.
|
|
3
3
|
$schema: ../../../../scripts/schemas/component.yaml.schema.json
|
|
4
|
-
name:
|
|
4
|
+
name: UIChart
|
|
5
5
|
tag: chart-ui
|
|
6
6
|
component: Chart
|
|
7
7
|
category: agent
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
* not [static]. `active` is the new state (true=visible).
|
|
35
35
|
*/
|
|
36
36
|
|
|
37
|
-
import {
|
|
37
|
+
import { UIElement } from '../../core/element.js';
|
|
38
38
|
|
|
39
|
-
class
|
|
39
|
+
class UIChartLegend extends UIElement {
|
|
40
40
|
static properties = {
|
|
41
41
|
for: { type: String, default: '', reflect: true },
|
|
42
42
|
// Items is a JSON-encoded array; reflecting to the attribute would
|
|
@@ -79,11 +79,11 @@ class AdiaChartLegend extends AdiaElement {
|
|
|
79
79
|
|| document.getElementById(this.for);
|
|
80
80
|
if (!el) {
|
|
81
81
|
// Warn once per (element × id) pair
|
|
82
|
-
if (!
|
|
82
|
+
if (!UIChartLegend._warned) UIChartLegend._warned = new WeakSet();
|
|
83
83
|
const marker = { el: this, id: this.for };
|
|
84
|
-
if (!
|
|
84
|
+
if (!UIChartLegend._warned.has(this)) {
|
|
85
85
|
console.warn(`[chart-legend-ui] [for="${this.for}"] did not resolve to an element.`);
|
|
86
|
-
|
|
86
|
+
UIChartLegend._warned.add(this);
|
|
87
87
|
}
|
|
88
88
|
return;
|
|
89
89
|
}
|
|
@@ -201,6 +201,6 @@ class AdiaChartLegend extends AdiaElement {
|
|
|
201
201
|
}
|
|
202
202
|
}
|
|
203
203
|
|
|
204
|
-
customElements.define('chart-legend-ui',
|
|
204
|
+
customElements.define('chart-legend-ui', UIChartLegend);
|
|
205
205
|
|
|
206
|
-
export {
|
|
206
|
+
export { UIChartLegend };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UIElement } from '../../core/element.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* <chat-input-ui> — Composable chat input bar.
|
|
@@ -33,11 +33,11 @@ import { AdiaElement } from '../../core/element.js';
|
|
|
33
33
|
*
|
|
34
34
|
* Note:
|
|
35
35
|
* Composite wrapper, not a form field itself. The inner textarea-ui is
|
|
36
|
-
* form-associated via
|
|
36
|
+
* form-associated via UIFormElement and submits through the parent
|
|
37
37
|
* form. `chat-input-ui`'s `disabled` / `placeholder` props propagate to
|
|
38
38
|
* the inner textarea.
|
|
39
39
|
*/
|
|
40
|
-
class
|
|
40
|
+
class UIChatInput extends UIElement {
|
|
41
41
|
static properties = {
|
|
42
42
|
disabled: { type: Boolean, default: false, reflect: true },
|
|
43
43
|
loading: { type: Boolean, default: false, reflect: true },
|
|
@@ -263,6 +263,6 @@ class AdiaChatInput extends AdiaElement {
|
|
|
263
263
|
this.#fileInput = null;
|
|
264
264
|
}
|
|
265
265
|
}
|
|
266
|
-
customElements.define('chat-input-ui',
|
|
266
|
+
customElements.define('chat-input-ui', UIChatInput);
|
|
267
267
|
|
|
268
|
-
export {
|
|
268
|
+
export { UIChatInput };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://adiaui.dev/a2ui/v0_9/components/
|
|
4
|
-
"title": "
|
|
5
|
-
"description": "Minimal chat container.",
|
|
3
|
+
"$id": "https://adiaui.dev/a2ui/v0_9/components/ChatThread.json",
|
|
4
|
+
"title": "ChatThread",
|
|
5
|
+
"description": "Minimal chat-thread container.",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"allOf": [
|
|
8
8
|
{
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
],
|
|
15
15
|
"properties": {
|
|
16
16
|
"component": {
|
|
17
|
-
"const": "
|
|
17
|
+
"const": "ChatThread"
|
|
18
18
|
},
|
|
19
19
|
"streaming": {
|
|
20
20
|
"description": "Component property: streaming.",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"comment",
|
|
76
76
|
"support"
|
|
77
77
|
],
|
|
78
|
-
"name": "
|
|
78
|
+
"name": "UIChatThread",
|
|
79
79
|
"related": [],
|
|
80
80
|
"slots": {
|
|
81
81
|
"default": {
|
|
@@ -173,7 +173,7 @@
|
|
|
173
173
|
"chat"
|
|
174
174
|
]
|
|
175
175
|
},
|
|
176
|
-
"tag": "chat-ui",
|
|
176
|
+
"tag": "chat-thread-ui",
|
|
177
177
|
"tokens": {},
|
|
178
178
|
"traits": [],
|
|
179
179
|
"version": 1
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@scope (chat-ui) {
|
|
1
|
+
@scope (chat-thread-ui) {
|
|
2
2
|
:where(:scope) {
|
|
3
3
|
/* ── Layout ── */
|
|
4
4
|
--chat-border-color: var(--a-border-subtle);
|
|
@@ -188,5 +188,5 @@
|
|
|
188
188
|
}
|
|
189
189
|
|
|
190
190
|
@media (prefers-reduced-motion: reduce) {
|
|
191
|
-
chat-ui [slot="cursor"] { animation: none; opacity: 0.7; }
|
|
191
|
+
chat-thread-ui [slot="cursor"] { animation: none; opacity: 0.7; }
|
|
192
192
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UIElement } from '../../core/element.js';
|
|
2
2
|
import { renderMarkdown } from '../../core/markdown.js';
|
|
3
3
|
|
|
4
4
|
function escapeHTML(s) {
|
|
@@ -6,10 +6,10 @@ function escapeHTML(s) {
|
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* <chat-ui> — Minimal chat container.
|
|
9
|
+
* <chat-thread-ui> — Minimal chat-thread container.
|
|
10
10
|
*
|
|
11
11
|
* Structure:
|
|
12
|
-
* <chat-ui>
|
|
12
|
+
* <chat-thread-ui>
|
|
13
13
|
* <header>
|
|
14
14
|
* <span slot="avatar">AI</span>
|
|
15
15
|
* <span slot="name">Assistant</span>
|
|
@@ -20,7 +20,7 @@ function escapeHTML(s) {
|
|
|
20
20
|
* <footer>
|
|
21
21
|
* <chat-input-ui placeholder="Type a message..."></chat-input-ui>
|
|
22
22
|
* </footer>
|
|
23
|
-
* </chat-ui>
|
|
23
|
+
* </chat-thread-ui>
|
|
24
24
|
*
|
|
25
25
|
* JS API:
|
|
26
26
|
* chat.appendMessage({ role: 'user', content: 'Hello' })
|
|
@@ -34,7 +34,7 @@ function escapeHTML(s) {
|
|
|
34
34
|
* Events:
|
|
35
35
|
* submit — user pressed send (detail: { text, model })
|
|
36
36
|
*/
|
|
37
|
-
class
|
|
37
|
+
class UIChatThread extends UIElement {
|
|
38
38
|
static properties = {
|
|
39
39
|
streaming: { type: Boolean, default: false, reflect: true },
|
|
40
40
|
};
|
|
@@ -161,6 +161,6 @@ class AdiaChat extends AdiaElement {
|
|
|
161
161
|
});
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
|
-
customElements.define('chat-ui',
|
|
164
|
+
customElements.define('chat-thread-ui', UIChatThread);
|
|
165
165
|
|
|
166
|
-
export {
|
|
166
|
+
export { UIChatThread };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# Generated by scripts/migrate-yamls-to-v1.mjs — migrated to v1 contract.
|
|
2
2
|
# Edit this file; run `npm run build:components` to regenerate a2ui.json.
|
|
3
3
|
$schema: ../../../../scripts/schemas/component.yaml.schema.json
|
|
4
|
-
name:
|
|
5
|
-
tag: chat-ui
|
|
6
|
-
component:
|
|
4
|
+
name: UIChatThread
|
|
5
|
+
tag: chat-thread-ui
|
|
6
|
+
component: ChatThread
|
|
7
7
|
category: agent
|
|
8
8
|
version: 1
|
|
9
|
-
description: Minimal chat container.
|
|
9
|
+
description: Minimal chat-thread container.
|
|
10
10
|
props:
|
|
11
11
|
streaming:
|
|
12
12
|
description: "Component property: streaming."
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
* Pure CSS checkmark via border trick on [slot="box"]::after. No SVG.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import { UIFormElement } from '../../core/form.js';
|
|
7
7
|
import { html } from '../../core/element.js';
|
|
8
8
|
|
|
9
|
-
class
|
|
9
|
+
class UICheck extends UIFormElement {
|
|
10
10
|
static properties = {
|
|
11
|
-
...
|
|
11
|
+
...UIFormElement.properties,
|
|
12
12
|
checked: { type: Boolean, default: false, reflect: true },
|
|
13
13
|
indeterminate: { type: Boolean, default: false, reflect: true },
|
|
14
14
|
label: { type: String, default: '', reflect: true },
|
|
@@ -53,6 +53,6 @@ class AdiaCheck extends AdiaFormElement {
|
|
|
53
53
|
this.removeEventListener('keydown', this.#onKey);
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
-
customElements.define('check-ui',
|
|
56
|
+
customElements.define('check-ui', UICheck);
|
|
57
57
|
|
|
58
|
-
export {
|
|
58
|
+
export { UICheck };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Generated by scripts/migrate-yamls-to-v1.mjs — migrated to v1 contract.
|
|
2
2
|
# Edit this file; run `npm run build:components` to regenerate a2ui.json.
|
|
3
3
|
$schema: ../../../../scripts/schemas/component.yaml.schema.json
|
|
4
|
-
name:
|
|
4
|
+
name: UICheck
|
|
5
5
|
tag: check-ui
|
|
6
6
|
component: Check
|
|
7
7
|
category: layout
|
package/components/code/code.js
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
* contribute nothing to form submission when `[editable]` is absent.
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
|
-
import {
|
|
26
|
+
import { UIElement } from '../../core/element.js';
|
|
27
27
|
|
|
28
28
|
const SUPPORTED_LANGUAGES = new Set([
|
|
29
29
|
'json', 'html', 'javascript', 'js', 'css', 'markdown', 'md', 'yaml', 'yml',
|
|
@@ -42,7 +42,7 @@ function canonicalLanguage(name) {
|
|
|
42
42
|
return LANGUAGE_ALIAS[lower] ?? lower;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
class
|
|
45
|
+
class UICode extends UIElement {
|
|
46
46
|
static formAssociated = true;
|
|
47
47
|
|
|
48
48
|
static properties = {
|
|
@@ -485,6 +485,6 @@ class AdiaCode extends AdiaElement {
|
|
|
485
485
|
}
|
|
486
486
|
}
|
|
487
487
|
}
|
|
488
|
-
customElements.define('code-ui',
|
|
488
|
+
customElements.define('code-ui', UICode);
|
|
489
489
|
|
|
490
|
-
export {
|
|
490
|
+
export { UICode };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Generated by scripts/migrate-yamls-to-v1.mjs — migrated to v1 contract.
|
|
2
2
|
# Edit this file; run `npm run build:components` to regenerate a2ui.json.
|
|
3
3
|
$schema: ../../../../scripts/schemas/component.yaml.schema.json
|
|
4
|
-
name:
|
|
4
|
+
name: UICode
|
|
5
5
|
tag: code-ui
|
|
6
6
|
component: Code
|
|
7
7
|
category: display
|
package/components/col/col.js
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* <col-ui gap="md" align="center">...</col-ui>
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { UIElement } from '../../core/element.js';
|
|
8
8
|
|
|
9
|
-
class
|
|
9
|
+
class UICol extends UIElement {
|
|
10
10
|
static properties = {
|
|
11
11
|
justify: { type: String, default: 'start', reflect: true },
|
|
12
12
|
align: { type: String, default: 'stretch', reflect: true },
|
|
@@ -14,6 +14,6 @@ class AdiaCol extends AdiaElement {
|
|
|
14
14
|
};
|
|
15
15
|
static template = () => null;
|
|
16
16
|
}
|
|
17
|
-
customElements.define('col-ui',
|
|
17
|
+
customElements.define('col-ui', UICol);
|
|
18
18
|
|
|
19
|
-
export {
|
|
19
|
+
export { UICol };
|
package/components/col/col.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Generated by scripts/migrate-yamls-to-v1.mjs — migrated to v1 contract.
|
|
2
2
|
# Edit this file; run `npm run build:components` to regenerate a2ui.json.
|
|
3
3
|
$schema: ../../../../scripts/schemas/component.yaml.schema.json
|
|
4
|
-
name:
|
|
4
|
+
name: UIColumn
|
|
5
5
|
tag: col-ui
|
|
6
6
|
component: Column
|
|
7
7
|
category: layout
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
* #3b82f6 [copy]
|
|
14
14
|
*
|
|
15
15
|
* Dogfoods: slider-ui (H/C/L channels)
|
|
16
|
-
* Form-associated via
|
|
16
|
+
* Form-associated via UIFormElement + ElementInternals.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
import {
|
|
19
|
+
import { UIFormElement } from '../../core/form.js';
|
|
20
20
|
|
|
21
21
|
// ── OKLCH ↔ sRGB conversion ──────────────────────────────
|
|
22
22
|
|
|
@@ -109,9 +109,9 @@ function gamutMapChroma(L, C, H) {
|
|
|
109
109
|
|
|
110
110
|
// ── Component ────────────────────────────────────────────
|
|
111
111
|
|
|
112
|
-
class
|
|
112
|
+
class UIColorPicker extends UIFormElement {
|
|
113
113
|
static properties = {
|
|
114
|
-
...
|
|
114
|
+
...UIFormElement.properties,
|
|
115
115
|
value: { type: String, default: '#3b82f6', reflect: true },
|
|
116
116
|
format: { type: String, default: 'hex', reflect: true },
|
|
117
117
|
disabled: { type: Boolean, default: false, reflect: true },
|
|
@@ -536,5 +536,5 @@ class AdiaColorPicker extends AdiaFormElement {
|
|
|
536
536
|
}
|
|
537
537
|
}
|
|
538
538
|
|
|
539
|
-
customElements.define('color-picker-ui',
|
|
540
|
-
export {
|
|
539
|
+
customElements.define('color-picker-ui', UIColorPicker);
|
|
540
|
+
export { UIColorPicker };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Generated by scripts/migrate-yamls-to-v1.mjs — migrated to v1 contract.
|
|
2
2
|
# Edit this file; run `npm run build:components` to regenerate a2ui.json.
|
|
3
3
|
$schema: ../../../../scripts/schemas/component.yaml.schema.json
|
|
4
|
-
name:
|
|
4
|
+
name: UIColorPicker
|
|
5
5
|
tag: color-picker-ui
|
|
6
6
|
component: ColorPicker
|
|
7
7
|
category: input
|