@lukeashford/aurelius 4.6.0 → 4.8.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 +751 -427
- package/dist/index.d.ts +751 -427
- package/dist/index.js +2552 -2201
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2497 -2152
- package/dist/index.mjs.map +1 -1
- package/dist/styles/deliverable.css +52 -0
- package/dist/styles/theme.css +72 -1
- package/llms.md +123 -24
- package/package.json +5 -5
|
@@ -258,6 +258,58 @@
|
|
|
258
258
|
pointer-events: auto;
|
|
259
259
|
}
|
|
260
260
|
|
|
261
|
+
/* === Compact card ===
|
|
262
|
+
* Surfaced in chat-tree-style artifact lists where the full multi-page
|
|
263
|
+
* renderer would be cramped. Borrows the cover treatment but constrains it
|
|
264
|
+
* to card dimensions and adds a footer that invites the viewer to expand
|
|
265
|
+
* to the full presentation.
|
|
266
|
+
*/
|
|
267
|
+
|
|
268
|
+
@utility deliverable-card {
|
|
269
|
+
--deliverable-accent: var(--color-gold);
|
|
270
|
+
display: flex;
|
|
271
|
+
flex-direction: column;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
@utility deliverable-card-cover {
|
|
275
|
+
display: flex;
|
|
276
|
+
flex-direction: column;
|
|
277
|
+
align-items: flex-start;
|
|
278
|
+
gap: var(--spacing-2);
|
|
279
|
+
padding: var(--spacing-6);
|
|
280
|
+
border-bottom: 1px solid color-mix(in oklab, var(--deliverable-accent) 30%, transparent);
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
@utility deliverable-card-eyebrow {
|
|
284
|
+
text-transform: uppercase;
|
|
285
|
+
letter-spacing: var(--letter-spacing-widest);
|
|
286
|
+
color: var(--color-silver);
|
|
287
|
+
font-size: var(--text-xs);
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
@utility deliverable-card-title {
|
|
291
|
+
font-family: var(--font-heading);
|
|
292
|
+
font-size: var(--text-2xl);
|
|
293
|
+
line-height: var(--text-2xl--line-height);
|
|
294
|
+
color: var(--deliverable-accent);
|
|
295
|
+
letter-spacing: var(--letter-spacing-tight);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
@utility deliverable-card-subtitle {
|
|
299
|
+
font-size: var(--text-sm);
|
|
300
|
+
color: var(--color-silver);
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
@utility deliverable-card-meta {
|
|
304
|
+
display: flex;
|
|
305
|
+
align-items: center;
|
|
306
|
+
padding: var(--spacing-3) var(--spacing-6);
|
|
307
|
+
font-size: var(--text-xs);
|
|
308
|
+
text-transform: uppercase;
|
|
309
|
+
letter-spacing: var(--letter-spacing-wider);
|
|
310
|
+
color: var(--color-silver);
|
|
311
|
+
}
|
|
312
|
+
|
|
261
313
|
/* === Print path ===
|
|
262
314
|
* Same React tree, different paint. The strategy:
|
|
263
315
|
* - Cover gets its own named page (`@page cover`) with no margins so it
|
package/dist/styles/theme.css
CHANGED
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
/* Core RGB helpers (reduce repeated rgba() literals) */
|
|
20
20
|
--ink-rgb: 0 0 0;
|
|
21
21
|
--gold-rgb: 201 162 39;
|
|
22
|
+
--obsidian-rgb: 10 10 10;
|
|
22
23
|
--glass-rgb: 20 20 20;
|
|
23
24
|
|
|
24
25
|
/* Gold spectrum (derived from one base where possible) */
|
|
@@ -175,12 +176,14 @@
|
|
|
175
176
|
/* ===== ANIMATIONS ===== */
|
|
176
177
|
--animate-fade-in: fade-in 200ms ease-out;
|
|
177
178
|
--animate-fade-out: fade-out 150ms ease-in;
|
|
179
|
+
--animate-lightbox-in: lightbox-in 220ms var(--ease-smooth);
|
|
178
180
|
--animate-slide-in-right: slide-in-right 300ms var(--ease-smooth);
|
|
179
181
|
--animate-slide-out-right: slide-out-right 200ms ease-in;
|
|
180
182
|
--animate-pulse-glow: pulse-glow 2s ease-in-out infinite;
|
|
181
183
|
--animate-cursor-blink: cursor-blink 1s steps(1) infinite;
|
|
182
184
|
--animate-snake-spin: snake-spin 1.5s linear infinite;
|
|
183
185
|
--animate-snake-travel: snake-travel 1.5s ease-in-out infinite;
|
|
186
|
+
--animate-pulse-once: pulse-once 600ms ease-out;
|
|
184
187
|
|
|
185
188
|
/* ===== LAYOUT TOKENS ===== */
|
|
186
189
|
--container-sm: 640px;
|
|
@@ -208,6 +211,17 @@
|
|
|
208
211
|
}
|
|
209
212
|
}
|
|
210
213
|
|
|
214
|
+
@keyframes lightbox-in {
|
|
215
|
+
0% {
|
|
216
|
+
opacity: 0;
|
|
217
|
+
transform: scale(0.96);
|
|
218
|
+
}
|
|
219
|
+
100% {
|
|
220
|
+
opacity: 1;
|
|
221
|
+
transform: scale(1);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
211
225
|
@keyframes slide-in-right {
|
|
212
226
|
0% {
|
|
213
227
|
transform: translateX(100%);
|
|
@@ -240,6 +254,15 @@
|
|
|
240
254
|
}
|
|
241
255
|
}
|
|
242
256
|
|
|
257
|
+
@keyframes pulse-once {
|
|
258
|
+
0% {
|
|
259
|
+
background-color: rgb(var(--gold-rgb) / 0.3);
|
|
260
|
+
}
|
|
261
|
+
100% {
|
|
262
|
+
background-color: transparent;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
|
|
243
266
|
@keyframes cursor-blink {
|
|
244
267
|
0%,
|
|
245
268
|
50% {
|
|
@@ -463,6 +486,54 @@
|
|
|
463
486
|
}
|
|
464
487
|
}
|
|
465
488
|
|
|
489
|
+
/* ===== COMPONENT STYLES =====
|
|
490
|
+
These are component-level CSS classes that use design tokens but need
|
|
491
|
+
cascade-based context overrides — something Tailwind utilities applied
|
|
492
|
+
directly on a JSX element can't do without prop drilling. */
|
|
493
|
+
|
|
494
|
+
/* Mention chip — colours come from CSS variables so the parent prose
|
|
495
|
+
context (`.prose-inherit` user bubble vs `.prose-invert` assistant bubble)
|
|
496
|
+
can override them via the cascade. The defaults below are the
|
|
497
|
+
gold-on-dark variant suitable for the standard charcoal background. */
|
|
498
|
+
@utility aurelius-mention {
|
|
499
|
+
--aurelius-mention-bg: rgb(var(--gold-rgb) / 0.1);
|
|
500
|
+
--aurelius-mention-border: rgb(var(--gold-rgb) / 0.3);
|
|
501
|
+
--aurelius-mention-text: var(--color-gold);
|
|
502
|
+
--aurelius-mention-hover-bg: rgb(var(--gold-rgb) / 0.2);
|
|
503
|
+
--aurelius-mention-x: rgb(var(--gold-rgb) / 0.6);
|
|
504
|
+
--aurelius-mention-x-hover: var(--color-gold);
|
|
505
|
+
|
|
506
|
+
background-color: var(--aurelius-mention-bg);
|
|
507
|
+
border-color: var(--aurelius-mention-border);
|
|
508
|
+
color: var(--aurelius-mention-text);
|
|
509
|
+
transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
|
|
510
|
+
}
|
|
511
|
+
.aurelius-mention:hover {
|
|
512
|
+
background-color: var(--aurelius-mention-hover-bg);
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
/* × button inside the chip — colour tracks the chip's text contrast so it
|
|
516
|
+
remains visible in both the gold-on-dark and dark-on-gold variants. */
|
|
517
|
+
@utility aurelius-mention-x {
|
|
518
|
+
color: var(--aurelius-mention-x);
|
|
519
|
+
transition: color 150ms ease;
|
|
520
|
+
}
|
|
521
|
+
.aurelius-mention-x:hover {
|
|
522
|
+
color: var(--aurelius-mention-x-hover);
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
/* When the chip lives inside a user bubble (gold background, dark text),
|
|
526
|
+
gold-on-gold disappears. Override the variables to a dark contrast that
|
|
527
|
+
reads cleanly on the gold backdrop. */
|
|
528
|
+
.prose-inherit .aurelius-mention {
|
|
529
|
+
--aurelius-mention-bg: rgb(var(--obsidian-rgb) / 0.12);
|
|
530
|
+
--aurelius-mention-border: rgb(var(--obsidian-rgb) / 0.45);
|
|
531
|
+
--aurelius-mention-text: rgb(var(--obsidian-rgb) / 0.9);
|
|
532
|
+
--aurelius-mention-hover-bg: rgb(var(--obsidian-rgb) / 0.2);
|
|
533
|
+
--aurelius-mention-x: rgb(var(--obsidian-rgb) / 0.6);
|
|
534
|
+
--aurelius-mention-x-hover: var(--color-obsidian);
|
|
535
|
+
}
|
|
536
|
+
|
|
466
537
|
/* ===== UTILITY CLASSES ===== */
|
|
467
538
|
@utility text-gradient-gold {
|
|
468
539
|
background: linear-gradient(
|
|
@@ -494,7 +565,7 @@
|
|
|
494
565
|
|
|
495
566
|
/* Flex utility for collapsing to zero size (0 0 0%) - use with flex-1 for expand/collapse animations */
|
|
496
567
|
@utility flex-zero {
|
|
497
|
-
flex: 0 0 0
|
|
568
|
+
flex: 0 0 0;
|
|
498
569
|
}
|
|
499
570
|
|
|
500
571
|
@utility font-heading {
|
package/llms.md
CHANGED
|
@@ -102,41 +102,46 @@ 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
|
-
| AudioCard | src, title, subtitle, playing, controls, volume, muted, loop, mediaClassName, contentClassName, playerProps, height, loading |
|
|
108
|
+
| AudioCard | src, title, subtitle, handle, playing, controls, volume, muted, loop, mediaClassName, contentClassName, playerProps, height, loading |
|
|
108
109
|
| Avatar | src, alt, name, size (xs, sm, md, lg, xl, 2xl), status (online, offline, busy) |
|
|
109
110
|
| Badge | variant (default, gold, success, error, warning, info) |
|
|
110
111
|
| BrandIcon | size (sm, md, lg), variant (solid, outline) |
|
|
111
112
|
| Breadcrumb | separator, current |
|
|
112
113
|
| Button | variant (primary, important, elevated, outlined, featured, ghost, danger), size (sm, md, lg, xl), loading |
|
|
113
|
-
| Card | variant (default, elevated, outlined, ghost, featured), interactive, selected, noPadding, loading, title, subtitle, action, align, aspect, position |
|
|
114
|
+
| Card | variant (default, elevated, outlined, ghost, featured), interactive, selected, noPadding, loading, title, subtitle, action, handle, handle, align, aspect, position |
|
|
114
115
|
| Checkbox | label |
|
|
115
116
|
| Col | span, offset, order |
|
|
116
117
|
| ColorSwatch | color, label |
|
|
118
|
+
| Combobox | items, selectedIndex, renderItem, onSelectItem, getItemKey, emptyState, maxHeight |
|
|
117
119
|
| Container | size (sm, md, lg, xl, fluid, responsive) |
|
|
120
|
+
| DeliverableCard | deliverable, title, subtitle, handle, loading |
|
|
118
121
|
| Dialog | description, confirmText, cancelText, onConfirm, onCancel, confirmVariant, isLoading, description, acknowledgeText, variant, description, placeholder, defaultValue, submitText, cancelText, onSubmit, onCancel, isLoading |
|
|
119
122
|
| Divider | orientation (horizontal, vertical), variant (solid, dashed, dotted), label, color |
|
|
120
123
|
| Drawer | isOpen, onClose, position (left, right, top, bottom), title, size, children, className |
|
|
121
124
|
| FileChip | name, size, type, status (pending, uploading, uploaded, analyzing, analyzed, upload_failed, analysis_failed), previewUrl, onRemove, removable, error, artifactId, onOpen |
|
|
122
125
|
| HelperText | error |
|
|
123
|
-
| ImageCard | src, alt, title, subtitle, aspectRatio (${number}/${number}), objectFit, overlay, mediaClassName, contentClassName, loading |
|
|
126
|
+
| ImageCard | src, alt, title, subtitle, handle, aspectRatio (${number}/${number}), objectFit, overlay, mediaClassName, contentClassName, loading |
|
|
124
127
|
| Input | error, leadingIcon, trailingIcon |
|
|
125
128
|
| InputGroup | children |
|
|
126
129
|
| Label | required |
|
|
130
|
+
| Lightbox | onClose, actions, caption, children, className |
|
|
127
131
|
| List | variant, ordered, leading, trailing, interactive, selected, disabled, primary, secondary |
|
|
128
|
-
| MarkdownContent |
|
|
132
|
+
| MarkdownContent | children |
|
|
133
|
+
| MentionChip | name, title, leadingIcon, onClick, onRemove |
|
|
129
134
|
| Menu | children, open, onOpenChange, asChild, align, side, icon, destructive |
|
|
130
135
|
| Message | variant (user, assistant), content, isStreaming, branchInfo, actions, hideActions, attachments, onAttachmentOpen, onJumpHere, isActive, onClick, label, children, disabled |
|
|
131
136
|
| Modal | isOpen, onClose, title, children, className |
|
|
132
137
|
| Navbar | fixed, bordered, position, active, active |
|
|
133
138
|
| Pagination | page, totalPages, onPageChange, siblingCount, showEdges |
|
|
134
|
-
| PdfCard | src, title, subtitle, height, mediaClassName, contentClassName, loading |
|
|
139
|
+
| PdfCard | src, title, subtitle, handle, height, mediaClassName, contentClassName, loading |
|
|
135
140
|
| Popover | children, trigger, position (top, bottom, left, right), align (start, center, end), open, onOpenChange, closeOnClickOutside |
|
|
136
141
|
| Progress | value, max, size (sm, md, lg), variant (default, success, warning, error), showValue, formatValue, indeterminate |
|
|
137
142
|
| Radio | label |
|
|
138
143
|
| Row | gutter, gutterX, gutterY, justify (start, center, end, between, around, evenly), align (start, center, end, stretch, baseline) |
|
|
139
|
-
| ScriptCard | title, subtitle, elements, maxHeight, loading |
|
|
144
|
+
| ScriptCard | title, subtitle, handle, elements, maxHeight, loading |
|
|
140
145
|
| SectionHeading | level (h2, h3) |
|
|
141
146
|
| Select | error, options |
|
|
142
147
|
| Skeleton | children |
|
|
@@ -148,16 +153,16 @@ Import from `@lukeashford/aurelius`:
|
|
|
148
153
|
| Switch | checked, defaultChecked, onCheckedChange, label |
|
|
149
154
|
| Table | responsive, hoverable, selected, sortable, sortDirection |
|
|
150
155
|
| Tabs | defaultValue, value, onValueChange, value, value, forceMount |
|
|
151
|
-
| TextCard | content, title, subtitle, isMarkdown, maxHeight, contentClassName, loading |
|
|
156
|
+
| TextCard | content, title, subtitle, handle, isMarkdown, maxHeight, contentClassName, loading |
|
|
152
157
|
| Textarea | error |
|
|
153
158
|
| Toast | children, position (top-right, top-left, bottom-right, bottom-left, top-center, bottom-center), defaultDuration |
|
|
154
159
|
| Tooltip | content, children, open, side (top, right, bottom, left) |
|
|
155
|
-
| 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 |
|
|
160
|
+
| VideoCard | src, title, subtitle, handle, aspectRatio (${number}/${number}), playing, controls, light, volume, muted, loop, mediaClassName, contentClassName, playerProps, loading |
|
|
161
|
+
| ArtifactsPanel | nodes, loading, openArtifactId, onArtifactClosed, getArtifactActions, artifact, ctx, artifactCount, onExpand |
|
|
157
162
|
| BranchNavigator | current, total, onPrevious, onNext, size, showIcon |
|
|
158
|
-
| 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
|
|
163
|
+
| ChatInput | position (centered, bottom), placeholder, helperText, onSubmit, disabled, animate, isStreaming, onStop, attachments, onAttachmentsChange, onAttachmentRemove, showAttachmentButton, acceptedFileTypes, notice, onInputChange, initialInputValue, autoFocus, textareaRef, onTextareaKeyDown |
|
|
164
|
+
| 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 |
|
|
165
|
+
| ChatView | items, latestUserMessageIndex |
|
|
161
166
|
| Checkpoint | name, executionKind (task, submit, rename, init, ingest), status (completed, failed, cancelled), isActive, muted, branchInfo, onJumpHere |
|
|
162
167
|
| GreyedDivider | messageCount, checkpointCount, onJumpToLatest |
|
|
163
168
|
| HistoryPanel | conversations, onSelectConversation, onNewChat, onRenameConversation |
|
|
@@ -210,6 +215,7 @@ based on the artifact type.
|
|
|
210
215
|
- **Artifact.isPending**: * Whether this artifact is still loading (shows skeleton)
|
|
211
216
|
- **Artifact.fullWidth**: * Whether the artifact should span full width in the grid
|
|
212
217
|
- **Artifact.scriptElements**: * For html artifacts - structured script elements (used by ScriptCard)
|
|
218
|
+
- **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.
|
|
213
219
|
- **artifact**: * The artifact object to display
|
|
214
220
|
- **onExpand**: * Callback when the artifact should be expanded/opened
|
|
215
221
|
- **loading**: * Whether the artifact is still loading
|
|
@@ -223,6 +229,22 @@ shows the total items.
|
|
|
223
229
|
- **node**: * The GROUP node to display
|
|
224
230
|
- **onClick**: * Called when the group is clicked (e.g. to navigate into it)
|
|
225
231
|
|
|
232
|
+
**ArtifactLightboxBody**
|
|
233
|
+
Picks the bare body for an artifact when displayed inside a {@link Lightbox}.
|
|
234
|
+
|
|
235
|
+
Each kind decides its own internal layout — an image aspect-fits the canvas,
|
|
236
|
+
a deliverable scrolls full-bleed, and so on. Crucially, none of these wrap
|
|
237
|
+
themselves in another Card frame: the lightbox already provides the canvas,
|
|
238
|
+
and a card-inside-modal produces the nested-frame look that signals "cheap
|
|
239
|
+
generic container." Kinds that don't yet have a dedicated bare body fall
|
|
240
|
+
back to {@link ArtifactCard} — adequate, but the stack-of-frames feel is the
|
|
241
|
+
thing to fix next when those kinds matter.
|
|
242
|
+
|
|
243
|
+
Callers don't choose the body explicitly; the registry dispatches by
|
|
244
|
+
`artifact.type`. To add a kind, extend the switch — never branch on type at
|
|
245
|
+
the call site.
|
|
246
|
+
|
|
247
|
+
|
|
226
248
|
**ArtifactVariantStack**
|
|
227
249
|
Renders a VARIANT_SET node as a Card with the set label as title.
|
|
228
250
|
Children are displayed in a horizontal row inside the card body.
|
|
@@ -247,8 +269,44 @@ navigate for groups).
|
|
|
247
269
|
- **onOpen**: * Click handler for chips with an artifactId. When set, chips that carry an artifactId become clickable and forward the id to this handler.
|
|
248
270
|
|
|
249
271
|
**AudioCard**
|
|
272
|
+
- **handle**: The artifact's `@-handle` — see `Card.Header.handle`.
|
|
250
273
|
- **playerProps**: Forwarded to the underlying ReactPlayer.
|
|
251
274
|
|
|
275
|
+
**Card**
|
|
276
|
+
- **handle**: * Optional addressable handle (the artifact's `name` / `@-handle`). Renders as a tertiary monospace line below the subtitle, prefixed with `@`. Click copies `@<handle>` to the clipboard and pulses the handle once. Use to surface the typed identifier filmmakers reference in chat.
|
|
277
|
+
|
|
278
|
+
**Combobox**
|
|
279
|
+
Floating panel for inline autocompletes — `@`-mention pickers, slash-command menus, and
|
|
280
|
+
the like. The panel is unstyled-positioned (`absolute`) so the caller controls placement
|
|
281
|
+
via wrapper, `style`, or by mounting it inside their own positioned container; this keeps
|
|
282
|
+
the component agnostic to how the trigger position is computed (caret coordinates, ref
|
|
283
|
+
rect, popover anchor).
|
|
284
|
+
|
|
285
|
+
Pair with `useComboboxNav` for the standard arrow-key + Enter/Escape behaviour.
|
|
286
|
+
|
|
287
|
+
- **items**: * Items to display in the panel. The caller is responsible for filtering before passing.
|
|
288
|
+
- **selectedIndex**: * Index of the currently highlighted (focused, not yet picked) item. Drive this from `useComboboxNav` for the standard arrow-key behaviour, or manage it yourself.
|
|
289
|
+
- **renderItem**: * Render one row. `isSelected` reflects the keyboard highlight; click and hover styling are applied by the panel.
|
|
290
|
+
- **onSelectItem**: * Called when the user clicks a row. Use the same handler you call from the keyboard's Enter key to keep mouse and keyboard paths consistent.
|
|
291
|
+
- **getItemKey**: * Stable key per item. Required because the panel re-mounts rows when `items` changes.
|
|
292
|
+
- **emptyState**: * Optional node rendered when `items` is empty. Skip the panel entirely if you'd rather hide it on no-match.
|
|
293
|
+
- **maxHeight**: * Maximum pixel height of the scrollable list. The panel itself sizes to its content up to this cap; rows beyond it scroll within the panel. @default 256
|
|
294
|
+
- **ComboboxNav.handleKeyDown**: * Standard handler for ArrowUp / ArrowDown / Enter / Escape. Returns true when a key was consumed — the caller should skip its own handling for those events.
|
|
295
|
+
- **UseComboboxNavOptions.onSelect**: * Called when the user presses Enter on the highlighted item.
|
|
296
|
+
- **UseComboboxNavOptions.onDismiss**: * Called when the user presses Escape.
|
|
297
|
+
|
|
298
|
+
**DeliverableCard**
|
|
299
|
+
Compact preview of a deliverable for surfaces that can't host the full
|
|
300
|
+
multi-page renderer (chat tree, artifact lists). Surfaces the deliverable's
|
|
301
|
+
cover info plus its section count. The whole card is clickable — the
|
|
302
|
+
affordance is the same expand-icon overlay that {@link ArtifactCard} shows
|
|
303
|
+
for every artifact kind, so we don't add a "Open preview" lure here.
|
|
304
|
+
|
|
305
|
+
- **deliverable**: * Resolved deliverable spec — every artifact reference already inflated. Same shape the full DeliverableRenderer accepts.
|
|
306
|
+
- **title**: Optional override for the cover title (otherwise derived from the spec).
|
|
307
|
+
- **subtitle**: Optional subtitle shown below the title.
|
|
308
|
+
- **handle**: The artifact's `@-handle` — see `Card.Header.handle`.
|
|
309
|
+
|
|
252
310
|
**FileChip**
|
|
253
311
|
- **name**: * File name to display
|
|
254
312
|
- **size**: * File size in bytes (optional, will be formatted)
|
|
@@ -261,11 +319,51 @@ navigate for groups).
|
|
|
261
319
|
- **artifactId**: * Backend artifact id, set once the upload has been integrated. When both `artifactId` and `onOpen` are present, the chip becomes clickable.
|
|
262
320
|
- **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.
|
|
263
321
|
|
|
322
|
+
**ImageCard**
|
|
323
|
+
- **handle**: The artifact's `@-handle` — see `Card.Header.handle`.
|
|
324
|
+
|
|
325
|
+
**Lightbox**
|
|
326
|
+
Full-bleed modal canvas for one piece of content. Premium-haptic alternative
|
|
327
|
+
to a bordered modal: deep void backdrop, scale-fade entrance, no inner frame,
|
|
328
|
+
floating glass action cluster top-right.
|
|
329
|
+
|
|
330
|
+
The component is content-agnostic — it ships chrome, not artifact knowledge.
|
|
331
|
+
Compose it with kind-aware bodies and action sets to build the artifact
|
|
332
|
+
viewer; reach for it directly any time a single piece of content needs the
|
|
333
|
+
full screen.
|
|
334
|
+
|
|
335
|
+
Dismiss surfaces: ESC, backdrop click (outside the sized content area),
|
|
336
|
+
close button in the action cluster.
|
|
337
|
+
|
|
338
|
+
- **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.
|
|
339
|
+
- **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.
|
|
340
|
+
- **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.
|
|
341
|
+
- **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.
|
|
342
|
+
|
|
264
343
|
**MarkdownContent**
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
344
|
+
Renders Markdown content into a real React tree via `react-markdown`. Drop-in for prose
|
|
345
|
+
surfaces (chat messages, artifact bodies, deliverable text). Optional `mentionRenderer`
|
|
346
|
+
adds inline `@artifact_name` chip rendering — see prop docs.
|
|
347
|
+
|
|
348
|
+
Raw HTML in the source is escaped (not rendered) by react-markdown's defaults; this is
|
|
349
|
+
intentional and safer than the previous pipeline. Pass markdown.
|
|
350
|
+
|
|
351
|
+
|
|
352
|
+
**MentionChip**
|
|
353
|
+
Inline chip representing an `@name` artifact mention. Use anywhere a stable reference to a
|
|
354
|
+
project artifact appears — typed input previews, rendered chat messages, deliverable
|
|
355
|
+
descriptions. Renders the name in monospace with a leading `@` glyph and a gold-tinted border,
|
|
356
|
+
mirroring the addressable handle the user sees on the artifact card.
|
|
357
|
+
|
|
358
|
+
Pair with the `Combobox` primitive for the typing surface, and with the
|
|
359
|
+
`MarkdownContent` `mentionRenderer` prop to render mentions inline inside rendered chat
|
|
360
|
+
messages — typically `mentionRenderer={(name) => <MentionChip name={name} … />}`.
|
|
361
|
+
|
|
362
|
+
- **name**: * The artifact name (the @-handle, without the leading @).
|
|
363
|
+
- **title**: * Optional human-readable title; shown in the hover tooltip alongside the name.
|
|
364
|
+
- **leadingIcon**: * Optional icon rendered before the name — typically a kind glyph (e.g. `FileImage`, `FileVideo`) or `HelpCircle` for unknown / stale references. Sized at `w-3 h-3` to match the chip's text scale.
|
|
365
|
+
- **onClick**: * Called when the chip is clicked. When provided, the chip becomes keyboard-focusable and gains a hover affordance.
|
|
366
|
+
- **onRemove**: * Called when the remove (×) button is clicked. When provided, an × appears on hover/focus. Use only on input-side previews; rendered messages should leave this unset.
|
|
269
367
|
|
|
270
368
|
**Message**
|
|
271
369
|
- **MessageBranchInfo.current**: * Current branch index (1-based)
|
|
@@ -292,6 +390,7 @@ A card for displaying PDF documents with an embedded viewer.
|
|
|
292
390
|
- **src**: * URL of the PDF file
|
|
293
391
|
- **title**: * Title of the document
|
|
294
392
|
- **subtitle**: * Subtitle or document metadata
|
|
393
|
+
- **handle**: The artifact's `@-handle` — see `Card.Header.handle`.
|
|
295
394
|
- **height**: * Height of the PDF viewer
|
|
296
395
|
- **mediaClassName**: * Optional class name for the media container
|
|
297
396
|
- **contentClassName**: * Optional class name for the content container
|
|
@@ -331,6 +430,7 @@ Follows standard screenplay formatting conventions:
|
|
|
331
430
|
- **ScriptElement.content**: * The text content of the element
|
|
332
431
|
- **title**: * Title of the script (shown at top)
|
|
333
432
|
- **subtitle**: * Subtitle/metadata (e.g., "30-second spot • Directed by AI Creative")
|
|
433
|
+
- **handle**: The artifact's `@-handle` — see `Card.Header.handle`.
|
|
334
434
|
- **elements**: * Array of script elements in order. Available types: 'scene-heading', 'action', 'character', 'dialogue', 'parenthetical', 'transition', 'title', 'subtitle'
|
|
335
435
|
- **maxHeight**: * Maximum height before scrolling (default: 16rem / 256px)
|
|
336
436
|
|
|
@@ -352,11 +452,13 @@ A card for displaying text content, supporting Markdown and HTML formatting.
|
|
|
352
452
|
- **content**: * Text content to display (Markdown, HTML, or plain text)
|
|
353
453
|
- **title**: * Optional title for the card
|
|
354
454
|
- **subtitle**: * Optional subtitle or metadata
|
|
455
|
+
- **handle**: The artifact's `@-handle` — see `Card.Header.handle`.
|
|
355
456
|
- **isMarkdown**: * Whether the content should be treated as Markdown @default true
|
|
356
457
|
- **maxHeight**: * Maximum height of the content area before scrolling @default '16rem'
|
|
357
458
|
- **contentClassName**: * Optional class name for the content container
|
|
358
459
|
|
|
359
460
|
**VideoCard**
|
|
461
|
+
- **handle**: The artifact's `@-handle` — see `Card.Header.handle`.
|
|
360
462
|
- **playerProps**: Forwarded to the underlying ReactPlayer.
|
|
361
463
|
|
|
362
464
|
**ArtifactsPanel**
|
|
@@ -378,6 +480,7 @@ moving back from the content.
|
|
|
378
480
|
- **loading**: * Whether artifacts are still loading (show skeletons)
|
|
379
481
|
- **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.
|
|
380
482
|
- **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`.
|
|
483
|
+
- **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.
|
|
381
484
|
|
|
382
485
|
**BranchNavigator**
|
|
383
486
|
BranchNavigator provides a UI for switching between conversation branches.
|
|
@@ -422,6 +525,8 @@ Features:
|
|
|
422
525
|
- **onInputChange**: * Called whenever the input value changes, giving the consumer access to the current text
|
|
423
526
|
- **initialInputValue**: * Initial value for the input, used for state restoration (e.g. from DB or localStorage)
|
|
424
527
|
- **autoFocus**: * Whether to automatically focus the input when it becomes enabled
|
|
528
|
+
- **textareaRef**: * Optional ref forwarded to the underlying `<textarea>`. Use this to drive an inline autocomplete (e.g. an `@`-mention picker) — read selection/caret position, mirror the textarea for caret coordinates, or imperatively update its value.
|
|
529
|
+
- **onTextareaKeyDown**: * Optional keydown hook that runs before the input's own handling. Call `e.preventDefault()` to stop ChatInput from acting on the event — for example, to keep Enter from submitting while an autocomplete is consuming it. The submit-on-Enter and default newline behaviours both check `defaultPrevented` and skip when set.
|
|
425
530
|
|
|
426
531
|
**ChatInterface**
|
|
427
532
|
ChatInterface is the main orchestrator for a full-featured chat experience.
|
|
@@ -477,9 +582,7 @@ artifactNodes prop.
|
|
|
477
582
|
- **artifactNodes**: * Top-level artifact tree nodes for the artifacts panel.
|
|
478
583
|
- **isArtifactsPanelOpen**: * Whether the artifacts panel is currently open (controlled). When set, maps to the tool panel system — opens the artifacts tool.
|
|
479
584
|
- **onArtifactsPanelOpenChange**: * Called when the artifacts panel is opened or closed (controlled).
|
|
480
|
-
- **
|
|
481
|
-
- **tasksTitle**: * Title for the todos list @default "Tasks"
|
|
482
|
-
- **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.
|
|
585
|
+
- **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.
|
|
483
586
|
|
|
484
587
|
**ChatView**
|
|
485
588
|
Renders a heterogeneous chat stream — messages, checkpoints, and the
|
|
@@ -497,10 +600,6 @@ Key behaviors:
|
|
|
497
600
|
- **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.
|
|
498
601
|
- **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.
|
|
499
602
|
- **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`.
|
|
500
|
-
- **isStreaming**: * Whether the assistant is currently streaming a response. Drives the streaming cursor on the last assistant message and the thinking indicator.
|
|
501
|
-
- **isThinking**: * Whether to show the thinking indicator (between user message and response).
|
|
502
|
-
- **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).
|
|
503
|
-
- **onScroll**: * Callback when the user scrolls manually.
|
|
504
603
|
|
|
505
604
|
**Checkpoint**
|
|
506
605
|
A single-line marker in the chat stream that anchors a chat position to a
|
|
@@ -739,7 +838,7 @@ Standard Tailwind classes for size (`text-sm`, `text-lg`, etc.), weight (`font-m
|
|
|
739
838
|
**Columns (Tailwind built-in):** `col-span-{1-12}`, `col-span-full`, `col-auto`, `sm:col-span-*`, `md:col-span-*`, `lg:col-span-*`, `xl:col-span-*`
|
|
740
839
|
|
|
741
840
|
### Custom Utilities
|
|
742
|
-
text-gradient-gold, glow, glow-sm, glow-md, glow-lg, flex-zero, font-heading, font-body, scroll-smooth, scrollbar-hide, backdrop-glass, focus-ring, line-clamp-2, line-clamp-3, center-absolute, aspect-wide, container, container-sm, container-md, container-lg, container-xl, container-fluid, row
|
|
841
|
+
aurelius-mention, aurelius-mention-x, text-gradient-gold, glow, glow-sm, glow-md, glow-lg, flex-zero, font-heading, font-body, scroll-smooth, scrollbar-hide, backdrop-glass, focus-ring, line-clamp-2, line-clamp-3, center-absolute, aspect-wide, container, container-sm, container-md, container-lg, container-xl, container-fluid, row
|
|
743
842
|
|
|
744
843
|
### Opacity modifiers
|
|
745
844
|
Append `/10`, `/20`, `/30`, etc. to colors: `bg-gold/20`, `border-ash/50`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lukeashford/aurelius",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.8.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",
|
|
@@ -86,7 +86,6 @@
|
|
|
86
86
|
"@testing-library/jest-dom": "^6.6.3",
|
|
87
87
|
"@testing-library/react": "^16.1.0",
|
|
88
88
|
"@testing-library/user-event": "^14.5.2",
|
|
89
|
-
"@types/dompurify": "^3.0.5",
|
|
90
89
|
"@types/jest": "^29.5.14",
|
|
91
90
|
"@types/marked": "^5.0.2",
|
|
92
91
|
"@types/node": "^20.0.0",
|
|
@@ -129,11 +128,12 @@
|
|
|
129
128
|
"dependencies": {
|
|
130
129
|
"@tailwindcss/typography": "^0.5.15",
|
|
131
130
|
"clsx": "^2.1.1",
|
|
132
|
-
"dompurify": "^3.3.1",
|
|
133
131
|
"lucide-react": "^0.555.0",
|
|
134
|
-
"
|
|
132
|
+
"react-markdown": "^10.1.0",
|
|
135
133
|
"react-player": "^3.4.0",
|
|
136
|
-
"
|
|
134
|
+
"remark-gfm": "^4.0.1",
|
|
135
|
+
"tailwind-merge": "^3.4.0",
|
|
136
|
+
"unist-util-visit": "^5.1.0"
|
|
137
137
|
},
|
|
138
138
|
"overrides": {
|
|
139
139
|
"@tootallnate/once": "3.0.1",
|