fix: apply review findings; make ops strip text CSS-generated

This commit is contained in:
2026-10-10 14:28:16 +03:00
parent 8f95fda49e
commit 7280133fed
4 changed files with 41 additions and 15 deletions

View File

@@ -1,4 +1,4 @@
import { onMounted, onUnmounted, type Ref } from 'vue';
import { onMounted, onUnmounted, watch, type Ref } from 'vue';
const SURFACES = '.project-case-study, .project-card, .contact-destination, .infrastructure-flow-figure';
@@ -37,6 +37,12 @@ export function useHeadlight(enabled: Ref<boolean>): void {
if (frame === 0) frame = requestAnimationFrame(flush);
};
watch(enabled, (value) => {
if (value) return;
active = false;
delete document.documentElement.dataset.headlight;
});
onMounted(() => {
if (!window.matchMedia('(pointer: fine)').matches) return;
window.addEventListener('pointermove', onMove, { passive: true });