diff --git a/__tests__/e2e/data-loading/data.test.ts b/__tests__/e2e/data-loading/data.test.ts
index fafc403a..1eb267e3 100644
--- a/__tests__/e2e/data-loading/data.test.ts
+++ b/__tests__/e2e/data-loading/data.test.ts
@@ -54,7 +54,7 @@ describe('static data file support in vite 3', () => {
document.querySelector('pre#basic')?.textContent ===
JSON.stringify([{ a: false }, { b: true }], null, 2),
undefined,
- { timeout: 3000 }
+ { timeout: 5000 }
)
} finally {
await fs.writeFile(a, JSON.stringify({ a: true }, null, 2) + '\n')
@@ -69,7 +69,7 @@ describe('static data file support in vite 3', () => {
document.querySelector('pre#basic')?.textContent ===
JSON.stringify([{ a: true }], null, 2),
undefined,
- { timeout: 3000 }
+ { timeout: 5000 }
)
err = false
} finally {
@@ -85,7 +85,7 @@ describe('static data file support in vite 3', () => {
document.querySelector('pre#basic')?.textContent ===
JSON.stringify([{ a: true }, { b: false }], null, 2),
undefined,
- { timeout: 3000 }
+ { timeout: 5000 }
)
} finally {
await fs.writeFile(b, JSON.stringify({ b: true }, null, 2) + '\n')
diff --git a/package.json b/package.json
index c6c664f4..7f919b02 100644
--- a/package.json
+++ b/package.json
@@ -107,6 +107,7 @@
"@vueuse/core": "^13.1.0",
"@vueuse/integrations": "^13.1.0",
"focus-trap": "^7.6.4",
+ "living-object": "0.0.8",
"mark.js": "8.11.1",
"minisearch": "^7.1.2",
"shiki": "^3.4.0",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 96432174..2b0f54e4 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -55,6 +55,9 @@ importers:
focus-trap:
specifier: ^7.6.4
version: 7.6.4
+ living-object:
+ specifier: 0.0.8
+ version: 0.0.8
mark.js:
specifier: 8.11.1
version: 8.11.1
@@ -2200,6 +2203,10 @@ packages:
resolution: {integrity: sha512-LWzX2KsqcB1wqQ4AHgYb4RsDXauQiqhjLk+6hjbaeHG4zpjjVAB6wC/gz6X0l+Du1cN3pUB5ZlrvTbhGSNnUQQ==}
engines: {node: '>=18.0.0'}
+ living-object@0.0.8:
+ resolution: {integrity: sha512-o4SGS1iyo3H6m/OAbrxty0RFgXNIkx0vojHDGcAk/RjQ+noB0lsK2znmq19BZ+jyOS7P0jj5zywxgVNuKt5/Gg==}
+ engines: {node: '>=16.0.0'}
+
local-pkg@1.1.1:
resolution: {integrity: sha512-WunYko2W1NcdfAFpuLUoucsgULmgDBRkdxHxWQ7mK0cQqwPiy8E1enjuRBrhLtZkB5iScJ1XIPdhVEFK8aOLSg==}
engines: {node: '>=14'}
@@ -5123,6 +5130,8 @@ snapshots:
rfdc: 1.4.1
wrap-ansi: 9.0.0
+ living-object@0.0.8: {}
+
local-pkg@1.1.1:
dependencies:
mlly: 1.7.4
diff --git a/src/client/app/components/ClientOnly.ts b/src/client/app/components/ClientOnly.ts
index 680094ce..1781a371 100644
--- a/src/client/app/components/ClientOnly.ts
+++ b/src/client/app/components/ClientOnly.ts
@@ -1,7 +1,17 @@
import { defineComponent, onMounted, ref } from 'vue'
export const ClientOnly = defineComponent({
- setup(_, { slots }) {
+ props: {
+ isClientOnly: {
+ type: Boolean,
+ default: true
+ }
+ },
+ setup(props, { slots }) {
+ // Programmatically determine if this component should be
+ // client-only based on the presence of the isClientOnly attribute.
+ if (!props.isClientOnly) return () => slots.default?.(props) || null
+
const show = ref(false)
onMounted(() => {
diff --git a/src/client/theme-default/components/VPNavBarMenu.vue b/src/client/theme-default/components/VPNavBarMenu.vue
index c4d741b9..e15cc489 100644
--- a/src/client/theme-default/components/VPNavBarMenu.vue
+++ b/src/client/theme-default/components/VPNavBarMenu.vue
@@ -2,29 +2,32 @@
import { useData } from '../composables/data'
import VPNavBarMenuLink from './VPNavBarMenuLink.vue'
import VPNavBarMenuGroup from './VPNavBarMenuGroup.vue'
+import { isClientOnly } from '../../shared'
const { theme } = useData()
-
+
+
+