srcdev-nuxt-components 9.1.12 → 9.1.13
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.
|
@@ -116,6 +116,9 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
116
116
|
// ─── Animation gate — prevents indicator from transitioning on first paint ───
|
|
117
117
|
|
|
118
118
|
const isAnimated = ref(false);
|
|
119
|
+
// Stays false until ResizeObserver confirms the nav has been laid out (stronger
|
|
120
|
+
// guarantee than nextTick / RAF which don't ensure layout is complete).
|
|
121
|
+
let hasFirstLayout = false;
|
|
119
122
|
|
|
120
123
|
// ─── Nav decorators (active / hover indicators) ─────────────────────────────
|
|
121
124
|
|
|
@@ -334,6 +337,12 @@ const { navRef, navListRef, isCollapsed, isLoaded, isMenuOpen, activeHref, isAct
|
|
|
334
337
|
onResize: async () => {
|
|
335
338
|
await nextTick(); // wait for Vue to re-render after any isCollapsed change
|
|
336
339
|
initNavDecorators();
|
|
340
|
+
if (!hasFirstLayout) {
|
|
341
|
+
hasFirstLayout = true;
|
|
342
|
+
nextTick(() => {
|
|
343
|
+
isAnimated.value = true;
|
|
344
|
+
});
|
|
345
|
+
}
|
|
337
346
|
if (isMenuOpen.value) {
|
|
338
347
|
setFinalPanelActivePositions(true);
|
|
339
348
|
setFinalPanelHoveredPositions(true);
|
|
@@ -350,9 +359,8 @@ const { navRef, navListRef, isCollapsed, isLoaded, isMenuOpen, activeHref, isAct
|
|
|
350
359
|
},
|
|
351
360
|
onMounted: () => {
|
|
352
361
|
initNavDecorators();
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
});
|
|
362
|
+
// isAnimated is set in onResize — ResizeObserver guarantees layout is
|
|
363
|
+
// complete before we enable transitions, unlike nextTick / RAF.
|
|
356
364
|
},
|
|
357
365
|
});
|
|
358
366
|
|