From cb634079c501d0783128ea5b3c021f787c573977 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A1=B0=EC=84=B1=EC=9B=90?= Date: Mon, 9 Feb 2026 06:37:13 +0900 Subject: [PATCH 1/2] fix(badge): fix badge animation effect not working on safari --- packages/badge/src/index.ts | 52 +++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 25 deletions(-) diff --git a/packages/badge/src/index.ts b/packages/badge/src/index.ts index 03682e4..13a9836 100644 --- a/packages/badge/src/index.ts +++ b/packages/badge/src/index.ts @@ -66,15 +66,12 @@ const generateTrailingLight = ( return ` - - - ${gradient} - + ${blobs} ` @@ -87,13 +84,15 @@ const generateShineEffect = ( ox: number, oy: number, ): string => { + const shineWidth = Math.round(width * 0.7) + const skewOffset = Math.round(height * 0.36) + return ` - + @@ -101,27 +100,30 @@ const generateShineEffect = ( - - + + + + + + + ` } From 72c21a84b974ffca2569e1c14537de8aa8439c63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A1=B0=EC=84=B1=EC=9B=90?= Date: Mon, 9 Feb 2026 06:43:42 +0900 Subject: [PATCH 2/2] refactor(badge): remove glow filter and adjust badge animation parameters Eliminate the glow filter from the badge SVG generation and modify the blob count and gap for improved animation effects. --- packages/badge/src/index.ts | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/packages/badge/src/index.ts b/packages/badge/src/index.ts index 13a9836..6fbd9f5 100644 --- a/packages/badge/src/index.ts +++ b/packages/badge/src/index.ts @@ -18,22 +18,6 @@ const generateFontStyle = (): string => ` ` -const generateGlowFilter = ( - floodColor: string, - floodOpacity: number, - stdDeviation: number, -): string => ` - - - - - - - - - - ` - const generateTrailingLight = ( width: number, height: number, @@ -45,10 +29,10 @@ const generateTrailingLight = ( const r = BADGE_CONFIG.borderRadius const perimeter = 2 * (width - 2 * r) + 2 * (height - 2 * r) + 2 * Math.PI * r - const blobCount = 3 + const blobCount = 5 const blobRadius = Math.min(height, Math.max(16, Math.round(perimeter / 12))) const dur = Math.max(3, perimeter / 60) - const gap = 0.3 + const gap = 0.12 const path = `M${ox + r},${oy} H${ox + width - r} Q${ox + width},${oy} ${ox + width},${oy + r} V${oy + height - r} Q${ox + width},${oy + height} ${ox + width - r},${oy + height} H${ox + r} Q${ox},${oy + height} ${ox},${oy + height - r} V${oy + r} Q${ox},${oy} ${ox + r},${oy} Z` @@ -142,9 +126,7 @@ const generateIcon = ( height="${size}" viewBox="0 0 24 24" fill="${color}" - filter="url(#glow)" xmlns="http://www.w3.org/2000/svg" - style="overflow: visible" > @@ -238,7 +220,6 @@ export const generateBadgeSvg = ( - ${generateGlowFilter('#808080', 0.4, 3)}