kyd-shared-badge 0.2.31 → 0.2.32
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/SharedBadgeDisplay.tsx +1 -5
- package/src/types.ts +5 -0
package/package.json
CHANGED
|
@@ -49,14 +49,11 @@ const SharedBadgeDisplay = ({ badgeData }: { badgeData: PublicBadgeData }) => {
|
|
|
49
49
|
const graphInsights: GraphInsightsPayload = (assessmentResult)?.graph_insights || {} as GraphInsightsPayload;
|
|
50
50
|
const scoringSummary: ScoringSummary = (assessmentResult)?.scoring_summary || {} as ScoringSummary;
|
|
51
51
|
|
|
52
|
-
// const devTrustScore = summary_scores.developer_trust;
|
|
53
|
-
// const riskScore = summary_scores.risk_score;
|
|
54
|
-
// const aiUsageScore = summary_scores.ai_usage;
|
|
55
52
|
|
|
56
53
|
const wrapperMaxWidth = 'max-w-5xl';
|
|
57
54
|
|
|
58
55
|
// Overall and genre scores
|
|
59
|
-
const overallFinalPercent =
|
|
56
|
+
const overallFinalPercent = assessmentResult?.final_percent || 0;
|
|
60
57
|
|
|
61
58
|
// Build category display grouped by genres from scoring_summary.config.genre_mapping
|
|
62
59
|
const genreMapping = (scoringSummary?.config?.genre_mapping) || {};
|
|
@@ -155,7 +152,6 @@ const SharedBadgeDisplay = ({ badgeData }: { badgeData: PublicBadgeData }) => {
|
|
|
155
152
|
className={'rounded-xl shadow-xl p-6 sm:p-8 mt-8 border'}
|
|
156
153
|
style={{ backgroundColor: 'var(--content-card-background)', borderColor: 'var(--icon-button-secondary)' }}
|
|
157
154
|
>
|
|
158
|
-
|
|
159
155
|
<div className={'space-y-12 divide-y'} style={{ borderColor: 'var(--icon-button-secondary)' }}>
|
|
160
156
|
<div className="pt-8 first:pt-0">
|
|
161
157
|
<Reveal as={'h4'} offsetY={8} durationMs={500} className={'text-2xl font-semibold mb-3'} style={{ color: 'var(--text-main)' }}>Report Summary</Reveal>
|
package/src/types.ts
CHANGED
|
@@ -156,6 +156,7 @@ export interface FBIWantedMatch {
|
|
|
156
156
|
}
|
|
157
157
|
|
|
158
158
|
export interface AssessmentResult {
|
|
159
|
+
final_percent: number;
|
|
159
160
|
report_summary?: string;
|
|
160
161
|
recommendations: {
|
|
161
162
|
summary?: string;
|
|
@@ -238,6 +239,10 @@ export interface ClientMetadata {
|
|
|
238
239
|
// --- Scoring Summary (from rules engine) ---
|
|
239
240
|
export interface ScoringSummaryConfig {
|
|
240
241
|
coldstart_fraction?: number;
|
|
242
|
+
coldstart_mapping?: {
|
|
243
|
+
default?: number;
|
|
244
|
+
by_category?: { [category: string]: number };
|
|
245
|
+
};
|
|
241
246
|
system_weights?: { [k: string]: number };
|
|
242
247
|
genre_mapping?: { [genre: string]: string[] };
|
|
243
248
|
}
|