@mundogamernetwork/shared-ui 1.1.48 → 1.1.50

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.48",
3
+ "version": "1.1.50",
4
4
  "description": "Mundo Gamer Network - Shared UI Layer (Nuxt 3)",
5
5
  "type": "module",
6
6
  "main": "./nuxt.config.ts",
@@ -98,17 +98,28 @@ function track(type: 'click' | 'download' | 'contact') {
98
98
  }
99
99
 
100
100
  const requestUrl = useRequestURL();
101
+
102
+ const seoTitle = computed(() => kit.value ? `${kit.value.name} — Press Kit` : 'Press Kit');
103
+ const seoDescription = computed(() => kit.value?.tagline || kit.value?.description?.replace(/<[^>]*>/g, '').slice(0, 160) || '');
104
+ const seoImage = computed(() => kit.value?.hero_image_url || kit.value?.cover_image_url || kit.value?.logo_url || '');
105
+
101
106
  useHead(() => ({
102
- title: kit.value ? `${kit.value.name} — Press Kit` : 'Press Kit',
103
- meta: [
104
- { name: 'description', content: kit.value?.tagline || '' },
105
- { property: 'og:title', content: kit.value?.name || 'Press Kit' },
106
- { property: 'og:description', content: kit.value?.tagline || '' },
107
- { property: 'og:image', content: kit.value?.hero_image_url || kit.value?.logo_url || '' },
108
- { property: 'og:type', content: 'article' },
109
- { property: 'og:url', content: requestUrl.href },
110
- ],
107
+ title: seoTitle.value,
111
108
  }));
109
+
110
+ useSeoMeta({
111
+ title: () => seoTitle.value,
112
+ description: () => seoDescription.value,
113
+ ogTitle: () => seoTitle.value,
114
+ ogDescription: () => seoDescription.value,
115
+ ogImage: () => seoImage.value,
116
+ ogType: 'article',
117
+ ogUrl: () => requestUrl.href,
118
+ twitterCard: 'summary_large_image',
119
+ twitterTitle: () => seoTitle.value,
120
+ twitterDescription: () => seoDescription.value,
121
+ twitterImage: () => seoImage.value,
122
+ });
112
123
  </script>
113
124
 
114
125
  <template>
package/stores/auth.ts CHANGED
@@ -71,8 +71,13 @@ export const useAuthStore = defineStore({
71
71
  userId: (state) => (state.user ? state.user.id : null),
72
72
  isSignedIn: (state) => state.signedIn,
73
73
  },
74
+ // Persisted via pinia-plugin-persistedstate when the consuming app registers
75
+ // the module; storage is left as the plugin default (localStorage, SSR-safe)
76
+ // so this store does NOT reference the `persistedState` global. Referencing it
77
+ // threw "persistedState is not defined" during SSR on fronts that consume this
78
+ // layer without the module (the base, network-site, never had it). Fronts with
79
+ // the module still persist; fronts without it simply skip persistence, no crash.
74
80
  persist: {
75
- storage: persistedState.localStorage,
76
81
  pick: ["user", "signedIn"],
77
82
  afterHydrate: ({ store }) => {
78
83
  store.initialized = false;