kyd-shared-badge 0.3.56 → 0.3.58

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kyd-shared-badge",
3
- "version": "0.3.56",
3
+ "version": "0.3.58",
4
4
  "private": false,
5
5
  "main": "./src/index.ts",
6
6
  "module": "./src/index.ts",
@@ -76,7 +76,7 @@ const SharedBadgeDisplay = ({ badgeData, chatProps, headless }: { badgeData: Pub
76
76
  const isHeadless = !!headless;
77
77
 
78
78
  // Overall and genre scores
79
- const overallFinalPercent = assessmentResult?.final_percent || 0;
79
+ const overallFinalPercent = Math.round(assessmentResult?.final_percent || 0);
80
80
 
81
81
  // Build category display grouped by genres from scoring_summary.config.genre_mapping
82
82
  const genreMapping = (scoringSummary?.config?.genre_mapping) || {};
package/src/types.ts CHANGED
@@ -476,4 +476,12 @@ export type Role = {
476
476
  createdAt?: string;
477
477
  userId?: string;
478
478
  }
479
+
480
+ // Timeseries for dashboard trends
481
+ export type TimeseriesPoint = { date: string; value: number };
482
+ export interface AssessmentTimeseries {
483
+ final_percent: TimeseriesPoint[];
484
+ genres: Record<string, TimeseriesPoint[]>;
485
+ categories: Record<string, TimeseriesPoint[]>;
486
+ }
479
487