feat: Add fuzzy search to patches search (#229)

* feat: Fuzzy Search

Co-authored-by: Kendell R <KTibow@users.noreply.github.com>

* slightly change the init logic

* fix behavior

* fix sort behavior
i am so good at reading docs

* update the search results on load

* switch to fuse js

* lower the threshold per @oSumAtrIX request

---------

Co-authored-by: Kendell R <KTibow@users.noreply.github.com>
Co-authored-by: afn <hey@afn.im>
This commit is contained in:
Ushie
2024-04-27 20:29:52 +03:00
committed by GitHub
parent f86456cb4c
commit 9275193333
4 changed files with 64 additions and 63 deletions

8
pnpm-lock.yaml generated
View File

@@ -43,6 +43,9 @@ devDependencies:
eslint-plugin-svelte:
specifier: ^2.35.1
version: 2.35.1(eslint@8.56.0)(svelte@4.2.8)
fuse.js:
specifier: ^7.0.0
version: 7.0.0
imagetools-core:
specifier: ^6.0.3
version: 6.0.3
@@ -1493,6 +1496,11 @@ packages:
dev: true
optional: true
/fuse.js@7.0.0:
resolution: {integrity: sha512-14F4hBIxqKvD4Zz/XjDc3y94mNZN6pRv3U13Udo0lNLCWRBUsrMv2xwcF/y/Z5sV6+FQW+/ow68cHpm4sunt8Q==}
engines: {node: '>=10'}
dev: true
/get-port@3.2.0:
resolution: {integrity: sha512-x5UJKlgeUiNT8nyo/AcnwLnZuZNcSjSw0kogRB+Whd1fjjFq4B1hySFxSFWWSn4mIBzg3sRNUDFYc4g5gjPoLg==}
engines: {node: '>=4'}