kyd-shared-badge 0.3.26 → 0.3.28

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.26",
3
+ "version": "0.3.28",
4
4
  "private": false,
5
5
  "main": "./src/index.ts",
6
6
  "module": "./src/index.ts",
@@ -51,6 +51,13 @@ export default function ChatWidget({ api = '/api/chat', title = 'KYD Bot', hintT
51
51
  } catch {}
52
52
  // eslint-disable-next-line react-hooks/exhaustive-deps
53
53
  }, [hasMounted, isMobile]);
54
+
55
+ useEffect(() => {
56
+ // when sidebar is closed, dismiss hint
57
+ if (open) return;
58
+ setShowHint(false);
59
+ }, [open]);
60
+
54
61
  // Sidebar width with bounds and persistence
55
62
  const [width, setWidth] = useState<number>(() => {
56
63
  try { const w = Number(localStorage.getItem('kydChatSidebarWidth')); return Number.isFinite(w) && w >= 320 ? Math.min(w, Math.floor(window.innerWidth * 0.9)) : 420; } catch { return 420; }
package/src/index.ts CHANGED
@@ -2,5 +2,6 @@ export * from './types';
2
2
  export { default as SharedBadgeDisplay } from './SharedBadgeDisplay';
3
3
  export { default as ChatWindowStreaming } from './chat/ChatWindowStreaming';
4
4
  export { default as ChatWidget } from './chat/ChatWidget';
5
+ export * from './utils/date';
5
6
 
6
7