From e3ae5c42568b3de9e3fefa245b77213994dcc29a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 4 Jan 2026 00:51:14 +0000 Subject: [PATCH] Add fuzzy/exact search toggle to VPLocalSearchBox Co-authored-by: eli32-vlc <84105075+eli32-vlc@users.noreply.github.com> --- docs/.vitepress/constants.ts | 2 +- .../theme/components/VPLocalSearchBox.vue | 923 ++++++++++++++++++ 2 files changed, 924 insertions(+), 1 deletion(-) create mode 100644 docs/.vitepress/theme/components/VPLocalSearchBox.vue diff --git a/docs/.vitepress/constants.ts b/docs/.vitepress/constants.ts index fb22ca7fb..108d4359d 100644 --- a/docs/.vitepress/constants.ts +++ b/docs/.vitepress/constants.ts @@ -121,7 +121,7 @@ export const search: DefaultTheme.Config['search'] = { }, searchOptions: { combineWith: 'AND', - fuzzy: true, + fuzzy: false, // @ts-ignore boostDocument: (documentId, term, storedFields: Record) => { const titles = (storedFields?.titles as string[]) diff --git a/docs/.vitepress/theme/components/VPLocalSearchBox.vue b/docs/.vitepress/theme/components/VPLocalSearchBox.vue new file mode 100644 index 000000000..a8c2540dd --- /dev/null +++ b/docs/.vitepress/theme/components/VPLocalSearchBox.vue @@ -0,0 +1,923 @@ + + + + + + + + + + + + + + + + + + + + -1 && (showDetailedList = !showDetailedList) + " + > + + + + + ~ + = + + + + + + + + + + + + + + # + + + + + + + + + + + + + + + + + + + + + {{ translate('modal.noResultsText') }} "{{ filterText }}" + + + + + + + + + + + + {{ translate('modal.footer.navigateText') }} + + + + + + {{ translate('modal.footer.selectText') }} + + + esc + {{ translate('modal.footer.closeText') }} + + + + + + + +