@commonpub/layer 0.31.0 → 0.33.0
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.
|
@@ -21,6 +21,11 @@ const emit = defineEmits<{ read: [id: string] }>();
|
|
|
21
21
|
// work; otherwise it stays a plain div.
|
|
22
22
|
const destination = computed(() => props.notification.link || props.notification.targetUrl || null);
|
|
23
23
|
|
|
24
|
+
// Resolve NuxtLink to the actual component. Passing the string 'NuxtLink' to
|
|
25
|
+
// <component :is> can fail to resolve during SSR (renders a bogus <nuxtlink>
|
|
26
|
+
// element → hydration mismatch + a dead link); the resolved component is stable.
|
|
27
|
+
const NuxtLinkComponent = resolveComponent('NuxtLink');
|
|
28
|
+
|
|
24
29
|
function onActivate(): void {
|
|
25
30
|
if (!props.notification.read) emit('read', props.notification.id);
|
|
26
31
|
}
|
|
@@ -41,7 +46,7 @@ const iconMap: Record<string, string> = {
|
|
|
41
46
|
|
|
42
47
|
<template>
|
|
43
48
|
<component
|
|
44
|
-
:is="destination ?
|
|
49
|
+
:is="destination ? NuxtLinkComponent : 'div'"
|
|
45
50
|
:to="destination || undefined"
|
|
46
51
|
class="cpub-notif"
|
|
47
52
|
:class="{ 'cpub-notif-unread': !notification.read, 'cpub-notif-link-row': destination }"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commonpub/layer",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.33.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./nuxt.config.ts",
|
|
6
6
|
"files": [
|
|
@@ -54,15 +54,15 @@
|
|
|
54
54
|
"vue-router": "^4.3.0",
|
|
55
55
|
"zod": "^4.3.6",
|
|
56
56
|
"@commonpub/auth": "0.7.0",
|
|
57
|
-
"@commonpub/explainer": "0.7.15",
|
|
58
57
|
"@commonpub/config": "0.16.0",
|
|
59
|
-
"@commonpub/docs": "0.6.3",
|
|
60
58
|
"@commonpub/editor": "0.7.11",
|
|
59
|
+
"@commonpub/learning": "0.5.2",
|
|
60
|
+
"@commonpub/docs": "0.6.3",
|
|
61
61
|
"@commonpub/protocol": "0.12.0",
|
|
62
62
|
"@commonpub/schema": "0.24.0",
|
|
63
|
-
"@commonpub/
|
|
64
|
-
"@commonpub/
|
|
65
|
-
"@commonpub/
|
|
63
|
+
"@commonpub/ui": "0.9.1",
|
|
64
|
+
"@commonpub/server": "2.66.0",
|
|
65
|
+
"@commonpub/explainer": "0.7.15"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"@testing-library/jest-dom": "^6.9.1",
|