@mundogamernetwork/shared-ui 1.1.34 → 1.1.36

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.
@@ -1,23 +1,10 @@
1
1
  <script setup lang="ts">
2
- // Optional props — allow the consuming layout to pass config directly
3
- // instead of relying on the store guessing the right runtimeConfig key.
4
- const props = withDefaults(defineProps<{
5
- apiBaseUrl?: string;
6
- platformId?: number | string;
7
- }>(), {
8
- apiBaseUrl: undefined,
9
- platformId: undefined,
10
- });
11
-
12
2
  const colorMode = useColorMode();
13
3
  const store = useAppInstallBannerStore();
14
4
  const locale = useNuxtApp().$i18n.locale;
15
5
 
16
6
  onMounted(async () => {
17
- await store.fetchBanner(
18
- props.apiBaseUrl,
19
- props.platformId !== undefined ? Number(props.platformId) : undefined,
20
- );
7
+ await store.fetchBanner();
21
8
  });
22
9
 
23
10
  const banner = computed(() => store.banner);
@@ -15,10 +15,10 @@ const isMobile = ref(false);
15
15
  const currentIndex = ref(0);
16
16
  let timer: ReturnType<typeof setInterval> | null = null;
17
17
 
18
- const { data: banners, pending } = await useAsyncData(
18
+ const { data: banners } = await useAsyncData(
19
19
  `mg-campaign-banners-${props.platform}-${props.page}-${locale.value}`,
20
20
  () => fetchCampaignBanners(props.platform, props.page, locale.value),
21
- { default: () => [], lazy: true },
21
+ { default: () => [], lazy: true, server: false },
22
22
  );
23
23
 
24
24
  const hasBanners = computed(() => (banners.value?.length ?? 0) > 0);
@@ -67,9 +67,7 @@ onUnmounted(() => {
67
67
  </script>
68
68
 
69
69
  <template>
70
- <div v-if="pending" class="mg-campaign-banner-skeleton mb-4" aria-hidden="true" />
71
-
72
- <div v-else-if="hasBanners" class="mg-campaign-banner-carousel mb-4">
70
+ <div v-if="hasBanners" class="mg-campaign-banner-carousel mb-4">
73
71
  <div
74
72
  class="mg-campaign-banner-slide"
75
73
  role="button"
@@ -98,18 +96,6 @@ onUnmounted(() => {
98
96
  </template>
99
97
 
100
98
  <style lang="scss" scoped>
101
- @keyframes mg-skeleton-loading {
102
- 0% { background-color: rgba(255, 255, 255, 0.06); }
103
- 100% { background-color: rgba(221, 221, 221, 0.18); }
104
- }
105
-
106
- .mg-campaign-banner-skeleton {
107
- width: 100%;
108
- aspect-ratio: 4 / 1;
109
- min-height: 120px;
110
- animation: mg-skeleton-loading 0.8s linear infinite alternate;
111
- }
112
-
113
99
  .mg-campaign-banner-carousel {
114
100
  position: relative;
115
101
  width: 100%;
@@ -132,13 +118,11 @@ onUnmounted(() => {
132
118
  .mg-campaign-banner-indicators {
133
119
  position: absolute;
134
120
  bottom: 8px;
135
- left: 0;
136
- right: 0;
121
+ left: 50%;
122
+ transform: translateX(-50%);
137
123
  display: flex;
138
- justify-content: center;
139
124
  gap: 6px;
140
125
  align-items: center;
141
- pointer-events: none;
142
126
 
143
127
  button {
144
128
  width: 8px;
@@ -147,7 +131,6 @@ onUnmounted(() => {
147
131
  border: 0;
148
132
  background: rgba(255, 255, 255, 0.5);
149
133
  cursor: pointer;
150
- pointer-events: all;
151
134
  transition: background 0.2s;
152
135
 
153
136
  &.active {
package/nuxt.config.ts CHANGED
@@ -1,5 +1,8 @@
1
1
  export default defineNuxtConfig({
2
- css: ["@mundogamernetwork/shared-ui/assets/kit/kit-theme.css"],
2
+ css: [
3
+ "@mundogamernetwork/shared-ui/assets/kit/kit-base.css",
4
+ "@mundogamernetwork/shared-ui/assets/kit/kit-theme.css",
5
+ ],
3
6
  runtimeConfig: {
4
7
  public: {
5
8
  mgSharedUi: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mundogamernetwork/shared-ui",
3
- "version": "1.1.34",
3
+ "version": "1.1.36",
4
4
  "description": "Mundo Gamer Network - Shared UI Layer (Nuxt 3)",
5
5
  "type": "module",
6
6
  "main": "./nuxt.config.ts",
@@ -818,4 +818,10 @@ function onDownload() {
818
818
  @media print {
819
819
  .no-print { display: none !important; }
820
820
  }
821
+
822
+ // ── Scroll unlock (body has overflow-y: hidden globally in some frontends) ───
823
+ :global(body):has(.pk-page) {
824
+ overflow-y: auto !important;
825
+ max-height: none !important;
826
+ }
821
827
  </style>