chore: add missing files/functions

This commit is contained in:
galz10
2026-02-27 11:13:38 -08:00
parent 86a961fb2b
commit 8aea401571
5 changed files with 933 additions and 101 deletions
@@ -13,13 +13,14 @@ import {
useMemo,
} from 'react';
interface OverflowState {
export interface OverflowState {
overflowingIds: ReadonlySet<string>;
}
interface OverflowActions {
export interface OverflowActions {
addOverflowingId: (id: string) => void;
removeOverflowingId: (id: string) => void;
reset: () => void;
}
const OverflowStateContext = createContext<OverflowState | undefined>(
@@ -63,6 +64,10 @@ export const OverflowProvider: React.FC<{ children: React.ReactNode }> = ({
});
}, []);
const reset = useCallback(() => {
setOverflowingIds(new Set());
}, []);
const stateValue = useMemo(
() => ({
overflowingIds,
@@ -74,8 +79,9 @@ export const OverflowProvider: React.FC<{ children: React.ReactNode }> = ({
() => ({
addOverflowingId,
removeOverflowingId,
reset,
}),
[addOverflowingId, removeOverflowingId],
[addOverflowingId, removeOverflowingId, reset],
);
return (