first commit

This commit is contained in:
root
2026-04-08 17:52:38 +08:00
commit 70a2ca66f3
12436 changed files with 1921163 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"throttleByRaf.mjs","names":[],"sources":["../../../../packages/utils/throttleByRaf.ts"],"sourcesContent":["import { cAF, rAF } from './raf'\n\nexport function throttleByRaf(cb: (...args: any[]) => void) {\n let timer = 0\n\n const throttle = (...args: any[]): void => {\n if (timer) {\n cAF(timer)\n }\n timer = rAF(() => {\n cb(...args)\n timer = 0\n })\n }\n\n throttle.cancel = () => {\n cAF(timer)\n timer = 0\n }\n\n return throttle\n}\n"],"mappings":";;;AAEA,SAAgB,cAAc,IAA8B;CAC1D,IAAI,QAAQ;CAEZ,MAAM,YAAY,GAAG,SAAsB;AACzC,MAAI,MACF,KAAI,MAAM;AAEZ,UAAQ,UAAU;AAChB,MAAG,GAAG,KAAK;AACX,WAAQ;IACR;;AAGJ,UAAS,eAAe;AACtB,MAAI,MAAM;AACV,UAAQ;;AAGV,QAAO"}