@springbrand/message-panel 0.2.0-alpha.48 → 0.2.0-alpha.49

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.
@@ -21,6 +21,7 @@ import {
21
21
  CollapsibleTrigger,
22
22
  } from "../primitives/collapsible";
23
23
  import { Tooltip } from "../primitives/tooltip";
24
+ import { ImagePreview } from "../file-view";
24
25
  import { WorkshopButton } from "../primitives/workshop-controls";
25
26
  import { MarkdownMessage } from "./markdown-message";
26
27
  import { collapsePanel } from "./surfaces";
@@ -305,17 +306,27 @@ export function AskUserAttachmentField({
305
306
  className="flex min-w-0 items-center gap-3 rounded-xl border border-kumo-line bg-kumo-elevated/55 p-2"
306
307
  >
307
308
  {attachment.status === "ready" && attachment.previewUrl
308
- ? (
309
+ ? image
310
+ ? (
311
+ <ImagePreview
312
+ src={attachment.previewUrl}
313
+ label={label}
314
+ placement="assistant-message"
315
+ >
316
+ {preview}
317
+ </ImagePreview>
318
+ )
319
+ : (
309
320
  <a
310
321
  href={attachment.previewUrl}
311
322
  target="_blank"
312
323
  rel="noopener noreferrer"
313
- aria-label={`${image ? "Preview" : "Open"} ${label}`}
324
+ aria-label={`Open ${label}`}
314
325
  className="rounded-lg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-kumo-brand/40"
315
326
  >
316
327
  {preview}
317
328
  </a>
318
- )
329
+ )
319
330
  : preview}
320
331
  <span className="flex min-w-0 flex-1 flex-col">
321
332
  <span className="truncate text-[13px] font-medium text-kumo-default">
@@ -270,7 +270,7 @@ function ProductFileView({
270
270
  );
271
271
  }
272
272
 
273
- function ImagePreview({
273
+ export function ImagePreview({
274
274
  src,
275
275
  label,
276
276
  placement,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@springbrand/message-panel",
3
- "version": "0.2.0-alpha.48",
3
+ "version": "0.2.0-alpha.49",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "src",