refactor: extract hexToRgba and prefersReducedMotion to shared utils

Move hexToRgba() (3 identical copies) and prefersReducedMotion (5 module-level
copies) to src/lib/utils.ts. Re-export prefersReducedMotion from
constellation/constants.ts to preserve existing importers. Add clarifying
comments to constellation.ts and tags.ts re-export layers (Phase 1.4).
This commit is contained in:
2026-02-17 01:48:43 +00:00
parent 45b87466be
commit 296b18f025
9 changed files with 19 additions and 32 deletions
+1 -1
View File
@@ -86,5 +86,5 @@ export const HIDDEN_ENTITY_IDS = new Set([
])
// Media queries (evaluated once at module level)
export const prefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches
export { prefersReducedMotion } from '@/lib/utils'
export const supportsCoarsePointer = window.matchMedia('(pointer: coarse)').matches