@agent-ui-kit/web-components 0.0.3 → 0.0.5
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 +429 -0
- package/dist/agent-ui.css +1 -1
- package/dist/api.json +9519 -0
- package/dist/docs/blocks/agent-chat.yaml +111 -0
- package/dist/docs/blocks/announcement-card.yaml +30 -0
- package/dist/docs/blocks/bpm-process.yaml +7 -0
- package/dist/docs/blocks/chart-activity.yaml +73 -0
- package/dist/docs/blocks/chart-card.yaml +55 -0
- package/dist/docs/blocks/chart-donut.yaml +83 -0
- package/dist/docs/blocks/chart-grouped.yaml +75 -0
- package/dist/docs/blocks/chart-horizontal.yaml +59 -0
- package/dist/docs/blocks/chart-interactive.yaml +58 -0
- package/dist/docs/blocks/chart-labeled.yaml +66 -0
- package/dist/docs/blocks/checkout-form.yaml +57 -0
- package/dist/docs/blocks/clinical-trial.yaml +7 -0
- package/dist/docs/blocks/contributors.yaml +51 -0
- package/dist/docs/blocks/cyber-threat.yaml +7 -0
- package/dist/docs/blocks/dashboard-layout.yaml +121 -0
- package/dist/docs/blocks/data-eng-dag.yaml +9 -0
- package/dist/docs/blocks/date-picker.yaml +30 -0
- package/dist/docs/blocks/ddx-workflow.yaml +9 -0
- package/dist/docs/blocks/empty-state.yaml +26 -0
- package/dist/docs/blocks/env-variables.yaml +46 -0
- package/dist/docs/blocks/feature-upgrade.yaml +52 -0
- package/dist/docs/blocks/financial-risk.yaml +7 -0
- package/dist/docs/blocks/flow-editor.yaml +113 -0
- package/dist/docs/blocks/gen-ai-pipeline.yaml +8 -0
- package/dist/docs/blocks/index.yaml +245 -0
- package/dist/docs/blocks/issue-assign.yaml +34 -0
- package/dist/docs/blocks/keyboard-shortcuts.yaml +49 -0
- package/dist/docs/blocks/login-branded.yaml +81 -0
- package/dist/docs/blocks/login-email-only.yaml +39 -0
- package/dist/docs/blocks/login-form.yaml +42 -0
- package/dist/docs/blocks/login-simple.yaml +54 -0
- package/dist/docs/blocks/login-social.yaml +73 -0
- package/dist/docs/blocks/login-two-column.yaml +78 -0
- package/dist/docs/blocks/marketing-automation.yaml +7 -0
- package/dist/docs/blocks/member-list.yaml +58 -0
- package/dist/docs/blocks/ml-pipeline.yaml +7 -0
- package/dist/docs/blocks/nav-card.yaml +27 -0
- package/dist/docs/blocks/notification-list.yaml +58 -0
- package/dist/docs/blocks/oncology-pathway.yaml +7 -0
- package/dist/docs/blocks/pricing-card.yaml +53 -0
- package/dist/docs/blocks/processing-state.yaml +25 -0
- package/dist/docs/blocks/profile-card.yaml +48 -0
- package/dist/docs/blocks/saas-onboarding.yaml +7 -0
- package/dist/docs/blocks/settings-form.yaml +42 -0
- package/dist/docs/blocks/settings-panel.yaml +54 -0
- package/dist/docs/blocks/sidebar-nav.yaml +55 -0
- package/dist/docs/blocks/signup-form.yaml +47 -0
- package/dist/docs/blocks/stat-cards.yaml +49 -0
- package/dist/docs/blocks/status-card.yaml +40 -0
- package/dist/docs/blocks/suggested-labs.yaml +79 -0
- package/dist/docs/blocks/supply-chain.yaml +7 -0
- package/dist/docs/blocks/survey-card.yaml +52 -0
- package/dist/docs/blocks/tabbed-panel.yaml +53 -0
- package/dist/docs/blocks/team-empty.yaml +27 -0
- package/dist/docs/blocks/usage-billing.yaml +99 -0
- package/dist/docs/components/accordion-item.yaml +52 -0
- package/dist/docs/components/accordion.yaml +69 -0
- package/dist/docs/components/agent-activity.yaml +79 -0
- package/dist/docs/components/agent-feed.yaml +83 -0
- package/dist/docs/components/agent-message.yaml +120 -0
- package/dist/docs/components/agent-panel.yaml +91 -0
- package/dist/docs/components/agent-prompt.yaml +78 -0
- package/dist/docs/components/agent-seeds.yaml +44 -0
- package/dist/docs/components/agent-text.yaml +57 -0
- package/dist/docs/components/agent-thread.yaml +82 -0
- package/dist/docs/components/app-shell.yaml +64 -0
- package/dist/docs/components/breadcrumb-item.yaml +49 -0
- package/dist/docs/components/breadcrumb.yaml +59 -0
- package/dist/docs/components/button.yaml +439 -0
- package/dist/docs/components/calendar.yaml +74 -0
- package/dist/docs/components/canvas.yaml +161 -0
- package/dist/docs/components/checkbox.yaml +141 -0
- package/dist/docs/components/command-empty.yaml +13 -0
- package/dist/docs/components/command-group.yaml +23 -0
- package/dist/docs/components/command-input.yaml +19 -0
- package/dist/docs/components/command-item.yaml +37 -0
- package/dist/docs/components/command-list.yaml +17 -0
- package/dist/docs/components/command.yaml +64 -0
- package/dist/docs/components/container.yaml +298 -0
- package/dist/docs/components/dialog.yaml +133 -0
- package/dist/docs/components/drawer.yaml +124 -0
- package/dist/docs/components/editor-layer.yaml +59 -0
- package/dist/docs/components/editor.yaml +168 -0
- package/dist/docs/components/feed.yaml +72 -0
- package/dist/docs/components/field.yaml +145 -0
- package/dist/docs/components/graph-layer.yaml +41 -0
- package/dist/docs/components/graph-node.yaml +58 -0
- package/dist/docs/components/graph-noodle.yaml +103 -0
- package/dist/docs/components/graph-port.yaml +71 -0
- package/dist/docs/components/graph-ui.yaml +64 -0
- package/dist/docs/components/gripper.yaml +55 -0
- package/dist/docs/components/icon.yaml +133 -0
- package/dist/docs/components/index.yaml +320 -0
- package/dist/docs/components/input-otp.yaml +59 -0
- package/dist/docs/components/input.yaml +289 -0
- package/dist/docs/components/noodles.yaml +184 -0
- package/dist/docs/components/optgroup.yaml +38 -0
- package/dist/docs/components/option.yaml +56 -0
- package/dist/docs/components/page-context.yaml +55 -0
- package/dist/docs/components/page-main.yaml +39 -0
- package/dist/docs/components/page.yaml +36 -0
- package/dist/docs/components/pagination.yaml +46 -0
- package/dist/docs/components/pane.yaml +102 -0
- package/dist/docs/components/panes.yaml +82 -0
- package/dist/docs/components/preview-app.yaml +170 -0
- package/dist/docs/components/radio-group.yaml +108 -0
- package/dist/docs/components/radio.yaml +132 -0
- package/dist/docs/components/range.yaml +97 -0
- package/dist/docs/components/root.yaml +18 -0
- package/dist/docs/components/segment.yaml +41 -0
- package/dist/docs/components/segmented-control.yaml +52 -0
- package/dist/docs/components/select.yaml +241 -0
- package/dist/docs/components/sidebar-content.yaml +32 -0
- package/dist/docs/components/sidebar-footer.yaml +28 -0
- package/dist/docs/components/sidebar-header.yaml +28 -0
- package/dist/docs/components/sidebar.yaml +133 -0
- package/dist/docs/components/switch.yaml +131 -0
- package/dist/docs/components/tab-panel.yaml +41 -0
- package/dist/docs/components/tab.yaml +51 -0
- package/dist/docs/components/table-body.yaml +11 -0
- package/dist/docs/components/table-cell.yaml +11 -0
- package/dist/docs/components/table-column.yaml +76 -0
- package/dist/docs/components/table-head.yaml +11 -0
- package/dist/docs/components/table-header.yaml +11 -0
- package/dist/docs/components/table-row.yaml +11 -0
- package/dist/docs/components/table.yaml +219 -0
- package/dist/docs/components/tabs.yaml +61 -0
- package/dist/docs/components/textarea.yaml +196 -0
- package/dist/docs/components/toast.yaml +62 -0
- package/dist/docs/components/tooltip.yaml +98 -0
- package/dist/docs/components/tree-item.yaml +46 -0
- package/dist/docs/components/tree.yaml +27 -0
- package/dist/docs/traits/auto-dismiss.yaml +23 -0
- package/dist/docs/traits/backtick-wrap.yaml +22 -0
- package/dist/docs/traits/clipboard.yaml +31 -0
- package/dist/docs/traits/collapsible.yaml +23 -0
- package/dist/docs/traits/confetti.yaml +37 -0
- package/dist/docs/traits/copy.yaml +27 -0
- package/dist/docs/traits/css-inspect.yaml +46 -0
- package/dist/docs/traits/dismiss.yaml +23 -0
- package/dist/docs/traits/drag.yaml +88 -0
- package/dist/docs/traits/drop-zone.yaml +37 -0
- package/dist/docs/traits/edit.yaml +39 -0
- package/dist/docs/traits/flip.yaml +40 -0
- package/dist/docs/traits/gateway.yaml +33 -0
- package/dist/docs/traits/hover.yaml +39 -0
- package/dist/docs/traits/intersect.yaml +42 -0
- package/dist/docs/traits/link-paste.yaml +28 -0
- package/dist/docs/traits/linked-scroll.yaml +37 -0
- package/dist/docs/traits/list-navigate.yaml +46 -0
- package/dist/docs/traits/magnet.yaml +33 -0
- package/dist/docs/traits/mention.yaml +40 -0
- package/dist/docs/traits/modal.yaml +28 -0
- package/dist/docs/traits/noodle.yaml +45 -0
- package/dist/docs/traits/overlay.yaml +58 -0
- package/dist/docs/traits/pan-zoom.yaml +47 -0
- package/dist/docs/traits/parallax.yaml +36 -0
- package/dist/docs/traits/persist.yaml +42 -0
- package/dist/docs/traits/popover.yaml +28 -0
- package/dist/docs/traits/present.yaml +42 -0
- package/dist/docs/traits/press-hold.yaml +34 -0
- package/dist/docs/traits/range-select.yaml +42 -0
- package/dist/docs/traits/resize.yaml +39 -0
- package/dist/docs/traits/ripple.yaml +20 -0
- package/dist/docs/traits/roving-focus.yaml +30 -0
- package/dist/docs/traits/search.yaml +44 -0
- package/dist/docs/traits/selection.yaml +41 -0
- package/dist/docs/traits/shortcut.yaml +25 -0
- package/dist/docs/traits/slash-command.yaml +40 -0
- package/dist/docs/traits/snap-resize.yaml +39 -0
- package/dist/docs/traits/sort.yaml +47 -0
- package/dist/docs/traits/store.yaml +32 -0
- package/dist/docs/traits/swipe.yaml +38 -0
- package/dist/docs/traits/text-trigger.yaml +35 -0
- package/dist/docs/traits/toast.yaml +41 -0
- package/dist/docs/traits/toggle-scheme.yaml +40 -0
- package/dist/docs/traits/toggle-state.yaml +23 -0
- package/dist/docs/traits/tooltip.yaml +39 -0
- package/dist/docs/traits/toss.yaml +40 -0
- package/dist/docs/traits/trap-focus.yaml +20 -0
- package/dist/docs/traits/validate.yaml +52 -0
- package/dist/docs/traits/virtual-scroll.yaml +44 -0
- package/package.json +4 -2
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
name: aui-agent-message
|
|
2
|
+
tag: aui-agent-message
|
|
3
|
+
type: component
|
|
4
|
+
summary: Individual chat message bubble with action toolbar.
|
|
5
|
+
description: >
|
|
6
|
+
Accepts slotted content: aui-agent-text, aui-agent-activity,
|
|
7
|
+
aui-agent-seeds, or any custom content. Provides a configurable
|
|
8
|
+
action toolbar (copy, retry, edit, feedback) that appears on hover
|
|
9
|
+
via CSS anchor positioning as a popover below the bubble.
|
|
10
|
+
|
|
11
|
+
base: AgentElement
|
|
12
|
+
|
|
13
|
+
attributes:
|
|
14
|
+
role:
|
|
15
|
+
syntax: key-value
|
|
16
|
+
type: string
|
|
17
|
+
default: assistant
|
|
18
|
+
description: Message role — user, assistant, or system.
|
|
19
|
+
|
|
20
|
+
message-id:
|
|
21
|
+
syntax: key-value
|
|
22
|
+
type: string
|
|
23
|
+
default: ""
|
|
24
|
+
description: Unique message identifier.
|
|
25
|
+
|
|
26
|
+
timestamp:
|
|
27
|
+
syntax: key-value
|
|
28
|
+
type: string
|
|
29
|
+
default: ""
|
|
30
|
+
description: Epoch milliseconds.
|
|
31
|
+
|
|
32
|
+
status:
|
|
33
|
+
syntax: key-value
|
|
34
|
+
type: string
|
|
35
|
+
default: sent
|
|
36
|
+
description: >
|
|
37
|
+
Message status — sending, sent, error, streaming, or partial.
|
|
38
|
+
|
|
39
|
+
actions:
|
|
40
|
+
syntax: key-value
|
|
41
|
+
type: string
|
|
42
|
+
default: ""
|
|
43
|
+
description: >
|
|
44
|
+
Comma-separated action list, or "none" to suppress.
|
|
45
|
+
Defaults per role — assistant: copy,retry,feedback-up,feedback-down;
|
|
46
|
+
user: edit,retry.
|
|
47
|
+
|
|
48
|
+
actions-style:
|
|
49
|
+
syntax: key-value
|
|
50
|
+
type: string
|
|
51
|
+
default: icon
|
|
52
|
+
description: Action button style — icon, label, or icon-label.
|
|
53
|
+
|
|
54
|
+
actions-position:
|
|
55
|
+
syntax: key-value
|
|
56
|
+
type: string
|
|
57
|
+
default: below
|
|
58
|
+
description: Toolbar placement — below (popover) or inside (inline).
|
|
59
|
+
|
|
60
|
+
a11y:
|
|
61
|
+
role: article
|
|
62
|
+
|
|
63
|
+
events:
|
|
64
|
+
aui:message-action:
|
|
65
|
+
description: >
|
|
66
|
+
Fired when an action button is clicked.
|
|
67
|
+
detail contains action and messageId.
|
|
68
|
+
|
|
69
|
+
aui:continue-request:
|
|
70
|
+
description: >
|
|
71
|
+
Fired when continue is requested for a partial message.
|
|
72
|
+
detail contains messageId.
|
|
73
|
+
|
|
74
|
+
composition:
|
|
75
|
+
parents: [aui-agent-thread]
|
|
76
|
+
children: [aui-agent-text, aui-agent-activity, aui-agent-seeds, any]
|
|
77
|
+
|
|
78
|
+
examples:
|
|
79
|
+
- html: |
|
|
80
|
+
<aui-agent-message role="assistant" status="sent" message-id="msg-001">
|
|
81
|
+
<aui-agent-text>Based on your project structure, I recommend using a **monorepo** with the following layout:
|
|
82
|
+
|
|
83
|
+
- `packages/core` — shared utilities and types
|
|
84
|
+
- `packages/ui` — component library
|
|
85
|
+
- `apps/web` — main application
|
|
86
|
+
|
|
87
|
+
This keeps dependencies clean and enables independent versioning for each package.</aui-agent-text>
|
|
88
|
+
</aui-agent-message>
|
|
89
|
+
description: Assistant message with default actions (copy, retry, feedback). Hover reveals the action toolbar below.
|
|
90
|
+
|
|
91
|
+
- html: |
|
|
92
|
+
<aui-agent-message role="user" message-id="msg-002">
|
|
93
|
+
<aui-agent-text format="plain">How do I set up path aliases in TypeScript so imports like @/components work across all packages?</aui-agent-text>
|
|
94
|
+
</aui-agent-message>
|
|
95
|
+
description: User message with edit and retry actions.
|
|
96
|
+
|
|
97
|
+
- html: |
|
|
98
|
+
<aui-agent-message role="assistant" status="streaming" message-id="msg-003" actions="none">
|
|
99
|
+
<aui-agent-text>You'll need to configure `paths` in your root `tsconfig.json` and then extend it in each package. Here's the base config:
|
|
100
|
+
|
|
101
|
+
```json
|
|
102
|
+
{
|
|
103
|
+
"compilerOptions": {
|
|
104
|
+
"baseUrl": ".",
|
|
105
|
+
"paths": {
|
|
106
|
+
"@/*": ["./src/*"]
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Each package tsconfig extends this and...</aui-agent-text>
|
|
113
|
+
</aui-agent-message>
|
|
114
|
+
description: Streaming message — content is still arriving. Actions are suppressed during streaming.
|
|
115
|
+
|
|
116
|
+
- html: |
|
|
117
|
+
<aui-agent-message role="assistant" status="error" message-id="msg-004">
|
|
118
|
+
<aui-agent-text format="plain">Something went wrong while generating the response. Please try again.</aui-agent-text>
|
|
119
|
+
</aui-agent-message>
|
|
120
|
+
description: Error message — status="error" applies error styling and surfaces a retry action.
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
name: aui-agent-panel
|
|
2
|
+
tag: aui-agent-panel
|
|
3
|
+
type: component
|
|
4
|
+
summary: Top-level chat shell that composes header, feed, and input.
|
|
5
|
+
description: >
|
|
6
|
+
Layout coordinator for agent chat interfaces. Discovers child
|
|
7
|
+
aui-agent-feed and aui-agent-input elements and provides focus
|
|
8
|
+
delegation via focusComposer(). Sets role="region" with an
|
|
9
|
+
aria-label derived from the panel-title attribute. Does not stamp
|
|
10
|
+
DOM — just discovers and coordinates existing children.
|
|
11
|
+
|
|
12
|
+
base: AgentElement
|
|
13
|
+
|
|
14
|
+
attributes:
|
|
15
|
+
panel-title:
|
|
16
|
+
syntax: string
|
|
17
|
+
type: string
|
|
18
|
+
default: ''
|
|
19
|
+
description: Title for the panel, used as aria-label for the region.
|
|
20
|
+
|
|
21
|
+
auto-focus:
|
|
22
|
+
syntax: string
|
|
23
|
+
type: string
|
|
24
|
+
default: ready
|
|
25
|
+
description: >
|
|
26
|
+
When to auto-focus the composer. 'ready' focuses on activate,
|
|
27
|
+
'open-request' defers until an external signal, 'never' skips.
|
|
28
|
+
|
|
29
|
+
a11y:
|
|
30
|
+
role: region
|
|
31
|
+
aria-label: Derived from panel-title attribute
|
|
32
|
+
|
|
33
|
+
methods:
|
|
34
|
+
focusComposer:
|
|
35
|
+
description: Delegates focus to the child aui-agent-input composer.
|
|
36
|
+
|
|
37
|
+
composition:
|
|
38
|
+
parents: [aui-content, aui-pane, aui-dialog, aui-drawer, div, any]
|
|
39
|
+
children: [aui-header, aui-agent-feed, aui-agent-input, aui-footer]
|
|
40
|
+
|
|
41
|
+
examples:
|
|
42
|
+
- html: |
|
|
43
|
+
<aui-agent-panel panel-title="Design Assistant" max-width="xl" style="height: 32rem;">
|
|
44
|
+
<aui-header dividers>
|
|
45
|
+
<aui-stack direction="row" gap="2" align-items="center">
|
|
46
|
+
<aui-avatar square>AI</aui-avatar>
|
|
47
|
+
<aui-stack gap="0">
|
|
48
|
+
<aui-heading size="sm">Design Assistant</aui-heading>
|
|
49
|
+
<aui-text muted size="xs">Claude 3.5 Sonnet</aui-text>
|
|
50
|
+
</aui-stack>
|
|
51
|
+
</aui-stack>
|
|
52
|
+
<aui-badge accent slot="trailing">Online</aui-badge>
|
|
53
|
+
</aui-header>
|
|
54
|
+
<aui-agent-feed auto-scroll scrollable>
|
|
55
|
+
<aui-agent-thread role="user" sender="You">
|
|
56
|
+
<aui-agent-message role="user">
|
|
57
|
+
<aui-agent-text format="plain">How should I structure the color system?</aui-agent-text>
|
|
58
|
+
</aui-agent-message>
|
|
59
|
+
</aui-agent-thread>
|
|
60
|
+
<aui-agent-thread role="assistant" sender="Claude">
|
|
61
|
+
<aui-avatar>C</aui-avatar>
|
|
62
|
+
<aui-agent-message role="assistant">
|
|
63
|
+
<aui-agent-text>I recommend a **three-layer approach**: primitives, semantic tokens, and component tokens.</aui-agent-text>
|
|
64
|
+
</aui-agent-message>
|
|
65
|
+
</aui-agent-thread>
|
|
66
|
+
</aui-agent-feed>
|
|
67
|
+
<aui-agent-input>
|
|
68
|
+
<aui-agent-prompt>
|
|
69
|
+
<aui-textarea placeholder="Ask a follow-up question..."></aui-textarea>
|
|
70
|
+
</aui-agent-prompt>
|
|
71
|
+
</aui-agent-input>
|
|
72
|
+
</aui-agent-panel>
|
|
73
|
+
description: Full chat panel with header, message feed, and composer input.
|
|
74
|
+
|
|
75
|
+
- html: |
|
|
76
|
+
<aui-agent-panel panel-title="Quick Chat" max-width="xl" style="height: 24rem;">
|
|
77
|
+
<aui-agent-feed auto-scroll scrollable>
|
|
78
|
+
<aui-agent-thread role="assistant" sender="Claude">
|
|
79
|
+
<aui-avatar>C</aui-avatar>
|
|
80
|
+
<aui-agent-message role="assistant">
|
|
81
|
+
<aui-agent-text>Hello! How can I help you today?</aui-agent-text>
|
|
82
|
+
</aui-agent-message>
|
|
83
|
+
</aui-agent-thread>
|
|
84
|
+
</aui-agent-feed>
|
|
85
|
+
<aui-agent-input>
|
|
86
|
+
<aui-agent-prompt>
|
|
87
|
+
<aui-textarea placeholder="Type a message..."></aui-textarea>
|
|
88
|
+
</aui-agent-prompt>
|
|
89
|
+
</aui-agent-input>
|
|
90
|
+
</aui-agent-panel>
|
|
91
|
+
description: Minimal chat panel with just feed and input, no header.
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
name: aui-agent-prompt
|
|
2
|
+
tag: aui-agent-prompt
|
|
3
|
+
type: component
|
|
4
|
+
summary: Bordered prompt container for the chat composer textarea.
|
|
5
|
+
description: >
|
|
6
|
+
Visual wrapper around the textarea inside aui-agent-input.
|
|
7
|
+
Provides bordered styling with focus ring when the inner
|
|
8
|
+
aui-textarea gains focus. Contains aui-textarea, optional
|
|
9
|
+
inline action buttons (ghost + hide-label), and a bottom
|
|
10
|
+
toolbar via aui-inset > aui-select mode="bar" transparent.
|
|
11
|
+
|
|
12
|
+
base: AgentElement
|
|
13
|
+
|
|
14
|
+
attributes:
|
|
15
|
+
disabled:
|
|
16
|
+
syntax: boolean
|
|
17
|
+
type: boolean
|
|
18
|
+
default: false
|
|
19
|
+
description: Disables interaction.
|
|
20
|
+
inline:
|
|
21
|
+
syntax: boolean
|
|
22
|
+
type: boolean
|
|
23
|
+
default: false
|
|
24
|
+
description: >
|
|
25
|
+
Single-line mode. Switches to row layout with textarea and send
|
|
26
|
+
button side-by-side. Textarea gets compact block padding and the
|
|
27
|
+
trailing button sits inline. Toolbar border is suppressed.
|
|
28
|
+
|
|
29
|
+
composition:
|
|
30
|
+
parents: [aui-agent-input, aui-stack]
|
|
31
|
+
children: [aui-textarea, aui-button, aui-inset, any]
|
|
32
|
+
|
|
33
|
+
examples:
|
|
34
|
+
- html: |
|
|
35
|
+
<aui-agent-prompt>
|
|
36
|
+
<aui-textarea placeholder="Describe what you need help with..."></aui-textarea>
|
|
37
|
+
</aui-agent-prompt>
|
|
38
|
+
description: Basic bordered prompt with textarea — focus ring activates when textarea is focused.
|
|
39
|
+
|
|
40
|
+
- html: |
|
|
41
|
+
<aui-agent-prompt>
|
|
42
|
+
<aui-textarea placeholder="Ask anything..."></aui-textarea>
|
|
43
|
+
<div data-role="leading">
|
|
44
|
+
<aui-button ghost size="sm">
|
|
45
|
+
<aui-icon name="sparkles"></aui-icon>
|
|
46
|
+
</aui-button>
|
|
47
|
+
</div>
|
|
48
|
+
</aui-agent-prompt>
|
|
49
|
+
description: Prompt with an inline action icon (sparkle) positioned beside the textarea for triggering AI features.
|
|
50
|
+
|
|
51
|
+
- html: |
|
|
52
|
+
<aui-agent-prompt>
|
|
53
|
+
<aui-textarea placeholder="What would you like to build today?"></aui-textarea>
|
|
54
|
+
<div data-role="actions">
|
|
55
|
+
<aui-button ghost size="sm">
|
|
56
|
+
<aui-icon name="paperclip"></aui-icon>
|
|
57
|
+
</aui-button>
|
|
58
|
+
<aui-button ghost size="sm">
|
|
59
|
+
<aui-icon name="image"></aui-icon>
|
|
60
|
+
</aui-button>
|
|
61
|
+
<aui-button ghost size="sm">
|
|
62
|
+
<aui-icon name="microphone"></aui-icon>
|
|
63
|
+
</aui-button>
|
|
64
|
+
<aui-button primary data-submit>Send</aui-button>
|
|
65
|
+
</div>
|
|
66
|
+
</aui-agent-prompt>
|
|
67
|
+
description: >
|
|
68
|
+
Prompt with action toolbar below textarea — attach files, upload images,
|
|
69
|
+
voice input, and send.
|
|
70
|
+
|
|
71
|
+
- html: |
|
|
72
|
+
<aui-agent-prompt inline>
|
|
73
|
+
<aui-textarea placeholder="Quick message..."></aui-textarea>
|
|
74
|
+
<aui-button round label="Send" data-submit hide-label><aui-icon name="arrow-up"></aui-icon></aui-button>
|
|
75
|
+
</aui-agent-prompt>
|
|
76
|
+
description: >
|
|
77
|
+
Inline single-line prompt with textarea and send button side-by-side.
|
|
78
|
+
Row layout with compact padding, no toolbar border.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
name: aui-agent-seeds
|
|
2
|
+
tag: aui-agent-seeds
|
|
3
|
+
type: component
|
|
4
|
+
summary: Suggestion chips for pre-seeded quick responses.
|
|
5
|
+
description: >
|
|
6
|
+
Renders a wrapped row of outline-styled chips from a JSON options array.
|
|
7
|
+
Each chip fires aui:seed-select on click with the option's value and label.
|
|
8
|
+
|
|
9
|
+
base: AgentElement
|
|
10
|
+
|
|
11
|
+
attributes:
|
|
12
|
+
options:
|
|
13
|
+
syntax: key-value
|
|
14
|
+
type: string
|
|
15
|
+
default: ""
|
|
16
|
+
description: >
|
|
17
|
+
JSON array of { value, label, icon? } objects.
|
|
18
|
+
|
|
19
|
+
disabled:
|
|
20
|
+
syntax: boolean
|
|
21
|
+
type: boolean
|
|
22
|
+
default: false
|
|
23
|
+
description: Disables all chips.
|
|
24
|
+
|
|
25
|
+
events:
|
|
26
|
+
aui:seed-select:
|
|
27
|
+
description: >
|
|
28
|
+
Fired when a chip is clicked.
|
|
29
|
+
detail contains value and label.
|
|
30
|
+
|
|
31
|
+
composition:
|
|
32
|
+
parents: [aui-agent-message, aui-agent-feed]
|
|
33
|
+
children: []
|
|
34
|
+
|
|
35
|
+
examples:
|
|
36
|
+
- html: |
|
|
37
|
+
<aui-agent-seeds options='[{"value":"clarify","label":"Clarify user problem"},{"value":"context","label":"Define user context"},{"value":"deliverable","label":"Select deliverable"},{"value":"timeline","label":"Set timeline"}]'>
|
|
38
|
+
</aui-agent-seeds>
|
|
39
|
+
description: Quick action suggestions — common follow-up actions presented as selectable chips below the composer or a message.
|
|
40
|
+
|
|
41
|
+
- html: |
|
|
42
|
+
<aui-agent-seeds options='[{"value":"write-email","label":"Draft an email","icon":"mail"},{"value":"summarize","label":"Summarize a document","icon":"file-text"},{"value":"brainstorm","label":"Brainstorm ideas","icon":"lightbulb"},{"value":"analyze-data","label":"Analyze data","icon":"chart-bar"}]'>
|
|
43
|
+
</aui-agent-seeds>
|
|
44
|
+
description: Conversation starters with icons — used on an empty chat state to help users begin a session with common tasks.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
name: aui-agent-text
|
|
2
|
+
tag: aui-agent-text
|
|
3
|
+
type: component
|
|
4
|
+
summary: Markdown renderer for chat message content.
|
|
5
|
+
description: >
|
|
6
|
+
Renders a markdown subset (paragraphs, headings, lists, code fences,
|
|
7
|
+
inline code, bold, italic, links, blockquotes) to sanitized HTML.
|
|
8
|
+
Content can come from text content or the content property.
|
|
9
|
+
Debounced rendering during streaming updates.
|
|
10
|
+
|
|
11
|
+
base: AgentElement
|
|
12
|
+
|
|
13
|
+
attributes:
|
|
14
|
+
format:
|
|
15
|
+
syntax: key-value
|
|
16
|
+
type: string
|
|
17
|
+
default: markdown
|
|
18
|
+
description: Render format — markdown (default) or plain.
|
|
19
|
+
|
|
20
|
+
composition:
|
|
21
|
+
parents: [aui-agent-message]
|
|
22
|
+
children: []
|
|
23
|
+
|
|
24
|
+
examples:
|
|
25
|
+
- html: |
|
|
26
|
+
<aui-agent-text>## Getting Started
|
|
27
|
+
|
|
28
|
+
To install the package, run:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npm install @agent-ui/kit
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Key features
|
|
35
|
+
|
|
36
|
+
- **Zero dependencies** — no runtime bloat
|
|
37
|
+
- **Web standards** — built on custom elements
|
|
38
|
+
- **Accessible** — ARIA roles and keyboard nav built in
|
|
39
|
+
|
|
40
|
+
> Note: Requires a modern browser with custom element support.
|
|
41
|
+
|
|
42
|
+
See the [documentation](https://example.com/docs) for the full API reference.</aui-agent-text>
|
|
43
|
+
description: Rich markdown rendering with headings, code fences, bullet lists, blockquotes, bold text, and links.
|
|
44
|
+
|
|
45
|
+
- html: |
|
|
46
|
+
<aui-agent-text format="plain">The deployment completed successfully. All 47 tests passed and the build artifact was uploaded to s3://releases/v2.1.0/bundle.tar.gz. No breaking changes detected.</aui-agent-text>
|
|
47
|
+
description: Plain text mode — no markdown processing, rendered as-is.
|
|
48
|
+
|
|
49
|
+
- html: |
|
|
50
|
+
<aui-agent-text>Here are the three main approaches to state management:
|
|
51
|
+
|
|
52
|
+
1. **Local component state** — simplest, works for isolated UI
|
|
53
|
+
2. **Context/Provider pattern** — good for shared state within a subtree
|
|
54
|
+
3. **External store** — best for complex, cross-cutting state
|
|
55
|
+
|
|
56
|
+
For your use case, I'd recommend starting with option 2 and migrating to an external store only if you hit performance issues with deeply nested...</aui-agent-text>
|
|
57
|
+
description: Streaming content — text cuts off mid-sentence while the response is still being generated. The renderer handles partial markdown gracefully.
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
name: aui-agent-thread
|
|
2
|
+
tag: aui-agent-thread
|
|
3
|
+
type: component
|
|
4
|
+
summary: Message group with 2x2 grid layout for avatar, context, and bubbles.
|
|
5
|
+
description: >
|
|
6
|
+
Cluster of messages from the same sender. Provides a 2x2 grid layout:
|
|
7
|
+
col 1 = avatar (bottom-aligned), col 2 row 1 = context area (metadata),
|
|
8
|
+
col 2 row 2 = bubbles area (message flex column). A MutationObserver
|
|
9
|
+
routes dynamically added children into the correct wrapper.
|
|
10
|
+
|
|
11
|
+
base: AgentElement
|
|
12
|
+
|
|
13
|
+
attributes:
|
|
14
|
+
role:
|
|
15
|
+
syntax: key-value
|
|
16
|
+
type: string
|
|
17
|
+
default: ""
|
|
18
|
+
description: Message role — user, assistant, or system.
|
|
19
|
+
|
|
20
|
+
sender:
|
|
21
|
+
syntax: key-value
|
|
22
|
+
type: string
|
|
23
|
+
default: ""
|
|
24
|
+
description: Display name of the sender.
|
|
25
|
+
|
|
26
|
+
avatar-align:
|
|
27
|
+
syntax: key-value
|
|
28
|
+
type: string
|
|
29
|
+
default: ""
|
|
30
|
+
description: Avatar vertical alignment — top, center, or bottom (default).
|
|
31
|
+
|
|
32
|
+
a11y:
|
|
33
|
+
role: group
|
|
34
|
+
aria-label: Messages from {sender}
|
|
35
|
+
|
|
36
|
+
composition:
|
|
37
|
+
parents: [aui-agent-feed]
|
|
38
|
+
children: [aui-avatar, aui-agent-message, any]
|
|
39
|
+
|
|
40
|
+
examples:
|
|
41
|
+
- html: |
|
|
42
|
+
<aui-agent-thread role="assistant" sender="Claude">
|
|
43
|
+
<aui-avatar>C</aui-avatar>
|
|
44
|
+
<aui-agent-message role="assistant">
|
|
45
|
+
<aui-agent-text>I've analyzed your codebase and found three potential performance bottlenecks in the data processing pipeline. Let me walk through each one.</aui-agent-text>
|
|
46
|
+
</aui-agent-message>
|
|
47
|
+
</aui-agent-thread>
|
|
48
|
+
description: Assistant thread with avatar and a single message bubble.
|
|
49
|
+
|
|
50
|
+
- html: |
|
|
51
|
+
<aui-agent-thread role="user" sender="Sarah">
|
|
52
|
+
<aui-agent-message role="user">
|
|
53
|
+
<aui-agent-text format="plain">Can you refactor the authentication module to use JWT instead of session cookies?</aui-agent-text>
|
|
54
|
+
</aui-agent-message>
|
|
55
|
+
</aui-agent-thread>
|
|
56
|
+
description: User thread — right-aligned with no avatar.
|
|
57
|
+
|
|
58
|
+
- html: |
|
|
59
|
+
<aui-agent-thread role="assistant" sender="Claude" avatar-align="top">
|
|
60
|
+
<aui-avatar>C</aui-avatar>
|
|
61
|
+
<div data-role="context">
|
|
62
|
+
<aui-text muted size="xs">Claude 3.5 Sonnet · 2.4s · 347 tokens</aui-text>
|
|
63
|
+
</div>
|
|
64
|
+
<aui-agent-message role="assistant">
|
|
65
|
+
<aui-agent-text>Here's the refactored auth module using JWT:</aui-agent-text>
|
|
66
|
+
</aui-agent-message>
|
|
67
|
+
<aui-agent-message role="assistant">
|
|
68
|
+
<aui-agent-text>```typescript
|
|
69
|
+
import jwt from 'jsonwebtoken';
|
|
70
|
+
|
|
71
|
+
export function generateToken(userId: string): string {
|
|
72
|
+
return jwt.sign({ sub: userId }, process.env.JWT_SECRET!, {
|
|
73
|
+
expiresIn: '7d',
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
```</aui-agent-text>
|
|
77
|
+
</aui-agent-message>
|
|
78
|
+
<aui-agent-message role="assistant">
|
|
79
|
+
<aui-agent-text>I've split the token generation and verification into separate functions for better testability. The refresh token rotation is handled in the middleware layer.</aui-agent-text>
|
|
80
|
+
</aui-agent-message>
|
|
81
|
+
</aui-agent-thread>
|
|
82
|
+
description: Multi-message thread with context metadata (model, latency, token count) and top-aligned avatar.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
name: aui-app-shell
|
|
2
|
+
tag: aui-app-shell
|
|
3
|
+
type: component
|
|
4
|
+
summary: Full-page application shell with sidebar and content column.
|
|
5
|
+
description: >
|
|
6
|
+
Top-level layout component. Horizontal flex layout spanning the full
|
|
7
|
+
viewport height. Contains a collapsible sidebar and a page column
|
|
8
|
+
with context bar and main content area.
|
|
9
|
+
|
|
10
|
+
base: AgentElement
|
|
11
|
+
|
|
12
|
+
a11y:
|
|
13
|
+
role: application
|
|
14
|
+
|
|
15
|
+
composition:
|
|
16
|
+
parents: [body]
|
|
17
|
+
children:
|
|
18
|
+
typical: [aui-sidebar, aui-page]
|
|
19
|
+
pattern: >
|
|
20
|
+
Sidebar on one side (left by default) and aui-page filling
|
|
21
|
+
the remaining space. The shell scopes layout styles for all
|
|
22
|
+
nested page and sidebar descendants.
|
|
23
|
+
context: >
|
|
24
|
+
The root layout for full-page applications. Manages the
|
|
25
|
+
relationship between sidebar width and content column flex.
|
|
26
|
+
|
|
27
|
+
tokens:
|
|
28
|
+
color:
|
|
29
|
+
- --aui-doc
|
|
30
|
+
- --aui-ink
|
|
31
|
+
- --aui-panel
|
|
32
|
+
- --aui-border
|
|
33
|
+
typography:
|
|
34
|
+
- --aui-font-family
|
|
35
|
+
sizing:
|
|
36
|
+
- --aui-space
|
|
37
|
+
- --aui-radius
|
|
38
|
+
- --aui-pad-control-block
|
|
39
|
+
- --aui-size
|
|
40
|
+
|
|
41
|
+
examples:
|
|
42
|
+
- html: |
|
|
43
|
+
<aui-app-shell>
|
|
44
|
+
<aui-sidebar width="240" collapsible>
|
|
45
|
+
<aui-sidebar-header>
|
|
46
|
+
<aui-nav-item label="App" icon="grid"></aui-nav-item>
|
|
47
|
+
</aui-sidebar-header>
|
|
48
|
+
<aui-sidebar-content>
|
|
49
|
+
<aui-nav-item label="Home" icon="home"></aui-nav-item>
|
|
50
|
+
<aui-nav-item label="Settings" icon="settings"></aui-nav-item>
|
|
51
|
+
</aui-sidebar-content>
|
|
52
|
+
</aui-sidebar>
|
|
53
|
+
<aui-page>
|
|
54
|
+
<aui-page-context>
|
|
55
|
+
<aui-breadcrumb>
|
|
56
|
+
<aui-breadcrumb-item label="Home"></aui-breadcrumb-item>
|
|
57
|
+
</aui-breadcrumb>
|
|
58
|
+
</aui-page-context>
|
|
59
|
+
<aui-page-main>
|
|
60
|
+
<main>Page content</main>
|
|
61
|
+
</aui-page-main>
|
|
62
|
+
</aui-page>
|
|
63
|
+
</aui-app-shell>
|
|
64
|
+
description: Complete app shell with sidebar navigation and page content.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
name: aui-breadcrumb-item
|
|
2
|
+
tag: aui-breadcrumb-item
|
|
3
|
+
type: component
|
|
4
|
+
summary: Individual breadcrumb link or current-page indicator.
|
|
5
|
+
description: >
|
|
6
|
+
A single entry in a breadcrumb trail. Set href for a link,
|
|
7
|
+
or current for the active page (no link, bold text).
|
|
8
|
+
Always used inside aui-breadcrumb.
|
|
9
|
+
|
|
10
|
+
base: AgentElement
|
|
11
|
+
|
|
12
|
+
attributes:
|
|
13
|
+
href:
|
|
14
|
+
syntax: key-value
|
|
15
|
+
type: string
|
|
16
|
+
default: ""
|
|
17
|
+
description: Navigation URL. Stamps an anchor element when set.
|
|
18
|
+
|
|
19
|
+
current:
|
|
20
|
+
syntax: boolean
|
|
21
|
+
type: boolean
|
|
22
|
+
default: false
|
|
23
|
+
description: Marks this item as the current page (aria-current="page").
|
|
24
|
+
|
|
25
|
+
a11y:
|
|
26
|
+
aria:
|
|
27
|
+
aria-current: page (when current is set).
|
|
28
|
+
|
|
29
|
+
composition:
|
|
30
|
+
parents: [aui-breadcrumb]
|
|
31
|
+
children: null
|
|
32
|
+
|
|
33
|
+
examples:
|
|
34
|
+
- html: |
|
|
35
|
+
<aui-breadcrumb>
|
|
36
|
+
<aui-breadcrumb-item href="/">Home</aui-breadcrumb-item>
|
|
37
|
+
<aui-breadcrumb-item href="/settings">Settings</aui-breadcrumb-item>
|
|
38
|
+
<aui-breadcrumb-item current>Profile</aui-breadcrumb-item>
|
|
39
|
+
</aui-breadcrumb>
|
|
40
|
+
description: Full breadcrumb trail with link items and current page.
|
|
41
|
+
|
|
42
|
+
- html: |
|
|
43
|
+
<aui-breadcrumb>
|
|
44
|
+
<aui-breadcrumb-item href="/">Home</aui-breadcrumb-item>
|
|
45
|
+
<aui-breadcrumb-item href="/products">Products</aui-breadcrumb-item>
|
|
46
|
+
<aui-breadcrumb-item href="/products/widgets">Widgets</aui-breadcrumb-item>
|
|
47
|
+
<aui-breadcrumb-item current>Deluxe Widget</aui-breadcrumb-item>
|
|
48
|
+
</aui-breadcrumb>
|
|
49
|
+
description: Deep breadcrumb trail with four levels.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
name: aui-breadcrumb
|
|
2
|
+
tag: aui-breadcrumb
|
|
3
|
+
type: component
|
|
4
|
+
summary: Breadcrumb navigation trail.
|
|
5
|
+
description: >
|
|
6
|
+
Container for aui-breadcrumb-item children. Sets role="navigation"
|
|
7
|
+
and aria-label. Separators are rendered via CSS between items.
|
|
8
|
+
|
|
9
|
+
base: AgentElement
|
|
10
|
+
|
|
11
|
+
attributes:
|
|
12
|
+
label:
|
|
13
|
+
syntax: key-value
|
|
14
|
+
type: string
|
|
15
|
+
default: Breadcrumb
|
|
16
|
+
description: Accessible label for the navigation landmark.
|
|
17
|
+
|
|
18
|
+
joiner:
|
|
19
|
+
syntax: key-value
|
|
20
|
+
type: string
|
|
21
|
+
default: "/"
|
|
22
|
+
description: >
|
|
23
|
+
Separator character between breadcrumb items.
|
|
24
|
+
Common values: "/" "›" "→" "·"
|
|
25
|
+
|
|
26
|
+
a11y:
|
|
27
|
+
role: navigation
|
|
28
|
+
aria:
|
|
29
|
+
aria-label: Set from label attribute.
|
|
30
|
+
|
|
31
|
+
composition:
|
|
32
|
+
parents: [any]
|
|
33
|
+
children: [aui-breadcrumb-item]
|
|
34
|
+
|
|
35
|
+
examples:
|
|
36
|
+
- html: |
|
|
37
|
+
<aui-breadcrumb>
|
|
38
|
+
<aui-breadcrumb-item href="/">Home</aui-breadcrumb-item>
|
|
39
|
+
<aui-breadcrumb-item href="/settings">Settings</aui-breadcrumb-item>
|
|
40
|
+
<aui-breadcrumb-item current>Profile</aui-breadcrumb-item>
|
|
41
|
+
</aui-breadcrumb>
|
|
42
|
+
description: Typical three-level breadcrumb trail.
|
|
43
|
+
|
|
44
|
+
- html: |
|
|
45
|
+
<aui-breadcrumb>
|
|
46
|
+
<aui-breadcrumb-item href="/">Home</aui-breadcrumb-item>
|
|
47
|
+
<aui-breadcrumb-item href="/products">Products</aui-breadcrumb-item>
|
|
48
|
+
<aui-breadcrumb-item href="/products/widgets">Widgets</aui-breadcrumb-item>
|
|
49
|
+
<aui-breadcrumb-item current>Deluxe Widget</aui-breadcrumb-item>
|
|
50
|
+
</aui-breadcrumb>
|
|
51
|
+
description: Deep breadcrumb trail with four levels.
|
|
52
|
+
|
|
53
|
+
- html: |
|
|
54
|
+
<aui-breadcrumb joiner="›">
|
|
55
|
+
<aui-breadcrumb-item href="/">Home</aui-breadcrumb-item>
|
|
56
|
+
<aui-breadcrumb-item href="/docs">Docs</aui-breadcrumb-item>
|
|
57
|
+
<aui-breadcrumb-item current>API</aui-breadcrumb-item>
|
|
58
|
+
</aui-breadcrumb>
|
|
59
|
+
description: Custom joiner character (›).
|