intelliwaketssveltekitv25 1.0.89 → 1.0.91

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.
@@ -55,11 +55,7 @@
55
55
  const controlElementRect = controlElement.getBoundingClientRect()
56
56
  const activeElementRect = activeElement.getBoundingClientRect()
57
57
  indicatorStyles = `left: ${activeElementRect.left - controlElementRect.left - 4}px; width: ${activeElementRect.width + 8}px; top: ${activeElementRect.top - controlElementRect.top - 3}px; height: ${activeElementRect.height + 4}px;`
58
- } else {
59
- console.log('No active element found', currentKey, tabItems)
60
58
  }
61
- } else {
62
- console.log('No control element found', currentKey, tabItems)
63
59
  }
64
60
  }
65
61
 
@@ -67,11 +63,9 @@
67
63
  clientWidth
68
64
  tabItems
69
65
 
70
- if (currentKey && isVisible) {
66
+ if (currentKey && (isVisible || clientWidth > 0)) {
71
67
  setIndicatorStyle().then(() => {
72
68
  })
73
- } else {
74
- console.log('No currentKey or not visible', currentKey, isVisible)
75
69
  }
76
70
  })
77
71
 
@@ -82,7 +76,10 @@
82
76
  isVisible = entry.isIntersecting
83
77
  })
84
78
  },
85
- { threshold: 0 }
79
+ {
80
+ threshold: [0, 0.1],
81
+ rootMargin: '50px'
82
+ }
86
83
  )
87
84
 
88
85
  if (controlElement) {
@@ -9,7 +9,6 @@
9
9
  import Icon from './Icon.svelte'
10
10
  import { cubicInOut } from 'svelte/easing'
11
11
  import { fly } from 'svelte/transition'
12
- import path from 'node:path'
13
12
 
14
13
  let {
15
14
  tabHrefs,
@@ -58,7 +57,10 @@
58
57
  isVisible = entry.isIntersecting
59
58
  })
60
59
  },
61
- { threshold: 0 }
60
+ {
61
+ threshold: [0, 0.1],
62
+ rootMargin: '50px'
63
+ }
62
64
  )
63
65
 
64
66
  if (controlElement) {
@@ -223,7 +225,7 @@
223
225
  clientWidth
224
226
  tabHrefs
225
227
 
226
- if (pathAnalyzer?.activePageSlug && isVisible) {
228
+ if (pathAnalyzer?.activePageSlug && (isVisible || clientWidth > 0)) {
227
229
  setIndicatorStyle().then(() => {
228
230
  })
229
231
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intelliwaketssveltekitv25",
3
- "version": "1.0.89",
3
+ "version": "1.0.91",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "exports": {