refactor: replace debounce/throttle deps with first-party code (#38610)

Adds `web_src/js/utils/func.ts` with `debounce` and `throttle`, dropping
`throttle-debounce` and `perfect-debounce` dependencies. Both were
needed before: the former has no promise-returning debounce, which
`TextExpander` requires, and the latter no `throttle`.

Signature follows lodash and es-toolkit: `(func, wait, {leading,
trailing})` plus `cancel`, so argument order flips at the migrated call
sites.
This commit is contained in:
silverwind
2026-07-24 16:39:15 +00:00
committed by GitHub
parent 1e42317b66
commit 66794e0549
12 changed files with 173 additions and 44 deletions
-3
View File
@@ -55,13 +55,11 @@
"mermaid": "11.16.0",
"online-3d-viewer": "0.18.0",
"pdfobject": "2.3.1",
"perfect-debounce": "2.1.0",
"postcss": "8.5.19",
"rolldown-license-plugin": "3.0.9",
"sortablejs": "1.15.7",
"swagger-ui-dist": "5.32.8",
"tailwindcss": "3.4.19",
"throttle-debounce": "5.0.2",
"tippy.js": "6.3.7",
"toastify-js": "1.12.0",
"tributejs": "5.1.3",
@@ -84,7 +82,6 @@
"@types/pdfobject": "2.2.5",
"@types/sortablejs": "1.15.9",
"@types/swagger-ui-dist": "3.30.6",
"@types/throttle-debounce": "5.0.2",
"@types/toastify-js": "1.12.4",
"@typescript-eslint/parser": "8.64.0",
"@vitejs/plugin-vue": "6.0.8",