@fy-/fws-vue 2.3.12 → 2.3.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.
@@ -97,13 +97,17 @@ function updateImageSizes() {
97
97
  if (imageContainers && imageContainers.length > 0) {
98
98
  imageContainers.forEach((img) => {
99
99
  // Force a reflow to ensure correct sizing
100
- if (img.style.maxHeight) {
101
- const currentMaxHeight = img.style.maxHeight
102
- img.style.maxHeight = ''
103
- // Force browser to recalculate styles
104
- void img.offsetHeight
105
- img.style.maxHeight = currentMaxHeight
106
- }
100
+ img.style.maxHeight = ''
101
+ // Force browser to recalculate styles
102
+ void img.offsetHeight
103
+
104
+ // Calculate the correct height based on fullscreen and info panel state
105
+ const topHeight = 4 // rem
106
+ const infoHeight = infoPanel.value ? Number.parseFloat(getComputedStyle(document.documentElement).getPropertyValue('--info-height') || '0px') / 16 : 0
107
+ const viewHeight = isFullscreen.value ? 90 : 80
108
+
109
+ // Set explicit height with important to override any other styles
110
+ img.style.maxHeight = `calc(${viewHeight}vh - ${infoHeight}rem - ${topHeight}rem) !important`
107
111
  })
108
112
  }
109
113
  })
@@ -388,6 +392,14 @@ function updateInfoHeight() {
388
392
  })
389
393
  }
390
394
 
395
+ // Debounced window resize handler to avoid performance issues
396
+ const handleWindowResize = useDebounceFn(() => {
397
+ if (isGalleryOpen.value) {
398
+ updateImageSizes()
399
+ updateInfoHeight()
400
+ }
401
+ }, 100)
402
+
391
403
  onMounted(() => {
392
404
  eventBus.on(`${props.id}GalleryImage`, openGalleryImage)
393
405
  eventBus.on(`${props.id}Gallery`, openGalleryImage)
@@ -411,6 +423,9 @@ onMounted(() => {
411
423
  })
412
424
  }
413
425
 
426
+ // Listen for window resize events
427
+ useEventListener(window, 'resize', handleWindowResize)
428
+
414
429
  // Listen for fullscreen changes to update image sizes
415
430
  useEventListener(document, 'fullscreenchange', () => {
416
431
  if (document.fullscreenElement) {
@@ -507,6 +522,7 @@ onUnmounted(() => {
507
522
  <!-- Main Image Container -->
508
523
  <div
509
524
  class="flex-1 flex flex-col z-[2] items-center justify-center max-w-full lg:max-w-[calc(100vw - 256px)] relative"
525
+ style="padding-top: 1rem;"
510
526
  >
511
527
  <transition
512
528
  :name="direction === 'next' ? 'slide-next' : 'slide-prev'"
@@ -623,7 +639,8 @@ onUnmounted(() => {
623
639
  >
624
640
  <div
625
641
  v-if="sidePanel"
626
- class="hidden lg:block flex-shrink-0 w-64 bg-fv-neutral-800/90 backdrop-blur-md h-full max-h-full overflow-y-auto pt-16"
642
+ class="hidden lg:block flex-shrink-0 w-64 bg-fv-neutral-800/90 backdrop-blur-md h-full max-h-full overflow-y-auto"
643
+ style="padding-top: 4rem;"
627
644
  >
628
645
  <!-- Paging Controls -->
629
646
  <div v-if="paging" class="flex items-center justify-center pt-2">
@@ -690,7 +707,7 @@ onUnmounted(() => {
690
707
  >
691
708
  <div
692
709
  v-if="showControls"
693
- class="absolute top-0 left-0 right-0 px-4 py-3 flex justify-between items-center bg-gradient-to-b from-fv-neutral-900/90 to-transparent backdrop-blur-sm z-[50] transition-opacity h-16"
710
+ class="fixed top-0 left-0 right-0 px-4 py-3 flex justify-between items-center bg-gradient-to-b from-fv-neutral-900/90 to-transparent backdrop-blur-sm z-[50] transition-opacity h-16"
694
711
  >
695
712
  <!-- Title and Counter -->
696
713
  <div class="flex items-center space-x-2">
@@ -881,6 +898,15 @@ onUnmounted(() => {
881
898
  </template>
882
899
 
883
900
  <style scoped>
901
+ /* Fix for top controls to ensure they're always visible */
902
+ .fixed.top-0 {
903
+ position: fixed !important;
904
+ top: 0 !important;
905
+ left: 0 !important;
906
+ right: 0 !important;
907
+ z-index: 51 !important;
908
+ }
909
+
884
910
  /* Transition styles for next (right) navigation */
885
911
  .slide-next-enter-active,
886
912
  .slide-next-leave-active {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fy-/fws-vue",
3
- "version": "2.3.12",
3
+ "version": "2.3.13",
4
4
  "author": "Florian 'Fy' Gasquez <m@fy.to>",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/fy-to/FWJS#readme",