Merge branch 'algolia-docs-search' into algolia-search

This commit is contained in:
Eric
2026-10-19 12:07:26 +02:00
10 changed files with 428 additions and 482 deletions
@@ -22,13 +22,15 @@ import FakeInput from '../base/FakeInput.vue'
const VPAlgoliaSearchBox = defineAsyncComponent(() => import('vitepress/dist/client/theme-default/components/VPAlgoliaSearchBox.vue'));
const { theme } = useData<DefaultTheme.Config>()
const { theme, page } = useData<DefaultTheme.Config>()
const algolia = computed(
() =>
(theme.value.search?.options ?? theme.value.algolia) as DefaultTheme.AlgoliaSearchOptions,
)
const isGuide = computed(() => page.value?.relativePath?.startsWith?.('guide'));
// whether this instance is the one rendering the (hidden) search box
const isOwner = ref(false)
const shortcutText = ref('')
@@ -117,7 +119,7 @@ function isEditingContent(event: KeyboardEvent): boolean {
</script>
<template>
<div class="VPNavBarSearch">
<div class="VPNavBarSearch" v-if="isGuide">
<FakeInput
class="nav-search-input"
:shortcut="shortcutText"
@@ -136,27 +138,29 @@ function isEditingContent(event: KeyboardEvent): boolean {
<style>
.VPNavBarSearch {
display: flex;
align-items: center;
}
@media (min-width: 768px) {
.VPNavBarSearch {
flex-grow: 1;
padding-left: 0px;
padding-left: 24px;
}
}
@media (min-width: 960px) {
.VPNavBarSearch {
padding-left: 0px;
padding-left: 32px;
}
}
.VPNavBarSearch {
padding-top: 24px;
}
.VPNavBarSearch .nav-search-input {
padding: 8px 12px;
align-items: center;
width: 100%;
max-width: 240px;
}
.VPNavBarSearch .docsearch-host {
@@ -2,7 +2,6 @@
import { computed } from 'vue';
import { useData } from 'vitepress';
import VPSidebarGroup from 'vitepress/dist/client/theme-default/components/VPSidebarGroup.vue';
import VPNavBarSearch from '../components/overrides/VPNavBarSearch.vue';
import FrameworkSelect from '../components/guide/FrameworkSelect.vue';
import { guideSidebarTop } from '../../sidebar';
@@ -13,7 +12,6 @@ const isGuide = computed(() => page.value?.relativePath?.startsWith?.('guide'));
<template>
<template v-if="isGuide">
<VPNavBarSearch />
<VPSidebarGroup :items="guideSidebarTop" />
<FrameworkSelect />
</template>
-4
View File
@@ -129,10 +129,6 @@ html {
flex-direction: column-reverse;
}
.content-body .search {
display: none;
}
@media (min-width: 960px) {
.VPHomeHero .container .image {
order: 1;
+1 -1
View File
@@ -75,6 +75,6 @@
"react": "19.3.0",
"react-dom": "19.3.0",
"sandpack-vue3": "3.1.12",
"vue": "^3.5.43"
"vue": "^3.5.44"
}
}
+2 -2
View File
@@ -12,11 +12,11 @@
"dependencies": {
"@lucide/vue": "workspace:*",
"nuxt": "4.5.1",
"vue": "3.5.43",
"vue": "3.5.44",
"vue-router": "5.3.1"
},
"devDependencies": {
"@vitejs/plugin-vue": "^6.0.8",
"@vitejs/plugin-vue": "^6.0.10",
"@vitest/browser-playwright": "5.0.3",
"typescript": "^6.0.3",
"vite": "^8.3.2",
+2 -2
View File
@@ -13,10 +13,10 @@
"@lucide/vue": "workspace:*",
"vike": "0.4.266",
"vike-vue": "0.9.13",
"vue": "3.5.43"
"vue": "3.5.44"
},
"devDependencies": {
"@vitejs/plugin-vue": "^6.0.8",
"@vitejs/plugin-vue": "^6.0.10",
"@vitest/browser-playwright": "5.0.3",
"typescript": "^6.0.3",
"vite": "^8.3.2",
+2 -2
View File
@@ -11,12 +11,12 @@
},
"dependencies": {
"@lucide/vue": "workspace:*",
"vue": "3.5.43"
"vue": "3.5.44"
},
"devDependencies": {
"@tsconfig/node24": "^24.0.5",
"@types/node": "^26.1.1",
"@vitejs/plugin-vue": "^6.0.8",
"@vitejs/plugin-vue": "^6.0.10",
"@vitest/browser-playwright": "5.0.3",
"@vue/tsconfig": "^0.9.1",
"playwright": "1.58.2",
+1 -1
View File
@@ -77,7 +77,7 @@
"jest-serializer-html": "^7.1.0",
"react": "19.3.0",
"react-dom": "19.3.0",
"react-native": "^0.87.1",
"react-native": "^0.88.0",
"react-native-svg": "^15.15.5",
"rollup": "^4.63.1",
"rollup-plugin-dts": "^6.5.1",
+2 -2
View File
@@ -46,13 +46,13 @@
"@lucide/shared": "workspace:*",
"@testing-library/jest-dom": "^7.0.1",
"@testing-library/vue": "^8.1.0",
"@vitejs/plugin-vue": "^6.0.9",
"@vitejs/plugin-vue": "^6.0.10",
"@vue/test-utils": "2.5.1",
"rollup": "^4.63.1",
"rollup-plugin-dts": "^6.5.1",
"typescript": "^6.0.3",
"vite": "^8.3.2",
"vue": "^3.5.43"
"vue": "^3.5.44"
},
"peerDependencies": {
"vue": ">=3.0.1"
+406 -458
View File
File diff suppressed because it is too large Load Diff