1.0.0:first commit

This commit is contained in:
2026-03-26 01:23:19 +08:00
commit f8d5b11567
23562 changed files with 2853775 additions and 0 deletions

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"}