(script: string)
| 43 | let gsapLocatedCacheVal: Array<{ id: string; selector: string }> = []; |
| 44 | |
| 45 | function parseLocatedCached(script: string): Array<{ id: string; selector: string }> { |
| 46 | if (gsapLocatedCacheKey === script) return gsapLocatedCacheVal; |
| 47 | const parsed = parseGsapScriptAcornForWrite(script); |
| 48 | gsapLocatedCacheVal = parsed |
| 49 | ? parsed.located.map(({ id, animation }) => ({ id, selector: animation.targetSelector })) |
| 50 | : []; |
| 51 | gsapLocatedCacheKey = script; |
| 52 | return gsapLocatedCacheVal; |
| 53 | } |
| 54 | |
| 55 | /** |
| 56 | * Map each element's data-hf-id → the GSAP tween ids targeting it. Tween ids |
no test coverage detected