@agent-ui-kit/web-components 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (186) hide show
  1. package/README.md +429 -0
  2. package/dist/agent-ui.css +1 -1
  3. package/dist/api.json +9519 -0
  4. package/dist/docs/blocks/agent-chat.yaml +111 -0
  5. package/dist/docs/blocks/announcement-card.yaml +30 -0
  6. package/dist/docs/blocks/bpm-process.yaml +7 -0
  7. package/dist/docs/blocks/chart-activity.yaml +73 -0
  8. package/dist/docs/blocks/chart-card.yaml +55 -0
  9. package/dist/docs/blocks/chart-donut.yaml +83 -0
  10. package/dist/docs/blocks/chart-grouped.yaml +75 -0
  11. package/dist/docs/blocks/chart-horizontal.yaml +59 -0
  12. package/dist/docs/blocks/chart-interactive.yaml +58 -0
  13. package/dist/docs/blocks/chart-labeled.yaml +66 -0
  14. package/dist/docs/blocks/checkout-form.yaml +57 -0
  15. package/dist/docs/blocks/clinical-trial.yaml +7 -0
  16. package/dist/docs/blocks/contributors.yaml +51 -0
  17. package/dist/docs/blocks/cyber-threat.yaml +7 -0
  18. package/dist/docs/blocks/dashboard-layout.yaml +121 -0
  19. package/dist/docs/blocks/data-eng-dag.yaml +9 -0
  20. package/dist/docs/blocks/date-picker.yaml +30 -0
  21. package/dist/docs/blocks/ddx-workflow.yaml +9 -0
  22. package/dist/docs/blocks/empty-state.yaml +26 -0
  23. package/dist/docs/blocks/env-variables.yaml +46 -0
  24. package/dist/docs/blocks/feature-upgrade.yaml +52 -0
  25. package/dist/docs/blocks/financial-risk.yaml +7 -0
  26. package/dist/docs/blocks/flow-editor.yaml +113 -0
  27. package/dist/docs/blocks/gen-ai-pipeline.yaml +8 -0
  28. package/dist/docs/blocks/index.yaml +245 -0
  29. package/dist/docs/blocks/issue-assign.yaml +34 -0
  30. package/dist/docs/blocks/keyboard-shortcuts.yaml +49 -0
  31. package/dist/docs/blocks/login-branded.yaml +81 -0
  32. package/dist/docs/blocks/login-email-only.yaml +39 -0
  33. package/dist/docs/blocks/login-form.yaml +42 -0
  34. package/dist/docs/blocks/login-simple.yaml +54 -0
  35. package/dist/docs/blocks/login-social.yaml +73 -0
  36. package/dist/docs/blocks/login-two-column.yaml +78 -0
  37. package/dist/docs/blocks/marketing-automation.yaml +7 -0
  38. package/dist/docs/blocks/member-list.yaml +58 -0
  39. package/dist/docs/blocks/ml-pipeline.yaml +7 -0
  40. package/dist/docs/blocks/nav-card.yaml +27 -0
  41. package/dist/docs/blocks/notification-list.yaml +58 -0
  42. package/dist/docs/blocks/oncology-pathway.yaml +7 -0
  43. package/dist/docs/blocks/pricing-card.yaml +53 -0
  44. package/dist/docs/blocks/processing-state.yaml +25 -0
  45. package/dist/docs/blocks/profile-card.yaml +48 -0
  46. package/dist/docs/blocks/saas-onboarding.yaml +7 -0
  47. package/dist/docs/blocks/settings-form.yaml +42 -0
  48. package/dist/docs/blocks/settings-panel.yaml +54 -0
  49. package/dist/docs/blocks/sidebar-nav.yaml +55 -0
  50. package/dist/docs/blocks/signup-form.yaml +47 -0
  51. package/dist/docs/blocks/stat-cards.yaml +49 -0
  52. package/dist/docs/blocks/status-card.yaml +40 -0
  53. package/dist/docs/blocks/suggested-labs.yaml +79 -0
  54. package/dist/docs/blocks/supply-chain.yaml +7 -0
  55. package/dist/docs/blocks/survey-card.yaml +52 -0
  56. package/dist/docs/blocks/tabbed-panel.yaml +53 -0
  57. package/dist/docs/blocks/team-empty.yaml +27 -0
  58. package/dist/docs/blocks/usage-billing.yaml +99 -0
  59. package/dist/docs/components/accordion-item.yaml +52 -0
  60. package/dist/docs/components/accordion.yaml +69 -0
  61. package/dist/docs/components/agent-activity.yaml +79 -0
  62. package/dist/docs/components/agent-feed.yaml +83 -0
  63. package/dist/docs/components/agent-message.yaml +120 -0
  64. package/dist/docs/components/agent-panel.yaml +91 -0
  65. package/dist/docs/components/agent-prompt.yaml +78 -0
  66. package/dist/docs/components/agent-seeds.yaml +44 -0
  67. package/dist/docs/components/agent-text.yaml +57 -0
  68. package/dist/docs/components/agent-thread.yaml +82 -0
  69. package/dist/docs/components/app-shell.yaml +64 -0
  70. package/dist/docs/components/breadcrumb-item.yaml +49 -0
  71. package/dist/docs/components/breadcrumb.yaml +59 -0
  72. package/dist/docs/components/button.yaml +439 -0
  73. package/dist/docs/components/calendar.yaml +74 -0
  74. package/dist/docs/components/canvas.yaml +161 -0
  75. package/dist/docs/components/checkbox.yaml +141 -0
  76. package/dist/docs/components/command-empty.yaml +13 -0
  77. package/dist/docs/components/command-group.yaml +23 -0
  78. package/dist/docs/components/command-input.yaml +19 -0
  79. package/dist/docs/components/command-item.yaml +37 -0
  80. package/dist/docs/components/command-list.yaml +17 -0
  81. package/dist/docs/components/command.yaml +64 -0
  82. package/dist/docs/components/container.yaml +298 -0
  83. package/dist/docs/components/dialog.yaml +133 -0
  84. package/dist/docs/components/drawer.yaml +124 -0
  85. package/dist/docs/components/editor-layer.yaml +59 -0
  86. package/dist/docs/components/editor.yaml +168 -0
  87. package/dist/docs/components/feed.yaml +72 -0
  88. package/dist/docs/components/field.yaml +145 -0
  89. package/dist/docs/components/graph-layer.yaml +41 -0
  90. package/dist/docs/components/graph-node.yaml +58 -0
  91. package/dist/docs/components/graph-noodle.yaml +103 -0
  92. package/dist/docs/components/graph-port.yaml +71 -0
  93. package/dist/docs/components/graph-ui.yaml +64 -0
  94. package/dist/docs/components/gripper.yaml +55 -0
  95. package/dist/docs/components/icon.yaml +133 -0
  96. package/dist/docs/components/index.yaml +320 -0
  97. package/dist/docs/components/input-otp.yaml +59 -0
  98. package/dist/docs/components/input.yaml +289 -0
  99. package/dist/docs/components/noodles.yaml +184 -0
  100. package/dist/docs/components/optgroup.yaml +38 -0
  101. package/dist/docs/components/option.yaml +56 -0
  102. package/dist/docs/components/page-context.yaml +55 -0
  103. package/dist/docs/components/page-main.yaml +39 -0
  104. package/dist/docs/components/page.yaml +36 -0
  105. package/dist/docs/components/pagination.yaml +46 -0
  106. package/dist/docs/components/pane.yaml +102 -0
  107. package/dist/docs/components/panes.yaml +82 -0
  108. package/dist/docs/components/preview-app.yaml +170 -0
  109. package/dist/docs/components/radio-group.yaml +108 -0
  110. package/dist/docs/components/radio.yaml +132 -0
  111. package/dist/docs/components/range.yaml +97 -0
  112. package/dist/docs/components/root.yaml +18 -0
  113. package/dist/docs/components/segment.yaml +41 -0
  114. package/dist/docs/components/segmented-control.yaml +52 -0
  115. package/dist/docs/components/select.yaml +241 -0
  116. package/dist/docs/components/sidebar-content.yaml +32 -0
  117. package/dist/docs/components/sidebar-footer.yaml +28 -0
  118. package/dist/docs/components/sidebar-header.yaml +28 -0
  119. package/dist/docs/components/sidebar.yaml +133 -0
  120. package/dist/docs/components/switch.yaml +131 -0
  121. package/dist/docs/components/tab-panel.yaml +41 -0
  122. package/dist/docs/components/tab.yaml +51 -0
  123. package/dist/docs/components/table-body.yaml +11 -0
  124. package/dist/docs/components/table-cell.yaml +11 -0
  125. package/dist/docs/components/table-column.yaml +76 -0
  126. package/dist/docs/components/table-head.yaml +11 -0
  127. package/dist/docs/components/table-header.yaml +11 -0
  128. package/dist/docs/components/table-row.yaml +11 -0
  129. package/dist/docs/components/table.yaml +219 -0
  130. package/dist/docs/components/tabs.yaml +61 -0
  131. package/dist/docs/components/textarea.yaml +196 -0
  132. package/dist/docs/components/toast.yaml +62 -0
  133. package/dist/docs/components/tooltip.yaml +98 -0
  134. package/dist/docs/components/tree-item.yaml +46 -0
  135. package/dist/docs/components/tree.yaml +27 -0
  136. package/dist/docs/traits/auto-dismiss.yaml +23 -0
  137. package/dist/docs/traits/backtick-wrap.yaml +22 -0
  138. package/dist/docs/traits/clipboard.yaml +31 -0
  139. package/dist/docs/traits/collapsible.yaml +23 -0
  140. package/dist/docs/traits/confetti.yaml +37 -0
  141. package/dist/docs/traits/copy.yaml +27 -0
  142. package/dist/docs/traits/css-inspect.yaml +46 -0
  143. package/dist/docs/traits/dismiss.yaml +23 -0
  144. package/dist/docs/traits/drag.yaml +88 -0
  145. package/dist/docs/traits/drop-zone.yaml +37 -0
  146. package/dist/docs/traits/edit.yaml +39 -0
  147. package/dist/docs/traits/flip.yaml +40 -0
  148. package/dist/docs/traits/gateway.yaml +33 -0
  149. package/dist/docs/traits/hover.yaml +39 -0
  150. package/dist/docs/traits/intersect.yaml +42 -0
  151. package/dist/docs/traits/link-paste.yaml +28 -0
  152. package/dist/docs/traits/linked-scroll.yaml +37 -0
  153. package/dist/docs/traits/list-navigate.yaml +46 -0
  154. package/dist/docs/traits/magnet.yaml +33 -0
  155. package/dist/docs/traits/mention.yaml +40 -0
  156. package/dist/docs/traits/modal.yaml +28 -0
  157. package/dist/docs/traits/noodle.yaml +45 -0
  158. package/dist/docs/traits/overlay.yaml +58 -0
  159. package/dist/docs/traits/pan-zoom.yaml +47 -0
  160. package/dist/docs/traits/parallax.yaml +36 -0
  161. package/dist/docs/traits/persist.yaml +42 -0
  162. package/dist/docs/traits/popover.yaml +28 -0
  163. package/dist/docs/traits/present.yaml +42 -0
  164. package/dist/docs/traits/press-hold.yaml +34 -0
  165. package/dist/docs/traits/range-select.yaml +42 -0
  166. package/dist/docs/traits/resize.yaml +39 -0
  167. package/dist/docs/traits/ripple.yaml +20 -0
  168. package/dist/docs/traits/roving-focus.yaml +30 -0
  169. package/dist/docs/traits/search.yaml +44 -0
  170. package/dist/docs/traits/selection.yaml +41 -0
  171. package/dist/docs/traits/shortcut.yaml +25 -0
  172. package/dist/docs/traits/slash-command.yaml +40 -0
  173. package/dist/docs/traits/snap-resize.yaml +39 -0
  174. package/dist/docs/traits/sort.yaml +47 -0
  175. package/dist/docs/traits/store.yaml +32 -0
  176. package/dist/docs/traits/swipe.yaml +38 -0
  177. package/dist/docs/traits/text-trigger.yaml +35 -0
  178. package/dist/docs/traits/toast.yaml +41 -0
  179. package/dist/docs/traits/toggle-scheme.yaml +40 -0
  180. package/dist/docs/traits/toggle-state.yaml +23 -0
  181. package/dist/docs/traits/tooltip.yaml +39 -0
  182. package/dist/docs/traits/toss.yaml +40 -0
  183. package/dist/docs/traits/trap-focus.yaml +20 -0
  184. package/dist/docs/traits/validate.yaml +52 -0
  185. package/dist/docs/traits/virtual-scroll.yaml +44 -0
  186. package/package.json +4 -2
