Remove some unused stuff (#4388)

Co-authored-by: Douwe Osinga <douwe@squareup.com>
This commit is contained in:
Douwe Osinga
2025-09-22 15:53:19 -04:00
committed by GitHub
parent 83fc8a69d3
commit c10f335038
8 changed files with 18 additions and 45 deletions
@@ -2,17 +2,6 @@ import { gsap } from 'gsap';
import SplitType from 'split-type';
import { useEffect, useRef } from 'react';
// Utility debounce function
export const debounce = <T extends (...args: unknown[]) => void>(func: T, delay: number): T => {
let timerId: ReturnType<typeof setTimeout>;
return ((...args: unknown[]) => {
window.clearTimeout(timerId);
timerId = setTimeout(() => {
func(...args);
}, delay);
}) as T;
};
interface TextSplitterOptions {
resizeCallback?: () => void;
splitTypeTypes?: ('lines' | 'words' | 'chars')[];
@@ -61,18 +50,10 @@ export class TextSplitter {
resizeObserver.observe(this.textElement);
}
revert() {
return this.splitText.revert();
}
getLines(): HTMLElement[] {
return this.splitText.lines ?? [];
}
getWords(): HTMLElement[] {
return this.splitText.words ?? [];
}
getChars(): HTMLElement[] {
return this.splitText.chars ?? [];
}