@@ -27,14 +27,16 @@ export function App(): JSX.Element {
2727 const filteredPackages = useMemo ( ( ) => {
2828 if ( ! debouncedQuery ) return packages ;
2929 const query = debouncedQuery . toLowerCase ( ) ;
30- return packages . filter ( pkg =>
31- pkg . name ?. toLowerCase ( ) . includes ( query ) ||
32- pkg . description ?. toLowerCase ( ) . includes ( query ) ||
33- pkg . wheels . some ( w =>
34- w . package_version ?. includes ( query ) ||
35- w . torch_version ?. includes ( query ) ||
36- w . cuda_version ?. includes ( query )
37- )
30+ return packages . filter (
31+ ( pkg ) =>
32+ pkg . name ?. toLowerCase ( ) . includes ( query ) ||
33+ pkg . description ?. toLowerCase ( ) . includes ( query ) ||
34+ pkg . wheels . some (
35+ ( w ) =>
36+ w . package_version ?. includes ( query ) ||
37+ w . torch_version ?. includes ( query ) ||
38+ w . cuda_version ?. includes ( query ) ,
39+ ) ,
3840 ) ;
3941 } , [ packages , debouncedQuery ] ) ;
4042
@@ -47,11 +49,19 @@ export function App(): JSX.Element {
4749
4850 if ( loading ) {
4951 return (
50- < div className = "min-h-screen bg-background flex items-center justify-center" role = "status" aria-live = "polite" aria-label = "Loading application" >
52+ < div
53+ className = "min-h-screen bg-background flex items-center justify-center"
54+ role = "status"
55+ aria-live = "polite"
56+ aria-label = "Loading application"
57+ >
5158 < Background />
5259 < AsciiBackground />
5360 < div className = "relative z-10 flex flex-col items-center gap-4" >
54- < div className = "w-16 h-16 border-2 border-primary/20 border-t-primary rounded-full animate-spin" aria-hidden = "true" />
61+ < div
62+ className = "w-16 h-16 border-2 border-primary/20 border-t-primary rounded-full animate-spin"
63+ aria-hidden = "true"
64+ />
5565 < p className = "font-mono text-sm text-text-secondary animate-pulse" >
5666 Loading wheel data...
5767 </ p >
@@ -62,7 +72,11 @@ export function App(): JSX.Element {
6272
6373 if ( error ) {
6474 return (
65- < div className = "min-h-screen bg-background flex items-center justify-center" role = "alert" aria-live = "assertive" >
75+ < div
76+ className = "min-h-screen bg-background flex items-center justify-center"
77+ role = "alert"
78+ aria-live = "assertive"
79+ >
6680 < Background />
6781 < AsciiBackground />
6882 < motion . div
@@ -98,11 +112,15 @@ export function App(): JSX.Element {
98112 < AsciiBackground />
99113 < Header />
100114
101- < main id = "main-content" className = "relative z-10 flex-1 w-full px-4 sm:px-6 lg:px-8 py-6" role = "main" aria-label = "Windows AI Wheels Package Browser" >
115+ < main
116+ id = "main-content"
117+ className = "relative z-10 flex-1 w-full px-4 sm:px-6 lg:px-8 py-6"
118+ role = "main"
119+ aria-label = "Windows AI Wheels Package Browser"
120+ >
102121 < div className = "max-w-6xl mx-auto space-y-6" >
103-
104122 { /* Hero Section */ }
105- < motion . div
123+ < motion . div
106124 initial = { { opacity : 0 , y : 20 } }
107125 animate = { { opacity : 1 , y : 0 } }
108126 className = "text-center space-y-4"
@@ -115,9 +133,9 @@ export function App(): JSX.Element {
115133 Quick-search pre-compiled Python packages for your environment
116134 </ p >
117135 < div className = "max-w-xl mx-auto" >
118- < SearchBar
119- value = { query }
120- onChange = { setQuery }
136+ < SearchBar
137+ value = { query }
138+ onChange = { setQuery }
121139 placeholder = "Search packages (e.g., flash attention, torch, cuda...)"
122140 aria-label = "Search for Python wheel packages"
123141 />
@@ -152,7 +170,8 @@ export function App(): JSX.Element {
152170 < div className = "flex items-center gap-2" >
153171 < Package className = "w-4 h-4 text-primary" aria-hidden = "true" />
154172 < span className = "font-mono text-sm text-text-secondary" >
155- < span className = "text-text-primary font-semibold" > { filteredPackages . length } </ span > package
173+ < span className = "text-text-primary font-semibold" > { filteredPackages . length } </ span > { ' ' }
174+ package
156175 { filteredPackages . length !== 1 ? 's' : '' } available
157176 </ span >
158177 </ div >
@@ -173,22 +192,29 @@ export function App(): JSX.Element {
173192 role = "status"
174193 >
175194 < Search className = "w-12 h-12 text-text-muted mx-auto mb-4" aria-hidden = "true" />
176- < p className = "text-text-secondary" >
177- No packages found matching "{ debouncedQuery } "
178- </ p >
195+ < p className = "text-text-secondary" > No packages found matching "{ debouncedQuery } "</ p >
179196 </ motion . div >
180197 ) : (
181- < ul className = "grid grid-cols-1 md:grid-cols-2 gap-4" role = "list" aria-label = "Python wheel packages" >
198+ < ul
199+ className = "grid grid-cols-1 md:grid-cols-2 gap-4"
200+ role = "list"
201+ aria-label = "Python wheel packages"
202+ >
182203 { filteredPackages
183- . map ( pkg => {
204+ . map ( ( pkg ) => {
184205 // Calculate matching wheels for each package
185- const matchingWheels = pkg . wheels . filter ( w => {
186- if ( selectedPython && ! w . python_version ?. includes ( selectedPython ) ) return false ;
206+ const matchingWheels = pkg . wheels . filter ( ( w ) => {
207+ if ( selectedPython && ! w . python_version ?. includes ( selectedPython ) )
208+ return false ;
187209 if ( selectedTorch && ! w . torch_version ?. includes ( selectedTorch ) ) return false ;
188210 if ( selectedCuda && ! w . cuda_version ?. includes ( selectedCuda ) ) return false ;
189211 return true ;
190212 } ) ;
191- return { pkg, matchingCount : matchingWheels . length , isActive : matchingWheels . length > 0 } ;
213+ return {
214+ pkg,
215+ matchingCount : matchingWheels . length ,
216+ isActive : matchingWheels . length > 0 ,
217+ } ;
192218 } )
193219 . sort ( ( a , b ) => ( b . isActive ? 1 : 0 ) - ( a . isActive ? 1 : 0 ) ) // Active first
194220 . map ( ( { pkg, matchingCount, isActive } , idx ) => (
0 commit comments