Skip to content

Commit

Permalink
revert unrelated changes
Browse files Browse the repository at this point in the history
  • Loading branch information
george-cz committed Dec 2, 2024
1 parent 3e2206e commit c3855b1
Showing 1 changed file with 22 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,15 @@

import type { ComponentProps } from '@fluentui/react-utilities';
import type { ComponentState } from '@fluentui/react-utilities';
import type { Dispatch } from 'react';
import type { FC } from 'react';
import { MutableRefObject } from 'react';
import * as React_2 from 'react';
import type { RefObject } from 'react';
import type { SetStateAction } from 'react';
import type { Slot } from '@fluentui/react-utilities';
import type { SlotClassNames } from '@fluentui/react-utilities';

// @public
export type DynamicVirtualizerContextProps = Required<VirtualizerContextProps>;

// @public (undocumented)
export interface IndexedResizeCallbackElement {
// (undocumented)
handleResize: () => void;
}

// @public (undocumented)
export const renderVirtualizer_unstable: (state: VirtualizerState) => JSX.Element;

Expand All @@ -31,14 +27,14 @@ export const renderVirtualizerScrollViewDynamic_unstable: (state: VirtualizerScr
// @public
export interface ResizeCallbackWithRef {
// (undocumented)
(entries: ResizeObserverEntry[], observer: ResizeObserver, scrollRef?: React_2.MutableRefObject<HTMLElement | null>): void;
(entries: ResizeObserverEntry[], observer: ResizeObserver, scrollRef?: MutableRefObject<HTMLElement | null>): void;
}

// @public (undocumented)
export type ScrollToInterface = {
scrollTo: (index: number, behavior?: ScrollBehavior, callback?: (index: number) => void) => void;
virtualizerLength: React_2.RefObject<number>;
currentIndex: React_2.RefObject<number> | undefined;
virtualizerLength: RefObject<number>;
currentIndex: RefObject<number> | undefined;
};

// @public (undocumented)
Expand All @@ -47,9 +43,9 @@ export const scrollToItemDynamic: (params: ScrollToItemDynamicParams) => void;
// @public (undocumented)
export type ScrollToItemDynamicParams = {
index: number;
itemSizes: React_2.RefObject<number[]>;
itemSizes: RefObject<number[]>;
totalSize: number;
scrollViewRef: React_2.RefObject<HTMLDivElement>;
scrollViewRef: RefObject<HTMLDivElement>;
axis?: 'horizontal' | 'vertical';
reversed?: boolean;
behavior?: ScrollBehavior;
Expand All @@ -63,7 +59,7 @@ export type ScrollToItemStaticParams = {
index: number;
itemSize: number;
totalItems: number;
scrollViewRef: React_2.RefObject<HTMLDivElement>;
scrollViewRef: RefObject<HTMLDivElement>;
axis?: 'horizontal' | 'vertical';
reversed?: boolean;
behavior?: ScrollBehavior;
Expand All @@ -75,24 +71,13 @@ export const useDynamicVirtualizerMeasure: <TElement extends HTMLElement>(virtua
bufferItems: number;
bufferSize: number;
scrollRef: (instance: TElement | null) => void;
containerSizeRef: React_2.RefObject<number>;
updateScrollPosition: (scrollPosition: number) => void;
};

// @public
export const useIntersectionObserver: (callback: IntersectionObserverCallback, options?: IntersectionObserverInit) => {
setObserverList: React_2.Dispatch<React_2.SetStateAction<Element[] | undefined>>;
setObserverList: Dispatch<SetStateAction<Element[] | undefined>>;
setObserverInit: (newInit: IntersectionObserverInit | undefined) => void;
observer: React_2.MutableRefObject<IntersectionObserver | undefined>;
};

// @public
export function useMeasureList<TElement extends HTMLElement & IndexedResizeCallbackElement = HTMLElement & IndexedResizeCallbackElement>(currentIndex: number, refLength: number, totalLength: number, defaultItemSize: number): {
widthArray: React_2.MutableRefObject<any[]>;
heightArray: React_2.MutableRefObject<any[]>;
createIndexedRef: (index: number) => (el: TElement) => void;
refArray: React_2.MutableRefObject<(TElement | null | undefined)[]>;
sizeUpdateCount: number;
observer: MutableRefObject<IntersectionObserver | undefined>;
};

// @public
Expand All @@ -104,7 +89,6 @@ export const useStaticVirtualizerMeasure: <TElement extends HTMLElement>(virtual
bufferItems: number;
bufferSize: number;
scrollRef: (instance: TElement | null) => void;
containerSizeRef: React_2.MutableRefObject<number>;
};

// @public (undocumented)
Expand All @@ -129,9 +113,9 @@ export const useVirtualizerScrollViewStyles_unstable: (state: VirtualizerScrollV
export const useVirtualizerStyles_unstable: (state: VirtualizerState) => VirtualizerState;

// @public
export const Virtualizer: React_2.FC<VirtualizerProps>;
export const Virtualizer: FC<VirtualizerProps>;

// @public
// @public (undocumented)
export type VirtualizerChildRenderFunction = (index: number, isScrolling: boolean) => React_2.ReactNode;

// @public (undocumented)
Expand All @@ -141,37 +125,32 @@ export const virtualizerClassNames: SlotClassNames<VirtualizerSlots>;
export type VirtualizerContextProps = {
contextIndex: number;
setContextIndex: (index: number) => void;
childProgressiveSizes?: React_2.MutableRefObject<number[]>;
};

// @public (undocumented)
export const VirtualizerContextProvider: React_2.Provider<VirtualizerContextProps>;

// @public (undocumented)
export type VirtualizerDataRef = {
progressiveSizes: React_2.RefObject<number[]>;
nodeSizes: React_2.RefObject<number[]>;
progressiveSizes: RefObject<number[]>;
nodeSizes: RefObject<number[]>;
setFlaggedIndex: (index: number | null) => void;
currentIndex: React_2.RefObject<number>;
currentIndex: RefObject<number>;
};

// @public (undocumented)
export type VirtualizerMeasureDynamicProps = {
defaultItemSize: number;
virtualizerContext: DynamicVirtualizerContextProps;
currentIndex: number;
numItems: number;
getItemSize: (index: number) => number;
direction?: 'vertical' | 'horizontal';
bufferItems?: number;
bufferSize?: number;
};

// @public (undocumented)
export type VirtualizerMeasureProps = {
defaultItemSize: number;
direction?: 'vertical' | 'horizontal';
bufferItems?: number;
bufferSize?: number;
};

// @public (undocumented)
Expand All @@ -190,14 +169,13 @@ export const VirtualizerScrollViewDynamic: React_2.FC<VirtualizerScrollViewDynam
export const virtualizerScrollViewDynamicClassNames: SlotClassNames<VirtualizerScrollViewDynamicSlots>;

// @public (undocumented)
export type VirtualizerScrollViewDynamicProps = ComponentProps<Partial<VirtualizerScrollViewDynamicSlots>> & Partial<Omit<VirtualizerConfigProps, 'itemSize' | 'numItems' | 'getItemSize' | 'children' | 'flagIndex' | 'virtualizerContext'>> & {
export type VirtualizerScrollViewDynamicProps = ComponentProps<Partial<VirtualizerScrollViewDynamicSlots>> & Partial<Omit<VirtualizerConfigProps, 'itemSize' | 'numItems' | 'getItemSize' | 'children' | 'flagIndex'>> & {
itemSize: number;
getItemSize?: (index: number) => number;
numItems: number;
children: VirtualizerChildRenderFunction;
imperativeRef?: React_2.RefObject<ScrollToInterface>;
imperativeRef?: RefObject<ScrollToInterface>;
enablePagination?: boolean;
virtualizerContext?: DynamicVirtualizerContextProps;
};

// @public (undocumented)
Expand All @@ -211,7 +189,7 @@ export type VirtualizerScrollViewProps = ComponentProps<Partial<VirtualizerScrol
itemSize: number;
numItems: number;
children: VirtualizerChildRenderFunction;
imperativeRef?: React_2.RefObject<ScrollToInterface>;
imperativeRef?: RefObject<ScrollToInterface>;
enablePagination?: boolean;
};

Expand Down

0 comments on commit c3855b1

Please sign in to comment.