@lukeashford/aurelius 4.5.0 → 4.7.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.
- package/dist/index.d.mts +405 -115
- package/dist/index.d.ts +405 -115
- package/dist/index.js +2034 -1756
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1975 -1706
- package/dist/index.mjs.map +1 -1
- package/dist/styles/base.css +1 -0
- package/dist/styles/deliverable.css +528 -0
- package/dist/styles/theme.css +12 -0
- package/llms.md +105 -10
- package/package.json +1 -1
- package/scripts/eslint.mjs +4 -2
package/llms.md
CHANGED
|
@@ -102,6 +102,7 @@ Import from `@lukeashford/aurelius`:
|
|
|
102
102
|
| Alert | variant (info, success, warning, error), title |
|
|
103
103
|
| ArtifactCard | artifact, onExpand, loading |
|
|
104
104
|
| ArtifactGroup | node, onClick |
|
|
105
|
+
| ArtifactLightboxBody | artifact |
|
|
105
106
|
| ArtifactVariantStack | node, onExpandArtifact, onGroupClick |
|
|
106
107
|
| AttachmentPreview | attachments, onRemove, removable, maxVisible, onOpen |
|
|
107
108
|
| AudioCard | src, title, subtitle, playing, controls, volume, muted, loop, mediaClassName, contentClassName, playerProps, height, loading |
|
|
@@ -115,6 +116,7 @@ Import from `@lukeashford/aurelius`:
|
|
|
115
116
|
| Col | span, offset, order |
|
|
116
117
|
| ColorSwatch | color, label |
|
|
117
118
|
| Container | size (sm, md, lg, xl, fluid, responsive) |
|
|
119
|
+
| DeliverableCard | deliverable, title, subtitle, loading |
|
|
118
120
|
| Dialog | description, confirmText, cancelText, onConfirm, onCancel, confirmVariant, isLoading, description, acknowledgeText, variant, description, placeholder, defaultValue, submitText, cancelText, onSubmit, onCancel, isLoading |
|
|
119
121
|
| Divider | orientation (horizontal, vertical), variant (solid, dashed, dotted), label, color |
|
|
120
122
|
| Drawer | isOpen, onClose, position (left, right, top, bottom), title, size, children, className |
|
|
@@ -124,6 +126,7 @@ Import from `@lukeashford/aurelius`:
|
|
|
124
126
|
| Input | error, leadingIcon, trailingIcon |
|
|
125
127
|
| InputGroup | children |
|
|
126
128
|
| Label | required |
|
|
129
|
+
| Lightbox | onClose, actions, caption, children, className |
|
|
127
130
|
| List | variant, ordered, leading, trailing, interactive, selected, disabled, primary, secondary |
|
|
128
131
|
| MarkdownContent | content, isMarkdown, sanitizeConfig, isStreaming, cursorClassName |
|
|
129
132
|
| Menu | children, open, onOpenChange, asChild, align, side, icon, destructive |
|
|
@@ -153,11 +156,11 @@ Import from `@lukeashford/aurelius`:
|
|
|
153
156
|
| Toast | children, position (top-right, top-left, bottom-right, bottom-left, top-center, bottom-center), defaultDuration |
|
|
154
157
|
| Tooltip | content, children, open, side (top, right, bottom, left) |
|
|
155
158
|
| VideoCard | src, title, subtitle, aspectRatio (${number}/${number}), playing, controls, light, volume, muted, loop, mediaClassName, contentClassName, playerProps, loading |
|
|
156
|
-
| ArtifactsPanel | nodes, loading, openArtifactId, onArtifactClosed, artifactCount, onExpand |
|
|
159
|
+
| ArtifactsPanel | nodes, loading, openArtifactId, onArtifactClosed, getArtifactActions, artifact, ctx, artifactCount, onExpand |
|
|
157
160
|
| BranchNavigator | current, total, onPrevious, onNext, size, showIcon |
|
|
158
161
|
| ChatInput | position (centered, bottom), placeholder, helperText, onSubmit, disabled, animate, isStreaming, onStop, attachments, onAttachmentsChange, onAttachmentRemove, showAttachmentButton, acceptedFileTypes, notice, onInputChange, initialInputValue, autoFocus |
|
|
159
|
-
| ChatInterface | messages, conversationTree, onTreeChange, conversations, onMessageSubmit, onEditMessage, onRetryMessage, onJumpHere, onJumpToLatest, onStop, onSelectConversation, onNewChat, onRenameConversation, isStreaming, isThinking, thinkingLabel, placeholder, emptyStateHelper, emptyState, showAttachmentButton, enableMessageActions, attachments, onAttachmentsChange, onAttachmentRemove, onAttachmentOpen, artifactNodes, isArtifactsPanelOpen, onArtifactsPanelOpenChange,
|
|
160
|
-
| ChatView | items, latestUserMessageIndex
|
|
162
|
+
| ChatInterface | messages, conversationTree, onTreeChange, conversations, onMessageSubmit, onEditMessage, onRetryMessage, onJumpHere, onJumpToLatest, onStop, onSelectConversation, onNewChat, onRenameConversation, isStreaming, isThinking, thinkingLabel, placeholder, emptyStateHelper, emptyState, showAttachmentButton, enableMessageActions, attachments, onAttachmentsChange, onAttachmentRemove, onAttachmentOpen, artifactNodes, isArtifactsPanelOpen, onArtifactsPanelOpenChange, getArtifactActions, artifact, ctx |
|
|
163
|
+
| ChatView | items, latestUserMessageIndex |
|
|
161
164
|
| Checkpoint | name, executionKind (task, submit, rename, init, ingest), status (completed, failed, cancelled), isActive, muted, branchInfo, onJumpHere |
|
|
162
165
|
| GreyedDivider | messageCount, checkpointCount, onJumpToLatest |
|
|
163
166
|
| HistoryPanel | conversations, onSelectConversation, onNewChat, onRenameConversation |
|
|
@@ -166,6 +169,13 @@ Import from `@lukeashford/aurelius`:
|
|
|
166
169
|
| TodosList | tasks, title, onStopAllTasks |
|
|
167
170
|
| ToolPanelContainer | topContent, bottomContent, width, initialTopPercent, onResizeStart, side |
|
|
168
171
|
| ToolSidebar | tools, activeTools, onToggleTool, side |
|
|
172
|
+
| ArtifactImageGridSection | data |
|
|
173
|
+
| ArtifactSpotlightSection | data |
|
|
174
|
+
| ColorPaletteSection | data |
|
|
175
|
+
| CoverSection | data |
|
|
176
|
+
| DeliverableRenderer | deliverable, onDownloadPdf, hideActions, className |
|
|
177
|
+
| QuoteBlockSection | data |
|
|
178
|
+
| TextBlockSection | data |
|
|
169
179
|
| ChatBubbleIcon | children |
|
|
170
180
|
| CheckSquareIcon | children |
|
|
171
181
|
| ChevronLeftIcon | children |
|
|
@@ -203,6 +213,7 @@ based on the artifact type.
|
|
|
203
213
|
- **Artifact.isPending**: * Whether this artifact is still loading (shows skeleton)
|
|
204
214
|
- **Artifact.fullWidth**: * Whether the artifact should span full width in the grid
|
|
205
215
|
- **Artifact.scriptElements**: * For html artifacts - structured script elements (used by ScriptCard)
|
|
216
|
+
- **Artifact.deliverable**: * For deliverable artifacts - the resolved presentation spec, every artifact reference already inflated. Rendered as a compact card that links to the full DeliverableRenderer; surfaces the cover info and section count.
|
|
206
217
|
- **artifact**: * The artifact object to display
|
|
207
218
|
- **onExpand**: * Callback when the artifact should be expanded/opened
|
|
208
219
|
- **loading**: * Whether the artifact is still loading
|
|
@@ -216,6 +227,22 @@ shows the total items.
|
|
|
216
227
|
- **node**: * The GROUP node to display
|
|
217
228
|
- **onClick**: * Called when the group is clicked (e.g. to navigate into it)
|
|
218
229
|
|
|
230
|
+
**ArtifactLightboxBody**
|
|
231
|
+
Picks the bare body for an artifact when displayed inside a {@link Lightbox}.
|
|
232
|
+
|
|
233
|
+
Each kind decides its own internal layout — an image aspect-fits the canvas,
|
|
234
|
+
a deliverable scrolls full-bleed, and so on. Crucially, none of these wrap
|
|
235
|
+
themselves in another Card frame: the lightbox already provides the canvas,
|
|
236
|
+
and a card-inside-modal produces the nested-frame look that signals "cheap
|
|
237
|
+
generic container." Kinds that don't yet have a dedicated bare body fall
|
|
238
|
+
back to {@link ArtifactCard} — adequate, but the stack-of-frames feel is the
|
|
239
|
+
thing to fix next when those kinds matter.
|
|
240
|
+
|
|
241
|
+
Callers don't choose the body explicitly; the registry dispatches by
|
|
242
|
+
`artifact.type`. To add a kind, extend the switch — never branch on type at
|
|
243
|
+
the call site.
|
|
244
|
+
|
|
245
|
+
|
|
219
246
|
**ArtifactVariantStack**
|
|
220
247
|
Renders a VARIANT_SET node as a Card with the set label as title.
|
|
221
248
|
Children are displayed in a horizontal row inside the card body.
|
|
@@ -242,6 +269,17 @@ navigate for groups).
|
|
|
242
269
|
**AudioCard**
|
|
243
270
|
- **playerProps**: Forwarded to the underlying ReactPlayer.
|
|
244
271
|
|
|
272
|
+
**DeliverableCard**
|
|
273
|
+
Compact preview of a deliverable for surfaces that can't host the full
|
|
274
|
+
multi-page renderer (chat tree, artifact lists). Surfaces the deliverable's
|
|
275
|
+
cover info plus its section count. The whole card is clickable — the
|
|
276
|
+
affordance is the same expand-icon overlay that {@link ArtifactCard} shows
|
|
277
|
+
for every artifact kind, so we don't add a "Open preview" lure here.
|
|
278
|
+
|
|
279
|
+
- **deliverable**: * Resolved deliverable spec — every artifact reference already inflated. Same shape the full DeliverableRenderer accepts.
|
|
280
|
+
- **title**: Optional override for the cover title (otherwise derived from the spec).
|
|
281
|
+
- **subtitle**: Optional subtitle shown below the title.
|
|
282
|
+
|
|
245
283
|
**FileChip**
|
|
246
284
|
- **name**: * File name to display
|
|
247
285
|
- **size**: * File size in bytes (optional, will be formatted)
|
|
@@ -254,6 +292,24 @@ navigate for groups).
|
|
|
254
292
|
- **artifactId**: * Backend artifact id, set once the upload has been integrated. When both `artifactId` and `onOpen` are present, the chip becomes clickable.
|
|
255
293
|
- **onOpen**: * Click handler invoked with `artifactId` when the chip is clicked. Compose-box (pre-integrate) chips should not pass this — the chip stays non-clickable except for its remove button.
|
|
256
294
|
|
|
295
|
+
**Lightbox**
|
|
296
|
+
Full-bleed modal canvas for one piece of content. Premium-haptic alternative
|
|
297
|
+
to a bordered modal: deep void backdrop, scale-fade entrance, no inner frame,
|
|
298
|
+
floating glass action cluster top-right.
|
|
299
|
+
|
|
300
|
+
The component is content-agnostic — it ships chrome, not artifact knowledge.
|
|
301
|
+
Compose it with kind-aware bodies and action sets to build the artifact
|
|
302
|
+
viewer; reach for it directly any time a single piece of content needs the
|
|
303
|
+
full screen.
|
|
304
|
+
|
|
305
|
+
Dismiss surfaces: ESC, backdrop click (outside the sized content area),
|
|
306
|
+
close button in the action cluster.
|
|
307
|
+
|
|
308
|
+
- **onClose**: * Called when the user dismisses the lightbox (ESC, backdrop click, X button). The caller owns the open/closed state — when `onClose` fires, unmount the lightbox.
|
|
309
|
+
- **actions**: * Optional kind-specific actions placed before the close button in the floating top-right cluster. Typically buttons like "Share" or "Download". The cluster always renders the close button; pass `undefined` if the only affordance is dismiss.
|
|
310
|
+
- **caption**: * Optional caption shown bottom-centre over the backdrop. Use for short metadata like a title and subtitle. Non-interactive — clicks pass through to the backdrop and dismiss.
|
|
311
|
+
- **children**: * The artifact body. Sits directly on the backdrop with no inner frame — the body is responsible for its own layout (object-contain image, scrollable deliverable, readable text column, etc.). Click events whose target is the sized content wrapper (i.e. the empty area around the body) dismiss the lightbox; clicks on the body itself do not.
|
|
312
|
+
|
|
257
313
|
**MarkdownContent**
|
|
258
314
|
- **content**: * Content to display (can be Markdown or HTML)
|
|
259
315
|
- **isMarkdown**: * Whether the content should be treated as Markdown @default true
|
|
@@ -371,6 +427,7 @@ moving back from the content.
|
|
|
371
427
|
- **loading**: * Whether artifacts are still loading (show skeletons)
|
|
372
428
|
- **openArtifactId**: * When set to a non-null id, surfaces the same expanded artifact card the panel grid would. Drives chip click-through from outside the panel. Pair with `onArtifactClosed` so the parent can clear its controller state when the user dismisses the modal.
|
|
373
429
|
- **onArtifactClosed**: * Called when the user closes the expanded card (X button or backdrop). The parent owns whether subsequent renders re-open by re-supplying `openArtifactId`.
|
|
430
|
+
- **getArtifactActions**: * Resolves the floating action cluster shown over the lightbox when an artifact is opened. Switch on `artifact.type` and return the host-owned buttons for that kind (e.g. Share + Download for deliverables, Download for images). Aurelius ships the close affordance itself; return only the kind-specific actions, or `null` when there are none. The `ctx.onClose` helper lets actions dismiss the lightbox after a successful operation.
|
|
374
431
|
|
|
375
432
|
**BranchNavigator**
|
|
376
433
|
BranchNavigator provides a UI for switching between conversation branches.
|
|
@@ -470,9 +527,7 @@ artifactNodes prop.
|
|
|
470
527
|
- **artifactNodes**: * Top-level artifact tree nodes for the artifacts panel.
|
|
471
528
|
- **isArtifactsPanelOpen**: * Whether the artifacts panel is currently open (controlled). When set, maps to the tool panel system — opens the artifacts tool.
|
|
472
529
|
- **onArtifactsPanelOpenChange**: * Called when the artifacts panel is opened or closed (controlled).
|
|
473
|
-
- **
|
|
474
|
-
- **tasksTitle**: * Title for the todos list @default "Tasks"
|
|
475
|
-
- **onStopAllTasks**: * Called when the "Stop All Tasks" button is clicked in the tasks panel. Only shown when at least one task has in_progress status. The consumer app decides what stopping means (cancel API calls, mark tasks cancelled, etc.). * May return a Promise. While the Promise is pending, the button becomes disabled and displays a spinner with "Stopping tasks" so the user knows the stop request is in flight.
|
|
530
|
+
- **getArtifactActions**: * Resolves the floating action cluster shown over the artifact lightbox. The host switches on `artifact.type` and returns the right buttons for that kind (e.g. Share + Download for deliverables, Download for images). Aurelius ships the close affordance itself; return only the kind-specific actions, or `null` when none. Use `ctx.onClose` to dismiss the lightbox after a successful operation.
|
|
476
531
|
|
|
477
532
|
**ChatView**
|
|
478
533
|
Renders a heterogeneous chat stream — messages, checkpoints, and the
|
|
@@ -490,10 +545,6 @@ Key behaviors:
|
|
|
490
545
|
- **ChatViewMessageItem.onJumpHere**: * Click handler for the bubble. When provided, the bubble becomes a navigational anchor that moves the active leaf to this node. Aurelius suppresses the click for `isActive` rows, link / button targets inside the bubble, and active text selections.
|
|
491
546
|
- **items**: * Rows to render in the chat stream. Heterogeneous: messages, checkpoints, and the greyed-future divider live in the same list, ordered top-to-bottom.
|
|
492
547
|
- **latestUserMessageIndex**: * Index of the latest user-message row to anchor scroll to. When this index changes, the corresponding row scrolls to the top. Defaults to the last-found user message in `items`.
|
|
493
|
-
- **isStreaming**: * Whether the assistant is currently streaming a response. Drives the streaming cursor on the last assistant message and the thinking indicator.
|
|
494
|
-
- **isThinking**: * Whether to show the thinking indicator (between user message and response).
|
|
495
|
-
- **thinkingLabel**: * When set, the thinking indicator renders this label verbatim instead of its rotating phrases. Use for domain-specific waits like "Analyzing uploads..." (any animated suffix is the caller's responsibility).
|
|
496
|
-
- **onScroll**: * Callback when the user scrolls manually.
|
|
497
548
|
|
|
498
549
|
**Checkpoint**
|
|
499
550
|
A single-line marker in the chat stream that anchors a chat position to a
|
|
@@ -601,6 +652,50 @@ side of the chat interface. It follows the IntelliJ pattern:
|
|
|
601
652
|
- **onToggleTool**: * Called when a tool button is clicked (toggle)
|
|
602
653
|
- **side**: * Which side this sidebar is on — controls border direction
|
|
603
654
|
|
|
655
|
+
**ArtifactImageGridSection**
|
|
656
|
+
Grid of project artifact images with optional captions. The number of
|
|
657
|
+
columns is fixed by the spec (1–3); the renderer enforces a sensible aspect
|
|
658
|
+
ratio per item and lets the browser flow rows.
|
|
659
|
+
|
|
660
|
+
|
|
661
|
+
**ArtifactSpotlightSection**
|
|
662
|
+
A single hero artifact image with optional prose alongside. Reads at full
|
|
663
|
+
page width on screen and prints to a single page.
|
|
664
|
+
|
|
665
|
+
|
|
666
|
+
**ColorPaletteSection**
|
|
667
|
+
Color palette presented as labelled swatches with hex values.
|
|
668
|
+
|
|
669
|
+
|
|
670
|
+
**CoverSection**
|
|
671
|
+
Title page for a deliverable. Always rendered as the first section.
|
|
672
|
+
|
|
673
|
+
|
|
674
|
+
**DeliverableRenderer**
|
|
675
|
+
Render a presentable deliverable (moodboard, pitch deck) from a structured
|
|
676
|
+
spec. The same component drives the on-screen view and the print/PDF
|
|
677
|
+
version — `@media print` styles in `aurelius/styles/base.css` keep them in
|
|
678
|
+
sync. To produce a PDF, drive the page with headless Chromium and let the
|
|
679
|
+
print stylesheet do the work.
|
|
680
|
+
|
|
681
|
+
The renderer is purely presentational: it takes a fully resolved spec
|
|
682
|
+
(artifact URLs already inflated by the caller) and dispatches each section
|
|
683
|
+
to its typed sub-renderer. Unknown section types are skipped silently
|
|
684
|
+
forward-compat for new section variants added by the backend.
|
|
685
|
+
|
|
686
|
+
- **deliverable**: Resolved deliverable spec — every artifact reference already inflated.
|
|
687
|
+
- **onDownloadPdf**: * Called when the viewer requests a PDF download. The host application is responsible for fetching and triggering the file save (the URL knows about share tokens and credentials we don't). When omitted, the download affordance is hidden.
|
|
688
|
+
- **hideActions**: Hide the floating action bar entirely. Used when rendering for print.
|
|
689
|
+
|
|
690
|
+
**QuoteBlockSection**
|
|
691
|
+
Pulled quote with optional attribution. The renderer adds the surrounding
|
|
692
|
+
quotation marks.
|
|
693
|
+
|
|
694
|
+
|
|
695
|
+
**TextBlockSection**
|
|
696
|
+
Prose section. Body is rendered as Markdown.
|
|
697
|
+
|
|
698
|
+
|
|
604
699
|
**CrossSquareIcon**
|
|
605
700
|
- **variant**: * Visual variant for different states - 'cancelled': subtle ash coloring - 'failed': error red coloring
|
|
606
701
|
|
package/package.json
CHANGED
package/scripts/eslint.mjs
CHANGED
|
@@ -107,10 +107,12 @@ export function createAureliusESLintConfig(options = {}) {
|
|
|
107
107
|
},
|
|
108
108
|
},
|
|
109
109
|
|
|
110
|
-
// CSS files: enforce Tailwind v4 CSS usage and tokens (exclude
|
|
110
|
+
// CSS files: enforce Tailwind v4 CSS usage and tokens (exclude foundation
|
|
111
|
+
// sheets — fonts/theme/deliverable — which define the primitives the
|
|
112
|
+
// tokens rule would otherwise flag as hard-coded).
|
|
111
113
|
{
|
|
112
114
|
files: ['**/*.css'],
|
|
113
|
-
ignores: ['**/fonts.css', '**/theme.css'],
|
|
115
|
+
ignores: ['**/fonts.css', '**/theme.css', '**/deliverable.css'],
|
|
114
116
|
language: 'css/css',
|
|
115
117
|
languageOptions: {
|
|
116
118
|
customSyntax: tailwind4,
|