File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -100,6 +100,9 @@ function readableSourceTypeLabel(type: string): string | null {
100100 return words ? words . charAt ( 0 ) . toUpperCase ( ) + words . slice ( 1 ) : null ;
101101}
102102
103+ /**
104+ * Derive normalized source-type metadata for badges, icons, and tone tokens.
105+ */
103106export function citationTypeMeta ( c : Citation ) : CitationTypeMeta {
104107 const type = deriveSourceType ( c ) ;
105108 const canonicalType = type . toLowerCase ( ) ;
@@ -122,6 +125,9 @@ export function citationTypeMeta(c: Citation): CitationTypeMeta {
122125 } ;
123126}
124127
128+ /**
129+ * Choose the visual source marker for a citation: provider image, type icon, or monogram.
130+ */
125131export function citationSourceVisual ( c : Citation ) : CitationSourceVisual {
126132 const iconUrl = c . iconUrl ?. trim ( ) ;
127133 if ( iconUrl ) {
You can’t perform that action at this time.
0 commit comments