@@ -94,6 +94,15 @@ const WIDGET_ICONS: Record<CodeBlockType, IconName> = {
9494 generic : 'Code' ,
9595}
9696
97+ const WIDGET_LABELS : Record < CodeBlockType , string > = {
98+ abc : 'Score' ,
99+ svg : 'SVG' ,
100+ diagram : 'Diagram' ,
101+ marpit : 'Presentation' ,
102+ html : 'HTML' ,
103+ generic : 'Code' ,
104+ }
105+
97106// ============================================================================
98107// Component
99108// ============================================================================
@@ -172,6 +181,13 @@ export const ArtifactPreviewCard = memo(
172181 item . kind === 'artifact'
173182 ? ( ARTIFACT_ICONS [ item . artifact . type ] ?? 'Page' )
174183 : WIDGET_ICONS [ item . widget . widgetType ]
184+ const statusLabel =
185+ item . kind === 'artifact' ? item . artifact . status : undefined
186+ const typeLabel =
187+ item . kind === 'artifact'
188+ ? item . artifact . type
189+ : WIDGET_LABELS [ item . widget . widgetType ]
190+
175191 // ---- Landscape card ----
176192 if ( layout === 'landscape' ) {
177193 return (
@@ -233,10 +249,10 @@ export const ArtifactPreviewCard = memo(
233249 onPress = { handlePress }
234250 >
235251 < CardBody className = "flex flex-row items-center gap-2 sm:gap-3 p-2 sm:p-3" >
236- { /* <div className="flex items-center justify-center w-8 h-8 sm:w-10 sm:h-10 rounded-medium bg-default-100 shrink-0">
252+ < div className = "flex items-center justify-center w-8 h-8 sm:w-10 sm:h-10 rounded-medium bg-default-100 shrink-0" >
237253 < Icon name = { icon } size = "md" className = "text-default-500" />
238- </div> */ }
239- { /* <div className="flex flex-col min-w-0 flex-1 overflow-hidden">
254+ </ div >
255+ < div className = "flex flex-col min-w-0 flex-1 overflow-hidden" >
240256 < span className = "font-medium text-xs sm:text-sm truncate" >
241257 { title }
242258 </ span >
@@ -249,7 +265,7 @@ export const ArtifactPreviewCard = memo(
249265 < span className = "ml-1" > · { statusLabel } </ span >
250266 ) }
251267 </ span >
252- </div> */ }
268+ </ div >
253269 { preview ? (
254270 < img
255271 src = { preview }
0 commit comments