@mundogamernetwork/shared-ui 1.1.39 → 1.1.41

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@mundogamernetwork/shared-ui",
3
- "version": "1.1.39",
3
+ "version": "1.1.41",
4
4
  "description": "Mundo Gamer Network - Shared UI Layer (Nuxt 3)",
5
5
  "type": "module",
6
6
  "main": "./nuxt.config.ts",
@@ -1,6 +1,9 @@
1
1
  <script setup lang="ts">
2
2
  import { ref } from "vue";
3
3
  import { useRoute, useRouter } from "vue-router";
4
+ // Explicit import: relying on Nuxt auto-import for this layer-shipped store
5
+ // fails in some fronts' SSR builds ("useMagazineStore is not defined" -> 500).
6
+ import { useMagazineStore } from "../../../stores/magazine";
4
7
 
5
8
  useSeoMeta({
6
9
  title: "MGN Magazine",
@@ -3,6 +3,10 @@ import { useRoute, useRouter } from "vue-router";
3
3
  import type { PageData } from "@mundogamernetwork/mgn-flipbook";
4
4
  import type { MagazinePage } from "../../../types/magazine";
5
5
  import { getMagazinePageHotspots } from "../../../utils/magazineHotspots";
6
+ // Explicit import: the magazine store ships in this layer package; relying on
7
+ // Nuxt auto-import for it fails in some consuming fronts' SSR builds (the new
8
+ // store isn't always registered), throwing "useMagazineStore is not defined".
9
+ import { useMagazineStore } from "../../../stores/magazine";
6
10
 
7
11
  useSeoMeta({
8
12
  title: "MGN Magazine",
@@ -393,9 +397,9 @@ const accountsRegisterUrl = computed(() => {
393
397
  <section v-else>
394
398
  <ClientOnly>
395
399
  <MgnFlipbook
396
- v-if="flipbookPages.length > 0 || magazine.data.pdf_url_src"
400
+ v-if="flipbookPages.length > 0 || ((magazinePages.status === 'success' || magazinePages.status === 'error') && magazine.data.pdf_url_src)"
397
401
  :pages="flipbookPages.length > 0 ? flipbookPages : undefined"
398
- :pdf-url="magazine.data.pdf_url_src"
402
+ :pdf-url="flipbookPages.length > 0 ? undefined : magazine.data.pdf_url_src"
399
403
  :start-page="startPage"
400
404
  :enable-sound="true"
401
405
  :enable-zoom="true"
@@ -412,7 +416,7 @@ const accountsRegisterUrl = computed(() => {
412
416
  </template>
413
417
  </ClientOnly>
414
418
  <div
415
- v-if="!flipbookPages.length && !magazine.data.pdf_url_src && (magazinePages.status === 'pending' || magazinePages.status === 'init')"
419
+ v-if="!flipbookPages.length && (magazinePages.status === 'pending' || magazinePages.status === 'init')"
416
420
  >
417
421
  <MagazineFlipBookSkelectonLoading />
418
422
  </div>