@@ -0,0 +1,133 @@
1
+ name: aui-dialog
2
+ tag: aui-dialog
3
+ type: component
4
+ summary: Modal dialog with backdrop and focus trapping.
5
+ description: >
6
+ Modal dialog using the native <dialog> element. Provides
7
+ showModal()/close() API. Native dialog handles focus trapping,
8
+ Escape key dismissal, and ::backdrop. Composes aui-header,
9
+ aui-content, aui-footer as children.
10
+
11
+ base: AgentElement
12
+
13
+ attributes:
14
+ open:
15
+ syntax: boolean
16
+ type: boolean
17
+ default: false
18
+ description: >
19
+ Whether the dialog is visible. Setting this attribute
20
+ calls showModal() or close() on the native dialog.
21
+
22
+ size:
23
+ syntax: key-value
24
+ type: enum
25
+ values: [sm, lg, xl, full]
26
+ default: ""
27
+ description: >
28
+ Dialog width. Default is 32rem. sm=24rem, lg=48rem,
29
+ xl=64rem, full=viewport.
30
+
31
+ content:
32
+ model: block
33
+ accepts: [aui-header, aui-content, aui-footer, aui-inset, any]
34
+ required: true
35
+ description: >
36
+ Children are moved inside a stamped <dialog> element.
37
+ Use aui-header + aui-content + aui-footer for structured
38
+ dialogs with scrollable content.
39
+
40
+ slots:
41
+ default:
42
+ accepts: [aui-header, aui-content, aui-footer, aui-inset, any]
43
+ required: true
44
+ description: Dialog content.
45
+
46
+ composition:
47
+ parents: [body, div, aui-stack]
48
+ children:
49
+ typical: [aui-header, aui-content, aui-footer]
50
+ pattern: >
51
+ Header for title + close button, body for scrollable
52
+ content, footer for action buttons. The native <dialog>
53
+ is auto-stamped as a wrapper.
54
+ context: >
55
+ Use for confirmations, forms, detail views, alerts.
56
+ Place anywhere in the DOM — the native dialog is
57
+ position: fixed and overlays everything.
58
+
59
+ a11y:
60
+ role: dialog (native)
61
+ keyboard:
62
+ Escape: Closes the dialog (native behavior).
63
+ Tab: Trapped within the dialog (native behavior).
64
+ aria:
65
+ aria-modal: Set automatically by showModal().
66
+
67
+ events:
68
+ close:
69
+ description: Fires when the dialog closes (Escape, backdrop click, or API).
70
+
71
+ tokens:
72
+ color:
73
+ - --aui-modal
74
+ - --aui-doc
75
+ - --aui-border-muted
76
+ - --aui-ink
77
+ - --aui-backdrop-color
78
+ - --aui-backdrop-opacity
79
+ shadow:
80
+ - --aui-shadow-lg
81
+ shape:
82
+ - --aui-radius
83
+
84
+ examples:
85
+ - html: |
86
+ <aui-container bordered max-width="md">
87
+ <aui-header>
88
+ <span>Confirm</span>
89
+ </aui-header>
90
+ <aui-content>
91
+ <aui-inset>
92
+ <p>Are you sure you want to delete this item? This action cannot be undone.</p>
93
+ </aui-inset>
94
+ </aui-content>
95
+ <aui-footer>
96
+ <span slot="trailing">
97
+ <aui-stack direction="row" gap="2">
98
+ <aui-button ghost>Cancel</aui-button>
99
+ <aui-button primary danger>Delete</aui-button>
100
+ </aui-stack>
101
+ </span>
102
+ </aui-footer>
103
+ </aui-container>
104
+ description: >
105
+ Confirmation dialog structure (header / body / footer).
106
+ In use, wrap with aui-dialog and control via the open attribute.
107
+
108
+ - html: |
109
+ <aui-container bordered max-width="lg">
110
+ <aui-header>
111
+ <span>Edit Profile</span>
112
+ </aui-header>
113
+ <aui-content>
114
+ <aui-inset>
115
+ <aui-stack>
116
+ <aui-field label="Name">
117
+ <aui-input placeholder="Full name"></aui-input>
118
+ </aui-field>
119
+ <aui-field label="Bio">
120
+ <aui-textarea placeholder="About you..."></aui-textarea>
121
+ </aui-field>
122
+ </aui-stack>
123
+ </aui-inset>
124
+ </aui-content>
125
+ <aui-footer>
126
+ <span slot="trailing">
127
+ <aui-button primary accent>Save</aui-button>
128
+ </span>
129
+ </aui-footer>
130
+ </aui-container>
131
+ description: >
132
+ Form dialog structure. Uses aui-container for inline preview.
133
+ Wrap with aui-dialog size="lg" for modal usage.
@@ -0,0 +1,124 @@
1
+ name: aui-drawer
2
+ tag: aui-drawer
3
+ type: component
4
+ summary: Slide-out panel anchored to a viewport edge.
5
+ description: >
6
+ Edge-anchored overlay panel using native <dialog>. Same
7
+ focus trapping and Escape dismissal as aui-dialog. Slides
8
+ in from right (default), left, top, or bottom.
9
+
10
+ base: AgentElement
11
+
12
+ attributes:
13
+ open:
14
+ syntax: boolean
15
+ type: boolean
16
+ default: false
17
+ description: Whether the drawer is visible.
18
+
19
+ side:
20
+ syntax: key-value
21
+ type: enum
22
+ values: [left, right, top, bottom]
23
+ default: right
24
+ description: Which viewport edge the drawer anchors to.
25
+
26
+ content:
27
+ model: block
28
+ accepts: [aui-header, aui-content, aui-footer, aui-inset, any]
29
+ required: true
30
+ description: >
31
+ Same child pattern as dialog. Children are moved inside
32
+ a stamped <dialog> element.
33
+
34
+ slots:
35
+ default:
36
+ accepts: [aui-header, aui-content, aui-footer, aui-inset, any]
37
+ required: true
38
+ description: Drawer content.
39
+
40
+ composition:
41
+ parents: [body, div, aui-stack]
42
+ children:
43
+ typical: [aui-header, aui-content, aui-footer]
44
+ pattern: >
45
+ Header for title + close, body for scrollable content,
46
+ footer for actions. The drawer fills the viewport edge.
47
+ context: >
48
+ Use for settings panels, filters, detail views, mobile
49
+ navigation. Right is the most common side.
50
+
51
+ a11y:
52
+ role: dialog (native)
53
+ keyboard:
54
+ Escape: Closes the drawer.
55
+ Tab: Trapped within the drawer.
56
+
57
+ events:
58
+ close:
59
+ description: Fires when the drawer closes.
60
+
61
+ tokens:
62
+ color:
63
+ - --aui-modal
64
+ - --aui-doc
65
+ - --aui-border-muted
66
+ - --aui-ink
67
+ - --aui-backdrop-color
68
+ - --aui-backdrop-opacity
69
+ sizing:
70
+ - --aui-drawer-width
71
+ - --aui-drawer-height
72
+ motion:
73
+ - --aui-duration
74
+ - --aui-easing
75
+
76
+ examples:
77
+ - html: |
78
+ <aui-container bordered max-width="sm">
79
+ <aui-header>
80
+ <span>Filters</span>
81
+ </aui-header>
82
+ <aui-content>
83
+ <aui-inset>
84
+ <aui-stack>
85
+ <aui-field label="Category">
86
+ <aui-input placeholder="All"></aui-input>
87
+ </aui-field>
88
+ <aui-field label="Status">
89
+ <aui-radio-group name="status">
90
+ <aui-radio label="Active" value="active"></aui-radio>
91
+ <aui-radio label="Archived" value="archived"></aui-radio>
92
+ </aui-radio-group>
93
+ </aui-field>
94
+ </aui-stack>
95
+ </aui-inset>
96
+ </aui-content>
97
+ <aui-footer>
98
+ <span slot="trailing">
99
+ <aui-button primary accent>Apply</aui-button>
100
+ </span>
101
+ </aui-footer>
102
+ </aui-container>
103
+ description: >
104
+ Filter drawer structure (header / body / footer).
105
+ In use, wrap with aui-drawer side="right" and control via open.
106
+
107
+ - html: |
108
+ <aui-container bordered max-width="xs">
109
+ <aui-header>
110
+ <span>Navigation</span>
111
+ </aui-header>
112
+ <aui-content>
113
+ <aui-inset>
114
+ <aui-stack>
115
+ <a href="/" style="color: var(--aui-ink); text-decoration: none;">Home</a>
116
+ <a href="/settings" style="color: var(--aui-ink); text-decoration: none;">Settings</a>
117
+ <a href="/help" style="color: var(--aui-ink); text-decoration: none;">Help</a>
118
+ </aui-stack>
119
+ </aui-inset>
120
+ </aui-content>
121
+ </aui-container>
122
+ description: >
123
+ Navigation drawer structure.
124
+ Wrap with aui-drawer side="left" for slide-out behavior.
@@ -0,0 +1,59 @@
1
+ name: aui-editor-layer
2
+ tag: aui-editor-layer
3
+ type: component
4
+ summary: Named stacking layer within aui-editor with guaranteed z-index.
5
+ description: >
6
+ Full-size absolute layer inside the editor viewport. Well-known
7
+ layer names get guaranteed z-index positions forming the "sandwich"
8
+ that ensures noodles, content, and chrome never interfere. SVG
9
+ layers stamp an SVG element for vector rendering (noodles, paths).
10
+
11
+ base: AgentElement
12
+
13
+ attributes:
14
+ name:
15
+ syntax: key-value
16
+ type: string
17
+ default: ""
18
+ description: >
19
+ Layer name. Well-known names and their z-index:
20
+ "under" (-1) — guides, grids, decorations below content.
21
+ "content" (0) — the DOM being edited. Gets pointer-events: auto.
22
+ "over" (1) — noodles, selection rects above content.
23
+ "chrome" (2) — menus, handles, toolbars. Gets pointer-events: auto.
24
+
25
+ type:
26
+ syntax: key-value
27
+ type: enum
28
+ values: [html, svg]
29
+ default: html
30
+ description: >
31
+ "html" for regular DOM content. "svg" stamps an SVG element
32
+ for vector rendering (noodle paths, connection lines).
33
+
34
+ api:
35
+ properties:
36
+ - name: svg
37
+ type: SVGSVGElement | null
38
+ description: The stamped SVG element (only for type="svg" layers).
39
+
40
+ composition:
41
+ parents: [aui-editor, aui-graph-ui]
42
+ children: [any, aui-graph-node, aui-graph-noodle]
43
+ context: >
44
+ Always place inside aui-editor or aui-graph-ui. Use name to
45
+ control stacking order. Multiple layers compose the z-index
46
+ sandwich that separates concerns (wires vs content vs chrome).
47
+
48
+ examples:
49
+ - html: |
50
+ <aui-editor-layer name="content">
51
+ <aui-text>Layer content here</aui-text>
52
+ </aui-editor-layer>
53
+ description: Content layer — the main editing surface.
54
+
55
+ - html: |
56
+ <aui-editor-layer name="over" type="svg">
57
+ <!-- SVG noodle paths render here -->
58
+ </aui-editor-layer>
59
+ description: SVG layer for noodle connections above content.
@@ -0,0 +1,168 @@
1
+ name: aui-editor
2
+ tag: aui-editor
3
+ type: component
4
+ summary: Pannable, zoomable editor stage with layered stacking context.
5
+ description: >
6
+ Universal canvas for graph editors, preview tools, design surfaces,
7
+ and any context that needs pan/zoom with guaranteed z-index layering.
8
+ Provides coordinate conversion API and context to descendants.
9
+ Middle-click or space+left-click to pan. Scroll wheel zooms toward
10
+ cursor. Background patterns (dots, grid) track pan position.
11
+
12
+ base: AgentElement
13
+
14
+ attributes:
15
+ zoom:
16
+ syntax: key-value
17
+ type: string
18
+ default: "1"
19
+ description: Current zoom level. Clamped between min-zoom and max-zoom.
20
+
21
+ pan-x:
22
+ syntax: key-value
23
+ type: string
24
+ default: "0"
25
+ description: Horizontal pan offset in pixels.
26
+
27
+ pan-y:
28
+ syntax: key-value
29
+ type: string
30
+ default: "0"
31
+ description: Vertical pan offset in pixels.
32
+
33
+ min-zoom:
34
+ syntax: key-value
35
+ type: string
36
+ default: "0.1"
37
+ description: Minimum zoom level.
38
+
39
+ max-zoom:
40
+ syntax: key-value
41
+ type: string
42
+ default: "5"
43
+ description: Maximum zoom level.
44
+
45
+ background:
46
+ syntax: key-value
47
+ type: enum
48
+ values: [none, dots, grid]
49
+ default: none
50
+ description: >
51
+ Background pattern. "dots" renders a dot grid that tracks pan
52
+ position. "grid" renders a line grid. "none" is transparent.
53
+
54
+ grid-size:
55
+ syntax: key-value
56
+ type: string
57
+ default: "24"
58
+ description: Background pattern spacing in pixels.
59
+
60
+ api:
61
+ methods:
62
+ - name: screenToEditor
63
+ signature: "(screenX: number, screenY: number) => { x, y }"
64
+ description: Convert screen coordinates to editor coordinates.
65
+
66
+ - name: editorToScreen
67
+ signature: "(editorX: number, editorY: number) => { x, y }"
68
+ description: Convert editor coordinates to screen coordinates.
69
+
70
+ - name: panTo
71
+ signature: "(x: number, y: number) => void"
72
+ description: Set pan position programmatically.
73
+
74
+ - name: zoomTo
75
+ signature: "(level: number) => void"
76
+ description: Set zoom level programmatically.
77
+
78
+ - name: reset
79
+ signature: "() => void"
80
+ description: Reset pan and zoom to defaults.
81
+
82
+ properties:
83
+ - name: zoomLevel
84
+ type: number
85
+ description: Clamped numeric zoom value.
86
+
87
+ - name: panXValue
88
+ type: number
89
+ description: Numeric pan-x value.
90
+
91
+ - name: panYValue
92
+ type: number
93
+ description: Numeric pan-y value.
94
+
95
+ - name: viewportElement
96
+ type: HTMLElement | null
97
+ description: The internal viewport wrapper element.
98
+
99
+ context:
100
+ provides: editorContext
101
+ shape: >
102
+ { zoom, panX, panY, screenToEditor, editorToScreen, getViewport }
103
+ description: >
104
+ Provided to all descendants so layers, nodes, ports, noodles,
105
+ and traits can read zoom/pan state and convert coordinates
106
+ without DOM traversal via closest().
107
+
108
+ events:
109
+ aui:editor-pan:
110
+ description: Fired when pan position changes. Detail { x, y }.
111
+ bubbles: true
112
+
113
+ aui:editor-zoom:
114
+ description: Fired when zoom level changes. Detail { zoom }.
115
+ bubbles: true
116
+
117
+ a11y:
118
+ role: No implicit role. Focusable via tabindex.
119
+ keyboard:
120
+ Space+Drag: Pan the canvas.
121
+ "Middle-click+Drag": Pan the canvas.
122
+ "Scroll wheel": Zoom toward cursor.
123
+
124
+ composition:
125
+ parents: [div, section, main, aui-stack, any]
126
+ children: [aui-editor-layer]
127
+ context: >
128
+ Use as the root canvas for any editor. Place aui-editor-layer
129
+ children inside for guaranteed z-index stacking. The editor
130
+ creates a viewport wrapper and moves all children into it.
131
+
132
+ tokens:
133
+ color:
134
+ - --aui-doc
135
+ - --aui-border-muted
136
+ - --aui-accent
137
+ - --aui-focus
138
+ motion:
139
+ - --_editor-zoom
140
+ - --_editor-pan-x
141
+ - --_editor-pan-y
142
+ - --_editor-grid-size
143
+
144
+ examples:
145
+ - html: |
146
+ <aui-editor background="dots" style="width: 100%; height: 20rem;">
147
+ <aui-editor-layer name="content">
148
+ <aui-text>Pannable content on a dot grid</aui-text>
149
+ </aui-editor-layer>
150
+ </aui-editor>
151
+ description: Basic editor with dot background and content layer.
152
+
153
+ - html: |
154
+ <aui-editor background="grid" style="width: 100%; height: 20rem;">
155
+ <aui-editor-layer name="under">
156
+ <!-- noodles / guides go here -->
157
+ </aui-editor-layer>
158
+ <aui-editor-layer name="content">
159
+ <!-- editable DOM goes here -->
160
+ </aui-editor-layer>
161
+ <aui-editor-layer name="over">
162
+ <!-- selection rects go here -->
163
+ </aui-editor-layer>
164
+ <aui-editor-layer name="chrome">
165
+ <!-- menus / handles go here -->
166
+ </aui-editor-layer>
167
+ </aui-editor>
168
+ description: Full 4-layer sandwich with grid background.
@@ -0,0 +1,72 @@
1
+ name: aui-feed
2
+ tag: aui-feed
3
+ type: component
4
+ summary: Scrollable feed for messages and activity streams
5
+ base: AgentElement
6
+ attributes:
7
+ align:
8
+ syntax: key-value
9
+ type: enum
10
+ values: [end]
11
+ default: ""
12
+ description: Bottom-anchor content (chat-style).
13
+ scrollable:
14
+ syntax: boolean
15
+ type: boolean
16
+ default: false
17
+ description: Enable scrolling with smooth behavior.
18
+ autoscroll:
19
+ syntax: boolean
20
+ type: boolean
21
+ default: false
22
+ description: Auto-scroll to bottom on new children (when pinned).
23
+ description: >
24
+ Scrollable feed for messages and activity streams. Uses block layout
25
+ (not flex) so aui-feed-item margins collapse, giving natural vertical
26
+ rhythm without explicit gap management.
27
+
28
+ a11y:
29
+ role: feed
30
+ composition:
31
+ parents: [any]
32
+ children: [aui-feed-item, any]
33
+
34
+ # ── Child element ──────────────────────────────────────────
35
+ children:
36
+ aui-feed-item:
37
+ tag: aui-feed-item
38
+ summary: Individual item in a feed with margin-based vertical rhythm.
39
+ description: >
40
+ Uses margin-block for spacing that collapses between siblings.
41
+ Consecutive items with the same role attribute (e.g. role="user",
42
+ role="assistant") receive tighter spacing via adjacent-sibling
43
+ selectors, producing compact clusters of same-sender messages.
44
+ attributes:
45
+ role:
46
+ syntax: key-value
47
+ type: string
48
+ default: ""
49
+ description: >
50
+ Semantic role of the feed item (e.g. "user", "assistant", "system").
51
+ Consecutive items sharing the same role get tighter margin-block-start
52
+ (50% of normal spacing).
53
+
54
+ examples:
55
+ - html: |
56
+ <aui-feed scrollable style="height: 16rem; border: 1px solid var(--aui-border-muted); border-radius: var(--aui-radius);">
57
+ <aui-feed-item role="user">
58
+ <aui-inset><aui-text>Hey, how's the project going?</aui-text></aui-inset>
59
+ </aui-feed-item>
60
+ <aui-feed-item role="assistant">
61
+ <aui-inset><aui-text>Good progress — the token system refactor is done.</aui-text></aui-inset>
62
+ </aui-feed-item>
63
+ <aui-feed-item role="assistant">
64
+ <aui-inset><aui-text>Still need to do a visual QA pass though.</aui-text></aui-inset>
65
+ </aui-feed-item>
66
+ <aui-feed-item role="user">
67
+ <aui-inset><aui-text>Nice, let's review it together.</aui-text></aui-inset>
68
+ </aui-feed-item>
69
+ </aui-feed>
70
+ description: >
71
+ Scrollable message feed with aui-feed-item elements. Consecutive
72
+ assistant items get tighter spacing via same-role margin collapsing.
@@ -0,0 +1,145 @@
1
+ name: aui-field
2
+ tag: aui-field
3
+ type: element
4
+ summary: Form field wrapper with label, description, and error.
5
+ description: >
6
+ Wraps a form control with a label, optional description, and
7
+ error message. All text is rendered CSS-first via content: attr()
8
+ from HTML attributes — zero JavaScript stamping required. Uses
9
+ display: flex with column direction, so child controls (aui-input,
10
+ aui-textarea, aui-select) stretch to full width automatically —
11
+ no width="full" needed on the child.
12
+
13
+ # ── Component attributes ──────────────────────────────────
14
+
15
+ attributes:
16
+ label:
17
+ syntax: key-value
18
+ type: string
19
+ default: ""
20
+ description: >
21
+ Field label text. Rendered via ::before { content: attr(label) }.
22
+ No JS needed — CSS reads the attribute directly.
23
+
24
+ description:
25
+ syntax: key-value
26
+ type: string
27
+ default: ""
28
+ description: >
29
+ Help text below the control. Rendered via ::after.
30
+ Replaced by error text when error attribute is set.
31
+
32
+ error:
33
+ syntax: key-value
34
+ type: string
35
+ default: ""
36
+ description: >
37
+ Error message. When set, replaces description text and
38
+ cascades danger intent to child controls via CSS custom
39
+ properties.
40
+
41
+ required:
42
+ syntax: boolean
43
+ type: boolean
44
+ default: false
45
+ description: >
46
+ Appends " *" to the label text via CSS content concatenation.
47
+ Also sets the required constraint on the wrapped control.
48
+
49
+ disabled:
50
+ syntax: boolean
51
+ type: boolean
52
+ default: false
53
+ description: Dims the field and disables pointer events.
54
+
55
+ # ── Content model ─────────────────────────────────────────
56
+
57
+ content:
58
+ model: block
59
+ accepts: [aui-input, aui-textarea, aui-checkbox, aui-switch, aui-select, aui-radio-group]
60
+ required: true
61
+ description: >
62
+ Exactly one form control as the direct child. The field wrapper
63
+ provides the label and messages; the control provides the input.
64
+
65
+ # ── Slots ─────────────────────────────────────────────────
66
+
67
+ slots:
68
+ default:
69
+ accepts: [aui-input, aui-textarea, aui-checkbox, aui-switch, aui-select]
70
+ required: true
71
+ description: The form control.
72
+
73
+ # ── Composition ───────────────────────────────────────────
74
+
75
+ composition:
76
+ parents: [aui-stack, aui-grid, form, div, section]
77
+ children: [aui-input, aui-textarea, aui-checkbox, aui-switch, aui-select, aui-radio-group]
78
+ context: >
79
+ Use inside forms, settings panels, registration/login pages.
80
+ Stack multiple aui-field elements vertically in an aui-stack.
81
+ The field handles layout (label above, description below);
82
+ the control handles input behavior.
83
+
84
+ # ── CSS implementation notes ──────────────────────────────
85
+
86
+ css-notes:
87
+ attr-bindings:
88
+ - "::before { content: attr(label) } — AB2: label from attribute"
89
+ - "::before { content: attr(label) ' *' } — CG1: required indicator"
90
+ - "::after { content: attr(description) } — AB2: description from attribute"
91
+ - "::after { content: attr(error) } — AB1: error replaces description"
92
+ state-attributes:
93
+ - "[error] cascades --aui-stroke to danger color"
94
+ - "[disabled] dims with opacity"
95
+ - "[required] appends asterisk to label"
96
+
97
+ # ── CSS tokens consumed ──────────────────────────────────
98
+
99
+ tokens:
100
+ spacing:
101
+ - --aui-space
102
+ typography:
103
+ - --aui-font-family
104
+ - --aui-font-size
105
+ - --aui-text-line-height
106
+ - --aui-control-line-height-relaxed
107
+ color:
108
+ - --aui-ink
109
+ - --aui-ink-muted
110
+ - --aui-ink-disabled
111
+ - --aui-border-danger
112
+ - --aui-danger
113
+
114
+ # ── Examples ──────────────────────────────────────────────
115
+
116
+ examples:
117
+ - html: |
118
+ <aui-field label="Email">
119
+ <aui-input type="email" placeholder="you@example.com"></aui-input>
120
+ </aui-field>
121
+ description: Basic field with label and input.
122
+
123
+ - html: |
124
+ <aui-field label="Password" description="Must be at least 8 characters.">
125
+ <aui-input type="password" placeholder="Enter password"></aui-input>
126
+ </aui-field>
127
+ description: Field with description text.
128
+
129
+ - html: |
130
+ <aui-field label="Username" required>
131
+ <aui-input placeholder="Choose a username"></aui-input>
132
+ </aui-field>
133
+ description: Required field — label shows asterisk.
134
+
135
+ - html: |
136
+ <aui-field label="Email" error="This email is already registered.">
137
+ <aui-input type="email" value="taken@example.com"></aui-input>
138
+ </aui-field>
139
+ description: Field with error state.
140
+
141
+ - html: |
142
+ <aui-field label="Name" disabled>
143
+ <aui-input value="Read only" disabled></aui-input>
144
+ </aui-field>
145
+ description: Disabled field.