@bagelink/vue 1.4.122 → 1.4.124

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,7 +1,7 @@
1
1
  {
2
2
  "name": "@bagelink/vue",
3
3
  "type": "module",
4
- "version": "1.4.122",
4
+ "version": "1.4.124",
5
5
  "description": "Bagel core sdk packages",
6
6
  "author": {
7
7
  "name": "Neveh Allon",
@@ -179,7 +179,7 @@ function logout() {
179
179
  }
180
180
 
181
181
  .app-sidebar {
182
- transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
182
+ transition: width 0.4s ease;
183
183
  --input-font-size: 0.875rem;
184
184
  /* 14px */
185
185
  }
@@ -227,7 +227,7 @@ function logout() {
227
227
  /* אנימציות נכנסות ויוצאות */
228
228
  @media (min-width: 911px) {
229
229
  .app-sidebar {
230
- transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
230
+ transition: width 0.4s ease;
231
231
  }
232
232
 
233
233
  /* כשהמניו סגור - הטקסט נעלם תחילה */
@@ -257,7 +257,7 @@ function logout() {
257
257
  @media (max-width: 910px) {
258
258
  .app-sidebar {
259
259
  transform: translateX(-100%);
260
- transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
260
+ transition: transform 0.4s ease;
261
261
  }
262
262
 
263
263
  .sidebar-mobile-open {
@@ -7,12 +7,38 @@ export function useDevice() {
7
7
  const scrollX = ref(window.scrollX)
8
8
  const innerHeight = ref(window.innerHeight)
9
9
 
10
+ // Scroll direction tracking
11
+ const scrollDirY = ref<'up' | 'down' | null>(null)
12
+ const scrollDirX = ref<'left' | 'right' | null>(null)
13
+ const prevScrollY = ref(window.scrollY)
14
+ const prevScrollX = ref(window.scrollX)
15
+
10
16
  function updateDeviceInfo() {
17
+ // Store previous scroll positions
18
+ prevScrollY.value = scrollY.value
19
+ prevScrollX.value = scrollX.value
20
+
21
+ // Update current values
11
22
  innerWidth.value = window.innerWidth
12
23
  isMobile.value = window.innerWidth < 768
13
24
  scrollY.value = window.scrollY
14
25
  scrollX.value = window.scrollX
15
26
  innerHeight.value = window.innerHeight
27
+
28
+ // Determine scroll directions with threshold
29
+ const scrollThreshold = 10
30
+
31
+ if (scrollY.value > prevScrollY.value + scrollThreshold) {
32
+ scrollDirY.value = 'down'
33
+ } else if (scrollY.value < prevScrollY.value - scrollThreshold) {
34
+ scrollDirY.value = 'up'
35
+ }
36
+
37
+ if (scrollX.value > prevScrollX.value + scrollThreshold) {
38
+ scrollDirX.value = 'right'
39
+ } else if (scrollX.value < prevScrollX.value - scrollThreshold) {
40
+ scrollDirX.value = 'left'
41
+ }
16
42
  }
17
43
 
18
44
  onMounted(() => {
@@ -32,5 +58,7 @@ export function useDevice() {
32
58
  scrollY,
33
59
  scrollX,
34
60
  innerHeight,
61
+ dirY: scrollDirY,
62
+ dirX: scrollDirX,
35
63
  }
36
64
  }