()
| 3 | import type { MatchesNode } from '../types'; |
| 4 | |
| 5 | export function useMatchesNode(): MatchesNode { |
| 6 | const showMatches = useUIStore((s) => s.showMatches); |
| 7 | const matchesDisplayMode = useUIStore((s) => s.matchesDisplayMode); |
| 8 | const matchesOpacity = useUIStore((s) => s.matchesOpacity); |
| 9 | const matchesColor = useUIStore((s) => s.matchesColor); |
| 10 | const matchesLineWidth = useUIStore((s) => s.matchesLineWidth); |
| 11 | |
| 12 | return useMemo<MatchesNode>( |
| 13 | () => ({ |
| 14 | nodeType: 'matches', |
| 15 | visible: showMatches, |
| 16 | displayMode: matchesDisplayMode, |
| 17 | opacity: matchesOpacity, |
| 18 | color: matchesColor, |
| 19 | lineWidth: matchesLineWidth, |
| 20 | }), |
| 21 | [showMatches, matchesDisplayMode, matchesOpacity, matchesColor, matchesLineWidth] |
| 22 | ); |
| 23 | } |
no outgoing calls
no test coverage detected