kyd-shared-badge 0.3.127 → 0.3.129

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.127",
3
+ "version": "0.3.129",
4
4
  "private": false,
5
5
  "main": "./src/index.ts",
6
6
  "module": "./src/index.ts",
@@ -211,6 +211,28 @@ const SharedBadgeDisplay = ({ badgeData, chatProps, headless, selfCheck = false,
211
211
  </div>
212
212
  );
213
213
 
214
+ const AuthenticityNotice = () => {
215
+ const label = (assessmentResult?.account_authenticity?.label || '').toLowerCase();
216
+ if (!label) return null;
217
+ const isCritical = label === 'likely inauthentic';
218
+ const isSuspicious = label === 'suspicious';
219
+ if (!isCritical && !isSuspicious) return null;
220
+ return (
221
+ <div className={'mt-4'}>
222
+ <div className={'rounded-md border p-3 flex items-start gap-2'} style={{ backgroundColor: 'var(--content-card-background)', borderColor: 'var(--icon-button-secondary)' }}>
223
+ <span className={'mt-0.5'} style={{ color: isCritical ? '#B00020' : '#9f580a' }}><FiAlertTriangle size={18} /></span>
224
+ <div className={'text-sm'}>
225
+ <div className={'font-semibold'} style={{ color: 'var(--text-main)' }}>{isCritical ? 'Warning' : 'Attention'}</div>
226
+ <div className={'mt-1'} style={{ color: 'var(--text-secondary)' }}>{assessmentResult?.account_authenticity?.description || (isCritical ? 'We detected signals that some linked accounts may be inauthentic. Review sources below.' : 'Some inconsistencies were observed across linked accounts. Review sources below.')}</div>
227
+ <div className={'mt-2'}>
228
+ <a href="#appendix-connected" className={'text-xs font-medium underline underline-offset-2'} style={{ color: 'var(--text-secondary)' }}>See more</a>
229
+ </div>
230
+ </div>
231
+ </div>
232
+ </div>
233
+ );
234
+ };
235
+
214
236
  const OverviewSection = () => (
215
237
  <div className={`${wrapperMaxWidth} mx-auto mt-6`}>
216
238
  <Reveal headless={isHeadless} offsetY={8} durationMs={500}>
@@ -387,7 +409,7 @@ const SharedBadgeDisplay = ({ badgeData, chatProps, headless, selfCheck = false,
387
409
  </div>
388
410
  )}
389
411
  <div>
390
- <Reveal headless={isHeadless} as={'h4'} offsetY={8} className={'text-2xl font-semibold mb-3'} style={{ color: 'var(--text-main)' }}>Score Improvement Recommendationsw</Reveal>
412
+ <Reveal headless={isHeadless} as={'h4'} offsetY={8} className={'text-2xl font-semibold mb-3'} style={{ color: 'var(--text-main)' }}>Score Improvement Recommendations</Reveal>
391
413
  <Reveal headless={isHeadless}>
392
414
  <div className={'space-y-3'}>
393
415
  {rec?.summary ? (
@@ -631,6 +653,7 @@ const SharedBadgeDisplay = ({ badgeData, chatProps, headless, selfCheck = false,
631
653
  }`}
632
654
  </style>
633
655
  {/* Long-form original layout retained for headless/print */}
656
+ <AuthenticityNotice />
634
657
  {OverviewSection()}
635
658
  <RoleFitSection />
636
659
  {TechnicalSection()}
@@ -643,6 +666,7 @@ const SharedBadgeDisplay = ({ badgeData, chatProps, headless, selfCheck = false,
643
666
  <>
644
667
  <TabNav />
645
668
  <div className={'px-2 sm:px-0 pb-2'}>
669
+ {activeTab === 'overview' && <AuthenticityNotice />}
646
670
  {activeTab === 'overview' && OverviewSection()}
647
671
  {activeTab === 'technical' && TechnicalSection()}
648
672
  {activeTab === 'risk' && RiskSection()}
@@ -653,7 +677,10 @@ const SharedBadgeDisplay = ({ badgeData, chatProps, headless, selfCheck = false,
653
677
  </div>
654
678
  </>
655
679
  ) : (
656
- OverviewSection()
680
+ <>
681
+ <AuthenticityNotice />
682
+ {OverviewSection()}
683
+ </>
657
684
  )
658
685
  )}
659
686
  {!headless && !suppressChat && (
@@ -304,6 +304,7 @@ const AppendixTables: React.FC<AppendixTableProps> = ({ type, sources, searchedA
304
304
  <th
305
305
  key={header}
306
306
  scope="col"
307
+ title={header === 'Observation' ? 'Observation attribute details are part of the KYD proprietary framework and are available on a case-by-case basis.' : undefined}
307
308
  onClick={() => onHeaderClick(header)}
308
309
  className={'px-4 py-3 text-left text-xs font-semibold uppercase tracking-wider'}
309
310
  style={{ color: 'var(--text-secondary)', cursor: isSortable ? 'pointer' : 'default', userSelect: isSortable ? 'none' : 'auto' }}
@@ -374,7 +375,13 @@ const AppendixTables: React.FC<AppendixTableProps> = ({ type, sources, searchedA
374
375
  </td>
375
376
  <td className={'px-4 py-4 whitespace-normal text-sm'} style={{ color: 'var(--text-secondary)' }}>{br.pillar || '—'}</td>
376
377
  <td className={'px-4 py-4 whitespace-normal text-sm'} style={{ color: 'var(--text-secondary)' }}>{br.category || '—'}</td>
377
- <td className={'px-4 py-4 whitespace-normal text-sm font-medium'} style={{ color: 'var(--text-main)' }}>{br.label || '—'}</td>
378
+ <td
379
+ className={'px-4 py-4 whitespace-normal text-sm font-medium'}
380
+ style={{ color: 'var(--text-main)' }}
381
+ title={'Observation attribute details are part of the KYD proprietary framework and are available on a case-by-case basis.'}
382
+ >
383
+ -
384
+ </td>
378
385
  <td className={'px-4 py-4 whitespace-normal text-sm'} style={{ color: 'var(--text-secondary)' }}>{(() => {
379
386
  const weight = Number(br.weight);
380
387
  if (!Number.isFinite(weight)) return 'Neutral';
@@ -4,7 +4,7 @@ import Image from 'next/image';
4
4
  import { formatLocalDate } from '../utils/date';
5
5
  import countriesLib from 'i18n-iso-countries';
6
6
  import enLocale from 'i18n-iso-countries/langs/en.json';
7
- import { FiInfo, FiAlertTriangle } from 'react-icons/fi';
7
+ import { FiInfo } from 'react-icons/fi';
8
8
  import { ProviderIcon } from '../utils/provider';
9
9
  import { green1, green2, green3, green4, green5 } from '../colors';
10
10
 
@@ -80,25 +80,7 @@ const ReportHeader = ({ badgeId, developerName, updatedAt, score = 0, badgeImage
80
80
  className={'p-6 rounded-md border h-full'}
81
81
  style={{ backgroundColor: 'var(--content-card-background)', borderColor: 'var(--icon-button-secondary)', backgroundImage: `linear-gradient(${tint}, ${tint})` }}
82
82
  >
83
- {(() => {
84
- const label = (accountAuthenticity?.label || '').toLowerCase();
85
- if (!label) return null;
86
- const isCritical = label === 'likely inauthentic';
87
- const isSuspicious = label === 'suspicious';
88
- if (!isCritical && !isSuspicious) return null;
89
- return (
90
- <div className={'mb-4 rounded-md border p-3 flex items-start gap-2'} style={{ backgroundColor: 'var(--content-card-background)', borderColor: 'var(--icon-button-secondary)' }}>
91
- <span className={'mt-0.5'} style={{ color: isCritical ? '#B00020' : '#9f580a' }}><FiAlertTriangle size={18} /></span>
92
- <div className={'text-sm'}>
93
- <div className={'font-semibold'} style={{ color: 'var(--text-main)' }}>{isCritical ? 'Warning' : 'Attention'}</div>
94
- <div className={'mt-1'} style={{ color: 'var(--text-secondary)' }}>{accountAuthenticity?.description || (isCritical ? 'We detected signals that some linked accounts may be inauthentic. Review sources below.' : 'Some inconsistencies were observed across linked accounts. Review sources below.')}</div>
95
- <div className={'mt-2'}>
96
- <a href="#appendix-connected" className={'text-xs font-medium underline underline-offset-2'} style={{ color: 'var(--text-secondary)' }}>See more</a>
97
- </div>
98
- </div>
99
- </div>
100
- );
101
- })()}
83
+ {/* Authenticity notice moved to top-level display */}
102
84
  <div className={`flex gap-3 ${rightBadgeLayout ? 'flex-row items-center justify-between' : 'flex-col h-full'}`}>
103
85
  {/* Info section: Title, Candidate, Details and Summary */}
104
86
  <div className={`w-full ${rightBadgeLayout ? 'md:flex-1' : ''}`}>
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
 
3
3
  import { FaGithub, FaGitlab, FaStackOverflow, FaLinkedin, FaGoogle, FaKaggle } from 'react-icons/fa';
4
- import { SiCoursera, SiCredly, SiFiverr, SiToptal, SiUdemy } from 'react-icons/si';
4
+ import { SiCoursera, SiCredly, SiFiverr, SiUdemy, SiAmazon } from 'react-icons/si';
5
5
 
6
6
  export const ProviderIcon = ({ name, className }: { name?: string; className?: string }) => {
7
7
  const n = (name || '').toLowerCase();
@@ -13,9 +13,9 @@ export const ProviderIcon = ({ name, className }: { name?: string; className?: s
13
13
  if (n.includes('kaggle')) return <FaKaggle className={className} />;
14
14
  if (n.includes('google')) return <FaGoogle className={className} />;
15
15
  if (n.includes('linkedin')) return <FaLinkedin className={className} />;
16
- if (n.includes('toptal')) return <SiToptal className={className} />;
17
16
  if (n.includes('coursera')) return <SiCoursera className={className} />;
18
17
  if (n.includes('udemy')) return <SiUdemy className={className} />;
18
+ if (n.includes('amazon')) return <SiAmazon className={className} />;
19
19
  return <span className={className || 'inline-block w-3 h-3 rounded-full'} style={{ backgroundColor: 'var(--icon-button-secondary)' }} />;
20
20
  };
21
21
 
@@ -29,9 +29,9 @@ export const getProviderDisplayName = (name?: string): string => {
29
29
  if (n.includes('kaggle')) return 'Kaggle';
30
30
  if (n.includes('google')) return 'Google Scholar';
31
31
  if (n.includes('linkedin')) return 'LinkedIn';
32
- if (n.includes('toptal')) return 'TopTal';
33
32
  if (n.includes('coursera')) return 'Coursera';
34
33
  if (n.includes('udemy')) return 'Udemy';
34
+ if (n.includes('amazon')) return 'Amazon Author';
35
35
  return name || 'Provider';
36
36
  };
37
37
 
@@ -45,9 +45,9 @@ export const getProviderTooltipCopy = (provider?: string): string => {
45
45
  if (n.includes('kaggle')) return 'Competition results, notebooks, and dataset contributions that reflect analytical skill.';
46
46
  if (n.includes('google')) return 'Publications, citations, and scholarly presence indicating research impact.';
47
47
  if (n.includes('linkedin')) return 'Professional history, endorsements, and network signals indicating credibility.';
48
- if (n.includes('toptal')) return 'Professional history, endorsements, and network signals indicating credibility.';
49
48
  if (n.includes('coursera')) return 'Professional history, training, and course completion signals indicating credibility.';
50
49
  if (n.includes('udemy')) return 'Professional history, training, and course completion signals indicating credibility.';
50
+ if (n.includes('amazon')) return 'Published works and author profile signals from Amazon Stores indicating credibility.';
51
51
  return 'Signals contributed from this provider relevant to capability and trust.';
52
52
  };
53
53