first commit

This commit is contained in:
rayd1o
2026-03-05 11:46:58 +08:00
commit e7033775d8
20657 changed files with 1988940 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
import * as React from 'react';
import { Collection } from './Collection';
import { _rs } from './utils/observerUtil';
export {
/** @private Test only for mock trigger resize event */
_rs, };
export interface SizeInfo {
width: number;
height: number;
offsetWidth: number;
offsetHeight: number;
}
export type OnResize = (size: SizeInfo, element: HTMLElement) => void;
export interface ResizeObserverProps {
/** Pass to ResizeObserver.Collection with additional data */
data?: any;
children: React.ReactNode | ((ref: React.RefObject<any>) => React.ReactElement);
disabled?: boolean;
/** Trigger if element resized. Will always trigger when first time render. */
onResize?: OnResize;
}
declare const RefResizeObserver: React.ForwardRefExoticComponent<ResizeObserverProps & React.RefAttributes<any>> & {
Collection: typeof Collection;
};
export default RefResizeObserver;