@xynogen/pix-data 0.2.0 → 0.2.1
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.
- package/package.json +1 -1
- package/src/data.ts +10 -0
- package/src/index.ts +1 -0
package/package.json
CHANGED
package/src/data.ts
CHANGED
|
@@ -466,6 +466,16 @@ function buildBenchIndex(): Map<string, BenchmarkEntry> {
|
|
|
466
466
|
return index;
|
|
467
467
|
}
|
|
468
468
|
|
|
469
|
+
/** Map a benchmark score (0–100) to a semantic color token. */
|
|
470
|
+
export function benchScoreColor(
|
|
471
|
+
score: number | null | undefined,
|
|
472
|
+
): "success" | "warning" | "error" | "muted" {
|
|
473
|
+
if (score == null) return "muted";
|
|
474
|
+
if (score >= 80) return "success";
|
|
475
|
+
if (score >= 60) return "warning";
|
|
476
|
+
return "error";
|
|
477
|
+
}
|
|
478
|
+
|
|
469
479
|
export function lookupBenchmark(modelName: string): BenchmarkEntry | undefined {
|
|
470
480
|
return findInIndex(modelName, buildBenchIndex());
|
|
471
481
|
}
|
package/src/index.ts
CHANGED