srcdev-nuxt-components 9.1.13 → 9.1.14

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.
@@ -339,7 +339,9 @@ const { navRef, navListRef, isCollapsed, isLoaded, isMenuOpen, activeHref, isAct
339
339
  initNavDecorators();
340
340
  if (!hasFirstLayout) {
341
341
  hasFirstLayout = true;
342
- nextTick(() => {
342
+ // RAF here (not nextTick) ensures the browser paints the snapped position
343
+ // before transitions are enabled — avoids animating from x=0 on first layout.
344
+ requestAnimationFrame(() => {
343
345
  isAnimated.value = true;
344
346
  });
345
347
  }
@@ -350,9 +352,12 @@ const { navRef, navListRef, isCollapsed, isLoaded, isMenuOpen, activeHref, isAct
350
352
  },
351
353
  onRouteChange: () => {
352
354
  isAnimated.value = false;
355
+ // Double RAF: RAF1 sets the new position and lets the browser paint it
356
+ // without transitions. RAF2 re-enables transitions only after that frame
357
+ // has committed — so there is no position delta left to animate.
353
358
  requestAnimationFrame(() => {
354
359
  initNavDecorators();
355
- nextTick(() => {
360
+ requestAnimationFrame(() => {
356
361
  isAnimated.value = true;
357
362
  });
358
363
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "srcdev-nuxt-components",
3
3
  "type": "module",
4
- "version": "9.1.13",
4
+ "version": "9.1.14",
5
5
  "main": "nuxt.config.ts",
6
6
  "types": "types.d.ts",
7
7
  "license": "MIT",