@lukeashford/aurelius 2.20.0 → 3.0.0

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.
@@ -269,6 +269,36 @@
269
269
  }
270
270
  }
271
271
 
272
+ @keyframes badge-ping {
273
+ 0% {
274
+ transform: scale(1);
275
+ box-shadow: 0 0 0 0 rgb(var(--gold-rgb) / 0.4);
276
+ }
277
+ 40% {
278
+ transform: scale(1.15);
279
+ box-shadow: 0 0 0 6px rgb(var(--gold-rgb) / 0);
280
+ }
281
+ 100% {
282
+ transform: scale(1);
283
+ box-shadow: 0 0 0 0 rgb(var(--gold-rgb) / 0);
284
+ }
285
+ }
286
+
287
+ @keyframes badge-invert {
288
+ 0% {
289
+ background-color: var(--color-gold);
290
+ color: var(--color-obsidian);
291
+ }
292
+ 40% {
293
+ background-color: var(--color-obsidian);
294
+ color: var(--color-gold);
295
+ }
296
+ 100% {
297
+ background-color: var(--color-gold);
298
+ color: var(--color-obsidian);
299
+ }
300
+ }
301
+
272
302
  /* ===== BASE STYLES (applied via @layer base) ===== */
273
303
  @layer base {
274
304
  html {
package/llms.md CHANGED
@@ -101,6 +101,8 @@ Import from `@lukeashford/aurelius`:
101
101
  | Accordion | type, defaultValue, value, onValueChange, value, disabled |
102
102
  | Alert | variant (info, success, warning, error), title |
103
103
  | ArtifactCard | artifact, onExpand, loading |
104
+ | ArtifactGroup | node, onClick |
105
+ | ArtifactVariantStack | node, onExpandArtifact, onGroupClick |
104
106
  | AttachmentPreview | attachments, onRemove, removable, maxVisible |
105
107
  | AudioCard | src, title, subtitle, playing, controls, volume, muted, loop, mediaClassName, contentClassName, playerProps, height, loading |
106
108
  | Avatar | src, alt, name, size (xs, sm, md, lg, xl, 2xl), status (online, offline, busy) |
@@ -151,15 +153,17 @@ Import from `@lukeashford/aurelius`:
151
153
  | Toast | children, position (top-right, top-left, bottom-right, bottom-left, top-center, bottom-center), defaultDuration |
152
154
  | Tooltip | content, children, open, side (top, right, bottom, left) |
153
155
  | VideoCard | src, title, subtitle, aspectRatio (${number}/${number}), playing, controls, light, volume, muted, loop, mediaClassName, contentClassName, playerProps, loading |
154
- | ArtifactsPanel | artifacts, isOpen, onClose, loading, width, widthPercent, onResizeStart, artifactCount, onExpand |
156
+ | ArtifactsPanel | nodes, loading, artifactCount, onExpand |
155
157
  | BranchNavigator | current, total, onPrevious, onNext, size, showIcon |
156
158
  | ChatInput | position (centered, bottom), placeholder, helperText, onSubmit, disabled, animate, isStreaming, onStop, attachments, onAttachmentsChange, showAttachmentButton, acceptedFileTypes |
157
- | ChatInterface | messages, conversationTree, onTreeChange, conversations, onMessageSubmit, onEditMessage, onRetryMessage, onStop, onSelectConversation, onNewChat, isStreaming, isThinking, placeholder, emptyStateHelper, initialSidebarCollapsed, emptyState, showAttachmentButton, enableMessageActions, attachments, onAttachmentsChange, artifacts, isArtifactsPanelOpen, onArtifactsPanelOpenChange, tasks, tasksTitle |
159
+ | ChatInterface | messages, conversationTree, onTreeChange, conversations, onMessageSubmit, onEditMessage, onRetryMessage, onStop, onSelectConversation, onNewChat, isStreaming, isThinking, placeholder, emptyStateHelper, initialSidebarCollapsed, emptyState, showAttachmentButton, enableMessageActions, attachments, onAttachmentsChange, artifactNodes, isArtifactsPanelOpen, onArtifactsPanelOpenChange, tasks, tasksTitle |
158
160
  | ChatView | messages, latestUserMessageIndex, isStreaming, isThinking, onScroll |
159
161
  | ConversationSidebar | conversations, isCollapsed, onSelectConversation, onNewChat, onToggleCollapse, width, onResizeStart, onExpand |
160
162
  | MessageActions | variant (user, assistant), content, onEdit, onRetry, isEditing, onEditingChange, editValue |
161
163
  | ThinkingIndicator | isVisible, phraseInterval, phrases |
162
164
  | TodosList | tasks, title |
165
+ | ToolPanelContainer | topContent, bottomContent, width, onResizeStart |
166
+ | ToolSidebar | tools, activeTools, onToggleTool |
163
167
  | CheckSquareIcon | children |
164
168
  | ChevronLeftIcon | children |
165
169
  | ChevronRightIcon | children |
@@ -169,6 +173,7 @@ Import from `@lukeashford/aurelius`:
169
173
  | ExpandIcon | children |
170
174
  | HistoryIcon | children |
171
175
  | LayersIcon | children |
176
+ | MediaIcon | children |
172
177
  | PlusIcon | children |
173
178
  | SquareLoaderIcon | children |
174
179
 
@@ -199,6 +204,25 @@ based on the artifact type.
199
204
  - **onExpand**: * Callback when the artifact should be expanded/opened
200
205
  - **loading**: * Whether the artifact is still loading
201
206
 
207
+ **ArtifactGroup**
208
+ Renders a GROUP node as a Card with the group label as title. Inside,
209
+ the first child is shown on top with two offset layers behind it
210
+ (always shown as a visual symbol for "group"). A square count badge
211
+ shows the total items.
212
+
213
+ - **node**: * The GROUP node to display
214
+ - **onClick**: * Called when the group is clicked (e.g. to navigate into it)
215
+
216
+ **ArtifactVariantStack**
217
+ Renders a VARIANT_SET node as a Card with the set label as title.
218
+ Children are displayed in a horizontal row inside the card body.
219
+ Children handle their own click behavior (expand for artifacts,
220
+ navigate for groups).
221
+
222
+ - **node**: * The VARIANT_SET node to display
223
+ - **onExpandArtifact**: * Passed through to ArtifactCard children for expand/open behavior
224
+ - **onGroupClick**: * Passed through to ArtifactGroup children for navigation
225
+
202
226
  **AttachmentPreview**
203
227
  - **AttachmentItem.id**: * Unique identifier
204
228
  - **AttachmentItem.file**: * The File object
@@ -312,21 +336,22 @@ A card for displaying text content, supporting Markdown and HTML formatting.
312
336
  - **contentClassName**: * Optional class name for the content container
313
337
 
314
338
  **ArtifactsPanel**
315
- ArtifactsPanel displays rich content artifacts in a slide-in panel.
339
+ ArtifactsPanel displays artifacts in a navigable tree panel.
316
340
 
317
- When collapsed, shows a thin strip with layers icon at top.
318
- When expanded, shows chevron at top-right to collapse.
319
- Click on artifacts to expand them to full screen modal.
341
+ This is a content-only component it fills whatever container it is
342
+ placed in. Opening/closing and resizing are handled by the parent
343
+ ToolPanelContainer and ToolSidebar.
320
344
 
321
- Supports fullWidth artifacts that span all columns in the grid.
345
+ Groups can be entered (breadcrumb navigation) and artifact nodes
346
+ can be expanded to a full-screen modal.
322
347
 
323
- - **artifacts**: * Array of artifacts to display
324
- - **isOpen**: * Whether the panel is visible
325
- - **onClose**: * Callback to close/collapse the panel
348
+ Supports zoom controls (0.25x–1x). Zoom uses CSS `transform: scale()`
349
+ on the content wrapper so the entire layout scales uniformly — cards,
350
+ images, gaps, and text all shrink as if the viewer is physically
351
+ moving back from the content.
352
+
353
+ - **nodes**: * Top-level tree nodes to display in the navigable artifact tree.
326
354
  - **loading**: * Whether artifacts are still loading (show skeletons)
327
- - **width**: * Current width of the panel as CSS value (e.g., "50vw", "400px").
328
- - **widthPercent**: * Width as percentage of viewport (0-100) for column calculations.
329
- - **onResizeStart**: * Callback to start resizing
330
355
 
331
356
  **BranchNavigator**
332
357
  BranchNavigator provides a UI for switching between conversation branches.
@@ -369,16 +394,18 @@ ChatInterface is the main orchestrator for a full-featured chat experience.
369
394
  Features:
370
395
  - ConversationSidebar (left) — collapsible list of past conversations
371
396
  - ChatView (center) — main conversation area with smart scrolling
372
- - ArtifactsPanel (right) — controlled via useArtifacts hook
397
+ - Tool panel system (right) — IntelliJ-style tool sidebar with:
398
+ - Top group: Chat History, Artifacts Panel (mutually exclusive)
399
+ - Bottom group: Todo List
400
+ - Vertical split with draggable divider when both groups are active
401
+ - Width-resizable tool content area
373
402
  - ChatInput — position-aware input that centers in empty state
374
403
  - Branching — support for conversation tree with branch navigation
375
404
  - Message Actions — copy, edit, retry
376
405
  - Thinking Indicator — shown between user message and response
377
406
 
378
- Artifacts are controlled externally via the useArtifacts hook:
379
- - scheduleArtifact() — adds artifact with loading skeleton
380
- - showArtifact() — reveals artifact content
381
- - removeArtifact() — removes artifact on failure
407
+ Artifacts are supplied as a tree of ArtifactNode objects via the
408
+ artifactNodes prop.
382
409
 
383
410
  - **ChatMessage.id**: * Unique identifier for the message
384
411
  - **ChatMessage.variant**: * Whether the message is from the user or the assistant
@@ -404,10 +431,10 @@ Artifacts are controlled externally via the useArtifacts hook:
404
431
  - **enableMessageActions**: * Whether to enable message-level actions (copy, edit, retry).
405
432
  - **attachments**: * Current attachments for the chat input (controlled).
406
433
  - **onAttachmentsChange**: * Called when attachments are added or removed in the chat input.
407
- - **artifacts**: * Artifacts to display in the side panel. Best managed via the useArtifacts hook and passed here.
408
- - **isArtifactsPanelOpen**: * Whether the artifacts panel is currently open (controlled).
434
+ - **artifactNodes**: * Top-level artifact tree nodes for the artifacts panel.
435
+ - **isArtifactsPanelOpen**: * Whether the artifacts panel is currently open (controlled). When set, maps to the tool panel system — opens the artifacts tool.
409
436
  - **onArtifactsPanelOpenChange**: * Called when the artifacts panel is opened or closed (controlled).
410
- - **tasks**: * Tasks to display in the todos list below the artifacts panel. Shows a list of tasks with status indicators.
437
+ - **tasks**: * Tasks to display in the todos list tool panel. Shows a list of tasks with status indicators.
411
438
  - **tasksTitle**: * Title for the todos list @default "Tasks"
412
439
 
413
440
  **ChatView**
@@ -480,9 +507,43 @@ The component automatically sorts cancelled/failed tasks to the bottom of their
480
507
  - **tasks**: * Array of tasks to display
481
508
  - **title**: * Title for the todos list @default "Tasks"
482
509
 
510
+ **ToolPanelContainer**
511
+ ToolPanelContainer manages the layout of one or two tool panels
512
+ stacked vertically. When both top and bottom slots are filled, a
513
+ height-adjustable divider appears between them.
514
+
515
+ It also renders the width-resize handle on its left edge, identical
516
+ to the previous ArtifactsPanel resize behavior.
517
+
518
+ - **topContent**: * Content for the top tool slot (from the top group). When null, the bottom slot takes full height.
519
+ - **bottomContent**: * Content for the bottom tool slot (from the bottom group). When null, the top slot takes full height.
520
+ - **width**: * Panel width as CSS value (e.g., "50vw")
521
+ - **onResizeStart**: * Callback to start horizontal resizing (width dragger)
522
+
523
+ **ToolSidebar**
524
+ ToolSidebar renders a vertical strip of tool icon buttons on the right
525
+ side of the chat interface. It follows the IntelliJ pattern:
526
+
527
+ - Top-aligned group and bottom-aligned group separated by a divider
528
+ - Tools in the same group are mutually exclusive
529
+ - Clicking an active tool closes it; clicking an inactive tool opens it
530
+ - Constant slim width regardless of tool panel state
531
+
532
+ - **ToolDefinition.id**: * Unique identifier for this tool
533
+ - **ToolDefinition.icon**: * Icon element shown in the sidebar button
534
+ - **ToolDefinition.label**: * Accessible label for the button
535
+ - **ToolDefinition.group**: * Which group the tool belongs to — tools in the same group are mutually exclusive (opening one closes the other).
536
+ - **tools**: * Available tool definitions
537
+ - **activeTools**: * Current state — which tool is open per group
538
+ - **onToggleTool**: * Called when a tool button is clicked (toggle)
539
+
483
540
  **CrossSquareIcon**
484
541
  - **variant**: * Visual variant for different states - 'cancelled': subtle ash coloring - 'failed': error red coloring
485
542
 
543
+ **MediaIcon**
544
+ Media icon — a film frame with play triangle, representing video and media artifacts.
545
+
546
+
486
547
  **SquareLoaderIcon**
487
548
  Square loading spinner with "snake" animation.
488
549
  A golden stroke travels around a square border.
@@ -508,42 +569,6 @@ import { Button, Card, Input, Badge } from '@lukeashford/aurelius'
508
569
 
509
570
  Import hooks from `@lukeashford/aurelius`:
510
571
 
511
- ### useArtifacts
512
-
513
- Hook for managing artifacts in the ChatInterface.
514
-
515
- Provides methods to control the artifacts panel programmatically,
516
- designed for event-driven architectures like SSE streams.
517
-
518
- **Returns:** `UseArtifactsReturn`
519
-
520
- | Property | Type | Description |
521
- |----------|------|-------------|
522
- | `artifacts` | `Artifact[]` | Current list of artifacts |
523
- | `scheduleArtifact` | `(artifact: Omit<Artifact, 'isPending'>) => void` | Schedule a new artifact (adds to list with isPending=true, shows skeleton). |
524
- | `showArtifact` | `(artifactId: string, artifact: Omit<Artifact, 'id' | 'isPending'>) => void` | Show an artifact (updates existing or adds new with isPending=false). |
525
- | `removeArtifact` | `(artifactId: string) => void` | Remove an artifact from the list. |
526
- | `clearArtifacts` | `() => void` | Clear all artifacts |
527
-
528
- **Example:**
529
-
530
- ```tsx
531
- const { artifacts, scheduleArtifact, showArtifact, removeArtifact } = useArtifacts()
532
-
533
- // When SSE operator.started event arrives
534
- scheduleArtifact({ id: operatorId, type: 'IMAGE' })
535
-
536
- // When SSE artifact.created event arrives
537
- showArtifact(artifactId, {
538
- type: 'IMAGE',
539
- url: 'https://example.com/image.png',
540
- title: 'Generated Image',
541
- })
542
-
543
- // When SSE operator.failed event arrives
544
- removeArtifact(operatorId)
545
- ```
546
-
547
572
  ### useScrollAnchor
548
573
 
549
574
  Hook for smart scroll behavior in chat interfaces.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lukeashford/aurelius",
3
- "version": "2.20.0",
3
+ "version": "3.0.0",
4
4
  "description": "Design system for Aurelius applications — A cohesive visual language for creative technologists",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",