kyd-shared-badge 0.3.44 → 0.3.45

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.44",
3
+ "version": "0.3.45",
4
4
  "private": false,
5
5
  "main": "./src/index.ts",
6
6
  "module": "./src/index.ts",
@@ -286,9 +286,7 @@ const SharedBadgeDisplay = ({ badgeData, chatProps, headless }: { badgeData: Pub
286
286
 
287
287
  {/* Connected Platforms */}
288
288
  <Reveal headless={isHeadless}>
289
- <div id="appendix-connected">
290
- <ConnectedPlatforms accounts={connected} authenticity={assessmentResult?.account_authenticity} />
291
- </div>
289
+ <ConnectedPlatforms accounts={connected} authenticity={assessmentResult?.account_authenticity} />
292
290
  </Reveal>
293
291
 
294
292
 
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
 
3
- import React from 'react';
3
+ import React, { useEffect } from 'react';
4
4
  import { formatLocalDate } from '../utils/date';
5
5
  import { FaGithub, FaGitlab, FaStackOverflow, FaLinkedin, FaGoogle, FaKaggle } from 'react-icons/fa';
6
6
  import { SiCredly, SiFiverr } from 'react-icons/si';
@@ -35,6 +35,26 @@ const formatProviderName = (name?: string) => {
35
35
 
36
36
  const ConnectedPlatforms = ({ accounts, authenticity }: { accounts?: ConnectedAccount[]; authenticity?: { label?: string; description?: string; oauth_connected?: string[]; mismatches?: Array<{ provider?: string; detail?: string }> } }) => {
37
37
  const list = Array.isArray(accounts) ? accounts : [];
38
+ useEffect(() => {
39
+ const flash = () => {
40
+ const hash = typeof window !== 'undefined' ? window.location.hash : '';
41
+ if (!hash) return;
42
+ const id = hash.startsWith('#') ? hash.slice(1) : hash;
43
+ const el = document.getElementById(id) as HTMLElement | null;
44
+ if (!el) return;
45
+ const originalBg = el.style.backgroundColor;
46
+ el.style.transition = 'background-color 300ms ease';
47
+ el.style.backgroundColor = 'rgba(2, 163, 137, 0.14)';
48
+ // Ensure visibility after tab switch
49
+ try { el.scrollIntoView({ behavior: 'smooth', block: 'start' }); } catch {}
50
+ setTimeout(() => {
51
+ el.style.backgroundColor = originalBg || '';
52
+ }, 1200);
53
+ };
54
+ flash();
55
+ window.addEventListener('hashchange', flash);
56
+ return () => window.removeEventListener('hashchange', flash);
57
+ }, []);
38
58
  if (list.length === 0) return null;
39
59
  return (
40
60
  <div className="pt-8">
@@ -72,7 +72,7 @@ const ReportHeader = ({ badgeId, developerName, updatedAt, score = 0, badgeImage
72
72
  <div className={'font-semibold'} style={{ color: 'var(--text-main)' }}>Account Authenticity {isCritical ? 'Warning' : 'Notice'}</div>
73
73
  <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>
74
74
  <div className={'mt-2'}>
75
- <a href={'#appendix-connected'} className={'text-xs font-medium underline underline-offset-2'} style={{ color: 'var(--text-secondary)' }}>See more</a>
75
+ <a href="#appendix-connected" className={'text-xs font-medium underline underline-offset-2'} style={{ color: 'var(--text-secondary)' }}>See more</a>
76
76
  </div>
77
77
  </div>
78
78
  </div>