@commonpub/layer 0.21.4 → 0.21.5
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.
|
@@ -156,7 +156,7 @@ function removeTag(tag: string): void {
|
|
|
156
156
|
padding: 7px 10px;
|
|
157
157
|
font-size: 12px;
|
|
158
158
|
color: var(--text);
|
|
159
|
-
font-family:
|
|
159
|
+
font-family: var(--font-sans);
|
|
160
160
|
outline: none;
|
|
161
161
|
margin-bottom: 6px;
|
|
162
162
|
transition: border-color 0.15s;
|
|
@@ -14,6 +14,14 @@ const { data: userHubs } = useLazyFetch<{ items: Array<{ id: string; name: strin
|
|
|
14
14
|
const sharing = ref(false);
|
|
15
15
|
const selectedHub = ref('');
|
|
16
16
|
|
|
17
|
+
// Parent mounts/unmounts this modal via v-if, so it's always "open" while
|
|
18
|
+
// mounted. A local ref flipped on mount drives useFocusTrap's watcher
|
|
19
|
+
// (false -> true), activating the trap, Esc handler and scroll lock.
|
|
20
|
+
const contentRef = ref<HTMLElement | null>(null);
|
|
21
|
+
const visible = ref(false);
|
|
22
|
+
onMounted(() => { visible.value = true; });
|
|
23
|
+
useFocusTrap(contentRef, () => visible.value, () => emit('close'));
|
|
24
|
+
|
|
17
25
|
async function handleShare(): Promise<void> {
|
|
18
26
|
if (!selectedHub.value) return;
|
|
19
27
|
sharing.value = true;
|
|
@@ -35,9 +43,9 @@ async function handleShare(): Promise<void> {
|
|
|
35
43
|
|
|
36
44
|
<template>
|
|
37
45
|
<div class="cpub-modal-backdrop" @click.self="emit('close')">
|
|
38
|
-
<div class="cpub-modal-content">
|
|
46
|
+
<div ref="contentRef" class="cpub-modal-content" role="dialog" aria-modal="true" aria-labelledby="cpub-share-hub-title">
|
|
39
47
|
<div class="cpub-modal-header">
|
|
40
|
-
<h3 class="cpub-modal-title">Share to Hub</h3>
|
|
48
|
+
<h3 id="cpub-share-hub-title" class="cpub-modal-title">Share to Hub</h3>
|
|
41
49
|
<button class="cpub-modal-close" aria-label="Close" @click="emit('close')"><i class="fa-solid fa-xmark"></i></button>
|
|
42
50
|
</div>
|
|
43
51
|
|
|
@@ -21,7 +21,7 @@ const features = useFeatures();
|
|
|
21
21
|
|
|
22
22
|
function isFeatureEnabled(featureGate?: string): boolean {
|
|
23
23
|
if (!featureGate) return true;
|
|
24
|
-
return (features.features as unknown as Record<string, boolean>)?.[featureGate] ?? true;
|
|
24
|
+
return (features.features.value as unknown as Record<string, boolean>)?.[featureGate] ?? true;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
/** Section types that render in the full-width zone (above the 2-column layout) */
|
package/error.vue
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commonpub/layer",
|
|
3
|
-
"version": "0.21.
|
|
3
|
+
"version": "0.21.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./nuxt.config.ts",
|
|
6
6
|
"files": [
|
|
@@ -50,16 +50,16 @@
|
|
|
50
50
|
"vue": "^3.4.0",
|
|
51
51
|
"vue-router": "^4.3.0",
|
|
52
52
|
"zod": "^4.3.6",
|
|
53
|
+
"@commonpub/auth": "0.6.0",
|
|
53
54
|
"@commonpub/editor": "0.7.9",
|
|
54
|
-
"@commonpub/protocol": "0.9.10",
|
|
55
|
-
"@commonpub/schema": "0.16.0",
|
|
56
55
|
"@commonpub/docs": "0.6.3",
|
|
57
|
-
"@commonpub/
|
|
58
|
-
"@commonpub/explainer": "0.7.12",
|
|
56
|
+
"@commonpub/protocol": "0.9.10",
|
|
59
57
|
"@commonpub/learning": "0.5.2",
|
|
58
|
+
"@commonpub/explainer": "0.7.12",
|
|
60
59
|
"@commonpub/ui": "0.8.5",
|
|
61
|
-
"@commonpub/
|
|
62
|
-
"@commonpub/
|
|
60
|
+
"@commonpub/server": "2.53.0",
|
|
61
|
+
"@commonpub/schema": "0.16.0",
|
|
62
|
+
"@commonpub/config": "0.12.0"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@testing-library/jest-dom": "^6.9.1",
|
|
@@ -68,5 +68,7 @@
|
|
|
68
68
|
"jsdom": "^25.0.1",
|
|
69
69
|
"vitest": "^3.2.4"
|
|
70
70
|
},
|
|
71
|
-
"scripts": {
|
|
71
|
+
"scripts": {
|
|
72
|
+
"test": "vitest run"
|
|
73
|
+
}
|
|
72
74
|
}
|
package/pages/search.vue
CHANGED
|
@@ -512,7 +512,7 @@ const { data: relatedCommunities } = await useFetch('/api/hubs', {
|
|
|
512
512
|
font-size: 15px;
|
|
513
513
|
font-weight: 500;
|
|
514
514
|
color: var(--text);
|
|
515
|
-
font-family:
|
|
515
|
+
font-family: var(--font-sans);
|
|
516
516
|
outline: none;
|
|
517
517
|
transition: border-color 0.15s, box-shadow 0.15s;
|
|
518
518
|
}
|
|
@@ -679,7 +679,7 @@ async function handleReport(): Promise<void> {
|
|
|
679
679
|
background: none;
|
|
680
680
|
cursor: pointer;
|
|
681
681
|
border-bottom: 3px solid transparent;
|
|
682
|
-
font-family:
|
|
682
|
+
font-family: var(--font-sans);
|
|
683
683
|
display: flex;
|
|
684
684
|
align-items: center;
|
|
685
685
|
gap: 6px;
|