Initial public release

This commit is contained in:
Bohdan Triapitsyn
2025-12-07 19:32:53 +02:00
commit 4b2edf7318
319 changed files with 81600 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
import { SEMANTIC_TYPOGRAPHY } from '@/lib/typography';
let started = false;
const applySemanticTypography = (): void => {
if (typeof document === 'undefined') {
return;
}
const root = document.documentElement;
Object.entries(SEMANTIC_TYPOGRAPHY).forEach(([key, value]) => {
const cssVarName = `--text-${key.replace(/([A-Z])/g, '-$1').toLowerCase()}`;
root.style.setProperty(cssVarName, value);
});
};
export const startTypographyWatcher = (): void => {
if (started || typeof window === 'undefined') {
return;
}
started = true;
applySemanticTypography();
};