11// swiftlint:disable file_length type_body_length
22import FigmaAPI
33import Foundation
4- import Rainbow
4+ import Noora
55
66/// Progress display for batch processing of multiple configs.
77///
@@ -220,7 +220,7 @@ actor BatchProgressView {
220220 let completed = configStates. values. filter { isCompleted ( $0. status) } . count
221221 let total = configStates. count
222222 let header = " Batch Export ( \( completed) / \( total) configs) "
223- lines. append ( useColors ? header . bold : header)
223+ lines. append ( useColors ? NooraUI . format ( . command ( header ) ) : header)
224224
225225 // Config lines
226226 let sortedConfigs = configOrder. compactMap { configStates [ $0] }
@@ -270,13 +270,13 @@ actor BatchProgressView {
270270 private func statusIcon( _ status: ConfigState . Status ) -> String {
271271 switch status {
272272 case . pending:
273- useColors ? " ○ " . lightBlack : " ○ "
273+ useColors ? NooraUI . format ( . muted ( " ○ " ) ) : " ○ "
274274 case . running:
275- useColors ? " ● " . cyan : " ● "
275+ useColors ? NooraUI . format ( . primary ( " ● " ) ) : " ● "
276276 case . succeeded:
277- useColors ? " ✓ " . green : " ✓ "
277+ useColors ? NooraUI . format ( . success ( " ✓ " ) ) : " ✓ "
278278 case . failed:
279- useColors ? " ✗ " . red : " ✗ "
279+ useColors ? NooraUI . format ( . danger ( " ✗ " ) ) : " ✗ "
280280 }
281281 }
282282
@@ -289,7 +289,7 @@ actor BatchProgressView {
289289 let emptyBar = String ( repeating: " ░ " , count: empty)
290290
291291 if useColors {
292- return " [ \( filledBar . cyan ) \( emptyBar . lightBlack ) ] "
292+ return " [ \( NooraUI . format ( . primary ( filledBar ) ) ) \( NooraUI . format ( . muted ( emptyBar ) ) ) ] "
293293 }
294294 return " [ \( filledBar) \( emptyBar) ] "
295295 }
@@ -362,19 +362,20 @@ actor BatchProgressView {
362362 private func formatStatusText( _ config: ConfigState ) -> String {
363363 switch config. status {
364364 case . pending:
365- return useColors ? " Waiting... " . lightBlack : " Waiting... "
365+ return useColors ? NooraUI . format ( . muted ( " Waiting... " ) ) : " Waiting... "
366366 case . running:
367367 var text = formatExportProgress ( config. exportProgress)
368368 if let eta = calculateETA ( config) , eta > 1 {
369369 let etaStr = formatDuration ( eta)
370- text += useColors ? " ETA: \( etaStr) " . lightBlack : " ETA: \( etaStr) "
370+ text += useColors ? " " + NooraUI . format ( . muted ( " ETA: \( etaStr) " ) ) : " ETA: \( etaStr) "
371371 }
372372 return text
373373 case . succeeded:
374- return formatExportProgress ( config. exportProgress) + ( useColors ? " ✓ " . green : " ✓ " )
374+ return formatExportProgress ( config. exportProgress) +
375+ ( useColors ? " " + NooraUI. format ( . success( " ✓ " ) ) : " ✓ " )
375376 case let . failed( error) :
376377 let truncated = String ( error. prefix ( 30 ) )
377- return useColors ? truncated . red : truncated
378+ return useColors ? NooraUI . format ( . danger ( truncated ) ) : truncated
378379 }
379380 }
380381
@@ -383,28 +384,28 @@ actor BatchProgressView {
383384
384385 if let colors = progress. colors, colors. total > 0 {
385386 let status = colors. current >= colors. total
386- ? ( useColors ? " ✓ " . green : " ✓ " )
387+ ? ( useColors ? NooraUI . format ( . success ( " ✓ " ) ) : " ✓ " )
387388 : " \( colors. current) / \( colors. total) "
388389 parts. append ( " Colors: \( status) " )
389390 }
390391
391392 if let icons = progress. icons, icons. total > 0 {
392393 let status = icons. current >= icons. total
393- ? ( useColors ? " ✓ " . green : " ✓ " )
394+ ? ( useColors ? NooraUI . format ( . success ( " ✓ " ) ) : " ✓ " )
394395 : " \( icons. current) / \( icons. total) "
395396 parts. append ( " Icons: \( status) " )
396397 }
397398
398399 if let images = progress. images, images. total > 0 {
399400 let status = images. current >= images. total
400- ? ( useColors ? " ✓ " . green : " ✓ " )
401+ ? ( useColors ? NooraUI . format ( . success ( " ✓ " ) ) : " ✓ " )
401402 : " \( images. current) / \( images. total) "
402403 parts. append ( " Images: \( status) " )
403404 }
404405
405406 if let typography = progress. typography, typography. total > 0 {
406407 let status = typography. current >= typography. total
407- ? ( useColors ? " ✓ " . green : " ✓ " )
408+ ? ( useColors ? NooraUI . format ( . success ( " ✓ " ) ) : " ✓ " )
408409 : " \( typography. current) / \( typography. total) "
409410 parts. append ( " Typography: \( status) " )
410411 }
@@ -418,9 +419,10 @@ actor BatchProgressView {
418419
419420 if status. isPaused {
420421 let retryStr = status. retryAfter. map { String ( format: " %.0fs " , $0) } ?? " unknown "
422+ let pausedMsg = " Rate limit: Paused (retry after \( retryStr) ) "
421423 rateText = useColors
422- ? " Rate limit: Paused (retry after \( retryStr ) ) " . yellow
423- : " Rate limit: Paused (retry after \( retryStr ) ) "
424+ ? NooraUI . format ( . accent ( pausedMsg ) )
425+ : pausedMsg
424426 } else {
425427 let currentRate = String ( format: " %.1f " , status. currentRate)
426428 let maxRate = String ( format: " %.0f " , status. requestsPerMinute / 60.0 )
0 commit comments