Commit a7d3759019

a7d37590198a1f0c71b458da804a09074e53bb17

parent: b7af4889c5

Unsigned

Duck <57977673+woducku@users.noreply.github.com> · 2026-07-28 13:58 UTC

commit

Layout: unified · split

docs/.vitepress/theme/components/search/Search.vue +1 −32
@@ -82,7 +82,6 @@ import {
8282 getPageOrder,
8383 buildResultHref,
8484 getSearchResultHref,
85 cycleSearchMode,
8685 stripNonCloneable,
8786 getPageOrderEntries,
8887 nextFrame
@@ -227,9 +226,6 @@ function applyHistory(entry: SearchHistoryEntry) {
227226// Settings popup
228227const showSettingsPopup = ref(false)
229228
230// Page groups & URL search state
231interface PageGroupCount { key: string; count: number }
232
233229const urlMatches = shallowRef<PageLink[]>([])
234230const urlPageGroupCounts = shallowRef<PageGroupCount[]>([])
235231
@@ -1232,7 +1228,6 @@ function onMouseMove(e: MouseEvent) {
12321228 ref="searchBarRef"
12331229 :filter-text="filterText"
12341230 :search-loading="searchLoading"
1235 :disable-detailed-view="disableDetailedView"
12361231 :show-settings-popup="showSettingsPopup"
12371232 :button-text="buttonText"
12381233 :disable-reset="disableReset"
@@ -1240,7 +1235,6 @@ function onMouseMove(e: MouseEvent) {
12401235 :form-motion="formMotion"
12411236 :translate="translate"
12421237 @update:filter-text="filterText = $event"
1243 @cycle-search-mode="cycleSearchMode(searchMode)"
12441238 @reset-search="resetSearch"
12451239 @search-bar-click="onSearchBarClick"
12461240 @toggle-settings="showSettingsPopup = !showSettingsPopup"
@@ -1559,11 +1553,6 @@ function onMouseMove(e: MouseEvent) {
15591553 font-weight: 500;
15601554}
15611555
1562.title-icon {
1563 opacity: 1;
1564 font-weight: 500;
1565}
1566
15671556.title svg {
15681557 opacity: 0.5;
15691558}
@@ -1645,8 +1634,7 @@ function onMouseMove(e: MouseEvent) {
16451634 z-index: 1000;
16461635}
16471636
1648.result.selected .titles,
1649.result.selected .title-icon {
1637.result.selected .titles {
16501638 color: var(--vp-c-brand-1) !important;
16511639}
16521640
@@ -1654,12 +1642,6 @@ function onMouseMove(e: MouseEvent) {
16541642 color: var(--vp-c-brand-1);
16551643}
16561644
1657.no-results {
1658 font-size: 0.9rem;
1659 text-align: center;
1660 padding: 12px;
1661}
1662
16631645svg {
16641646 flex: none;
16651647}
@@ -1709,19 +1691,6 @@ svg {
17091691 color: var(--vp-c-text-2);
17101692}
17111693
1712.url-path .icon-tip {
1713 display: inline-flex;
1714 align-items: center;
1715 line-height: 1;
1716 vertical-align: middle;
1717}
1718
1719.url-path .icon-tip > span {
1720 width: 1em;
1721 height: 1em;
1722 min-width: 1em;
1723}
1724
17251694.url-link {
17261695 align-self: flex-start;
17271696 max-width: 100%;
docs/.vitepress/theme/components/search/SearchBar.vue +10 −105
@@ -1,21 +1,13 @@
11<script setup lang="ts">
22import {
3 Globe,
4 List,
5 LocateOff,
6 Regex,
73 Settings,
8 TextAlignStart,
94 X
105} from 'lucide-vue-next'
116import { ref } from 'vue'
12import { searchMode, showDetailedList } from '../../searchState'
13import type { SearchSortMode } from '../../searchState'
147
158defineProps<{
169 filterText: string
1710 searchLoading: boolean
18 disableDetailedView: boolean
1911 showSettingsPopup: boolean
2012 buttonText: string
2113 disableReset: boolean
@@ -26,7 +18,6 @@ defineProps<{
2618
2719const emit = defineEmits<{
2820 'update:filterText': [value: string]
29 cycleSearchMode: []
3021 resetSearch: []
3122 searchBarClick: [event: PointerEvent]
3223 toggleSettings: []
@@ -37,29 +28,6 @@ const searchInput = ref<HTMLInputElement>()
3728const settingsButtonRef = ref<HTMLButtonElement>()
3829
3930defineExpose({ searchInput, settingsButtonRef })
40
41function onViewDetailClick() {
42 showDetailedList.value = true
43}
44
45function onViewListClick() {
46 showDetailedList.value = false
47}
48
49function onExactClick() {
50 if (searchMode.value === 'exact') emit('cycleSearchMode')
51 else searchMode.value = 'exact' as SearchSortMode
52}
53
54function onFuzzyClick() {
55 if (searchMode.value === 'fuzzy') emit('cycleSearchMode')
56 else searchMode.value = 'fuzzy' as SearchSortMode
57}
58
59function onUrlClick() {
60 if (searchMode.value === 'url') emit('cycleSearchMode')
61 else searchMode.value = 'url' as SearchSortMode
62}
6331</script>
6432
6533<template>
@@ -118,58 +86,8 @@ function onUrlClick() {
11886 alt="Bubba loading"
11987 />
12088 </button>
121 <div
122 v-if="!disableDetailedView && searchMode !== 'url'"
123 class="view-group toolbar-group"
124 >
125 <button
126 type="button"
127 class="mode-btn"
128 :class="{ 'mode-active': showDetailedList }"
129 title="Detail view (Consumes more RAM)"
130 @click="onViewDetailClick"
131 >
132 <TextAlignStart :size="18" stroke-width="2" />
133 </button>
134 <button
135 type="button"
136 class="mode-btn"
137 :class="{ 'mode-active': !showDetailedList }"
138 title="List view (Consumes less RAM)"
139 @click="onViewListClick"
140 >
141 <List :size="18" stroke-width="2" />
142 </button>
143 </div>
144 <div class="search-mode-group toolbar-group">
145 <button
146 type="button"
147 class="mode-btn"
148 :class="{ 'mode-active': searchMode === 'exact' }"
149 title="Exact search"
150 @click="onExactClick"
151 >
152 <Regex :size="18" stroke-width="2" />
153 </button>
154 <button
155 type="button"
156 class="mode-btn"
157 :class="{ 'mode-active': searchMode === 'fuzzy' }"
158 title="Fuzzy search"
159 @click="onFuzzyClick"
160 >
161 <LocateOff :size="18" stroke-width="2" />
162 </button>
163 <button
164 type="button"
165 class="mode-btn"
166 :class="{ 'mode-active': searchMode === 'url' }"
167 title="URL search"
168 @click="onUrlClick"
169 >
170 <Globe :size="18" stroke-width="2" />
171 </button>
172 </div>
89
90
17391 <button
17492 ref="settingsButtonRef"
17593 type="button"
@@ -291,8 +209,7 @@ function onUrlClick() {
291209 padding: 8px;
292210}
293211
294.search-actions button:not([disabled]):hover,
295.toggle-layout-button.detailed-list {
212.search-actions button:not([disabled]):hover {
296213 color: var(--vp-c-brand-1);
297214}
298215
@@ -300,14 +217,7 @@ function onUrlClick() {
300217 opacity: 0.37;
301218}
302219
303.toolbar-group + .toolbar-group {
304 margin-left: 6px;
305}
306220
307.search-mode-group,
308.view-group {
309 display: none;
310}
311221
312222.mode-btn {
313223 display: flex;
@@ -322,10 +232,6 @@ function onUrlClick() {
322232 border-radius: 0;
323233}
324234
325.mode-btn + .mode-btn {
326 border-left: 1px solid var(--vp-c-divider);
327}
328
329235.mode-btn:hover {
330236 color: var(--vp-c-text-1);
331237 background: var(--vp-c-default-soft);
@@ -336,11 +242,7 @@ function onUrlClick() {
336242 background: color-mix(in srgb, var(--vp-c-brand-1) 10%, transparent);
337243}
338244
339.exact-match-button.exact-match-active {
340 color: var(--vp-c-brand-1);
341 background-color: color-mix(in srgb, var(--vp-c-brand-1) 10%, transparent);
342 border-radius: 4px;
343}
245
344246
345247.search-actions .settings-toggle-btn,
346248.search-actions .clear-button {
@@ -393,13 +295,16 @@ html.effects-disabled .clear-button:active {
393295 display: none;
394296 align-items: center;
395297 justify-content: center;
396 padding: 0;
298 padding: 8px;
397299 border: none;
398300 background: transparent;
399301 color: var(--vp-c-text-1);
400302 cursor: pointer;
401 width: 24px;
402 height: 24px;
303 transition: color 0.15s;
304}
305
306.back-button:hover {
307 color: var(--vp-c-brand-1);
403308}
404309
405310@media (max-width: 767px) {
docs/.vitepress/theme/components/search/SearchHistory.vue −1
@@ -1,7 +1,6 @@
11<script setup lang="ts">
22import { ArrowRight, Globe, LocateOff, Regex, X } from 'lucide-vue-next'
33import { searchHistory, type SearchHistoryEntry } from '../../searchState'
4import type { SearchSortMode } from '../../searchState'
54
65defineProps<{
76 searchMotionDiv: string | object
docs/.vitepress/theme/components/search/SearchKeyboardShortcuts.vue −1
@@ -1,6 +1,5 @@
11<script setup lang="ts">
22import { ArrowLeft, ArrowLeftToLine, ArrowRight, ArrowRightToLine } from 'lucide-vue-next'
3import type { FooterTranslations } from './types'
43
54defineProps<{
65 searchMotionDiv: string | object