mirror of
https://github.com/fmhy/edit.git
synced 2026-01-12 23:11:06 +11:00
Complete fuzzy/exact search toggle implementation with screenshots
Co-authored-by: eli32-vlc <84105075+eli32-vlc@users.noreply.github.com>
This commit is contained in:
parent
e3ae5c4256
commit
443d34d169
4 changed files with 71 additions and 6 deletions
|
|
@ -98,6 +98,12 @@ export default defineConfig({
|
|||
replacement: fileURLToPath(
|
||||
new URL('./theme/components/ThemeDropdown.vue', import.meta.url)
|
||||
)
|
||||
},
|
||||
{
|
||||
find: /^.*VPLocalSearchBox\.vue$/,
|
||||
replacement: fileURLToPath(
|
||||
new URL('./theme/components/VPLocalSearchBox.vue', import.meta.url)
|
||||
)
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
|
|||
|
|
@ -26,12 +26,12 @@ import {
|
|||
watchEffect,
|
||||
type Ref
|
||||
} from 'vue'
|
||||
import type { ModalTranslations } from '../../../../types/local-search'
|
||||
import { pathToFile } from '../../app/utils'
|
||||
import { escapeRegExp } from '../../shared'
|
||||
import { useData } from '../composables/data'
|
||||
import { LRUCache } from '../support/lru'
|
||||
import { createSearchTranslate } from '../support/translation'
|
||||
import type { ModalTranslations } from 'vitepress/types/local-search'
|
||||
import { pathToFile } from 'vitepress/dist/client/app/utils'
|
||||
import { escapeRegExp } from 'vitepress/dist/client/shared'
|
||||
import { useData } from 'vitepress/dist/client/theme-default/composables/data'
|
||||
import { LRUCache } from 'vitepress/dist/client/theme-default/support/lru'
|
||||
import { createSearchTranslate } from 'vitepress/dist/client/theme-default/support/translation'
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: 'close'): void
|
||||
|
|
|
|||
|
|
@ -25,9 +25,11 @@
|
|||
"@headlessui/vue": "^1.7.23",
|
||||
"@resvg/resvg-js": "^2.6.2",
|
||||
"@vueuse/core": "^14.1.0",
|
||||
"@vueuse/integrations": "^14.1.0",
|
||||
"consola": "^3.4.2",
|
||||
"feed": "^5.1.0",
|
||||
"itty-fetcher": "^1.0.10",
|
||||
"mark.js": "^8.11.1",
|
||||
"nitro-cors": "^0.7.1",
|
||||
"nitropack": "^2.12.9",
|
||||
"nprogress": "^0.2.0",
|
||||
|
|
|
|||
57
pnpm-lock.yaml
generated
57
pnpm-lock.yaml
generated
|
|
@ -23,6 +23,9 @@ importers:
|
|||
'@vueuse/core':
|
||||
specifier: ^14.1.0
|
||||
version: 14.1.0(vue@3.5.25(typescript@5.9.3))
|
||||
'@vueuse/integrations':
|
||||
specifier: ^14.1.0
|
||||
version: 14.1.0(focus-trap@7.6.6)(nprogress@0.2.0)(vue@3.5.25(typescript@5.9.3))
|
||||
consola:
|
||||
specifier: ^3.4.2
|
||||
version: 3.4.2
|
||||
|
|
@ -32,6 +35,9 @@ importers:
|
|||
itty-fetcher:
|
||||
specifier: ^1.0.10
|
||||
version: 1.0.10
|
||||
mark.js:
|
||||
specifier: ^8.11.1
|
||||
version: 8.11.1
|
||||
nitro-cors:
|
||||
specifier: ^0.7.1
|
||||
version: 0.7.1
|
||||
|
|
@ -2222,6 +2228,48 @@ packages:
|
|||
universal-cookie:
|
||||
optional: true
|
||||
|
||||
'@vueuse/integrations@14.1.0':
|
||||
resolution: {integrity: sha512-eNQPdisnO9SvdydTIXnTE7c29yOsJBD/xkwEyQLdhDC/LKbqrFpXHb3uS//7NcIrQO3fWVuvMGp8dbK6mNEMCA==}
|
||||
peerDependencies:
|
||||
async-validator: ^4
|
||||
axios: ^1
|
||||
change-case: ^5
|
||||
drauu: ^0.4
|
||||
focus-trap: ^7
|
||||
fuse.js: ^7
|
||||
idb-keyval: ^6
|
||||
jwt-decode: ^4
|
||||
nprogress: ^0.2
|
||||
qrcode: ^1.5
|
||||
sortablejs: ^1
|
||||
universal-cookie: ^7 || ^8
|
||||
vue: ^3.5.0
|
||||
peerDependenciesMeta:
|
||||
async-validator:
|
||||
optional: true
|
||||
axios:
|
||||
optional: true
|
||||
change-case:
|
||||
optional: true
|
||||
drauu:
|
||||
optional: true
|
||||
focus-trap:
|
||||
optional: true
|
||||
fuse.js:
|
||||
optional: true
|
||||
idb-keyval:
|
||||
optional: true
|
||||
jwt-decode:
|
||||
optional: true
|
||||
nprogress:
|
||||
optional: true
|
||||
qrcode:
|
||||
optional: true
|
||||
sortablejs:
|
||||
optional: true
|
||||
universal-cookie:
|
||||
optional: true
|
||||
|
||||
'@vueuse/metadata@12.8.2':
|
||||
resolution: {integrity: sha512-rAyLGEuoBJ/Il5AmFHiziCPdQzRt88VxR+Y/A/QhJ1EWtWqPBBAxTAFaSkviwEuOEZNtW8pvkPgoCZQ+HxqW1A==}
|
||||
|
||||
|
|
@ -6851,6 +6899,15 @@ snapshots:
|
|||
transitivePeerDependencies:
|
||||
- typescript
|
||||
|
||||
'@vueuse/integrations@14.1.0(focus-trap@7.6.6)(nprogress@0.2.0)(vue@3.5.25(typescript@5.9.3))':
|
||||
dependencies:
|
||||
'@vueuse/core': 14.1.0(vue@3.5.25(typescript@5.9.3))
|
||||
'@vueuse/shared': 14.1.0(vue@3.5.25(typescript@5.9.3))
|
||||
vue: 3.5.25(typescript@5.9.3)
|
||||
optionalDependencies:
|
||||
focus-trap: 7.6.6
|
||||
nprogress: 0.2.0
|
||||
|
||||
'@vueuse/metadata@12.8.2': {}
|
||||
|
||||
'@vueuse/metadata@14.1.0': {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue