-
+
@@ -232,26 +179,15 @@ const provider = __ALGOLIA__ ? 'algolia' : __VP_LOCAL_SEARCH__ ? 'local' : ''
-
-
-
-
-
+
-
-
+
+
+
-
+
diff --git a/src/client/theme-default/components/VPNavBarSearchButton.vue b/src/client/theme-default/components/VPNavBarSearchButton.vue
index 148f9328b..d8b81053e 100644
--- a/src/client/theme-default/components/VPNavBarSearchButton.vue
+++ b/src/client/theme-default/components/VPNavBarSearchButton.vue
@@ -24,10 +24,7 @@ const translate = createSearchTranslate(defaultTranslations)
{{ translate('button.buttonText') }}
-
-
-
-
+
@@ -40,7 +37,7 @@ const translate = createSearchTranslate(defaultTranslations)
--docsearch-focus-color: var(--vp-c-brand-1);
--docsearch-footer-background: var(--vp-c-bg);
--docsearch-highlight-color: var(--vp-c-brand-1);
- --docsearch-hit-background: var(--vp-c-default-soft);
+ --docsearch-hit-background: var(--vp-c-bg);
--docsearch-hit-color: var(--vp-c-text-1);
--docsearch-hit-highlight-color: var(--vp-c-brand-soft);
--docsearch-icon-color: var(--vp-c-text-2);
@@ -92,7 +89,7 @@ const translate = createSearchTranslate(defaultTranslations)
--docsearch-muted-color: var(--docsearch-text-color);
--docsearch-searchbox-background: transparent;
width: auto;
- padding: 2px 12px;
+ padding: 0px 8px;
border: none;
border-radius: 8px;
}
diff --git a/src/client/theme-default/styles/icons.css b/src/client/theme-default/styles/icons.css
index 62c737931..cb056fafd 100644
--- a/src/client/theme-default/styles/icons.css
+++ b/src/client/theme-default/styles/icons.css
@@ -76,9 +76,11 @@
.vpi-search {
--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.6'%3E%3Cpath d='m21 21l-4.34-4.34'/%3E%3Ccircle cx='11' cy='11' r='8' stroke-width='1.4'/%3E%3C/g%3E%3C/svg%3E");
}
+
.vpi-sparkles {
- --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.4'%3E%3Cpath d='M12 2l1.7 6.3L20 10l-6.3 1.7L12 18l-1.7-6.3L4 10l6.3-1.7z'/%3E%3Cpath d='M5 15l.8 3.2L9 19l-3.2.8L5 23l-.8-3.2L1 19l3.2-.8z'/%3E%3C/g%3E%3C/svg%3E");
+ --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.3'%3E%3Cpath d='M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z'/%3E%3Cpath d='M20 3v4'/%3E%3Cpath d='M22 5h-4'/%3E%3Cpath d='M4 17v2'/%3E%3Cpath d='M5 18H3'/%3E%3C/g%3E%3C/svg%3E");
}
+
.vpi-layout-list {
--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Crect width='7' height='7' x='3' y='3' rx='1'/%3E%3Crect width='7' height='7' x='3' y='14' rx='1'/%3E%3Cpath d='M14 4h7m-7 5h7m-7 6h7m-7 5h7'/%3E%3C/g%3E%3C/svg%3E");
}
diff --git a/src/client/theme-default/support/docsearch.ts b/src/client/theme-default/support/docsearch.ts
index 7404b601b..eb5f265d5 100644
--- a/src/client/theme-default/support/docsearch.ts
+++ b/src/client/theme-default/support/docsearch.ts
@@ -1,6 +1,5 @@
import type { DefaultTheme } from 'vitepress/theme'
-export type ResolvedDocSearchMode = 'keyword' | 'hybrid' | 'sidePanel'
export type FacetFilter = string | string[]
export interface ValidatedCredentials {
@@ -27,22 +26,6 @@ export function hasAskAi(
return Boolean(askAi.assistantId)
}
-export function resolveDocSearchMode(
- options: Pick<
- DefaultTheme.AlgoliaSearchOptions,
- 'mode' | 'appId' | 'apiKey' | 'indexName' | 'askAi'
- >
-): ResolvedDocSearchMode {
- if (options.mode === 'sidePanel') return 'sidePanel'
- if (options.mode === 'hybrid') return 'hybrid'
-
- // auto (default)
- const keyword = hasKeywordSearch(options)
- const askAiEnabled = hasAskAi(options.askAi)
- if (askAiEnabled) return keyword ? 'hybrid' : 'sidePanel'
- return 'keyword'
-}
-
/**
* Removes existing `lang:` filters and appends `lang:${lang}`.
* Handles both flat arrays and nested arrays (for OR conditions).
diff --git a/src/node/plugin.ts b/src/node/plugin.ts
index 7faeb1828..957f0abb9 100644
--- a/src/node/plugin.ts
+++ b/src/node/plugin.ts
@@ -147,7 +147,7 @@ export async function createVitePressPlugin(
'vitepress > @vue/devtools-api',
'vitepress > @vueuse/core'
].filter((d) => d != null),
- exclude: ['@docsearch/js', 'vitepress']
+ exclude: ['@docsearch/js', '@docsearch/sidepanel-js', 'vitepress']
},
server: {
fs: {