feat: add core domain types for Photo Gallery SDK including media items, albums, and annotations

This commit is contained in:
2026-07-23 07:39:01 +05:30
parent 7bcd1a2a2d
commit 2613c767a6
107 changed files with 20699 additions and 7 deletions
+24
View File
@@ -0,0 +1,24 @@
'use client';
import { useEffect, useState } from 'react';
/** SSR-safe media-query hook. */
export function useMediaQuery(query: string): boolean {
const [matches, setMatches] = useState(false);
useEffect(() => {
if (typeof window === 'undefined' || !window.matchMedia) return;
const mq = window.matchMedia(query);
const update = () => setMatches(mq.matches);
update();
mq.addEventListener('change', update);
return () => mq.removeEventListener('change', update);
}, [query]);
return matches;
}
/** True on phone-sized viewports (the sidebar becomes an overlay drawer). */
export function useIsMobile(): boolean {
return useMediaQuery('(max-width: 760px)');
}