@playpilot/tpi 6.4.4 → 6.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@playpilot/tpi",
3
- "version": "6.4.4",
3
+ "version": "6.5.0",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite dev",
@@ -234,6 +234,7 @@
234
234
 
235
235
  {#key linkInjections}
236
236
  <UserJourney />
237
+ <PostersScrollReveal />
237
238
  {/key}
238
239
 
239
240
  <Consent onchange={afterConsent} />
@@ -1,6 +1,6 @@
1
1
  <script lang="ts">
2
2
  import { mobileBreakpoint } from '$lib/constants'
3
- import { onMount } from 'svelte'
3
+ import { onDestroy } from 'svelte'
4
4
 
5
5
  const linksWithPosters = Array.from(document.querySelectorAll<HTMLElement>('[data-playpilot-poster-url]'))
6
6
  const linksWithCurrentlyVisiblePosters = new Set<HTMLElement>()
@@ -13,11 +13,7 @@
13
13
 
14
14
  const isMobile = $derived(windowWidth < mobileBreakpoint)
15
15
 
16
- onMount(() => {
17
- if (!isMobile) return
18
-
19
- return destroyAllPosters
20
- })
16
+ onDestroy(destroyAllPosters)
21
17
 
22
18
  function onscroll(): void {
23
19
  if (!isMobile) return